X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Frules;h=4cf5b388a22034afe322678ab216fadae31c0ee2;hb=c65cb7ab93594f6e3f27fd077365ba41782bfa46;hp=707fe8b7db4238cbf990f7c1fd6bf839fcfa3aec;hpb=064af42167bf4fc9aaea2702d80ce08074b889c0;p=sliver-openvswitch.git diff --git a/debian/rules b/debian/rules index 707fe8b7d..4cf5b388a 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,17 @@ DATAPATH_CONFIGURE_OPTS = # Official build number. Leave set to 0 if not an official build. BUILD_NUMBER = 0 +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +MAKEFLAGS += -j$(NUMJOBS) +endif + +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + configure: configure-stamp configure-stamp: dh_testdir @@ -39,7 +50,7 @@ configure-stamp: test -e Makefile || \ ../configure --prefix=/usr --localstatedir=/var --enable-ssl \ --with-build-number=$(BUILD_NUMBER) \ - $(DATAPATH_CONFIGURE_OPTS)) + CFLAGS="$(CFLAGS)" $(DATAPATH_CONFIGURE_OPTS)) touch configure-stamp #Architecture @@ -48,6 +59,9 @@ build: build-arch build-indep build-arch: build-arch-stamp build-arch-stamp: configure-stamp $(MAKE) -C _debian +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + $(MAKE) -C _debian check +endif touch $@ build-indep: build-indep-stamp