Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # Derived from sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 include /usr/share/dpkg/architecture.mk
6
7 TARGET :=avr
8 PACKAGE :=gdb-avr
9 BUILT_USING := $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W gdb-source)
10 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
11
12 #DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13 #DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14
15 CONFARGS = \
16 --host=$(DEB_HOST_GNU_TYPE) \
17 --build=$(DEB_BUILD_GNU_TYPE) \
18 --prefix=/usr \
19 --mandir='\$${prefix}/share/man' \
20 --infodir='\$${prefix}/share/info' \
21 --target=$(TARGET)\
22 --with-expat \
23 --disable-texinfo \
24 --disable-werror \
25 --with-system-zlib \
26 --with-python=python3 \
27 $(shell dpkg-buildflags --export=configure)
28
29
30 # Uncomment this to turn on verbose mode.
31 #export DH_VERBOSE=1
32
33
34 unpack: unpack-stamp
35 unpack-stamp:
36 tar xf /usr/src/gdb.tar.*
37 mv gdb* src
38 mkdir build
39 touch unpack-stamp
40
41 patch: patch-stamp
42 patch-stamp: unpack-stamp
43 touch $@
44
45 configure: configure-stamp
46 configure-stamp: patch-stamp
47 dh_testdir
48 cd build && env CC="gcc" CFLAGS="-v -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter" CPPFLAGS="$(CPPFLAGS)" ../src/configure $(CONFARGS)
49 cd build && make configure-gdb configure-bfd
50 sed -i -s s/info:.*/info:/ build/*/doc/Makefile
51 touch configure-stamp
52
53 build: configure-stamp build-stamp
54 build-stamp:
55 dh_testdir
56 cd build && $(MAKE)
57 touch build-stamp
58
59 build-indep: build
60 build-arch: build
61
62 clean:
63 dh_testdir
64 dh_testroot
65 rm -f build-stamp configure-stamp unpack-stamp patch-stamp
66 rm -rf src build `ls -d gdb* | grep -v tar`
67 dh_clean
68
69 install: build
70 dh_testdir
71 dh_testroot
72 dh_prep
73 dh_installdirs
74 # install the package into debian/tmp.
75 cd build && $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
76
77 # Build architecture-independent files.
78 binary-indep: build install
79
80 # Build architecture-dependent files.
81 binary-arch: build install
82 dh_testdir
83 dh_testroot
84
85 dh_movefiles
86 dh_installdocs -n
87 dh_installman
88 dh_installchangelogs
89 dh_link
90 dh_strip
91 dh_compress
92 dh_fixperms
93 dh_installdeb
94 dh_shlibdeps
95
96 dh_gencontrol -- -VBuilt-Using="$(BUILT_USING)"
97 dh_md5sums
98 dh_builddeb
99
100 binary: binary-indep binary-arch
101 .PHONY: build clean binary-indep binary-arch binary install configure