From bec2ee77f78b4bb8a503101091272a634a273a1c Mon Sep 17 00:00:00 2001 From: Vitali Haravy Date: Wed, 5 Nov 2014 23:33:18 +0000 Subject: [PATCH 1/3] Properly escape paths to executables. Fixes #18632. --- configure | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 9eccc2f6e40..b63aeda9762 100755 --- a/configure +++ b/configure @@ -76,6 +76,19 @@ putvar() { printf "%-20s := %s\n" $1 "$T" >>config.tmp } +putpathvar() { + local T + eval T=\$$1 + eval TLEN=\${#$1} + if [ $TLEN -gt 35 ] + then + printf "configure: %-20s := %.35s ...\n" $1 "$T" + else + printf "configure: %-20s := %s %s\n" $1 "$T" "$2" + fi + printf "%-20s := %q\n" $1 "$T" >>config.tmp +} + probe() { local V=$1 shift @@ -101,7 +114,7 @@ probe() { fi done eval $V=\$T - putvar $V "$VER" + putpathvar $V "$VER" } probe_need() { @@ -1330,8 +1343,7 @@ do done # Munge any paths that appear in config.mk back to posix-y -perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' \ - -e 's@\\@/@go;' config.tmp +perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' config.tmp rm -f config.tmp.bak msg From 461945ee9eb2cc596f8b3b099ca2a4c729fba10f Mon Sep 17 00:00:00 2001 From: Vitali Haravy Date: Thu, 6 Nov 2014 11:56:16 +0000 Subject: [PATCH 2/3] Correct building documenation with Pandoc and TeX on Windows. --- configure | 6 +++--- mk/reconfig.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index b63aeda9762..2115b134db3 100755 --- a/configure +++ b/configure @@ -86,7 +86,7 @@ putpathvar() { else printf "configure: %-20s := %s %s\n" $1 "$T" "$2" fi - printf "%-20s := %q\n" $1 "$T" >>config.tmp + printf "%-20s := \"%s\"\n" $1 "$T" >>config.tmp } probe() { @@ -651,9 +651,9 @@ probe CFG_ADB adb if [ ! -z "$CFG_PANDOC" ] then - PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' | + PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc\(.exe\)\? ' | # extract the first 2 version fields, ignore everything else - sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/') + sed 's/pandoc\(.exe\)\? \([0-9]*\)\.\([0-9]*\).*/\2 \3/') MIN_PV_MAJOR="1" MIN_PV_MINOR="9" diff --git a/mk/reconfig.mk b/mk/reconfig.mk index 1d800b54a1f..6c14a885b91 100644 --- a/mk/reconfig.mk +++ b/mk/reconfig.mk @@ -19,7 +19,7 @@ ifndef CFG_DISABLE_MANAGE_SUBMODULES # (nothing checked out at all). `./configure --{llvm,jemalloc}-root` # will explicitly deinitialize the corresponding submodules, and we don't # want to force constant rebuilds in that case. -NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^+') +NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && $(CFG_GIT) submodule status | grep -c '^+') else NEED_GIT_RECONFIG=0 endif From c7a0b9c562dacdedb8dce7ef1bc21d7fca3a87df Mon Sep 17 00:00:00 2001 From: Vitali Haravy Date: Fri, 7 Nov 2014 13:17:11 +0000 Subject: [PATCH 3/3] Do not put double quotes around empty variables. --- configure | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 2115b134db3..77900253014 100755 --- a/configure +++ b/configure @@ -86,7 +86,12 @@ putpathvar() { else printf "configure: %-20s := %s %s\n" $1 "$T" "$2" fi - printf "%-20s := \"%s\"\n" $1 "$T" >>config.tmp + if [ -z "$T" ] + then + printf "%-20s := \n" $1 >>config.tmp + else + printf "%-20s := \"%s\"\n" $1 "$T" >>config.tmp + fi } probe() {