From: Bryan Larsen Date: Mon, 11 Jul 2005 10:15:25 GMT Subject: [PATCH 5/6] cogito-gnu-progs-Makefile: cogito Makefile update Message-ID: <20050711101517.10318.5359.sendpatchset@bryan-larsens-ibook-g4.local> In-Reply-To: <20050711101417.10318.64006.sendpatchset@bryan-larsens-ibook-g4.local> Update the cogito Makefile to put the results of config.sh into the scripts. config.sh searches for gnu utilities cp, stat, date and xargs. Signed-off-by: Bryan Larsen --- Makefile | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -195,11 +195,20 @@ sedlibdir=$(shell echo $(libdir) | sed ' .PHONY: install install-git install-cogito install: install-git install-cogito -install-git: $(PROG) $(SCRIPTS) +config: config.sh + ./config.sh + +install-git: $(PROG) $(SCRIPTS) config $(INSTALL) -m755 -d $(DESTDIR)$(bindir) $(INSTALL) $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir) + . ./config ; \ + cd $(DESTDIR)$(bindir) ;\ + for file in $(SCRIPTS); do \ + sed -e "s/DATE\=date/DATE=$${DATE}/" -e "s/CP\=cp/CP=$${CP}/" -e "s/XARGS\=xargs/XARGS=$${XARGS}/" -e "s/STAT\=stat/STAT=$${STAT}/" $$file > $$file.new; \ + cat $$file.new > $$file; rm $$file.new; \ + done -install-cogito: $(SCRIPT) $(LIB_SCRIPT) $(GEN_SCRIPT) +install-cogito: $(SCRIPT) $(LIB_SCRIPT) $(GEN_SCRIPT) config $(INSTALL) -m755 -d $(DESTDIR)$(bindir) $(INSTALL) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir) rm -f $(DESTDIR)$(bindir)/cg-cancel @@ -211,9 +220,10 @@ install-cogito: $(SCRIPT) $(LIB_SCRIPT) sed -e 's/\$${COGITO_LIB}/\$${COGITO_LIB:-$(sedlibdir)\/}/g' $$file > $$file.new; \ cat $$file.new > $$file; rm $$file.new; \ done + . ./config ; \ cd $(DESTDIR)$(libdir); \ for file in $(LIB_SCRIPT); do \ - sed -e 's/\$${COGITO_LIB}/\$${COGITO_LIB:-$(sedlibdir)\/}/g' $$file > $$file.new; \ + sed -e 's/\$${COGITO_LIB}/\$${COGITO_LIB:-$(sedlibdir)\/}/g' -e "s/DATE\=date/DATE=$${DATE}/" -e "s/CP\=cp/CP=$${CP}/" -e "s/XARGS\=xargs/XARGS=$${XARGS}/" -e "s/STAT\=stat/STAT=$${STAT}/" $$file > $$file.new; \ cat $$file.new > $$file; rm $$file.new; \ done @@ -232,7 +242,7 @@ dist: cogito.spec gzip -9 $(tarname).tar clean: - rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE) + rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE) config $(MAKE) -C Documentation/ clean backup: clean