source: trunk/lang/python/Makefile.in @ 1047

Last change on this file since 1047 was 1047, checked in by gah, 16 years ago
File size: 1.2 KB
Line 
1
2bindir          = @bindir@
3datadir         = @datadir@
4datarootdir     = @datarootdir@
5exec_prefix     = @exec_prefix@
6includedir      = @includedir@
7libdir          = @libdir@
8mandir          = @mandir@
9prefix          = @prefix@
10srcdir          = @srcdir@
11
12INSTALL         = @INSTALL@
13INSTALL_PROGRAM = ${INSTALL} -m 755
14INSTALL_DATA    = ${INSTALL} -m 644
15INSTALL_SCRIPT  = ${INSTALL} -m 644
16RM              = rm -f
17VPATH           = $(srcdir)
18
19PYTHON =        @PYTHON@
20PYTHON_FLAGS = --library-dirs=$(libdir):../../src/core \
21               --include-dirs=$(srcdir)/../../src/core:$(includedir)
22PYTHON_SITE_PACKAGES =  @PYTHON_SITE_PACKAGES@
23
24#
25# Python distutils doesn't handle VPATH correctly. So copy the sources
26# into a temporary directory.
27#
28ifneq($(PYTHON_SITE_PACKAGES),)
29   MODULE_BUILD         = build_module
30   MODULE_INSTALL       = install_module
31   MODULE_CLEAN         = clean_module
32endif
33
34all: $(MODULE_BUILD)
35
36build_module: copy_sources
37        $(PYTHON) setup.py build_ext $(PYTHON_FLAGS) build
38
39copy_sources:
40        $(RM) -r build/tmp
41        $(INSTALL) -d build/tmp
42        $(INSTALL_DATA) $(srcdir)/Rappture/*.cc build/tmp
43 
44install: $(MODULE_INSTALL)
45
46install_module:
47        $(PYTHON) setup.py install --prefix=$(prefix)
48
49clean: $(MODULE_CLEAN)
50
51clean_module:
52        $(PYTHON) setup.py clean
53        $(RM) -rf build
54
55distclean: clean
Note: See TracBrowser for help on using the repository browser.