git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix cg-version -h by sourcing cg-Xlib
@ 2005-11-15 12:03 Jonas Fonseca
  0 siblings, 0 replies; only message in thread
From: Jonas Fonseca @ 2005-11-15 12:03 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

Also requires cg-version to become a bash script.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
diff --git a/Makefile b/Makefile
index 72d7d12..b18e79f 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ endif
 cg-version: $(VERSION) $(GIT_HEAD) Makefile
 	@echo Generating cg-version...
 	@rm -f $@
-	@echo "#!/bin/sh" > $@
+	@echo "#!/usr/bin/env bash" >> $@
 	@echo "#" >> $@
 	@echo "# Show the version of the Cogito toolkit." >> $@
 	@echo "# Copyright (c) Petr Baudis, 2005" >> $@
@@ -53,6 +53,9 @@ cg-version: $(VERSION) $(GIT_HEAD) Makef
 	@echo "# at the build time." >> $@
 	@echo >> $@
 	@echo "USAGE=\"cg-version\"" >> $@
+	@echo "_git_repo_unneeded=1" >> $@
+	@echo >> $@
+	@echo ". \$${COGITO_LIB}cg-Xlib || exit 1" >> $@
 	@echo >> $@
 	@echo "echo \"$(shell cat $(VERSION))$(GIT_HEAD_ID)\"" >> $@
 	@chmod +x $@
@@ -92,7 +95,7 @@ install-cogito: $(SCRIPT) $(LIB_SCRIPT) 
 	$(INSTALL) -m755 -d $(DESTDIR)$(libdir)
 	$(INSTALL) $(LIB_SCRIPT) $(DESTDIR)$(libdir)
 	cd $(DESTDIR)$(bindir); \
-	for file in $(SCRIPT); do \
+	for file in $(SCRIPT) $(GEN_SCRIPT); do \
 		sed -e 's/\$${COGITO_LIB}/"\$${COGITO_LIB:-$(sedlibdir)\/}"/g' $$file > $$file.new; \
 		cat $$file.new > $$file; rm $$file.new; \
 	done
-- 
Jonas Fonseca

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

only message in thread, other threads:[~2005-11-15 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-15 12:03 [PATCH] Fix cg-version -h by sourcing cg-Xlib 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).