1 #!/usr/bin/make -f 2 3 # Uncomment this to turn on verbose mode. 4 #export DH_VERBOSE=1 5 6 PYVERS=$(shell pyversions -vr) 7 8 build: build-stamp 9 10 build-stamp: $(PYVERS:%=build-python%) build-python-scripts build-manpages 11 touch $@ 12 13 build-python%: 14 python$* setup.py build_py 15 touch $@ 16 17 build-python-scripts: 18 python setup.py build_scripts 19 touch $@ 20 21 build-manpages: 22 python scripts/rst2man.py doc/shedskin.rst debian/shedskin.1 23 24 clean: 25 dh_testdir 26 dh_testroot 27 rm -f *-stamp 28 rm -rf build* 29 rm -f debian/shedskin.1 30 find . -name '*.py[co]' | xargs rm -f 31 dh_clean 32 33 install: build install-prereq $(PYVERS:%=install-python%) install-python-scripts 34 # Script fixing would appear here. 35 36 install-prereq: 37 dh_testdir 38 dh_testroot 39 dh_clean -k 40 41 install-python%: 42 python$* setup.py install_lib --install-dir $(CURDIR)/debian/shedskin/usr/lib/python$*/site-packages 43 44 install-python-scripts: 45 python setup.py install_scripts --install-dir $(CURDIR)/debian/shedskin/usr/bin 46 47 # Build architecture-independent files here. 48 49 binary-indep: install 50 dh_testdir -i 51 dh_testroot -i 52 dh_pycentral -i 53 dh_install -i 54 dh_installdocs -i 55 dh_installchangelogs -i 56 dh_installman -i debian/shedskin.1 57 dh_compress -i 58 dh_fixperms -i 59 dh_installdeb -i 60 dh_gencontrol -i 61 dh_md5sums -i 62 dh_builddeb -i 63 64 # Build architecture-dependent files here. 65 66 binary-arch: 67 # Empty rule for this package. 68 69 binary: binary-indep binary-arch 70 .PHONY: build clean binary-arch binary-indep binary install