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=4c77028718afc79082c2a07e881db646aa7028fd

commit 4c77028718afc79082c2a07e881db646aa7028fd
Author: Nicolas Boulenguez <nico...@debian.org>
AuthorDate: Wed Apr 10 00:41:42 2024 +0200

    test: Simplify buildflags.mk test of _MAINT_APPEND when TEST_ is empty
    
    When TEST_CPPFLAGS is empty, the right hand side of the comparison
    starts with a space character. Append to the variable with += so that we
    do not need to care whether the TEST_ variables were previously set or
    not.
    
    Signed-off-by: Guillem Jover <guil...@debian.org>
---
 scripts/t/mk/buildflags.mk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/t/mk/buildflags.mk b/scripts/t/mk/buildflags.mk
index 94d85a7e0..7cf798f73 100644
--- a/scripts/t/mk/buildflags.mk
+++ b/scripts/t/mk/buildflags.mk
@@ -1,5 +1,8 @@
 DEB_CPPFLAGS_MAINT_APPEND = -DTEST_MK=test-host
+TEST_CPPFLAGS            += -DTEST_MK=test-host
+
 DEB_CPPFLAGS_FOR_BUILD_MAINT_APPEND = -DTEST_MK=test-build
+TEST_CPPFLAGS_FOR_BUILD            += -DTEST_MK=test-build
 
 include $(srcdir)/mk/buildflags.mk
 
@@ -8,8 +11,8 @@ test:
        test "$(ASFLAGS_FOR_BUILD)" = "$(TEST_ASFLAGS_FOR_BUILD)"
        test "$(CFLAGS)" = "$(TEST_CFLAGS)"
        test "$(CFLAGS_FOR_BUILD)" = "$(TEST_CFLAGS_FOR_BUILD)"
-       test "$(CPPFLAGS)" = "$(TEST_CPPFLAGS) -DTEST_MK=test-host"
-       test "$(CPPFLAGS_FOR_BUILD)" = 
"$(TEST_CPPFLAGS_FOR_BUILD)-DTEST_MK=test-build"
+       test "$(CPPFLAGS)" = "$(TEST_CPPFLAGS)"
+       test "$(CPPFLAGS_FOR_BUILD)" = "$(TEST_CXXFLAGS_FOR_BUILD)"
        test "$(CXXFLAGS)" = "$(TEST_CXXFLAGS)"
        test "$(CXXFLAGS_FOR_BUILD)" = "$(TEST_CXXFLAGS_FOR_BUILD)"
        test "$(DFLAGS)" = "$(TEST_DFLAGS)"

-- 
Dpkg.Org's dpkg

Reply via email to