From: Junio C Hamano Date: Fri, 19 Jul 2013 19:41:51 +0000 (-0700) Subject: Meta/Make: teach --dash option X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4978109241a45392e1b89925341dae3ef0cd92eb;p=thirdparty%2Fgit.git Meta/Make: teach --dash option --- diff --git a/Make b/Make index 6d82012b3f..0e40505817 100755 --- a/Make +++ b/Make @@ -57,7 +57,7 @@ do done Wall="-Wall -Wdeclaration-after-statement -Wno-format-zero-length${Wall+ $Wall}" -tests= jobs= skip= oldtest= +tests= jobs= skip= oldtest= with_dash= case `uname` in OpenBSD) @@ -145,6 +145,9 @@ do done | tr '\012' ' ' ) ;; + --dash) + with_dash=y + ;; --) shift break @@ -160,6 +163,8 @@ do shift done +test -f /bin/dash || with_dash= + if test -z "$tests" && test -n "$skip" then GIT_SKIP_TESTS="${GIT_SKIP_TESTS:-$skip}" @@ -189,16 +194,21 @@ snap) *) prefix="$inst_prefix/git-test" ;; esac -d="prefix=$prefix" determine_long_version >version -d="$d "' -MAN_BASE_URL="http://www.kernel.org/pub/software/scm/git/docs/" -ASCIIDOC_NO_ROFF=YesPlease -ASCIIDOC8=YesPlease -BLK_SHA1=YesPlease -GNU_ROFF=YesPlease' +set "prefix=$prefix" "$@" +if test -n "$with_dash" && test -f /bin/dash +then + set "SHELL_PATH=/bin/dash" "$@" +fi + +set MAN_BASE_URL='"http://www.kernel.org/pub/software/scm/git/docs/"' \ + ASCIIDOC_NO_ROFF=YesPlease \ + ASCIIDOC8=YesPlease \ + BLK_SHA1=YesPlease \ + GNU_ROFF=YesPlease \ + "$@" # Platform hack if test -z "${make:+set}" && { @@ -221,11 +231,11 @@ then unset OK_TO_USE_CFLAGS fi -${make-make} $d \ +${make-make} \ + $jobs \ ETC_GITCONFIG=$prefix/etc/gitconfig \ ${OK_TO_USE_CFLAGS+"CFLAGS=$CFLAGS"} \ ${tests:+"T=$tests"} \ - $jobs \ "$@" status=$? rm -f version