Update the git 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 |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -51,9 +51,18 @@ PROG=   git-update-cache git-diff-files 
 
 all: $(PROG)
 
-install: $(PROG) $(SCRIPTS)
+config: config.sh
+       ./config.sh
+
+install: $(PROG) $(SCRIPTS) config
        $(INSTALL) -m755 -d $(dest)$(bin)
        $(INSTALL) $(PROG) $(SCRIPTS) $(dest)$(bin)
+       . ./config ; \
+       cd $(dest)$(bin) ; \
+       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
 
 LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
         tag.o date.o index.o diff-delta.o patch-delta.o entry.o path.o \
@@ -190,7 +199,7 @@ test: all
        $(MAKE) -C t/ all
 
 clean:
-       rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)
+       rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(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

Reply via email to