#!/usr/bin/make -f # # This file is more complex than it needs to be to just build binary packages, # because it satisfies the relevant Debian policies. See ../README for more # information. # # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. # We expect this to be provided by the calling build script: export DH_COMPAT # Here's the previous/"normal" Debian value (?), but it breaks on a # converted Red Hat debhelper installation: #export DH_COMPAT=3 # This has to be exported to make some magic below work. export DH_OPTIONS ifeq ($(ENVOKED_BY_CONSTRUCT),1) BUILDDEB_OPTIONS=--destdir=build/dist endif build: build-stamp build-stamp: ifneq ($(ENVOKED_BY_CONSTRUCT),1) dh_testdir cons touch build-stamp endif clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp install-common-stamp rm -rf build find -name .construct -exec rm "{}" ";" dh_clean install-common: install-common-stamp install-common-stamp: DH_OPTIONS= install-common-stamp: dh_testdir dh_testroot dh_clean -k dh_installdirs touch install-common-stamp install-scons: build install-common python build/scons/setup.py install \ --install-scripts=`pwd`/debian/scons/usr/bin \ --install-purelib=`pwd`/debian/scons/usr/lib/scons --no-compile # Here's how we'd install the build engine in a version-specific directory. #--install-purelib=`pwd`/debian/scons/usr/lib/scons-$VERSION --no-compile install-python-scons: build install-common python build/python-scons/setup.py install \ --install-purelib=`pwd`/debian/python-scons/usr/lib/python1.5/site-packages --no-compile install-python2-scons: build install-common python build/python2-scons/setup.py install \ --install-purelib=`pwd`/debian/python2-scons/usr/lib/python2.0/site-packages --no-compile install-scons-script: build install-common python build/scons-script/setup.py install \ --install-scripts=`pwd`/debian/scons/usr/bin --no-compile # This single target is used to build all the packages, all at once, or # one at a time. So keep in mind: any options passed to commands here will # affect _all_ packages. Anything you want to only affect one package # should be put in another target, such as the install target. binary-common: dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installmanpages build/doc/man/scons.1 dh_installchangelogs dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb $(BUILDDEB_OPTIONS) # Build architecture independant packages using the common target. binary-indep: build install $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules DH_OPTIONS=-i binary-common # Build architecture dependant packages using the common target. binary-arch: build install # Any other binary targets build just one binary package at a time. binary-scons: build install-scons $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons binary-python-scons: build install-python-scons $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython-scons binary-python2-scons: build install-python2-scons $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython2-scons binary-scons-script: build install-scons-script $(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons-script binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install binary-scons binary-python-scons binary-python2-scons binary-scons-script install-scons install-python-scons install-python2-scons install-scons-script