Port over bug 779922 to comm-central to fix check-sync-dirs.py failures.
authorSiddharth Agarwal <sid.bugzilla@gmail.com>
Tue, 07 Aug 2012 22:57:04 +0530
changeset 11938 106fe68e2fae0368350be9dd5c1e7e7df5a1d476
parent 11937 42b6de505bcd089e8eab9719c25a175518e3889c
child 11939 257cee32096751efe28e94e615ec6be4606bed3c
push id681
push userbugzilla@standard8.plus.com
push dateMon, 27 Aug 2012 20:55:32 +0000
treeherdercomm-aurora@55ece6cec5cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs779922
Port over bug 779922 to comm-central to fix check-sync-dirs.py failures.
build/autoconf/mozconfig2client-mk
build/mozconfig.vs2010-common
build/win32/mozconfig.vs2010
build/win32/mozconfig.vs2010-win64
build/win64/mozconfig.vs2010
--- a/build/autoconf/mozconfig2client-mk
+++ b/build/autoconf/mozconfig2client-mk
@@ -27,17 +27,17 @@ ac_add_app_options() {
   echo "# $* is used by configure (not client.mk)"
 }
 
 mk_add_options() {
   for _opt
   do
     # Escape shell characters, space, tab, dollar, quote, backslash,
     # and substitute '@<word>@' with '$(<word>)'.
-    _opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
+    _opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
     echo $_opt;
     opts="${opts:+$opts^}$_opt";
   done
 }
 
 mk_echo_options() {
   echo "Adding client.mk options from $FOUND_MOZCONFIG:" >&2
   IFS=^
new file mode 100644
--- /dev/null
+++ b/build/mozconfig.vs2010-common
@@ -0,0 +1,8 @@
+# Pymake needs Windows-style paths. Use cmd.exe to hack around this.
+mk_export_correct_style() {
+  if test -n "${_PYMAKE}"; then
+    mk_add_options "export $1=$(cmd.exe //c echo %$1%)"
+  else
+    mk_add_options "export $1=$(eval echo \$$1)"
+  fi
+}
--- a/build/win32/mozconfig.vs2010
+++ b/build/win32/mozconfig.vs2010
@@ -1,12 +1,13 @@
 export INCLUDE=/d/msvs10/vc/include:/d/msvs10/vc/atlmfc/include:/d/sdks/v7.0/include:/d/sdks/v7.0/include/atl:/d/msvs8/VC/PlatformSDK/include:/d/sdks/dx10/include
 export LIBPATH=/d/msvs10/vc/lib:/d/msvs10/vc/atlmfc/lib:/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727
 export LIB=/d/msvs10/vc/lib:/d/msvs10/vc/atlmfc/lib:/d/sdks/v7.0/lib:/d/msvs8/VC/PlatformSDK/lib:/d/msvs8/SDK/v2.0/lib:/d/mozilla-build/atlthunk_compat:/d/sdks/dx10/lib/x86
 export PATH="/d/msvs10/VSTSDB/Deploy:/d/msvs10/Common7/IDE/:/d/msvs10/VC/BIN:/d/msvs10/Common7/Tools:/d/msvs10/VC/VCPackages:${PATH}"
 export WIN32_REDIST_DIR=/d/msvs10/VC/redist/x86/Microsoft.VC100.CRT
 
+. $topsrcdir/build/mozconfig.vs2010-common
 
-mk_add_options "export LIB=$LIB"
-mk_add_options "export LIBPATH=$LIBPATH"
-mk_add_options "export PATH=$PATH"
-mk_add_options "export INCLUDE=$INCLUDE"
-mk_add_options "export WIN32_REDIST_DIR=$WIN32_REDIST_DIR"
+mk_export_correct_style LIB
+mk_export_correct_style LIBPATH
+mk_export_correct_style PATH
+mk_export_correct_style INCLUDE
+mk_export_correct_style WIN32_REDIST_DIR
--- a/build/win32/mozconfig.vs2010-win64
+++ b/build/win32/mozconfig.vs2010-win64
@@ -1,13 +1,16 @@
 export INCLUDE=/c/tools/msvs10/vc/include:/c/tools/msvs10/vc/atlmfc/include:/c/tools/sdks/v7.0/include:/c/tools/sdks/v7.0/include/atl:/c/tools/sdks/dx10/include
 export LIBPATH=/c/tools/msvs10/vc/lib:/c/tools/msvs10/vc/atlmfc/lib
 export LIB=/c/tools/msvs10/vc/lib:/c/tools/msvs10/vc/atlmfc/lib:/c/tools/sdks/v7.0/lib:/c/tools/sdks/dx10/lib
 export WIN32_REDIST_DIR=/c/tools/msvs10/VC/redist/x86/Microsoft.VC100.CRT
 export MOZ_TOOLS=C:/mozilla-build/moztools
 export PATH="/c/tools/msvs10/Common7/IDE:/c/tools/msvs10/VC/BIN:/c/tools/msvs10/Common7/Tools:/c/tools/msvs10/VC/VCPackages:/c/mozilla-build/moztools:/c/Tools/sdks/v7.0/bin:${PATH}"
 
-mk_add_options "export LIB=$LIB"
-mk_add_options "export LIBPATH=$LIBPATH"
-mk_add_options "export PATH=$PATH"
-mk_add_options "export INCLUDE=$INCLUDE"
-mk_add_options "export WIN32_REDIST_DIR=$WIN32_REDIST_DIR"
+. $topsrcdir/build/mozconfig.vs2010-common
+
+mk_export_correct_style LIB
+mk_export_correct_style LIBPATH
+mk_export_correct_style PATH
+mk_export_correct_style INCLUDE
+mk_export_correct_style WIN32_REDIST_DIR
+
 mk_add_options "export MOZ_TOOLS=$MOZ_TOOLS"
--- a/build/win64/mozconfig.vs2010
+++ b/build/win64/mozconfig.vs2010
@@ -3,14 +3,15 @@ export LIBPATH=/c/tools/msvs10/vc/lib/am
 export LIB=/c/tools/msvs10/vc/lib/amd64:/c/tools/msvs10/vc/atlmfc/lib/amd64:/c/tools/sdks/v7.0/lib/x64:/c/tools/sdks/dx10/lib/x64
 export PATH="/c/tools/msvs10/Common7/IDE:/c/tools/msvs10/VC/BIN/amd64:/c/tools/msvs10/VC/BIN/x86_amd64:/c/tools/msvs10/VC/BIN:/c/tools/msvs10/Common7/Tools:/c/tools/msvs10/VC/VCPackages:${PATH}"
 export WIN32_REDIST_DIR=/c/tools/msvs10/VC/redist/x64/Microsoft.VC100.CRT
 
 # Use 32bit linker for PGO crash bug.
 # https://connect.microsoft.com/VisualStudio/feedback/details/686117/
 export LD=/c/tools/msvs10/VC/BIN/x86_amd64/link.exe
 
+. $topsrcdir/build/mozconfig.vs2010-common
 
-mk_add_options "export LIB=$LIB"
-mk_add_options "export LIBPATH=$LIBPATH"
-mk_add_options "export PATH=$PATH"
-mk_add_options "export INCLUDE=$INCLUDE"
-mk_add_options "export WIN32_REDIST_DIR=$WIN32_REDIST_DIR"
+mk_export_correct_style LIB
+mk_export_correct_style LIBPATH
+mk_export_correct_style PATH
+mk_export_correct_style INCLUDE
+mk_export_correct_style WIN32_REDIST_DIR