diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 1535 |
1 files changed, 1535 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b68f714 --- /dev/null +++ b/debian/rules @@ -0,0 +1,1535 @@ +#! /usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# version number of the defaults package +VDEF := $(strip $(shell dpkg-parsechangelog | awk -F: '/^Version:/ {print $$NF}')) +SOURCE := $(strip $(shell dpkg-parsechangelog | awk -F: '/^Source:/ {print $$NF}')) + +VMAJOR := $(shell echo $(VDEF) | awk -F. '{print $$1}') +VMINOR := $(shell echo $(VDEF) | awk -F. '{print $$2}' | sed -e 's/\([0-9]*\).*/\1/') +REL_EXT := $(shell echo $(VDEF) | sed -e 's/^$(VMAJOR)\.$(VMINOR)//') +SPACE := $(EMPTY) $(EMPTY) + +# gcc-defaults 0.8 is the first version for 2.95.4. +#REL_NO_295 := $(shell expr $(VMINOR) + 15)$(REL_EXT) +# gcc-defaults 0.6 is the first version with 2.96 support. +#REL_NO_296 := $(shell expr $(VMINOR) + 17)$(REL_EXT) +# gcc-defaults 0.17 is the first version with 3.0.4 support. +#REL_NO_30 := $(shell expr $(VMINOR) + 6)$(REL_EXT) +# gcc-defaults 1.0 is the first version with 3.1 support. +#REL_NO_31 := $(shell expr $(VMINOR) + 1)$(REL_EXT) +# gcc-defaults 1.2 is the first version with 3.2 support. +#REL_NO_32 := $(shell expr $(VMINOR) - 1)$(REL_EXT) +# gcc-defaults 1.3 is the first version with 3.2.2 support. +#REL_NO_322 := $(shell expr $(VMINOR) - 3)$(REL_EXT) +# gcc-defaults 1.4 is the first version with 3.2.3 support. +#REL_NO_323 := $(shell expr $(VMINOR) - 4)$(REL_EXT) +# gcc-defaults 1.5 is the first version with 3.3 support. +#REL_NO_33 := $(shell expr $(VMINOR) - 5)$(REL_EXT) +# gcc-defaults 1.7 is the first version with 3.3.1 support. +#REL_NO_331 := $(shell expr $(VMINOR) - 7)$(REL_EXT) +# gcc-defaults 1.10 is the first version with 3.3.2 support. +#REL_NO_332 := $(shell expr $(VMINOR) - 9)$(REL_EXT) +# gcc-defaults 1.13 is the first version with 3.3.3 support. +#REL_NO_333 := $(shell expr $(VMINOR) - 12)$(REL_EXT) +# gcc-defaults 1.16 is the first version with 3.3.4 support. +#REL_NO_334 := $(shell expr $(VMINOR) - 15)$(REL_EXT) +# gcc-defaults 1.19 is the first version with 3.3.5 support. +#REL_NO_335 := $(shell expr $(VMINOR) - 18)$(REL_EXT) +# gcc-defaults 1.22 is the first version with 3.3.6 support. +#REL_NO_336 := $(shell expr $(VMINOR) - 21)$(REL_EXT) + +# gcc-defaults 1.22 is the first version with 3.4.3 support. +#REL_NO_343 := $(shell expr $(VMINOR) - 21)$(REL_EXT) +# gcc-defaults 1.23 is the first version with 3.4.4 support. +#REL_NO_344 := $(shell expr $(VMINOR) - 23)$(REL_EXT) +# gcc-defaults 1.30 is the first version with 3.4.5 support. +#REL_NO_345 := $(shell expr $(VMINOR) - 29)$(REL_EXT) +# gcc-defaults 1.32 is the first version with 3.4.5 support. +#REL_NO_346 := $(shell expr $(VMINOR) - 31)$(REL_EXT) + +# gcc-defaults 1.23 is the first version with 4.0.0 support. +#REL_NO_400 := $(shell expr $(VMINOR) - 22)$(REL_EXT) +# gcc-defaults 1.26 is the first version with 4.0.1 support. +#REL_NO_401 := $(shell expr $(VMINOR) - 25)$(REL_EXT) +# gcc-defaults 1.29 is the first version with 4.0.2 support. +#REL_NO_402 := $(shell expr $(VMINOR) - 28)$(REL_EXT) +# gcc-defaults 1.32 is the first version with 4.0.3 support. +#REL_NO_403 := $(shell expr $(VMINOR) - 31)$(REL_EXT) + +# gcc-defaults 1.33 is the first version with 4.1.0 support. +#REL_NO_410 := $(shell expr $(VMINOR) - 33)$(REL_EXT) +# gcc-defaults 1.36 is the first version with 4.1.1 support. +#REL_NO_411 := $(shell expr $(VMINOR) - 35)$(REL_EXT) +# gcc-defaults 1.51 is the first version with 4.1.2 support. +#REL_NO_412 := $(shell expr $(VMINOR) - 50)$(REL_EXT) + +# gcc-defaults 1.54 is the first version with 4.2.0 support. +#REL_NO_420 := $(shell expr $(VMINOR) - 54)$(REL_EXT) +# gcc-defaults 1.56 is the first version with 4.2.1 support. +#REL_NO_421 := $(shell expr $(VMINOR) - 55)$(REL_EXT) +# gcc-defaults 1.62 is the first version with 4.2.2 support. +#REL_NO_422 := $(shell expr $(VMINOR) - 61)$(REL_EXT) +# gcc-defaults 1.63 is the first version with 4.2.3 support. +#REL_NO_423 := $(shell expr $(VMINOR) - 62)$(REL_EXT) +# gcc-defaults 1.73 is the first version with 4.2.4 support. +#REL_NO_424 := $(shell expr $(VMINOR) - 72)$(REL_EXT) + +# gcc-defaults 1.63 is the first version with 4.3 support. +#REL_NO_43 := $(shell expr $(VMINOR) - 62)$(REL_EXT) +# gcc-defaults 1.66 is the first version with 4.3 support. +#REL_NO_430 := $(shell expr $(VMINOR) - 65)$(REL_EXT) +# gcc-defaults 1.74 is the first version with 4.3.1 support. +#REL_NO_431 := $(shell expr $(VMINOR) - 73)$(REL_EXT) +# gcc-defaults 1.76 is the first version with 4.3.2 support. +#REL_NO_432 := $(shell expr $(VMINOR) - 75)$(REL_EXT) +# gcc-defaults 1.79 is the first version with 4.3.3 support. +#REL_NO_433 := $(shell expr $(VMINOR) - 78)$(REL_EXT) +# gcc-defaults 1.88 is the first version with 4.3.4 support. +#REL_NO_434 := $(shell expr $(VMINOR) - 87)$(REL_EXT) +# gcc-defaults 1.94 is the first version with 4.3.5 support. +#REL_NO_435 := $(shell expr $(VMINOR) - 93)$(REL_EXT) + +# gcc-defaults 1.81 is the first version with 4.4.0 support. +#REL_NO_440 := $(shell expr $(VMINOR) - 80)$(REL_EXT) +# gcc-defaults 1.88 is the first version with 4.4.1 support. +#REL_NO_441 := $(shell expr $(VMINOR) - 87)$(REL_EXT) +# gcc-defaults 1.90 is the first version with 4.4.2 support. +#REL_NO_442 := $(shell expr $(VMINOR) - 89)$(REL_EXT) +# gcc-defaults 1.93 is the first version with 4.4.3 support. +#REL_NO_443 := $(shell expr $(VMINOR) - 92)$(REL_EXT) +# gcc-defaults 1.94 is the first version with 4.4.4 support. +#REL_NO_444 := $(shell expr $(VMINOR) - 93)$(REL_EXT) +# gcc-defaults 1.96 is the first version with 4.4.5 support. +#REL_NO_445 := $(shell expr $(VMINOR) - 95)$(REL_EXT) +# gcc-defaults 1.106 is the first version with 4.4.6 support. +#REL_NO_446 := $(shell expr $(VMINOR) - 105)$(REL_EXT) + +# gcc-defaults 1.98 is the first version with 4.5.2 support. +#REL_NO_452 := $(shell expr $(VMINOR) - 97)$(REL_EXT) +# gcc-defaults 1.103 is the first version with 4.5.3 support. +#REL_NO_453 := $(shell expr $(VMINOR) - 102)$(REL_EXT) + +# gcc-defaults 1.100 is the first version with 4.6.0 support. +#REL_NO_460 := $(shell expr $(VMINOR) - 99)$(REL_EXT) +# gcc-defaults 1.106 is the first version with 4.6.1 support. +#REL_NO_461 := $(shell expr $(VMINOR) - 105)$(REL_EXT) +# gcc-defaults 1.109 is the first version with 4.6.2 support. +#REL_NO_462 := $(shell expr $(VMINOR) - 108)$(REL_EXT) +# gcc-defaults 1.113 is the first version with 4.6.3 support. +#REL_NO_463 := $(shell expr $(VMINOR) - 112)$(REL_EXT) +# gcc-defaults 1.121 is the first version with 4.6.4 support. +#REL_NO_464 := $(shell expr $(VMINOR) - 120)$(REL_EXT) + +# gcc-defaults 1.113 is the first version with 4.7.0 support. +#REL_NO_470 := $(shell expr $(VMINOR) - 112)$(REL_EXT) +# gcc-defaults 1.119 is the first version with 4.7.1 support. +#REL_NO_471 := $(shell expr $(VMINOR) - 118)$(REL_EXT) +# gcc-defaults 1.120 is the first version with 4.7.2 support. +#REL_NO_472 := $(shell expr $(VMINOR) - 119)$(REL_EXT) +# gcc-defaults 1.121 is the first version with 4.7.3 support. +#REL_NO_473 := $(shell expr $(VMINOR) - 120)$(REL_EXT) + +REL_NO_481 := $(shell expr $(VMINOR) - 120)$(REL_EXT) +REL_NO_482 := $(shell expr $(VMINOR) - 123)$(REL_EXT) +REL_NO_483 := $(shell expr $(VMINOR) - 127)$(REL_EXT) +REL_NO_484 := $(shell expr $(VMINOR) - 135)$(REL_EXT) + +REL_NO_490 := $(shell expr $(VMINOR) - 125)$(REL_EXT) +REL_NO_491 := $(shell expr $(VMINOR) - 129)$(REL_EXT) +REL_NO_492 := $(shell expr $(VMINOR) - 134)$(REL_EXT) +REL_NO_493 := $(shell expr $(VMINOR) - 141)$(REL_EXT) + +REL_NO_50 := $(shell expr $(VMINOR) - 138)$(REL_EXT) +REL_NO_52 := $(shell expr $(VMINOR) - 141)$(REL_EXT) +REL_NO_53 := $(shell expr $(VMINOR) - 149)$(REL_EXT) +REL_NO_54 := $(shell expr $(VMINOR) - 163)$(REL_EXT) + +REL_NO_60 := $(shell expr $(VMINOR) - 159)$(REL_EXT) +REL_NO_61 := $(shell expr $(VMINOR) - 162)$(REL_EXT) +REL_NO_62 := $(shell expr $(VMINOR) - 163)$(REL_EXT) +REL_NO_63 := $(shell expr $(VMINOR) - 164)$(REL_EXT) + +# minimum required gcc-X.Y versions +REQV_295 := (>= 1:2.95.4-16) +REQV_296 := +REQV_30 := (>= 1:3.0.4-12) +REQV_32 := (>= 1:3.2.3-1) +REQV_33 := (>= 1:3.3.6-1) +REQV_34 := (>= 3.4.6-1) +REQV_40 := (>= 4.0.3-1) +REQV_41 := (>= 4.1.2-1) +REQV_41_GCJ := (>= 4.1.2-1) +REQV_42 := (>= 4.2.4-1) +REQV_42_GCJ := (>= 4.2.4-1) +REQV_43 := (>= 4.3.5-1) +REQV_44 := (>= 4.4.7-1~) +REQV_45 := (>= 4.5.3-1) +REQV_46 := (>= 4.6.4-1~) +REQV_46_GDC := $(REQV_46) +REQV_47 := (>= 4.7.3-1~) +REQV_48 := (>= 4.8.4-1~) +REQV_49 := (>= 4.9.3-10~) +REQV_5 := (>= 5.4.1-2~) +REQV_6 := (>= 6.3.0-9~) + +REQV_LIBGCJ_BC := (>= 6.3.0-1~) + +# architecture dependent variables +DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +ifneq (,$(filter $(DEB_HOST_ARCH), i386 kfreebsd-i386 hurd-i386)) + DEB_HOST_GNU_TYPE := $(subst i586,i686,$(DEB_HOST_GNU_TYPE)) + i586_symlinks = yes +endif +DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +all_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 hurd-i386 kfreebsd-amd64 kfreebsd-i386 + +gcc5_archs = +gcc6_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 hurd-i386 kfreebsd-amd64 kfreebsd-i386 + +gcj5_archs = +gcj6_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 hurd-i386 kfreebsd-amd64 kfreebsd-i386 + +gnat5_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 hurd-i386 kfreebsd-amd64 kfreebsd-i386 +gnat6_archs = + +# CV_XXX is the complete version number, including the release, without epoch +CV_CPP := 6.3.0-$(REL_NO_63) +CV_GCC := 6.3.0-$(REL_NO_63) +CV_GPP := 6.3.0-$(REL_NO_63) +CV_GOBJC := 6.3.0-$(REL_NO_63) +CV_GOBJCXX := 6.3.0-$(REL_NO_63) +CV_GFORT := 6.3.0-$(REL_NO_63) +CV_GGO := 6.3.0-$(REL_NO_63) +CV_GNAT := 6.3.0-$(REL_NO_63) +CV_GCJ := 6.3.0-$(REL_NO_63) +CV_GIJ := 6.3.0-$(REL_NO_63) +CV_LIBGCJBC := 6.3.0-$(REL_NO_63) +CV_GDC := 6.3.0-$(REL_NO_63) +CV_LIBGCJCOMMON := 1:6.3-$(REL_NO_63) +$(foreach a, $(all_archs), \ + $(foreach v, CV_CPP CV_GCC CV_GPP CV_GOBJC CV_GOBJCXX CV_GFORT CV_GGO CV_GNAT CV_GCJ CV_GDC, \ + $(eval $(v)_$(a) = $(call $(v))))) + +ifneq (,$(filter $(DEB_HOST_ARCH), $(gcc5_archs))) + CV_CPP := 5.4-$(REL_NO_54) + CV_GCC := 5.4-$(REL_NO_54) + CV_GPP := 5.4-$(REL_NO_54) + CV_GOBJC := 5.4-$(REL_NO_54) + CV_GOBJCXX := 5.4-$(REL_NO_54) + CV_GFORT := 5.4-$(REL_NO_54) + CV_GGO := 5.4-$(REL_NO_54) + CV_GDC := 5.4-$(REL_NO_54) + $(foreach a, $(gcc5_archs), \ + $(foreach v, CV_CPP CV_GCC CV_GPP CV_GOBJC CV_GOBJCXX CV_GFORT CV_GGO CV_GDC, \ + $(eval $(v)_$(a) = $(call $(v))))) +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj5_archs))) + CV_GCJ := 5.4-$(REL_NO_54) + CV_GIJ := 5.4-$(REL_NO_54) + CV_LIBGCJBC := 5.4-$(REL_NO_54) + $(foreach a, $(gcc5_archs), \ + $(foreach v, CV_GCJ, \ + $(eval $(v)_$(a) = $(call $(v))))) +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(gnat5_archs))) + CV_GNAT := 5.4-$(REL_NO_54) + $(foreach a, $(gnat5_archs), \ + $(foreach v, CV_GNAT, \ + $(eval $(v)_$(a) = $(call $(v))))) +endif + +REQV_CPP = $(REQV_6) +REQV_GCC = $(REQV_6) +REQV_GPP = $(REQV_6) +REQV_GOBJC = $(REQV_6) +REQV_GOBJCXX = $(REQV_6) +REQV_GFORT = $(REQV_6) +REQV_GGO = $(REQV_6) +REQV_GNAT = $(REQV_6) +REQV_GCJ = $(REQV_6) +REQV_GIJ = $(REQV_6) +REQV_GDC = $(REQV_6) +$(foreach a, $(all_archs), \ + $(foreach v, REQV_CPP REQV_GCC REQV_GPP REQV_GOBJC REQV_GOBJCXX REQV_GFORT REQV_GGO REQV_GNAT REQV_GCJ REQV_GDC, \ + $(eval $(v)_$(a) = $(call $(v))))) + +ifneq (,$(filter $(DEB_HOST_ARCH),$(gcc5_archs))) + REQV_CPP = $(REQV_5) + REQV_GCC = $(REQV_5) + REQV_GPP = $(REQV_5) + REQV_GOBJC = $(REQV_5) + REQV_GOBJCXX = $(REQV_5) + REQV_GFORT = $(REQV_5) + REQV_GGO = $(REQV_5) + REQV_GNAT = $(REQV_5) + REQV_GDC = $(REQV_5) + $(foreach a, $(gcc5_archs), \ + $(foreach v, REQV_CPP REQV_GCC REQV_GPP REQV_GOBJC REQV_GOBJCXX REQV_GFORT REQV_GGO REQV_GCJ REQV_GDC, \ + $(eval $(v)_$(a) = $(call $(v))))) +endif + +ifneq (,$(filter $(DEB_HOST_ARCH),$(gcj5_archs))) + REQV_GCJ = $(REQV_5) + REQV_GIJ = $(REQV_5) + $(foreach a, $(gcj5_archs), \ + $(foreach v, REQV_GCJ, \ + $(eval $(v)_$(a) = $(call $(v))))) +endif + +ifneq (,$(filter $(DEB_HOST_ARCH),$(gnat5_archs))) + REQV_GNAT = $(REQV_5) + $(foreach a, $(gnat5_archs), \ + $(foreach v, REQV_GNAT, \ + $(eval $(v)_$(a) = $(call $(v))))) +endif + +EPOCH=4 +OS_NAME := Linux +distribution := $(shell lsb_release -is) +distrelease := $(shell lsb_release -cs) +vendor := $(shell if dpkg-vendor --derives-from Ubuntu; then echo Ubuntu; else echo Debian; fi) + +lib32 = /usr/lib32 + +gcj_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k mips mipsel mips64el \ + powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 \ + kfreebsd-amd64 kfreebsd-i386 hurd-i386 +gcj_native_archs = alpha amd64 armel armhf arm64 hppa i386 ia64 mips mipsel mips64el \ + powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 \ + kfreebsd-amd64 kfreebsd-i386 hurd-i386 + +multilib_archs = $(sort \ + amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel \ + powerpc ppc64 s390 s390x sparc sparc64 x32 \ + $(if $(filter $(vendor), Ubuntu), armel armhf)) + +go_archs = alpha amd64 arm64 armel armhf i386 ia64 m68k \ + mips mips64 mips64el mipsel \ + powerpc powerpcspe ppc64 ppc64el s390 s390x sparc sparc64 x32 + +go_multilib_archs = $(filter $(go_archs), $(filter-out armel armhf, $(multilib_archs))) + +d_multilib_archs = $(filter-out armel, $(multilib_archs)) + +ada_archs = alpha amd64 arm64 armel armhf hppa i386 ia64 m68k \ + mips mips64el mipsel \ + powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64 \ + kfreebsd-amd64 kfreebsd-i386 hurd-i386 + +hppa64_archs = amd64 hppa i386 x32 +phobos_archs = amd64 armel armhf i386 x32 hppa + +HOST_ARCHS_alpha = amd64 i386 x32 +HOST_ARCHS_armhf = amd64 i386 x32 arm64 +HOST_ARCHS_armel = amd64 i386 x32 arm64 +HOST_ARCHS_arm64 = amd64 i386 x32 +HOST_ARCHS_hppa = amd64 i386 x32 +HOST_ARCHS_m68k = amd64 i386 x32 +HOST_ARCHS_mips = amd64 i386 x32 +HOST_ARCHS_mipsel = amd64 i386 x32 +HOST_ARCHS_mips64 = amd64 i386 x32 +HOST_ARCHS_mips64el = amd64 i386 x32 +HOST_ARCHS_powerpc = amd64 i386 x32 ppc64el +HOST_ARCHS_powerpcspe = amd64 i386 x32 +HOST_ARCHS_ppc64 = amd64 i386 x32 +HOST_ARCHS_ppc64el = amd64 i386 x32 ppc64 +HOST_ARCHS_s390x = amd64 i386 x32 +HOST_ARCHS_sh4 = amd64 i386 x32 +HOST_ARCHS_sparc64 = amd64 i386 x32 + +ifeq ($(SOURCE),gcc-defaults) + with_native = yes + CROSS_ARCHS ?= s390x ppc64el arm64 armhf armel \ + $(if $(filter $(vendor), Ubuntu),, mips mipsel mips64el) +else + CROSS_ARCHS ?= alpha hppa m68k mips64 powerpc powerpcspe ppc64 sh4 sparc64 \ + $(if $(filter $(vendor), Ubuntu), mips mipsel mips64el) +endif +with_cross = yes + +ifneq (, $(filter $(DEB_HOST_ARCH),amd64 i386 x32)) + # just use the default from above +else ifeq ($(DEB_HOST_ARCH),arm64) + CROSS_ARCHS = $(if $(findstring ports,$(SOURCE)),, armel armhf) +else ifeq ($(DEB_HOST_ARCH),ppc64) + CROSS_ARCHS = $(if $(findstring ports,$(SOURCE)), ppc64el) +else ifeq ($(DEB_HOST_ARCH),ppc64el) + CROSS_ARCHS = $(if $(findstring ports,$(SOURCE)), powerpc) +else + CROSS_ARCHS = +endif + +CROSS_ARCH = $(subst .,,$(suffix $@)) +_gnu_type = $(shell dpkg-architecture -a$(1) -qDEB_HOST_GNU_TYPE -f) +CROSS_GNU_TYPE = $(call _gnu_type,${CROSS_ARCH}) + +all_packages := +ifeq ($(with_native),yes) + # FIXME: not all packages ... + all_packages := cpp gcc g++ gfortran gcj-jdk gobjc gobjc++ gdc gccgo libgphobos-dev + ifneq (,$(filter $(DEB_HOST_ARCH), $(hppa64_archs))) + all_packages += gcc-hppa64-linux-gnu + endif +endif +no_packages := + +# TODO: +# - setup packages, no_packages macro + +# is this a multiarch-enabled build? +ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick)) + with_multiarch_lib := yes +endif + +LIBGCJ = libgcj17 +LIBGCJ_PC = libgcj17.pc +LIBGCJ_SONAME = 17 + +ifneq (,$(filter $(DEB_HOST_ARCH),$(gcj5_archs))) + LIBGCJ = libgcj16 + LIBGCJ_PC = libgcj16.pc + LIBGCJ_SONAME = 16 +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(multilib_archs))) + with_multilib = yes +endif +ifneq (,$(filter $(DEB_HOST_ARCH), $(go_multilib_archs))) + with_go_multilib = yes +endif + +with_gfdl_docs := no +ifeq ($(distribution),Ubuntu) + with_gfdl_docs := yes +endif + +ifeq ($(with_native),yes) + ifeq (,$(filter $(DEB_HOST_ARCH),$(go_archs))) + no_packages += gccgo + endif + + java_no_archs := arm + ifneq (,$(filter $(DEB_HOST_ARCH),$(java_no_archs))) + no_packages += libgcj-bc gcj-jre-headless gcj-jre gcj-jdk + endif + + gdc_no_archs = s390 + ifneq (,$(filter $(DEB_HOST_ARCH),$(gdc_no_archs))) + no_packages += gdc + endif + + ifeq (,$(filter $(DEB_HOST_ARCH),$(phobos_archs))) + no_packages += libgphobos-dev + endif + + ifeq (,$(filter $(DEB_HOST_ARCH),$(hppa64_archs))) + no_packages += gcc-hppa64-linux-gnu + endif + + ifeq (,$(filter $(DEB_HOST_ARCH),$(ada_archs))) + no_packages += gnat gnat-sjlj + endif + + ifneq ($(with_gfdl_docs),yes) + no_packages := $(sort $(no_packages) cpp-doc gcc-doc gfortran-doc) + endif + +endif + +ifeq ($(DEB_HOST_ARCH),hurd-i386) + OS_NAME := Hurd +endif + +ifneq (,$(filter $(DEB_HOST_ARCH),kfreebsd-i386 kfreebsd-amd64)) + OS_NAME := kFreeBSD +endif + +ifeq ($(DEB_HOST_ARCH),netbsd-i386) + OS_NAME := NetBSD +endif + +# packages which are in the control file, but never built ... +invalid_packages = \ + gccgo-hppa-linux-gnu \ + gccgo-sh4-linux-gnu \ + gccgo-multilib-arm-linux-gnueabi \ + gccgo-multilib-arm-linux-gnueabihf \ + gdc-multilib-arm-linux-gnueabi + +ifeq ($(with_cross),yes) + cross_packages := $(filter-out $(invalid_packages) gcc-hppa64-linux-gnu, \ + $(shell dh_listpackages -a | egrep -- '-gnu|-kfreebsd')) + all_packages := $(all_packages) $(cross_packages) +endif +packages := $(filter-out $(no_packages), $(all_packages)) + +# derived version number (without release, e.g. 4.9.3, 5.2.1) +$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GCJ V_GIJ V_GDC, \ + $(eval $(v) = $(patsubst %-$(lastword $(subst -, ,$(call C$(v)))),%,$(call C$(v)))) \ +) +$(foreach a, $(all_archs), \ + $(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GCJ V_GIJ V_GDC, \ + $(eval $(v)_$(a) = $(patsubst %-$(lastword $(subst -, ,$(call C$(v)_$(a)))),%,$(call C$(v)_$(a)))) \ +)) + +# number for the package name (e.g. 4.9, 5, 6) +$(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GCJ V_GIJ V_GDC, \ + $(eval P$(v) = $(firstword $(subst -, ,$(subst ., ,$(call $(v)))))) \ +) +$(foreach a, $(all_archs), \ + $(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GNAT V_GCJ V_GIJ V_GDC, \ + $(eval P$(v)_$(a) = $(firstword $(subst -, ,$(subst ., ,$(call $(v)_$(a)))))) \ +)) + +ifneq (,$(filter $(DEB_HOST_ARCH), $(gcc49_archs))) + $(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GDC, \ + $(eval P$(v) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)))))) \ + ) + $(foreach a, $(gcc49_archs), \ + $(foreach v, V_CPP V_GCC V_GPP V_GOBJC V_GOBJCXX V_GFORT V_GGO V_GDC, \ + $(eval P$(v)_$(a) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)_$(a)))))) \ + )) +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj49_archs))) + $(foreach v, V_GCJ V_GIJ, \ + $(eval P$(v) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)))))) \ + ) + $(foreach a, $(gcj49_archs), \ + $(foreach v, V_GCJ V_GIJ, \ + $(eval P$(v)_$(a) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)_$(a)))))) \ + )) +endif + +ifneq (,$(filter $(DEB_HOST_ARCH), $(gnat49_archs))) + $(foreach v, V_GNAT, \ + $(eval P$(v) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)))))) \ + ) + $(foreach a, $(gnat49_archs), \ + $(foreach v, V_GNAT, \ + $(eval P$(v)_$(a) = $(subst $(SPACE),.,$(wordlist 1,2,$(subst ., ,$(call $(v)_$(a)))))) \ + )) +endif + +MOD_VER := $(shell apt-cache show gfortran-$(PV_GFORT) \ + | sed -n '/^Provides/s/.*\(gfortran-mod-[0-9]*\).*/\1/p' \ + | head -1) + +README: + m4 -DPACKAGES="$(packages)" \ + -DOS_NAME=$(OS_NAME) \ + -DDEB_ARCH=$(DEB_HOST_ARCH) \ + -DV_CPP=$(V_CPP) -DPV_CPP=$(PV_CPP) \ + -DV_GCC=$(V_GCC) -DPV_GCC=$(PV_GCC) \ + -DV_GPP=$(V_GPP) -DPV_GPP=$(PV_GPP) \ + -DV_GOBJC=$(V_GOBJC) -DPV_GOBJC=$(PV_GOBJC) \ + -DV_GOBJCXX=$(V_GOBJCXX) -DPV_GOBJCXX=$(PV_GOBJCXX) \ + -DV_GFORT=$(V_GFORT) -DPV_GFORT=$(PV_GFORT) \ + -DV_GGO=$(V_GGO) -DPV_GGO=$(PV_GGO) \ + -DV_GNAT=$(V_GNAT) -DPV_GNAT=$(PV_GNAT) \ + -DV_GCJ=$(V_GCJ) -DPV_GCJ=$(PV_GCJ) \ + -DV_GIJ=$(V_GIJ) -DPV_GIJ=$(PV_GIJ) \ + -DV_GDC=$(V_GDC) -DPV_GDC=$(PV_GDC) \ + $(if $(filter yes,$(with_gfdl_docs)), -DGFDL) \ + debian/README.Debian.m4 > debian/README.Debian.tmp2 + uniq debian/README.Debian.tmp2 > debian/README.Debian.tmp + rm -f debian/README.Debian.tmp2 + [ -e debian/README.Debian ] \ + && cmp -s debian/README.Debian debian/README.Debian.tmp \ + && rm -f debian/README.Debian.tmp && exit 0; \ + mv debian/README.Debian.tmp debian/README.Debian + +substvars: substvars-native $(foreach a,$(CROSS_ARCHS),substvars.$(a)) +substvars-native: + ( \ + echo 'version:cpp=$(EPOCH):$(CV_CPP)'; \ + echo 'version:gcc=$(EPOCH):$(CV_GCC)'; \ + echo 'version:gpp=$(EPOCH):$(CV_GPP)'; \ + echo 'version:gobjc=$(EPOCH):$(CV_GOBJC)'; \ + echo 'version:gobjcxx=$(EPOCH):$(CV_GOBJCXX)'; \ + echo 'version:gij=$(EPOCH):$(CV_GIJ)'; \ + echo 'version:gcj=$(EPOCH):$(CV_GCJ)'; \ + echo 'version:gfort=$(EPOCH):$(CV_GFORT)'; \ + echo 'version:ggo=$(EPOCH):$(CV_GGO)'; \ + echo 'version:gnat=$(EPOCH):$(CV_GNAT)'; \ + echo 'version:gdc=$(CV_GDC)'; \ + echo 'version:libgcjcommon=$(CV_LIBGCJCOMMON)'; \ + echo 'pv:cpp=$(PV_CPP)'; \ + echo 'pv:gcc=$(PV_GCC)'; \ + echo 'pv:gpp=$(PV_GPP)'; \ + echo 'pv:gobjc=$(PV_GOBJC)'; \ + echo 'pv:gobjcxx=$(PV_GOBJCXX)'; \ + echo 'pv:gfort=$(PV_GFORT)'; \ + echo 'pv:ggo=$(PV_GGO)'; \ + echo 'pv:gnat=$(PV_GNAT)'; \ + echo 'pv:gcj=$(PV_GCJ)'; \ + echo 'pv:gij=$(PV_GIJ)'; \ + echo 'pv:gdc=$(PV_GDC)'; \ + echo 'reqv:cpp=$(REQV_CPP)'; \ + echo 'reqv:gcc=$(REQV_GCC)'; \ + echo 'reqv:gpp=$(REQV_GPP)'; \ + echo 'reqv:gobjc=$(REQV_GOBJC)'; \ + echo 'reqv:gobjcxx=$(REQV_GOBJCXX)'; \ + echo 'reqv:gfort=$(REQV_GFORT)'; \ + echo 'reqv:ggo=$(REQV_GGO)'; \ + echo 'reqv:gnat=$(REQV_GNAT)'; \ + echo 'reqv:gcj=$(REQV_GCJ)'; \ + echo 'reqv:gij=$(REQV_GIJ)'; \ + echo 'reqv:gdc=$(REQV_GDC)'; \ + echo 'pkg:libgcj=$(LIBGCJ)'; \ + echo 'pkg:libgcjawt=$(LIBGCJ)-awt'; \ + echo 'version:libgcjbc=$(CV_LIBGCJBC)'; \ + ) > debian/substvars.native +ifeq ($(with_multilib),yes) + ( \ + echo 'pkgmulti:gcc=gcc-multilib'; \ + echo 'pkgmulti:gpp=g++-multilib'; \ + echo 'pkgmulti:gobjc=gobjc-multilib'; \ + echo 'pkgmulti:gobjcxx=gobjc++-multilib'; \ + echo 'pkgmulti:gfort=gfortran-multilib'; \ + echo 'pkgmulti:ggo=gccgo-multilib'; \ + echo 'pkgmulti:gdc=gdc-multilib'; \ + ) >> debian/substvars.native +endif + ( \ + echo 'dep:jrehl=gcj-$${pv:gij}-jre-headless $${reqv:gij}'; \ + echo 'dep:jre=gcj-$${pv:gij}-jre $${reqv:gij}'; \ + echo 'dep:jdk=gcj-$${pv:gcj}-jdk $${reqv:gcj}'; \ + echo 'pkg:gjdoc=gjdoc'; \ + echo 'ver:gcjconflict=4:4.4.0-2'; \ + ) >> debian/substvars.native +ifneq (,$(MOD_VER)) + echo 'fortran:mod-version=$(MOD_VER)' >> debian/substvars.native +endif +ifneq (,$(filter $(DEB_HOST_ARCH),$(phobos_archs))) + echo 'dep:libgphobos=libgphobos-dev (= $${version:gdc})' >> debian/substvars.native +endif + +substvars.%: + ( \ + echo 'version:cpp=$(EPOCH):$(CV_CPP_$(CROSS_ARCH))'; \ + echo 'version:gcc=$(EPOCH):$(CV_GCC_$(CROSS_ARCH))'; \ + echo 'version:gpp=$(EPOCH):$(CV_GPP_$(CROSS_ARCH))'; \ + echo 'version:gobjc=$(EPOCH):$(CV_GOBJC_$(CROSS_ARCH))'; \ + echo 'version:gobjcxx=$(EPOCH):$(CV_GOBJCXX_$(CROSS_ARCH))'; \ + echo 'version:gcj=$(EPOCH):$(CV_GCJ_$(CROSS_ARCH))'; \ + echo 'version:gfort=$(EPOCH):$(CV_GFORT_$(CROSS_ARCH))'; \ + echo 'version:ggo=$(EPOCH):$(CV_GGO_$(CROSS_ARCH))'; \ + echo 'version:gdc=$(CV_GDC_$(CROSS_ARCH))'; \ + echo 'pv:cpp=$(PV_CPP_$(CROSS_ARCH))'; \ + echo 'pv:gcc=$(PV_GCC_$(CROSS_ARCH))'; \ + echo 'pv:gpp=$(PV_GPP_$(CROSS_ARCH))'; \ + echo 'pv:gobjc=$(PV_GOBJC_$(CROSS_ARCH))'; \ + echo 'pv:gobjcxx=$(PV_GOBJCXX_$(CROSS_ARCH))'; \ + echo 'pv:gfort=$(PV_GFORT_$(CROSS_ARCH))'; \ + echo 'pv:ggo=$(PV_GGO_$(CROSS_ARCH))'; \ + echo 'pv:gcj=$(PV_GCJ_$(CROSS_ARCH))'; \ + echo 'pv:gdc=$(PV_GDC_$(CROSS_ARCH))'; \ + echo 'reqv:cpp=$(REQV_CPP_$(CROSS_ARCH))'; \ + echo 'reqv:gcc=$(REQV_GCC_$(CROSS_ARCH))'; \ + echo 'reqv:gpp=$(REQV_GPP_$(CROSS_ARCH))'; \ + echo 'reqv:gobjc=$(REQV_GOBJC_$(CROSS_ARCH))'; \ + echo 'reqv:gobjcxx=$(REQV_GOBJCXX_$(CROSS_ARCH))'; \ + echo 'reqv:gfort=$(REQV_GFORT_$(CROSS_ARCH))'; \ + echo 'reqv:ggo=$(REQV_GGO_$(CROSS_ARCH))'; \ + echo 'reqv:gcj=$(REQV_GCJ_$(CROSS_ARCH))'; \ + echo 'reqv:gdc=$(REQV_GDC_$(CROSS_ARCH))'; \ + ) > debian/substvars.$* + $(if $(filter $(CROSS_ARCH),$(multilib_archs)), \ + ( \ + echo 'pkgmulti:gcc=gcc-multilib'; \ + echo 'pkgmulti:gpp=g++-multilib'; \ + echo 'pkgmulti:gobjc=gobjc-multilib'; \ + echo 'pkgmulti:gobjcxx=gobjc++-multilib'; \ + echo 'pkgmulti:gfort=gfortran-multilib'; \ + echo 'pkgmulti:ggo=gccgo-multilib'; \ + echo 'pkgmulti:gdc=gdc-multilib'; \ + ) >> debian/substvars.$*; \ + ) + ( \ + echo 'dep:gcj=gcj-$${pv:gcj} $${reqv:gcj}'; \ + ) >> debian/substvars.$* +ifneq (,$(MOD_VER)) + echo 'fortran:mod-version=$(MOD_VER)' >> debian/substvars.$* +endif + $(if $(filter $(CROSS_ARCH),$(phobos_archs)), \ + echo 'dep:libgphobos=libgphobos-dev (= $${version:gdc})' >> debian/substvars.$* \ + ) + +control: +ifeq ($(with_native),yes) + sed \ + -e "s/@SOURCE@/$(SOURCE)/g" \ + debian/control.source > debian/control + sed \ + -e "s/@multilib_archs@/$(multilib_archs)/g" \ + -e "s/@go_multilib_archs@/$(go_multilib_archs)/g" \ + -e "s/@d_multilib_archs@/$(d_multilib_archs)/g" \ + debian/control.native.in >> debian/control +else + sed \ + -e "s/@SOURCE@/$(SOURCE)/g" debian/control.source \ + | grep -v '^Build-Depends-Indep:' \ + > debian/control +endif +ifeq ($(SOURCE),gcc-defaults) + sed \ + -e "s/@hppa64_archs@/$(hppa64_archs)/g" \ + debian/control.hppa64.in >> debian/control +endif +ifeq ($(with_cross),yes) + : # FIXME: filter-out some gdc and gccgo multilib configs + $(foreach a,$(CROSS_ARCHS), \ + sed \ + -e "s/CROSS_ARCH/$(a)/g" \ + -e 's/CROSS_GNU_TYPE/$(call _gnu_type,$(a))/g' \ + -e 's/@host_archs@/$(HOST_ARCHS_$(a))/g' \ + debian/control.cross.in \ + $(if $(filter $(a),$(multilib_archs)), debian/control.cross-ml.in) \ + $(if $(filter $(vendor),Ubuntu), debian/control.pkg-config.in) \ + | awk '/^Package: gccgo-(hppa|sh)/ {skip=1} skip == 0 {print } /^$$/ && skip == 1 {skip=0}' \ + >> debian/control; \ + ) +endif +ifeq ($(SOURCE)-$(with_gfdl_docs),gcc-defaults-yes) + cat debian/control.doc >> debian/control +endif + +build-arch: build +build-indep: cacerts-stamp build-stamp +build: README build-stamp +build-stamp: + dh_testdir + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f *-stamp + rm -rf build + rm -f debian/control.tmp* + rm -f debian/substvars.* + rm -f debian/lib*gcj-bc.shlibs + rm -f debian/gcc.postinst debian/g++.postinst debian/gfortran.postinst + rm -f debian/generate-cacerts.pl + rm -f debian/dh_nativejava.1 + dh_clean + +pre-install: build substvars + dh_testdir + dh_testroot + dh_prep + +install: pre-install install-native $(foreach a,$(CROSS_ARCHS),install.$(a)) + +install-native: pre-install +ifeq ($(with_native),yes) + for p in $(filter-out $(cross_packages), $(shell dh_listpackages)); do \ + cp -l debian/substvars.native debian/$$p.substvars; \ + done + + : # cpp + dh_installdirs -pcpp \ + lib usr/bin \ + usr/share/man/man1 usr/share/man/man7 usr/share/doc/cpp + dh_link -pcpp \ + /usr/bin/cpp-$(PV_CPP) /usr/bin/cpp \ + /usr/bin/cpp-$(PV_CPP) /usr/bin/$(DEB_HOST_GNU_TYPE)-cpp + + ifeq ($(with_gfdl_docs),yes) + for i in gfdl.7 gpl.7 fsf-funding.7; do \ + cp -p $$i debian/cpp/usr/share/man/man7/$${i}gcc; \ + done + dh_link -pcpp \ + /usr/share/man/man1/cpp-$(PV_CPP).1.gz /usr/share/man/man1/cpp.1.gz \ + /usr/share/man/man1/cpp-$(PV_CPP).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-cpp.1.gz + + : # cpp-doc + dh_installdirs -pcpp-doc \ + usr/share/doc usr/share/info + dh_link -pcpp-doc \ + /usr/share/doc/gcc-$(PV_CPP)-base/cpp.html /usr/share/doc/cpp-doc/cpp.html \ + /usr/share/doc/gcc-$(PV_CPP)-base/cppinternals.html /usr/share/doc/cpp-doc/cppinternals.html \ + /usr/share/info/cpp-$(PV_CPP).info.gz /usr/share/info/cpp.info.gz \ + /usr/share/info/cppinternals-$(PV_CPP).info.gz /usr/share/info/cppinternals.info.gz + endif + + : # gcc + dh_installdirs -pgcc usr/bin usr/share/man/man1 usr/share/doc + dh_link -pgcc \ + /usr/share/doc/cpp /usr/share/doc/gcc \ + /usr/bin/gcc-$(PV_GCC) /usr/bin/gcc \ + /usr/bin/gcc-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc \ + /usr/bin/gcov-$(PV_GCC) /usr/bin/gcov \ + /usr/bin/gcov-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcov \ + /usr/share/doc/gcc-$(PV_GCC)/README.Bugs /usr/share/doc/cpp/README.Bugs \ + $(if $(filter $(DEB_HOST_ARCH), $(gcc49_archs)),, \ + /usr/bin/gcov-dump-$(PV_GCC) /usr/bin/gcov-dump \ + /usr/bin/gcov-dump-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcov-dump \ + /usr/bin/gcov-tool-$(PV_GCC) /usr/bin/gcov-tool \ + /usr/bin/gcov-tool-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcov-tool \ + ) + dh_link -pgcc \ + /usr/bin/gcc-ar-$(PV_GCC) /usr/bin/gcc-ar \ + /usr/bin/gcc-nm-$(PV_GCC) /usr/bin/gcc-nm \ + /usr/bin/gcc-ranlib-$(PV_GCC) /usr/bin/gcc-ranlib \ + /usr/bin/gcc-ar-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc-ar \ + /usr/bin/gcc-nm-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc-nm \ + /usr/bin/gcc-ranlib-$(PV_GCC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc-ranlib \ + /usr/share/man/man1/gcc-ar-$(PV_GCC).1.gz /usr/share/man/man1/gcc-ar.1.gz \ + /usr/share/man/man1/gcc-ar-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc-ar.1.gz \ + /usr/share/man/man1/gcc-nm-$(PV_GCC).1.gz /usr/share/man/man1/gcc-nm.1.gz \ + /usr/share/man/man1/gcc-nm-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc-nm.1.gz \ + /usr/share/man/man1/gcc-ranlib-$(PV_GCC).1.gz /usr/share/man/man1/gcc-ranlib.1.gz \ + /usr/share/man/man1/gcc-ranlib-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc-ranlib.1.gz + install -m 755 -p c89 debian/gcc/usr/bin/c89-gcc + install -m 644 -p c89.1 debian/gcc/usr/share/man/man1/c89-gcc.1 + install -m 755 -p c99 debian/gcc/usr/bin/c99-gcc + install -m 644 -p c99.1 debian/gcc/usr/share/man/man1/c99-gcc.1 + sed 's/@VER@/$(PV_GCC)/g' c99.1 > debian/gcc/usr/share/man/man1/c99-gcc.1 + + sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \ + debian/gcc.postinst.in > debian/gcc.postinst + + ifeq ($(with_gfdl_docs),yes) + dh_link -pgcc \ + /usr/share/man/man1/gcc-$(PV_GCC).1.gz /usr/share/man/man1/gcc.1.gz \ + /usr/share/man/man1/gcc-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcc.1.gz \ + /usr/share/man/man1/gcov-$(PV_GCC).1.gz /usr/share/man/man1/gcov.1.gz \ + /usr/share/man/man1/gcov-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcov.1.gz \ + $(if $(filter $(DEB_HOST_ARCH), $(gcc49_archs)),, \ + /usr/share/man/man1/gcov-tool-$(PV_GCC).1.gz /usr/share/man/man1/gcov-tool.1.gz \ + /usr/share/man/man1/gcov-tool-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcov-tool.1.gz \ + /usr/share/man/man1/gcov-dump-$(PV_GCC).1.gz /usr/share/man/man1/gcov-dump.1.gz \ + /usr/share/man/man1/gcov-dump-$(PV_GCC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcov-dump.1.gz \ + ) + : # gcc-doc + dh_installdirs -pgcc-doc \ + usr/share/doc usr/share/info + dh_link -pgcc-doc \ + /usr/share/doc/gcc-$(PV_GCC)-base/gcc.html /usr/share/doc/gcc-doc/gcc.html \ + /usr/share/doc/gcc-$(PV_GCC)-base/gccint.html /usr/share/doc/gcc-doc/gccint.html \ + /usr/share/doc/gcc-$(PV_GCC)-base/libgomp.html /usr/share/doc/gcc-doc/libgomp.html \ + /usr/share/info/gcc-$(PV_GCC).info.gz /usr/share/info/gcc.info.gz \ + /usr/share/info/gccint-$(PV_GCC).info.gz /usr/share/info/gccint.info.gz \ + /usr/share/info/libgomp-$(PV_GCC).info.gz /usr/share/info/libgomp.info.gz + endif + +ifeq ($(with_multiarch_lib),yes) + ifeq ($(with_multilib),yes) + : # gcc-multilib + # multilib needs to provide a compat symlink pointing to the asm + # header directory of the primary architecture, since we may not + # have separate asm headers installed for our non-default targets. + dh_link -pgcc-multilib \ + /usr/include/$(DEB_HOST_MULTIARCH)/asm /usr/include/asm + endif +endif + +ifneq (,$(filter gdc, $(packages))) + : # gdc + dh_installdirs -pgdc + dh_installdocs -pgdc debian/README.Debian + + dh_link -pgdc \ + /usr/bin/gdc-$(PV_GDC) /usr/bin/gdc \ + /usr/bin/gdc-$(PV_GDC) /usr/bin/$(DEB_HOST_GNU_TYPE)-gdc + dh_link -pgdc \ + /usr/share/man/man1/gdc-$(PV_GDC).1.gz /usr/share/man/man1/gdc.1.gz \ + /usr/share/man/man1/gdc-$(PV_GDC).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gdc.1.gz + + ifneq (,$(filter libgphobos-dev, $(packages))) + : # gdc + dh_installdirs -plibgphobos-dev + dh_installdocs -plibgphobos-dev + endif +endif + +ifneq (,$(filter gobjc, $(packages))) + : # gobjc + dh_installdirs -pgobjc + dh_link -pgobjc \ + /usr/share/doc/cpp /usr/share/doc/gobjc +endif + +ifneq (,$(filter gobjc++, $(packages))) + : # gobjc++ + dh_installdirs -pgobjc++ + dh_link -pgobjc++ \ + /usr/share/doc/cpp /usr/share/doc/gobjc++ +endif + +ifneq (,$(filter g++, $(packages))) + : # g++ + dh_installdirs -pg++ + dh_link -pg++ \ + /usr/share/doc/cpp /usr/share/doc/g++ \ + /usr/bin/g++-$(PV_GPP) /usr/bin/g++ \ + /usr/bin/g++-$(PV_GPP) /usr/bin/$(DEB_HOST_GNU_TYPE)-g++ \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/g++-$(PV_GPP).1.gz /usr/share/man/man1/g++.1.gz \ + /usr/share/man/man1/g++-$(PV_GPP).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-g++.1.gz \ + ) + sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \ + debian/g++.postinst.in > debian/g++.postinst +endif + +ifneq (,$(filter gfortran, $(packages))) + : # gfortran + dh_installdirs -pgfortran usr/bin /usr/share/man/man1 usr/share/doc + dh_link -pgfortran \ + /usr/share/doc/cpp /usr/share/doc/gfortran \ + /usr/bin/gfortran-$(PV_GFORT) /usr/bin/gfortran \ + /usr/bin/gfortran-$(PV_GFORT) /usr/bin/$(DEB_HOST_GNU_TYPE)-gfortran \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/gfortran-$(PV_GFORT).1.gz /usr/share/man/man1/gfortran.1.gz \ + /usr/share/man/man1/gfortran-$(PV_GFORT).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gfortran.1.gz \ + ) + + ifeq ($(with_gfdl_docs),yes) + : # gfortran-doc + dh_installdirs -pgfortran-doc \ + usr/share/doc usr/share/info + dh_link -pgfortran-doc \ + /usr/share/doc/gcc-$(PV_GFORT)-base/fortran/gfortran.html \ + /usr/share/doc/gfortran-doc/fortran/gfortran.html \ + /usr/share/info/gfortran-$(PV_GFORT).info.gz /usr/share/info/gfortran.info.gz + endif + sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \ + debian/gfortran.postinst.in > debian/gfortran.postinst +endif + +ifneq (,$(filter gccgo, $(packages))) + : # Go + dh_installdirs -pgccgo usr/share/doc + dh_link -pgccgo \ + /usr/share/doc/cpp /usr/share/doc/gccgo \ + /usr/bin/gccgo-$(PV_GGO) /usr/bin/gccgo \ + /usr/bin/gccgo-$(PV_GGO) /usr/bin/$(DEB_HOST_GNU_TYPE)-gccgo \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/gccgo-$(PV_GGO).1.gz /usr/share/man/man1/gccgo.1.gz \ + /usr/share/man/man1/gccgo-$(PV_GGO).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gccgo.1.gz \ + ) + + ifeq ($(with_gfdl_docs),yes) + : # gccgo-doc + dh_installdirs -pgccgo-doc \ + usr/share/doc usr/share/info + dh_link -pgccgo-doc \ + /usr/share/doc/gcc-$(PV_GGO)-base/gccgo.html /usr/share/doc/gccgo-doc/gccgo.html \ + /usr/share/info/gccgo-$(PV_GGO).info.gz /usr/share/info/gccgo.info.gz + endif +endif + +ifneq (,$(filter gcj-jdk, $(packages))) + : # gcj-jre-headless + dh_installdirs -pgcj-jre-headless usr/bin /usr/share/man/man1 usr/share/doc + dh_link -pgcj-jre-headless \ + /usr/share/doc/libgcj-common /usr/share/doc/gcj-jre-headless \ + /usr/bin/gij-$(PV_GIJ) /usr/bin/gij \ + /usr/bin/gcj-dbtool-$(PV_GIJ) /usr/bin/gcj-dbtool \ + /usr/bin/gkeytool-$(PV_GIJ) /usr/bin/gkeytool \ + /usr/bin/gorbd-$(PV_GIJ) /usr/bin/gorbd \ + /usr/bin/grmid-$(PV_GIJ) /usr/bin/grmid \ + /usr/bin/grmiregistry-$(PV_GIJ) /usr/bin/grmiregistry \ + + : # gcj-jdk + dh_installdirs -pgcj-jdk usr/bin /usr/share/man/man1 usr/share/doc + dh_link -pgcj-jdk \ + /usr/share/doc/cpp /usr/share/doc/gcj-jdk \ + /usr/bin/gjavah-$(PV_GCJ) /usr/bin/gjavah \ + /usr/bin/gcj-$(PV_GCJ) /usr/bin/gcj \ + /usr/bin/gcj-$(PV_GCJ) /usr/bin/$(DEB_HOST_GNU_TYPE)-gcj \ + /usr/bin/gcjh-$(PV_GCJ) /usr/bin/gcjh \ + /usr/bin/gjar-$(PV_GCJ) /usr/bin/gjar \ + /usr/bin/gjarsigner-$(PV_GCJ) /usr/bin/gjarsigner \ + /usr/bin/grmic-$(PV_GCJ) /usr/bin/grmic \ + /usr/bin/jv-convert-$(PV_GCJ) /usr/bin/jv-convert \ + /usr/bin/jcf-dump-$(PV_GCJ) /usr/bin/jcf-dump \ + /usr/bin/gcj-wrapper-$(PV_GCJ) /usr/bin/gcj-wrapper \ + /usr/bin/gtnameserv-$(PV_GCJ) /usr/bin/gtnameserv \ + /usr/bin/gappletviewer-$(PV_GCJ) /usr/bin/gappletviewer \ + /usr/bin/gserialver-$(PV_GIJ) /usr/bin/gserialver \ + /usr/share/java/libgcj-$(PV_GCJ).jar /usr/share/java/libgcj.jar +ifeq ($(with_multiarch_lib),yes) + dh_link -pgcj-jdk \ + /usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/$(LIBGCJ_PC) \ + /usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/libgcj.pc +else + dh_link -pgcj-jdk \ + /usr/lib/pkgconfig/$(LIBGCJ_PC) /usr/lib/pkgconfig/libgcj.pc +endif + + dh_link -pgcj-jre-headless \ + /usr/share/man/man1/gkeytool-$(PV_GIJ).1.gz /usr/share/man/man1/gkeytool.1.gz \ + /usr/share/man/man1/gorbd-$(PV_GIJ).1.gz /usr/share/man/man1/gorbd.1.gz \ + /usr/share/man/man1/grmid-$(PV_GIJ).1.gz /usr/share/man/man1/grmid.1.gz \ + /usr/share/man/man1/grmiregistry-$(PV_GIJ).1.gz /usr/share/man/man1/grmiregistry.1.gz + + dh_link -pgcj-jdk \ + /usr/share/man/man1/gjar-$(PV_GCJ).1.gz /usr/share/man/man1/gjar.1.gz \ + /usr/share/man/man1/gjarsigner-$(PV_GCJ).1.gz /usr/share/man/man1/gjarsigner.1.gz \ + /usr/share/man/man1/gjavah-$(PV_GCJ).1.gz /usr/share/man/man1/gjavah.1.gz \ + /usr/share/man/man1/gnative2ascii-$(PV_GIJ).1.gz /usr/share/man/man1/gnative2ascii.1.gz \ + /usr/share/man/man1/gtnameserv-$(PV_GCJ).1.gz /usr/share/man/man1/gtnameserv.1.gz \ + /usr/share/man/man1/gappletviewer-$(PV_GCJ).1.gz /usr/share/man/man1/gappletviewer.1.gz \ + /usr/share/man/man1/gserialver-$(PV_GIJ).1.gz /usr/share/man/man1/gserialver.1.gz + + ifeq ($(with_gfdl_docs),yes) + dh_link -pgcj-jre-headless \ + /usr/share/man/man1/gij-$(PV_GIJ).1.gz /usr/share/man/man1/gij.1.gz \ + /usr/share/man/man1/gcj-dbtool-$(PV_GIJ).1.gz /usr/share/man/man1/gcj-dbtool.1.gz + dh_link -pgcj-jdk \ + /usr/share/man/man1/gcj-$(PV_GCJ).1.gz /usr/share/man/man1/gcj.1.gz \ + /usr/share/man/man1/gcj-$(PV_GCJ).1.gz /usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-gcj.1.gz \ + /usr/share/man/man1/gcjh-$(PV_GCJ).1.gz /usr/share/man/man1/gcjh.1.gz \ + /usr/share/man/man1/grmic-$(PV_GCJ).1.gz /usr/share/man/man1/grmic.1.gz \ + /usr/share/man/man1/jv-convert-$(PV_GCJ).1.gz /usr/share/man/man1/jv-convert.1.gz \ + /usr/share/man/man1/jcf-dump-$(PV_GCJ).1.gz /usr/share/man/man1/jcf-dump.1.gz \ + /usr/share/man/man1/gcj-wrapper-$(PV_GCJ).1.gz /usr/share/man/man1/gcj-wrapper.1.gz \ + /usr/share/info/gcj-$(PV_GCJ).info.gz /usr/share/info/gcj.info.gz + endif + + dh_link -pgcj-jdk \ + /usr/bin/gjdoc-$(PV_GCJ) /usr/bin/gjdoc \ + /usr/share/man/man1/gjdoc-$(PV_GCJ).1.gz /usr/share/man/man1/gjdoc.1.gz + cp -p debian/dh_javadoc debian/gcj-jdk/usr/bin/ + pod2man -c Debhelper -r $(PV_GCJ) \ + debian/dh_javadoc debian/gcj-jdk/usr/share/man/man1/dh_javadoc.1 + + : # libgcj-bc + ifeq ($(with_multiarch_lib),yes) + dh_installdirs -plibgcj-bc \ + usr/lib/$(DEB_HOST_MULTIARCH) usr/share/doc usr/share/lintian/overrides + ln -s libgcj.so.$(LIBGCJ_SONAME) \ + debian/libgcj-bc/usr/lib/$(DEB_HOST_MULTIARCH)/libgcj_bc.so.1 + else + dh_installdirs -plibgcj-bc \ + usr/lib usr/share/doc usr/share/lintian/overrides + ln -s libgcj.so.$(LIBGCJ_SONAME) \ + debian/libgcj-bc/usr/lib/libgcj_bc.so.1 + endif + dh_link -plibgcj-bc \ + /usr/share/doc/libgcj-common /usr/share/doc/libgcj-bc + + mkdir -p debian/libgcj-bc/usr/share/lintian/overrides + cp -p debian/libgcj-bc.overrides \ + debian/libgcj-bc/usr/share/lintian/overrides/libgcj-bc + + echo "libgcj_bc 1 libgcj-bc $(REQV_LIBGCJ_BC)" \ + > debian/libgcj-bc.shlibs + + : # gcj-jre-headless + dh_installdirs -pgcj-jre-headless \ + usr/share/doc usr/lib/jvm + ln -sf java-1.5.0-gcj-$(PV_GCJ)-$(DEB_HOST_ARCH) \ + debian/gcj-jre-headless/usr/lib/jvm/java-1.5.0-gcj + ln -sf java-gcj-$(PV_GCJ) \ + debian/gcj-jre-headless/usr/lib/jvm/java-gcj +endif + + : # libgcj-common + dh_installdirs -plibgcj-common \ + /usr/bin \ + /usr/sbin \ + /etc/java/security/security.d \ + /usr/lib/security \ + /var/lib/security \ + /usr/share/gcj + install -m644 classpath.security debian/libgcj-common/etc/java/security/ + dh_link -plibgcj-common \ + /var/lib/security/classpath.security /usr/lib/security/classpath.security + install -m755 debian/rebuild-gcj-db \ + debian/libgcj-common/usr/bin/ + install -m755 debian/rebuild-security-providers \ + debian/libgcj-common/usr/sbin/ + ( \ + echo "# architectures with gcj support"; \ + echo "gcj_archs = $(gcj_archs)"; \ + echo "# architectures which should provide gcj native support"; \ + echo "gcj_native_archs = $(gcj_native_archs)" \ + ) > debian/libgcj-common/usr/share/gcj/debian_defaults + + : # GNU security provider + for i in \ + 1000-gnu.java.security.provider.Gnu \ + 1001-gnu.javax.crypto.jce.GnuCrypto \ + 1002-gnu.javax.crypto.jce.GnuSasl \ + 1003-gnu.javax.net.ssl.provider.Jessie \ + 1004-gnu.javax.security.auth.callback.GnuCallbacks; \ + do \ + touch debian/libgcj-common/etc/java/security/security.d/$$i; \ + done + + : # aotcompile & dh_nativejava + + mkdir -p debian/libgcj-common/usr/bin + install -m755 debian/aot-compile debian/libgcj-common/usr/bin/ + mkdir -p debian/libgcj-common/usr/lib/gcc + install -m644 debian/*.py debian/libgcj-common/usr/lib/gcc + + install -m755 debian/dh_nativejava debian/libgcj-common/usr/bin/ + mkdir -p debian/libgcj-common/usr/share/debhelper/autoscripts + install -m 644 debian/p*-rebuild-gcj-db \ + debian/libgcj-common/usr/share/debhelper/autoscripts/ + pod2man -c Debhelper debian/dh_nativejava debian/dh_nativejava.1 + mkdir -p debian/libgcj-common/usr/share/man/man1 + install -m644 debian/dh_nativejava.1 debian/libgcj-common/usr/share/man/man1/ + +ifneq (,$(filter gcc-hppa64-linux-gnu, $(packages))) + : # gcc-hppa64-linux-gnu + dh_installdirs -pgcc-hppa64-linux-gnu + dh_link -pgcc-hppa64-linux-gnu \ + /usr/bin/hppa64-linux-gnu-gcc-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc \ + /usr/bin/hppa64-linux-gnu-gcc-ar-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc-ar \ + /usr/bin/hppa64-linux-gnu-gcc-nm-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc-nm \ + /usr/bin/hppa64-linux-gnu-gcc-ranlib-$(PV_GCC) /usr/bin/hppa64-linux-gnu-gcc-ranlib \ + /usr/share/man/man1/hppa64-linux-gnu-gcc-ar-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc-ar.1.gz \ + /usr/share/man/man1/hppa64-linux-gnu-gcc-nm-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc-nm.1.gz \ + /usr/share/man/man1/hppa64-linux-gnu-gcc-ranlib-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc-ranlib.1.gz \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/hppa64-linux-gnu-gcc-$(PV_GCC).1.gz /usr/share/man/man1/hppa64-linux-gnu-gcc.1.gz \ + ) +endif + + ifeq ($(i586_symlinks),yes) + cd debian; \ + for x in $$(find $(filter-out $(cross_packages), $(all_packages)) -type l -name 'i686-*'); do \ + link=$$(echo $$x | sed 's/i686-/i586-/'); \ + tgt=$$(basename $$x); \ + echo "Adding symlink: $$link -> $$tgt"; \ + rm -f $$link; cp -a $$x $$link; \ + done + endif +endif # with_native + +install.%: pre-install + for p in $(filter %-$(CROSS_GNU_TYPE), $(all_packages)); do \ + cp -l debian/substvars.$(CROSS_ARCH) debian/$$p.substvars; \ + done + + : # cpp-$(CROSS_GNU_TYPE) + dh_installdirs -pcpp-$(CROSS_GNU_TYPE) + dh_link -pcpp-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-cpp-$(PV_CPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-cpp + + $(if $(filter yes, $(with_gfdl_docs)), \ + dh_link -pcpp-$(CROSS_GNU_TYPE) \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-cpp-$(PV_CPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-cpp.1.gz \ + ) + + : # gcc-$(CROSS_GNU_TYPE) + dh_installdirs -pgcc-$(CROSS_GNU_TYPE) + dh_link -pgcc-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gcc-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-gcc-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc \ + /usr/bin/$(CROSS_GNU_TYPE)-gcov-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcov \ + /usr/share/doc/gcc-$(PV_GCC_$(CROSS_ARCH))-base/README.Bugs /usr/share/doc/cpp-$(CROSS_GNU_TYPE)/README.Bugs \ + $(if $(filter $(CROSS_ARCH), $(gcc49_archs)),, \ + /usr/bin/$(CROSS_GNU_TYPE)-gcov-dump-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcov-dump \ + /usr/bin/$(CROSS_GNU_TYPE)-gcov-tool-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcov-tool \ + ) + dh_link -pgcc-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-gcc-ar-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc-ar \ + /usr/bin/$(CROSS_GNU_TYPE)-gcc-nm-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc-nm \ + /usr/bin/$(CROSS_GNU_TYPE)-gcc-ranlib-$(PV_GCC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcc-ranlib \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ar-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ar.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-nm-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-nm.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ranlib-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-ranlib.1.gz + : # install -m 755 -p c89 debian/gcc/usr/bin/c89-gcc + : # install -m 644 -p c89.1 debian/gcc/usr/share/man/man1/c89-gcc.1 + : # install -m 755 -p c99 debian/gcc/usr/bin/c99-gcc + : # install -m 644 -p c99.1 debian/gcc/usr/share/man/man1/c99-gcc.1 + : # sed 's/@VER@/$(PV_GCC)/g' c99.1 > debian/gcc/usr/share/man/man1/c99-gcc.1 + + : # sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \ + : # debian/gcc.postinst.in > debian/gcc.postinst + + $(if $(filter yes, $(with_gfdl_docs)), \ + dh_link -pgcc-$(CROSS_GNU_TYPE) \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcc.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-$(PV_GCC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov.1.gz \ + $(if $(filter $(CROSS_ARCH), $(gcc49_archs)),, \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-tool-$(PV_GCC_$(CROSS_ARCH)).1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-tool.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-dump-$(PV_GCC_$(CROSS_ARCH)).1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcov-dump.1.gz) \ + ) + + : # gdc-$(CROSS_GNU_TYPE) + $(if $(filter gdc-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pgdc-$(CROSS_GNU_TYPE); \ + dh_installdocs -pgdc-$(CROSS_GNU_TYPE) \ + debian/README.Debian; \ + dh_link -pgdc-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-gdc-$(PV_GDC_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gdc \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gdc-$(PV_GDC_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gdc.1.gz; \ + ) + + : # gobjc-$(CROSS_GNU_TYPE) + $(if $(filter gobjc-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pgobjc-$(CROSS_GNU_TYPE); \ + dh_link -pgobjc-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gobjc-$(CROSS_GNU_TYPE); \ + ) + + : # gobjc++-$(CROSS_GNU_TYPE) + $(if $(filter gobjc++-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pgobjc++-$(CROSS_GNU_TYPE); \ + dh_link -pgobjc++-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gobjc++-$(CROSS_GNU_TYPE); \ + ) + + : # g++-$(CROSS_GNU_TYPE) + $(if $(filter g++-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pg++-$(CROSS_GNU_TYPE); \ + dh_link -pg++-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/g++-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-g++-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-g++ \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-g++-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-g++.1.gz \ + ); \ + : # sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \ + : # debian/g++.postinst.in > debian/g++.postinst; \ + ) + + : # gfortran-$(CROSS_GNU_TYPE) + $(if $(filter gfortran-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pgfortran-$(CROSS_GNU_TYPE); \ + dh_link -pgfortran-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gfortran-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-gfortran-$(PV_GFORT_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gfortran \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gfortran-$(PV_GFORT_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gfortran.1.gz \ + ); \ + : # sed -e 's/@GFDL@/$(if $(filter-out yes,$(with_gfdl_docs)),\#)/g' \ + : # debian/gfortran.postinst.in > debian/gfortran.postinst; \ + ) + + : # gccgo-$(CROSS_GNU_TYPE) + $(if $(filter gccgo-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pgccgo-$(CROSS_GNU_TYPE); \ + dh_link -pgccgo-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gccgo-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-gccgo-$(PV_GGO_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gccgo \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gccgo-$(PV_GGO_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gccgo.1.gz \ + ); \ + ) + + : # gcj-$(CROSS_GNU_TYPE) + $(if $(filter gcj-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pgcj-$(CROSS_GNU_TYPE); \ + dh_link -pgcj-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gcj-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-gcj-$(PV_GCJ_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gcj \ + $(if $(filter yes, $(with_gfdl_docs)), \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcj-$(PV_GCJ_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gcj.1.gz \ + ); \ + ) + + : # gnat-$(CROSS_GNU_TYPE) + $(if $(filter gnat-$(CROSS_GNU_TYPE), $(packages)), \ + dh_installdirs -pgnat-$(CROSS_GNU_TYPE); \ + dh_link -pgnat-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gnat-$(CROSS_GNU_TYPE) \ + /usr/bin/$(CROSS_GNU_TYPE)-gnat-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnat \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatbind-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatbind \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatchop-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatchop \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatclean-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatclean \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatfind-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatfind \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatkr-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatkr \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatlink-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatlink \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatls-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatls \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatmake-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatmake \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatprep-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatprep \ + /usr/bin/$(CROSS_GNU_TYPE)-gnatxref-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnatxref \ + /usr/bin/$(CROSS_GNU_TYPE)-gnathtml-$(PV_GPP_$(CROSS_ARCH)) /usr/bin/$(CROSS_GNU_TYPE)-gnathtml \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnat-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnat.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatbind-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatbind.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatchop-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatchop.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatclean-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatclean.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatfind-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatfind.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatkr-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatkr.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatlink-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatlink.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatls-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatls.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatmake-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatmake.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatprep-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatprep.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatxref-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnatxref.1.gz \ + /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnathtml-$(PV_GPP_$(CROSS_ARCH)).1.gz /usr/share/man/man1/$(CROSS_GNU_TYPE)-gnathtml.1.gz; \ + dh_installdirs -pgnat-sjlj-$(CROSS_GNU_TYPE); \ + dh_link -pgnat-sjlj-$(CROSS_GNU_TYPE) \ + /usr/share/doc/cpp-$(CROSS_GNU_TYPE) /usr/share/doc/gnat-sjlj-$(CROSS_GNU_TYPE); \ + ) + +cacerts-stamp: +ifeq ($(with_native),yes) + dh_testdir + rm -rf build + mkdir -p build + sed 's/@gcc_suffix@//' debian/generate-cacerts.pl.in \ + > debian/generate-cacerts.pl + cd build && perl ../debian/generate-cacerts.pl \ + /etc/ssl/certs/ca-certificates.crt +endif + touch $@ + +nopkgs_native := $(foreach p, $(sort $(invalid_packages) $(no_packages) $(cross_packages)),-N$(p)) + +binary-indep: build-indep install +ifeq ($(with_native),yes) + dh_testdir + dh_testroot + dh_installchangelogs -i + + dh_installdocs -plibgcj-common + dh_installchangelogs -plibgcj-common + mv debian/libgcj-common/usr/share/doc/libgcj-common/changelog \ + debian/libgcj-common/usr/share/doc/libgcj-common/changelog.Debian + + install -m644 build/cacerts debian/libgcj-common/etc/java/cacerts-gcj + + dh_compress -i -XREADME.Debian + dh_fixperms -i + dh_python2 -plibgcj-common + dh_installdeb -i + dh_gencontrol -plibgcj-common -u-v$(CV_LIBGCJCOMMON) + dh_md5sums -i + dh_builddeb -i +endif + +binary-arch: binary-native $(foreach a,$(CROSS_ARCHS),binary.$(a)) +binary-native: build-arch install +ifeq ($(with_native),yes) + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs -pcpp + for p in `dh_listpackages $(nopkgs_native) -Ncpp -Nlibgcj-bc -Ncpp-doc -Ngcc-doc -Ngfortran-doc -Ngccgo-doc -Nlibgcj-common -Ngdc -Nlibgphobos-dev`; do \ + case "$$p" in \ + *-gnu*|*-kfreebsd*|gcc-hppa64-linux-gnu) continue;; \ + gij|gcj-*) t=libgcj-common;; \ + *) t=cpp; \ + esac; \ + echo ln -sf $$t debian/$$p/usr/share/doc/$$p; \ + mkdir -p debian/$$p/usr/share/doc; \ + rm -rf debian/$$p/usr/share/doc/$$p; \ + ln -sf $$t debian/$$p/usr/share/doc/$$p; \ + done + + dh_installchangelogs -pcpp -pgdc -plibgphobos-dev + for i in cpp gdc libgphobos-dev; do \ + mv debian/$$i/usr/share/doc/$$i/changelog \ + debian/$$i/usr/share/doc/$$i/changelog.Debian; \ + done +ifeq ($(with_gfdl_docs),yes) + dh_installdocs -pcpp-doc -pgcc-doc -pgfortran-doc -pgccgo-doc + dh_installchangelogs -pcpp-doc -pgcc-doc -pgfortran-doc -pgccgo-doc + for i in cpp-doc gcc-doc gfortran-doc gccgo-doc; do \ + mv debian/$$i/usr/share/doc/$$i/changelog \ + debian/$$i/usr/share/doc/$$i/changelog.Debian; \ + done +endif +ifneq (,$(filter gcc-hppa64-linux-gnu, $(packages))) + dh_installdocs -pgcc-hppa64-linux-gnu + dh_installchangelogs -pgcc-hppa64-linux-gnu + mv debian/gcc-hppa64-linux-gnu/usr/share/doc/gcc-hppa64-linux-gnu/changelog \ + debian/gcc-hppa64-linux-gnu/usr/share/doc/gcc-hppa64-linux-gnu/changelog.Debian +endif + + dh_compress -s $(nopkgs_native) -XREADME.Debian + +ifneq (,$(filter $(DEB_HOST_ARCH),i386 kfreebsd-i386 hurd-i386)) +# temporary i486-* symlinks for jessie/sid + ifeq ($(DEB_HOST_GNU_CPU)),i586) + gnutype=$(subst i586,i486,$(DEB_HOST_GNU_TYPE)); \ + for i in $$(find debian -name 'i586-*'); do \ + cp -a $$i $$(echo $$i | sed "s,$(DEB_HOST_GNU_TYPE),$$gnutype,"); \ + done + endif +# for backports to wheezy and squeeze + ifeq ($(DEB_HOST_GNU_CPU)),i486) + gnutype=$(subst i486,i586,$(DEB_HOST_GNU_TYPE)); \ + for i in $$(find debian -name 'i486-*'); do \ + cp -a $$i $$(echo $$i | sed "s,$(DEB_HOST_GNU_TYPE),$$gnutype,"); \ + done + endif +endif + + for p in $$(dh_listpackages -a); do \ + case $$p in \ + cpp|g++|gcc|gccgo|gcj-jdk|gcj-jre-headless|gfortran|gcc-hppa64-linux-gnu) \ + [ "$(with_gfdl_docs)" = yes ] && continue; \ + mkdir -p -m 755 debian/$$p/usr/share/lintian/overrides; \ + echo "$$p binary: binary-without-manpage" \ + >> debian/$$p/usr/share/lintian/overrides/$$p;; \ + cpp-doc|gcc-doc|gccgo-doc|gfortran-doc) \ + mkdir -p -m 755 debian/$$p/usr/share/lintian/overrides; \ + echo "$$p binary: documentation-package-not-architecture-independent" \ + >> debian/$$p/usr/share/lintian/overrides/$$p;; \ + esac; \ + done + + dh_fixperms -s $(nopkgs_native) + dh_installdeb -s $(nopkgs_native) + dh_gencontrol -pcpp \ + $(if $(filter yes, $(with_gfdl_docs)),-pcpp-doc) \ + -u-v$(EPOCH):$(CV_CPP) + dh_gencontrol -pgcc \ + $(if $(filter yes,$(with_multilib)),-pgcc-multilib) \ + $(if $(filter yes, $(with_gfdl_docs)),-pgcc-doc) \ + -u-v$(EPOCH):$(CV_GCC) +ifneq (,$(filter gdc, $(packages))) + dh_gencontrol -pgdc $(if $(filter yes,$(with_multilib)),-pgdc-multilib) \ + -u-v$(EPOCH):$(CV_GDC) +endif +ifneq (,$(filter libgphobos-dev, $(packages))) + dh_gencontrol -plibgphobos-dev -u-v$(CV_GDC) +endif +ifneq (,$(filter g++, $(packages))) + dh_gencontrol -pg++ $(if $(filter yes,$(with_multilib)),-pg++-multilib) \ + -u-v$(EPOCH):$(CV_GPP) +endif +ifneq (,$(filter gobjc, $(packages))) + dh_gencontrol -pgobjc $(if $(filter yes,$(with_multilib)),-pgobjc-multilib) \ + -u-v$(EPOCH):$(CV_GOBJC) +endif +ifneq (,$(filter gobjc++, $(packages))) + dh_gencontrol -pgobjc++ $(if $(filter yes,$(with_multilib)),-pgobjc++-multilib) \ + -u-v$(EPOCH):$(CV_GOBJCXX) +endif +ifneq (,$(filter gfortran, $(packages))) + dh_gencontrol -pgfortran $(if $(filter yes,$(with_multilib)),-pgfortran-multilib) \ + $(if $(filter yes, $(with_gfdl_docs)),-pgfortran-doc) \ + -u-v$(EPOCH):$(CV_GFORT) +endif +ifneq (,$(filter gccgo, $(packages))) + dh_gencontrol -pgccgo \ + $(if $(filter yes,$(with_go_multilib)),-pgccgo-multilib) \ + $(if $(filter yes, $(with_gfdl_docs)),-pgccgo-doc) \ + -u-v$(EPOCH):$(CV_GGO) +endif +ifneq (,$(filter gcj-jdk, $(packages))) + dh_gencontrol -plibgcj-bc -u-v$(CV_LIBGCJBC) + dh_gencontrol -pgcj-jre-headless -pgcj-jre -pgcj-jdk \ + -u-v$(EPOCH):$(CV_GCJ) +endif +ifneq (,$(filter gcc-hppa64-linux-gnu, $(packages))) + dh_gencontrol -pgcc-hppa64-linux-gnu \ + -u-v$(EPOCH):$(CV_GCC) +endif + dh_md5sums -s $(nopkgs_native) + dh_builddeb -s $(nopkgs_native) +endif # with_native + +binary.%: build-arch install + dh_testdir + dh_testroot + dh_installdocs -pcpp-$(CROSS_GNU_TYPE) \ + $(if $(filter pkg-config-$(CROSS_GNU_TYPE), $(packages)),-ppkg-config-$(CROSS_GNU_TYPE)) + + for p in $(filter %-$(CROSS_GNU_TYPE),$(cross_packages)); do \ + case "$$p" in \ + cpp-*|pkg-config-*) continue;; \ + *-gnu*|*-kfreebsd*) t=cpp-$(CROSS_GNU_TYPE);; \ + *) continue;; \ + esac; \ + echo ln -sf $$t debian/$$p/usr/share/doc/$$p; \ + mkdir -p debian/$$p/usr/share/doc; \ + rm -rf debian/$$p/usr/share/doc/$$p; \ + ln -sf $$t debian/$$p/usr/share/doc/$$p; \ + done + + dh_installchangelogs -pcpp-$(CROSS_GNU_TYPE) \ + $(if $(filter pkg-config-$(CROSS_GNU_TYPE), $(packages)),-ppkg-config-$(CROSS_GNU_TYPE)) + for i in cpp-$(CROSS_GNU_TYPE) $(if $(filter pkg-config-$(CROSS_GNU_TYPE), $(packages)),pkg-config-$(CROSS_GNU_TYPE)); do \ + mv debian/$$i/usr/share/doc/$$i/changelog \ + debian/$$i/usr/share/doc/$$i/changelog.Debian; \ + done + dh_compress $(foreach p,$(filter %-$(CROSS_GNU_TYPE),$(cross_packages)),-p$(p)) \ + -XREADME.Debian + $(if $(filter pkg-config-$(CROSS_GNU_TYPE), $(packages)), \ + dh_link -ppkg-config-$(CROSS_GNU_TYPE) \ + /usr/share/pkg-config-crosswrapper /usr/bin/${CROSS_GNU_TYPE}-pkg-config \ + ) + + for p in $(filter %-$(CROSS_GNU_TYPE),$(cross_packages)); do \ + case $$p in \ + cpp-$(CROSS_GNU_TYPE)|g++-$(CROSS_GNU_TYPE)|gcc-$(CROSS_GNU_TYPE)|gccgo-$(CROSS_GNU_TYPE)|gcj-$(CROSS_GNU_TYPE)|gfortran-$(CROSS_GNU_TYPE)) \ + [ "$(with_gfdl_docs)" = yes ] && continue; \ + mkdir -p -m 755 debian/$$p/usr/share/lintian/overrides; \ + echo "$$p binary: binary-without-manpage" \ + >> debian/$$p/usr/share/lintian/overrides/$$p;; \ + esac; \ + done + + dh_fixperms $(foreach p,$(filter %-$(CROSS_GNU_TYPE),$(cross_packages)),-p$(p)) + dh_installdeb $(foreach p,$(filter %-$(CROSS_GNU_TYPE),$(cross_packages)),-p$(p)) + dh_gencontrol -pcpp-$(CROSS_GNU_TYPE) '-u-v$(EPOCH):$(CV_CPP_$(CROSS_ARCH))' + dh_gencontrol -pgcc-$(CROSS_GNU_TYPE) \ + $(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgcc-multilib-$(CROSS_GNU_TYPE)) \ + '-u-v$(EPOCH):$(CV_GCC_$(CROSS_ARCH))' + + $(if $(filter gdc-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pgdc-$(CROSS_GNU_TYPE) \ + $(if $(filter $(CROSS_ARCH),$(d_multilib_archs)),-pgdc-multilib-$(CROSS_GNU_TYPE)) \ + -u-v$(EPOCH):$(CV_GDC_$(CROSS_ARCH)) \ + ) + + $(if $(filter g++-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pg++-$(CROSS_GNU_TYPE) \ + $(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pg++-multilib-$(CROSS_GNU_TYPE)) \ + -u-v$(EPOCH):$(CV_GPP_$(CROSS_ARCH)) \ + ) + + $(if $(filter gobjc++-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pgobjc-$(CROSS_GNU_TYPE) \ + $(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgobjc-multilib-$(CROSS_GNU_TYPE)) \ + -u-v$(EPOCH):$(CV_GOBJC_$(CROSS_ARCH)) \ + ) + + $(if $(filter gobjc++-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pgobjc++-$(CROSS_GNU_TYPE) \ + $(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgobjc++-multilib-$(CROSS_GNU_TYPE)) \ + -u-v$(EPOCH):$(CV_GOBJCXX_$(CROSS_ARCH)) \ + ) + + $(if $(filter gfortran-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pgfortran-$(CROSS_GNU_TYPE) \ + $(if $(filter $(CROSS_ARCH),$(multilib_archs)),-pgfortran-multilib-$(CROSS_GNU_TYPE)) \ + -u-v$(EPOCH):$(CV_GFORT_$(CROSS_ARCH)) \ + ) + + $(if $(filter gccgo-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pgccgo-$(CROSS_GNU_TYPE) \ + $(if $(filter $(CROSS_ARCH),$(go_multilib_archs)),-pgccgo-multilib-$(CROSS_GNU_TYPE)) \ + -u-v$(EPOCH):$(CV_GGO_$(CROSS_ARCH)) \ + ) + + $(if $(filter gcj-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pgcj-$(CROSS_GNU_TYPE) \ + -u-v$(EPOCH):$(CV_GCJ_$(CROSS_ARCH)) \ + ) + + $(if $(filter gnat-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -pgnat-$(CROSS_GNU_TYPE) -pgnat-sjlj-$(CROSS_GNU_TYPE) \ + -u-v$(EPOCH):$(CV_GNAT_$(CROSS_ARCH)) \ + ) + + $(if $(filter pkg-config-$(CROSS_GNU_TYPE), $(packages)), \ + dh_gencontrol -ppkg-config-$(CROSS_GNU_TYPE) \ + -u-v$(EPOCH):$(CV_GCC_$(CROSS_ARCH)) \ + ) + + dh_md5sums $(foreach p,$(filter %-$(CROSS_GNU_TYPE),$(cross_packages)),-p$(p)) + dh_builddeb $(foreach p,$(filter %-$(CROSS_GNU_TYPE),$(cross_packages)),-p$(p)) + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install substvars |