diff options
author | Peter Wu <peter@lekensteyn.nl> | 2020-03-11 23:11:55 +0000 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2020-03-12 06:45:56 +0000 |
commit | e3212a49e5f847756ee60f5798668acb8e4d5522 (patch) | |
tree | 3f28f4bc72507669300e1bfab0203dc6ede97090 /debian | |
parent | 0ec5ca3ecf683073c1fd841f7a91d34f8260252c (diff) |
debian: speed up build by running asn1 and guides target in parallel
Speeds up the asn1 build from 133 seconds to 39 seconds, and guide
builds from 40s to 33s (-j6). Extraction of parallel=x from
DEB_BUILD_OPTIONS was borrowed from the debhelper Makefile.
Switching to Ninja has even more potential speed ups and prevents
interleaving build output, but requires debhelper 11.2 (Ubuntu
bionic-backports, Debian stretch-backports).
Change-Id: I2d403863adf5bfd692300642aad7df4b1cdb6e46
Reviewed-on: https://code.wireshark.org/review/36377
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/rules | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules index bd036315af..1dedf330e4 100755 --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,11 @@ export DH_OPTIONS export DEB_BUILD_MAINT_OPTIONS = hardening=+all +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKE_JOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +else + MAKE_JOBS = 1 +endif %: dh $@ --with python3 --buildsystem cmake --with quilt --parallel @@ -29,14 +34,14 @@ override_dh_auto_configure: override_dh_auto_build: # Ignore warnings from asn2wrs.py about duplicate field names. PYTHONWARNINGS='ignore:The same:UserWarning::0' \ - $(MAKE) -C $(CURDIR)/obj-* asn1 + $(MAKE) -C $(CURDIR)/obj-* -j$(MAKE_JOBS) asn1 dh_auto_build - $(MAKE) -C $(CURDIR)/obj-* user_guide_html developer_guide_html + $(MAKE) -C $(CURDIR)/obj-* -j$(MAKE_JOBS) user_guide_html developer_guide_html # fix links in documentation sed -i "s|$(CURDIR)/docbook|..|" obj-*/docbook/ws*g_html_chunked/*.html ifneq ($(filter $(DEB_BUILD_OPTIONS),nocheck),) # Required for the "unittests" suite. - $(MAKE) -C $(CURDIR)/obj-* test-programs + $(MAKE) -C $(CURDIR)/obj-* -j$(MAKE_JOBS) test-programs endif override_dh_strip: |