git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Teach Makefile to respect external variables: CFLAGS and others.
@ 2007-06-13  5:42 Eygene Ryabinkin
  2007-06-13  6:07 ` Junio C Hamano
  2007-06-13  6:12 ` Sam Ravnborg
  0 siblings, 2 replies; 7+ messages in thread
From: Eygene Ryabinkin @ 2007-06-13  5:42 UTC (permalink / raw)
  To: git

If one is not using the configure script, then there is no way to
redefine variables CFLAGS, LFLAGS, CC, AR, TAR, INSTALL, RPMBUILD,
TCL_PATCH and TCLTK_PATH.  This shouldn't be so, since these variables
can be manually set by user and we should respect them.

The patch originates from the FreeBSD port and was originally made
by Ed Schouten, ed at fxq dot nl.

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
---
 Makefile |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 30a4052..6cd9ea2 100644
--- a/Makefile
+++ b/Makefile
@@ -135,8 +135,8 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
 
 # CFLAGS and LDFLAGS are for the users to override from the command line.
 
-CFLAGS = -g -O2 -Wall
-LDFLAGS =
+CFLAGS ?= -g -O2 -Wall
+LDFLAGS ?=
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
@@ -172,13 +172,13 @@ GITWEB_SITE_FOOTER =
 
 export prefix bindir gitexecdir sharedir template_dir sysconfdir
 
-CC = gcc
-AR = ar
-TAR = tar
-INSTALL = install
-RPMBUILD = rpmbuild
-TCL_PATH = tclsh
-TCLTK_PATH = wish
+CC ?= gcc
+AR ?= ar
+TAR ?= tar
+INSTALL ?= install
+RPMBUILD ?= rpmbuild
+TCL_PATH ?= tclsh
+TCLTK_PATH ?= wish
 
 export TCL_PATH TCLTK_PATH
 
-- 
1.5.2.1

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

end of thread, other threads:[~2007-06-13  7:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-13  5:42 [PATCH] Teach Makefile to respect external variables: CFLAGS and others Eygene Ryabinkin
2007-06-13  6:07 ` Junio C Hamano
2007-06-13  7:15   ` Eygene Ryabinkin
2007-06-13  7:39     ` Junio C Hamano
2007-06-13  7:53       ` Eygene Ryabinkin
2007-06-13  7:42     ` Matthias Lederhofer
2007-06-13  6:12 ` Sam Ravnborg

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).