summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rwxr-xr-xgenerator.py16
2 files changed, 13 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 0edb3e4..a4c9a6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,11 +53,11 @@ GENERATED= libvirt-export.c \
libvirt.h \
libvirt.py
-generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
- $(PYTHON) $(srcdir)/$(GENERATE) $(PYTHON)
+$(GENERATE).stamp: $(srcdir)/$(GENERATE) $(API_DESC)
+ $(AM_V_GEN)$(PYTHON) $(srcdir)/$(GENERATE) $(PYTHON) && \
touch $@
-$(GENERATED): generated.stamp
+$(GENERATED): $(GENERATE).stamp
$(libvirtmod_la_OBJECTS): $(GENERATED)
diff --git a/generator.py b/generator.py
index c27ff73..1cb82f5 100755
--- a/generator.py
+++ b/generator.py
@@ -11,6 +11,8 @@ import sys
import string
import re
+quiet=True
+
if __name__ == "__main__":
# launched as a script
srcPref = os.path.dirname(sys.argv[0])
@@ -617,7 +619,8 @@ def buildStubs():
sys.exit(1)
n = len(functions.keys())
- print "Found %d functions in libvirt-api.xml" % (n)
+ if not quiet:
+ print "Found %d functions in libvirt-api.xml" % (n)
py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject")
try:
@@ -629,8 +632,8 @@ def buildStubs():
except IOError, msg:
print file, ":", msg
-
- print "Found %d functions in libvirt-override-api.xml" % (
+ if not quiet:
+ print "Found %d functions in libvirt-override-api.xml" % (
len(functions.keys()) - n)
nb_wrap = 0
failed = 0
@@ -662,20 +665,21 @@ def buildStubs():
export.close()
wrapper.close()
- print "Generated %d wrapper functions" % nb_wrap
+ if not quiet:
+ print "Generated %d wrapper functions" % nb_wrap
if unknown_types:
print "Missing type converters: "
for type in unknown_types.keys():
print "%s:%d " % (type, len(unknown_types[type])),
- print
-
for f in functions_failed:
print "ERROR: failed %s" % f
if failed > 0:
return -1
+ if len(unknown_types) > 0:
+ return -1
return 0
#######################################################################