From: Matthieu Moy Date: Wed, 1 Jun 2016 08:00:08 +0000 (+0200) Subject: Makefile: add $(DEVELOPER_CFLAGS) variable X-Git-Tag: v2.9.0-rc2~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51dd3e81d4b5098d7eca9a1370616b8e8f7784c2;p=thirdparty%2Fgit.git Makefile: add $(DEVELOPER_CFLAGS) variable This does not change the behavior, but allows the user to tweak DEVELOPER_CFLAGS on the command-line or in a config.mak* file if needed. This also makes the code somewhat cleaner as it follows the pattern by specifying which flags to activate in the first part, and actually activating them in the last one. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index a8383b9939..feee885c93 100644 --- a/Makefile +++ b/Makefile @@ -375,6 +375,15 @@ GIT-VERSION-FILE: FORCE # CFLAGS and LDFLAGS are for the users to override from the command line. CFLAGS = -g -O2 -Wall +DEVELOPER_CFLAGS = -Werror \ + -Wdeclaration-after-statement \ + -Wno-format-zero-length \ + -Wold-style-definition \ + -Woverflow \ + -Wpointer-arith \ + -Wstrict-prototypes \ + -Wunused \ + -Wvla LDFLAGS = ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) ALL_LDFLAGS = $(LDFLAGS) @@ -941,15 +950,7 @@ include config.mak.uname -include config.mak ifdef DEVELOPER -CFLAGS += -Werror \ - -Wdeclaration-after-statement \ - -Wno-format-zero-length \ - -Wold-style-definition \ - -Woverflow \ - -Wpointer-arith \ - -Wstrict-prototypes \ - -Wunused \ - -Wvla +CFLAGS += $(DEVELOPER_CFLAGS) endif ifndef sysconfdir