File: rules

package info (click to toggle)
devscripts 2.9.26etch5
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,752 kB
  • ctags: 323
  • sloc: perl: 8,642; sh: 3,590; makefile: 153; ansic: 17
file content (80 lines) | stat: -rwxr-xr-x 1,697 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# debian/rules for devscripts, based on the example file rules.indep.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
optimize := -O0
else
optimize := -O2
endif

# Here we perform some checks to ensure that we haven't goofed or left
# debugging code around or ... before we build the package
test: test-stamp
test-stamp:
	# debugging info in bts?
	if grep -q '\$$debug *= *1' bts.pl; then exit 1; else exit 0; fi
	touch test-stamp

build-indep: build-stamp-indep
build-stamp-indep: test-stamp
	dh_testdir
	touch build-stamp-indep

build-arch: build-stamp-arch
build-stamp-arch: test-stamp
	dh_testdir
	$(MAKE) CFLAGS='-g $(optimize) -Wall'
	touch build-stamp-arch

build: build-arch build-indep

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) clean
	rm -f build-stamp* test-stamp
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) DESTDIR=$(CURDIR)/debian/devscripts install

# Build architecture-independent files here.
binary-indep: build-indep
# We have nothing to do

# Build architecture-dependent files here.
binary-arch: build-arch install
	dh_testdir
	dh_testroot
	dh_installdocs README
	dh_installexamples
#	This is now done by the make install command above
#	dh_installman
	dh_link /usr/share/devscripts/conf.default \
		/usr/share/doc/devscripts/devscripts.conf.ex
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

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

# Local variables:
# mode: makefile
# End: