File: rules

package info (click to toggle)
devscripts 2.10.35lenny7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,452 kB
  • ctags: 440
  • sloc: perl: 12,973; sh: 4,225; makefile: 149; ansic: 17
file content (84 lines) | stat: -rwxr-xr-x 1,827 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
#!/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' scripts/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
	[ ! -f Makefile ] || $(MAKE) clean
	rm -f build-stamp* test-stamp
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	dh_install
	chmod +x debian/devscripts/usr/share/bug/devscripts/script
	$(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
	dh_installman
	dh_link
	if [ -f debian/devscripts/usr/share/man/fr/man1/debchange.1 ]; then \
	    dh_link /usr/share/man/fr/man1/debchange.1.gz \
	    /usr/share/man/fr/man1/dch.1.gz; \
	fi
	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: