45b724fe76
Fix #119 when parallel build is enable, multiple dpkg-buildpackage instances are running at the same time. /var/lib/dpkg is shared by all instances and the /var/lib/dpkg/updates could be corrupted and cause the build failure. the fix is to use overlay fs to mount separate /var/lib/dpkg for each dpkg-buildpackage instance so that they are not affecting each other. Signed-off-by: Guohan Lu <lguohan@gmail.com>
15 lines
464 B
Makefile
15 lines
464 B
Makefile
SHELL = /bin/bash
|
|
.ONESHELL:
|
|
.SHELLFLAGS += -e
|
|
|
|
MAIN_TARGET = $(BRCM_XLR_GTS_PLATFORM_MODULE)
|
|
|
|
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
|
# Build the package
|
|
export PYBUILD_INSTALL_ARGS_python2=--install-scripts=/dev/null
|
|
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
|
|
|
|
mv $(addprefix ../, $* $(EXTRA_TARGETS)) $(DEST)/
|
|
|
|
$(addprefix $(DEST)/, $(EXTRA_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|