Meta/Make: teach --dash option

This commit is contained in:
Junio C Hamano
2013-07-19 12:41:51 -07:00
parent 7cc72ca00b
commit 4978109241

30
Make
View File

@@ -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