diff options
author | Stefan Kost <ensonic@users.sf.net> | 2011-04-13 16:45:35 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2011-04-13 16:45:35 +0300 |
commit | c77d80d8dc4ea1d86a3bb976fd4b7f7b71412f82 (patch) | |
tree | 3347936fc278c01ebcb9831be9af007eca47e6ba /gtkdoc-scangobj.in | |
parent | d965af706e8ce5cf183dc7e4cb7c3bc3d0036e32 (diff) | |
download | gtk-doc-c77d80d8dc4ea1d86a3bb976fd4b7f7b71412f82.tar.gz |
scangobj,make: add --verbose switch here too and adjust the makefiles
Don't show compiling the scanner when V=0.
Diffstat (limited to 'gtkdoc-scangobj.in')
-rw-r--r-- | gtkdoc-scangobj.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in index c2087f4..82746d4 100644 --- a/gtkdoc-scangobj.in +++ b/gtkdoc-scangobj.in @@ -35,6 +35,7 @@ require "gtkdoc-common.pl"; # name of documentation module my $MODULE; my $OUTPUT_DIR; +my $VERBOSE; my $PRINT_VERSION; my $PRINT_HELP; my $TYPE_INIT_FUNC="g_type_init(); g_type_class_ref(G_TYPE_OBJECT)"; @@ -47,6 +48,7 @@ my $QUERY_CHILD_PROPERTIES; 'type-init-func' => \$TYPE_INIT_FUNC, 'query-child-properties' => \$QUERY_CHILD_PROPERTIES, 'output-dir' => \$OUTPUT_DIR, + 'verbose' => \$VERBOSE, 'version' => \$PRINT_VERSION, 'help' => \$PRINT_HELP); @@ -76,6 +78,7 @@ gtkdoc-scangobj version @VERSION@ - introspect g-objects --query-child-properties=FUNC A function that returns a list of child properties for a class --output-dir=DIRNAME The directory where the results are stored +--verbose Print extra output while processing --version Print the version of this program --help Print this help EOF @@ -1365,14 +1368,19 @@ if ($CC =~ /libtool/) { $o_file = "$MODULE-scan.o" } +my $stdout=""; +if (!defined($VERBOSE) or $VERBOSE eq "0") { + $stdout=">/dev/null"; +} + # Compiling scanner -$command = "$CC $CFLAGS -c -o $o_file $MODULE-scan.c"; +$command = "$CC $stdout $CFLAGS -c -o $o_file $MODULE-scan.c"; system("($command)") == 0 or die "Compilation of scanner failed: $!\n"; # Linking scanner # FIXME: Can we turn off as-needed for the docs (or better fix it?) #$command = "$LD -Wl,--no-as-needed $o_file $LDFLAGS -o $MODULE-scan"; -$command = "$LD $o_file $LDFLAGS -o $MODULE-scan"; +$command = "$LD $stdout $o_file $LDFLAGS -o $MODULE-scan"; system("($command)") == 0 or die "Linking of scanner failed: $!\n"; # Running scanner $MODULE-scan "; |