From 1369ee2d44dd5d87b8ab577a5f3fe2cb8149fb5c Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 21 Oct 2009 13:55:42 +0200 Subject: Update handling of config.{guess,sub} Readd upstream config.{guess,sub} and use debian/rules to copy the current files from /usr/share/misc on build. This way we do not have to deal with changes to the upstream source. --- debian/rules | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index d816384..c0d4f44 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,13 @@ DEST = $(CURDIR)/debian/cscope DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +confflags = +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build $(DEB_HOST_GNU_TYPE) +else + confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +endif + CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -17,8 +24,15 @@ endif config.status: patch-stamp configure dh_testdir - CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ + +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + + CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure $(confflags) \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info @@ -38,13 +52,8 @@ clean: unpatch rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif dh_clean install: build -- cgit v1.2.3-54-g00ecf