]> git.saurik.com Git - apt.git/blobdiff - debian/rules
s/st_mtime/mtime/ on our local stat structure in apt-ft...
[apt.git] / debian / rules
index 23d26cc2b760efc309eab7aca0e90834ae5d98e3..0b932a71e95a319429e3ba778e70f7a6c4b01a02 100755 (executable)
@@ -2,7 +2,7 @@
 # Made with the aid of dh_make, by Craig Small
 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
 # Some lines taken from debmake, by Christoph Lameter.
-# $Id: rules,v 1.37 2002/09/15 22:51:44 jgg Exp $
+# $Id: rules,v 1.43 2002/11/10 23:58:33 doogie Exp $
 
 # LD_LIBRARY_PATH=pwd/debian/apt/usr/lib dh_shlibdeps -papt
 # dpkg: /home/jgg/work/apt2/debian/apt/usr/lib/libapt-pkg.so.2.9 not found.
 
 export DH_COMPAT=2
 
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# FOR AUTOCONF 2.52 AND NEWER ONLY
+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
+
 # See below
-include build/environment.mak
+-include build/environment.mak
 
 # Default rule
 build:
@@ -90,7 +100,15 @@ build/configure-stamp: configure
        dh_testdir
        -mkdir build
        cp COPYING debian/copyright
-       (cd build; ../configure)
+ifneq ($(wildcard /usr/share/misc/config.sub),)
+       cp -a /usr/share/misc/config.sub buildlib/config.sub
+       echo Updating buildlib/config.sub
+endif
+ifneq ($(wildcard /usr/share/misc/config.guess),)
+       cp -a /usr/share/misc/config.guess buildlib/config.guess
+       echo Updating buildlib/config.guess
+endif
+       cd build && ../configure $(confflags)
        touch $@
 
 build/build-stamp: build/configure-stamp
@@ -101,14 +119,13 @@ build/build-stamp: build/configure-stamp
 clean:
        dh_testdir
 #      dh_testroot
-       rm -f build-stamp debian/shlibs.local
+       -$(MAKE) clean
+       -$(MAKE) distclean
+
        rm -rf build
-       rm -f debian/shlibs.local.apt debian/shlibs.local.apt-utils
 
        # Add here commands to clean up after the build process.
-       -$(MAKE) clean
-       -$(MAKE) distclean
-       dh_clean
+       dh_clean debian/copyright debian/shlibs.local debian/shlibs.local.apt debian/shlibs.local.apt-utils
 
 binary-indep: libapt-pkg-doc
 # Build architecture-independent files here.
@@ -168,6 +185,7 @@ apt: build debian/shlibs.local
        cp $(BLD)/bin/methods/* debian/apt/usr/lib/apt/methods/
 
        cp $(BLD)/scripts/dselect/* debian/apt/usr/lib/dpkg/methods/apt/
+       cp -r $(BLD)/locale debian/apt/usr/
 
        # Copy the guides
        dh_installdocs -p$@ $(BLD)/docs/guide*.text $(BLD)/docs/guide*.html \