diff options
author | Stefan Kost <stefkost@src.gnome.org> | 2009-01-08 09:24:14 +0000 |
---|---|---|
committer | Stefan Kost <stefkost@src.gnome.org> | 2009-01-08 09:24:14 +0000 |
commit | f5966c260195d7afeb7c7212f10a2ec2171c6441 (patch) | |
tree | db601355732ab1b20f72adc78cd572df10ce4a65 /gtkdoc-check.in | |
parent | ef5f56ca5fd4a077e6f7a374e8dd333b7a6a8d42 (diff) | |
download | gtk-doc-f5966c260195d7afeb7c7212f10a2ec2171c6441.tar.gz |
Add support for --help and --version to remaining tools. Also show a short
* gtkdoc-check.in:
* gtkdoc-depscan.in:
* gtkdoc-fixxref.in:
* gtkdoc-mkdb.in:
* gtkdoc-mkhtml.in:
* gtkdoc-mkman.in:
* gtkdoc-mktmpl.in:
* gtkdoc-rebase.in:
* gtkdoc-scan.in:
* gtkdoc-scangobj.in:
* gtkdoc-scanobj.in:
* gtkdocize.in:
Add support for --help and --version to remaining tools. Also show a
short info on --help and format more consistently. Fixes #566911
svn path=/trunk/; revision=636
Diffstat (limited to 'gtkdoc-check.in')
-rwxr-xr-x | gtkdoc-check.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gtkdoc-check.in b/gtkdoc-check.in index d98639d..15823e0 100755 --- a/gtkdoc-check.in +++ b/gtkdoc-check.in @@ -26,6 +26,31 @@ # documentations Makefile.am: TESTS = $(GTKDOC_CHECK) ############################################################################# +use strict; +use Getopt::Long; + +my $PRINT_VERSION; +my $PRINT_HELP; + +my %optctl = ('version' => \$PRINT_VERSION, + 'help' => \$PRINT_HELP); +GetOptions(\%optctl, "version", "help"); + +if ($PRINT_VERSION) { + print "@VERSION@\n"; + exit 0; +} + +if ($PRINT_HELP) { + print <<EOF; +gtkdoc-check version @VERSION@ - run documentation unit tests + +--version Print the version of this program +--help Print this help +EOF + exit 0; +} + my $DOC_MODULE; my $checks = 3; |