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

[PATCH] Makefile uses installed commit-id

From
PRPavel Roskin <proski@gnu.org>
Date
Apr 19, 2005, 17:28 UTC
Message-ID
<1113931718.3793.8.camel@dv>
Hello!

Current git-pasky cannot be compiled properly unless it's already installed. The rule for creating gitversion.sh requires commit-id in the PATH, which won't be there until "make install" is run.

Also, commit-id runs gitXnormid.sh, which in turn runs cat-file. All of them should be from the current directory to avoid the requirement that git is installed before gitversion.sh is generated.

This patch adds "." to PATH when running commit-id. The patch is against current git-pasky.

Signed-off-by: Pavel Roskin <proski@gnu.org>
--- a/Makefile
+++ b/Makefile
@@ -46,11 +46,11 @@ $(LIB_FILE): $(LIB_OBJS)
 
 %.o: $(LIB_H)
 
-gitversion.sh: $(VERSION)
+gitversion.sh: $(VERSION) commit-id
 	@echo Generating gitversion.sh...
 	@rm -f $@
 	@echo "#!/bin/sh" > $@
-	@echo "echo \"$(shell cat $(VERSION)) ($(shell commit-id))\"" >> $@
+	@echo "echo \"$(shell cat $(VERSION)) ($(shell PATH=.:$$PATH ./commit-id))\"" >> $@
 	@chmod +x $@
 
 install: $(PROG) $(GEN_SCRIPT)
-- 
Regards,
Pavel Roskin
Message 1 of 1 in “Makefile uses installed commit-id”
  1. Makefile uses installed commit-idPavel Roskin, Apr 19, 2005

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.