diff options
Diffstat (limited to 'source4/build/make')
-rw-r--r-- | source4/build/make/python.mk | 28 |
1 files changed, 23 insertions, 5 deletions
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 |