r26186: Generate SWIG files as part of autogen.sh
authorJelmer Vernooij <jelmer@samba.org>
Wed, 28 Nov 2007 21:41:29 +0000 (22:41 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:46:39 +0000 (05:46 +0100)
(This used to be commit 4429f8b87e057787df0748f93c842c9a634dada5)

source4/autogen.sh
source4/main.mk
source4/scripting/python/config.mk

index e5aa69776f3cf44a215d7a128ad5b24c8c2e4c7b..67a3df3bd973aeaa957c691a68305cd634596458 100755 (executable)
@@ -63,6 +63,16 @@ $AUTOCONF $IPATHS || exit 1
 
 rm -rf autom4te*.cache
 
+# Run swig if it is available
+SWIG=swig
+SWIG_FILES="./scripting/python/misc.i ./auth/auth.i ./auth/credentials/credentials.i ./lib/talloc/talloc.i ./lib/ldb/ldb.i ./lib/registry/registry.i ./lib/tdb/tdb.i ./libcli/swig/libcli_smb.i ./libcli/swig/libcli_nbt.i ./librpc/rpc/dcerpc.i"
+if which $SWIG >/dev/null 2>&1; then
+       for I in $SWIG_FILES
+       do
+               echo "$0: running $SWIG for $I"
+               swig -python -keyword $I
+       done
+fi
+
 echo "Now run ./configure and then make."
 exit 0
-
index 6080ab947da061230f5dc485667b0eca172172bb..2c1bf86e84688e5ee459cd515fb1d04986fce664 100644 (file)
@@ -279,7 +279,7 @@ distclean: clean
 removebackup:
        -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
 
-realdistclean: distclean removebackup
+realdistclean:: distclean removebackup
        -rm -f include/config_tmp.h.in
        -rm -f version.h
        -rm -f configure
index eb359194509b84e76e891eb5a3b88cf3321e34fb..c396cf62bcc7600d6ff0d6cefe929705eb95173b 100644 (file)
@@ -22,14 +22,14 @@ swig: pythonmods
 .i_wrap.c:
        $(SWIG) -Wall -I$(srcdir)/scripting/swig -python -keyword $<
 
-clean::
+realdistclean::
        @echo "Removing SWIG output files"
        @-rm -f bin/python/*
        # FIXME: Remove _wrap.c files
 
 pythonmods: $(PYTHON_DSOS)
 
-PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py
+PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py
 
 pydoctor:: pythonmods
        LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES))