Makefile: detect compiler and enable more warnings in DEVELOPER=1
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 14 Apr 2018 19:19:44 +0000 (19:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Apr 2018 04:54:53 +0000 (13:54 +0900)
commit1da1580e4c2d482070363edc7b4f8b42874c312a
tree28400e2b4abd899817506cc548aed03dfeee5534
parentd2bff22c2369289eac4d17654c464e392e726b3e
Makefile: detect compiler and enable more warnings in DEVELOPER=1

The set of extra warnings we enable when DEVELOPER has to be
conservative because we can't assume any compiler version the
developer may use. Detect the compiler version so we know when it's
safe to enable -Wextra and maybe more.

These warning settings are mostly from my custom config.mak a long
time ago when I tried to enable as many warnings as possible that can
still build without showing warnings. Some of those warnings are
probably worth fixing instead of just suppressing in future.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
config.mak.dev [new file with mode: 0644]
detect-compiler [new file with mode: 0755]