From 5874c53eba3d195d4d9017c1b884e9413221f91e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 26 Feb 2008 16:36:24 +0100 Subject: Support building .so versions of the modules. (This used to be commit 673fb9c1855f9d61d4d311bcd5e3fea0210fe6ed) --- source4/build/make/python.mk | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'source4/build/make') diff --git a/source4/build/make/python.mk b/source4/build/make/python.mk index 6f54cd6a44..bd0926717d 100644 --- a/source4/build/make/python.mk +++ b/source4/build/make/python.mk @@ -1,13 +1,9 @@ pythonbuilddir = $(builddir)/bin/python # Install Python -# Arguments: Module path, source location +# Arguments: Module path define python_module_template -$$(pythonbuilddir)/$(1): $(2) ; - mkdir -p $$(@D) - cp $$< $$@ - installpython:: $$(pythonbuilddir)/$(1) ; cp $$< $$(DESTDIR)$$(PYTHONDIR)/$(1) @@ -18,6 +14,28 @@ 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 -- cgit