1 pythonbuilddir = $(builddir)/bin/python
4 mkdir -p $(DESTDIR)$(pythondir)
7 # Arguments: Module path
8 define python_module_template
10 installpython:: $$(pythonbuilddir)/$(1) ;
11 mkdir -p $$(DESTDIR)$$(pythondir)/$$(dir $(1))
12 cp $$< $$(DESTDIR)$$(pythondir)/$(1)
15 rm -f $$(DESTDIR)$$(pythondir)/$(1) ;
17 pythonmods:: $$(pythonbuilddir)/$(1) ;
21 define python_py_module_template
23 $$(pythonbuilddir)/$(1): $(2) ;
27 $(call python_module_template,$(1))
32 # Arguments: File name, dependencies, link list
33 define python_c_module_template
35 $$(pythonbuilddir)/$(1): $(2) ;
38 @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
40 $(call python_module_template,$(1))
46 .SUFFIXES: _wrap.c .i .py
49 [ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -I$(srcdir)/scripting/swig -python -keyword $<
52 @echo "Removing SWIG output files"
53 # FIXME: Remove _wrap.c files
58 @echo "Removing python modules"
59 @rm -rf $(pythonbuilddir)
62 LD_LIBRARY_PATH=bin/shared PYTHONPATH=$(pythonbuilddir) pydoctor --project-name=Samba --project-url=http://www.samba.org --make-html --docformat=restructuredtext --add-package $(pythonbuilddir)/samba