File: rules

package info (click to toggle)
pcp 2.7.4-20080507
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,112 kB
  • ctags: 9,774
  • sloc: ansic: 98,235; sh: 15,651; makefile: 3,052; yacc: 2,018; cpp: 1,062; lex: 1,003; perl: 747; fortran: 60; java: 22; awk: 20
file content (89 lines) | stat: -rwxr-xr-x 2,303 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
#!/usr/bin/make -f

pcp = pcp
libpcp = libpcp3
libpcpdev = libpcp3-dev
libpcp_pmda = libpcp-pmda3
libpcp_pmdadev = libpcp-pmda3-dev
libpcp_trace = libpcp-trace2
libpcp_tracedev = libpcp-trace2-dev

dirpcp = debian/$(pcp)
dirlibpcp = debian/$(libpcp)
dirlibpcpdev = debian/$(libpcpdev)
dirlibpcp_pmda = debian/$(libpcp_pmda)
dirlibpcp_pmdadev = debian/$(libpcp_pmdadev)
dirlibpcp_trace = debian/$(libpcp_trace)
dirlibpcp_tracedev = debian/$(libpcp_tracedev)
alldir = $(dirpcp) $(dirlibpcp) $(dirlibpcpdev) $(dirlibpcp_pmda) \
	$(dirlibpcp_pmdadev) $(dirlibpcp_trace) $(dirlibpcp_tracedev)

zip = @export GZIP=-9q
pkgpcp = $(zip); export DIST_ROOT=`pwd`/$(dirpcp);
pkglibpcp = $(zip); export DIST_ROOT=`pwd`/$(dirlibpcp);
pkglibpcp_pmda = $(zip); export DIST_ROOT=`pwd`/$(dirlibpcp_pmda);
pkglibpcp_trace = $(zip); export DIST_ROOT=`pwd`/$(dirlibpcp_trace);

options = export DEBUG=-DNDEBUG AWK=gawk PMC_SUPPORT=false;
checkdir = test -f debian/rules
uninstall = cat debian/*.install | sed -e "s,^,debian/$(pcp)/," | xargs rm -f
uninstalld = rmdir debian/$(pcp)/usr/include/pcp debian/$(pcp)/usr/include

build: built
built: config
	@echo "== dpkg-buildpackage: build" 1>&2
	$(MAKE) default
	touch built

config: .census
.census:
	@echo "== dpkg-buildpackage: configure" 1>&2
	$(checkdir)
	$(options) $(MAKE) configure_pcp
	touch .census

clean:
	@echo "== dpkg-buildpackage: clean" 1>&2
	$(checkdir)
	-rm -f built .census
	$(MAKE) realclean
	-rm -rf $(alldir)
	-rm -f debian/*substvars debian/files* debian/*.debhelper

binary-indep:

binary-arch: checkroot built
	@echo "== dpkg-buildpackage: binary-arch" 1>&2
	$(checkdir)
	-rm -rf $(alldir)
	$(pkgpcp) $(MAKE) -C . install
	$(pkgpcp) $(MAKE) -C build pcp.src

	dh_installdocs
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdirs
	dh_install --sourcedir=debian/$(pcp)
	@$(uninstall)
	@$(uninstalld)
	dh_makeshlibs -N $(libpcp)
	dh_makeshlibs -p $(libpcp)
	dh_makeshlibs -N $(libpcp_pmda)
	dh_makeshlibs -p $(libpcp_pmda)
	dh_makeshlibs -N $(libpcp_trace)
	dh_makeshlibs -p $(libpcp_trace)
	dh_installdeb
	dh_shlibdeps 2>/dev/null	# squash bogus and harmless warnings
	dh_gencontrol

	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

checkroot:
	test 0 -eq `id -u`

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