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 <[EMAIL PROTECTED]>
---
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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html