Split CFLAGS and LDFLAGS in call to ./configure.
[debian/cdck.git] / debian / rules
index e81731883c826daf05a388b71cd1c145358530a4..3f2c92a1a37814eeb8a3906db8fffd25b14a5029 100755 (executable)
@@ -9,6 +9,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/quilt/quilt.make
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
@@ -26,20 +27,19 @@ endif
 
 config.status: configure
        dh_testdir
-       CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+       ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS=" -Wl,-z,defs"
 
 
 build: build-stamp
-
-build-stamp:  config.status
+build-stamp: config.status $(QUILT_STAMPFN)
        dh_testdir
        $(MAKE)
-       touch build-stamp
+       touch $@
 
-clean:
+clean: unpatch
        dh_testdir
        dh_testroot
-       rm -f build-stamp 
+       rm -f build-stamp install-stamp
 
        [ ! -f Makefile ] || $(MAKE) distclean
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
@@ -49,14 +49,16 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" ""
        cp -f /usr/share/misc/config.guess config.guess
 endif
 
-       dh_clean 
+       dh_clean
 
-install: build
+install: install-stamp
+install-stamp: build-stamp
        dh_testdir
        dh_testroot
-       dh_clean -k 
+       dh_clean -k
        $(MAKE) install DESTDIR=$(CURDIR)/debian/cdck
        rm -rf $(CURDIR)/debian/cdck/usr/lib
+       touch $@
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -79,4 +81,4 @@ binary-arch: build install
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+.PHONY: build clean binary-indep binary-arch binary install