Bug 467583: Make js/src share the 'dist' tree with the enclosing build. r=ted.mielczarek. a=beltzner
authorJim Blandy <jimb@mozilla.org>
Mon, 22 Dec 2008 13:22:38 -0800
changeset 22879 1938c60f73357a20c46c7bedaabb3d4c64799800
parent 22878 11ef0cf180600d8aaa6ca985658a62535d9aa044
child 22880 27a7287e4809522e398ac61109696cb5bc47237d
push id479
push usertmielczarek@mozilla.com
push dateWed, 21 Jan 2009 19:22:03 +0000
reviewersted, beltzner
bugs467583
milestone1.9.1b3pre
Bug 467583: Make js/src share the 'dist' tree with the enclosing build. r=ted.mielczarek. a=beltzner
configure.in
js/src/config/autoconf.mk.in
js/src/configure.in
--- a/configure.in
+++ b/configure.in
@@ -8325,16 +8325,17 @@ fi
 # Run the SpiderMonkey 'configure' script.
 dist=$MOZ_BUILD_ROOT/dist
 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
 ac_configure_args="$ac_configure_args --enable-threadsafe"
 if test -z "$MOZ_NATIVE_NSPR"; then
     ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
     ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
 fi
+ac_configure_args="$ac_configure_args --with-dist-dir=../../dist"
 ac_configure_args="$ac_configure_args --includedir=$dist/include"
 ac_configure_args="$ac_configure_args --bindir=$dist/bin"
 ac_configure_args="$ac_configure_args --libdir=$dist/lib"
 ac_configure_args="$ac_configure_args --with-sync-build-files=$srcdir"
 if test "$MOZ_MEMORY"; then
    ac_configure_args="$ac_configure_args --enable-jemalloc"  
 fi
 AC_OUTPUT_SUBDIRS(js/src)
--- a/js/src/config/autoconf.mk.in
+++ b/js/src/config/autoconf.mk.in
@@ -59,17 +59,22 @@ bindir		= @bindir@
 includedir	= @includedir@
 libdir		= @libdir@
 datadir		= @datadir@
 mandir		= @mandir@
 
 installdir	= $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
 sdkdir		= $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
 
-DIST		= $(DEPTH)/dist
+TOP_DIST	= @TOP_DIST@
+ifneq (,$(filter /%,$(TOP_DIST)))
+DIST		= $(TOP_DIST)
+else
+DIST		= $(DEPTH)/$(TOP_DIST)
+endif
 
 MOZ_JS_LIBS		   = @MOZ_JS_LIBS@
 
 MOZ_SYNC_BUILD_FILES = @MOZ_SYNC_BUILD_FILES@
 
 MOZ_DEBUG	= @MOZ_DEBUG@
 MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@
 MOZ_PROFILE_MODULES = @MOZ_PROFILE_MODULES@
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -155,16 +155,27 @@ then
 	***
 	EOF
     exit 1
     break
   fi
 fi
 MOZ_BUILD_ROOT=`pwd`
 
+dnl Choose where to put the 'dist' directory.
+dnl ==============================================================
+
+MOZ_ARG_WITH_STRING(dist-dir,
+[  --with-dist-dir=DIR     Use DIR as 'dist' staging area.  DIR may be
+                          relative to the top of SpiderMonkey build tree,
+                          or absolute.],
+    TOP_DIST=$withval,
+    TOP_DIST=dist)
+AC_SUBST(TOP_DIST)
+
 dnl Default to MSVC for win32
 dnl ==============================================================
 if test -z "$CROSS_COMPILE"; then
 case "$target" in
 *-cygwin*|*-mingw*|*-msvc*|*-mks*)
     MAKE_VERSION=3.79
     if test -z "$CC"; then CC=cl; fi
     if test -z "$CXX"; then CXX=cl; fi