X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Frules;h=2bd4939551392df9945d1dec60e51c3e91200aa4;hp=5a65ec5ccf949a0c8361a25f7caad1c770e3eed4;hb=59a0a487d5eaeca18593af9d2ca21cd66184431d;hpb=a444076202333c68108c21c0d89e251c092ff957 diff --git a/debian/rules b/debian/rules index 5a65ec5..2bd4939 100755 --- a/debian/rules +++ b/debian/rules @@ -2,7 +2,18 @@ include /usr/share/quilt/quilt.make -DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +# Parsing of DEB_BUILD_OPTIONS flags. +# Note that nostrip is handled automatically by debhelper. +CFLAGS := -g -Wall +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif # Temporary root DEBTMP := $(CURDIR)/debian/tmp @@ -10,11 +21,10 @@ DEBTMP := $(CURDIR)/debian/tmp build: patch build-stamp build-stamp: dh_testdir - CFLAGS="-g -O2 -Wall" ./configure \ + CFLAGS="$(CFLAGS)" ./configure \ --mandir='$${prefix}/share/man' \ - --enable-secure-statd \ --with-tcp-wrappers - $(MAKE) + $(MAKE) $(MAKEFLAGS) touch build-stamp clean: unpatch