git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow CFLAGS to be overridden while preserving VERSION
@ 2007-06-02 17:14 James Bowes
  2007-06-02 18:35 ` Jonas Fonseca
  0 siblings, 1 reply; 2+ messages in thread
From: James Bowes @ 2007-06-02 17:14 UTC (permalink / raw)
  To: fonseca, git

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

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

* Re: [PATCH] Allow CFLAGS to be overridden while preserving VERSION
  2007-06-02 17:14 [PATCH] Allow CFLAGS to be overridden while preserving VERSION James Bowes
@ 2007-06-02 18:35 ` Jonas Fonseca
  0 siblings, 0 replies; 2+ messages in thread
From: Jonas Fonseca @ 2007-06-02 18:35 UTC (permalink / raw)
  To: James Bowes; +Cc: git

James Bowes <jbowes@dangerouslyinc.com> wrote Sat, Jun 02, 2007:
> If someone defined their own CFLAGS, they would have to include a -DVERSION=
> as well (or else get unknown-version as the version).

Thank you, applied and pushed out.

-- 
Jonas Fonseca

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

end of thread, other threads:[~2007-06-02 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-02 17:14 [PATCH] Allow CFLAGS to be overridden while preserving VERSION James Bowes
2007-06-02 18:35 ` Jonas Fonseca

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