git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: do not compile git with debugging symbols by default
@ 2015-01-22 12:50 Alexander Kuleshov
  2015-01-22 13:00 ` Jeff King
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Kuleshov @ 2015-01-22 12:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Alexander Kuleshov

Standard user has no need in debugging information. This patch adds
DEBUG=1 option to compile git with debugging symbols and compile without
it by default.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b5b4cee..83ff691 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@ all::
 
 # Define V=1 to have a more verbose compile.
 #
+# Define DEBUG=1 to compile git with debugging symbols.
+#
 # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.
 #
 # Define SANE_TOOL_PATH to a colon-separated list of paths to prepend
@@ -363,8 +365,13 @@ GIT-VERSION-FILE: FORCE
 -include GIT-VERSION-FILE
 
 # CFLAGS and LDFLAGS are for the users to override from the command line.
+DEBUG_CFLAGS=
+
+ifdef DEBUG
+	DEBUG_CFLAGS = -g
+endif
 
-CFLAGS = -g -O2 -Wall
+CFLAGS = $(DEBUG_CFLAGS) -O2 -Wall
 LDFLAGS =
 ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
-- 
2.3.0.rc1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-01-27  8:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 12:50 [PATCH] Makefile: do not compile git with debugging symbols by default Alexander Kuleshov
2015-01-22 13:00 ` Jeff King
2015-01-22 15:09   ` Mike Hommey
2015-01-22 16:51   ` Alexander Kuleshov
2015-01-22 16:53     ` Alexander Kuleshov
2015-01-22 17:36     ` Matthieu Moy
2015-01-22 18:35       ` Jeff King
2015-01-22 22:55         ` Mike Hommey
2015-01-27  8:43           ` David Aguilar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).