File: control.mk

package info (click to toggle)
glibc 2.42-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 312,360 kB
  • sloc: ansic: 1,060,858; asm: 238,416; makefile: 20,960; python: 13,509; sh: 11,828; cpp: 5,188; awk: 1,794; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (42 lines) | stat: -rw-r--r-- 2,006 bytes parent folder | download | duplicates (3)
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
libc_packages := libc6 libc6.1 libc0.3
libc0_3_archs := hurd-i386 hurd-amd64
libc6_archs   := amd64 arc arm64 armel armhf hppa i386 loong64 m68k \
                 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el \
                 mipsn32r6 mipsn32r6el mips64r6 mips64r6el nios2 powerpc ppc64 ppc64el riscv64 \
                 sparc sparc64 s390x sh3 sh4 x32
libc6_1_archs := alpha

control_deps := $(wildcard debian/control.in/*) $(addprefix debian/control.in/, $(libc_packages))
triggers := binutils, linux-libc-dev [linux-any], $(BASE_CC)$(DEB_GCC_VERSION)

$(patsubst %,debian/control.in/%,$(libc_packages)) :: debian/control.in/% : debian/control.in/libc debian/rules.d/control.mk
	sed -e "s%@libc@%$*%g" \
	    -e "s%@archs@%$($(subst .,_,$*)_archs)%g" \
	    -e "s%@libc-dev-conflict@%$(foreach arch,$(filter-out $*,$(libc_packages)),$(arch)-dev,)%g" \
	    < $< > $@

debian/control: $(stamp)control
$(stamp)control: debian/rules.d/control.mk $(control_deps) debian/tests/control.in

	cat debian/control.in/main			>  $@T
	for p in $(libc_packages) ; do \
	    (echo; cat debian/control.in/$$p)		>> $@T ; \
	done
	(echo; cat debian/control.in/i386)		>> $@T
	(echo; cat debian/control.in/sparc)		>> $@T
	(echo; cat debian/control.in/sparc64)		>> $@T
	(echo; cat debian/control.in/s390) 		>> $@T
	(echo; cat debian/control.in/amd64)		>> $@T
	(echo; cat debian/control.in/powerpc)		>> $@T
	(echo; cat debian/control.in/ppc64)		>> $@T
	(echo; cat debian/control.in/mips32)		>> $@T
	(echo; cat debian/control.in/mipsn32)		>> $@T
	(echo; cat debian/control.in/mips64)		>> $@T
	(echo; cat debian/control.in/x32)		>> $@T
	sed -e 's%@libc@%$(libc)%g' -e 's%@DEB_VERSION_UPSTREAM@%$(DEB_VERSION_UPSTREAM)%g' -e 's%@DEB_GCC_VERSION@%$(DEB_GCC_VERSION)%g' < $@T > debian/control
	rm $(addprefix debian/control.in/, $(libc_packages))
	rm $@T

	# And generate the tests control file with the current GCC
	sed -e 's%@triggers@%$(triggers)%g' debian/tests/control.in > debian/tests/control
	touch $@