Package: dpkg-dev Followup-For: Bug #872381 One more suggestion is attached.
>From 95a908b270a533fc5d4a58a45deb929ce0d6159e Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Mon, 1 Nov 2021 10:08:08 +0100 Subject: [PATCH 8/8] scripts/mk/buildopts.mk: small optimisations
Assign DEB_BUILD_OPTION_PARALLEL with := so that the value is computed only once instead of every time the variable is used. The maintainer is not supposed to modify DEB_BUILD_OPTIONS. Always define DEB_BUILD_OPTION_PARALLEL, even if empty when DEB_BUILD_OPTIONS does not contain parallel=%. The distinction between DEB_BUILD_OPTIONS= and DEB_BUILD_OPTIONS=parallel= does probably not deserve a test. --- scripts/mk/buildopts.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/mk/buildopts.mk b/scripts/mk/buildopts.mk index c95777719..420b6359c 100644 --- a/scripts/mk/buildopts.mk +++ b/scripts/mk/buildopts.mk @@ -5,6 +5,5 @@ # # DEB_BUILD_OPTION_PARALLEL: the argument for the parallel=N option. -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - DEB_BUILD_OPTION_PARALLEL = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -endif +DEB_BUILD_OPTION_PARALLEL := $(patsubst parallel=%,%,\ + $(filter parallel=%,$(DEB_BUILD_OPTIONS))) -- 2.30.2

