Code

rules: Use dh_autotools-dev* to update config.{sub,guess}.
[pkg-libmpdclient.git] / debian / rules
index 8c82591e4c6dea729e7dba8aff0b8db7311d83c3..3075b45df41abb6757b7912307f7ebc3070e8309 100755 (executable)
@@ -11,7 +11,9 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-CFLAGS = -Wall -g
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS += -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -27,13 +29,14 @@ endif
 
 config.status: configure
        dh_testdir
+       dh_autotools-dev_updateconfig
        
        ./configure \
                        --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr \
                        --mandir=\$${prefix}/share/man \
-                       CFLAGS="$(CFLAGS)"
+                       CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
 
 build: build-arch build-indep
 
@@ -55,6 +58,7 @@ clean:
        
        [ ! -f Makefile ] || $(MAKE) distclean
        
+       dh_autotools-dev_restoreconfig
        dh_clean
 
 install: build