Support dpkg-buildpackage -jX parallel DEB_BUILD_OPTIONS.

ci/unstable
Modestas Vainius 16 years ago
parent 857598fc78
commit 4bc798c21f

4
debian/changelog vendored

@ -5,8 +5,10 @@ cmake (2.6.4-2) UNRELEASED; urgency=low
* Fix bashisms in CMake scripts (Closes: #530056). * Fix bashisms in CMake scripts (Closes: #530056).
* Merge in 2.6.0-6 debian/changelog. * Merge in 2.6.0-6 debian/changelog.
* Use quilt.make rather than custom quilt patch implementation. * Use quilt.make rather than custom quilt patch implementation.
* Make debian/rules dpkg-buildpackage -jX safe and support parallel
in DEB_BUILD_OPTIONS (Closes: #538826).
-- Modestas Vainius <modestas@vainius.eu> Sat, 08 Aug 2009 11:02:22 +0300 -- Modestas Vainius <modestas@vainius.eu> Sat, 08 Aug 2009 11:06:53 +0300
cmake (2.6.4-1) unstable; urgency=low cmake (2.6.4-1) unstable; urgency=low

14
debian/rules vendored

@ -15,6 +15,12 @@ ifeq ($(shell arch),parisc64)
CFLAGS += -ffunction-sections CFLAGS += -ffunction-sections
endif endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
CONFIGURE_PARALLEL += --parallel=$(NUMJOBS)
endif
$(BUILD_FLAGS_FILE): $(BUILD_FLAGS_FILE):
touch $@ touch $@
echo 'set(CMAKE_SKIP_RPATH YES CACHE BOOL "Skip rpath" FORCE)' >> $@ echo 'set(CMAKE_SKIP_RPATH YES CACHE BOOL "Skip rpath" FORCE)' >> $@
@ -32,18 +38,18 @@ $(BUILD_FLAGS_FILE):
$(if $(USE_DARTP),echo 'set(BUILDNAME "cmake_2.2.3-1_$(DARCH).deb" CACHE STRING "" FORCE)' >> $@) $(if $(USE_DARTP),echo 'set(BUILDNAME "cmake_2.2.3-1_$(DARCH).deb" CACHE STRING "" FORCE)' >> $@)
configure: configure-stamp configure: configure-stamp
configure-stamp: $(BUILD_FLAGS_FILE) configure-stamp: $(QUILT_STAMPFN) $(BUILD_FLAGS_FILE)
dh_testdir dh_testdir
# pre-load the cache to avoid setting rpath: # pre-load the cache to avoid setting rpath:
rm -rf Build && mkdir -p Build rm -rf Build && mkdir -p Build
cd Build && ../bootstrap --prefix=/usr --docdir=/share/doc/cmake --mandir=/share/man \ cd Build && ../bootstrap --prefix=/usr --docdir=/share/doc/cmake --mandir=/share/man \
--init=../$(BUILD_FLAGS_FILE) --system-libs --init=../$(BUILD_FLAGS_FILE) --system-libs $(CONFIGURE_PARALLEL)
chmod -x ChangeLog.manual chmod -x ChangeLog.manual
chmod -x Modules/*.cmake Modules/*.cmake.in Modules/*.cxx Modules/Platform/* chmod -x Modules/*.cmake Modules/*.cmake.in Modules/*.cxx Modules/Platform/*
touch $@ touch $@
build: $(QUILT_STAMPFN) configure-stamp build-stamp build: build-stamp
build-stamp: build-stamp: configure-stamp
dh_testdir dh_testdir
cd Build && $(MAKE) $(if $(USE_DARTP),Experimental && $(MAKE) ExperimentalSubmit) cd Build && $(MAKE) $(if $(USE_DARTP),Experimental && $(MAKE) ExperimentalSubmit)
touch $@ touch $@

Loading…
Cancel
Save