summaryrefslogtreecommitdiff
path: root/gtkdoc-check.in
diff options
context:
space:
mode:
authorStefan Kost <stefkost@src.gnome.org>2009-01-08 09:24:14 +0000
committerStefan Kost <stefkost@src.gnome.org>2009-01-08 09:24:14 +0000
commitf5966c260195d7afeb7c7212f10a2ec2171c6441 (patch)
treedb601355732ab1b20f72adc78cd572df10ce4a65 /gtkdoc-check.in
parentef5f56ca5fd4a077e6f7a374e8dd333b7a6a8d42 (diff)
downloadgtk-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-xgtkdoc-check.in25
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;