[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

x11-xserver-utils: Changes to 'debian-unstable'



 debian/changelog |    7 +++++++
 debian/rules     |   37 +++++++++++++++++++------------------
 2 files changed, 26 insertions(+), 18 deletions(-)

New commits:
commit 1e7894c84299c78d11f9286166fcbcc1f4aef9c8
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Aug 3 01:27:28 2008 +0200

    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.

diff --git a/debian/changelog b/debian/changelog
index 4c1bc58..4115841 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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).
diff --git a/debian/rules b/debian/rules
index 3d263df..1e3bb62 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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


Reply to: