diff options
author | Guillem Jover <guillem@debian.org> | 2015-07-30 05:38:28 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2015-07-30 06:39:24 +0200 |
commit | dc505ca07a9037079299aca4aeabe513d514a32e (patch) | |
tree | bd7d12b66dab8e5572b79ea9539faba0f734be99 /scripts | |
parent | 3ba3e1619ce07aaddbe38782cab4554f5148d14d (diff) | |
download | dpkg-dc505ca07a9037079299aca4aeabe513d514a32e.tar.gz |
scripts/mk: Add an extra level of escaping for double evals
Regression introduced in commit 486241a9d3521ed093be9a02b00f4d404dc39b35.
Otherwise the values are not computed lazily, many of which are quite
expensive. Rename dpkg_late_eval to dpkg_lazy_eval so that the other
makefiles can be intermixed with the ones needing the extra level of
escaping.
Closes: #793330
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mk/architecture.mk | 4 | ||||
-rw-r--r-- | scripts/mk/buildflags.mk | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/scripts/mk/architecture.mk b/scripts/mk/architecture.mk index 26c0936c9..f6e68932e 100644 --- a/scripts/mk/architecture.mk +++ b/scripts/mk/architecture.mk @@ -2,9 +2,9 @@ # that dpkg-architecture can return. Existing values of those variables # are preserved as per policy. -dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1))) +dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1))) -dpkg_architecture_setvar = $(1) ?= $(call dpkg_late_eval,$(1),dpkg-architecture -q$(1)) +dpkg_architecture_setvar = $(1) ?= $(call dpkg_lazy_eval,$(1),dpkg-architecture -q$(1)) $(foreach machine,BUILD HOST TARGET,\ $(foreach var,ARCH ARCH_OS ARCH_CPU ARCH_BITS ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\ diff --git a/scripts/mk/buildflags.mk b/scripts/mk/buildflags.mk index 0cce17e87..bb496e108 100644 --- a/scripts/mk/buildflags.mk +++ b/scripts/mk/buildflags.mk @@ -16,14 +16,14 @@ # This list is kept in sync with the default set of flags returned # by dpkg-buildflags. -dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1))) +dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := $$(shell $(2)))$$(value DPKG_CACHE_$(1))) DPKG_BUILDFLAGS_LIST = CFLAGS CPPFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS \ GCJFLAGS FFLAGS FCFLAGS LDFLAGS define dpkg_buildflags_export_envvar ifdef $(1) -DPKG_BUILDFLAGS_EXPORT_ENVVAR += $(1)="$(value $(1))" +DPKG_BUILDFLAGS_EXPORT_ENVVAR += $(1)="$$(value $(1))" endif endef @@ -33,7 +33,7 @@ $(foreach flag,$(DPKG_BUILDFLAGS_LIST),\ $(foreach operation,SET STRIP APPEND PREPEND,\ $(eval $(call dpkg_buildflags_export_envvar,DEB_$(flag)_MAINT_$(operation))))) -dpkg_buildflags_setvar = $(1) = $(call dpkg_late_eval,$(1),$(DPKG_BUILDFLAGS_EXPORT_ENVVAR) dpkg-buildflags --get $(1)) +dpkg_buildflags_setvar = $(1) = $(call dpkg_lazy_eval,$(1),$(DPKG_BUILDFLAGS_EXPORT_ENVVAR) dpkg-buildflags --get $(1)) $(foreach flag,$(DPKG_BUILDFLAGS_LIST),\ $(eval $(call dpkg_buildflags_setvar,$(flag)))) |