File: rules

package info (click to toggle)
binutils-djgpp 2.35.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 321,228 kB
  • sloc: ansic: 1,162,947; asm: 671,219; cpp: 134,012; exp: 70,783; makefile: 55,860; sh: 22,254; yacc: 14,459; lisp: 13,806; perl: 2,008; lex: 1,649; pascal: 307; sed: 195; awk: 25
file content (73 lines) | stat: -rwxr-xr-x 2,803 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
#!/usr/bin/make -f
# -*- makefile -*-
# Copyright © 2010-2020 Stephen Kitt <skitt@debian.org>
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This package is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

top_dir := $(shell pwd)
upstream_dir := $(wildcard $(top_dir)/gnu/binutils-*)
build_dir := $(top_dir)/build

target := i386-pc-msdosdjgpp

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --without autoreconf

override_dh_clean:
	dh_clean
	rm -rf *-stamp $(build_dir)
	cd $(upstream_dir) && chmod 755 ar-lib compile config.* configure ltmain.sh missing mkdep mkinstalldirs \
					move-if-change src-release.sh symlink-tree test-driver ylwrap

override_dh_auto_configure:
	mkdir -p $(build_dir)/$(target) && cd $(build_dir)/$(target) && $(upstream_dir)/configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --disable-silent-rules --libdir=\${prefix}/lib/$(DEB_HOST_MULTIARCH) --libexecdir=\${prefix}/lib/$(DEB_HOST_MULTIARCH) --disable-maintainer-mode --disable-dependency-tracking --disable-multilib --enable-lto --enable-plugins --enable-deterministic-archives --with-system-zlib --target=$(target) --disable-werror

override_dh_auto_build-arch:
	dh_auto_build --parallel -B$(build_dir)/$(target)

override_dh_auto_test-arch:
	dh_auto_test -B$(build_dir)/$(target)

override_dh_auto_install-arch:
	dh_auto_install -B$(build_dir)/$(target)

# Drop files which will conflict with other packages
	rm -rf debian/binutils-djgpp/usr/lib/*.a
	rm -rf debian/binutils-djgpp/usr/share/info
	rm -rf debian/binutils-djgpp/usr/share/locale

# Drop files we don’t need
	rm -f debian/binutils-djgpp/usr/share/man/man1/*-dlltool.1* \
	      debian/binutils-djgpp/usr/share/man/man1/*-wind*.1*

override_dh_install-arch:
	dh_install -a

# Symlink duplicates — see https://wiki.debian.org/dedup.debian.net
# We remove hardlinks too, otherwise one of the ld hardlinks is left alone and
# isn't symlinked
	rdfind -outputname /dev/null -removeidentinode false -makesymlinks true debian/binutils-djgpp
	symlinks -r -s -c debian/binutils-djgpp

override_dh_installchangelogs:
	dh_installchangelogs $(upstream_dir)/ChangeLog

override_dh_missing:
	dh_missing --list-missing