diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:45:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:45:20 +0000 |
commit | 9a08cbfcc1ef900a04580f35afe2a4592d7d6030 (patch) | |
tree | 004cc7027bca2f2c0bcb5806527c8e0c48df2d6e /scripts/mk/architecture.mk | |
parent | Initial commit. (diff) | |
download | dpkg-56b3e277e23b0b6313500e1e330e80b5ab6e6522.tar.xz dpkg-56b3e277e23b0b6313500e1e330e80b5ab6e6522.zip |
Adding upstream version 1.19.8.upstream/1.19.8upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/mk/architecture.mk')
-rw-r--r-- | scripts/mk/architecture.mk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/mk/architecture.mk b/scripts/mk/architecture.mk new file mode 100644 index 0000000..0af9601 --- /dev/null +++ b/scripts/mk/architecture.mk @@ -0,0 +1,11 @@ +# This Makefile snippet defines all the DEB_HOST_* / DEB_BUILD_* variables +# that dpkg-architecture can return. Existing values of those variables +# are preserved as per policy. + +dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1))) + +dpkg_architecture_setvar = export $(1) ?= $(call dpkg_lazy_eval,$(1),dpkg-architecture -q$(1)) + +$(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))))) |