]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
Makefile: Fix for 'make CFLAGS=...'
authorPhil Sutter <phil@nwl.cc>
Mon, 8 Sep 2025 22:14:16 +0000 (00:14 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 9 Sep 2025 10:18:03 +0000 (12:18 +0200)
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 <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Makefile.am
configure.ac

index 5190a49ae69f13739d4f6761a53e0f1df57b2f5b..3e3f1e61092bb52cdf0136f113dd8c2c39de668a 100644 (file)
@@ -156,6 +156,8 @@ AM_CFLAGS = \
        \
        $(GCC_FVISIBILITY_HIDDEN) \
        \
+       -DMAKE_STAMP=$(MAKE_STAMP) \
+       \
        $(NULL)
 
 AM_YFLAGS = -d -Wno-yacc
index da16a6e257c911a9f039609cf67559c00b7c12e7..3517ea041f7ea9dfe7793f0fde4652e3a2ddeb67 100644 (file)
@@ -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                                \