Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 DPKG_EXPORT_BUILDFLAGS = 1
6 include /usr/share/dpkg/buildflags.mk
7 include /usr/share/dpkg/architecture.mk
8
9 TARGET=avr
10 PACKAGE=gcc-avr
11
12 CONFARGS = -v \
13 --enable-languages=c,c++,rust \
14 --prefix=/usr/lib \
15 --infodir=/usr/share/info \
16 --mandir=/usr/share/man \
17 --bindir=/usr/bin \
18 --libexecdir=/usr/lib \
19 --libdir=/usr/lib \
20 --enable-shared \
21 --with-system-zlib \
22 --enable-long-long \
23 --enable-nls \
24 --without-included-gettext \
25 --disable-libssp \
26 --disable-libcc1 \
27 --build=$(DEB_BUILD_GNU_TYPE) \
28 --host=$(DEB_HOST_GNU_TYPE) \
29 --target=$(TARGET) \
30 --enable-host-pie \
31 $(shell env DEB_BUILD_MAINT_OPTIONS="hardening=+all" \
32 dpkg-buildflags --export=configure | sed -e 's/-Werror=format-security//g')
33
34
35 # support parallel build using DEB_BUILD_OPTIONS=parallel=N
36 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
37 PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
38 endif
39
40 # Uncomment this to turn on verbose mode.
41 #export DH_VERBOSE=1
42
43 BUILD_TREE=objdir
44
45 %:
46 dh $@
47
48
49 override_dh_auto_configure: configure-stamp
50
51 unpack-stamp:
52 tar xf /usr/src/gcc-14/gcc-*.tar.xz
53 mv gcc* src
54 patch -p1 src/gcc/Makefile.in debian/disable_docs.patch
55 patch -d src -p1 < debian/revert-codesize.patch
56 mkdir build
57 touch unpack-stamp
58
59 patch-stamp: unpack-stamp
60 touch $@
61
62 configure-stamp: patch-stamp
63 dh_testdir
64 AUTOM4TE=autom4te2.69 AUTOCONF=autoconf2.69 dh_autoreconf
65 mkdir -p $(BUILD_TREE)
66 # Add here commands to configure the package.
67 cd $(BUILD_TREE) && env ../src/configure $(CONFARGS)
68 touch configure-stamp
69
70 override_dh_autoreconf:configure-stamp build-stamp
71 dh_autoreconf
72
73 build-stamp:
74 dh_testdir
75
76 # Add here commands to compile the package.
77 cd $(BUILD_TREE) && $(MAKE) $(PARALLEL)
78 #/usr/bin/docbook-to-man debian/$(PACKAGE).sgml > $(PACKAGE).1
79
80 touch build-stamp
81
82 override_dh_auto_clean:
83 dh_testdir
84 dh_testroot
85 dh_autoreconf_clean
86 rm -f build-stamp configure-stamp unpack-stamp patch-stamp
87 rm -rf $(BUILD_TREE)
88 rm -rf build src
89 rm -f debian/autoreconf.after debian/autoreconf.before
90
91 dh_clean
92
93 override_dh_auto_install:
94 dh_testdir
95 dh_testroot
96 dh_prep
97 dh_installdirs
98
99 # Add here commands to install the package into debian/$(PACKAGE).
100 echo install: > $(BUILD_TREE)/fixincludes/Makefile
101 cd $(BUILD_TREE) && $(MAKE) install DESTDIR=$(CURDIR)/debian/$(PACKAGE)/
102
103 #rm debian/$(PACKAGE)/usr/share/man/man1/avr-g++.1
104 #ln -s avr-gcc.1.gz debian/$(PACKAGE)/usr/share/man/man1/avr-g++.1.gz
105 ln -s avr-g++.1.gz debian/$(PACKAGE)/usr/share/man/man1/avr-c++.1.gz
106 ln -s avr-gcc.1.gz debian/$(PACKAGE)/usr/share/man/man1/avr-gcc-14.2.0.gz
107 install -m644 debian/avr-gccbug.1 debian/$(PACKAGE)/usr/share/man/man1/avr-gccbug.1
108 gzip -9 debian/$(PACKAGE)/usr/share/man/man1/avr-gccbug.1
109
110 cd debian/$(PACKAGE)/usr/ && \
111 rm -rf bin/gcov bin/gccbug share/man/man1/gcov.1* \
112 lib*/libiberty.a share/info share/man/man7/gfdl.7* \
113 share/man/man7/gpl.7* share/man/man7/fsf-funding.7* \
114 share/locale bin/*c++filt lib/avr \
115 share/man lib/share lib/include
116
117 override_dh_strip:
118 dh_strip -X.a -X.o
119 for f in `find debian/$(PACKAGE) -name '*.a*'`; do \
120 avr-strip --strip-debug $$f; \
121 done