Bug 693226 - Fix up paths so that --enable-ui-locale=ab-CD --with-l10n-base=l10n works with pymake on Windows. r=khuey
authorABE Hiroki <h.rayflood@gmail.com>
Tue, 31 Jan 2012 10:25:41 -0500
changeset 90676 6cf17fa1bc344fb22b3ea5aad0700ef683f11251
parent 90642 5ee59d0f5848f8b22f85057d79cb511b5ff6592f
child 90677 2cf43ba65821275cfd8e293021be2e295cbc110f
push idunknown
push userunknown
push dateunknown
reviewerskhuey
bugs693226
milestone13.0a1
Bug 693226 - Fix up paths so that --enable-ui-locale=ab-CD --with-l10n-base=l10n works with pymake on Windows. r=khuey
config/config.mk
configure.in
js/src/config/config.mk
--- a/config/config.mk
+++ b/config/config.mk
@@ -77,16 +77,17 @@ CHECK_VARS := \
 
 # checks for internal spaces or trailing spaces in the variable
 # named by $x
 check-variable = $(if $(filter-out 0 1,$(words $($(x))z)),$(error Spaces are not allowed in $(x)))
 
 $(foreach x,$(CHECK_VARS),$(check-variable))
 
 core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))
+core_realpath = $(if $(realpath $(1)),$(realpath $(1)),$(call core_abspath,$(1)))
 
 nullstr :=
 space :=$(nullstr) # EOL
 
 core_winabspath = $(firstword $(subst /, ,$(call core_abspath,$(1)))):$(subst $(space),,$(patsubst %,\\%,$(wordlist 2,$(words $(subst /, ,$(call core_abspath,$(1)))), $(strip $(subst /, ,$(call core_abspath,$(1)))))))
 
 # LIBXUL_DIST is not defined under js/src, thus we make it mean DIST there.
 LIBXUL_DIST ?= $(DIST)
@@ -721,17 +722,17 @@ endif # WINNT/OS2
 # MOZ_UI_LOCALE directly, but use an intermediate variable that can be
 # overridden by the command line. (Besides, AB_CD is prettier).
 AB_CD = $(MOZ_UI_LOCALE)
 
 ifndef L10NBASEDIR
 L10NBASEDIR = $(error L10NBASEDIR not defined by configure)
 endif
 
-EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(L10NBASEDIR)/$(AB_CD)/$(subst /locales,,$(1)))
+EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(call core_realpath,$(L10NBASEDIR))/$(AB_CD)/$(subst /locales,,$(1)))
 
 ifdef relativesrcdir
 LOCALE_SRCDIR = $(call EXPAND_LOCALE_SRCDIR,$(relativesrcdir))
 endif
 
 ifdef LOCALE_SRCDIR
 # if LOCALE_MERGEDIR is set, use mergedir first, then the localization,
 # and finally en-US
--- a/configure.in
+++ b/configure.in
@@ -2660,16 +2660,17 @@ ia64*-hpux*)
 
     dnl set NO_X11 defines here as the general check is skipped on win32
     no_x=yes
     AC_DEFINE(NO_X11)
 
     case "$host" in
     *-mingw*)
         MOZ_BUILD_ROOT=`cd $MOZ_BUILD_ROOT && pwd -W`
+        L10NBASEDIR=`cd $L10NBASEDIR && pwd -W`
         ;;
     esac
 
     case "$host" in
     *-mingw*)
         if test -z "$MOZ_TOOLS"; then
             AC_MSG_ERROR([MOZ_TOOLS is not set])
         fi
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -77,16 +77,17 @@ CHECK_VARS := \
 
 # checks for internal spaces or trailing spaces in the variable
 # named by $x
 check-variable = $(if $(filter-out 0 1,$(words $($(x))z)),$(error Spaces are not allowed in $(x)))
 
 $(foreach x,$(CHECK_VARS),$(check-variable))
 
 core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))
+core_realpath = $(if $(realpath $(1)),$(realpath $(1)),$(call core_abspath,$(1)))
 
 nullstr :=
 space :=$(nullstr) # EOL
 
 core_winabspath = $(firstword $(subst /, ,$(call core_abspath,$(1)))):$(subst $(space),,$(patsubst %,\\%,$(wordlist 2,$(words $(subst /, ,$(call core_abspath,$(1)))), $(strip $(subst /, ,$(call core_abspath,$(1)))))))
 
 # LIBXUL_DIST is not defined under js/src, thus we make it mean DIST there.
 LIBXUL_DIST ?= $(DIST)
@@ -721,17 +722,17 @@ endif # WINNT/OS2
 # MOZ_UI_LOCALE directly, but use an intermediate variable that can be
 # overridden by the command line. (Besides, AB_CD is prettier).
 AB_CD = $(MOZ_UI_LOCALE)
 
 ifndef L10NBASEDIR
 L10NBASEDIR = $(error L10NBASEDIR not defined by configure)
 endif
 
-EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(L10NBASEDIR)/$(AB_CD)/$(subst /locales,,$(1)))
+EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(call core_realpath,$(L10NBASEDIR))/$(AB_CD)/$(subst /locales,,$(1)))
 
 ifdef relativesrcdir
 LOCALE_SRCDIR = $(call EXPAND_LOCALE_SRCDIR,$(relativesrcdir))
 endif
 
 ifdef LOCALE_SRCDIR
 # if LOCALE_MERGEDIR is set, use mergedir first, then the localization,
 # and finally en-US