Skip to content

Commit

Permalink
Bug 779922 - Export Windows-style paths in the in-tree mozconfig.vs20…
Browse files Browse the repository at this point in the history
…10 when building under Pymake. r=ted

--HG--
extra : rebase_source : bb3dff7e94b53efe79801a2b3bfc6cd78ef47ac3
  • Loading branch information
sunshowers committed Aug 6, 2012
1 parent b7a8efc commit c18e108
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build/autoconf/mozconfig2client-mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mk_add_options() {
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
Expand Down
8 changes: 8 additions & 0 deletions build/mozconfig.vs2010-common
Original file line number Diff line number Diff line change
@@ -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
}
11 changes: 6 additions & 5 deletions build/win32/mozconfig.vs2010
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ export LIB=/d/msvs10/vc/lib:/d/msvs10/vc/atlmfc/lib:/d/sdks/v7.0/lib:/d/msvs8/VC
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
13 changes: 8 additions & 5 deletions build/win32/mozconfig.vs2010-win64
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ 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"
11 changes: 6 additions & 5 deletions build/win64/mozconfig.vs2010
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ export WIN32_REDIST_DIR=/c/tools/msvs10/VC/redist/x64/Microsoft.VC100.CRT
# 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
2 changes: 1 addition & 1 deletion client.mk
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ endef
# As $(shell) doesn't preserve newlines, use sed to replace them with an
# unlikely sequence (||), which is then replaced back to newlines by make
# before evaluation.
$(eval $(subst ||,$(CR),$(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) 2> $(TOPSRCDIR)/.mozconfig.out | sed 's/$$/||/')))
$(eval $(subst ||,$(CR),$(shell _PYMAKE=$(.PYMAKE) $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) 2> $(TOPSRCDIR)/.mozconfig.out | sed 's/$$/||/')))

ifndef MOZ_OBJDIR
MOZ_OBJDIR = obj-$(CONFIG_GUESS)
Expand Down

0 comments on commit c18e108

Please sign in to comment.