summaryrefslogtreecommitdiffstats
path: root/scripts/mk/architecture.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:32:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:32:52 +0000
commit3c14ed72233b22898a70db82f4674931b2a717fd (patch)
treef2bf9e8cd0690cc6cb8dd702d0ecf05a26764e71 /scripts/mk/architecture.mk
parentReleasing progress-linux version 1.22.9-0.0~progress7.99u1. (diff)
downloaddpkg-3c14ed72233b22898a70db82f4674931b2a717fd.tar.xz
dpkg-3c14ed72233b22898a70db82f4674931b2a717fd.zip
Merging upstream version 1.22.10.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/mk/architecture.mk')
-rw-r--r--scripts/mk/architecture.mk14
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/mk/architecture.mk b/scripts/mk/architecture.mk
index 4f0559c..c2f6a05 100644
--- a/scripts/mk/architecture.mk
+++ b/scripts/mk/architecture.mk
@@ -6,16 +6,12 @@
ifndef dpkg_architecture_mk_included
dpkg_architecture_mk_included = yes
-dpkg_architecture_vars = \
-$(foreach machine,BUILD HOST TARGET,\
- $(foreach var,ARCH ARCH_ABI ARCH_LIBC ARCH_OS ARCH_CPU ARCH_BITS ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\
- DEB_$(machine)_$(var)))
+dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1)))
-# dpkg-buildpackage sets all variables. Optimize this frequent case.
-ifneq (,$(strip $(foreach v,$(dpkg_architecture_vars),$(if $(value $(v)),,1))))
- $(foreach line,$(subst =,?=,$(shell dpkg-architecture)),$(eval $(line)))
-endif
+dpkg_architecture_setvar = export $(1) ?= $(call dpkg_lazy_eval,$(1),dpkg-architecture -q$(1))
-export $(dpkg_architecture_vars)
+$(foreach machine,BUILD HOST TARGET,\
+ $(foreach var,ARCH ARCH_ABI ARCH_LIBC ARCH_OS ARCH_CPU ARCH_BITS ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\
+ $(eval $(call dpkg_architecture_setvar,DEB_$(machine)_$(var)))))
endif # dpkg_architecture_mk_included