{"thread":{"id":"43308","subject":"Re: bug: git-sh-setup should not be in $PATH","startedAt":"2006-12-06T12:14:27Z","lastAt":"2006-12-07T13:36:37Z","messageCount":17,"participants":["Jakub Narebski","Han-Wen Nienhuys","Andreas Ericsson","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"295375","messageId":"el6c6o$oa7$1@sea.gmane.org","threadId":"43308","inReplyTo":null,"subject":"bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T12:14:27Z","receivedAt":"2006-12-06T12:14:27Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"\nHello,\n\nI often install tools locally so I can run SVN/CVS/etc versions \nin my own account. To do this, I install into\n\n  $HOME/usr/pkg/PACKAGE\n\nand a script that generates scripts in $HOME/usr/bin/ (which is in my $PATH)\nlike\n\n #!/bin/sh\n\n exec /home/lilydev/usr/pkg/git/bin/git-prune \"$@\"\n # generated: update-pkgs \n\n\nthis breaks with git-sh-setup; all sh scripts are broken with this\nsetup.\n\ngit-sh-setup isn't a 'normal' binary, in that it should be called by\nbash only and not run in a subshell. Therefore I propose that it\n\n- be installed in <prefix>/share/git/\n\n- be invoked with an explicit path, i.e.\n\n  . <prefix>/share/git/\n\n\n\n--\n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"295922","messageId":"Pine.LNX.4.63.0612061322140.28348@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"43308","inReplyTo":"el6c6o$oa7$1@sea.gmane.org","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-12-06T12:23:43Z","receivedAt":"2006-12-06T12:23:43Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:\n\n> I often install tools locally so I can run SVN/CVS/etc versions \n> in my own account. To do this, I install into\n> \n>   $HOME/usr/pkg/PACKAGE\n\nWhy not just set\n\n$ export GIT_EXEC_PATH=$HOME/usr/pkg/git\n$ export PATH=$PATH:$GIT_EXEC_PATH\n\n?\n\nCiao,\n"},{"id":"294638","messageId":"4576B8BC.8040107@xs4all.nl","threadId":"43308","inReplyTo":"Pine.LNX.4.63.0612061322140.28348@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T12:34:04Z","receivedAt":"2006-12-06T12:34:04Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Johannes Schindelin escreveu:\n> Hi,\n> \n> On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:\n> \n>> I often install tools locally so I can run SVN/CVS/etc versions \n>> in my own account. To do this, I install into\n>>\n>>   $HOME/usr/pkg/PACKAGE\n> \n> Why not just set\n> \n> $ export GIT_EXEC_PATH=$HOME/usr/pkg/git\n> $ export PATH=$PATH:$GIT_EXEC_PATH\n> \n> ?\n\nBecause it requires brain cycles from my part.  I rather spend those\nconstructively.\n\nGIT is the only package I've seen in a long time that breaks this\nsetup.\n\nHere is the patch that I proposed\n\n\nFrom 988813912c4c7b310c489bfffa1b81e2663b7b6f Mon Sep 17 00:00:00 2001\nFrom: Han-Wen Nienhuys <hanwen@xs4all.nl>\nDate: Wed, 6 Dec 2006 13:27:16 +0100\nSubject: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core.  Call with\nexplicit path.\n\nSigned-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>\n---\n Makefile            |   10 ++++++++--\n git-am.sh           |    2 +-\n git-applymbox.sh    |    2 +-\n git-applypatch.sh   |    2 +-\n git-bisect.sh       |    2 +-\n git-checkout.sh     |    2 +-\n git-clean.sh        |    2 +-\n git-commit.sh       |    2 +-\n git-fetch.sh        |    2 +-\n git-instaweb.sh     |    2 +-\n git-lost-found.sh   |    2 +-\n git-merge.sh        |    2 +-\n git-pull.sh         |    2 +-\n git-quiltimport.sh  |    2 +-\n git-rebase.sh       |    2 +-\n git-repack.sh       |    2 +-\n git-request-pull.sh |    2 +-\n git-reset.sh        |    2 +-\n git-resolve.sh      |    2 +-\n git-revert.sh       |    2 +-\n git-tag.sh          |    2 +-\n git-verify-tag.sh   |    2 +-\n 22 files changed, 29 insertions(+), 23 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a1861de..cb9b745 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -116,8 +116,10 @@ STRIP ?= strip\n \n prefix = $(HOME)\n bindir = $(prefix)/bin\n+datadir = $(prefix)/share\n+GIT_datadir = $(datadir)/git-core\n gitexecdir = $(bindir)\n-template_dir = $(prefix)/share/git-core/templates/\n+template_dir = $(GIT_datadir)/templates/\n # DESTDIR=\n \n # default configuration for gitweb\n@@ -166,7 +168,7 @@ SCRIPT_SH = \\\n \tgit-merge-one-file.sh git-parse-remote.sh \\\n \tgit-pull.sh git-rebase.sh \\\n \tgit-repack.sh git-request-pull.sh git-reset.sh \\\n-\tgit-resolve.sh git-revert.sh git-sh-setup.sh \\\n+\tgit-resolve.sh git-revert.sh \\\n \tgit-tag.sh git-verify-tag.sh \\\n \tgit-applymbox.sh git-applypatch.sh git-am.sh \\\n \tgit-merge.sh git-merge-stupid.sh git-merge-octopus.sh \\\n@@ -550,6 +552,7 @@ endif\n # Shell quote (do not use $(call) to accommodate ancient setups);\n \n SHA1_HEADER_SQ = $(subst ','\\'',$(SHA1_HEADER))\n+GIT_datadir_SQ = $(subst ','\\'',$(GIT_datadir))\n \n DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n bindir_SQ = $(subst ','\\'',$(bindir))\n@@ -604,6 +607,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \\\n \t    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n+\t    -e 's!@@GIT_datadir@@!$(GIT_datadir)!g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n \t    $@.sh >$@+\n \tchmod +x $@+\n@@ -816,6 +820,8 @@ install: all\n \t\t\t'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \\\n \tfi\n \t$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n+\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_datadir_SQ)'\n+\t$(INSTALL) -m755 git-sh-setup.sh '$(DESTDIR_SQ)$(GIT_datadir_SQ)'\n \n install-doc:\n \t$(MAKE) -C Documentation install\ndiff --git a/git-am.sh b/git-am.sh\nindex afe322b..b9dfcf0 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -5,7 +5,7 @@\n USAGE='[--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way]\n   [--interactive] [--whitespace=<option>] <mbox>...\n   or, when resuming [--skip | --resolved]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n git var GIT_COMMITTER_IDENT >/dev/null || exit\n \ndiff --git a/git-applymbox.sh b/git-applymbox.sh\nindex 5569fdc..eaab50d 100755\n--- a/git-applymbox.sh\n+++ b/git-applymbox.sh\n@@ -19,7 +19,7 @@\n ## git-am is supposed to be the newer and better tool for this job.\n \n USAGE='[-u] [-k] [-q] [-m] (-c .dotest/<num> | mbox) [signoff]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n git var GIT_COMMITTER_IDENT >/dev/null || exit\n \ndiff --git a/git-applypatch.sh b/git-applypatch.sh\nindex 8df2aee..7ddf5d3 100755\n--- a/git-applypatch.sh\n+++ b/git-applypatch.sh\n@@ -12,7 +12,7 @@\n ##\n \n USAGE='<msg> <patch> <info> [<signoff>]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n case \"$#\" in 3|4) ;; *) usage ;; esac\n \ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 6da31e8..6fa92e2 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -10,7 +10,7 @@ git bisect visualize            show bisect status in gitk.\n git bisect replay <logfile>\treplay bisection log\n git bisect log\t\t\tshow bisect log.'\n \n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n sq() {\n \t@@PERL@@ -e '\ndiff --git a/git-checkout.sh b/git-checkout.sh\nindex 737abd0..beea113 100755\n--- a/git-checkout.sh\n+++ b/git-checkout.sh\n@@ -2,7 +2,7 @@\n \n USAGE='[-f] [-b <new_branch>] [-m] [<branch>] [<paths>...]'\n SUBDIRECTORY_OK=Sometimes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n old_name=HEAD\n old=$(git-rev-parse --verify $old_name 2>/dev/null)\ndiff --git a/git-clean.sh b/git-clean.sh\nindex 3834323..7a7ce6e 100755\n--- a/git-clean.sh\n+++ b/git-clean.sh\n@@ -13,7 +13,7 @@ LONG_USAGE='Clean untracked files from the working directory\n When optional <paths>... arguments are given, the paths\n affected are further limited to those that match them.'\n SUBDIRECTORY_OK=Yes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n ignored=\n ignoredonly=\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 81c3a0c..5a388f5 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -5,7 +5,7 @@\n \n USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-u] [--amend] [-e] [--author <author>] [[-i | -o] <path>...]'\n SUBDIRECTORY_OK=Yes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n git-rev-parse --verify HEAD >/dev/null 2>&1 || initial_commit=t\n branch=$(GIT_DIR=\"$GIT_DIR\" git-symbolic-ref HEAD)\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 4eecf14..efe44ea 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -2,7 +2,7 @@\n #\n \n USAGE='<fetch-options> <repository> <refspec>...'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n . git-parse-remote\n _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex 16cd351..ae9fbc1 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -6,7 +6,7 @@ USAGE='[--start] [--stop] [--restart]\n   [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>]\n   [--module-path=<path> (for Apache2 only)]'\n \n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n case \"$GIT_DIR\" in\n /*)\ndiff --git a/git-lost-found.sh b/git-lost-found.sh\nindex b928f2c..5f612f2 100755\n--- a/git-lost-found.sh\n+++ b/git-lost-found.sh\n@@ -2,7 +2,7 @@\n \n USAGE=''\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n if [ \"$#\" != \"0\" ]\n then\ndiff --git a/git-merge.sh b/git-merge.sh\nindex 272f004..07ceaf0 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -5,7 +5,7 @@\n \n USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [--reflog-action=<action>] [-m=<merge-message>] <commit>+'\n \n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n LF='\n '\ndiff --git a/git-pull.sh b/git-pull.sh\nindex e23beb6..8c0f292 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -6,7 +6,7 @@\n \n USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [<fetch-options>] <repo> <head>...'\n LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n strategy_args= no_summary= no_commit= squash=\n while case \"$#,$1\" in 0) break ;; *,-*) ;; *) break ;; esac\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nindex 10135da..2f1e7b7 100755\n--- a/git-quiltimport.sh\n+++ b/git-quiltimport.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n USAGE='--dry-run --author <author> --patches </path/to/quilt/patch/directory>'\n SUBDIRECTORY_ON=Yes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n dry_run=\"\"\n quilt_author=\"\"\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 25530df..3220291 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -27,7 +27,7 @@ Example:       git-rebase master~1 topic\n        /                   -->           /\n   D---E---F---G master          D---E---F---G master\n '\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n RESOLVEMSG=\"\n When you have resolved this problem run \\\"git rebase --continue\\\".\ndiff --git a/git-repack.sh b/git-repack.sh\nindex f150a55..e85f0b6 100755\n--- a/git-repack.sh\n+++ b/git-repack.sh\n@@ -5,7 +5,7 @@\n \n USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n no_update_info= all_into_one= remove_redundant=\n local= quiet= no_reuse_delta= extra=\ndiff --git a/git-request-pull.sh b/git-request-pull.sh\nindex 4eacc3a..fd02d55 100755\n--- a/git-request-pull.sh\n+++ b/git-request-pull.sh\n@@ -8,7 +8,7 @@ USAGE='<commit> <url> [<head>]'\n LONG_USAGE='Summarizes the changes since <commit> to the standard output,\n and includes <url> in the message generated.'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n revision=$1\n url=$2\ndiff --git a/git-reset.sh b/git-reset.sh\nindex 3133b5b..9e3dd5b 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n USAGE='[--mixed | --soft | --hard]  [<commit-ish>]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n update=\n reset_type=--mixed\ndiff --git a/git-resolve.sh b/git-resolve.sh\nindex 36b90e3..4c2d7da 100755\n--- a/git-resolve.sh\n+++ b/git-resolve.sh\n@@ -10,7 +10,7 @@ echo 'WARNING: Please use git-merge or git-pull instead.' >&2\n sleep 2\n \n USAGE='<head> <remote> <merge-message>'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n dropheads() {\n \trm -f -- \"$GIT_DIR/MERGE_HEAD\" \\\ndiff --git a/git-revert.sh b/git-revert.sh\nindex 6eab3c7..8a30297 100755\n--- a/git-revert.sh\n+++ b/git-revert.sh\n@@ -18,7 +18,7 @@ case \"$0\" in\n * )\n \tdie \"What are you talking about?\" ;;\n esac\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n no_commit=\n while case \"$#\" in 0) break ;; esac\ndiff --git a/git-tag.sh b/git-tag.sh\nindex d53f94c..a7d6223 100755\n--- a/git-tag.sh\n+++ b/git-tag.sh\n@@ -3,7 +3,7 @@\n \n USAGE='-l [<pattern>] | [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n message_given=\n annotate=\ndiff --git a/git-verify-tag.sh b/git-verify-tag.sh\nindex 36f171b..d265150 100755\n--- a/git-verify-tag.sh\n+++ b/git-verify-tag.sh\n@@ -2,7 +2,7 @@\n \n USAGE='<tag>'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n verbose=\n while case $# in 0) break;; esac\n-- \n1.4.4.1.gc9922-dirty\n\n\n-- \n"},{"id":"297502","messageId":"el6eh6$vg7$2@sea.gmane.org","threadId":"43308","inReplyTo":"4576B8BC.8040107@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-06T12:56:06Z","receivedAt":"2006-12-06T12:56:06Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Han-Wen Nienhuys wrote:\n\n> Subject: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.\n\nI like it... but could you check if you don't need to change\nconfig.mak.in accordingly for ./configure script to generate proper\nconfig.mak.autogen?\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n\n"},{"id":"295213","messageId":"4576D0CB.7090408@xs4all.nl","threadId":"43308","inReplyTo":"el6eh6$vg7$2@sea.gmane.org","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T14:16:43Z","receivedAt":"2006-12-06T14:16:43Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Jakub Narebski escreveu:\n> Han-Wen Nienhuys wrote:\n> \n>> Subject: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.\n> \n> I like it... but could you check if you don't need to change\n> config.mak.in accordingly for ./configure script to generate proper\n> config.mak.autogen?\n\nI couldn't see anything, but while I was looking at it, I also added\nsupport for non-srcdir builds. Can someone with a perl clue look over\nthe braindamaged messing-around with perl/perl.mak  and figure out why\nperl insists\n\nmake -C perl PERL_PATH='/usr/bin/perl' prefix='/tmp/test' perl.mak\nmake[1]: Entering directory `/home/lilydev/vc/go2/perl'\n'/usr/bin/perl' -I/home/lilydev/vc/g2/perl /home/lilydev/vc/g2/perl/Makefile.PL FIRST_MAKEFILE='perl.mak' PREFIX='/tmp/test'\nCould not open 'Git.pm': No such file or directory at /usr/lib/perl5/5.8.8/ExtUtils/MM_Unix.pm line 2649.\n\n\ndespite the -I option?\n\n\nFrom 7bbd698891d9102fa26ae53848c9812f6d1b665e Mon Sep 17 00:00:00 2001\nFrom: Han-Wen Nienhuys <hanwen@lilypond.org>\nDate: Wed, 6 Dec 2006 15:14:08 +0100\nSubject: [PATCH] Allow non-srcdir builds using cd $builddir && $srcdir/configure\n\n\nSigned-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>\n---\n Makefile            |   19 +++++++++++--------\n config.mak.in       |    5 +----\n configure.ac        |   31 ++++++++++++++++++++++++++++++-\n generate-cmdlist.sh |    2 +-\n perl/Makefile       |    2 +-\n 5 files changed, 44 insertions(+), 15 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex cb9b745..d64a5bd 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -97,7 +97,7 @@ all:\n #\n \n GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n-\t@$(SHELL_PATH) ./GIT-VERSION-GEN\n+\t@$(SHELL_PATH) $(srcdir)/GIT-VERSION-GEN\n -include GIT-VERSION-FILE\n \n uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')\n@@ -120,7 +120,10 @@ datadir = $(prefix)/share\n GIT_datadir = $(datadir)/git-core\n gitexecdir = $(bindir)\n template_dir = $(GIT_datadir)/templates/\n-# DESTDIR=\n+srcdir = .\n+\n+# this is usually set on the make command line.\n+DESTDIR=\n \n # default configuration for gitweb\n GITWEB_CONFIG = gitweb_config.perl\n@@ -598,8 +601,8 @@ git-merge-recur$X: git-merge-recursive$X\n $(BUILT_INS): git$X\n \trm -f $@ && ln git$X $@\n \n-common-cmds.h: Documentation/git-*.txt\n-\t./generate-cmdlist.sh > $@+\n+common-cmds.h: $(wildcard $(srcdir)/Documentation/git-*.txt)\n+\t$(srcdir)/generate-cmdlist.sh $(srcdir)/Documentation/ > $@+\n \tmv $@+ $@\n \n $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n@@ -609,7 +612,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's!@@GIT_datadir@@!$(GIT_datadir)!g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n-\t    $@.sh >$@+\n+\t    $^ >$@+\n \tchmod +x $@+\n \tmv $@+ $@\n \n@@ -630,7 +633,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl\n \t    -e '}' \\\n \t    -e 's|@@INSTLIBDIR@@|'\"$$INSTLIBDIR\"'|g' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n-\t    $@.perl >$@+\n+\t    $^ >$@+\n \tchmod +x $@+\n \tmv $@+ $@\n \n@@ -674,7 +677,7 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css\n \t    -e '/@@GITWEB_CGI@@/d' \\\n \t    -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \\\n \t    -e '/@@GITWEB_CSS@@/d' \\\n-\t    $@.sh > $@+\n+\t    $< > $@+\n \tchmod +x $@+\n \tmv $@+ $@\n \n@@ -821,7 +824,7 @@ install: all\n \tfi\n \t$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_datadir_SQ)'\n-\t$(INSTALL) -m755 git-sh-setup.sh '$(DESTDIR_SQ)$(GIT_datadir_SQ)'\n+\t$(INSTALL) -m755 $(srcdir)/git-sh-setup.sh '$(DESTDIR_SQ)$(GIT_datadir_SQ)'\n \n install-doc:\n \t$(MAKE) -C Documentation install\ndiff --git a/config.mak.in b/config.mak.in\nindex 9a57840..902a392 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -2,7 +2,7 @@\n # @configure_input@\n \n CC = @CC@\n-CFLAGS = @CFLAGS@\n+CFLAGS = @CFLAGS@ -I.\n AR = @AR@\n TAR = @TAR@\n #INSTALL = @INSTALL@\t\t# needs install-sh or install.sh in sources\n@@ -10,9 +10,6 @@ TAR = @TAR@\n prefix = @prefix@\n exec_prefix = @exec_prefix@\n bindir = @bindir@\n-#gitexecdir = @libexecdir@/git-core/\n-datarootdir = @datarootdir@\n-template_dir = @datadir@/git-core/templates/\n \n mandir=@mandir@\n \ndiff --git a/configure.ac b/configure.ac\nindex 34e3478..ccf9374 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -5,11 +5,13 @@ AC_PREREQ(2.59)\n AC_INIT([git], [@@GIT_VERSION@@], [git@vger.kernel.org])\n \n AC_CONFIG_SRCDIR([git.c])\n-\n+srcdir=`cd $srcdir && pwd`\n config_file=config.mak.autogen\n config_append=config.mak.append\n config_in=config.mak.in\n \n+\n+\t\n echo \"# ${config_append}.  Generated by configure.\" > \"${config_append}\"\n \n \n@@ -330,10 +332,37 @@ GIT_PARSE_WITH(iconv))\n # change being considered an inode change from the update-cache perspective.\n \n \n+    \n+  \n+\n ## Output files\n AC_CONFIG_FILES([\"${config_file}\":\"${config_in}\":\"${config_append}\"])\n AC_OUTPUT\n \n+\t\n+## generate subdirectories and sub Makefiles. \n+for d in `cd $srcdir &&  find . -type d -print | grep -v '\\.git'` ;\n+do\n+  if test ! -d  $d ; then\n+    echo creating $d \n+    mkdir $d\n+  fi\n+  \n+  if test -f $srcdir/$d/Makefile ; then\n+    \n+    dnl [[]] is to keep m4 happy\n+    depth=`echo $d/ | sed -e 's!^\\./!!g' -e 's![[^/]]*/!../!g'`\n+    echo creating $d/Makefile\n+    cat << EOF > $d/Makefile\n+include ${depth}config.mak.autogen\n+here-srcdir=\\$(srcdir)/$d/\n+VPATH=\\$(here-srcdir)\n+include \\$(here-srcdir)/Makefile\n+EOF\n+\n+  fi \n+done\n+exit 1\n \n ## Cleanup\n rm -f \"${config_append}\"\ndiff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\nindex 5450918..e744fbb 100755\n--- a/generate-cmdlist.sh\n+++ b/generate-cmdlist.sh\n@@ -47,6 +47,6 @@ do\n             x\n             s/.*git-'\"$cmd\"' - \\(.*\\)/  {\"'\"$cmd\"'\", \"\\1\"},/\n \t    p\n-     }' \"Documentation/git-$cmd.txt\"\n+     }' \"$1/git-$cmd.txt\"\n done\n echo \"};\"\ndiff --git a/perl/Makefile b/perl/Makefile\nindex bd483b0..5706095 100644\n--- a/perl/Makefile\n+++ b/perl/Makefile\n@@ -29,7 +29,7 @@ $(makfile): ../GIT-CFLAGS Makefile\n \techo '\techo $(instdir_SQ)' >> $@\n else\n $(makfile): Makefile.PL ../GIT-CFLAGS\n-\t'$(PERL_PATH_SQ)' $< FIRST_MAKEFILE='$@' PREFIX='$(prefix_SQ)'\n+\t'$(PERL_PATH_SQ)' -I$(srcdir)/perl $< FIRST_MAKEFILE='$@' PREFIX='$(prefix_SQ)'\n endif\n \n # this is just added comfort for calling make directly in perl dir\n-- \n1.4.4.1.gc9922-dirty\n\n \n\n\n-- \n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"294673","messageId":"200612061551.51603.jnareb@gmail.com","threadId":"43308","inReplyTo":"4576D0CB.7090408@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-06T14:51:51Z","receivedAt":"2006-12-06T14:51:51Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Han-Wen Nienhuys wrote::\n> Jakub Narebski escreveu:\n>> Han-Wen Nienhuys wrote:\n>> \n>>> Subject: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.\n>> \n>> I like it... but could you check if you don't need to change\n>> config.mak.in accordingly for ./configure script to generate proper\n>> config.mak.autogen?\n> \n> I couldn't see anything, but while I was looking at it, I also added\n> support for non-srcdir builds.\n\n[...]\n> From 7bbd698891d9102fa26ae53848c9812f6d1b665e Mon Sep 17 00:00:00 2001\n> From: Han-Wen Nienhuys <hanwen@lilypond.org>\n> Date: Wed, 6 Dec 2006 15:14:08 +0100\n> Subject: [PATCH] Allow non-srcdir builds using cd $builddir && $srcdir/configure\n\nPlease add some longer commit message.\n\n> Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>\n> ---\n>  Makefile            |   19 +++++++++++--------\n>  config.mak.in       |    5 +----\n>  configure.ac        |   31 ++++++++++++++++++++++++++++++-\n>  generate-cmdlist.sh |    2 +-\n>  perl/Makefile       |    2 +-\n>  5 files changed, 44 insertions(+), 15 deletions(-)\n[...]\n> diff --git a/config.mak.in b/config.mak.in\n> index 9a57840..902a392 100644\n> --- a/config.mak.in\n> +++ b/config.mak.in\n[...]\n> @@ -10,9 +10,6 @@ TAR = @TAR@\n>  prefix = @prefix@\n>  exec_prefix = @exec_prefix@\n>  bindir = @bindir@\n> -#gitexecdir = @libexecdir@/git-core/\n> -datarootdir = @datarootdir@\n> -template_dir = @datadir@/git-core/templates/\n>  \n>  mandir=@mandir@\n\nWhy have you removed setting datarootdir and template_dir? I would\nhave thought that you would rather change it to\n\n  #gitexecdir = @libexecdir@/git-core/\n  datarootdir = @datarootdir@\n  GIT_datadir = @datadir@/git-core/\n  template_dir= @datadir@/git-core/templates/\n  \nin config.mak.in\n\nI have been told that setting 'datarootdir' is required to avoid\nwarnings with new versions of autoconf.\n\n> diff --git a/configure.ac b/configure.ac\n> index 34e3478..ccf9374 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -5,11 +5,13 @@ AC_PREREQ(2.59)\n>  AC_INIT([git], [@@GIT_VERSION@@], [git@vger.kernel.org])\n>  \n>  AC_CONFIG_SRCDIR([git.c])\n> -\n> +srcdir=`cd $srcdir && pwd`\n>  config_file=config.mak.autogen\n>  config_append=config.mak.append\n\nAC_CONFIG_SRCDIR should set 'srcdir' correctly.\n\n> @@ -330,10 +332,37 @@ GIT_PARSE_WITH(iconv))\n[...]\n> +## generate subdirectories and sub Makefiles. \n> +for d in `cd $srcdir &&  find . -type d -print | grep -v '\\.git'` ;\n> +do\n> +  if test ! -d  $d ; then\n> +    echo creating $d \n> +    mkdir $d\n> +  fi\n> +  \n> +  if test -f $srcdir/$d/Makefile ; then\n> +    \n> +    dnl [[]] is to keep m4 happy\n> +    depth=`echo $d/ | sed -e 's!^\\./!!g' -e 's![[^/]]*/!../!g'`\n> +    echo creating $d/Makefile\n> +    cat << EOF > $d/Makefile\n> +include ${depth}config.mak.autogen\n> +here-srcdir=\\$(srcdir)/$d/\n> +VPATH=\\$(here-srcdir)\n> +include \\$(here-srcdir)/Makefile\n> +EOF\n> +\n> +  fi \n> +done\n> +exit 1\n\nWhat is this for? The ./configure script, generated by autoconf from\nconfigure.ac (by \"make configure\"), generates config.mak.autogen file\nfrom config.mak.in, which is included in main (top) Makefile.\n\nThe variables defined in config.mak.autogen are of course visible in\nmake in subdirectories (make invoked from main makefile). Why the change?\nWhat about user-generated config.mak?\n\nThis part IMHO has no sense, and has no place here.\n-- \nJakub Narebski\n"},{"id":"295522","messageId":"4576DBA5.4080002@xs4all.nl","threadId":"43308","inReplyTo":"200612061551.51603.jnareb@gmail.com","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T15:03:01Z","receivedAt":"2006-12-06T15:03:01Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Jakub Narebski escreveu:\n> Please add some longer commit message.\n\ndo you have any specifics you would like me to mention?\n\n>>  exec_prefix = @exec_prefix@\n>>  bindir = @bindir@\n>> -#gitexecdir = @libexecdir@/git-core/\n>> -datarootdir = @datarootdir@\n>> -template_dir = @datadir@/git-core/templates/\n>>  \n>>  mandir=@mandir@\n> \n> Why have you removed setting datarootdir and template_dir? I would\n> have thought that you would rather change it to\n> \n>   #gitexecdir = @libexecdir@/git-core/\n>   datarootdir = @datarootdir@\n>   GIT_datadir = @datadir@/git-core/\n>   template_dir= @datadir@/git-core/templates/\n\nThe Makefile already has this code, so adding it here is duplication of work\nand code.\n\nIf you think putting code in the generated file is a good idea, I\npropose we just generate the entire Makefile, as is the standard usage\nfor autoconf.\n\n>> +## generate subdirectories and sub Makefiles. \n>> +for d in `cd $srcdir &&  find . -type d -print | grep -v '\\.git'` ;\n>> +do\n>> +  if test ! -d  $d ; then\n>> +    echo creating $d \n>> +    mkdir $d\n>> +  fi\n>> +  \n>> +  if test -f $srcdir/$d/Makefile ; then\n>> +    \n>> +    dnl [[]] is to keep m4 happy\n>> +    depth=`echo $d/ | sed -e 's!^\\./!!g' -e 's![[^/]]*/!../!g'`\n>> +    echo creating $d/Makefile\n>> +    cat << EOF > $d/Makefile\n>> +include ${depth}config.mak.autogen\n>> +here-srcdir=\\$(srcdir)/$d/\n>> +VPATH=\\$(here-srcdir)\n>> +include \\$(here-srcdir)/Makefile\n>> +EOF\n>> +\n>> +  fi \n>> +done\n>> +exit 1\n> \n> What is this for? The ./configure script, generated by autoconf from\n> configure.ac (by \"make configure\"), generates config.mak.autogen file\n> from config.mak.in, which is included in main (top) Makefile.\n\nin some cases, the files can also be called stand alone, eg.\n\n  [lilydev@haring perl]$ pwd\n  /home/lilydev/vc/git/perl\n\n  [lilydev@haring perl]$ make\n  make -f perl.mak all\n  make[1]: Entering directory `/home/lilydev/vc/git/perl'\n  make[1]: Leaving directory `/home/lilydev/vc/git/perl'\n\nThe above Makefile generation makes sure that this behavior is\nmirrored in the builddir. Also, I'm not sure if the vpath settings get\nexported automatically.\n\nHaving multiple Makefiles in the builddir is the standard behavior for\nautotool'ed packages. \n\n> The variables defined in config.mak.autogen are of course visible in\n> make in subdirectories (make invoked from main makefile). Why the change?\n> What about user-generated config.mak?\n\ngood point. I'll include it too.\n\n> This part IMHO has no sense, and has no place here.\n\n\n-- \n"},{"id":"297939","messageId":"200612061627.40359.jnareb@gmail.com","threadId":"43308","inReplyTo":"4576DBA5.4080002@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-06T15:27:40Z","receivedAt":"2006-12-06T15:27:40Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Han-Wen Nienhuys wrote:\n> Jakub Narebski escreveu:\n> \n>> Please add some longer commit message.\n> \n> do you have any specifics you would like me to mention?\n\nMore detailed description what \"Allow non-srcdir builds using cd\n$builddir && $srcdir/configure\" mean and why we might want to do that.\n\nFor example:\n\n  We might want to build git from outside source directory. For this we\n  need...\n\nBy the way, I think this patch is about _two_ changes. Allow to build\noutside source directory, by providing srcdir AND separate change to\nallow builds of separate parts of git, with separate Makefile, to\ninclude user-generated configuration file config.mak and ./configure\ngenerated config.mak.autogen configuration file.\n\nShouldn't this patch be split into two?\n\n>>>  exec_prefix = @exec_prefix@\n>>>  bindir = @bindir@\n>>> -#gitexecdir = @libexecdir@/git-core/\n>>> -datarootdir = @datarootdir@\n>>> -template_dir = @datadir@/git-core/templates/\n>>>  \n>>>  mandir=@mandir@\n>> \n>> Why have you removed setting datarootdir and template_dir? I would\n>> have thought that you would rather change it to\n>> \n>>   #gitexecdir = @libexecdir@/git-core/\n>>   datarootdir = @datarootdir@\n>>   GIT_datadir = @datadir@/git-core/\n>>   template_dir= @datadir@/git-core/templates/\n> \n> The Makefile already has this code, so adding it here is duplication\n> of work and code.\n\nGood call. Well, at least now, when ./configure script doesn't provide\nmeans to change template_dir etc. from command line, via options.\n\nStill I think that at least\n\n  datarootdir = @datarootdir@\n\nshould be not removed.\n\n> If you think putting code in the generated file is a good idea, I\n> propose we just generate the entire Makefile, as is the standard usage\n> for autoconf.\n\nThe stance on autoconf is that it has to be _optional_ part of\ncompilation. And I think it does good job of this.\n\n>>> +## generate subdirectories and sub Makefiles. \n>>> +for d in `cd $srcdir &&  find . -type d -print | grep -v '\\.git'` ;\n>>> +do\n>>> +  if test ! -d  $d ; then\n>>> +    echo creating $d \n>>> +    mkdir $d\n>>> +  fi\n>>> +  \n>>> +  if test -f $srcdir/$d/Makefile ; then\n>>> +    \n>>> +    dnl [[]] is to keep m4 happy\n>>> +    depth=`echo $d/ | sed -e 's!^\\./!!g' -e 's![[^/]]*/!../!g'`\n>>> +    echo creating $d/Makefile\n>>> +    cat << EOF> $d/Makefile\n>>> +include ${depth}config.mak.autogen\n>>> +here-srcdir=\\$(srcdir)/$d/\n>>> +VPATH=\\$(here-srcdir)\n>>> +include \\$(here-srcdir)/Makefile\n>>> +EOF\n>>> +\n>>> +  fi \n>>> +done\n>>> +exit 1\n>> \n>> What is this for? The ./configure script, generated by autoconf from\n>> configure.ac (by \"make configure\"), generates config.mak.autogen file\n>> from config.mak.in, which is included in main (top) Makefile.\n> \n> in some cases, the files can also be called stand alone, eg.\n> \n>   [lilydev@haring perl]$ pwd\n>   /home/lilydev/vc/git/perl\n> \n>   [lilydev@haring perl]$ make\n>   make -f perl.mak all\n>   make[1]: Entering directory `/home/lilydev/vc/git/perl'\n>   make[1]: Leaving directory `/home/lilydev/vc/git/perl'\n> \n> The above Makefile generation makes sure that this behavior is\n> mirrored in the builddir. Also, I'm not sure if the vpath settings get\n> exported automatically.\n> \n> Having multiple Makefiles in the builddir is the standard behavior for\n> autotool'ed packages. \n\nGit is not autotool'ed package. Autoconf is used only for _optional_\ncompile and installation configuration.\n\n>> The variables defined in config.mak.autogen are of course visible in\n>> make in subdirectories (make invoked from main makefile). Why the\n>> change? What about user-generated config.mak?\n> \n> good point. I'll include it too.\n> \n>> This part IMHO has no sense, and has no place here.\n\nIf you want to create or modify Makefiles, do that. Not generate\n\"minimal\" Makefiles in every and each subdirectory.\n\nYou would be able to compile git fully only from top directory. So what?\n-- \nJakub Narebski\n"},{"id":"298272","messageId":"4576E38F.1020404@xs4all.nl","threadId":"43308","inReplyTo":"200612061627.40359.jnareb@gmail.com","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T15:36:47Z","receivedAt":"2006-12-06T15:36:47Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Jakub Narebski escreveu:\n> Still I think that at least\n> \n>   datarootdir = @datarootdir@\n> \n> should be not removed.\n\nyes, agreed.\n\n>>>> +  if test -f $srcdir/$d/Makefile ; then\n  [..]\n>>>> +    echo creating $d/Makefile\n>>>> +    cat << EOF> $d/Makefile\n\n>>> This part IMHO has no sense, and has no place here.\n> \n> If you want to create or modify Makefiles, do that. Not generate\n> \"minimal\" Makefiles in every and each subdirectory.\n\nLook more closely at the patch. It only generates Makefiles in \ndirectories that have makefiles in the source dir. The makefiles are\nshort because that is the easiest to do.\n\nI'm happy to amend the patch, bUt I can't properly test\nit until the perl problem gets sorted out. \n\n-- \n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"295100","messageId":"200612061656.55888.jnareb@gmail.com","threadId":"43308","inReplyTo":"4576E38F.1020404@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-06T15:56:55Z","receivedAt":"2006-12-06T15:56:55Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dnia środa 6. grudnia 2006 16:36, Han-Wen Nienhuys napisał:\n> Jakub Narebski escreveu:\n[...]\n>>>>> +  if test -f $srcdir/$d/Makefile ; then\n>   [..]\n>>>>> +    echo creating $d/Makefile\n>>>>> +    cat << EOF> $d/Makefile\n> \n>>>> This part IMHO has no sense, and has no place here.\n>> \n>> If you want to create or modify Makefiles, do that. Not generate\n>> \"minimal\" Makefiles in every and each subdirectory.\n> \n> Look more closely at the patch. It only generates Makefiles in \n> directories that have makefiles in the source dir. The makefiles are\n> short because that is the easiest to do.\n\nThe fact that I didn't understood what this part of patch is meant\nto do should be the big hint that this commit needs some longer commit\nmessage explaining purpose of such mess.\n\nI still don't understand what this part do (and how come it is\nin configure.ac which should be _only_ about generating \nconfig.mak.autogen Makefile configuration file and _not_ about\ngenerating Makefiles). You want what sequence of commands to work?\n\n  $ $srcdir/configure --srcdir=$srcdir\n  $ make -D $srcdir\n  $ make -D $srcdir DESTDIR=$DESTDIR install\n\nor what? Why this part is needed?\n\nOnce again: git is NOT autotool'ed project. And shouldn't be.\n\n> I'm happy to amend the patch, but I can't properly test\n> it until the perl problem gets sorted out. \n\nI'll be waiting.\n\n-- \nJakub Narebski\n"},{"id":"298532","messageId":"4576E9DF.5090709@xs4all.nl","threadId":"43308","inReplyTo":"200612061656.55888.jnareb@gmail.com","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T16:03:43Z","receivedAt":"2006-12-06T16:03:43Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Jakub Narebski escreveu:\n> The fact that I didn't understood what this part of patch is meant\n> to do should be the big hint that this commit needs some longer commit\n> message explaining purpose of such mess.\n> \n> I still don't understand what this part do (and how come it is\n> in configure.ac which should be _only_ about generating \n> config.mak.autogen Makefile configuration file and _not_ about\n> generating Makefiles). You want what sequence of commands to work?\n> \n>   $ $srcdir/configure --srcdir=$srcdir\n>   $ make -D $srcdir\n>   $ make -D $srcdir DESTDIR=$DESTDIR install\n\nmake -D doesn't exist.\n\nThis is about \n\n  mkdir git-build\n  cd git-build\n  $my_git_source/configure  \n  make \n\nthis _was_ actually documented in that one-line commit message, that\nyou found to be too short.\n\nSince git does recursive makes, among others in \n\n perl/ \n Documentation/\n templates/\n contrib/\n  \nthere should be Makefiles in said directories. Otherwise, every rule\nin the toplevel Makefile saying\n\n\n  $(MAKE) -C subdir/\n\nwill fail because $builddir/ does not have a Makefile in\n$builddir/subdir.\n\nThe part you don't understand is a generic way of duplicating the\nMakefiles from the git sources, while making sure that they work when\n$srcdir != $builddir\n\n\nYes, if builddir != srcdir , then configure is about more than\ngenerating config.mak.autogen\n\n\n-- \n"},{"id":"296203","messageId":"200612061727.54058.jnareb@gmail.com","threadId":"43308","inReplyTo":"4576E9DF.5090709@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-06T16:27:53Z","receivedAt":"2006-12-06T16:27:53Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dnia środa 6. grudnia 2006 17:03, Han-Wen Nienhuys napisał:\n\n> Jakub Narebski escreveu:\n>\n>> The fact that I didn't understood what this part of patch is meant\n>> to do should be the big hint that this commit needs some longer commit\n>> message explaining purpose of such mess.\n>> \n>> I still don't understand what this part do (and how come it is\n>> in configure.ac which should be _only_ about generating \n>> config.mak.autogen Makefile configuration file and _not_ about\n>> generating Makefiles). You want what sequence of commands to work?\n>> \n>>   $ $srcdir/configure --srcdir=$srcdir\n>>   $ make -D $srcdir\n>>   $ make -D $srcdir DESTDIR=$DESTDIR install\n> \n> make -D doesn't exist.\n\nOops. I meant make -C, not make -D.\n\n> This is about \n> \n>   mkdir git-build\n>   cd git-build\n>   $my_git_source/configure  \n>   make \n> \n> this _was_ actually documented in that one-line commit message, that\n> you found to be too short.\n\nBecause it was so short (one line) while being long for one line.\nWhy don't you write above in commit message?\n\n> Since git does recursive makes, among others in \n> \n>  perl/ \n>  Documentation/\n>  templates/\n>  contrib/\n>   \n> there should be Makefiles in said directories. Otherwise, every rule\n> in the toplevel Makefile saying\n> \n> \n>   $(MAKE) -C subdir/\n> \n> will fail because $builddir/ does not have a Makefile in\n> $builddir/subdir.\n\nWouldn't it be better just to modify toplevel Makefile to say:\n\n   $(MAKE) -C $(srcdir)/subdir/\n\nwithout messing with ./configure script, and creating \"redirect\"\nMakefiles?\n\n> The part you don't understand is a generic way of duplicating the\n> Makefiles from the git sources, while making sure that they work when\n> $srcdir != $builddir\n> \n> \n> Yes, if builddir != srcdir , then configure is about more than\n> generating config.mak.autogen\n\nOnce again: git is not autotool'ed project. Everything you want to\ndo should work regardless if you would run ./configure, or if you\nwould hand-craft config.mak file.\n\n-- \nJakub Narebski\n"},{"id":"294495","messageId":"4576F29B.6010105@xs4all.nl","threadId":"43308","inReplyTo":"200612061727.54058.jnareb@gmail.com","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T16:40:59Z","receivedAt":"2006-12-06T16:40:59Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Jakub Narebski escreveu:\n>> there should be Makefiles in said directories. Otherwise, every rule\n>> in the toplevel Makefile saying\n>>\n>>\n>>   $(MAKE) -C subdir/\n>>\n>> will fail because $builddir/ does not have a Makefile in\n>> $builddir/subdir.\n> \n> Wouldn't it be better just to modify toplevel Makefile to say:\n> \n>    $(MAKE) -C $(srcdir)/subdir/\n> \n> without messing with ./configure script, and creating \"redirect\"\n> Makefiles?\n> \n\nthat doesn't work.\n\n  make -C foo bla\n\njust does \n\n  (cd foo && make bla)\n\nIf you did this, part of the object files would end up in the source dir; \nThe idea of separate srcdir builds,is to keep the srcdir completely clean \nof generated files.  That can't really be done without aid of a script,\nto setup the builddir. In this case that is the configure script.\n\nI did forget to add a check \n\n  if \"$srcdir\" != \".\" ; then\n    ..\n  fi\n\naround the messy stuff.\n\n\n\n-- \n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"298340","messageId":"200612061752.39443.jnareb@gmail.com","threadId":"43308","inReplyTo":"4576F29B.6010105@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-06T16:52:39Z","receivedAt":"2006-12-06T16:52:39Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Han-Wen Nienhuys wrote:\n> Jakub Narebski escreveu:\n\n>>> there should be Makefiles in said directories. Otherwise, every rule\n>>> in the toplevel Makefile saying\n>>>\n>>>\n>>>   $(MAKE) -C subdir/\n>>>\n>>> will fail because $builddir/ does not have a Makefile in\n>>> $builddir/subdir.\n>> \n>> Wouldn't it be better just to modify toplevel Makefile to say:\n>> \n>>    $(MAKE) -C $(srcdir)/subdir/\n>> \n>> without messing with ./configure script, and creating \"redirect\"\n>> Makefiles?\n>> \n> \n> that doesn't work.\n> \n>   make -C foo bla\n> \n> just does \n> \n>   (cd foo && make bla)\n> \n> If you did this, part of the object files would end up in the source dir; \n> The idea of separate srcdir builds,is to keep the srcdir completely clean \n> of generated files.  That can't really be done without aid of a script,\n> to setup the builddir. In this case that is the configure script.\n\nThanks for an explanation. At least some of it should be in commit\nmessage, to explain what you want the patch to do.\n\nI don't know autotools enough to check if autotools (autoconf) doesn't\nhave it's own way to do this, some autoconf macro, to not need to write\nthis script creating redirect Makefiles.\n\nI'm still not sure if this has place in git. Is it really common to\nsupport building outside source directory? If git didn't support this,\nso what?\n-- \nJakub Narebski\n"},{"id":"296175","messageId":"4576F65A.6010707@xs4all.nl","threadId":"43308","inReplyTo":"200612061752.39443.jnareb@gmail.com","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-06T16:56:58Z","receivedAt":"2006-12-06T16:56:58Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Jakub Narebski escreveu:\n> I'm still not sure if this has place in git. Is it really common to\n> support building outside source directory? If git didn't support this,\n> so what?\n\nlots of serious tools support it, as it this comes automatically\nwhen using automake. Eg. emacs, gcc, make, pango, lilypond, etc etc. \n\nIt's a quite standard feature ; you should be asking why git \nshouldn't support it.\n\nAnother option is to make a special solution based on makefiles, so \nmake is run inside the srcdir, but output shunted output to a \nseparate objects/ subdirectory.  However, it's more work, and less \nstandardized.\n\n-- \n"},{"id":"294294","messageId":"200612061811.29296.jnareb@gmail.com","threadId":"43308","inReplyTo":"4576F65A.6010707@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-06T17:11:28Z","receivedAt":"2006-12-06T17:11:28Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dnia środa 6. grudnia 2006 17:56, Han-Wen Nienhuys napisał:\n> Jakub Narebski escreveu:\n>\n>> I'm still not sure if this has place in git. Is it really common to\n>> support building outside source directory? If git didn't support this,\n>> so what?\n> \n> lots of serious tools support it, as it this comes automatically\n> when using automake. Eg. emacs, gcc, make, pango, lilypond, etc etc. \n> \n> It's a quite standard feature ; you should be asking why git \n> shouldn't support it.\n\nBecause git is not autotool'ed project. And people protested vehemently\nagainst adding yet another dependency. So from the whole autotools suite\nonly autoconf is used, and only to generate config.mak.autogen Makefile\nconfiguration, which otherwise would be needed to be generated by hand.\n\nBTW git tries to guess configuration based on uname -a result.\n\nThere was also for a little while hand-generated configure script, but\nit got abandoned when it appeared that it is hard to be portable (and\nautoconf did the work; perhaps too hard but did, not using features\nwhich weren't common but now are in standard, but did), and the fact\nthat it was possible to have _optional_ autoconf support.\n \nAdd to that the fact that people said that ./configure on Cygwin is slow\n(can be slow), so they prefer _not_ to run this.\n\n\nBesides, the fact that some tools suport some feature is not the reason\nto add it. You have to look at how often is this feature _used_. For\nexample you don't need it (you need only DESTDIR support) for creating\nRPMS from sources.\n\n-- \nJakub Narebski\n"},{"id":"295571","messageId":"457818E5.5010008@op5.se","threadId":"43308","inReplyTo":"4576E9DF.5090709@xs4all.nl","subject":"Re: bug: git-sh-setup should not be in $PATH","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-12-07T13:36:37Z","receivedAt":"2006-12-07T13:36:37Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Han-Wen Nienhuys wrote:\n> Since git does recursive makes, among others in \n> \n>  perl/ \n>  Documentation/\n>  templates/\n>  contrib/\n>   \n> there should be Makefiles in said directories. Otherwise, every rule\n> in the toplevel Makefile saying\n> \n> \n>   $(MAKE) -C subdir/\n> \n> will fail because $builddir/ does not have a Makefile in\n> $builddir/subdir.\n> \n\nThis part should have been in the commit message, possibly without the \n\"among others ... (examples)\" and possibly with an added \"This patch \nmakes it so by letting fnurg create them through smurfing the frotz\".\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\n"}]}