git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] Makefile: installing git in cygwin 1.7.0

From
Eric Blake <ebb9@byu.net>
Date
Apr 28, 2009, 12:28 UTC
Message-ID
<1240921712-3100-2-git-send-email-ebb9@byu.net>
In-Reply-To
<1240921712-3100-1-git-send-email-ebb9@byu.net>

On platforms with $X, make removes any leftover scripts 'a' from earlier builds if a new binary 'a.exe' is now built. However, on cygwin 1.7.0, 'git' and 'git.exe' now consistently name the same file. Test for file equality before attempting a remove, in order to avoid nuking just-built binaries.

This repeats commit 0d768f7 for the installation destdir.
Signed-off-by: Eric Blake <ebb9@byu.net>
---

This should be a trivial approval, seeing as how it finishes the job of a previous patch (but this time for the installation dir, as opposed to the build dir). Without it, programs like git-var get nuked during 'make install', giving a broken installation.

 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 5c8e83a..93ca0db 100644
--- a/Makefile
+++ b/Makefile
@@ -1545,7 +1545,7 @@ ifndef NO_TCLTK
 	$(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install
 endif
 ifneq (,$X)
-	$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
+	$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
 endif
 	bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
 	execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
-- 
1.6.3.rc3.2.g4b51
Previous: Eric BlakeNext: Eric Blake
Message 2 of 4 in “fix some make issues”
  1. 0/2 fix some make issuesEric Blake, Apr 28, 2009
  2. 1/2 Makefile: installing git in cygwin 1.7.0Eric Blake, Apr 28, 2009
  3. 2/2 doc: consistently use ASCIIDOC_EXTRAEric Blake, Apr 28, 2009
  4. Junio C HamanoApr 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.