diff --git a/debian/rules b/debian/rules index 0906e53..6e96ffe 100755 --- a/debian/rules +++ b/debian/rules @@ -38,6 +38,13 @@ export DO_LPF=1 CONFFLAGS+=--enable-use-sockets endif +ifeq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + PARALLEL := +else + PARALLEL := \ + -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif + %: dh $@ --parallel --with autoreconf @@ -59,17 +66,17 @@ override_dh_auto_build: # ldap-enabled build test -f Makefile && $(MAKE) distclean || true ./configure --with-ldap --with-ldapcrypto CFLAGS="$(CFLAGS) -DNSUPDATE" $(CONFFLAGS) LIBS="$(LIBS) -latomic" - $(MAKE) + $(MAKE) $(PARALLEL) mv server/dhcpd dhcpd # ddns-disabled build test -f Makefile && $(MAKE) distclean || true ./configure CFLAGS="$(CFLAGS)" $(CONFFLAGS) LIBS="$(LIBS) -latomic" - $(MAKE) + $(MAKE) $(PARALLEL) mv client/dhclient dhclient # ldap-disabled build test -f Makefile && $(MAKE) distclean || true ./configure CFLAGS="$(CFLAGS) -DNSUPDATE" $(CONFFLAGS) LIBS="$(LIBS) -latomic" - $(MAKE) + $(MAKE) $(PARALLEL) override_dh_install: # rename some upstream files -- 2.25.1