source: branches/samba-3.5.x/source4/build/make/python.mk

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 1.2 KB
Line 
1pythonbuilddir = bin/python
2
3installpython::
4 mkdir -p $(DESTDIR)$(pythondir)
5
6# Install Python
7# Arguments: Module path
8define python_module_template
9
10installpython:: $$(pythonbuilddir)/$(1) ;
11 mkdir -p $$(DESTDIR)$$(pythondir)/$$(dir $(1))
12 cp $$< $$(DESTDIR)$$(pythondir)/$(1)
13
14uninstallpython::
15 rm -f $$(DESTDIR)$$(pythondir)/$(1) ;
16
17pythonmods:: $$(pythonbuilddir)/$(1) ;
18
19endef
20
21define python_py_module_template
22
23$$(pythonbuilddir)/$(1): $(2) ;
24 mkdir -p $$(@D)
25 cp $$< $$@
26
27$(call python_module_template,$(1))
28
29endef
30
31# Python C module
32# Arguments: File name, dependencies, link list
33define python_c_module_template
34
35$$(pythonbuilddir)/$(1): $(2) ;
36 @echo Linking $$@
37 @mkdir -p $$(@D)
38 @$$(MDLD) $$(LDFLAGS) $$(MDLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3)
39
40$(call python_module_template,$(1))
41endef
42
43pythonmods::
44
45clean::
46 @echo "Removing python modules"
47 @rm -rf $(pythonbuilddir)
48
49pydoctor:: pythonmods
50 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
51
52bin/python/%.py:
53 mkdir -p $(@D)
54 cp $< $@
Note: See TracBrowser for help on using the repository browser.