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:
Julien Cristau 2008-08-03 01:27:28 +02:00
parent 1c4e3c0aea
commit 1e7894c842
2 changed files with 26 additions and 18 deletions

7
debian/changelog vendored
View File

@ -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
* xrandr: move outputs among CRTCs as necessary (closes: #486142).

37
debian/rules vendored
View File

@ -16,15 +16,17 @@ include debian/xsfbs/xsfbs.mk
# 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
SUBDIRS=$(DEF_SUBDIRS)
BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
@ -38,22 +40,21 @@ endif
build: build-stamp
build-stamp: $(STAMP_DIR)/genscripts $(STAMP_DIR)/patch
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
build-stamp: $(BUILD_STAMPS)
>$@
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
dh_testdir