Merge from cvs-trunk-mirror to mozilla-central.

--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsarray.c => js/src/jsarray.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsemit.c => js/src/jsemit.cpp
rename : js/src/jsexn.c => js/src/jsexn.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsnum.c => js/src/jsnum.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsscope.c => js/src/jsscope.cpp
rename : js/src/jsscript.c => js/src/jsscript.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
This commit is contained in:
jorendorff@mozilla.com 2007-12-03 17:50:14 -06:00
commit b57c9929e6
57 changed files with 306 additions and 997 deletions

View File

@ -1,2 +1,29 @@
CVS\/.*
\.cvsignore$
# .hgignore - List of filenames hg should ignore
# Filenames that should be ignored wherever they appear
~$
\.pyc$
# User files that may appear at the root
^\.mozconfig$
^\.mozconfig\.mk$
^\.mozconfig\.out$
^configure$
^config\.cache$
^config\.log$
# subtrees from other repositories
^nsprpub/
^dbm/
^security/nss/
^security/coreconf/
^security/dbm/
# Build directories
^obj-
^objdir-
# Build directories for js shell
_DBG\.OBJ/
_OPT\.OBJ/

816
client.mk
View File

@ -40,41 +40,16 @@
# Build a mozilla application.
#
# To checkout and build a tree,
# 1. cvs co mozilla/client.mk
# To build a tree,
# 1. hg clone ssh://hg.mozilla.org/mozilla-central mozilla
# 2. cd mozilla
# 3. create your .mozconfig file with
# 3. python client.py checkout
# 4. create your .mozconfig file with
# mk_add_options MOZ_CO_PROJECT=
# suite,browser
# 4. gmake -f client.mk
#
# This script will pick up the CVSROOT from the CVS/Root file. If you wish
# to use a different CVSROOT, you must set CVSROOT in your environment:
#
# export CVSROOT=:pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot
# export CVSROOT=:pserver:username%somedomain.org@cvs.mozilla.org:/cvsroot
#
# You must specify which products/modules you wish to checkout, with
# MOZ_CO_PROJECT and MOZ_CO_MODULE variables.
#
# MOZ_CO_PROJECT possibilities include the following:
# suite (Seamonkey suite)
# browser (aka Firefox)
# mail (aka Thunderbird)
# minimo (small browser for devices)
# composer (standalone composer, aka NVU)
# calendar (aka Sunbird, use this to build the calendar extensions also)
# xulrunner
# camino
# tamarin
#
# Other common MOZ_CO_MODULE options include the following:
# mozilla/other-licenses/libart_lgpl
# mozilla/other-licenses/bsdiff
# mozilla/tools/codesighs
# 5. gmake -f client.mk
#
# Other targets (gmake -f client.mk [targets...]),
# checkout
# build
# clean (realclean is now the same as clean)
# distclean
@ -86,16 +61,7 @@
# MOZ_BUILD_PROJECTS - Build multiple projects in subdirectories
# of MOZ_OBJDIR
# MOZ_OBJDIR - Destination object directory
# MOZ_CO_DATE - Date tag to use for checkout (default: none)
# MOZ_CO_LOCALES_DATE - Date tag to use for locale checkout
# (default: MOZ_CO_DATE)
# MOZ_CO_MODULE - Module to checkout
# MOZ_CVS_FLAGS - Flags to pass cvs (default: -q -z3)
# MOZ_CO_FLAGS - Flags to pass after 'cvs co' (default: -P)
# MOZ_MAKE_FLAGS - Flags to pass to $(MAKE)
# MOZ_CO_LOCALES - localizations to pull (MOZ_CO_LOCALES="de-DE,pt-BR")
# MOZ_LOCALE_DIRS - directories which contain localizations
# LOCALES_CVSROOT - CVSROOT to use to pull localizations
# MOZ_PREFLIGHT_ALL } - Makefiles to run before any project in
# MOZ_PREFLIGHT } MOZ_BUILD_PROJECTS, before each project, after
# MOZ_POSTFLIGHT } each project, and after all projects; these
@ -103,316 +69,6 @@
# MOZ_UNIFY_BDATE - Set to use the same bdate for each project in
# MOZ_BUILD_PROJECTS
#
AVAILABLE_PROJECTS = \
all \
suite \
toolkit \
browser \
mail \
minimo \
composer \
calendar \
xulrunner \
camino \
necko \
tamarin \
$(NULL)
# Trailing / on top-level mozilla dir required to stop fast-update thinking
# it is a module name.
MODULES_NS_necko := \
mozilla/ \
$(NULL)
MODULES_necko := \
mozilla/README \
mozilla/config \
mozilla/build \
mozilla/intl \
mozilla/modules/libpref \
mozilla/modules/zlib \
mozilla/netwerk \
mozilla/xpcom \
mozilla/tools/test-harness \
$(NULL)
MODULES_NS_core := \
$(MODULES_NS_necko) \
mozilla/js \
mozilla/js/src \
mozilla/js/jsd \
mozilla/db \
$(NULL)
MODULES_core := \
$(MODULES_necko) \
mozilla/caps \
mozilla/content \
mozilla/db/mdb \
mozilla/db/mork \
mozilla/docshell \
mozilla/dom \
mozilla/editor \
mozilla/embedding \
mozilla/extensions \
mozilla/gfx \
mozilla/parser \
mozilla/layout \
mozilla/jpeg \
mozilla/js/src/fdlibm \
mozilla/js/src/liveconnect \
mozilla/js/src/xpconnect \
mozilla/js/jsd/idl \
mozilla/modules/lcms \
mozilla/modules/libimg \
mozilla/modules/libjar \
mozilla/modules/libpr0n \
mozilla/modules/libreg \
mozilla/modules/libutil \
mozilla/modules/oji \
mozilla/modules/plugin \
mozilla/modules/staticmod \
mozilla/plugin/oji \
mozilla/profile \
mozilla/probes \
mozilla/rdf \
mozilla/security/manager \
mozilla/sun-java \
mozilla/ipc/ipcd \
mozilla/modules/libpr0n \
mozilla/modules/libmar \
mozilla/modules/libbz2 \
mozilla/accessible \
mozilla/other-licenses/atk-1.0 \
mozilla/other-licenses/ia2 \
mozilla/security/manager \
mozilla/tools/elf-dynstr-gc \
mozilla/uriloader \
mozilla/view \
mozilla/webshell \
mozilla/widget \
mozilla/xpfe \
mozilla/xpinstall \
mozilla/toolkit \
mozilla/storage \
mozilla/db/sqlite3 \
mozilla/db/morkreader \
mozilla/testing/mochitest \
$(NULL)
LOCALES_necko := \
netwerk \
$(NULL)
LOCALES_core := \
$(LOCALES_necko) \
dom \
$(NULL)
BOOTSTRAP_necko := \
mozilla/browser/config/version.txt \
mozilla/mail/config/version.txt \
mozilla/calendar/sunbird/config/version.txt \
mozilla/suite/config/version.txt \
$(NULL)
BOOTSTRAP_core := \
$(BOOTSTRAP_necko) \
$(NULL)
MODULES_NS_toolkit := \
$(MODULES_NS_core) \
$(NULL)
MODULES_toolkit := \
$(MODULES_core) \
mozilla/chrome \
$(NULL)
LOCALES_toolkit := \
$(LOCALES_core) \
toolkit \
security/manager \
$(NULL)
BOOTSTRAP_toolkit := \
$(BOOTSTRAP_core) \
$(NULL)
MODULES_NS_suite := \
$(MODULES_NS_toolkit) \
$(NULL)
MODULES_suite := \
$(MODULES_toolkit) \
mozilla/directory/xpcom \
mozilla/mailnews \
mozilla/suite \
mozilla/other-licenses/7zstub/seamonkey \
$(NULL)
LOCALES_suite := \
$(LOCALES_toolkit) \
suite \
editor/ui \
extensions/reporter \
$(NULL)
BOOTSTRAP_suite := \
$(BOOTSTRAP_toolkit) \
$(NULL)
MODULES_NS_browser := \
$(MODULES_NS_toolkit) \
$(NULL)
MODULES_browser := \
$(MODULES_toolkit) \
mozilla/browser \
mozilla/other-licenses/branding/firefox \
mozilla/other-licenses/7zstub/firefox \
$(NULL)
LOCALES_browser := \
$(LOCALES_toolkit) \
browser \
extensions/reporter \
extensions/spellcheck \
other-licenses/branding/firefox \
$(NULL)
BOOTSTRAP_browser := \
$(BOOTSTRAP_toolkit) \
mozilla/browser/config/mozconfig \
$(NULL)
MODULES_NS_minimo := \
$(MODULES_NS_toolkit) \
$(NULL)
MODULES_minimo := \
$(MODULES_toolkit) \
mozilla/minimo \
$(NULL)
BOOTSTRAP_minimo := \
$(BOOTSTRAP_toolkit) \
$(NULL)
MODULES_NS_mail := \
$(MODULES_NS_toolkit) \
$(NULL)
MODULES_mail := \
$(MODULES_toolkit) \
mozilla/directory/xpcom \
mozilla/mailnews \
mozilla/mail \
mozilla/other-licenses/branding/thunderbird \
mozilla/other-licenses/7zstub/thunderbird \
$(NULL)
LOCALES_mail := \
$(LOCALES_toolkit) \
mail \
other-licenses/branding/thunderbird \
editor/ui \
extensions/spellcheck \
$(NULL)
BOOTSTRAP_mail := \
$(BOOTSTRAP_toolkit) \
mozilla/mail/config/mozconfig \
$(NULL)
MODULES_composer := \
$(MODULES_toolkit) \
mozilla/composer \
$(NULL)
MODULES_NS_calendar := \
$(MODULES_NS_toolkit) \
$(NULL)
MODULES_calendar := \
$(MODULES_toolkit) \
mozilla/storage \
mozilla/db/sqlite3 \
mozilla/calendar \
mozilla/other-licenses/branding/sunbird \
mozilla/other-licenses/7zstub/sunbird \
$(NULL)
LOCALES_calendar := \
$(LOCALES_toolkit) \
calendar \
other-licenses/branding/sunbird \
$(NULL)
BOOTSTRAP_calendar := \
$(BOOTSTRAP_toolkit) \
mozilla/calendar/sunbird/config/mozconfig \
$(NULL)
MODULES_NS_xulrunner := \
$(MODULES_NS_toolkit) \
$(NULL)
MODULES_xulrunner := \
$(MODULES_toolkit) \
mozilla/xulrunner \
$(NULL)
LOCALES_xulrunner := \
$(LOCALES_toolkit) \
$(NULL)
BOOTSTRAP_xulrunner := \
$(BOOTSTRAP_toolkit) \
mozilla/xulrunner/config/mozconfig \
$(NULL)
MODULES_NS_camino := \
$(MODULES_NS_toolkit) \
$(NULL)
MODULES_camino := \
$(MODULES_core) \
mozilla/camino \
mozilla/themes \
$(NULL)
BOOTSTRAP_camino := \
$(BOOTSTRAP_toolkit) \
mozilla/camino/config/mozconfig \
$(NULL)
MODULES_tamarin := \
mozilla/js/tamarin \
mozilla/modules/zlib \
$(NULL)
MODULES_all := \
mozilla/other-licenses/bsdiff \
mozilla/other-licenses/libart_lgpl \
mozilla/tools/trace-malloc \
mozilla/tools/jprof \
mozilla/tools/codesighs \
mozilla/tools/update-packaging \
$(NULL)
#######################################################################
# Checkout Tags
#
# For branches, uncomment the MOZ_CO_TAG line with the proper tag,
# and commit this file on that tag.
#MOZ_CO_TAG = <tag>
NSPR_CO_TAG = NSPR_HEAD_20071016
NSS_CO_TAG = NSS_3_12_ALPHA_2B
LDAPCSDK_CO_TAG = LDAPCSDK_6_0_3_CLIENT_BRANCH
LOCALES_CO_TAG =
#######################################################################
# Defines
#
@ -428,31 +84,14 @@ ifeq "$(CWD)" "/"
CWD := /.
endif
ifneq (, $(wildcard client.mk))
# Ran from mozilla directory
ROOTDIR := $(shell dirname $(CWD))
TOPSRCDIR := $(CWD)
else
# Ran from mozilla/.. directory (?)
ROOTDIR := $(CWD)
TOPSRCDIR := $(CWD)/mozilla
ifndef TOPSRCDIR
ifeq (,$(wildcard client.mk))
$(error Must run from the client.mk directory, or specify TOPSRCDIR)
endif
TOPSRCDIR = $(CWD)
endif
# on os2, TOPSRCDIR may have two forward slashes in a row, which doesn't
# work; replace first instance with one forward slash
TOPSRCDIR := $(shell echo "$(TOPSRCDIR)" | sed -e 's%//%/%')
ifndef TOPSRCDIR_MOZ
TOPSRCDIR_MOZ=$(TOPSRCDIR)
endif
# if ROOTDIR equals only drive letter (i.e. "C:"), set to "/"
DIRNAME := $(shell echo "$(ROOTDIR)" | sed -e 's/^.://')
ifeq ($(DIRNAME),)
ROOTDIR := /.
endif
AUTOCONF := autoconf
AUTOCONF := autoconf-2.13
MKDIR := mkdir
SH := /bin/sh
ifndef MAKE
@ -461,12 +100,7 @@ endif
PERL ?= perl
PYTHON ?= python
CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
ifdef CONFIG_GUESS_SCRIPT
CONFIG_GUESS = $(shell $(CONFIG_GUESS_SCRIPT))
else
_IS_FIRST_CHECKOUT := 1
endif
RUN_AUTOCONF_LOCALLY = 1
####################################
# Sanity checks
@ -480,84 +114,22 @@ convert it to Unix-style line endings, run \
endif
endif
####################################
# CVS
# Add the CVS root to CVS_FLAGS if needed
CVS_ROOT_IN_TREE := $(shell cat $(TOPSRCDIR)/CVS/Root 2>/dev/null)
ifneq ($(CVS_ROOT_IN_TREE),)
ifneq ($(CVS_ROOT_IN_TREE),$(CVSROOT))
CVS_FLAGS := -d $(CVS_ROOT_IN_TREE)
endif
endif
CVS_CO_DATE_FLAGS = $(if $(MOZ_CO_DATE),-D "$(MOZ_CO_DATE)")
CVS_CO_LOCALES_DATE_FLAGS = $(if $(MOZ_CO_LOCALES_DATE),-D "$(MOZ_CO_LOCALES_DATE)")
CVSCO = $(CVS) $(CVS_FLAGS) co $(MOZ_CO_FLAGS) $(if $(MOZ_CO_TAG),-r $(MOZ_CO_TAG)) $(CVS_CO_DATE_FLAGS)
MOZ_CO_LOCALES_DATE ?= $(MOZ_CO_DATE)
CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log
CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%)
# if LOCALES_CVSROOT is not specified, set it here
# (and let mozconfig override it)
LOCALES_CVSROOT ?= :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/l10n
####################################
# Load mozconfig Options
# See build pages, http://www.mozilla.org/build/ for how to set up mozconfig.
MOZCONFIG_LOADER := mozilla/build/autoconf/mozconfig2client-mk
MOZCONFIG_FINDER := mozilla/build/autoconf/mozconfig-find
MOZCONFIG_MODULES := mozilla/build/unix/uniq.pl
MOZCONFIG_LOADER := build/autoconf/mozconfig2client-mk
MOZCONFIG_FINDER := build/autoconf/mozconfig-find
MOZCONFIG_MODULES := build/unix/uniq.pl
run_for_side_effects := \
$(shell cd $(ROOTDIR); \
if test "$(_IS_FIRST_CHECKOUT)"; then \
$(CVSCO) $(MOZCONFIG_FINDER) $(MOZCONFIG_LOADER) $(MOZCONFIG_MODULES); \
else true; \
fi; \
$(MOZCONFIG_LOADER) $(TOPSRCDIR) mozilla/.mozconfig.mk > mozilla/.mozconfig.out)
$(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) $(TOPSRCDIR)/.mozconfig.mk > $(TOPSRCDIR)/.mozconfig.out)
include $(TOPSRCDIR)/.mozconfig.mk
####################################
# Options that may come from mozconfig
MOZ_PROJECT_LIST := $(subst $(comma), ,$(MOZ_CO_PROJECT))
MOZ_PROJECT_LIST := $(subst macbrowser,camino,$(MOZ_PROJECT_LIST))
ifneq (,$(filter-out $(AVAILABLE_PROJECTS),$(MOZ_PROJECT_LIST)))
$(error MOZ_CO_PROJECT contains an unrecognized project.)
endif
ifeq (all,$(filter all,$(MOZ_PROJECT_LIST)))
MOZ_PROJECT_LIST := $(AVAILABLE_PROJECTS)
endif
MOZ_MODULE_LIST := $(subst $(comma), ,$(MOZ_CO_MODULE)) $(foreach project,$(MOZ_PROJECT_LIST),$(MODULES_$(project)))
MOZ_MODULE_LIST_NS := $(foreach project,$(MOZ_PROJECT_LIST),$(MODULES_NS_$(project)))
LOCALE_DIRS := $(MOZ_LOCALE_DIRS) $(foreach project,$(MOZ_PROJECT_LIST),$(LOCALES_$(project)))
MOZCONFIG_MODULES += $(foreach project,$(MOZ_PROJECT_LIST),$(BOOTSTRAP_$(project)))
# Using $(sort) here because it also removes duplicate entries.
MOZ_MODULE_LIST := $(sort $(MOZ_MODULE_LIST))
LOCALE_DIRS := $(sort $(LOCALE_DIRS))
MOZCONFIG_MODULES := $(sort $(MOZCONFIG_MODULES))
# Change CVS flags if anonymous root is requested
ifdef MOZ_CO_USE_MIRROR
CVS_FLAGS := -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot
endif
# MOZ_CVS_FLAGS - Basic CVS flags
ifeq "$(origin MOZ_CVS_FLAGS)" "undefined"
CVS_FLAGS := $(CVS_FLAGS) -q -z 3
else
CVS_FLAGS := $(MOZ_CVS_FLAGS)
endif
ifdef MOZ_BUILD_PROJECTS
ifndef MOZ_OBJDIR
@ -584,361 +156,32 @@ endif
endif # MOZ_BUILD_PROJECTS
####################################
# CVS defines for NSS
#
NSS_CO_MODULE = \
mozilla/dbm \
mozilla/security/nss \
mozilla/security/coreconf \
mozilla/security/dbm \
$(NULL)
NSS_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
NSS_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
NSS_CO_FLAGS := $(NSS_CO_FLAGS) $(if $(NSS_CO_TAG),-r $(NSS_CO_TAG),-A)
# Can only pull the tip or branch tags by date
ifeq (,$(filter-out HEAD %BRANCH,$(NSS_CO_TAG)))
CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSS_CO_MODULE)
else
CVSCO_NSS = $(CVS) $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(NSS_CO_MODULE)
endif
####################################
# CVS defines for NSPR
#
NSPR_CO_MODULE = mozilla/nsprpub
NSPR_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
NSPR_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) $(if $(NSPR_CO_TAG),-r $(NSPR_CO_TAG),-A)
# Can only pull the tip or branch tags by date
ifeq (,$(filter-out HEAD %BRANCH,$(NSPR_CO_TAG)))
CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSPR_CO_MODULE)
else
CVSCO_NSPR = $(CVS) $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(NSPR_CO_MODULE)
endif
####################################
# CVS defines for the C LDAP SDK
#
LDAPCSDK_CO_MODULE = mozilla/directory/c-sdk
LDAPCSDK_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
LDAPCSDK_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
LDAPCSDK_CO_FLAGS := $(LDAPCSDK_CO_FLAGS) $(if $(LDAPCSDK_CO_TAG),-r $(LDAPCSDK_CO_TAG),-A)
# Can only pull the tip or branch tags by date
ifeq (,$(filter-out HEAD %BRANCH,$(LDAPCSDK_CO_TAG)))
CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LDAPCSDK_CO_MODULE)
else
CVSCO_LDAPCSDK = $(CVS) $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(LDAPCSDK_CO_MODULE)
endif
####################################
# Error on obsolete variables.
#
ifdef MOZ_MAPINFO
$(warning MOZ_MAPINFO is obsolete, use MOZ_CO_MODULE=mozilla/tools/codesighs instead.)
MOZ_MODULE_LIST += mozilla/tools/codesighs
endif
ifdef MOZ_INTERNAL_LIBART_LGPL
$(error MOZ_INTERNAL_LIBART_LGPL is obsolete, use MOZ_CO_MODULE=mozilla/other-licenses/libart_lgpl instead.)
endif
ifdef MOZ_PHOENIX
$(warning MOZ_PHOENIX is obsolete.)
MOZ_MODULE_LIST += $(MODULES_browser)
# $(error MOZ_PHOENIX is obsolete, use MOZ_CO_PROJECT=browser and --enable-application=browser)
endif
ifdef MOZ_THUNDERBIRD
$(warning MOZ_THUNDERBIRD is obsolete.)
MOZ_MODULE_LIST += $(MODULES_mail)
# $(error MOZ_THUNDERBIRD is obsolete, use MOZ_CO_PROJECT=mail and --enable-application=mail)
endif
###################################
# Checkout main modules
#
# sort is used to remove duplicates.
MOZ_MODULE_LIST := $(sort $(MOZ_MODULE_LIST))
MOZ_MODULE_LIST_NS := $(sort $(MOZ_MODULE_LIST_NS))
####################################
# Suppress standalone modules if they're not needed.
#
CONFIGURES := $(TOPSRCDIR)/configure
ifeq (,$(filter mozilla/xpcom,$(MOZ_MODULE_LIST)))
CVSCO_NSPR :=
else
CONFIGURES += $(TOPSRCDIR)/nsprpub/configure
endif
ifeq (,$(filter mozilla/security/manager,$(MOZ_MODULE_LIST)))
CVSCO_NSS :=
endif
ifeq (,$(filter mozilla/directory/xpcom,$(MOZ_MODULE_LIST)))
CVSCO_LDAPCSDK :=
else
CONFIGURES += $(TOPSRCDIR)/directory/c-sdk/configure
endif
MODULES_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
MODULES_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
MODULES_CO_FLAGS := $(MODULES_CO_FLAGS) $(if $(MOZ_CO_TAG),-r $(MOZ_CO_TAG),-A)
CVSCO_MODULES_NS = $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) -l $(MOZ_MODULE_LIST_NS)
ifeq (,$(strip $(MOZ_MODULE_LIST)))
FASTUPDATE_MODULES = $(error No modules or projects were specified. Use MOZ_CO_PROJECT to specify a project for checkout.)
CHECKOUT_MODULES = $(error No modules or projects were specified. Use MOZ_CO_PROJECT to specify a project for checkout.)
else
FASTUPDATE_MODULES := fast_update $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(MOZ_MODULE_LIST)
CHECKOUT_MODULES := cvs_co $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(MOZ_MODULE_LIST);
endif
ifeq (,$(MOZ_MODULE_LIST_NS))
FASTUPDATE_MODULES_NS := true
CHECKOUT_MODULES_NS := true
else
FASTUPDATE_MODULES_NS := fast_update $(CVSCO_MODULES_NS)
CHECKOUT_MODULES_NS := cvs_co $(CVSCO_MODULES_NS)
endif
###################################
# CVS defines for locales
#
LOCALES_CO_FLAGS := -P
ifdef MOZ_CO_FLAGS
LOCALES_CO_FLAGS := $(MOZ_CO_FLAGS)
endif
LOCALES_CO_FLAGS := $(LOCALES_CO_FLAGS) $(if $(LOCALES_CO_TAG),-r $(LOCALES_CO_TAG),-A)
ifndef MOZ_CO_LOCALES
FASTUPDATE_LOCALES := true
CHECKOUT_LOCALES := true
else
override MOZ_CO_LOCALES := $(subst $(comma), ,$(MOZ_CO_LOCALES))
ifeq (all,$(MOZ_CO_LOCALES))
MOZCONFIG_MODULES += $(foreach project,$(MOZ_PROJECT_LIST),mozilla/$(project)/locales/all-locales)
LOCALE_CO_DIRS := $(sort $(foreach project,$(MOZ_PROJECT_LIST),$(foreach locale,$(shell cat mozilla/$(project)/locales/all-locales),$(foreach dir,$(LOCALES_$(project)),l10n/$(locale)/$(dir)))))
else # MOZ_CO_LOCALES != all
LOCALE_CO_DIRS = $(sort $(foreach locale,$(MOZ_CO_LOCALES),$(foreach dir,$(LOCALE_DIRS),l10n/$(locale)/$(dir))))
endif
CVSCO_LOCALES := $(CVS) $(CVS_FLAGS) -d $(LOCALES_CVSROOT) co $(LOCALES_CO_FLAGS) $(CVS_CO_LOCALES_DATE_FLAGS) $(LOCALE_CO_DIRS)
FASTUPDATE_LOCALES := fast_update $(CVSCO_LOCALES)
CHECKOUT_LOCALES := cvs_co $(CVSCO_LOCALES)
endif #MOZ_CO_LOCALES
CONFIGURES += $(TOPSRCDIR)/nsprpub/configure
#######################################################################
# Rules
#
# The default rule is build
build::
# Print out any options loaded from mozconfig.
all build checkout clean depend distclean export libs install realclean::
all build clean depend distclean export libs install realclean::
@if test -f .mozconfig.out; then \
cat .mozconfig.out; \
rm -f .mozconfig.out; \
else true; \
fi
ifdef _IS_FIRST_CHECKOUT
all:: checkout build
else
all:: checkout alldep
endif
# Windows equivalents
pull_all: checkout
build_all: build
build_all_dep: alldep
build_all_depend: alldep
clobber clobber_all: clean
pull_and_build_all: checkout alldep
# Do everything from scratch
everything: checkout clean build
####################################
# CVS checkout
#
checkout::
# @: Backup the last checkout log.
@if test -f $(CVSCO_LOGFILE) ; then \
mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
else true; \
fi
ifdef RUN_AUTOCONF_LOCALLY
@echo "Removing local configures" ; \
cd $(ROOTDIR) && \
$(RM) -f $(CONFIGURES)
endif
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
@echo '$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
cd $(ROOTDIR) && \
$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)
@cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_checkout
# Start the checkout. Split the output to the tty and a log file.
real_checkout:
@set -e; \
cvs_co() { set -e; echo "$$@" ; \
"$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
cvs_co $(CVSCO_NSPR); \
cvs_co $(CVSCO_NSS); \
cvs_co $(CVSCO_LDAPCSDK); \
$(CHECKOUT_MODULES_NS); \
$(CHECKOUT_MODULES) \
$(CHECKOUT_LOCALES);
@echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE)
# update the NSS checkout timestamp, if we checked PSM out
@if test -d $(TOPSRCDIR)/security/manager -a \
`egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \
touch $(TOPSRCDIR)/security/manager/.nss.checkout; \
fi
ifdef RUN_AUTOCONF_LOCALLY
cd $(ROOTDIR) && \
$(RM) -f $(CONFIGURES)
endif
# @: Check the log for conflicts. ;
@conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
if test "$$conflicts" ; then \
echo "$(MAKE): *** Conflicts during checkout." ;\
echo "$$conflicts" ;\
echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
false; \
else true; \
fi
fast-update:
# @: Backup the last checkout log.
@if test -f $(CVSCO_LOGFILE) ; then \
mv $(CVSCO_LOGFILE) $(CVSCO_LOGFILE).old; \
else true; \
fi
ifdef RUN_AUTOCONF_LOCALLY
@echo "Removing local configures" ; \
cd $(ROOTDIR) && \
$(RM) -f $(CONFIGURES)
endif
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
@echo '$(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
cd $(ROOTDIR) && \
$(CVSCO) mozilla/client.mk $(MOZCONFIG_MODULES)
@cd $(TOPSRCDIR) && \
$(MAKE) -f client.mk real_fast-update
# Start the update. Split the output to the tty and a log file.
real_fast-update:
@set -e; \
fast_update() { set -e; config/cvsco-fast-update.pl $$@ 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
cvs_co() { set -e; echo "$$@" ; \
"$$@" 2>&1 | tee -a $(CVSCO_LOGFILE); }; \
fast_update $(CVSCO_NSPR); \
cd $(ROOTDIR); \
cvs_co $(CVSCO_NSS); \
cd mozilla; \
fast_update $(CVSCO_LDAPCSDK); \
$(FASTUPDATE_MODULES); \
$(FASTUPDATE_MODULES_NS); \
$(FASTUPDATE_LOCALES);
@echo "fast_update finish: "`date` | tee -a $(CVSCO_LOGFILE)
# update the NSS checkout timestamp
@if test `egrep -c '^(U|C) mozilla/security/(nss|coreconf)' $(CVSCO_LOGFILE) 2>/dev/null` != 0; then \
touch $(TOPSRCDIR)/security/manager/.nss.checkout; \
fi
ifdef RUN_AUTOCONF_LOCALLY
cd $(ROOTDIR) && \
$(RM) -f $(CONFIGURES)
endif
# @: Check the log for conflicts. ;
@conflicts=`egrep "^C " $(CVSCO_LOGFILE)` ;\
if test "$$conflicts" ; then \
echo "$(MAKE): *** Conflicts during fast-update." ;\
echo "$$conflicts" ;\
echo "$(MAKE): Refer to $(CVSCO_LOGFILE) for full log." ;\
false; \
else true; \
fi
CVSCO_LOGFILE_L10N := $(ROOTDIR)/cvsco-l10n.log
CVSCO_LOGFILE_L10N := $(shell echo $(CVSCO_LOGFILE_L10N) | sed s%//%/%)
l10n-checkout:
# @: Backup the last checkout log.
@if test -f $(CVSCO_LOGFILE_L10N) ; then \
mv $(CVSCO_LOGFILE_L10N) $(CVSCO_LOGFILE_L10N).old; \
else true; \
fi
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE_L10N)
@echo '$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)'; \
cd $(ROOTDIR) && \
$(CVSCO) $(CVS_CO_DATE_FLAGS) mozilla/client.mk $(MOZCONFIG_MODULES)
@cd $(ROOTDIR) && $(MAKE) -f mozilla/client.mk real_l10n-checkout
FULL_EN_US_DIRS := toolkit \
extensions \
$(MOZ_PROJECT_LIST) \
$(NULL)
EN_US_LOCALE_DIRS := $(foreach dir, \
$(filter-out toolkit extensions/% $(MOZ_PROJECT_LIST), $(LOCALE_DIRS)), \
mozilla/$(dir)/locales)
EN_US_CO_DIRS := $(EN_US_LOCALE_DIRS) \
$(foreach mod,$(FULL_EN_US_DIRS),mozilla/$(mod)) \
mozilla/client.mk \
mozilla/configure \
mozilla/configure.in \
mozilla/allmakefiles.sh \
mozilla/build \
mozilla/config \
$(NULL)
# Start the checkout. Split the output to the tty and a log file.
real_l10n-checkout:
@set -e; \
cvs_co() { set -e; echo "$$@" ; \
"$$@" 2>&1 | tee -a $(CVSCO_LOGFILE_L10N); }; \
cvs_co $(CVS) $(CVS_FLAGS) co $(MODULES_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(EN_US_CO_DIRS); \
cvs_co $(CVSCO_LOCALES)
@echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE_L10N)
# @: Check the log for conflicts. ;
@conflicts=`egrep "^C " $(CVSCO_LOGFILE_L10N)` ;\
if test "$$conflicts" ; then \
echo "$(MAKE): *** Conflicts during checkout." ;\
echo "$$conflicts" ;\
echo "$(MAKE): Refer to $(CVSCO_LOGFILE_L10N) for full log." ;\
false; \
else true; \
fi
#####################################################
# First Checkout
ifdef _IS_FIRST_CHECKOUT
# First time, do build target in a new process to pick up new files.
build::
$(MAKE) -f $(TOPSRCDIR)/client.mk build
else
#####################################################
# After First Checkout
everything: clean build
#####################################################
# Build date unification
@ -1009,10 +252,6 @@ $(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
$(TOPSRCDIR)/nsprpub/configure: $(TOPSRCDIR)/nsprpub/configure.in $(EXTRA_CONFIG_DEPS)
@echo Generating $@ using autoconf
cd $(TOPSRCDIR)/nsprpub; $(AUTOCONF)
$(TOPSRCDIR)/directory/c-sdk/configure: $(TOPSRCDIR)/directory/c-sdk/configure.in $(EXTRA_CONFIG_DEPS)
@echo Generating $@ using autoconf
cd $(TOPSRCDIR)/directory/c-sdk; $(AUTOCONF)
endif
CONFIG_STATUS_DEPS := \
@ -1153,9 +392,6 @@ cleansrcdir:
build/autoconf/clean-config.sh; \
fi;
# (! IS_FIRST_CHECKOUT)
endif
echo-variable-%:
@echo $($*)

115
client.py Normal file
View File

@ -0,0 +1,115 @@
#!/usr/bin/python
NSPR_CO_TAG = 'NSPR_HEAD_20071016'
NSS_CO_TAG = 'NSS_3_12_ALPHA_2B'
NSPR_DIRS = ('nsprpub',)
NSS_DIRS = ('dbm',
'security/nss',
'security/coreconf',
'security/dbm')
# URL of the default hg repository to clone for Tamarin.
DEFAULT_TAMARIN_REPO = 'http://hg.mozilla.org/tamarin-central/'
import os
import sys
from optparse import OptionParser
topsrcdir = os.path.dirname(__file__)
if topsrcdir == '':
topsrcdir = '.'
try:
from subprocess import check_call
except ImportError:
import subprocess
def check_call(*popenargs, **kwargs):
retcode = subprocess.call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise Exception("Command '%s' returned non-zero exit status %i" % (cmd, retcode))
def check_call_noisy(cmd, *args, **kwargs):
print "Executing command:", cmd
check_call(cmd, *args, **kwargs)
def do_hg_pull(dir, repository, hg):
fulldir = os.path.join(topsrcdir, dir)
# clone if the dir doesn't exist, pull if it does
if not os.path.exists(fulldir):
fulldir = os.path.join(topsrcdir, dir)
check_call_noisy([hg, 'clone', repository, fulldir])
else:
cmd = [hg, 'pull', '-u', '-R', fulldir]
if repository is not None:
cmd.append(repository)
check_call_noisy(cmd)
def do_cvs_checkout(modules, tag, cvsroot, cvs):
"""Check out a CVS directory.
modules is a list of directories to check out, e.g. ['nsprpub']
"""
for module in modules:
(parent, leaf) = os.path.split(module)
check_call_noisy([cvs, '-d', cvsroot,
'checkout', '-P', '-r', tag, '-d', leaf,
'mozilla/%s' % module],
cwd=os.path.join(topsrcdir, parent))
o = OptionParser(usage="client.py [options] checkout")
o.add_option("-m", "--mozilla-repo", dest="mozilla_repo",
default=None,
help="URL of Mozilla repository to pull from (default: use hg default in .hg/hgrc)")
o.add_option("-t", "--tamarin-repo", dest="tamarin_repo",
default=None,
help="URL of Tamarin repository to pull from (default: use hg default in js/tamarin/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULT_TAMARIN_REPO + "\".)")
o.add_option("--hg", dest="hg", default=os.environ.get('HG', 'hg'),
help="The location of the hg binary")
o.add_option("--cvs", dest="cvs", default=os.environ.get('CVS', 'cvs'),
help="The location of the cvs binary")
o.add_option("--cvsroot", dest="cvsroot",
default=os.environ.get('CVSROOT', ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot'),
help="The CVSROOT (default: :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot")
def fixup_repo_options(options):
""" Check options.mozilla_repo and options.tamarin_repo values;
populate tamarin_repo if needed.
options.mozilla_repo and options.tamarin_repo are normally None.
This is fine-- our "hg pull" commands will omit the repo URL.
The exception is the initial checkout, which does an "hg clone"
for Tamarin. That command requires a repository URL.
"""
if (options.mozilla_repo is None
and not os.path.exists(os.path.join(topsrcdir, '.hg'))):
o.print_help()
print
print "*** The -m option is required for the initial checkout."
sys.exit(2)
# Handle special case: initial checkout of Tamarin.
if (options.tamarin_repo is None
and not os.path.exists(os.path.join(topsrcdir, 'js', 'tamarin'))):
options.tamarin_repo = DEFAULT_TAMARIN_REPO
try:
(options, (action,)) = o.parse_args()
except ValueError:
o.print_help()
sys.exit(2)
fixup_repo_options(options)
if action in ('checkout', 'co'):
do_cvs_checkout(NSPR_DIRS, NSPR_CO_TAG, options.cvsroot, options.cvs)
do_cvs_checkout(NSS_DIRS, NSS_CO_TAG, options.cvsroot, options.cvs)
do_hg_pull('js/tamarin', options.tamarin_repo, options.hg)
do_hg_pull('.', options.mozilla_repo, options.hg)
else:
o.print_help()
sys.exit(2)

View File

@ -214,9 +214,7 @@ MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
MOZ_MATHML = @MOZ_MATHML@
MOZ_PERMISSIONS = @MOZ_PERMISSIONS@
MOZ_XTF = @MOZ_XTF@
MOZ_XMLEXTRAS = @MOZ_XMLEXTRAS@
MOZ_NO_INSPECTOR_APIS = @MOZ_NO_INSPECTOR_APIS@
MOZ_WEBSERVICES = @MOZ_WEBSERVICES@
MOZ_SVG = @MOZ_SVG@
MOZ_SVG_FOREIGNOBJECT = @MOZ_SVG_FOREIGNOBJECT@
MOZ_LIBART_CFLAGS = @MOZ_LIBART_CFLAGS@

View File

@ -930,7 +930,7 @@ else
ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
$(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
ifdef HOST_CPPSRCS
ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
$(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXXFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
$(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_CFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)

View File

@ -4109,7 +4109,7 @@ MOZ_BRANDING_DIRECTORY=
MOZ_CALENDAR=
MOZ_DBGRINFO_MODULES=
MOZ_ENABLE_CANVAS=1
MOZ_EXTENSIONS_ALL=" wallet xml-rpc venkman inspector irc typeaheadfind gnomevfs sroaming datetime finger cview layout-debug tasks sql xforms schema-validation reporter"
MOZ_EXTENSIONS_ALL=" wallet p3p venkman inspector irc typeaheadfind gnomevfs sroaming datetime finger cview layout-debug tasks sql xforms schema-validation reporter"
MOZ_FEEDS=1
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp xbm icon"
MOZ_IMG_ENCODERS_DEFAULT="png jpeg"
@ -4130,7 +4130,7 @@ MOZ_NO_ACTIVEX_SUPPORT=1
MOZ_NO_INSPECTOR_APIS=
MOZ_NO_XPCOM_OBSOLETE=
MOZ_NO_FAST_LOAD=
MOZ_OJI=1
MOZ_OJI=
MOZ_PERMISSIONS=1
MOZ_PLACES=
MOZ_PLAINTEXT_EDITOR_ONLY=
@ -4162,8 +4162,6 @@ MOZ_URL_CLASSIFIER=
MOZ_USE_NATIVE_UCONV=
MOZ_V1_STRING_ABI=
MOZ_VIEW_SOURCE=1
MOZ_WEBSERVICES=
MOZ_XMLEXTRAS=1
MOZ_XPFE_COMPONENTS=1
MOZ_XPINSTALL=1
MOZ_XSLT_STANDALONE=
@ -5045,10 +5043,10 @@ MOZ_ARG_DISABLE_BOOL(plugins,
dnl ========================================================
dnl = Open JVM Interface (OJI) support
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(oji,
[ --disable-oji Disable Open JVM Integration support],
MOZ_OJI=,
MOZ_OJI=1)
MOZ_ARG_ENABLE_BOOL(oji,
[ --enable-oji Enable Open JVM Integration support],
MOZ_OJI=1,
MOZ_OJI=)
if test -n "$MOZ_OJI"; then
AC_DEFINE(OJI)
fi
@ -5233,22 +5231,6 @@ MOZ_ARG_DISABLE_BOOL(inspector-apis,
MOZ_NO_INSPECTOR_APIS=1,
MOZ_NO_INSPECTOR_APIS= )
dnl ========================================================
dnl XMLExtras
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(xmlextras,
[ --disable-xmlextras Disable XMLExtras such as XPointer support ],
MOZ_XMLEXTRAS=,
MOZ_XMLEXTRAS=1 )
dnl ========================================================
dnl Webservices
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(webservices,
[ --enable-webservices Enable Webservices/SOAP support ],
MOZ_WEBSERVICES=1,
MOZ_WEBSERVICES= )
dnl ========================================================
dnl Pref extensions (autoconfig and system-pref)
dnl ========================================================
@ -5445,21 +5427,11 @@ if test `echo "$MOZ_EXTENSIONS" | grep -c auth` -ne 0; then
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|auth||g'`
fi
if test `echo "$MOZ_EXTENSIONS" | grep -c xmlextras` -ne 0; then
AC_MSG_WARN([xmlextras is no longer an extension, use --disable-xmlextras to disable.])
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlextras||g'`
fi
if test `echo "$MOZ_EXTENSIONS" | grep -c 'cookie\|permissions'` -ne 0; then
AC_MSG_WARN([cookie and permissions are no longer extensions, use --disable-permissions to disable.])
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|cookie||g; s|permissions||g'`
fi
if test `echo "$MOZ_EXTENSIONS" | grep -c webservices` -ne 0; then
AC_MSG_WARN([webservices is no longer an extension, use --disable-webservices to disable.])
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|webservices||g'`
fi
if test `echo "$MOZ_EXTENSIONS" | grep -c pref` -ne 0; then
AC_MSG_WARN([pref is no longer an extension, use --disable-pref-extensions to disable.])
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|pref||g'`
@ -7418,9 +7390,7 @@ AC_SUBST(MOZ_AUTH_EXTENSION)
AC_SUBST(MOZ_MATHML)
AC_SUBST(MOZ_PERMISSIONS)
AC_SUBST(MOZ_XTF)
AC_SUBST(MOZ_XMLEXTRAS)
AC_SUBST(MOZ_NO_INSPECTOR_APIS)
AC_SUBST(MOZ_WEBSERVICES)
AC_SUBST(MOZ_PREF_EXTENSIONS)
AC_SUBST(MOZ_SVG)
AC_SUBST(MOZ_SVG_FOREIGNOBJECT)

View File

@ -22,25 +22,6 @@
//\\// GLOBAL DATA
NPNetscapeFuncs* g_pNavigatorFuncs = 0;
JRIGlobalRef Private_GetJavaClass(void);
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// Private_GetJavaClass (global function)
//
// Given a Java class reference (thru NPP_GetJavaClass) inform JRT
// of this class existence
//
JRIGlobalRef
Private_GetJavaClass(void)
{
jref clazz = NPP_GetJavaClass();
if (clazz) {
JRIEnv* env = NPN_GetJavaEnv();
return JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
@ -121,14 +102,6 @@ NP_Initialize(NPNetscapeFuncs* pFuncs)
g_pluginFuncs->urlnotify = NPP_URLNotify;
}
#ifdef WIN32 // An ugly hack, because Win16 lags behind in Java
if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) {
#else
if( navMinorVers >= NPVERS_WIN16_HAS_LIVECONNECT )
#endif // WIN32
g_pluginFuncs->javaClass = Private_GetJavaClass();
}
// NPP_Initialize is a standard (cross-platform) initialize function.
return NPP_Initialize();
}
@ -313,17 +286,7 @@ void NPN_ReloadPlugins(NPBool reloadPages)
g_pNavigatorFuncs->reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
return g_pNavigatorFuncs->getJavaEnv();
}
jref NPN_GetJavaPeer(NPP instance)
{
return g_pNavigatorFuncs->getJavaPeer(instance);
}
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *result)
{
return g_pNavigatorFuncs->getvalue(instance, variable, result);
}
}

View File

@ -46,7 +46,6 @@ include $(DEPTH)/config/autoconf.mk
MODULE = js
LIBRARY_NAME = mozjs
LIB_IS_C_ONLY = 1
GRE_MODULE = 1
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
@ -65,42 +64,42 @@ ifndef JS_STATIC_BUILD
FORCE_SHARED_LIB = 1
endif
CSRCS = \
jsapi.c \
jsarena.c \
jsarray.c \
jsatom.c \
jsbool.c \
jscntxt.c \
jsdate.c \
jsdbgapi.c \
jsdhash.c \
jsdtoa.c \
jsemit.c \
jsexn.c \
jsfun.c \
jsgc.c \
jshash.c \
jsinterp.c \
jsiter.c \
jslock.c \
jslog2.c \
jslong.c \
jsmath.c \
jsnum.c \
jsobj.c \
jsopcode.c \
jsparse.c \
jsprf.c \
jsregexp.c \
jsscan.c \
jsscope.c \
jsscript.c \
jsstr.c \
jsutil.c \
jsxdrapi.c \
jsxml.c \
prmjtime.c \
CPPSRCS = \
jsapi.cpp \
jsarena.cpp \
jsarray.cpp \
jsatom.cpp \
jsbool.cpp \
jscntxt.cpp \
jsdate.cpp \
jsdbgapi.cpp \
jsdhash.cpp \
jsdtoa.cpp \
jsemit.cpp \
jsexn.cpp \
jsfun.cpp \
jsgc.cpp \
jshash.cpp \
jsinterp.cpp \
jsiter.cpp \
jslock.cpp \
jslog2.cpp \
jslong.cpp \
jsmath.cpp \
jsnum.cpp \
jsobj.cpp \
jsopcode.cpp \
jsparse.cpp \
jsprf.cpp \
jsregexp.cpp \
jsscan.cpp \
jsscope.cpp \
jsscript.cpp \
jsstr.cpp \
jsutil.cpp \
jsxdrapi.cpp \
jsxml.cpp \
prmjtime.cpp \
$(NULL)
ifdef HAVE_DTRACE
@ -182,7 +181,7 @@ include $(topsrcdir)/config/config.mk
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
# When using gcc the assembly is inlined in the C-file (see jslock.c)
# When using gcc the assembly is inlined in the C-file (see jslock.cpp)
ifeq ($(OS_ARCH),SunOS)
ifneq (86,$(findstring 86,$(OS_TEST)))
ifndef GNU_CC
@ -213,6 +212,7 @@ JSJAVA_CFLAGS = \
HOST_SIMPLE_PROGRAMS += host_jskwgen$(HOST_BIN_SUFFIX)
GARBAGE += jsautokw.h host_jskwgen$(HOST_BIN_SUFFIX)
USE_HOST_CXX = 1
ifdef HAVE_DTRACE
ifneq ($(OS_ARCH),Darwin)
@ -322,27 +322,27 @@ endif
ifeq ($(OS_ARCH),IRIX)
ifndef GNU_CC
_COMPILE_CFLAGS = $(patsubst -O%,-O1,$(COMPILE_CFLAGS))
jsapi.o jsxdrapi.o jsarena.o jsarray.o jsatom.o jsemit.o jsfun.o jsinterp.o jsregexp.o jsparse.o jsopcode.o jsscript.o: %.o: %.c Makefile.in
jsapi.o jsxdrapi.o jsarena.o jsarray.o jsatom.o jsemit.o jsfun.o jsinterp.o jsregexp.o jsparse.o jsopcode.o jsscript.o: %.o: %.cpp Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(CC) -o $@ -c $(_COMPILE_CFLAGS) $<
@$(MAKE_DEPS_AUTO_CXX)
$(CXX) -o $@ -c $(_COMPILE_CFLAGS) $<
endif
endif
# An AIX Optimization bug causes PR_dtoa() & JS_dtoa to produce wrong result.
# This suppresses optimization for this single compilation unit.
ifeq ($(OS_ARCH),AIX)
jsatom.o: jsatom.c Makefile.in
jsatom.o: jsatom.cpp Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(CC) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
jsdtoa.o: jsdtoa.c Makefile.in
@$(MAKE_DEPS_AUTO_CXX)
$(CXX) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
jsdtoa.o: jsdtoa.cpp Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(CC) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
@$(MAKE_DEPS_AUTO_CXX)
$(CXX) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
endif
jsopcode.h jsopcode.c: jsopcode.tbl
jsopcode.h jsopcode.cpp: jsopcode.tbl
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
jsautocfg.h:
@ -363,8 +363,8 @@ endif
# Needs to be built with the host compiler but needs to include
# the mdcpucfg for the target so it needs the appropriate target defines
ifdef HOST_NSPR_MDCPUCFG
HOST_CC := $(HOST_CC) -DMDCPUCFG=$(TARGET_NSPR_MDCPUCFG)
HOST_CFLAGS := $(patsubst -DXP_%,,$(HOST_CFLAGS))
HOST_CXX := $(HOST_CXX) -DMDCPUCFG=$(TARGET_NSPR_MDCPUCFG)
HOST_CXXFLAGS := $(patsubst -DXP_%,,$(HOST_CXXFLAGS))
endif
ifdef CROSS_COMPILE
@ -388,19 +388,19 @@ endif
ifeq ($(OS_ARCH),QNX)
ifneq ($(OS_TARGET),NTO)
# QNX's compiler apparently can't build a binary directly from a source file.
jscpucfg.o: jscpucfg.c Makefile.in
$(HOST_CC) $(HOST_CFLAGS) -c $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) -o $@ $<
jscpucfg.o: jscpucfg.cpp Makefile.in
$(HOST_CXX) $(HOST_CXXFLAGS) -c $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) -o $@ $<
jscpucfg: jscpucfg.o
$(HOST_CC) $(HOST_CFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -o $@ $<
$(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -o $@ $<
endif
else
ifeq ($(OS_ARCH),WINCE)
jscpucfg$(HOST_BIN_SUFFIX):
echo no need to build jscpucfg $<
else
jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.c Makefile.in
$(HOST_CC) $(HOST_CFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(OUTOPTION)$@ $<
jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.cpp Makefile.in
$(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(OUTOPTION)$@ $<
endif
endif

View File

@ -92,7 +92,7 @@ endif
# Prevent floating point errors caused by VC++ optimizations
ifeq ($(OS_ARCH),WINNT)
_MSC_VER = $(shell $(CC) 2>&1 | sed -n 's/.*Compiler Version \([0-9]*\)\.\([0-9]*\).*/\1\2/p')
_MSC_VER = $(shell $(CXX) 2>&1 | sed -n 's/.*Compiler Version \([0-9]*\)\.\([0-9]*\).*/\1\2/p')
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
CFLAGS += -Op
else
@ -198,42 +198,42 @@ OTHER_HFILES += $(OBJDIR)/jsautokw.h
HFILES = $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES)
JS_CFILES = \
jsapi.c \
jsarena.c \
jsarray.c \
jsatom.c \
jsbool.c \
jscntxt.c \
jsdate.c \
jsdbgapi.c \
jsdhash.c \
jsdtoa.c \
jsemit.c \
jsexn.c \
jsfun.c \
jsgc.c \
jshash.c \
jsinterp.c \
jsiter.c \
jslock.c \
jslog2.c \
jslong.c \
jsmath.c \
jsnum.c \
jsobj.c \
jsopcode.c \
jsparse.c \
jsprf.c \
jsregexp.c \
jsscan.c \
jsscope.c \
jsscript.c \
jsstr.c \
jsutil.c \
jsxdrapi.c \
jsxml.c \
prmjtime.c \
JS_CPPFILES = \
jsapi.cpp \
jsarena.cpp \
jsarray.cpp \
jsatom.cpp \
jsbool.cpp \
jscntxt.cpp \
jsdate.cpp \
jsdbgapi.cpp \
jsdhash.cpp \
jsdtoa.cpp \
jsemit.cpp \
jsexn.cpp \
jsfun.cpp \
jsgc.cpp \
jshash.cpp \
jsinterp.cpp \
jsiter.cpp \
jslock.cpp \
jslog2.cpp \
jslong.cpp \
jsmath.cpp \
jsnum.cpp \
jsobj.cpp \
jsopcode.cpp \
jsparse.cpp \
jsprf.cpp \
jsregexp.cpp \
jsscan.cpp \
jsscope.cpp \
jsscript.cpp \
jsstr.cpp \
jsutil.cpp \
jsxdrapi.cpp \
jsxml.cpp \
prmjtime.cpp \
$(NULL)
ifdef JS_LIVECONNECT
@ -241,13 +241,13 @@ DIRS += liveconnect
endif
ifdef JS_HAS_FILE_OBJECT
JS_CFILES += jsfile.c
JS_CPPFILES += jsfile.cpp
JS_HFILES += jsfile.h
endif
LIB_CFILES = $(JS_CFILES)
LIB_CPPFILES = $(JS_CPPFILES)
LIB_ASFILES := $(wildcard *_$(OS_ARCH).s)
PROG_CFILES = js.c
PROG_CPPFILES = js.cpp
ifdef USE_MSVC
LIBRARY = $(OBJDIR)/js32.lib
@ -276,28 +276,28 @@ GARBAGE += $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
$(OBJDIR)/jsscan.$(OBJ_SUFFIX): $(OBJDIR)/jsautokw.h jskeyword.tbl
$(OBJDIR)/jskwgen.$(OBJ_SUFFIX): jskwgen.c jskeyword.tbl
$(OBJDIR)/jskwgen.$(OBJ_SUFFIX): jskwgen.cpp jskeyword.tbl
$(OBJDIR)/jsautokw.h: $(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX) jskeyword.tbl
$(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX) $@
ifdef USE_MSVC
$(OBJDIR)/jskwgen.obj: jskwgen.c jskeyword.tbl
$(OBJDIR)/jskwgen.obj: jskwgen.cpp jskeyword.tbl
@$(MAKE_OBJDIR)
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
$(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
else
$(OBJDIR)/jskwgen.o: jskwgen.c jskeyword.tbl
$(OBJDIR)/jskwgen.o: jskwgen.cpp jskeyword.tbl
@$(MAKE_OBJDIR)
$(CC) -o $@ -c $(CFLAGS) $<
$(CXX) -o $@ -c $(CFLAGS) $<
$(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
$(CXX) -o $@ $(CFLAGS) $(LDFLAGS) $^
endif
@ -310,24 +310,24 @@ $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
else
$(PROGRAM): $(PROG_OBJS) $(LIBRARY)
$(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
$(CXX) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
$(PROG_LIBS)
endif
$(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY)
purify $(PUREFLAGS) \
$(CC) -o $@ $(PURE_OS_CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) \
$(CXX) -o $@ $(PURE_OS_CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) \
$(OTHER_LIBS) $(PROG_LIBS)
ifndef PREBUILT_CPUCFG
$(HFILES) $(CFILES): $(OBJDIR)/jsautocfg.h
$(HFILES) $(CPPFILES): $(OBJDIR)/jsautocfg.h
$(OBJDIR)/jsautocfg.h: $(OBJDIR)/jscpucfg
rm -f $@
$(OBJDIR)/jscpucfg > $@
$(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
$(CC) -o $@ $(OBJDIR)/jscpucfg.o
$(CXX) -o $@ $(OBJDIR)/jscpucfg.o
# Add to TARGETS for clobber rule
TARGETS += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \
@ -337,7 +337,7 @@ endif
#
# Hardwire dependencies on jsopcode.tbl
#
jsopcode.h jsopcode.c: jsopcode.tbl
jsopcode.h jsopcode.cpp: jsopcode.tbl
-include $(DEPENDENCIES)
@ -345,5 +345,5 @@ TARNAME = jsref.tar
TARFILES = files `cat files`
SUFFIXES: .i
%.i: %.c
$(CC) -C -E $(CFLAGS) $< > $*.i
%.i: %.cpp
$(CXX) -C -E $(CFLAGS) $< > $*.i

View File

@ -49,7 +49,7 @@ CFLAGS += -Wall -Wno-format
OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
RANLIB = ranlib
MKSHLIB = $(CC) -dynamiclib $(XMKSHLIBOPTS) -framework System
MKSHLIB = $(CCC) -dynamiclib $(XMKSHLIBOPTS) -framework System
SO_SUFFIX = dylib

View File

@ -43,15 +43,15 @@
#
ifdef USE_MSVC
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CFILES:.c=.obj))
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CFILES:.c=.obj))
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CPPFILES:.cpp=.obj))
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CPPFILES:.cpp=.obj))
else
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CFILES:.c=.o))
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CPPFILES:.cpp=.o))
LIB_OBJS += $(addprefix $(OBJDIR)/, $(LIB_ASFILES:.s=.o))
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CFILES:.c=.o))
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CPPFILES:.cpp=.o))
endif
CFILES = $(LIB_CFILES) $(PROG_CFILES)
CPPFILES = $(LIB_CPPFILES) $(PROG_CPPFILES)
OBJS = $(LIB_OBJS) $(PROG_OBJS)
ifdef USE_MSVC
@ -68,36 +68,36 @@ ifneq "$(strip $(TARGETS))" ""
endif
+$(LOOP_OVER_DIRS)
$(OBJDIR)/%: %.c
$(OBJDIR)/%: %.cpp
@$(MAKE_OBJDIR)
$(CC) -o $@ $(CFLAGS) $*.c $(LDFLAGS)
$(CXX) -o $@ $(CFLAGS) $*.cpp $(LDFLAGS)
# This rule must come before the rule with no dep on header
$(OBJDIR)/%.o: %.c %.h
$(OBJDIR)/%.o: %.cpp %.h
@$(MAKE_OBJDIR)
$(CC) -o $@ -c $(CFLAGS) $*.c
$(CXX) -o $@ -c $(CFLAGS) $*.cpp
$(OBJDIR)/%.o: %.c
$(OBJDIR)/%.o: %.cpp
@$(MAKE_OBJDIR)
$(CC) -o $@ -c $(CFLAGS) $*.c
$(CXX) -o $@ -c $(CFLAGS) $*.cpp
$(OBJDIR)/%.o: %.s
@$(MAKE_OBJDIR)
$(AS) -o $@ $(ASFLAGS) $*.s
# This rule must come before rule with no dep on header
$(OBJDIR)/%.obj: %.c %.h
$(OBJDIR)/%.obj: %.cpp %.h
@$(MAKE_OBJDIR)
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.cpp
$(OBJDIR)/%.obj: %.c
$(OBJDIR)/%.obj: %.cpp
@$(MAKE_OBJDIR)
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.cpp
$(OBJDIR)/js.obj: js.c
$(OBJDIR)/js.obj: js.cpp
@$(MAKE_OBJDIR)
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
ifeq ($(OS_ARCH),OS2)
$(LIBRARY): $(LIB_OBJS)
@ -185,7 +185,7 @@ clobber:
@cd fdlibm; $(MAKE) -f Makefile.ref clobber
depend:
gcc -MM $(CFLAGS) $(LIB_CFILES)
gcc -MM $(CFLAGS) $(LIB_CPPFILES)
tar:
tar cvf $(TARNAME) $(TARFILES)

View File

@ -46,5 +46,5 @@ MOZ_JAVAXPCOM=1
if test "$MOZ_STORAGE"; then
MOZ_PLACES=1
fi
MOZ_EXTENSIONS_DEFAULT=" xml-rpc gnomevfs"
MOZ_EXTENSIONS_DEFAULT=" gnomevfs"
MOZ_NO_XPCOM_OBSOLETE=1