Re: [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update
Hi, Linus Torvalds wrote: I also don't see why, if OS-X already _does_ include the GNU tools, they couldn't be under /opt/fsf/bin or something like that, and then you could just do PATH=/opt/fsf/bin:$PATH We could prepend /usr/lib/git to $PATH, and symlink them with their real names there. -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED] Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - Go directly to jail. Do not pass Go, do not collect $200. - 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
[PATCH 3/6] git-gnu-progs-Makefile: git Makefile update
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
Re: [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update
Linus Torvalds wrote: On Mon, 11 Jul 2005, Junio C Hamano wrote: I am not yet convinced one variable per GNU program is the right way to do (I do agree it is a problem and I appreciate your trying to solving it; an obvious alternative cop-out would be to fix this in the user's environment, but there might be a saner solution) Yes. As you say, if we do this (and I think it's so ugly that I'm not convinced we want to), it should be done in git-sh-setup-script _once_ instead of editing every single script. Agreed: I was much happier with my cogito implementation where I just put it in cg-Xlib. Is git-sh-setup-script appropriate? At first glance it had a specific purpose and was not included in a large number of files. Most everything includes git-sh-setup-script anyway by now. However, what are the features that break the default apple tools anyway? Maybe we should avoid using them? OSX clearly comes with cp and xargs regardless, what are the flags that don't work with their cruddy versions? xargs -r, cp -l, cp -u, cp -a. Git uses the first 2, cogito uses all 4. Last night, I couldn't think of alternatives to these, but I obviously didn't try very hard. xargs -r can probably happen via a temporary file and cp -u can probably be simulated using rsync. [ Rant mode on: ..and who the hell is the idiot at Apple who includes the old crappy BSD stuff? They already use gcc, so it's totally pointless to have a NIH thing, when the GNU utilities are just _better_. Maybe somebody can ask Apple to get with the program and not live in the dark ages any more. ] It wasn't long ago that the BSD's and Solaris had the same problems. If only Apple is in the dark ages, shame on them. Bryan - 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
Re: [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update
The only user of cp -l in the Linus GIT is git-clone-script local optimization. I could revert it to the version that I originally sent to the list, which uses cpio -pld, if your cpio groks that flag. Those options are in the man page, at least. Bryan - 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
Re: [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update
Bryan Larsen [EMAIL PROTECTED] writes: Last night, I couldn't think of alternatives to these, but I obviously didn't try very hard. xargs -r can probably happen via a temporary file and cp -u can probably be simulated using rsync. The only user of xargs -r in the Linus GIT is git-prune-script which tries not to run rm -f with an empty argument list, like this: git-fsck-cache --cache --unreachable $@ | sed -ne '/unreachable /{ s/unreachable [^ ][^ ]* // s|\(..\)|\1/|p }' | { cd $GIT_OBJECT_DIRECTORY || exit xargs -r $dryrun rm -f } Not tested on a BSD, and it is probably as ugly as it can get, but we could: { echo 'unreachable nosuch/file'; git-fsck-cache --cache --unreachable $@ } | sed -ne '/unreachable /{ s/unreachable [^ ][^ ]* // s|\(..\)|\1/|p }' | { cd $GIT_OBJECT_DIRECTORY || exit xargs $dryrun rm -f } The only user of cp -l in the Linus GIT is git-clone-script local optimization. I could revert it to the version that I originally sent to the list, which uses cpio -pld, if your cpio groks that flag. I do not speak for Pasky, but to me cp -u sounds just like an optimization, so maybe defining CP_U='cp -u' and detect missing support at config time and falling back on the simple cp would be an option? GNU cp -a states that is the same as -dpR (never follow symlinks, preserve link, mode, ownership, and timestamps), so that can be rewritten as a shell function in cg-Xlib that is called say cg_copy_tree, whose implementation runs two tar processes piped together when cp -a is not available. Using a tarpipe unconditionally is also fine. - 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