Support parallel builds
Add support for parallel=n in DEB_BUILD_OPTIONS, and for actually building the apps in parallel. Install is still sequential, at least for now.
This commit is contained in:
parent
1c4e3c0aea
commit
1e7894c842
|
@ -1,3 +1,10 @@
|
||||||
|
x11-xserver-utils (7.3+5) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* Add support for parallel=n in DEB_BUILD_OPTIONS, and for actually building
|
||||||
|
the apps in parallel. Install is still sequential, at least for now.
|
||||||
|
|
||||||
|
-- Julien Cristau <jcristau@debian.org> Sun, 03 Aug 2008 01:26:58 +0200
|
||||||
|
|
||||||
x11-xserver-utils (7.3+4) unstable; urgency=low
|
x11-xserver-utils (7.3+4) unstable; urgency=low
|
||||||
|
|
||||||
* xrandr: move outputs among CRTCs as necessary (closes: #486142).
|
* xrandr: move outputs among CRTCs as necessary (closes: #486142).
|
||||||
|
|
|
@ -16,15 +16,17 @@ include debian/xsfbs/xsfbs.mk
|
||||||
# subdirectory explicitly so that the build system knows what to build
|
# subdirectory explicitly so that the build system knows what to build
|
||||||
DEF_SUBDIRS=iceauth rgb sessreg xcmsdb xgamma xhost xmodmap xrandr xrdb xrefresh xset xsetmode xsetpointer xsetroot xstdcmap xtrap xvidtune
|
DEF_SUBDIRS=iceauth rgb sessreg xcmsdb xgamma xhost xmodmap xrandr xrdb xrefresh xset xsetmode xsetpointer xsetroot xstdcmap xtrap xvidtune
|
||||||
SUBDIRS=$(DEF_SUBDIRS)
|
SUBDIRS=$(DEF_SUBDIRS)
|
||||||
|
BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
|
||||||
|
|
||||||
CFLAGS = -Wall -g
|
CFLAGS = -Wall -g
|
||||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
|
||||||
CFLAGS += -O0
|
CFLAGS += -O0
|
||||||
else
|
else
|
||||||
CFLAGS += -O2
|
CFLAGS += -O2
|
||||||
endif
|
endif
|
||||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||||
INSTALL_PROGRAM += -s
|
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||||
|
MAKEFLAGS += -j$(NUMJOBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||||
|
@ -38,22 +40,21 @@ endif
|
||||||
|
|
||||||
|
|
||||||
build: build-stamp
|
build: build-stamp
|
||||||
build-stamp: $(STAMP_DIR)/genscripts $(STAMP_DIR)/patch
|
build-stamp: $(BUILD_STAMPS)
|
||||||
dh_testdir
|
>$@
|
||||||
for FILE in $(DEF_SUBDIRS); do \
|
|
||||||
echo "$$FILE" ; \
|
|
||||||
mkdir "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE); \
|
|
||||||
(cd "$$FILE"-obj-$(DEB_BUILD_GNU_TYPE) && \
|
|
||||||
../"$$FILE"/configure --prefix=/usr --mandir=\$${prefix}/share/man \
|
|
||||||
--infodir=\$${prefix}/share/info $(confflags) \
|
|
||||||
--disable-xprint \
|
|
||||||
CFLAGS="$(CFLAGS)" \
|
|
||||||
RSH=rsh \
|
|
||||||
MANCONF="/etc/manpath.config" && \
|
|
||||||
$(MAKE)) || exit 1; \
|
|
||||||
done
|
|
||||||
|
|
||||||
touch build-stamp
|
$(STAMP_DIR)/build-%: $(STAMP_DIR)/genscripts $(STAMP_DIR)/patch
|
||||||
|
dh_testdir
|
||||||
|
mkdir -p $*-obj-$(DEB_BUILD_GNU_TYPE)
|
||||||
|
cd $*-obj-$(DEB_BUILD_GNU_TYPE) && \
|
||||||
|
../$*/configure --prefix=/usr --mandir=\$${prefix}/share/man \
|
||||||
|
--infodir=\$${prefix}/share/info $(confflags) \
|
||||||
|
--disable-xprint \
|
||||||
|
CFLAGS="$(CFLAGS)" \
|
||||||
|
RSH=rsh \
|
||||||
|
MANCONF="/etc/manpath.config"
|
||||||
|
cd $*-obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
|
||||||
|
>$@
|
||||||
|
|
||||||
clean: xsfclean
|
clean: xsfclean
|
||||||
dh_testdir
|
dh_testdir
|
||||||
|
|
Loading…
Reference in New Issue