X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Frules;h=224f095af9e80d85083f1151eac6d9fd531ec267;hb=211b05b5a1329b60f5eefb0ac22c59d213b982e6;hp=6e99ff6ec915b6e80ceddd3817ba7cdc92d8e1d1;hpb=ff8c6aa136118c65af50dd9dc8ed41b7fa2dcc03;p=sliver-openvswitch.git diff --git a/debian/rules b/debian/rules index 6e99ff6ec..224f095af 100755 --- a/debian/rules +++ b/debian/rules @@ -14,9 +14,11 @@ BUILD_NUMBER = 0 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -MAKEFLAGS += -j$(NUMJOBS) +PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +else +PARALLEL = endif +MAKEFLAGS += $(PARALLEL) ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 @@ -29,11 +31,12 @@ configure-stamp: dh_testdir test -e configure || ./boot.sh test -d _debian || mkdir _debian + echo $(DEB_BUILD_OPTIONS) echo $$CC cd _debian && ( \ test -e Makefile || \ ../configure --prefix=/usr --localstatedir=/var --enable-ssl \ - --with-build-number=$(BUILD_NUMBER) \ + --sysconfdir=/etc --with-build-number=$(BUILD_NUMBER) \ CFLAGS="$(CFLAGS)" $(DATAPATH_CONFIGURE_OPTS)) touch configure-stamp @@ -44,7 +47,8 @@ build-arch: build-arch-stamp build-arch-stamp: configure-stamp $(MAKE) -C _debian ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - if $(MAKE) -C _debian check; then :; else \ + if $(MAKE) -C _debian check TESTSUITEFLAGS='$(PARALLEL)'; then :; \ + else \ cat _debian/tests/testsuite.log; \ exit 1; \ fi @@ -68,7 +72,7 @@ install: install-indep install-arch install-indep: build-indep dh_testdir dh_testroot - dh_clean -k -i + dh_prep -i dh_installdirs -i dh_install -i sed 's/^BUILD_NUMBER = .*/BUILD_NUMBER = $(BUILD_NUMBER)/' \ @@ -76,14 +80,13 @@ install-indep: build-indep > debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules chmod 755 debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules cd debian/openvswitch-datapath-source/usr/src && tar -c modules | bzip2 -9 > openvswitch-datapath.tar.bz2 && rm -rf modules - install -m644 debian/openvswitch-pki-server.apache2 debian/openvswitch-pki-server/etc/apache2/sites-available/openvswitch-pki install-arch: build-arch dh_testdir dh_testroot - dh_clean -k -s + dh_prep -s dh_installdirs -s - $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openvswitch install + $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template dh_install -s @@ -98,13 +101,13 @@ binary-common: dh_installexamples dh_installdebconf dh_installlogrotate - dh_installinit + dh_installinit -R dh_installcron dh_installman dh_link dh_strip --dbg-package=openvswitch-dbg dh_compress - dh_fixperms -X var/log/core + dh_fixperms dh_pysupport dh_perl dh_makeshlibs @@ -120,3 +123,9 @@ binary-arch: install-arch binary: binary-arch binary-indep .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure + +# This GNU make extensions disables parallel builds for the current Makefile +# but not for sub-Makefiles. This is appropriate here because build-arch and +# build-indep both invoke "make" on OVS, which can update some of the same +# targets in ways that conflict (e.g. both update tests/testsuite). +.NOTPARALLEL: