summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.introspection12
-rw-r--r--docs/g-ir-scanner.13
-rw-r--r--giscanner/dumper.py4
-rw-r--r--giscanner/scannermain.py5
4 files changed, 20 insertions, 4 deletions
diff --git a/Makefile.introspection b/Makefile.introspection
index bd25ef16..5edccbe0 100644
--- a/Makefile.introspection
+++ b/Makefile.introspection
@@ -65,9 +65,12 @@ _gir_libtool = $(if $(LIBTOOL),--libtool="$(LIBTOOL)")
# Macros for AM_SILENT_RULES prettiness
_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
-_gir_silent_scanner = $(_gir_silent_scanner_$(V))
-_gir_silent_scanner_ = $(_gir_silent_scanner_$(_gir_verbosity))
-_gir_silent_scanner_0 = @echo " GISCAN $(1)";
+_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
+_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
+_gir_silent_scanner_prefix_0 = @echo " GISCAN $(1)";
+_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
+_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
+_gir_silent_scanner_opts_0 = --quiet
_gir_silent_compiler = $(_gir_silent_compiler_$(V))
_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
@@ -116,7 +119,8 @@ $(if $(or $($(_gir_name)_LIBS),
# sure these are built before running the scanner. Libraries and programs
# needs to be added manually.
$(1): $$($(_gir_name)_FILES)
- $(_gir_silent_scanner) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) \
+ $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
+ $(INTROSPECTION_SCANNER_ARGS) \
--namespace=$(_gir_namespace) \
--nsversion=$(_gir_version) \
$(_gir_libtool) \
diff --git a/docs/g-ir-scanner.1 b/docs/g-ir-scanner.1
index 5089e6b5..b43d3f18 100644
--- a/docs/g-ir-scanner.1
+++ b/docs/g-ir-scanner.1
@@ -18,6 +18,9 @@ header file (.h). Currently only C based libraries are supported by the scanner.
.B \--help
Show help options
.TP
+.B \--quiet
+If passed, do not print details of normal operation.
+.TP
.B \--warn-all
Display warnings for public API which is not introspectable.
.TP
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index d72e40e0..78b44e5b 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -172,6 +172,8 @@ class DumpCompiler(object):
raise CompilerError(
"Could not find c source file: %s" % (source, ))
args.extend(list(sources))
+ if not self._options.quiet:
+ print "g-ir-scanner: compile: %r" % (args, )
subprocess.check_call(args)
def _link(self, output, *sources):
@@ -228,6 +230,8 @@ class DumpCompiler(object):
"Could not find object file: %s" % (source, ))
args.extend(list(sources))
+ if not self._options.quiet:
+ print "g-ir-scanner: link: %r" % (args, )
subprocess.check_call(args)
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index be590f1a..363f6f6d 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -37,6 +37,11 @@ from giscanner.transformer import Transformer
def _get_option_parser():
parser = optparse.OptionParser('%prog [options] sources')
+ parser.add_option('', "--quiet",
+ action="store_true", dest="quiet",
+ default=False,
+ help="If passed, do not print details of normal" \
+ + " operation")
parser.add_option("", "--format",
action="store", dest="format",
default="gir",