=== modified file 'debian/changelog' --- debian/changelog 2010-05-27 12:32:39 +0000 +++ debian/changelog 2010-05-31 16:02:06 +0000 @@ -1,3 +1,10 @@ +binutils (2.20.51.20100527-1ubuntu2) lucid; urgency=low + + * Merge 'binary-cross' target into 'binary' one. + LP: #587851 + + -- Marcin Juszkiewicz Mon, 31 May 2010 18:01:55 +0200 + binutils (2.20.51.20100527-1ubuntu1) maverick; urgency=low * Merge with Debian; remaining changes: === modified file 'debian/rules' --- debian/rules 2010-05-27 12:32:39 +0000 +++ debian/rules 2010-05-31 15:32:52 +0000 @@ -120,6 +120,11 @@ with_multiarch = disabled in DEB_BUILD_OPTIONS endif +# If $(TARGET) is not set, try reading debian/target +ifeq (,$(TARGET)) +TARGET := $(shell cat debian/target 2>/dev/null) +endif + ######################################## CONFARGS = \ @@ -448,6 +453,10 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) build_stamps += build-spu-stamp endif +ifneq (,$(TARGET)) + build_stamps = build-cross-stamp +endif + build: pre-build build-stamp build-stamp: $(build_stamps) touch build-stamp @@ -468,6 +477,9 @@ ifeq ($(with_static),yes) install_stamps += install-static-stamp endif +ifneq (,$(TARGET)) + install_stamps = install-cross-stamp +endif install: $(install_stamps) install-stamp: checkroot build-stamp $(checkdir) @@ -730,6 +742,9 @@ rm -f debian/files debian/substvars +# Cross builds do not have documentation packages +ifeq (,$(TARGET)) + $(install_dir) $(d_doc)/DEBIAN $(install_dir) $(d_doc)/usr/share/doc/$(p_doc)/ @@ -763,6 +778,7 @@ chmod -R go=rX $(d_src) dpkg --build $(d_src) .. +endif ################################################################################ @@ -773,6 +789,31 @@ binary-arch: checkroot build install $(checkdir) +# Process the following only if $(TARGET) is set +ifneq (,$(TARGET)) + test "" != "$(TARGET)" + + sed "/^$$/ q" < debian/control > debian/control.$(TARGET) + sed -e "s/__TARGET__/$$(echo -n $(TARGET) | sed s/_/-/g)/" \ + < debian/control.cross.in >> debian/control.$(TARGET) + + $(install_dir) $(d_cross)/DEBIAN + + $(install_dir) $(d_cross)/usr/share/doc/$(p_cross)/ + $(install_file) debian/changelog $(d_cross)/usr/share/doc/$(p_cross)/changelog.Debian + $(install_file) debian/copyright debian/README.cross $(d_cross)/usr/share/doc/$(p_cross)/ + gzip -9f $(d_cross)/usr/share/doc/$(p_cross)/changelog.Debian + + for pkg in bfd gas gprof ld; do \ + ln -sf ../binutils/$$pkg $(d_cross)/usr/share/doc/$(p_cross)/$$pkg; \ + done + + rm -f debian/substvars + dpkg-shlibdeps $(d_cross)/usr/bin/* + dpkg-gencontrol -isp -cdebian/control.$(TARGET) -P$(d_cross) -p$(p_cross) + dpkg --build $(d_cross) .. + +else : # generate some control & helper files nver=$$(echo $(DEB_UPSTREAM) | awk -F. '{ OFS="."; $$NF=$$NF+1; print }'); \ for i in debian/*.in; do \ @@ -983,19 +1024,13 @@ dpkg --build $(d_spu) .. endif +endif # Process the following only if $(TARGET) is set ################################################################################ ################# # cross targets # ################# -# If $(TARGET) is not set, try reading debian/target -ifeq ($(TARGET),) -TARGET := $(shell cat debian/target 2>/dev/null) -endif - -# Process the following only if $(TARGET) is set -ifneq ($(TARGET),) # Support TARGET both as Debian architecture specification (e.g. arm), # and as the target name (e.g. arm-linux-gnu). @@ -1004,6 +1039,9 @@ override TARGET := $(try_convert) endif +# Process the following only if $(TARGET) is set +ifneq (,$(TARGET)) + p_cross = $(subst _,-,binutils-$(TARGET)) d_cross = debian/$(p_cross) @@ -1051,10 +1089,10 @@ CONFARGS += --with-build-sysroot=$(with_build_sysroot) endif -configure-$(TARGET)-stamp: patch-stamp +configure-cross-stamp: patch-stamp $(checkdir) test "" != "$(TARGET)" - rm -rf configure-$(TARGET)-stamp builddir-$(TARGET) + rm -rf configure-cross-stamp builddir-$(TARGET) mkdir builddir-$(TARGET) cd builddir-$(TARGET) \ && env CC="$(CC)" CXX="$(CXX)" ../configure --host=$(DEB_HOST_GNU_TYPE) \ @@ -1062,13 +1100,13 @@ $(ADDITIONAL_TARGETS) $(CONFARGS) touch $@ -build-$(TARGET)-stamp: configure-$(TARGET)-stamp +build-cross-stamp: configure-cross-stamp $(checkdir) test "" != "$(TARGET)" $(MAKE) -C builddir-$(TARGET) $(NJOBS) CFLAGS="$(CFLAGS)" touch $@ -install-$(TARGET)-stamp: build-$(TARGET)-stamp +install-cross-stamp: build-cross-stamp $(checkdir) test "" != "$(TARGET)" rm -rf $(d_cross) @@ -1081,7 +1119,7 @@ gzip -9 $(d_cross)/usr/share/man/man1/* touch $@ -binary-cross: checkroot install-$(TARGET)-stamp +binary-cross: checkroot install-cross-stamp $(checkdir) test "" != "$(TARGET)" @@ -1109,7 +1147,7 @@ $(checkdir) test "" != "$(TARGET)" rm -rf $(d_cross) debian/control.$(TARGET) debian/files debian/substvars \ - builddir-$(TARGET) {configure,build,install}-$(TARGET)-stamp + builddir-$(TARGET) {configure,build,install}-cross-stamp .PHONY: binary-cross clean-cross