2 # debian/rules file - for Mawk (1.3.3)
3 # Based on sample debian/rules file - for GNU Hello (1.3).
4 # Copyright 1994,1995 by Ian Jackson.
5 # Copyright 2001-2003 James Troup
6 # I hereby give you perpetual unlimited permission to copy,
7 # modify and relicense this file, provided that you do not remove
8 # my name from the file itself. (I assert my moral right of
9 # paternity under the Copyright, Designs and Patents Act 1988.)
10 # This file may have to be extensively modified
12 install_dir=install -d -m 755
13 install_file=install -m 644
14 install_script=install -m 755
15 install_binary=install -m 755 -s
17 include /usr/share/dpatch/dpatch.make
21 chmod 755 configure test/mawktest test/fpe_test
23 $(MAKE) CC="$(CC)" CFLAGS="-g -Wall -O2" LDFLAGS="$(LDFLAGS)" mawk
26 clean: clean-patched unpatch
27 -rm -rf debian/patched
31 -rm -f build parse.c parse.h
32 [ ! -f Makefile ] || make distclean
34 -rm -rf debian/tmp debian/substvars debian/files*
35 find . -name \*~ | xargs rm -vf
39 binary-arch: checkroot build
43 $(install_dir) debian/tmp/DEBIAN
44 $(install_script) debian/prerm debian/postinst debian/tmp/DEBIAN/
46 $(install_dir) debian/tmp/usr/bin
47 $(install_binary) mawk debian/tmp/usr/bin/
49 $(install_dir) debian/tmp/usr/share/man/man1
50 $(install_file) man/mawk.1 debian/tmp/usr/share/man/man1/
51 gzip -9v debian/tmp/usr/share/man/man1/mawk.1
53 $(install_dir) debian/tmp/usr/share/doc/mawk/
54 $(install_file) CHANGES debian/tmp/usr/share/doc/mawk/changelog
55 $(install_file) debian/changelog debian/tmp/usr/share/doc/mawk/changelog.Debian
56 $(install_file) README ACKNOWLEDGMENT debian/tmp/usr/share/doc/mawk/
57 gzip -9v debian/tmp/usr/share/doc/mawk/*
59 $(install_dir) debian/tmp/usr/share/doc/mawk/examples
60 $(install_file) examples/* debian/tmp/usr/share/doc/mawk/examples/
61 gzip -9v debian/tmp/usr/share/doc/mawk/examples/*
63 $(install_file) debian/copyright debian/tmp/usr/share/doc/mawk/
67 chown -R root.root debian/tmp
68 chmod -R go=rX debian/tmp
69 dpkg --build debian/tmp ..
71 # Below here is fairly generic really
73 binary: binary-indep binary-arch
77 test root = "`whoami`"
79 .PHONY: binary binary-arch binary-indep clean checkroot