#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DH_OPTIONS DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl XP=xsltproc --nonet include /usr/share/quilt/quilt.make EXTRA_GENERATED_FILES=Doc/sketch-manual.texi Doc/sketch.info \ sketch.1 version.h Doc/version.texi Doc/sketch Doc/sketch.pdf TEXIMAN=Doc/sketch-debian.texi CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif configure: configure-stamp configure-stamp: dh_testdir perl makever.pl touch configure-stamp build: build-arch-stamp build-indep-stamp build-arch-stamp: configure-stamp $(QUILT_STAMPFN) Doc/sketch-manual.texi dh_testdir $(MAKE) -f makefile cd Doc && makeinfo sketch-manual.texi $(XP) -o sketch.1 $(DB2MAN) debian/sketch-man.xml touch $@ Doc/sketch-manual.texi: Doc/manual.texi $(QUILT_STAMPFN) tr -d '\r' < Doc/manual.texi > Doc/sketch-manual.texi build-indep-stamp: configure-stamp Doc/sketch-manual.texi $(QUILT_STAMPFN) # we need the sketch binary to make the illustrations $(MAKE) -f makefile cd Doc && perl make.pl examples notypeset cd Doc && makeinfo --html sketch-manual.texi # remove pngs to force pdfs to be used; also we need them for the html mv Doc/ex*.png Doc/sketch # run twice for cross references cd Doc && texi2pdf -o sketch.pdf sketch-manual.texi && \ texi2pdf -o sketch.pdf sketch-manual.texi touch $@ clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp build-arch-stamp build-indep-stamp rm -rf Doc/sketch rm -f Doc/sketch-manual.* $(MAKE) clean dh_clean $(EXTRA_GENERATED_FILES) install: install-indep install-arch install-indep: dh_testdir dh_testroot dh_clean -k -i dh_installdirs -i dh_installdocs dh_install -i install-arch: dh_testdir dh_testroot dh_clean -k -s dh_installdirs -s dh_install -s # Build architecture-independent files here. binary-indep: build-indep install-indep $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common # Build architecture-dependent files here. binary-arch: build-arch install-arch $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common # Must not depend on anything. This is to be called by # binary-arch/binary-indep # in another 'make' thread. binary-common: dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_installinfo dh_installman dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean build-indep build-arch install-indep install-arch binary-indep binary-arch binary install configure