Git development
 help / color / mirror / Atom feed
From: Matt McCutchen <hashproduct@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH] Makefile: rebuild git.o on version change, clean up git$X flags
Date: Mon, 09 Jul 2007 21:30:39 -0400	[thread overview]
Message-ID: <1184031039.14364.11.camel@mattlaptop2> (raw)

Commit 334d28ae factored out git.o as an intermediate stage between
git.c and git$X.  However:

- It left some no-longer-relevant flags in the rule for git$X.

- It failed to replace git$X with git.o in the list of files that
  record GIT_VERSION.  This broke incorporation of a changed
  GIT_VERSION into git$X because, when GIT_VERSION changes, git.o isn't
  remade and git$X is relinked from the git.o that still contains the
  old GIT_VERSION.

This patch removes the irrelevant flags and fixes incorporation of a
changed GIT_VERSION into git$X.

Signed-off-by: Matt McCutchen <hashproduct@gmail.com>
---
Amusingly, I found this because, when I formatted my previous patch for
submission, I noticed that the "-dirty" in the version at the bottom
wouldn't go away even though I had committed my changes to my
git-development repository.  (I was actually using the git tools from
that repository.)

 Makefile |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 5b30e5c..d7541b4 100644
--- a/Makefile
+++ b/Makefile
@@ -753,8 +753,7 @@ git.o: git.c common-cmds.h GIT-CFLAGS
 		$(ALL_CFLAGS) -c $(filter %.c,$^)
 
 git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
-	$(QUIET_LINK)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
-		$(ALL_CFLAGS) -o $@ $(filter %.c,$^) git.o \
+	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
 		$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
 
 help.o: common-cmds.h
@@ -857,7 +856,7 @@ configure: configure.ac
 	rm -f $<+
 
 # These can record GIT_VERSION
-git$X git.spec \
+git.o git.spec \
 	$(patsubst %.sh,%,$(SCRIPT_SH)) \
 	$(patsubst %.perl,%,$(SCRIPT_PERL)) \
 	: GIT-VERSION-FILE
-- 
1.5.3.rc0.83.gb18a6

             reply	other threads:[~2007-07-10  1:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10  1:30 Matt McCutchen [this message]
2007-07-10  1:55 ` [PATCH] Makefile: rebuild git.o on version change, clean up git$X flags Junio C Hamano

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=1184031039.14364.11.camel@mattlaptop2 \
    --to=hashproduct@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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