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.
This commit is contained in:
parent
e7df5735bc
commit
02e867b636
|
@ -7,6 +7,7 @@
|
|||
*~
|
||||
.#*
|
||||
/*.substvars
|
||||
/*-tmp/
|
||||
/control
|
||||
/control.md5sum
|
||||
/files
|
||||
|
|
|
@ -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'])
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
usr/bin
|
|
@ -1 +0,0 @@
|
|||
usr/bin/lockdep
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue