summaryrefslogtreecommitdiff
path: root/source4/scripting/python/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python/config.mk')
-rw-r--r--source4/scripting/python/config.mk33
1 files changed, 2 insertions, 31 deletions
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index a16d737344..56634736bd 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -15,35 +15,6 @@ OBJ_FILES = uuidmodule.o
PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS
SWIG_FILE = misc.i
-# Swig extensions
-swig:: pythonmods
+_PY_FILES = $(shell find scripting/python -name "*.py")
-.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:: $(PYTHON_DSOS) $(PYTHON_PYS)
-
-PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py bin/python/security.py bin/python/events.py bin/python/net.py
-
-pydoctor:: pythonmods
- LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --project-name=Samba --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES))
-
-bin/python/%.py:
- mkdir -p $(@D)
- cp $< $@
-
-installpython:: pythonmods
- @$(SHELL) $(srcdir)/script/installpython.sh \
- $(INSTALLPERMS) \
- $(DESTDIR)$(PYTHONDIR) \
- scripting/python bin/python
-
-clean::
- @echo "Removing python modules"
- @rm -rf bin/python/*
+$(foreach pyfile, $(_PY_FILES),$(eval $(call python_py_module_template,$(patsubst scripting/python/%,%,$(pyfile)),$(pyfile))))