summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-06-03 14:38:02 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-03 14:38:02 -0700
commitec5ad66ee28ba2eac3141b720d48485dc978faab (patch)
tree2dc3022e91fcbdc7bbf555f614c4c99e7c7d6dae /Makefile
parentMerge branch 'em/man-bold-literal' (diff)
parentMakefile: add $(DEVELOPER_CFLAGS) variable (diff)
downloadtgif-ec5ad66ee28ba2eac3141b720d48485dc978faab.tar.xz
Merge branch 'mm/makefile-developer-can-be-in-config-mak'
"make DEVELOPER=1" worked as expected; setting DEVELOPER=1 in config.mak didn't. * mm/makefile-developer-can-be-in-config-mak: Makefile: add $(DEVELOPER_CFLAGS) variable Makefile: move 'ifdef DEVELOPER' after config.mak* inclusion
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 0d59718bf7..de5a030256 100644
--- a/Makefile
+++ b/Makefile
@@ -375,13 +375,7 @@ GIT-VERSION-FILE: FORCE
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -O2 -Wall
-LDFLAGS =
-ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
-ALL_LDFLAGS = $(LDFLAGS)
-STRIP ?= strip
-
-ifdef DEVELOPER
-CFLAGS += -Werror \
+DEVELOPER_CFLAGS = -Werror \
-Wdeclaration-after-statement \
-Wno-format-zero-length \
-Wold-style-definition \
@@ -390,7 +384,10 @@ CFLAGS += -Werror \
-Wstrict-prototypes \
-Wunused \
-Wvla
-endif
+LDFLAGS =
+ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
+ALL_LDFLAGS = $(LDFLAGS)
+STRIP ?= strip
# Create as necessary, replace existing, make ranlib unneeded.
ARFLAGS = rcs
@@ -951,6 +948,10 @@ include config.mak.uname
-include config.mak.autogen
-include config.mak
+ifdef DEVELOPER
+CFLAGS += $(DEVELOPER_CFLAGS)
+endif
+
ifndef sysconfdir
ifeq ($(prefix),/usr)
sysconfdir = /etc