diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-14 15:26:26 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-14 15:26:26 +0200 |
commit | 5a73810e127b7d0af531e2bd0c0a4964878c866b (patch) | |
tree | 5e226147f50b1329545b1c1c58ad984637adfd71 /source4/build/make/python.mk | |
parent | a96bba21fa99d7057f001bfc159930052d83d974 (diff) | |
parent | f800cf250f079ab1e1bc1051c34d1d1061187447 (diff) | |
download | samba-5a73810e127b7d0af531e2bd0c0a4964878c866b.tar.gz samba-5a73810e127b7d0af531e2bd0c0a4964878c866b.tar.bz2 samba-5a73810e127b7d0af531e2bd0c0a4964878c866b.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit 79854f0aa6a9899bb72d302cbca695b8b3a3b0dc)
Diffstat (limited to 'source4/build/make/python.mk')
-rw-r--r-- | source4/build/make/python.mk | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/source4/build/make/python.mk b/source4/build/make/python.mk new file mode 100644 index 0000000000..57bf0169fe --- /dev/null +++ b/source4/build/make/python.mk @@ -0,0 +1,58 @@ +pythonbuilddir = $(builddir)/bin/python + +# Install Python +# Arguments: Module path +define python_module_template + +installpython:: $$(pythonbuilddir)/$(1) ; + cp $$< $$(DESTDIR)$$(PYTHONDIR)/$(1) + +uninstallpython:: + rm -f $$(DESTDIR)$$(PYTHONDIR)/$(1) ; + +pythonmods:: $$(pythonbuilddir)/$(1) ; + +endef + +define python_py_module_template + +$$(pythonbuilddir)/$(1): $(2) ; + mkdir -p $$(@D) + cp $$< $$@ + +$(call python_module_template,$(1)) + +endef + +# Python C module +# Arguments: Module path, object files +define python_c_module_template + +$$(pythonbuilddir)/$(1): $(2) ; + @echo Linking $$@ + @mkdir -p $$(@D) + @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) + +$(call python_module_template,$(1)) +endef + +# Swig extensions +swig:: pythonmods + +.SUFFIXES: _wrap.c .i + +.i_wrap.c: + [ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -I$(srcdir)/scripting/swig -python -keyword $< + +realdistclean:: + @echo "Removing SWIG output files" + # FIXME: Remove _wrap.c files + +pythonmods:: + +clean:: + @echo "Removing python modules" + @rm -rf $(pythonbuilddir) + +pydoctor:: pythonmods + LD_LIBRARY_PATH=bin/shared PYTHONPATH=$(pythonbuilddir) pydoctor --project-name=Samba --project-url=http://www.samba.org --make-html --docformat=restructuredtext --add-package $(pythonbuilddir)/samba |