This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=d5835c5873f6eb8557a6ae54653cc7817e0057f0

commit d5835c5873f6eb8557a6ae54653cc7817e0057f0
Author: Nicolas Boulenguez <nico...@debian.org>
AuthorDate: Tue Apr 9 04:56:26 2024 +0200

    scripts/mk: Use explicit test of $(origin) instead of ?=
    
    This makes the intent of each stanza more readable (first ensure that
    TOOL is set, then TOOL_FOR_BUILD).
    
    Signed-off-by: Guillem Jover <guil...@debian.org>
---
 scripts/mk/buildtools.mk | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/mk/buildtools.mk b/scripts/mk/buildtools.mk
index f93e64c69..6ce9642cd 100644
--- a/scripts/mk/buildtools.mk
+++ b/scripts/mk/buildtools.mk
@@ -37,17 +37,17 @@ include $(dpkg_datadir)/architecture.mk
 # TOOL is defined and TOOL_FOR_BUILD is not, we fallback to use TOOL.
 define dpkg_buildtool_setvar
   ifeq (,$(filter $(3),$(DEB_BUILD_OPTIONS)))
-    ifeq ($(origin $(1)),default)
+    ifneq (,$(filter default undefined,$(origin $(1))))
       $(1) = $(DEB_HOST_GNU_TYPE)-$(2)
-    else
-      $(1) ?= $(DEB_HOST_GNU_TYPE)-$(2)
     endif
 
     # On native build fallback to use TOOL if that's defined.
-    ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-      $(1)_FOR_BUILD ?= $$($(1))
-    else
-      $(1)_FOR_BUILD ?= $(DEB_BUILD_GNU_TYPE)-$(2)
+    ifeq (undefined,$(origin $(1)_FOR_BUILD))
+      ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+        $(1)_FOR_BUILD = $$($(1))
+      else
+        $(1)_FOR_BUILD = $(DEB_BUILD_GNU_TYPE)-$(2)
+      endif
     endif
   else
     $(1) = :

-- 
Dpkg.Org's dpkg

Reply via email to