chiark / gitweb /
debian/rules: Honour dpkg-buildflags.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 23 Jan 2017 13:05:56 +0000 (13:05 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 23 Jan 2017 13:52:49 +0000 (13:52 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
debian/rules

index 547cdcd..88016cc 100644 (file)
@@ -4,6 +4,7 @@ userv (1.1.2~~iwj1) unstable; urgency=low
   * Honour XCFLAGS.
 
   Debian packaging:
+  * Honour dpkg-buildflags.
   * Add some newer debian/ droppings to .gitignore.
 
  -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Sun, 01 Dec 2013 17:39:11 +0000
index 97bced1..67c5271 100755 (executable)
@@ -11,12 +11,17 @@ else
        INSTOPTS= INSTALL_PROGRAM='install -c'
 endif
 
+makebuildargs := OPTIMISE= \
+ XCFLAGS="$(shell dpkg-buildflags --get CFLAGS)" \
+ XCPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" \
+ XLDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)"
+
 build: build-arch build-indep
 
 build-arch:
        $(checkdir)
        ./configure --prefix=/usr
-       $(MAKE) all docs
+       $(MAKE) $(makebuildargs) all docs
        touch build-arch
 
 clean:
@@ -40,7 +45,7 @@ binary-arch:  checkroot build
        install -m 755 debian/{postinst,prerm,postrm} $t/DEBIAN/.
        install -m 644 debian/conffiles $t/DEBIAN/.
        install -m 755 debian/initd $t/etc/init.d/userv
-       $(MAKE) $(INSTOPTS) \
+       $(MAKE) $(INSTOPTS) $(makebuildargs) \
                prefix=$t/usr etcdir=$t/etc \
                docdir=$t/usr/share/doc/userv \
                mandir=$t/usr/share/man \