forked from osmocom/wireshark
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>
This commit is contained in:
parent
0ec5ca3ecf
commit
e3212a49e5
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue