Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changes backported from 1.9.2 to fix the build; all build infrastruct…

…ure: no code
  • Loading branch information...
commit e15a2ccf72c2ef253407454a002c5ecfa4a3a1d3 1 parent 6a21462
Steven Parkes smparkes authored
35 .gitignore
View
@@ -0,0 +1,35 @@
+/Makefile
+/config.cache
+/config.log
+/config.status
+/config/Makefile
+/config/autoconf.mk
+/config/mkdepend/Makefile
+/config/myconfig.mk
+/config/myrules.mk
+/configure
+/dist
+/js-config
+/js-config.h
+/mozilla-config.h
+/unallmakefiles
+/.deps
+/config/nfspwd
+/config/nsinstall
+/config/revdepth
+/config/system_wrappers_js
+/*.dylib
+/*.a
+/jscpucfg
+/jsautokw.h
+/jsautooplen.h
+/jsautocfg.h
+/host_jskwgen
+/host_jsoplengen
+/editline/.deps
+/editline/Makefile
+/editline/libeditline.a
+js
+/shell/.deps
+/shell/Makefile
+/shell/js
18 Makefile.in
View
@@ -46,15 +46,20 @@ DIRS = config
run_for_side_effects := $(shell echo "MAKE: $(MAKE)")
include $(DEPTH)/config/autoconf.mk
+ifdef JS_NATIVE_EDITLINE
+DIRS += editline
+endif
+
+# editline needs to get built before the shell
+ifndef JS_DISABLE_SHELL
+DIRS += shell
+endif
+
MODULE = js
LIBRARY_NAME = mozjs
+STATIC_LIBRARY_NAME = js_static
GRE_MODULE = 1
-PROGRAM = js$(BIN_SUFFIX)
-# The shell uses some 'HIDDEN' symbols to produce statistics, so we
-# link directly against the .o files, not against the JS shared
-# library.
-PROGOBJS = js.$(OBJ_SUFFIX) $(OBJS)
LIBS = $(NSPR_LIBS)
ifdef WINCE
@@ -100,9 +105,8 @@ endif
# the js code getting copied into xpinstall and jsd as well as mozilla-bin,
# and then the static data cells used for locking no longer work.
-ifndef JS_STATIC_BUILD
FORCE_SHARED_LIB = 1
-endif
+FORCE_STATIC_LIB = 1
VPATH = $(srcdir)
4 config/autoconf.mk.in
View
@@ -267,6 +267,10 @@ NSPR_LIBS = @NSPR_LIBS@
USE_DEPENDENT_LIBS = @USE_DEPENDENT_LIBS@
+JS_NATIVE_EDITLINE = @JS_NATIVE_EDITLINE@
+JS_DISABLE_SHELL = @JS_DISABLE_SHELL@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+
# MKSHLIB_FORCE_ALL is used to force the linker to include all object
# files present in an archive. MKSHLIB_UNFORCE_ALL reverts the linker
# to normal behavior. Makefile's that create shared libraries out of
11 config/rules.mk
View
@@ -221,15 +221,16 @@ endif # ENABLE_TESTS
#
ifndef LIBRARY
-ifdef LIBRARY_NAME
+ifdef STATIC_LIBRARY_NAME
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
ifdef SHORT_LIBNAME
-LIBRARY_NAME := $(SHORT_LIBNAME)
-endif
-endif
-LIBRARY := $(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
+STATIC_LIBRARY_NAME := $(SHORT_LIBNAME)
+SHARED_LIBRARY_NAME := $(SHORT_LIBNAME)
endif
endif
+LIBRARY := $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
+endif # STATIC_LIBRARY_NAME
+endif # LIBRARY
ifndef HOST_LIBRARY
ifdef HOST_LIBRARY_NAME
49 configure.in
View
@@ -4895,6 +4895,48 @@ fi
fi
dnl ========================================================
+dnl = Link js shell to system readline
+dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(readline,
+[ --enable-readline Link js shell to system readline library],
+ JS_WANT_READLINE=1,
+ JS_WANT_READLINE= )
+
+JS_NATIVE_EDITLINE=
+EDITLINE_LIBS=
+JS_DISABLE_SHELL=
+
+case "$target" in
+*-wince*|*-mingw*|*-cygwin*|*-msvc*|*-mks*)
+ NO_EDITLINE=1
+ ;;
+*-symbian*)
+ NO_EDITLINE=1
+ JS_DISABLE_SHELL=1
+ ;;
+*)
+ ;;
+esac
+
+if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then
+ if test -n "$JS_WANT_READLINE"; then
+ AC_CHECK_LIB(readline, readline,
+ EDITLINE_LIBS="-lreadline",
+ AC_MSG_ERROR([No system readline library found.]))
+ else
+ dnl By default, we use editline
+ JS_NATIVE_EDITLINE=1
+ EDITLINE_LIBS='$(DEPTH)/editline/$(LIB_PREFIX)editline.$(LIB_SUFFIX)'
+ fi
+
+ dnl Either way, we want to build with line editing support.
+ AC_DEFINE(EDITLINE)
+fi
+AC_SUBST(JS_NATIVE_EDITLINE)
+AC_SUBST(JS_DISABLE_SHELL)
+AC_SUBST(EDITLINE_LIBS)
+
+dnl ========================================================
dnl =
dnl = Standalone module options
dnl =
@@ -5270,11 +5312,18 @@ mv confdefs.h.save confdefs.h
MAKEFILES="
Makefile
+ shell/Makefile
config/Makefile
config/autoconf.mk
config/mkdepend/Makefile
"
+if test -n "$JS_NATIVE_EDITLINE"; then
+ MAKEFILES="$MAKEFILES
+editline/Makefile
+"
+fi
+
dnl
dnl Run a perl script to quickly create the makefiles.
dnl If it succeeds, it outputs a shell command to set CONFIG_FILES
55 editline/Makefile.in
View
@@ -0,0 +1,55 @@
+# -*- Mode: makefile -*-
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Spidermonkey build system.
+#
+# The Initial Developer of the Original Code is
+# The Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Ted Mielczarek <ted.mielczarek@gmail.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+LIBRARY_NAME = editline
+FORCE_STATIC_LIB = 1
+
+CSRCS = editline.c sysunix.c
+
+DEFINES += -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX \
+ -DHAVE_STDLIB -DUNIQUE_HISTORY
+
+include $(topsrcdir)/config/rules.mk
72 shell/Makefile.in
View
@@ -0,0 +1,72 @@
+# -*- Mode: makefile -*-
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Spidermonkey build system.
+#
+# The Initial Developer of the Original Code is
+# The Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Ted Mielczarek <ted.mielczarek@gmail.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+PROGRAM = js$(BIN_SUFFIX)
+CPPSRCS = js.cpp
+
+DEFINES += -DEXPORT_JS_API
+
+LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX)
+
+LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
+ifdef _MSC_VER
+ifdef WINCE
+WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
+endif
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+ifdef MOZ_SHARK
+CFLAGS += -F/System/Library/PrivateFrameworks
+CXXFLAGS += -F/System/Library/PrivateFrameworks
+LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
+endif
+
+# People expect the js shell to wind up in the top-level JS dir.
+libs::
+ $(INSTALL) $(IFLAGS2) $(PROGRAM) $(DEPTH)
0  js.cpp → shell/js.cpp
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.