Initial import to Tizen
[profile/ivi/sphinxbase.git] / python / Makefile.am
1 EXTRA_DIST = sphinxbase.c \
2         sphinxbase.pyx \
3         setup_win32.py \
4         sb_test.py \
5         hufftest2.py
6
7 pkginclude_HEADERS = sphinxbase.pxd
8
9 if BUILD_PYTHON
10 # Setuptools isn't really compatible with distutils, unfortunately
11 SETUPTOOLS_CRAP = `python -c 'import setuptools' 2>/dev/null \
12         && echo --single-version-externally-managed --record filelist.txt`
13
14 all-local: pymod-build-stamp
15
16 install-exec-local: pymod-build-stamp
17         $(PYTHON) setup.py install --prefix $(DESTDIR)$(prefix) $(SETUPTOOLS_CRAP)
18
19 uninstall-local:
20         $(PYTHON) setup.py bogus_uninstall --prefix $(DESTDIR)$(prefix)
21
22 clean-local:
23         $(PYTHON) setup.py clean --all
24 # This is dumb, but distutils is completely incapable of VPATH building
25         test -z "$(VPATH)" || $(RM) sphinxbase.c
26         $(RM) -r *.egg-info
27         $(RM) pymod-build-stamp filelist.txt
28
29 pymod-build-stamp: $(srcdir)/sphinxbase.c
30 # This is dumb, but distutils is completely incapable of VPATH building
31         test -z "$(VPATH)" || cp "$(srcdir)/sphinxbase.c" sphinxbase.c
32         $(PYTHON) setup.py build
33         touch $@
34 endif
35
36 if BUILD_CYTHON
37 $(srcdir)/sphinxbase.c: $(srcdir)/sphinxbase.pyx $(srcdir)/sphinxbase.pxd
38         cython -o $@ $<
39 endif