Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 09:59:21 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-08 09:59:21 +0300
commite998e7a1880ce3939aa6f7ad4244ad319c1655d1 (patch)
treef08c5acfe18500ae3b667843b1ce4ee21504ca00 /Makefile
parent174774cd519846616edc475fcbc98237409ffc21 (diff)
parent26d2e4fb227c1415011a136fa9bb881ee338118a (diff)
Merge branch 'nd/warn-more-for-devs'
The build procedure "make DEVELOPER=YesPlease" learned to enable a bit more warning options depending on the compiler used to help developers more. There also is "make DEVOPTS=tokens" knob available now, for those who want to help fixing warnings we usually ignore, for example. * nd/warn-more-for-devs: Makefile: add a DEVOPTS to get all of -Wextra Makefile: add a DEVOPTS to suppress -Werror under DEVELOPER Makefile: detect compiler and enable more warnings in DEVELOPER=1 connect.c: mark die_initial_contact() NORETURN
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 21 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index f89f2dba5b..4541788e50 100644
--- a/Makefile
+++ b/Makefile
@@ -464,6 +464,26 @@ all::
# When using RUNTIME_PREFIX, define HAVE_WPGMPTR if your platform offers
# the global variable _wpgmptr containing the absolute path of the current
# executable (this is the case on Windows).
+#
+# Define DEVELOPER to enable more compiler warnings. Compiler version
+# and family are auto detected, but could be overridden by defining
+# COMPILER_FEATURES (see config.mak.dev)
+#
+# When DEVELOPER is set, DEVOPTS can be used to control compiler
+# options. This variable contains keywords separated by
+# whitespace. The following keywords are are recognized:
+#
+# no-error:
+#
+# suppresses the -Werror that implicitly comes with
+# DEVELOPER=1. Useful for getting the full set of errors
+# without immediately dying, or for logging them.
+#
+# extra-all:
+#
+# The DEVELOPER mode enables -Wextra with a few exceptions. By
+# setting this flag the exceptions are removed, and all of
+# -Wextra is used.
GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -472,15 +492,6 @@ 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)
@@ -1098,7 +1109,7 @@ include config.mak.uname
-include config.mak
ifdef DEVELOPER
-CFLAGS += $(DEVELOPER_CFLAGS)
+include config.mak.dev
endif
comma := ,