#!/usr/bin/make -f #-*- makefile -*- # Made with the aid of dh_make, by Craig Small # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. # Some lines taken from debmake, by Christoph Lameter. # build without debugging symbols and strip executables when installing, # unless DEB_BUILD_OPTIONS specifies otherwise # Note: when changing the debhelper compatibility level, also update # the dependency in debian/control (e.g. "debhelper (>= 7)") CFLAGS = -Wall -g INSTALL = install INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(NUMJOBS) endif DOC= doc/checkpoint-c.text \ doc/classes-c.text \ doc/interpretation-c.text \ doc/introduction-c.text \ doc/models-c.text \ doc/prediction-c.text \ doc/preparation-c.text \ doc/reports-c.text \ doc/search-c.text \ read-me.text EXAMPLES= sample/imports-* \ sample/read.me.c \ sample/screenc.text \ sample/scriptc.text \ debian/README.sample \ debian/simple.README \ debian/simple.c \ debian/simple.db2 \ debian/simple.hd2 \ debian/simple.model \ debian/simple.r-params \ debian/simple.s-params # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir # Add here commands to compile the package. (cd prog; $(MAKE) $(MAKEFLAGS)) # assemble changelog in reverse chronological order -rm changelog for a in 9 8 7 6 5 4 3 2 1; do \ for b in 9 8 7 6 5 4 3 2 1 0; do \ for c in 9 8 7 6 5 4 3 2 1; do \ if [ -f version-$$a-$$b-$$c.text ]; then \ cat version-$$a-$$b-$$c.text >>changelog; fi; \ done; \ if [ -f version-$$a-$$b.text ]; then \ cat version-$$a-$$b.text >>changelog; fi; \ done; \ done touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp install-stamp # Add here commands to clean up after the build process. rm -f doc/*.pdf prog/autoclass prog/*.o dh_clean install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/autoclass. $(INSTALL_PROGRAM) prog/autoclass debian/autoclass/usr/bin/autoclass touch install-stamp # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install rm -f debian/postinst.debhelper debian/prerm.debhelper # dh_testversion dh_testdir dh_testroot dh_installdocs $(DOC) dh_installexamples $(EXAMPLES) # dh_installmenu # dh_installemacsen # dh_installinit # dh_installcron dh_installman debian/autoclass.1 # dh_undocumented dh_installchangelogs changelog dh_link dh_strip dh_compress -X.pdf dh_fixperms # dh_makeshlibs dh_installdeb # dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary