[linux-tools] 03/03: Fix parallel builds of both arch and indep binaries
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Dec 10 02:51:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch sid
in repository linux-tools.
commit 02e867b636c610e2e3f68864f77a7ae5bd4a7fc8
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Thu Dec 10 02:44:23 2015 +0000
Fix parallel builds of both arch and indep binaries
A parallel 'debian/rules build' will now invoke 'debian/rules.real
build' twice in parallel, which is disastrous.
- Add and use proper build-arch and build-indep targets in
debian/rules.gen and debian/rules.real
- Assign a separate temporary directory to each target in
debian/rules.real. Add the directories to .gitignore and
the clean rule.
- Pull installation of the lockdep wrapper (which is indep)
up into debian/rules.real so that we don't end up building
liblockdep twice in parallel.
---
debian/.gitignore | 1 +
debian/bin/gencontrol.py | 2 +-
debian/build/tools/lib/lockdep/Makefile | 3 ---
debian/lockdep.dirs | 1 +
debian/lockdep.install | 1 -
debian/rules | 8 +++-----
debian/rules.real | 29 +++++++++++++++++------------
7 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/debian/.gitignore b/debian/.gitignore
index c5589b5..78c2912 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -7,6 +7,7 @@
*~
.#*
/*.substvars
+/*-tmp/
/control
/control.md5sum
/files
diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
index 64fbcf2..d299ef2 100755
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -8,7 +8,7 @@ from debian_linux.gencontrol import PackagesList, Makefile, MakeFlags, Gencontro
from debian_linux.utils import *
class gencontrol(Gencontrol):
- makefile_targets = ('binary-arch', 'binary-indep', 'build')
+ makefile_targets = ('binary-arch', 'binary-indep', 'build-arch', 'build-indep')
def __init__(self, underlay = None):
self.templates = Templates(['debian/templates'])
diff --git a/debian/build/tools/lib/lockdep/Makefile b/debian/build/tools/lib/lockdep/Makefile
index 427c0de..a0f954f 100644
--- a/debian/build/tools/lib/lockdep/Makefile
+++ b/debian/build/tools/lib/lockdep/Makefile
@@ -21,9 +21,6 @@ install:
cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/
ln -s liblockdep.so.$(VERSION) \
$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so
-# Upstream lockdep preload script is not suitable for installation
- sed 's/@VERSION@/$(VERSION)/' lockdep.in > $(DESTDIR)/usr/bin/lockdep
- chmod 755 $(DESTDIR)/usr/bin/lockdep
clean:
rm -rf out
diff --git a/debian/lockdep.dirs b/debian/lockdep.dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/lockdep.dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/lockdep.install b/debian/lockdep.install
deleted file mode 100644
index 2369420..0000000
--- a/debian/lockdep.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin/lockdep
diff --git a/debian/rules b/debian/rules
index ee262a9..dad5e2e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,13 +11,11 @@ build: build-arch build-indep
build-arch: debian/control
dh_testdir
- $(MAKE) -f debian/rules.gen build
+ $(MAKE) -f debian/rules.gen build-arch
-# XXX All we really need to do is to generate the lockdep script,
-# but for now we take the stupid option of building everything.
build-indep: debian/control
dh_testdir
- $(MAKE) -f debian/rules.gen build
+ $(MAKE) -f debian/rules.gen build-indep
DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)
TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz
@@ -42,7 +40,7 @@ maintainerclean:
clean: debian/control
dh_testdir
make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR)
- rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__
+ rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ debian/*-tmp
dh_clean
binary-indep:
diff --git a/debian/rules.real b/debian/rules.real
index 303e165..1eb2cf8 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -13,7 +13,9 @@ endif
binary-indep: install-lockdep
-build: $(STAMPS_DIR)/build
+build-arch: $(STAMPS_DIR)/build
+
+build-indep:
$(STAMPS_DIR)/build:
$(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR)
@@ -63,14 +65,14 @@ install-perf: $(STAMPS_DIR)/build
dh_builddeb
install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip
-install-usbip: DIR = $(CURDIR)/debian/tmp
+install-usbip: DIR = $(CURDIR)/debian/usbip-tmp
install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/out/config.h)
install-usbip: $(STAMPS_DIR)/build
dh_testdir
dh_testroot
dh_prep
$(MAKE) -C $(BUILD_DIR)/tools/usb/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR)
- dh_install
+ dh_install --sourcedir=$(DIR)
dh_installchangelogs
dh_installdocs
dh_lintian
@@ -108,16 +110,16 @@ install-hyperv-daemons: $(STAMPS_DIR)/build
dh_builddeb
install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev
-install-liblockdep: DIR = $(CURDIR)/debian/tmp
+install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp
install-liblockdep: $(STAMPS_DIR)/build
dh_testdir
dh_testroot
dh_prep
$(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \
DESTDIR=$(DIR)
- env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) \
+ env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \
'usr/lib/*/liblockdep.so.*'
- dh_install
+ dh_install --sourcedir=$(DIR)
dh_installchangelogs
dh_installdocs
dh_strip
@@ -131,15 +133,18 @@ install-liblockdep: $(STAMPS_DIR)/build
dh_md5sums
dh_builddeb
-install-lockdep: DH_OPTIONS = -plockdep
-install-lockdep: DIR = $(CURDIR)/debian/tmp
-install-lockdep: $(STAMPS_DIR)/build
+install-lockdep: PACKAGE_NAME = lockdep
+install-lockdep: DH_OPTIONS = -p$(PACKAGE_NAME)
+install-lockdep: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
+install-lockdep:
dh_testdir
dh_testroot
dh_prep
- $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \
- DESTDIR=$(DIR)
- dh_install
+ dh_installdirs
+# Upstream lockdep preload script is not suitable for installation
+ sed 's/@VERSION@/$(VERSION)/' $(BUILD_DIR)/tools/lib/lockdep/lockdep.in \
+ > $(DIR)/usr/bin/lockdep
+ chmod 755 $(DIR)/usr/bin/lockdep
dh_installchangelogs
dh_installdocs
dh_compress
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux-tools.git
More information about the Kernel-svn-changes
mailing list