From: Phil Sutter Date: Mon, 8 Sep 2025 22:14:16 +0000 (+0200) Subject: Makefile: Fix for 'make CFLAGS=...' X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=229fa8b440b67debb12beca830e57a9ea25a2745;p=thirdparty%2Fnftables.git Makefile: Fix for 'make CFLAGS=...' Appending to CFLAGS from configure.ac like this was too naive, passing custom CFLAGS in make arguments overwrites it. Extend AM_CFLAGS instead. Fixes: 64c07e38f0494 ("table: Embed creating nft version into userdata") Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso --- diff --git a/Makefile.am b/Makefile.am index 5190a49a..3e3f1e61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -156,6 +156,8 @@ AM_CFLAGS = \ \ $(GCC_FVISIBILITY_HIDDEN) \ \ + -DMAKE_STAMP=$(MAKE_STAMP) \ + \ $(NULL) AM_YFLAGS = -d -Wno-yacc diff --git a/configure.ac b/configure.ac index da16a6e2..3517ea04 100644 --- a/configure.ac +++ b/configure.ac @@ -153,7 +153,6 @@ AC_CONFIG_COMMANDS([nftversion.h], [ # Current date should be fetched exactly once per build, # so have 'make' call date and pass the value to every 'gcc' call AC_SUBST([MAKE_STAMP], ["\$(shell date +%s)"]) -CFLAGS="${CFLAGS} -DMAKE_STAMP=\${MAKE_STAMP}" AC_CONFIG_FILES([ \ Makefile \