File: rules

package info (click to toggle)
ada-reference-manual 20021112web-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 18,652 kB
  • ctags: 8,921
  • sloc: makefile: 52; sh: 20
file content (69 lines) | stat: -rwxr-xr-x 2,191 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
#!/usr/bin/make -f

STAGING = debian/tmp
DOCDIR_BASE = usr/share/doc/ada-reference-manual
DOCDIR = $(STAGING)/$(DOCDIR_BASE)

build: build-stamp
build-stamp:
	makeinfo --no-warn arm95/arm95.texi -o arm95/arm95.info

	touch build-stamp

clean:
	-rm arm95/*.info*
	-rm debian/files
	-rm build-stamp
	-rm -rf $(STAGING)


install: build
	rm -rf $(STAGING)
	install -d $(STAGING)/DEBIAN
	install -d $(STAGING)/usr/share/info
	install -d $(STAGING)/usr/share/doc-base
	install -d $(DOCDIR)/arm95tc1
	install -d $(DOCDIR)/html/tc1
	install -d $(DOCDIR)/html/arm95tc1
	install -d $(DOCDIR)/html/aarm95tc1

	install -m 755 debian/postinst $(STAGING)/DEBIAN/
	install -m 755 debian/prerm $(STAGING)/DEBIAN/

	install -m 644 debian/copyright $(DOCDIR)/
	install -m 644 debian/changelog $(DOCDIR)/changelog.Debian
	gzip -9 $(DOCDIR)/changelog.Debian
	install -m 644 debian/README.Debian $(DOCDIR)/
	gzip -9 $(DOCDIR)/README.Debian

	install -m 644 arm95tc1/*.txt $(DOCDIR)/arm95tc1/
	gzip -9 $(DOCDIR)/arm95tc1/*.txt
	install -m 644 arm95tc1/*.html $(DOCDIR)/html/arm95tc1/
	install -m 644 aarm95tc1/*.html $(DOCDIR)/html/aarm95tc1/
	ln -s ../tc1/defect1.html $(DOCDIR)/html/aarm95tc1/
	ln -s ../tc1/defect2.html $(DOCDIR)/html/aarm95tc1/
	install -m 644 tc1/Corrigendum.html $(DOCDIR)/html/tc1/
	install -m 644 tc1/defect?.html $(DOCDIR)/html/tc1/
	install -m 644 arm95/*.info* $(STAGING)/usr/share/info/
	gzip -9 $(STAGING)/usr/share/info/*

	install -m 644 debian/docbase.arm95-tc1-changes $(STAGING)/usr/share/doc-base/arm95-tc1-changes
	install -m 644 debian/docbase.arm95-tc1 $(STAGING)/usr/share/doc-base/arm95-tc1
	install -m 644 debian/docbase.aarm95-tc1 $(STAGING)/usr/share/doc-base/aarm95-tc1

	(cd $(STAGING) && find . -path ./DEBIAN -prune -o ! -type f -o -print \
		| sed s,^./,, \
		| xargs md5sum > DEBIAN/md5sums )

# Build architecture-independent files here.
binary-indep: build install
	dpkg-gencontrol -isp -pada-reference-manual
	chown -R root.root $(STAGING)
	chmod -R g-ws $(STAGING)
	dpkg --build debian/tmp ..

# Build architecture-dependent files here.
binary-arch: build install

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install