diff options
author | Sunil Thaha <sunil.thaha@nokia.com> | 2010-07-30 11:08:39 +1000 |
---|---|---|
committer | Sunil Thaha <sunil.thaha@nokia.com> | 2010-07-30 11:08:39 +1000 |
commit | fa52b1f8163a994bd7743635a5125e2774bd5d18 (patch) | |
tree | d51a117b77366c3c84e6ebca405dc1798d63d43a | |
parent | 773b8855c2225e987fcdd13e47ca81e31fbc483c (diff) |
Added provision to build in parallel in debian/rules file
-rwxr-xr-x | debian/rules | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules index 17770ee..7c94b1a 100755 --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,16 @@ else CFLAGS += -O2 endif +# Find out how many parallel threads to run +comma := , +TMP_BUILD_OPTS = $(subst $(comma), ,$(DEB_BUILD_OPTIONS)) +ifneq (,$(filter parallel=%,$(TMP_BUILD_OPTS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(TMP_BUILD_OPTS))) + PARALLEL_MAKEFLAGS += -j$(NUMJOBS) +endif + +DEB_MAKE_INVOKE := $(MAKE) $(PARALLEL_MAKEFLAGS) + configure: configure-stamp configure-stamp: dh_testdir @@ -35,7 +45,7 @@ build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. - $(MAKE) + $(DEB_MAKE_INVOKE) make doc #docbook-to-man debian/qtuitest.sgml > qtuitest.1 |