File: rules

package info (click to toggle)
cproto 4.7j-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 916 kB
  • sloc: ansic: 4,116; sh: 3,077; lex: 1,059; yacc: 870; makefile: 309
file content (65 lines) | stat: -rwxr-xr-x 1,610 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
#!/usr/bin/make -f

# Support cross-compiling, per /usr/share/doc/autotools-dev/README.Debian.gz
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
  CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

binary: binary-arch 

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs README
	dh_installchangelogs CHANGES
	dh_strip
	dh_fixperms
	dh_compress
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:

install: build
	dh_testdir
	dh_testroot
	dh_installdirs
	$(MAKE) install prefix=$(CURDIR)/debian/cproto/usr

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure
	dh_testdir
	$(MAKE)
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check
endif
	touch build-stamp

configure: configure-stamp
configure-stamp: 
	dh_testdir
	cp /usr/share/misc/config.sub .     # per autotools-dev/README.Debian.gz
	cp /usr/share/misc/config.guess .   # per autotools-dev/README.Debian.gz
	rm -f config.cache
	$(shell dpkg-buildflags --export=configure) ./configure $(CONFFLAGS) \
               --prefix=/usr --enable-llib \
               --mandir=\$${prefix}/share/man
	touch configure-stamp

clean:
	dh_testdir
	dh_testroot
	-if [ -e Makefile ]; then $(MAKE) -i distclean; fi
	rm -f build-stamp configure-stamp
	dh_clean

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