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=017079b0c97f64d5b1647ea2d1fed5dcf4902c5b commit 017079b0c97f64d5b1647ea2d1fed5dcf4902c5b (HEAD -> main) Author: Nicolas Boulenguez <[email protected]> AuthorDate: Fri Jul 19 14:24:22 2024 +0200 scripts/mk: Fix make variable expansions passed to dpkg-buildflags Add a regression test. Closes: #1076568 Signed-off-by: Guillem Jover <[email protected]> --- scripts/mk/buildflags.mk | 2 +- scripts/t/mk/buildflags.mk | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/mk/buildflags.mk b/scripts/mk/buildflags.mk index a8eac9e54..bc0448881 100644 --- a/scripts/mk/buildflags.mk +++ b/scripts/mk/buildflags.mk @@ -57,7 +57,7 @@ dpkg_buildflags_run = $(eval $(shell \ $(foreach operation,SET STRIP APPEND PREPEND,\ DEB_$(flag)_MAINT_$(operation))),\ $(if $(value $(exported)),\ - $(exported)="$(value $(exported))"))\ + $(exported)="$($(exported))"))\ dpkg-buildflags | sed 's/\([^=]*\)\(.*\)/$$(eval \1:\2)/')) ifdef DPKG_EXPORT_BUILDFLAGS diff --git a/scripts/t/mk/buildflags.mk b/scripts/t/mk/buildflags.mk index 74ccac04b..bc7e6a849 100644 --- a/scripts/t/mk/buildflags.mk +++ b/scripts/t/mk/buildflags.mk @@ -10,6 +10,10 @@ TEST_CXXFLAGS := set-host DEB_CXXFLAGS_FOR_BUILD_MAINT_SET := set-build TEST_CXXFLAGS_FOR_BUILD := set-build +DEB_CFLAGS_MAINT_APPEND = -DTEST_MAKE_EXPANSION=$(expanded_on_demand) +expanded_on_demand := contents +TEST_CFLAGS += -DTEST_MAKE_EXPANSION=contents + DPKG_EXPORT_BUILDFLAGS := 1 include $(srcdir)/mk/buildflags.mk -- Dpkg.Org's dpkg

