chiark / gitweb /
Enable hardening flags harder.
[disorder] / debian / rules
index 481b2aefd9497f0ab438af77e0e059ae5d0c7ab8..d539af7fd65877c77ce5b7692c42fb4bd4bb28ff 100755 (executable)
@@ -20,17 +20,15 @@ cgiexecdir=/usr/lib/cgi-bin
 httpdir=/var/www
 browser=x-www-browser
 
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+export CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
 # Options to configure.  This can be overridden by the caller if necessary.
 CONFIGURE=--prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --mandir=/usr/share/man --with-browser=${browser} cgiexecdir="${cgiexecdir}" httpdir="${httpdir}"
 
-# Set DEB_BUILD_OPTIONS=noopt to produce a non-optimized build.
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-CFLAGS=-O0 -g
-else
-CFLAGS=-O2 -g
-endif
-export CFLAGS
-
 # Install commands.  You wouldn't normally override these.
 INSTALL=install
 INSTALL_DATA=$(INSTALL) -p -o root -g root -m 644
@@ -69,13 +67,7 @@ build:
          echo ./autogen.sh;\
          ./autogen.sh;\
        fi
-       @set -e;if test ! -f config.status; then \
-         echo ./configure ${CONFIGURE} ${CONFIGURE_EXTRA};\
-         ./configure ${CONFIGURE} ${CONFIGURE_EXTRA};\
-       else\
-         echo ./config.status;\
-         ./config.status;\
-       fi
+       ./configure ${CONFIGURE} ${CONFIGURE_EXTRA}
        $(MAKE) SENDMAIL=${SENDMAIL} ${PARALLEL}
 
 pkg-disorder: build