This commit was manufactured by cvs2svn to create tag
'xpc_20010327_post_trunk_merge_TAG'. git-svn-id: svn://10.0.0.236/tags/xpc_20010327_post_trunk_merge_TAG@90555 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
be7ee6c4b7
commit
619f14488f
@ -1,486 +0,0 @@
|
|||||||
# The contents of this file are subject to the Netscape 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/NPL/
|
|
||||||
#
|
|
||||||
# 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 mozilla.org code.
|
|
||||||
#
|
|
||||||
# The Initial Developer of the Original Code is Netscape
|
|
||||||
# Communications Corporation. Portions created by Netscape are
|
|
||||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
||||||
# Rights Reserved.
|
|
||||||
#
|
|
||||||
# Contributor(s): Stephen Lamm
|
|
||||||
|
|
||||||
# Build the Mozilla client.
|
|
||||||
#
|
|
||||||
# This needs CVSROOT set to work, e.g.,
|
|
||||||
# setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
||||||
# or
|
|
||||||
# setenv CVSROOT :pserver:username%somedomain.org@cvs.mozilla.org:/cvsroot
|
|
||||||
#
|
|
||||||
# To checkout and build a tree,
|
|
||||||
# 1. cvs co mozilla/client.mk
|
|
||||||
# 2. cd mozilla
|
|
||||||
# 3. gmake -f client.mk
|
|
||||||
#
|
|
||||||
# Other targets (gmake -f client.mk [targets...]),
|
|
||||||
# checkout
|
|
||||||
# build
|
|
||||||
# clean (realclean is now the same as clean)
|
|
||||||
# distclean
|
|
||||||
#
|
|
||||||
# See http://www.mozilla.org/build/unix.html for more information.
|
|
||||||
#
|
|
||||||
# Options:
|
|
||||||
# MOZ_OBJDIR - Destination object directory
|
|
||||||
# MOZ_CO_DATE - Date tag to use for checkout (default: none)
|
|
||||||
# MOZ_CO_MODULE - Module to checkout (default: SeaMonkeyAll)
|
|
||||||
# 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_BRANCH - Branch tag (Depricated. Use MOZ_CO_TAG below.)
|
|
||||||
#
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# 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 = NSPRPUB_CLIENT_BRANCH
|
|
||||||
PSM_CO_TAG = #We will now build PSM from the tip instead of a branch.
|
|
||||||
NSS_CO_TAG = NSS_CLIENT_TAG
|
|
||||||
LDAPCSDK_CO_TAG = LDAPCSDK_40_BRANCH
|
|
||||||
GFX2_CO_TAG =
|
|
||||||
IMGLIB2_CO_TAG =
|
|
||||||
BUILD_MODULES = all
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Defines
|
|
||||||
#
|
|
||||||
CWD := $(shell pwd)
|
|
||||||
|
|
||||||
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
|
|
||||||
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%//%/%')
|
|
||||||
|
|
||||||
# if ROOTDIR equals only drive letter (i.e. "C:"), set to "/"
|
|
||||||
DIRNAME := $(shell echo "$(ROOTDIR)" | sed -e 's/^.://')
|
|
||||||
ifeq ($(DIRNAME),)
|
|
||||||
ROOTDIR := /.
|
|
||||||
endif
|
|
||||||
|
|
||||||
AUTOCONF := autoconf
|
|
||||||
MKDIR := mkdir
|
|
||||||
SH := /bin/sh
|
|
||||||
ifndef MAKE
|
|
||||||
MAKE := gmake
|
|
||||||
endif
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# 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
|
|
||||||
|
|
||||||
CVSCO = $(strip cvs $(CVS_FLAGS) co $(CVS_CO_FLAGS))
|
|
||||||
CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log
|
|
||||||
CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%)
|
|
||||||
|
|
||||||
ifdef MOZ_CO_TAG
|
|
||||||
CVS_CO_FLAGS := -r $(MOZ_CO_TAG)
|
|
||||||
endif
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Load mozconfig Options
|
|
||||||
|
|
||||||
# See build pages, http://www.mozilla.org/build/unix.html,
|
|
||||||
# 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/modules.mk
|
|
||||||
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)
|
|
||||||
include $(TOPSRCDIR)/.mozconfig.mk
|
|
||||||
include $(TOPSRCDIR)/build/unix/modules.mk
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Options that may come from mozconfig
|
|
||||||
|
|
||||||
# Change CVS flags if anonymous root is requested
|
|
||||||
ifdef MOZ_CO_USE_MIRROR
|
|
||||||
CVS_FLAGS := -d :pserver: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
|
|
||||||
|
|
||||||
# This option is depricated. The best way to have client.mk pull a tag
|
|
||||||
# is to set MOZ_CO_TAG (see above) and commit that change on the tag.
|
|
||||||
ifdef MOZ_CO_BRANCH
|
|
||||||
CVS_CO_FLAGS := -r $(MOZ_CO_BRANCH)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# MOZ_CO_FLAGS - Anything that we should use on all checkouts
|
|
||||||
ifeq "$(origin MOZ_CO_FLAGS)" "undefined"
|
|
||||||
CVS_CO_FLAGS := $(CVS_CO_FLAGS) -P
|
|
||||||
else
|
|
||||||
CVS_CO_FLAGS := $(CVS_CO_FLAGS) $(MOZ_CO_FLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef MOZ_CO_DATE
|
|
||||||
CVS_CO_DATE_FLAGS := -D "$(MOZ_CO_DATE)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq "$(origin MOZ_MAKE_FLAGS)" "undefined"
|
|
||||||
MOZ_MAKE_ENV :=
|
|
||||||
else
|
|
||||||
MOZ_MAKE_ENV := MAKE="$(MAKE) $(MOZ_MAKE_FLAGS)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef MOZ_OBJDIR
|
|
||||||
OBJDIR := $(MOZ_OBJDIR)
|
|
||||||
MOZ_MAKE := $(MOZ_MAKE_ENV) $(MAKE) -C $(OBJDIR)
|
|
||||||
else
|
|
||||||
OBJDIR := $(TOPSRCDIR)
|
|
||||||
MOZ_MAKE := $(MOZ_MAKE_ENV) $(MAKE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for PSM
|
|
||||||
#
|
|
||||||
PSM_CO_MODULE= mozilla/security/psm mozilla/security/manager mozilla/security/Makefile.in
|
|
||||||
PSM_CO_FLAGS := -P -A
|
|
||||||
ifdef PSM_CO_TAG
|
|
||||||
PSM_CO_FLAGS := $(PSM_CO_FLAGS) -r $(PSM_CO_TAG)
|
|
||||||
endif
|
|
||||||
CVSCO_PSM = cvs $(CVS_FLAGS) co $(PSM_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(PSM_CO_MODULE)
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for NSS
|
|
||||||
#
|
|
||||||
NSS_CO_MODULE= mozilla/security/nss mozilla/security/coreconf
|
|
||||||
NSS_CO_FLAGS := -P
|
|
||||||
ifdef NSS_CO_TAG
|
|
||||||
NSS_CO_FLAGS := $(NSS_CO_FLAGS) -r $(NSS_CO_TAG)
|
|
||||||
endif
|
|
||||||
CVSCO_NSS = cvs $(CVS_FLAGS) co $(NSS_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSS_CO_MODULE)
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for NSPR
|
|
||||||
#
|
|
||||||
NSPR_CO_MODULE = mozilla/nsprpub
|
|
||||||
NSPR_CO_FLAGS := -P
|
|
||||||
ifdef NSPR_CO_TAG
|
|
||||||
NSPR_CO_FLAGS := $(NSPR_CO_FLAGS) -r $(NSPR_CO_TAG)
|
|
||||||
endif
|
|
||||||
CVSCO_NSPR = cvs $(CVS_FLAGS) co $(NSPR_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(NSPR_CO_MODULE)
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for the C LDAP SDK
|
|
||||||
#
|
|
||||||
LDAPCSDK_CO_MODULE = mozilla/directory/c-sdk
|
|
||||||
LDAPCSDK_CO_FLAGS := -P
|
|
||||||
ifdef LDAPCSDK_CO_TAG
|
|
||||||
LDAPCSDK_CO_FLAGS := $(LDAPCSDK_CO_FLAGS) -r $(LDAPCSDK_CO_TAG)
|
|
||||||
endif
|
|
||||||
CVSCO_LDAPCSDK = cvs $(CVS_FLAGS) co $(LDAPCSDK_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(LDAPCSDK_CO_MODULE)
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for gfx2
|
|
||||||
#
|
|
||||||
GFX2_CO_MODULE = mozilla/gfx2
|
|
||||||
GFX2_CO_FLAGS := -P
|
|
||||||
ifdef GFX2_CO_TAG
|
|
||||||
GFX2_CO_FLAGS := $(GFX2_CO_FLAGS) -r $(GFX2_CO_TAG)
|
|
||||||
endif
|
|
||||||
CVSCO_GFX2 = cvs $(CVS_FLAGS) co $(GFX2_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(GFX2_CO_MODULE)
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for new image library
|
|
||||||
#
|
|
||||||
IMGLIB2_CO_MODULE = mozilla/modules/libpr0n
|
|
||||||
IMGLIB2_CO_FLAGS := -P
|
|
||||||
ifdef IMGLIB2_CO_TAG
|
|
||||||
IMGLIB2_CO_FLAGS := $(IMGLIB2_CO_FLAGS) -r $(IMGLIB2_CO_TAG)
|
|
||||||
endif
|
|
||||||
CVSCO_IMGLIB2 = cvs $(CVS_FLAGS) co $(IMGLIB2_CO_FLAGS) $(CVS_CO_DATE_FLAGS) $(IMGLIB2_CO_MODULE)
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for standalone modules
|
|
||||||
#
|
|
||||||
ifneq ($(BUILD_MODULES),all)
|
|
||||||
MOZ_CO_MODULE := $(filter-out $(NSPRPUB_DIR) security directory/c-sdk, $(BUILD_MODULE_CVS))
|
|
||||||
MOZ_CO_MODULE += allmakefiles.sh client.mk aclocal.m4 configure configure.in
|
|
||||||
MOZ_CO_MODULE += Makefile.in
|
|
||||||
MOZ_CO_MODULE := $(addprefix mozilla/, $(MOZ_CO_MODULE))
|
|
||||||
|
|
||||||
NOSUBDIRS_MODULE := $(addprefix mozilla/, $(BUILD_MODULE_CVS_NS))
|
|
||||||
ifneq ($(NOSUBDIRS_MODULE),)
|
|
||||||
CVSCO_NOSUBDIRS := $(CVSCO) -l $(CVS_CO_DATE_FLAGS) $(NOSUBDIRS_MODULE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (,$(filter $(NSPRPUB_DIR), $(BUILD_MODULE_CVS)))
|
|
||||||
CVSCO_NSPR :=
|
|
||||||
endif
|
|
||||||
ifeq (,$(filter security security/manager, $(BUILD_MODULE_CVS)))
|
|
||||||
CVSCO_PSM :=
|
|
||||||
CVSCO_NSS :=
|
|
||||||
endif
|
|
||||||
ifeq (,$(filter directory/c-sdk, $(BUILD_MODULE_CVS)))
|
|
||||||
CVSCO_LDAPCSDK :=
|
|
||||||
endif
|
|
||||||
ifeq (,$(filter gfx2, $(BUILD_MODULE_CVS)))
|
|
||||||
CVSCO_GFX2 :=
|
|
||||||
endif
|
|
||||||
ifeq (,$(filter modules/libpr0n, $(BUILD_MODULE_CVS)))
|
|
||||||
CVSCO_IMGLIB2 :=
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
# Do not pull PSM/NSS by default
|
|
||||||
CVSCO_PSM :=
|
|
||||||
CVSCO_NSS :=
|
|
||||||
endif
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# CVS defines for SeaMonkey
|
|
||||||
#
|
|
||||||
ifeq ($(MOZ_CO_MODULE),)
|
|
||||||
MOZ_CO_MODULE := SeaMonkeyAll
|
|
||||||
endif
|
|
||||||
CVSCO_SEAMONKEY := $(CVSCO) $(CVS_CO_DATE_FLAGS) $(MOZ_CO_MODULE)
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Rules
|
|
||||||
#
|
|
||||||
|
|
||||||
# Print out any options loaded from mozconfig.
|
|
||||||
all build checkout clean depend distclean export 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 depend build
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Windows equivalents
|
|
||||||
pull_all: checkout
|
|
||||||
build_all: build
|
|
||||||
clobber clobber_all: clean
|
|
||||||
pull_and_build_all: checkout depend build
|
|
||||||
|
|
||||||
# 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
|
|
||||||
@echo "checkout start: "`date` | tee $(CVSCO_LOGFILE)
|
|
||||||
@echo '$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk'; \
|
|
||||||
cd $(ROOTDIR); \
|
|
||||||
$(CVSCO) mozilla/client.mk mozilla/build/unix/modules.mk && \
|
|
||||||
$(MAKE) -f mozilla/client.mk real_checkout
|
|
||||||
|
|
||||||
real_checkout:
|
|
||||||
# @: Start the checkout. Split the output to the tty and a log file. \
|
|
||||||
# : If it fails, touch an error file because "tee" hides the error.
|
|
||||||
@failed=.cvs-failed.tmp; rm -f $$failed*; \
|
|
||||||
cvs_co() { echo "$$@" ; \
|
|
||||||
("$$@" || touch $$failed) 2>&1 | tee -a $(CVSCO_LOGFILE) && \
|
|
||||||
if test -f $$failed; then false; else true; fi; }; \
|
|
||||||
cvs_co $(CVSCO_NSPR) && \
|
|
||||||
cvs_co $(CVSCO_PSM) && \
|
|
||||||
cvs_co $(CVSCO_NSS) && \
|
|
||||||
cvs_co $(CVSCO_LDAPCSDK) && \
|
|
||||||
cvs_co $(CVSCO_GFX2) && \
|
|
||||||
cvs_co $(CVSCO_IMGLIB2) && \
|
|
||||||
cvs_co $(CVSCO_SEAMONKEY) && \
|
|
||||||
cvs_co $(CVSCO_NOSUBDIRS)
|
|
||||||
@echo "checkout finish: "`date` | tee -a $(CVSCO_LOGFILE)
|
|
||||||
# @: 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
|
|
||||||
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Web configure
|
|
||||||
|
|
||||||
WEBCONFIG_FILE := $(HOME)/.mozconfig
|
|
||||||
|
|
||||||
MOZCONFIG2CONFIGURATOR := build/autoconf/mozconfig2configurator
|
|
||||||
webconfig:
|
|
||||||
@cd $(TOPSRCDIR); \
|
|
||||||
url=`$(MOZCONFIG2CONFIGURATOR) $(TOPSRCDIR)`; \
|
|
||||||
echo Running netscape with the following url: ;\
|
|
||||||
echo ;\
|
|
||||||
echo $$url ;\
|
|
||||||
netscape -remote "openURL($$url)" || netscape $$url ;\
|
|
||||||
echo ;\
|
|
||||||
echo 1. Fill out the form on the browser. ;\
|
|
||||||
echo 2. Save the results to $(WEBCONFIG_FILE)
|
|
||||||
|
|
||||||
#####################################################
|
|
||||||
# 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
|
|
||||||
else
|
|
||||||
|
|
||||||
#####################################################
|
|
||||||
# After First Checkout
|
|
||||||
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Configure
|
|
||||||
|
|
||||||
CONFIG_STATUS := $(wildcard $(OBJDIR)/config.status)
|
|
||||||
CONFIG_CACHE := $(wildcard $(OBJDIR)/config.cache)
|
|
||||||
|
|
||||||
ifdef RUN_AUTOCONF_LOCALLY
|
|
||||||
EXTRA_CONFIG_DEPS := \
|
|
||||||
$(TOPSRCDIR)/aclocal.m4 \
|
|
||||||
$(TOPSRCDIR)/build/autoconf/gtk.m4 \
|
|
||||||
$(TOPSRCDIR)/build/autoconf/altoptions.m4 \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
$(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
|
|
||||||
@echo Generating $@ using autoconf
|
|
||||||
cd $(TOPSRCDIR); $(AUTOCONF)
|
|
||||||
endif
|
|
||||||
|
|
||||||
CONFIG_STATUS_DEPS_L10N := $(wildcard $(TOPSRCDIR)/l10n/makefiles.all)
|
|
||||||
|
|
||||||
CONFIG_STATUS_DEPS := \
|
|
||||||
$(TOPSRCDIR)/configure \
|
|
||||||
$(TOPSRCDIR)/allmakefiles.sh \
|
|
||||||
$(TOPSRCDIR)/.mozconfig.mk \
|
|
||||||
$(wildcard $(TOPSRCDIR)/nsprpub/configure) \
|
|
||||||
$(wildcard $(TOPSRCDIR)/directory/c-sdk/ldap/configure) \
|
|
||||||
$(wildcard $(TOPSRCDIR)/mailnews/makefiles) \
|
|
||||||
$(CONFIG_STATUS_DEPS_L10N) \
|
|
||||||
$(wildcard $(TOPSRCDIR)/themes/makefiles) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
# configure uses the program name to determine @srcdir@. Calling it without
|
|
||||||
# $(TOPSRCDIR) will set @srcdir@ to "."; otherwise, it is set to the full
|
|
||||||
# path of $(TOPSRCDIR).
|
|
||||||
ifeq ($(TOPSRCDIR),$(OBJDIR))
|
|
||||||
CONFIGURE := ./configure
|
|
||||||
else
|
|
||||||
CONFIGURE := $(TOPSRCDIR)/configure
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(OBJDIR)/Makefile $(OBJDIR)/config.status: $(CONFIG_STATUS_DEPS)
|
|
||||||
@if test ! -d $(OBJDIR); then $(MKDIR) $(OBJDIR); else true; fi
|
|
||||||
@echo cd $(OBJDIR);
|
|
||||||
@echo $(CONFIGURE)
|
|
||||||
@cd $(OBJDIR) && $(CONFIGURE_ENV_ARGS) $(CONFIGURE) \
|
|
||||||
|| ( echo "*** Fix above errors and then restart with\
|
|
||||||
\"$(MAKE) -f client.mk build\"" && exit 1 )
|
|
||||||
@touch $(OBJDIR)/Makefile
|
|
||||||
|
|
||||||
ifdef CONFIG_STATUS
|
|
||||||
$(OBJDIR)/config/autoconf.mk: $(TOPSRCDIR)/config/autoconf.mk.in
|
|
||||||
cd $(OBJDIR); \
|
|
||||||
CONFIG_FILES=config/autoconf.mk ./config.status
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Depend
|
|
||||||
|
|
||||||
depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
|
||||||
$(MOZ_MAKE) $@;
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Build it
|
|
||||||
|
|
||||||
build:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
|
||||||
$(MOZ_MAKE) export && $(MOZ_MAKE) install
|
|
||||||
|
|
||||||
####################################
|
|
||||||
# Other targets
|
|
||||||
|
|
||||||
# Pass these target onto the real build system
|
|
||||||
install export clean realclean distclean:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
|
|
||||||
$(MOZ_MAKE) $@
|
|
||||||
|
|
||||||
cleansrcdir:
|
|
||||||
@cd $(TOPSRCDIR); \
|
|
||||||
if [ -f webshell/embed/gtk/Makefile ]; then \
|
|
||||||
$(MAKE) -C webshell/embed/gtk distclean; \
|
|
||||||
fi; \
|
|
||||||
if [ -f Makefile ]; then \
|
|
||||||
$(MAKE) distclean ; \
|
|
||||||
else \
|
|
||||||
echo "Removing object files from srcdir..."; \
|
|
||||||
rm -fr `find . -type d \( -name .deps -print -o -name CVS \
|
|
||||||
-o -exec test ! -d {}/CVS \; \) -prune \
|
|
||||||
-o \( -name '*.[ao]' -o -name '*.so' \) -type f -print`; \
|
|
||||||
build/autoconf/clean-config.sh; \
|
|
||||||
fi;
|
|
||||||
|
|
||||||
# (! IS_FIRST_CHECKOUT)
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: checkout real_checkout depend build export install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything
|
|
||||||
@ -1,5 +1,4 @@
|
|||||||
#! gmake
|
#! gmake
|
||||||
|
|
||||||
#
|
#
|
||||||
# The contents of this file are subject to the Netscape Public License
|
# The contents of this file are subject to the Netscape Public License
|
||||||
# Version 1.1 (the "NPL"); you may not use this file except in
|
# Version 1.1 (the "NPL"); you may not use this file except in
|
||||||
|
|||||||
@ -79,14 +79,14 @@ ifeq ($(OS_ARCH), HP-UX)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MOZ_OS2_TOOLS),EMX)
|
ifeq ($(MOZ_OS2_TOOLS),EMX)
|
||||||
XCFLAGS = $(OS_EXE_CFLAGS)
|
XCFLAGS = $(OS_CFLAGS)
|
||||||
ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
|
ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
|
||||||
XLDOPTS = -Zlinker /PM:VIO
|
XLDOPTS = -Zlinker /PM:VIO
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MOZ_OS2_TOOLS),PGCC)
|
ifeq ($(MOZ_OS2_TOOLS),PGCC)
|
||||||
XCFLAGS = $(OS_EXE_CFLAGS)
|
XCFLAGS = $(OS_CFLAGS)
|
||||||
XLDOPTS = -Zlinker /PM:VIO
|
XLDOPTS = -Zlinker /PM:VIO
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -52,16 +52,23 @@ ifeq ($(OBJECT_FMT),ELF)
|
|||||||
DLL_SUFFIX = so
|
DLL_SUFFIX = so
|
||||||
else
|
else
|
||||||
DLL_SUFFIX = so.1.0
|
DLL_SUFFIX = so.1.0
|
||||||
|
# XXX work around a bug in the a.out ld(1).
|
||||||
|
OS_LIBS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DSO_CFLAGS = -fPIC -DPIC
|
DSO_CFLAGS = -fPIC -DPIC
|
||||||
DSO_LDFLAGS =
|
DSO_LDFLAGS =
|
||||||
DSO_LDOPTS = -x -shared
|
DSO_LDOPTS = -shared
|
||||||
|
ifeq ($(OBJECT_FMT),ELF)
|
||||||
ifdef LIBRUNPATH
|
DSO_LDOPTS +=-Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
|
||||||
DSO_LDOPTS += -R$(LIBRUNPATH)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
ifdef LIBRUNPATH
|
||||||
|
#DSO_LDOPTS += -R$(LIBRUNPATH)
|
||||||
|
DSO_LDOPTS += -Wl,-R$(LIBRUNPATH)
|
||||||
|
endif
|
||||||
|
|
||||||
|
#MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||||
|
MKSHLIB = $(CC) $(DSO_LDOPTS)
|
||||||
|
|
||||||
G++INCLUDES = -I/usr/include/g++
|
G++INCLUDES = -I/usr/include/g++
|
||||||
|
|||||||
@ -48,8 +48,9 @@ NSINSTALL = @NSINSTALL@
|
|||||||
FILTER = @FILTER@
|
FILTER = @FILTER@
|
||||||
IMPLIB = @IMPLIB@
|
IMPLIB = @IMPLIB@
|
||||||
|
|
||||||
OS_CFLAGS = @CFLAGS@ $(DSO_CFLAGS)
|
OS_CPPFLAGS = @CPPFLAGS@
|
||||||
OS_CXXFLAGS = @CXXFLAGS@ $(DSO_CFLAGS)
|
OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@ $(DSO_CFLAGS)
|
||||||
|
OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@ $(DSO_CFLAGS)
|
||||||
OS_LIBS = @OS_LIBS@
|
OS_LIBS = @OS_LIBS@
|
||||||
OS_LDFLAGS = @LDFLAGS@
|
OS_LDFLAGS = @LDFLAGS@
|
||||||
OS_DLLFLAGS = @OS_DLLFLAGS@
|
OS_DLLFLAGS = @OS_DLLFLAGS@
|
||||||
|
|||||||
58
mozilla/nsprpub/configure
vendored
58
mozilla/nsprpub/configure
vendored
@ -3106,6 +3106,7 @@ EOF
|
|||||||
PR_MD_ASFILES=os_Irix.s
|
PR_MD_ASFILES=os_Irix.s
|
||||||
MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
|
MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
|
||||||
#DSO_LDOPTS='-elf -shared -all'
|
#DSO_LDOPTS='-elf -shared -all'
|
||||||
|
STRIP="$STRIP -f"
|
||||||
if test -n "$USE_64"; then
|
if test -n "$USE_64"; then
|
||||||
MDCPUCFG_H=_irix64.cfg
|
MDCPUCFG_H=_irix64.cfg
|
||||||
else
|
else
|
||||||
@ -3238,6 +3239,7 @@ EOF
|
|||||||
MKSHLIB='$(LD) $(DSO_LDOPTS) -soname $(notdir $@) -o $@'
|
MKSHLIB='$(LD) $(DSO_LDOPTS) -soname $(notdir $@) -o $@'
|
||||||
DSO_CFLAGS=-fPIC
|
DSO_CFLAGS=-fPIC
|
||||||
DSO_LDOPTS=-shared
|
DSO_LDOPTS=-shared
|
||||||
|
OS_LIBS="$OS_LIBS -lc"
|
||||||
case "${target_cpu}" in
|
case "${target_cpu}" in
|
||||||
alpha)
|
alpha)
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
@ -3635,6 +3637,8 @@ EOF
|
|||||||
CXXFLAGS="$CXXFLAGS -ansi -Wall -pipe"
|
CXXFLAGS="$CXXFLAGS -ansi -Wall -pipe"
|
||||||
DLL_SUFFIX=so.1.0
|
DLL_SUFFIX=so.1.0
|
||||||
DSO_CFLAGS=-fPIC
|
DSO_CFLAGS=-fPIC
|
||||||
|
MDCPUCFG_H=_openbsd.cfg
|
||||||
|
PR_MD_CSRCS=openbsd.c
|
||||||
case "$OS_TEST" in
|
case "$OS_TEST" in
|
||||||
alpha|mips|pmax)
|
alpha|mips|pmax)
|
||||||
DSO_LDOPTS=-shared ;;
|
DSO_LDOPTS=-shared ;;
|
||||||
@ -4077,14 +4081,17 @@ EOF
|
|||||||
LD='$(CC)'
|
LD='$(CC)'
|
||||||
IMPLIB='emximp -o'
|
IMPLIB='emximp -o'
|
||||||
FILTER='emxexp'
|
FILTER='emxexp'
|
||||||
|
OS_DLLFLAGS='$(DSO_LDOPTS) -o $@'
|
||||||
_OPTIMIZE_FLAGS=-O3
|
_OPTIMIZE_FLAGS=-O3
|
||||||
_DEBUG_FLAGS=-g
|
_DEBUG_FLAGS=-g
|
||||||
if test -n "$MOZ_DEBUG"; then
|
if test -n "$MOZ_DEBUG"; then
|
||||||
DLLFLAGS='-g'
|
DLLFLAGS='-g'
|
||||||
EXEFLAGS='-g $(OMF_FLAG) -Zmtd -L$(DIST)/lib -o $@'
|
EXEFLAGS='-g $(OMF_FLAG) -Zmtd -L$(DIST)/lib -o $@'
|
||||||
|
DSO_LDOPTS='-g -Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO'
|
||||||
else
|
else
|
||||||
DLLFLAGS=
|
DLLFLAGS=
|
||||||
EXEFLAGS='-Zmtd -o $@'
|
EXEFLAGS='-Zmtd -o $@'
|
||||||
|
DSO_LDOPTS='-Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*-os2_vacpp)
|
*-os2_vacpp)
|
||||||
@ -4147,12 +4154,12 @@ fi
|
|||||||
if test -z "$SKIP_LIBRARY_CHECKS"; then
|
if test -z "$SKIP_LIBRARY_CHECKS"; then
|
||||||
|
|
||||||
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
||||||
echo "configure:4151: checking for dlopen" >&5
|
echo "configure:4158: checking for dlopen" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4156 "configure"
|
#line 4163 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char dlopen(); below. */
|
which can conflict with char dlopen(); below. */
|
||||||
@ -4175,7 +4182,7 @@ dlopen();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_dlopen=yes"
|
eval "ac_cv_func_dlopen=yes"
|
||||||
else
|
else
|
||||||
@ -4194,7 +4201,7 @@ else
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||||
echo "configure:4198: checking for dlopen in -ldl" >&5
|
echo "configure:4205: checking for dlopen in -ldl" >&5
|
||||||
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -4202,7 +4209,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4206 "configure"
|
#line 4213 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@ -4213,7 +4220,7 @@ int main() {
|
|||||||
dlopen()
|
dlopen()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -4240,7 +4247,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||||
echo "configure:4244: checking how to run the C preprocessor" >&5
|
echo "configure:4251: checking how to run the C preprocessor" >&5
|
||||||
# On Suns, sometimes $CPP names a directory.
|
# On Suns, sometimes $CPP names a directory.
|
||||||
if test -n "$CPP" && test -d "$CPP"; then
|
if test -n "$CPP" && test -d "$CPP"; then
|
||||||
CPP=
|
CPP=
|
||||||
@ -4255,13 +4262,13 @@ else
|
|||||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||||
# not just through cpp.
|
# not just through cpp.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4259 "configure"
|
#line 4266 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:4272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
@ -4272,13 +4279,13 @@ else
|
|||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -E -traditional-cpp"
|
CPP="${CC-cc} -E -traditional-cpp"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4276 "configure"
|
#line 4283 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:4282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:4289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
@ -4289,13 +4296,13 @@ else
|
|||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -nologo -E"
|
CPP="${CC-cc} -nologo -E"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4293 "configure"
|
#line 4300 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:4299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:4306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
@ -4321,13 +4328,13 @@ echo "$ac_t""$CPP" 1>&6
|
|||||||
|
|
||||||
if test $ac_cv_prog_gcc = yes; then
|
if test $ac_cv_prog_gcc = yes; then
|
||||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||||
echo "configure:4325: checking whether ${CC-cc} needs -traditional" >&5
|
echo "configure:4332: checking whether ${CC-cc} needs -traditional" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_pattern="Autoconf.*'x'"
|
ac_pattern="Autoconf.*'x'"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4331 "configure"
|
#line 4338 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sgtty.h>
|
#include <sgtty.h>
|
||||||
Autoconf TIOCGETP
|
Autoconf TIOCGETP
|
||||||
@ -4345,7 +4352,7 @@ rm -f conftest*
|
|||||||
|
|
||||||
if test $ac_cv_prog_gcc_traditional = no; then
|
if test $ac_cv_prog_gcc_traditional = no; then
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4349 "configure"
|
#line 4356 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <termio.h>
|
#include <termio.h>
|
||||||
Autoconf TCGETA
|
Autoconf TCGETA
|
||||||
@ -4369,12 +4376,12 @@ fi
|
|||||||
for ac_func in lchown strerror
|
for ac_func in lchown strerror
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:4373: checking for $ac_func" >&5
|
echo "configure:4380: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4378 "configure"
|
#line 4385 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@ -4397,7 +4404,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@ -4428,7 +4435,7 @@ done
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||||
echo "configure:4432: checking for pthread_create in -lpthreads" >&5
|
echo "configure:4439: checking for pthread_create in -lpthreads" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { int a = 1; }
|
void *foo(void *v) { int a = 1; }
|
||||||
@ -4450,7 +4457,7 @@ echo "
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||||
echo "configure:4454: checking for pthread_create in -lpthread" >&5
|
echo "configure:4461: checking for pthread_create in -lpthread" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { int a = 1; }
|
void *foo(void *v) { int a = 1; }
|
||||||
@ -4472,7 +4479,7 @@ echo "
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
||||||
echo "configure:4476: checking for pthread_create in -lc_r" >&5
|
echo "configure:4483: checking for pthread_create in -lc_r" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { int a = 1; }
|
void *foo(void *v) { int a = 1; }
|
||||||
@ -4494,7 +4501,7 @@ echo "
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
||||||
echo "configure:4498: checking for pthread_create in -lc" >&5
|
echo "configure:4505: checking for pthread_create in -lc" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { int a = 1; }
|
void *foo(void *v) { int a = 1; }
|
||||||
@ -4644,7 +4651,7 @@ if test -n "$USE_PTHREADS"; then
|
|||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
ac_cv_have_dash_pthread=no
|
ac_cv_have_dash_pthread=no
|
||||||
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
|
||||||
echo "configure:4648: checking whether ${CC-cc} accepts -pthread" >&5
|
echo "configure:4655: checking whether ${CC-cc} accepts -pthread" >&5
|
||||||
echo 'int main() { return 0; }' | cat > conftest.c
|
echo 'int main() { return 0; }' | cat > conftest.c
|
||||||
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
|
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
@ -4660,7 +4667,7 @@ echo "configure:4648: checking whether ${CC-cc} accepts -pthread" >&5
|
|||||||
ac_cv_have_dash_pthreads=no
|
ac_cv_have_dash_pthreads=no
|
||||||
if test "$ac_cv_have_dash_pthread" = "no"; then
|
if test "$ac_cv_have_dash_pthread" = "no"; then
|
||||||
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
|
||||||
echo "configure:4664: checking whether ${CC-cc} accepts -pthreads" >&5
|
echo "configure:4671: checking whether ${CC-cc} accepts -pthreads" >&5
|
||||||
echo 'int main() { return 0; }' | cat > conftest.c
|
echo 'int main() { return 0; }' | cat > conftest.c
|
||||||
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
|
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
@ -4910,6 +4917,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MAKEFILES="
|
MAKEFILES="
|
||||||
|
|||||||
@ -789,6 +789,7 @@ case "$target" in
|
|||||||
PR_MD_ASFILES=os_Irix.s
|
PR_MD_ASFILES=os_Irix.s
|
||||||
MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
|
MKSHLIB='$(LD) $(DSO_LDOPTS) -rdata_shared -shared -soname $(notdir $@) -o $@'
|
||||||
#DSO_LDOPTS='-elf -shared -all'
|
#DSO_LDOPTS='-elf -shared -all'
|
||||||
|
STRIP="$STRIP -f"
|
||||||
if test -n "$USE_64"; then
|
if test -n "$USE_64"; then
|
||||||
MDCPUCFG_H=_irix64.cfg
|
MDCPUCFG_H=_irix64.cfg
|
||||||
else
|
else
|
||||||
@ -885,6 +886,7 @@ case "$target" in
|
|||||||
MKSHLIB='$(LD) $(DSO_LDOPTS) -soname $(notdir $@) -o $@'
|
MKSHLIB='$(LD) $(DSO_LDOPTS) -soname $(notdir $@) -o $@'
|
||||||
DSO_CFLAGS=-fPIC
|
DSO_CFLAGS=-fPIC
|
||||||
DSO_LDOPTS=-shared
|
DSO_LDOPTS=-shared
|
||||||
|
OS_LIBS="$OS_LIBS -lc"
|
||||||
case "${target_cpu}" in
|
case "${target_cpu}" in
|
||||||
alpha)
|
alpha)
|
||||||
AC_DEFINE(_ALPHA_)
|
AC_DEFINE(_ALPHA_)
|
||||||
@ -1147,6 +1149,8 @@ mips-sony-newsos*)
|
|||||||
CXXFLAGS="$CXXFLAGS -ansi -Wall -pipe"
|
CXXFLAGS="$CXXFLAGS -ansi -Wall -pipe"
|
||||||
DLL_SUFFIX=so.1.0
|
DLL_SUFFIX=so.1.0
|
||||||
DSO_CFLAGS=-fPIC
|
DSO_CFLAGS=-fPIC
|
||||||
|
MDCPUCFG_H=_openbsd.cfg
|
||||||
|
PR_MD_CSRCS=openbsd.c
|
||||||
case "$OS_TEST" in
|
case "$OS_TEST" in
|
||||||
alpha|mips|pmax)
|
alpha|mips|pmax)
|
||||||
DSO_LDOPTS=-shared ;;
|
DSO_LDOPTS=-shared ;;
|
||||||
@ -1412,14 +1416,17 @@ mips-sony-newsos*)
|
|||||||
LD='$(CC)'
|
LD='$(CC)'
|
||||||
IMPLIB='emximp -o'
|
IMPLIB='emximp -o'
|
||||||
FILTER='emxexp'
|
FILTER='emxexp'
|
||||||
|
OS_DLLFLAGS='$(DSO_LDOPTS) -o $@'
|
||||||
_OPTIMIZE_FLAGS=-O3
|
_OPTIMIZE_FLAGS=-O3
|
||||||
_DEBUG_FLAGS=-g
|
_DEBUG_FLAGS=-g
|
||||||
if test -n "$MOZ_DEBUG"; then
|
if test -n "$MOZ_DEBUG"; then
|
||||||
DLLFLAGS='-g'
|
DLLFLAGS='-g'
|
||||||
EXEFLAGS='-g $(OMF_FLAG) -Zmtd -L$(DIST)/lib -o $@'
|
EXEFLAGS='-g $(OMF_FLAG) -Zmtd -L$(DIST)/lib -o $@'
|
||||||
|
DSO_LDOPTS='-g -Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO'
|
||||||
else
|
else
|
||||||
DLLFLAGS=
|
DLLFLAGS=
|
||||||
EXEFLAGS='-Zmtd -o $@'
|
EXEFLAGS='-Zmtd -o $@'
|
||||||
|
DSO_LDOPTS='-Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*-os2_vacpp)
|
*-os2_vacpp)
|
||||||
@ -1828,6 +1835,7 @@ AC_SUBST(CC)
|
|||||||
AC_SUBST(CXX)
|
AC_SUBST(CXX)
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
AC_SUBST(CXXFLAGS)
|
AC_SUBST(CXXFLAGS)
|
||||||
|
AC_SUBST(CPPFLAGS)
|
||||||
AC_SUBST(HOST_CC)
|
AC_SUBST(HOST_CC)
|
||||||
AC_SUBST(HOST_CFLAGS)
|
AC_SUBST(HOST_CFLAGS)
|
||||||
AC_SUBST(LDFLAGS)
|
AC_SUBST(LDFLAGS)
|
||||||
|
|||||||
@ -54,15 +54,15 @@ all:: build_all
|
|||||||
# Furthermore, shmsdos doesn't support '&&' so there's a chance the
|
# Furthermore, shmsdos doesn't support '&&' so there's a chance the
|
||||||
# 'cd' could fail and configure would be run in the wrong dir
|
# 'cd' could fail and configure would be run in the wrong dir
|
||||||
#
|
#
|
||||||
$(MOZ_OBJDIR)/config.status: check_old configure configure.in
|
$(MOZ_OBJDIR)/config.status: configure configure.in
|
||||||
@$(MAKE_OBJDIR)
|
@$(MAKE_OBJDIR)
|
||||||
cd $(MOZ_OBJDIR)/ ; \
|
cd $(MOZ_OBJDIR)/ ; \
|
||||||
sh $(NSPR_CONFIGURE)
|
sh $(NSPR_CONFIGURE)
|
||||||
|
|
||||||
build_all: $(MOZ_OBJDIR)/config.status
|
build_all: $(MOZ_OBJDIR)/config.status check_old
|
||||||
gmake -C $(MOZ_OBJDIR)
|
gmake -C $(MOZ_OBJDIR)
|
||||||
|
|
||||||
clobber_all: $(MOZ_OBJDIR)/config.status
|
clobber_all: $(MOZ_OBJDIR)/config.status check_old
|
||||||
gmake -C $(MOZ_OBJDIR) clobber_all
|
gmake -C $(MOZ_OBJDIR) clobber_all
|
||||||
|
|
||||||
distclean: check_old
|
distclean: check_old
|
||||||
|
|||||||
@ -1,105 +0,0 @@
|
|||||||
#
|
|
||||||
# The contents of this file are subject to the Netscape Public License
|
|
||||||
# Version 1.1 (the "NPL"); you may not use this file except in
|
|
||||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
|
||||||
# http://www.mozilla.org/NPL/
|
|
||||||
#
|
|
||||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
||||||
# for the specific language governing rights and limitations under the
|
|
||||||
# NPL.
|
|
||||||
#
|
|
||||||
# The Initial Developer of this code under the NPL is Netscape
|
|
||||||
# Communications Corporation. Portions created by Netscape are
|
|
||||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
|
||||||
# Reserved.
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# An NMAKE file to set up and adjust NSPR20's build system for
|
|
||||||
# Client build. Client build should invoke NMAKE on this file
|
|
||||||
# instead of invoking gmake directly.
|
|
||||||
#
|
|
||||||
|
|
||||||
DEPTH = ..
|
|
||||||
include <$(DEPTH)\config\config.mak>
|
|
||||||
|
|
||||||
#
|
|
||||||
# Backslashes are escape characters to gmake, so flip all backslashes
|
|
||||||
# in $(MOZ_TOOLS) to forward slashes and pass that to gmake.
|
|
||||||
#
|
|
||||||
|
|
||||||
GMAKE = $(MOZ_TOOLS)\bin\gmake.exe
|
|
||||||
|
|
||||||
GMAKE_FLAGS = MOZ_TOOLS_FLIPPED=$(MOZ_TOOLS:\=/) PR_CLIENT_BUILD=1 PR_CLIENT_BUILD_WINDOWS=1
|
|
||||||
|
|
||||||
#
|
|
||||||
# The Client's debug build uses MSVC's debug runtime library (/MDd).
|
|
||||||
#
|
|
||||||
|
|
||||||
!ifdef MOZ_DEBUG
|
|
||||||
!else
|
|
||||||
GMAKE_FLAGS = $(GMAKE_FLAGS) BUILD_OPT=1
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!if "$(MOZ_BITS)" == "16"
|
|
||||||
GMAKE_FLAGS = $(GMAKE_FLAGS) OS_TARGET=WIN16
|
|
||||||
!else
|
|
||||||
|
|
||||||
GMAKE_FLAGS = $(GMAKE_FLAGS) OS_TARGET=WIN95
|
|
||||||
!ifdef MOZ_DEBUG
|
|
||||||
!ifdef MOZ_NO_DEBUG_RTL
|
|
||||||
!IF "$(CPU)" == "ALPHA"
|
|
||||||
PR_OBJDIR = WIN954.0ALPHA_DBG.OBJ
|
|
||||||
!else
|
|
||||||
PR_OBJDIR = WIN954.0_DBG.OBJ
|
|
||||||
!endif
|
|
||||||
!else
|
|
||||||
GMAKE_FLAGS = $(GMAKE_FLAGS) USE_DEBUG_RTL=1
|
|
||||||
!IF "$(CPU)" == "ALPHA"
|
|
||||||
PR_OBJDIR = WIN954.0ALPHA_DBG.OBJD
|
|
||||||
!else
|
|
||||||
PR_OBJDIR = WIN954.0_DBG.OBJD
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
!else
|
|
||||||
!IF "$(CPU)" == "ALPHA"
|
|
||||||
PR_OBJDIR = WIN954.0ALPHA_OPT.OBJ
|
|
||||||
!else
|
|
||||||
PR_OBJDIR = WIN954.0_OPT.OBJ
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!endif
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# The rules. Simply invoke gmake with the same target.
|
|
||||||
# The default target is 'all'. For Win16, set up the
|
|
||||||
# environment to use the Watcom compiler, Watcom headers,
|
|
||||||
# and Watcom libs.
|
|
||||||
#
|
|
||||||
|
|
||||||
all:: export libs install
|
|
||||||
|
|
||||||
export libs install clobber clobber_all clean depend::
|
|
||||||
!if "$(MOZ_BITS)" == "16"
|
|
||||||
set PATH=%WATCPATH%
|
|
||||||
set INCLUDE=%WATC_INC%
|
|
||||||
set LIB=%WATC_LIB%
|
|
||||||
!endif
|
|
||||||
$(GMAKE) $(GMAKE_FLAGS) $@
|
|
||||||
!if "$(MOZ_BITS)" == "16"
|
|
||||||
set PATH=%MSVCPATH%
|
|
||||||
set INCLUDE=%MSVC_INC%
|
|
||||||
set LIB=%MSVC_LIB%
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!if "$(MOZ_BITS)" != "16"
|
|
||||||
export::
|
|
||||||
$(MAKE_INSTALL) $(XPDIST)\$(PR_OBJDIR)\include\*.h $(DIST)\include
|
|
||||||
$(MAKE_INSTALL) $(XPDIST)\$(PR_OBJDIR)\include\obsolete\*.h $(DIST)\include\obsolete
|
|
||||||
$(MAKE_INSTALL) $(XPDIST)\$(PR_OBJDIR)\include\private\*.h $(DIST)\include\private
|
|
||||||
$(MAKE_INSTALL) $(XPDIST)\$(PR_OBJDIR)\lib\*.lib $(DIST)\lib
|
|
||||||
$(MAKE_INSTALL) $(XPDIST)\$(PR_OBJDIR)\lib\*.dll $(DIST)\bin
|
|
||||||
!endif
|
|
||||||
@ -103,6 +103,7 @@ struct _MDFileDesc {
|
|||||||
_MDSocketCallerInfo misc;
|
_MDSocketCallerInfo misc;
|
||||||
_MDSocketCallerInfo read;
|
_MDSocketCallerInfo read;
|
||||||
_MDSocketCallerInfo write;
|
_MDSocketCallerInfo write;
|
||||||
|
_MDSocketCallerInfo poll;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -43,11 +43,6 @@
|
|||||||
#define sock_errno() errno
|
#define sock_errno() errno
|
||||||
#define soclose close
|
#define soclose close
|
||||||
#define sock_init()
|
#define sock_init()
|
||||||
|
|
||||||
#include <sys/builtin.h>
|
|
||||||
#include <sys/smutex.h>
|
|
||||||
static _smutex _md_shm_lock = 0;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -292,6 +292,7 @@ static pascal void NotifierRoutine(void * contextPtr, OTEventCode code, OTResul
|
|||||||
_MDFileDesc * md = &(secret->md);
|
_MDFileDesc * md = &(secret->md);
|
||||||
EndpointRef endpoint = (EndpointRef)secret->md.osfd;
|
EndpointRef endpoint = (EndpointRef)secret->md.osfd;
|
||||||
PRThread * thread = NULL;
|
PRThread * thread = NULL;
|
||||||
|
PRThread * pollThread = md->poll.thread;
|
||||||
OSStatus err;
|
OSStatus err;
|
||||||
OTResult resultOT;
|
OTResult resultOT;
|
||||||
TDiscon discon;
|
TDiscon discon;
|
||||||
@ -452,6 +453,10 @@ static pascal void NotifierRoutine(void * contextPtr, OTEventCode code, OTResul
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pollThread)
|
||||||
|
WakeUpNotifiedThread(pollThread, kOTNoError);
|
||||||
|
|
||||||
|
if (thread && (thread != pollThread))
|
||||||
WakeUpNotifiedThread(thread, result);
|
WakeUpNotifiedThread(thread, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1658,8 +1663,13 @@ PRInt32 _MD_writev(PRFileDesc *fd, const struct PRIOVec *iov, PRInt32 iov_size,
|
|||||||
static PRBool GetState(PRFileDesc *fd, PRBool *readReady, PRBool *writeReady, PRBool *exceptReady)
|
static PRBool GetState(PRFileDesc *fd, PRBool *readReady, PRBool *writeReady, PRBool *exceptReady)
|
||||||
{
|
{
|
||||||
OTResult resultOT;
|
OTResult resultOT;
|
||||||
|
// hack to emulate BSD sockets; say that a socket that has disconnected
|
||||||
|
// is still readable.
|
||||||
|
size_t availableData = 1;
|
||||||
|
if (!fd->secret->md.orderlyDisconnect)
|
||||||
|
OTCountDataBytes((EndpointRef)fd->secret->md.osfd, &availableData);
|
||||||
|
|
||||||
*readReady = fd->secret->md.readReady;
|
*readReady = fd->secret->md.readReady && (availableData > 0);
|
||||||
*exceptReady = fd->secret->md.exceptReady;
|
*exceptReady = fd->secret->md.exceptReady;
|
||||||
|
|
||||||
resultOT = OTGetEndpointState((EndpointRef)fd->secret->md.osfd);
|
resultOT = OTGetEndpointState((EndpointRef)fd->secret->md.osfd);
|
||||||
@ -1680,14 +1690,11 @@ PRInt32 _MD_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
|
|||||||
{
|
{
|
||||||
PRInt32 ready = 0;
|
PRInt32 ready = 0;
|
||||||
PRPollDesc *pd, *epd;
|
PRPollDesc *pd, *epd;
|
||||||
PRIntervalTime sleepTime, timein;
|
PRThread *thread = _PR_MD_CURRENT_THREAD();
|
||||||
|
PRIntervalTime timein;
|
||||||
|
|
||||||
sleepTime = PR_MillisecondsToInterval(5UL);
|
|
||||||
if (PR_INTERVAL_NO_TIMEOUT != timeout)
|
if (PR_INTERVAL_NO_TIMEOUT != timeout)
|
||||||
{
|
|
||||||
if (sleepTime > timeout) sleepTime = timeout;
|
|
||||||
timein = PR_IntervalNow();
|
timein = PR_IntervalNow();
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -1724,6 +1731,8 @@ PRInt32 _MD_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
|
|||||||
PR_ASSERT(NULL != bottomFD);
|
PR_ASSERT(NULL != bottomFD);
|
||||||
if ((NULL != bottomFD) && (_PR_FILEDESC_OPEN == bottomFD->secret->state))
|
if ((NULL != bottomFD) && (_PR_FILEDESC_OPEN == bottomFD->secret->state))
|
||||||
{
|
{
|
||||||
|
bottomFD->secret->md.poll.thread = thread;
|
||||||
|
|
||||||
if (GetState(bottomFD, &readReady, &writeReady, &exceptReady))
|
if (GetState(bottomFD, &readReady, &writeReady, &exceptReady))
|
||||||
{
|
{
|
||||||
if (readReady)
|
if (readReady)
|
||||||
@ -1757,7 +1766,10 @@ PRInt32 _MD_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
|
|||||||
|
|
||||||
if (ready > 0) return ready;
|
if (ready > 0) return ready;
|
||||||
|
|
||||||
(void) PR_Sleep(sleepTime);
|
thread->io_pending = PR_TRUE;
|
||||||
|
thread->io_fd = NULL;
|
||||||
|
thread->md.osErrCode = noErr;
|
||||||
|
WaitOnThisThread(thread, timeout);
|
||||||
|
|
||||||
} while ((timeout == PR_INTERVAL_NO_TIMEOUT) ||
|
} while ((timeout == PR_INTERVAL_NO_TIMEOUT) ||
|
||||||
(((PRIntervalTime)(PR_IntervalNow() - timein)) < timeout));
|
(((PRIntervalTime)(PR_IntervalNow() - timein)) < timeout));
|
||||||
|
|||||||
@ -219,7 +219,7 @@ static void md_PostNotifyToCvar(_MDCVar *cvar, _MDLock *lock,
|
|||||||
* 0 when it succeeds.
|
* 0 when it succeeds.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
PR_IMPLEMENT(PRInt32)
|
PRInt32
|
||||||
_PR_MD_NEW_CV(_MDCVar *cv)
|
_PR_MD_NEW_CV(_MDCVar *cv)
|
||||||
{
|
{
|
||||||
cv->magic = _MD_MAGIC_CV;
|
cv->magic = _MD_MAGIC_CV;
|
||||||
@ -230,7 +230,7 @@ _PR_MD_NEW_CV(_MDCVar *cv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void) _PR_MD_FREE_CV(_MDCVar *cv)
|
void _PR_MD_FREE_CV(_MDCVar *cv)
|
||||||
{
|
{
|
||||||
cv->magic = (PRUint32)-1;
|
cv->magic = (PRUint32)-1;
|
||||||
return;
|
return;
|
||||||
@ -239,7 +239,7 @@ PR_IMPLEMENT(void) _PR_MD_FREE_CV(_MDCVar *cv)
|
|||||||
/*
|
/*
|
||||||
* _PR_MD_WAIT_CV() -- Wait on condition variable
|
* _PR_MD_WAIT_CV() -- Wait on condition variable
|
||||||
*/
|
*/
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_WAIT_CV(_MDCVar *cv, _MDLock *lock, PRIntervalTime timeout )
|
_PR_MD_WAIT_CV(_MDCVar *cv, _MDLock *lock, PRIntervalTime timeout )
|
||||||
{
|
{
|
||||||
PRThread *thred = _PR_MD_CURRENT_THREAD();
|
PRThread *thred = _PR_MD_CURRENT_THREAD();
|
||||||
@ -306,21 +306,21 @@ _PR_MD_WAIT_CV(_MDCVar *cv, _MDLock *lock, PRIntervalTime timeout )
|
|||||||
return;
|
return;
|
||||||
} /* --- end _PR_MD_WAIT_CV() --- */
|
} /* --- end _PR_MD_WAIT_CV() --- */
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_NOTIFY_CV(_MDCVar *cv, _MDLock *lock)
|
_PR_MD_NOTIFY_CV(_MDCVar *cv, _MDLock *lock)
|
||||||
{
|
{
|
||||||
md_PostNotifyToCvar(cv, lock, PR_FALSE);
|
md_PostNotifyToCvar(cv, lock, PR_FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_NOTIFYALL_CV(_MDCVar *cv, _MDLock *lock)
|
_PR_MD_NOTIFYALL_CV(_MDCVar *cv, _MDLock *lock)
|
||||||
{
|
{
|
||||||
md_PostNotifyToCvar(cv, lock, PR_TRUE);
|
md_PostNotifyToCvar(cv, lock, PR_TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_UNLOCK(_MDLock *lock)
|
_PR_MD_UNLOCK(_MDLock *lock)
|
||||||
{
|
{
|
||||||
if (0 != lock->notified.length) {
|
if (0 != lock->notified.length) {
|
||||||
|
|||||||
@ -29,7 +29,7 @@ PRInt32 _os2_highMask = 0;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_INTERVAL_INIT()
|
_PR_MD_INTERVAL_INIT()
|
||||||
{
|
{
|
||||||
if (DosTmrQueryFreq(&_os2_ticksPerSec) == NO_ERROR)
|
if (DosTmrQueryFreq(&_os2_ticksPerSec) == NO_ERROR)
|
||||||
@ -46,7 +46,7 @@ _PR_MD_INTERVAL_INIT()
|
|||||||
PR_ASSERT(_os2_ticksPerSec > PR_INTERVAL_MIN && _os2_ticksPerSec < PR_INTERVAL_MAX);
|
PR_ASSERT(_os2_ticksPerSec > PR_INTERVAL_MIN && _os2_ticksPerSec < PR_INTERVAL_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(PRIntervalTime)
|
PRIntervalTime
|
||||||
_PR_MD_GET_INTERVAL()
|
_PR_MD_GET_INTERVAL()
|
||||||
{
|
{
|
||||||
QWORD count;
|
QWORD count;
|
||||||
@ -69,7 +69,7 @@ _PR_MD_GET_INTERVAL()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(PRIntervalTime)
|
PRIntervalTime
|
||||||
_PR_MD_INTERVAL_PER_SEC()
|
_PR_MD_INTERVAL_PER_SEC()
|
||||||
{
|
{
|
||||||
if(_os2_ticksPerSec != -1)
|
if(_os2_ticksPerSec != -1)
|
||||||
|
|||||||
@ -473,7 +473,7 @@ PRStatus _MD_OS2GetHostName(char *name, PRUint32 namelen)
|
|||||||
return PR_FAILURE;
|
return PR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_WAKEUP_CPUS( void )
|
_PR_MD_WAKEUP_CPUS( void )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
#include "primpl.h"
|
#include "primpl.h"
|
||||||
|
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_NEW_SEM(_MDSemaphore *md, PRUintn value)
|
_PR_MD_NEW_SEM(_MDSemaphore *md, PRUintn value)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
@ -36,7 +36,7 @@ _PR_MD_NEW_SEM(_MDSemaphore *md, PRUintn value)
|
|||||||
PR_ASSERT(rv == NO_ERROR);
|
PR_ASSERT(rv == NO_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_DESTROY_SEM(_MDSemaphore *md)
|
_PR_MD_DESTROY_SEM(_MDSemaphore *md)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
@ -45,7 +45,7 @@ _PR_MD_DESTROY_SEM(_MDSemaphore *md)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(PRStatus)
|
PRStatus
|
||||||
_PR_MD_TIMED_WAIT_SEM(_MDSemaphore *md, PRIntervalTime ticks)
|
_PR_MD_TIMED_WAIT_SEM(_MDSemaphore *md, PRIntervalTime ticks)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
@ -57,13 +57,13 @@ _PR_MD_TIMED_WAIT_SEM(_MDSemaphore *md, PRIntervalTime ticks)
|
|||||||
return PR_FAILURE;
|
return PR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(PRStatus)
|
PRStatus
|
||||||
_PR_MD_WAIT_SEM(_MDSemaphore *md)
|
_PR_MD_WAIT_SEM(_MDSemaphore *md)
|
||||||
{
|
{
|
||||||
return _PR_MD_TIMED_WAIT_SEM(md, PR_INTERVAL_NO_TIMEOUT);
|
return _PR_MD_TIMED_WAIT_SEM(md, PR_INTERVAL_NO_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_POST_SEM(_MDSemaphore *md)
|
_PR_MD_POST_SEM(_MDSemaphore *md)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
|
|||||||
@ -36,7 +36,7 @@ _NSPR_TLS* pThreadLocalStorage = 0;
|
|||||||
_PRInterruptTable _pr_interruptTable[] = { { 0 } };
|
_PRInterruptTable _pr_interruptTable[] = { { 0 } };
|
||||||
APIRET (* APIENTRY QueryThreadContext)(TID, ULONG, PCONTEXTRECORD);
|
APIRET (* APIENTRY QueryThreadContext)(TID, ULONG, PCONTEXTRECORD);
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_ENSURE_TLS(void)
|
_PR_MD_ENSURE_TLS(void)
|
||||||
{
|
{
|
||||||
if(!pThreadLocalStorage)
|
if(!pThreadLocalStorage)
|
||||||
@ -50,7 +50,7 @@ _PR_MD_ENSURE_TLS(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_EARLY_INIT()
|
_PR_MD_EARLY_INIT()
|
||||||
{
|
{
|
||||||
HMODULE hmod;
|
HMODULE hmod;
|
||||||
@ -77,7 +77,7 @@ _pr_SetThreadMDHandle(PRThread *thread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PR_IMPLEMENT(PRStatus)
|
PRStatus
|
||||||
_PR_MD_INIT_THREAD(PRThread *thread)
|
_PR_MD_INIT_THREAD(PRThread *thread)
|
||||||
{
|
{
|
||||||
#ifdef XP_OS2_EMX
|
#ifdef XP_OS2_EMX
|
||||||
@ -98,7 +98,7 @@ _PR_MD_INIT_THREAD(PRThread *thread)
|
|||||||
return (thread->md.blocked_sema.sem != 0) ? PR_SUCCESS : PR_FAILURE;
|
return (thread->md.blocked_sema.sem != 0) ? PR_SUCCESS : PR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(PRStatus)
|
PRStatus
|
||||||
_PR_MD_CREATE_THREAD(PRThread *thread,
|
_PR_MD_CREATE_THREAD(PRThread *thread,
|
||||||
void (*start)(void *),
|
void (*start)(void *),
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
@ -119,14 +119,14 @@ _PR_MD_CREATE_THREAD(PRThread *thread,
|
|||||||
return PR_SUCCESS;
|
return PR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_YIELD(void)
|
_PR_MD_YIELD(void)
|
||||||
{
|
{
|
||||||
/* Isn't there some problem with DosSleep(0) on OS/2? */
|
/* Isn't there some problem with DosSleep(0) on OS/2? */
|
||||||
DosSleep(0);
|
DosSleep(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_SET_PRIORITY(_MDThread *thread, PRThreadPriority newPri)
|
_PR_MD_SET_PRIORITY(_MDThread *thread, PRThreadPriority newPri)
|
||||||
{
|
{
|
||||||
int nativePri;
|
int nativePri;
|
||||||
@ -159,7 +159,7 @@ _PR_MD_SET_PRIORITY(_MDThread *thread, PRThreadPriority newPri)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_CLEAN_THREAD(PRThread *thread)
|
_PR_MD_CLEAN_THREAD(PRThread *thread)
|
||||||
{
|
{
|
||||||
if (&thread->md.blocked_sema) {
|
if (&thread->md.blocked_sema) {
|
||||||
@ -172,7 +172,7 @@ _PR_MD_CLEAN_THREAD(PRThread *thread)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_EXIT_THREAD(PRThread *thread)
|
_PR_MD_EXIT_THREAD(PRThread *thread)
|
||||||
{
|
{
|
||||||
_PR_MD_DESTROY_SEM(&thread->md.blocked_sema);
|
_PR_MD_DESTROY_SEM(&thread->md.blocked_sema);
|
||||||
@ -200,7 +200,7 @@ _PR_MD_EXIT_THREAD(PRThread *thread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_EXIT(PRIntn status)
|
_PR_MD_EXIT(PRIntn status)
|
||||||
{
|
{
|
||||||
_exit(status);
|
_exit(status);
|
||||||
@ -240,19 +240,19 @@ _PR_MD_GETTHREADAFFINITYMASK(PRThread *thread, PRUint32 *mask)
|
|||||||
}
|
}
|
||||||
#endif /* HAVE_THREAD_AFFINITY */
|
#endif /* HAVE_THREAD_AFFINITY */
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
|
_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
|
||||||
{
|
{
|
||||||
_PR_MD_SUSPEND_THREAD(cpu->thread);
|
_PR_MD_SUSPEND_THREAD(cpu->thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_RESUME_CPU(_PRCPU *cpu)
|
_PR_MD_RESUME_CPU(_PRCPU *cpu)
|
||||||
{
|
{
|
||||||
_PR_MD_RESUME_THREAD(cpu->thread);
|
_PR_MD_RESUME_THREAD(cpu->thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_SUSPEND_THREAD(PRThread *thread)
|
_PR_MD_SUSPEND_THREAD(PRThread *thread)
|
||||||
{
|
{
|
||||||
if (_PR_IS_NATIVE_THREAD(thread)) {
|
if (_PR_IS_NATIVE_THREAD(thread)) {
|
||||||
@ -266,7 +266,7 @@ _PR_MD_SUSPEND_THREAD(PRThread *thread)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_IMPLEMENT(void)
|
void
|
||||||
_PR_MD_RESUME_THREAD(PRThread *thread)
|
_PR_MD_RESUME_THREAD(PRThread *thread)
|
||||||
{
|
{
|
||||||
if (_PR_IS_NATIVE_THREAD(thread)) {
|
if (_PR_IS_NATIVE_THREAD(thread)) {
|
||||||
|
|||||||
@ -43,7 +43,7 @@ endif
|
|||||||
|
|
||||||
TARGETS = $(OBJS)
|
TARGETS = $(OBJS)
|
||||||
|
|
||||||
INCLUDES = -I$(includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
|
INCLUDES = -I$(includedir) -I$(includedir)/boehm -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
|
||||||
|
|
||||||
DEFINES += -D_NSPR_BUILD_
|
DEFINES += -D_NSPR_BUILD_
|
||||||
|
|
||||||
|
|||||||
@ -806,11 +806,27 @@ void _PR_InitThreads(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_PR_DCETHREADS) || defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
|
#if defined(_PR_DCETHREADS) || defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
|
||||||
|
#if defined(FREEBSD)
|
||||||
|
{
|
||||||
|
pthread_attr_t attr;
|
||||||
|
int policy;
|
||||||
|
/* get the min and max priorities of the default policy */
|
||||||
|
pthread_attr_init(&attr);
|
||||||
|
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||||
|
pthread_attr_getschedpolicy(&attr, &policy);
|
||||||
|
pt_book.minPrio = sched_get_priority_min(policy);
|
||||||
|
PR_ASSERT(-1 != pt_book.minPrio);
|
||||||
|
pt_book.maxPrio = sched_get_priority_max(policy);
|
||||||
|
PR_ASSERT(-1 != pt_book.maxPrio);
|
||||||
|
pthread_attr_destroy(&attr);
|
||||||
|
}
|
||||||
|
#else
|
||||||
/*
|
/*
|
||||||
** These might be function evaluations
|
** These might be function evaluations
|
||||||
*/
|
*/
|
||||||
pt_book.minPrio = PT_PRIO_MIN;
|
pt_book.minPrio = PT_PRIO_MIN;
|
||||||
pt_book.maxPrio = PT_PRIO_MAX;
|
pt_book.maxPrio = PT_PRIO_MAX;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PR_ASSERT(NULL == pt_book.ml);
|
PR_ASSERT(NULL == pt_book.ml);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user