File: rules

package info (click to toggle)
rel 1.3-3
  • links: PTS
  • area: non-free
  • in suites: hamm, potato, slink
  • size: 496 kB
  • ctags: 216
  • sloc: ansic: 1,868; sh: 254; makefile: 142
file content (87 lines) | stat: -rwxr-xr-x 1,976 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
#! /usr/bin/make -f
#

CC = gcc
CFLAGS = -O2 -g -Wall
LDFLAGS =

SHELL = /bin/sh
srcdir = .

INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL) -m 755 -o root -g root
INSTALL_DATA = $(INSTALL) -m 644 -o root -g root
INSTALL_DIR = $(INSTALL) -d -m 755 -o root -g root

config:
	$(checkdir)
	touch stamp-config

build:
	$(checkdir)
	test -f stamp-config || make -f debian/rules config
	make
	touch stamp-build

clean:
	$(checkdir)
	test -f stamp-config || make -f debian/rules config
	-rm -f example.app.tar.gz
	-rm rel *.o
	-rm -f stamp-config stamp-build
	-rm -rf debian/tmp* debian/files debian/substvars

binary-indep: checkroot
	$(checkdir)

binary-arch: checkroot
	$(checkdir)
	-rm -rf debian/tmp*
	test -f stamp-build || make -f debian/rules build
#
#
# debian/tmp
	$(INSTALL_DIR) debian/tmp
	$(INSTALL_DIR) debian/tmp/DEBIAN
# binaries
	$(INSTALL_DIR) debian/tmp/usr/bin
	$(INSTALL_PROGRAM) -s rel debian/tmp/usr/bin
# man pages
	$(INSTALL_DIR) debian/tmp/usr/man/man1
	$(INSTALL_DATA)	rel.1 debian/tmp/usr/man/man1
	-gzip -9fr debian/tmp/usr/man
# documentation
	$(INSTALL_DIR) debian/tmp/usr/doc/rel
	$(INSTALL_DATA) debian/copyright debian/tmp/usr/doc/rel
	$(INSTALL_DATA) debian/changelog \
	  debian/tmp/usr/doc/rel/changelog.Debian
	gzip -9 debian/tmp/usr/doc/rel/changelog.Debian
#
	$(INSTALL_DATA) README debian/tmp/usr/doc/rel
	$(INSTALL_DATA) QA.METRICS debian/tmp/usr/doc/rel
	$(INSTALL_DATA) CHANGES debian/tmp/usr/doc/rel/changelog.upstream
	gzip -9 debian/tmp/usr/doc/rel/changelog.upstream
#
	tar -chf example.app.tar example.app
	gzip -9 example.app.tar
	$(INSTALL_DATA) example.app.tar.gz debian/tmp/usr/doc/rel
#
	dpkg-shlibdeps rel
	dpkg-gencontrol  -isp -prel -Pdebian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f rel.c -a -f debian/rules
endef

binary: binary-indep binary-arch

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

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

# Local Variables:
# mode: makefile
# End: