diff options
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/config.mk | 42 | ||||
-rw-r--r-- | source4/scripting/python/modules.c | 1 |
2 files changed, 9 insertions, 34 deletions
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk index 09c77813ca..a0f5caad3b 100644 --- a/source4/scripting/python/config.mk +++ b/source4/scripting/python/config.mk @@ -1,49 +1,25 @@ [BINARY::smbpython] PRIVATE_DEPENDENCIES = LIBPYTHON -OBJ_FILES = smbpython.o + +smbpython_OBJ_FILES = scripting/python/smbpython.o [SUBSYSTEM::LIBPYTHON] PUBLIC_DEPENDENCIES = EXT_LIB_PYTHON INIT_FUNCTION_SENTINEL = { NULL, NULL } -OBJ_FILES = modules.o pytalloc.o + +LIBPYTHON_OBJ_FILES = $(addprefix scripting/python/, modules.o pytalloc.o) [PYTHON::python_uuid] PRIVATE_DEPENDENCIES = LIBNDR -OBJ_FILES = uuidmodule.o + +python_uuid_OBJ_FILES = scripting/python/uuidmodule.o [PYTHON::python_misc] PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS SWIG_FILE = misc.i -# 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:: $(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 $< $@ +python_misc_OBJ_FILES = scripting/python/misc_wrap.o -installpython:: pythonmods - @$(SHELL) $(srcdir)/script/installpython.sh \ - $(INSTALLPERMS) \ - $(DESTDIR)$(PYTHONDIR) \ - scripting/python bin/python +_PY_FILES = $(shell find scripting/python -name "*.py") -clean:: - @echo "Removing python modules" - @rm -rf bin/python/* +$(foreach pyfile, $(_PY_FILES),$(eval $(call python_py_module_template,$(patsubst scripting/python/%,%,$(pyfile)),$(pyfile)))) diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c index 2ecad20b8e..2c10a35c60 100644 --- a/source4/scripting/python/modules.c +++ b/source4/scripting/python/modules.c @@ -19,7 +19,6 @@ #include "includes.h" #include <Python.h> -#include "build.h" extern void init_ldb(void); extern void init_security(void); |