File: rules

package info (click to toggle)
the 3.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,452 kB
  • ctags: 5,268
  • sloc: ansic: 63,118; sh: 2,399; makefile: 444
file content (117 lines) | stat: -rwxr-xr-x 3,909 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/make -f

SHELL=/bin/bash

package=the

ifeq ($(shell uname -m),i486)
 CCOPTS="-m486 -O2 -g -pipe"
else
 CCOPTS="-O2 -g"
endif

AZ=$(shell if test -f $$HOME/az/usr/include/regina/rexxsaa.h && \
              test -f $$HOME/az/use-local-libregina ; then \
                echo true; \
           else echo false; \
           fi)

build: stamp-build stamp-doc
stamp-build: stamp-configure
	$(checkdir)
	$(MAKE) CFLAGS=$(CCOPTS) the THE_Help.txt
	touch stamp-build

configure: stamp-configure
stamp-configure:
	$(checkdir)
ifeq ($(AZ),true)
	./configure --prefix=/usr/lib --exec-prefix=/usr --with-ncurses --with-rexx=regina \
             --with-rexxincdir=$$HOME/az/usr/include/regina \
             --with-rexxlibdir=$$HOME/az/usr/lib --srcdir=`pwd`
else
	./configure --prefix=/usr/lib --exec-prefix=/usr --with-ncurses --with-rexx=regina \
             --with-rexxincdir=/usr/include/regina --srcdir=`pwd`
endif
	touch stamp-configure

stamp-doc: stamp-build
	$(checkdir)
	$(MAKE) html
	touch stamp-doc

doc: stamp-doc

clean:
	$(checkdir)
	-rm -f stamp-build stamp-configure stamp-doc
	-$(MAKE) distclean
	-rm -f `find . \( -name '*~' -o -name '*.bak' \) -print`
	-rm -rf core debian/tmp* debian/files* debian/*substvars

binary-indep: checkroot build stamp-doc
	-rm -rf debian/tmp-doc
	install -d -m755 debian/tmp-doc/{DEBIAN,usr/{share/doc/{the/html,the-doc},lib/{THE,menu}}}
	cp debian/manual.the debian/tmp-doc/usr/lib/THE
	gzip -9fc the.man > debian/tmp-doc/usr/share/doc/the/the.man.gz
	gzip -9fc debian/changelog > debian/tmp-doc/usr/share/doc/the-doc/changelog.Debian.gz
	cp debian/copyright debian/tmp-doc/usr/share/doc/the-doc
	install -m644 {*.html,*.gif} debian/tmp-doc/usr/share/doc/the/html/
	install -m755 debian/preinst-doc debian/tmp-doc/DEBIAN/preinst
	install -m755 debian/postinst-doc debian/tmp-doc/DEBIAN/postinst
	install -m755 debian/prerm-doc debian/tmp-doc/DEBIAN/prerm
	install -m755 debian/postrm debian/tmp-doc/DEBIAN/postrm
	cp debian/menu-doc debian/tmp-doc/usr/lib/menu/the-doc
	dpkg-gencontrol -isp -p$(package)-doc -Pdebian/tmp-doc
	chown -R root.root debian/tmp-doc
	chmod -R go=rX debian/tmp-doc
	chmod 755 debian/md5_sums
	debian/md5_sums tmp-doc
	dpkg --build debian/tmp-doc ..

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d -m755 debian/tmp/{DEBIAN,etc,usr/{bin,lib/{THE,menu},share/man/man1,share/doc/the}}
	$(MAKE) install prefix=debian/tmp/usr/lib exec_prefix=debian/tmp/usr
	strip --strip-all --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/the
	cp debian/the.1 debian/tmp/usr/share/man/man1
	cp README TODO debian/tmp/usr/share/doc/the
	cp HISTORY debian/tmp/usr/share/doc/the/changelog
	cp debian/changelog debian/tmp/usr/share/doc/the/changelog.Debian
	gzip -9f debian/tmp/usr/share/{doc/the/*,man/man1/the.1}
	rm debian/tmp/usr/lib/THE/the.man
	cp debian/copyright debian/tmp/usr/share/doc/the
	install -m755 debian/postinst debian/tmp/DEBIAN/postinst
	install -m755 debian/postrm debian/tmp/DEBIAN/postrm
	install -m755 debian/prerm debian/tmp/DEBIAN/prerm
	install -m644 debian/conffiles debian/tmp/DEBIAN/conffiles
	install -m644 debian/therc.default debian/tmp/etc/therc
	install -m644 debian/therc.example debian/tmp/usr/lib/THE/therc.example
	cp debian/menu debian/tmp/usr/lib/menu/the
ifeq ($(AZ),true)
	LD_LIBRARY_PATH=/debian/home/azekulic/az/usr/lib dpkg-shlibdeps debian/tmp/usr/bin/the
else
	dpkg-shlibdeps debian/tmp/usr/bin/the
endif
	dpkg-gencontrol -isp -p$(package) -Pdebian/tmp
	chown -R root.root debian/tmp*
	chmod -R go=rX debian/tmp*
	chmod 755 debian/md5_sums
	debian/md5_sums tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

binary: binary-arch binary-indep

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot