From: James Bowes <jbowes@dangerouslyinc.com>
To: fonseca@diku.dk, git@vger.kernel.org
Subject: [PATCH] Allow CFLAGS to be overridden while preserving VERSION
Date: Sat, 2 Jun 2007 13:14:50 -0400 [thread overview]
Message-ID: <118080449045-git-send-email-jbowes@dangerouslyinc.com> (raw)
If someone defined their own CFLAGS, they would have to include a -DVERSION=
as well (or else get unknown-version as the version).
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
---
Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 61fc86b..91cb097 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ endif
RPM_VERSION = $(subst -,.,$(VERSION))
LDLIBS = -lcurses
-CFLAGS = -Wall -O2 '-DVERSION="$(VERSION)"'
+CFLAGS = -Wall -O2
DFLAGS = -g -DDEBUG -Werror
PROGS = tig
MANDOC = tig.1 tigrc.5
@@ -28,6 +28,8 @@ HTMLDOC = tig.1.html tigrc.5.html manual.html README.html
ALLDOC = $(MANDOC) $(HTMLDOC) manual.html-chunked manual.pdf
TARNAME = tig-$(RPM_VERSION)
+override CFLAGS += '-DVERSION="$(VERSION)"'
+
all: $(PROGS)
all-debug: $(PROGS)
all-debug: CFLAGS += $(DFLAGS)
--
1.5.2.888.g96a5e
next reply other threads:[~2007-06-02 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-02 17:14 James Bowes [this message]
2007-06-02 18:35 ` [PATCH] Allow CFLAGS to be overridden while preserving VERSION Jonas Fonseca
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=118080449045-git-send-email-jbowes@dangerouslyinc.com \
--to=jbowes@dangerouslyinc.com \
--cc=fonseca@diku.dk \
--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 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).