From: Eygene Ryabinkin <rea-git@codelabs.ru>
To: git@vger.kernel.org
Subject: [PATCH] Teach Makefile to respect external variables: CFLAGS and others.
Date: Wed, 13 Jun 2007 09:42:30 +0400 [thread overview]
Message-ID: <20070613054229.GM86872@void.codelabs.ru> (raw)
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
next reply other threads:[~2007-06-13 6:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 5:42 Eygene Ryabinkin [this message]
2007-06-13 6:07 ` [PATCH] Teach Makefile to respect external variables: CFLAGS and others 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070613054229.GM86872@void.codelabs.ru \
--to=rea-git@codelabs.ru \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.