X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=debian%2Frules;h=a3e854179dfd7ff82b3816e8219bff0ce484609f;hb=7418dd0d056ef994d4f84037e98da1f9e86de1d5;hp=53fa04fc8fe4a987d77d1e4d4c662f636dd817cb;hpb=96e8fbb553b78315df38dc18cd6173c0b2153549;p=fs%2Flustre-release.git diff --git a/debian/rules b/debian/rules index 53fa04f..a3e8541 100755 --- a/debian/rules +++ b/debian/rules @@ -75,20 +75,34 @@ MODS_PKG=lustre-client-modules BUILDDIR=. SRCDIR=. +AVAIL_CPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) +ifneq ($(AVAIL_CPUS),1) + PMAKEARGS := -j $(AVAIL_CPUS) +endif + autogen: autogen-stamp autogen-stamp: patch-stamp # see if any patches requires us to run autogen - if ! grep "^--- .*\/autoconf" debian/patches/* || \ - [ ! -f autogen.sh ]; then \ - exit 0; \ - fi - cp /usr/share/misc/config.sub config.sub - cp /usr/share/misc/config.sub libsysio/config.sub - cp /usr/share/misc/config.sub ldiskfs/config.sub - cp /usr/share/misc/config.guess config.guess - cp /usr/share/misc/config.guess libsysio/config.guess - cp /usr/share/misc/config.guess ldiskfs/config.guess - sh ./autogen.sh + # (for a distribution release tarball, it is expected that if + # downstream adds any patches that requires autogen.sh to be + # run, a patch will be added by downstream to install the + # needed autogen.sh scripts + # see https://bugzilla.lustre.org/attachment.cgi?id=27156 + # for an example) + if grep "^--- .*\/autoconf" debian/patches/*; then \ + if [ ! -f autogen.sh ]; then \ + echo "You have patches which require autogen.sh to be run, but it doesn't exist"; \ + echo "Please see https://bugzilla.lustre.org/attachment.cgi?id=27156"; \ + exit 1; \ + fi; \ + cp /usr/share/misc/config.sub config.sub; \ + cp /usr/share/misc/config.sub libsysio/config.sub; \ + cp /usr/share/misc/config.sub ldiskfs/config.sub; \ + cp /usr/share/misc/config.guess config.guess; \ + cp /usr/share/misc/config.guess libsysio/config.guess; \ + cp /usr/share/misc/config.guess ldiskfs/config.guess; \ + sh ./autogen.sh; \ + fi; \ touch $@ configure: configure-stamp @@ -116,7 +130,7 @@ build-arch build-indep: build build: build-stamp build-stamp: patch-stamp configure-stamp dh_testdir - $(MAKE) -C $(BUILDDIR) + $(MAKE) -C $(BUILDDIR) $(PMAKEARGS) $(MAKE) -C $(BUILDDIR) DESTDIR=$(TOP_DIR)/debian/tmp install # jump our lustre-client-modules into the control file if not using m-a if ! $(USE_MA); then \ @@ -361,7 +375,7 @@ kdist_configure: kdist_config binary-modules: prep-deb-files dh_testroot dh_clean -k - $(MAKE) + $(MAKE) $(PMAKEARGS) $(MAKE) install DESTDIR=$(CURDIR)/debian/$(PKGNAME) # Remove stuff that doesn't belong (no module-only target) cd $(CURDIR)/debian/$(PKGNAME) && rm -rf usr sbin etc