diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-26 16:02:51 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-26 16:02:51 +0100 |
commit | ef15b28d244dcaaa38a07055c3a88f6199173611 (patch) | |
tree | 5cbb8a18e04a192993e9b41b5b138ee4a1aaa1f9 /source4/build/make | |
parent | bfc99f15a1e2407cd5aaa938b97ddaa547660cfc (diff) | |
download | samba-ef15b28d244dcaaa38a07055c3a88f6199173611.tar.gz samba-ef15b28d244dcaaa38a07055c3a88f6199173611.tar.bz2 samba-ef15b28d244dcaaa38a07055c3a88f6199173611.zip |
use make macro for python.
(This used to be commit b0408abb08648c0155d8f5da5fb299b1acbc09b6)
Diffstat (limited to 'source4/build/make')
-rw-r--r-- | source4/build/make/python.mk | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source4/build/make/python.mk b/source4/build/make/python.mk new file mode 100644 index 0000000000..6f54cd6a44 --- /dev/null +++ b/source4/build/make/python.mk @@ -0,0 +1,37 @@ +pythonbuilddir = $(builddir)/bin/python + +# Install Python +# Arguments: Module path, source location +define python_module_template + +$$(pythonbuilddir)/$(1): $(2) ; + mkdir -p $$(@D) + cp $$< $$@ + +installpython:: $$(pythonbuilddir)/$(1) ; + cp $$< $$(DESTDIR)$$(PYTHONDIR)/$(1) + +uninstallpython:: + rm -f $$(DESTDIR)$$(PYTHONDIR)/$(1) ; + +pythonmods:: $$(pythonbuilddir)/$(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) |