Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "LU-147 avoid 8k obd device amount limit"
[fs/lustre-release.git]
/
debian
/
rules
diff --git
a/debian/rules
b/debian/rules
index
39dcbe9
..
5e59622
100755
(executable)
--- a/
debian/rules
+++ b/
debian/rules
@@
-75,6
+75,11
@@
MODS_PKG=lustre-client-modules
BUILDDIR=.
SRCDIR=.
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
autogen: autogen-stamp
autogen-stamp: patch-stamp
# see if any patches requires us to run autogen
@@
-84,8
+89,13
@@
autogen-stamp: patch-stamp
# needed autogen.sh scripts
# see https://bugzilla.lustre.org/attachment.cgi?id=27156
# for an example)
# 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 \
+ if grep -e "^--- .*\/autoconf\/" \
+ -e "^--- .*\/autoMakefile\.am" \
+ -e "^--- .*\/Makefile\.am" \
+ -e "^--- .*\/configure\.ac" \
+ -e "^--- .*\/configure\.in" \
+ debian/patches/*; then \
+ if [ ! -f build/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; \
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; \
@@
-96,7
+106,7
@@
autogen-stamp: patch-stamp
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; \
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; \
+ sh
build
/autogen.sh; \
fi; \
touch $@
fi; \
touch $@
@@
-125,7
+135,7
@@
build-arch build-indep: build
build: build-stamp
build-stamp: patch-stamp configure-stamp
dh_testdir
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 \
$(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 \
@@
-370,7
+380,7
@@
kdist_configure: kdist_config
binary-modules: prep-deb-files
dh_testroot
dh_clean -k
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
$(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
@@
-388,7
+398,7
@@
binary-modules: prep-deb-files
clean:
dh_testdir
dh_testroot
clean:
dh_testdir
dh_testroot
- dpatch deapply-all
+ dpatch deapply-all
-v
-$(MAKE) distclean
rm -rf debian/substvars debian/*.bak debian/*~ *~ *-stamp debian/$(PATCH_PKG)
ls -d debian/lustre-client-modules-* | grep -v _KVERS_ | xargs rm -f || true
-$(MAKE) distclean
rm -rf debian/substvars debian/*.bak debian/*~ *~ *-stamp debian/$(PATCH_PKG)
ls -d debian/lustre-client-modules-* | grep -v _KVERS_ | xargs rm -f || true
@@
-403,11
+413,11
@@
clean:
patch: patch-stamp
patch-stamp:
patch: patch-stamp
patch-stamp:
- dpatch apply-all
+ dpatch apply-all
-v
touch $@
unpatch:
touch $@
unpatch:
- dpatch deapply-all
+ dpatch deapply-all
-v
rm -rf debian/patched patch-stamp
.PHONY: binary-arch clean source diff binary binary-indep binary-arch install configure
rm -rf debian/patched patch-stamp
.PHONY: binary-arch clean source diff binary binary-indep binary-arch install configure