]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Use dpkg-buildflags to get compilation flags
authorRuss Allbery <rra@debian.org>
Sun, 15 May 2011 06:55:04 +0000 (23:55 -0700)
committerRuss Allbery <rra@debian.org>
Sun, 15 May 2011 06:55:04 +0000 (23:55 -0700)
* Use dpkg-buildflags to get the default values of CFLAGS, CPPFLAGS, and
  LDFLAGS.  Upstream does not entirely honor these yet, but we're
  getting closer.

debian/changelog
debian/rules

index 148b08e4c6d446e6c57b55391f74f5e59ef836b9..b23b09f88a457877e5525984787c0a5d1175647f 100644 (file)
@@ -2,6 +2,9 @@ openafs (1.6.0~pre5-2) UNRELEASED; urgency=low
 
   * Apply upstream patch from http://gerrit.openafs.org/#change,4656 for
     correct reading of files larger than the chunk size.
+  * Use dpkg-buildflags to get the default values of CFLAGS, CPPFLAGS, and
+    LDFLAGS.  Upstream does not entirely honor these yet, but we're
+    getting closer.
 
  -- Russ Allbery <rra@debian.org>  Sat, 14 May 2011 23:47:41 -0700
 
index 7eb75845fe1916e6d2b3d3a72cde312a780ef57a..cd4a71bce2bc90f7b8cbf973c311dbbf623d7120 100755 (executable)
@@ -9,6 +9,11 @@ else
     SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 endif
 
+# Set compiler flags.
+CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)
+CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS)
+
 # Determine whether we're building with optimization.  This doesn't really
 # work at the moment due to upstream problems.
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -91,6 +96,7 @@ override_dh_auto_configure:
        sh regen.sh
        afslogsdir=/var/log/openafs afslocaldir=/var/lib/openafs/local \
            sh configure \
+           CFLAGS=$(CFLAGS) CPPFLAGS=$(CPPFLAGS) LDFLAGS=$(LDFLAGS) \
            --with-afs-sysname=$(SYS_NAME) --disable-kernel-module \
            --prefix=/usr --mandir=\$${prefix}/share/man \
            --sysconfdir=/etc --libexecdir=/usr/lib --with-krb5 \