git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile uses installed commit-id
@ 2005-04-19 17:28 Pavel Roskin
  0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2005-04-19 17:28 UTC (permalink / raw)
  To: git

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-19 17:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-19 17:28 [PATCH] Makefile uses installed commit-id Pavel Roskin

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