зеркало из https://github.com/mozilla/gecko-dev.git
This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
This commit is contained in:
Коммит
07ee057ce2
|
@ -0,0 +1,293 @@
|
|||
#! /bin/csh
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Startup file for csh and tcsh. It is meant to work on
|
||||
# Sun Solaris and SGI IRIX, and everything else.
|
||||
|
||||
# * Let's try to get this .cshrc file working much better...
|
||||
|
||||
#limit coredumpsize 0
|
||||
|
||||
setenv EDITOR vi
|
||||
|
||||
# For Java class loading path
|
||||
# For RDClient
|
||||
#setenv CLASSPATH .:/u/wtc/public_html/java:/u/wtc/public_html/java/apps
|
||||
# For RDServer
|
||||
#setenv CLASSPATH .:/u/wtc/public_html/java
|
||||
#setenv NSROOT /u/wtc/ns
|
||||
setenv CVSROOT /m/src
|
||||
#setenv NNTPSERVER news.mcom.com
|
||||
#setenv MOZILLA_CLIENT 1
|
||||
|
||||
# Operating system name and release level
|
||||
set os_name=`uname -s`
|
||||
set os_release=`uname -r`
|
||||
|
||||
# Command search path
|
||||
if ($os_name == "SunOS" && $os_release == "4.1.3_U1") then
|
||||
##############################
|
||||
# SunOS 4.1.3_U1
|
||||
#
|
||||
|
||||
setenv NO_MDUPDATE 1
|
||||
|
||||
set path = ( /tools/ns/soft/gcc-2.6.3/run/default/sparc_sun_sunos4.1.3_U1/bin \
|
||||
/tools/ns/bin \
|
||||
/sbin \
|
||||
/usr/bin \
|
||||
/usr/openwin/bin \
|
||||
/usr/openwin/include \
|
||||
/usr/ucb \
|
||||
/usr/local/bin \
|
||||
/etc \
|
||||
/usr/etc \
|
||||
/usr/etc/install \
|
||||
. )
|
||||
|
||||
else if ($os_name == "SunOS") then
|
||||
################################
|
||||
# Assume it is Sun Solaris
|
||||
#
|
||||
|
||||
# To build Navigator on Solaris 2.5, I must set the environment
|
||||
# variable NO_MDUPDATE and use gcc-2.6.3.
|
||||
setenv NO_MDUPDATE 1
|
||||
|
||||
# To build with the native Solaris cc compiler
|
||||
setenv NS_USE_NATIVE 1
|
||||
|
||||
# /tools/ns/soft/gcc-2.6.3/run/default/sparc_sun_solaris2.4/bin
|
||||
# /u/wtc/bin
|
||||
set path = ( /u/wtc/bin \
|
||||
/usr/ccs/bin \
|
||||
/usr/opt/bin \
|
||||
/tools/ns/bin \
|
||||
/usr/sbin \
|
||||
/sbin \
|
||||
/usr/bin \
|
||||
/usr/dt/bin \
|
||||
/usr/openwin/bin \
|
||||
/usr/openwin/include \
|
||||
/usr/ucb \
|
||||
/usr/opt/java/bin \
|
||||
/usr/local/bin \
|
||||
/etc \
|
||||
/usr/etc \
|
||||
/usr/etc/install \
|
||||
/opt/Acrobat3/bin \
|
||||
. )
|
||||
|
||||
# To get the native Solaris cc
|
||||
if (`uname -m` == i86pc) then
|
||||
set path = (/h/solx86/export/home/opt/SUNWspro/SC3.0.1/bin $path)
|
||||
else
|
||||
#/tools/ns/soft/sparcworks-3.0.1/run/default/share/lib/sparcworks/SUNWspro/bin
|
||||
#/tools/ns/workshop/bin
|
||||
set path = ( \
|
||||
/tools/ns/workshop/bin \
|
||||
/tools/ns/soft/gcc-2.6.3/run/default/sparc_sun_solaris2.4/bin \
|
||||
$path)
|
||||
endif
|
||||
|
||||
setenv MANPATH /usr/local/man:/usr/local/lib/mh/man:/usr/local/lib/rcscvs/man:/usr/local/lib/fvwm/man:/usr/local/lib/xscreensaver/man:/usr/share/man:/usr/openwin/man:/usr/opt/man
|
||||
|
||||
# For Purify
|
||||
setenv PURIFYHOME /usr/local-sparc-solaris/pure/purify-4.0-solaris2
|
||||
setenv PATH /usr/local-sparc-solaris/pure/purify-4.0-solaris2:$PATH
|
||||
setenv MANPATH $PURIFYHOME/man:$MANPATH
|
||||
setenv LD_LIBRARY_PATH /usr/local-sparc-solaris/pure/purify-4.0-solaris2
|
||||
setenv PURIFYOPTIONS "-max_threads=1000 -follow-child-processes=yes"
|
||||
|
||||
else if ($os_name == "IRIX" || $os_name == "IRIX64") then
|
||||
#############
|
||||
# SGI Irix
|
||||
#
|
||||
|
||||
set path = ( /tools/ns/bin \
|
||||
/tools/contrib/bin \
|
||||
/usr/local/bin \
|
||||
/usr/sbin \
|
||||
/usr/bsd \
|
||||
/usr/bin \
|
||||
/bin \
|
||||
/etc \
|
||||
/usr/etc \
|
||||
/usr/bin/X11 \
|
||||
.)
|
||||
|
||||
else if ($os_name == "UNIX_SV") then
|
||||
#################
|
||||
# UNIX_SV
|
||||
#
|
||||
|
||||
set path = ( /usr/local/bin \
|
||||
/tools/ns/bin \
|
||||
/bin \
|
||||
/usr/bin \
|
||||
/usr/bin/X11 \
|
||||
/X11/bin \
|
||||
/usr/X/bin \
|
||||
/usr/ucb \
|
||||
/usr/sbin \
|
||||
/sbin \
|
||||
/usr/ccs/bin \
|
||||
.)
|
||||
|
||||
else if ($os_name == "AIX") then
|
||||
#################
|
||||
# IBM AIX
|
||||
#
|
||||
|
||||
set path = ( /usr/ucb/ \
|
||||
/tools/ns-arch/rs6000_ibm_aix4.1/bin \
|
||||
/tools/ns-arch/rs6000_ibm_aix3.2.5/bin \
|
||||
/share/tools/ns/soft/cvs-1.8/run/default/rs6000_ibm_aix3.2.5/bin \
|
||||
/bin \
|
||||
/usr/bin \
|
||||
/usr/ccs/bin \
|
||||
/usr/sbin \
|
||||
/usr/local/bin \
|
||||
/usr/bin/X11 \
|
||||
/usr/etc \
|
||||
/etc \
|
||||
/sbin \
|
||||
.)
|
||||
|
||||
else if ($os_name == "HP-UX") then
|
||||
#################
|
||||
# HP UX
|
||||
#
|
||||
|
||||
set path = ( /usr/bin \
|
||||
/opt/ansic/bin \
|
||||
/usr/ccs/bin \
|
||||
/usr/contrib/bin \
|
||||
/opt/nettladm/bin \
|
||||
/opt/graphics/common/bin \
|
||||
/usr/bin/X11 \
|
||||
/usr/contrib/bin/X11 \
|
||||
/opt/upgrade/bin \
|
||||
/opt/CC/bin \
|
||||
/opt/aCC/bin \
|
||||
/opt/langtools/bin \
|
||||
/opt/imake/bin \
|
||||
/etc \
|
||||
/usr/etc \
|
||||
/usr/local/bin \
|
||||
/tools/ns/bin \
|
||||
/tools/contrib/bin \
|
||||
/usr/sbin \
|
||||
/usr/local/bin \
|
||||
/tools/ns/bin \
|
||||
/tools/contrib/bin \
|
||||
/usr/sbin \
|
||||
/usr/include/X11R5 \
|
||||
.)
|
||||
|
||||
else if ($os_name == "SCO_SV") then
|
||||
#################
|
||||
# SCO
|
||||
#
|
||||
|
||||
set path = ( /bin \
|
||||
/usr/bin \
|
||||
/tools/ns/bin \
|
||||
/tools/contrib/bin \
|
||||
/usr/sco/bin \
|
||||
/usr/bin/X11 \
|
||||
/usr/local/bin \
|
||||
.)
|
||||
|
||||
else if ($os_name == "FreeBSD") then
|
||||
#################
|
||||
# FreeBSD
|
||||
#
|
||||
|
||||
setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/java/bin:/usr/local/bin:/usr/ucb:/usr/ccs/bin:/tools/contrib/bin:/tools/ns/bin:.
|
||||
|
||||
else if ($os_name == "OSF1") then
|
||||
#################
|
||||
# DEC OSF1
|
||||
#
|
||||
|
||||
limit datasize 300000kb
|
||||
|
||||
set path = ( /tools/ns-arch/alpha_dec_osf4.0/bin \
|
||||
/tools/ns-arch/soft/cvs-1.8.3/run/default/alpha_dec_osf2.0/bin \
|
||||
/usr/local-alpha-osf/bin \
|
||||
/usr3/local/bin \
|
||||
/usr/local/bin \
|
||||
/usr/sbin \
|
||||
/usr/bin \
|
||||
/bin \
|
||||
/usr/bin/X11 \
|
||||
/usr/ucb \
|
||||
. )
|
||||
endif
|
||||
|
||||
set path = ($path /u/$USER/bin )
|
||||
|
||||
# for interactive csh only, in which the "prompt" variable is defined
|
||||
if ($?prompt) then
|
||||
# For vi, set "autoindent" option
|
||||
setenv EXINIT "set ai"
|
||||
|
||||
# set history = 999
|
||||
# Use "<host name>:<current directory> <command number>% " as prompt.
|
||||
#set prompt="%m:%/ \!% "
|
||||
set host_name = "`uname -n | sed 's/.mcom.com//'`"
|
||||
# alias setprompt 'set prompt = "${host_name}:$cwd \\!% "'
|
||||
# setprompt
|
||||
# alias cd 'cd \!*; setprompt'
|
||||
# alias pushd 'pushd \!*; setprompt'
|
||||
# alias popd 'popd \!*; setprompt'
|
||||
|
||||
# set filec
|
||||
# set notify
|
||||
set ignoreeof # prevent ^d from doing logout
|
||||
# alias h history
|
||||
# alias so source
|
||||
# alias f finger
|
||||
# alias rm rm -i
|
||||
# alias mv mv -i
|
||||
# alias ls ls -CFa
|
||||
endif
|
||||
|
||||
rehash
|
|
@ -0,0 +1,76 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for AIX.
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
#
|
||||
# XXX
|
||||
# There are two implementation strategies available on AIX:
|
||||
# pthreads, and pthreads-user. The default is pthreads.
|
||||
# In both strategies, we need to use pthread_user.c, instead of
|
||||
# aix.c. The fact that aix.c is never used is somewhat strange.
|
||||
#
|
||||
# So we need to do the following:
|
||||
# - Default (PTHREADS_USER not defined in the environment or on
|
||||
# the command line):
|
||||
# Set PTHREADS_USER=1, USE_PTHREADS=1
|
||||
# - PTHREADS_USER=1 set in the environment or on the command line:
|
||||
# Do nothing.
|
||||
#
|
||||
ifeq ($(PTHREADS_USER),1)
|
||||
USE_PTHREADS = # just to be safe
|
||||
IMPL_STRATEGY = _PTH_USER
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
PTHREADS_USER = 1
|
||||
endif
|
||||
|
||||
DEFAULT_COMPILER = xlC_r
|
||||
|
||||
CC = xlC_r
|
||||
CCC = xlC_r
|
||||
|
||||
CPU_ARCH = rs6000
|
||||
|
||||
RANLIB = ranlib
|
||||
|
||||
OS_CFLAGS = -DAIX -DSYSV
|
||||
ifeq ($(CC),xlC_r)
|
||||
OS_CFLAGS += -qarch=com
|
||||
endif
|
||||
|
||||
AIX_WRAP = $(DIST)/lib/aixwrap.o
|
||||
AIX_TMP = $(OBJDIR)/_aix_tmp.o
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for AIX3.2.5
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/AIX.mk
|
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for AIX4.1
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/AIX.mk
|
||||
|
||||
#
|
||||
# Special link info for constructing AIX programs. On AIX we have to
|
||||
# statically link programs that use NSPR into a single .o, rewriting the
|
||||
# calls to select to call "aix". Once that is done we then can
|
||||
# link that .o with a .o built in nspr which implements the system call.
|
||||
#
|
||||
|
||||
AIX_LINK_OPTS += -bnso -berok
|
||||
#AIX_LINK_OPTS += -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp
|
||||
|
||||
# The AIX4.1 linker had a bug which always looked for a dynamic library
|
||||
# with an extension of .a. AIX4.2 fixed this problem
|
||||
DLL_SUFFIX = a
|
||||
|
||||
OS_LIBS += -lsvld
|
|
@ -0,0 +1,43 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for AIX4.2
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/AIX.mk
|
||||
|
||||
OS_CFLAGS += -DAIX4_2
|
||||
DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for AIX4.3
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/AIX.mk
|
||||
|
||||
OS_CFLAGS += -DAIX4_2 -DAIX4_3
|
||||
DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for AIX5.1
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/AIX.mk
|
||||
|
||||
OS_CFLAGS += -DAIX4_2 -DAIX4_3
|
||||
DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for FreeBSD2
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = gcc
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
RANLIB = ranlib
|
||||
|
||||
OS_REL_CFLAGS = -mno-486 -Di386
|
||||
CPU_ARCH = x86
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
|
||||
|
||||
ifdef USE_PTHREADS
|
||||
OS_LIBS = -lc_r
|
||||
DEFINES += -D_PR_NEED_FAKE_POLL
|
||||
else
|
||||
OS_LIBS = -lc
|
||||
endif
|
||||
|
||||
ARCH = freebsd
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
DSO_LDOPTS = -Bshareable
|
||||
DSO_LDFLAGS =
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
G++INCLUDES = -I/usr/include/g++
|
||||
|
||||
INCLUDES += -I/usr/X11R6/include
|
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for HP-UX
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
CPU_ARCH = hppa
|
||||
DLL_SUFFIX = sl
|
||||
CCC = CC
|
||||
OS_CFLAGS += -Ae $(DSO_CFLAGS) -DHPUX -D$(CPU_ARCH) -D_HPUX_SOURCE
|
||||
|
||||
ifeq ($(DEFAULT_IMPL_STRATEGY),_PTH)
|
||||
USE_PTHREADS = 1
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
USE_PTHREADS =
|
||||
IMPL_STRATEGY = _CLASSIC
|
||||
endif
|
||||
ifeq ($(PTHREADS_USER),1)
|
||||
USE_PTHREADS =
|
||||
IMPL_STRATEGY = _PTH_USER
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USE_PTHREADS
|
||||
OS_CFLAGS += -D_REENTRANT
|
||||
endif
|
||||
ifdef PTHREADS_USER
|
||||
OS_CFLAGS += -D_REENTRANT
|
||||
endif
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
DSO_LDOPTS = -b
|
||||
DSO_LDFLAGS =
|
||||
|
||||
# +Z generates position independent code for use in shared libraries.
|
||||
DSO_CFLAGS = +Z
|
||||
|
||||
HAVE_PURIFY = 1
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On HP-UX 9, the default (and only) implementation strategy is
|
||||
# classic nspr.
|
||||
#
|
||||
ifeq ($(OS_RELEASE),A.09.03)
|
||||
DEFAULT_IMPL_STRATEGY = _CLASSIC
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXA.09.03
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On HP-UX 9, the default (and only) implementation strategy is
|
||||
# classic nspr.
|
||||
#
|
||||
ifeq ($(OS_RELEASE),A.09.07)
|
||||
DEFAULT_IMPL_STRATEGY = _CLASSIC
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXA.09.07
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXA.09
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UX.mk
|
||||
|
||||
OS_CFLAGS += -DHPUX9
|
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.01)
|
||||
DEFAULT_IMPL_STRATEGY = _CLASSIC
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.10.01
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
|
|
@ -0,0 +1,52 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On HP-UX 10.10 and 10.20, the default implementation strategy is
|
||||
# pthreads (actually DCE threads). Classic nspr is also available.
|
||||
#
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.10)
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.10.10
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
|
||||
|
||||
OS_CFLAGS += -DHPUX10_10
|
||||
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
OS_CFLAGS += -D_PR_DCETHREADS
|
||||
endif
|
|
@ -0,0 +1,52 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On HP-UX 10.10 and 10.20, the default implementation strategy is
|
||||
# pthreads (actually DCE threads). Classic nspr is also available.
|
||||
#
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.20)
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.10.20
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
|
||||
|
||||
OS_CFLAGS += -DHPUX10_20
|
||||
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
OS_CFLAGS += -D_PR_DCETHREADS
|
||||
endif
|
|
@ -0,0 +1,48 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On HP-UX 10.30 and 11.00, the default implementation strategy is
|
||||
# pthreads. Classic nspr and pthreads-user are also available.
|
||||
#
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.30)
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.10.30.
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
|
||||
|
||||
OS_CFLAGS += -DHPUX10_30
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.10
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UX.mk
|
||||
|
||||
OS_CFLAGS += -DHPUX10
|
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On HP-UX 10.30 and 11.00, the default implementation strategy is
|
||||
# pthreads. Classic nspr and pthreads-user are also available.
|
||||
#
|
||||
|
||||
ifeq ($(OS_RELEASE),B.11.00)
|
||||
OS_CFLAGS += -DHPUX10
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.11.00.
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXB.11.mk
|
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On HP-UX 10.30 and 11.00, the default implementation strategy is
|
||||
# pthreads. Classic nspr and pthreads-user are also available.
|
||||
#
|
||||
|
||||
ifeq ($(OS_RELEASE),B.11.11)
|
||||
OS_CFLAGS += -DHPUX10
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.11.00.
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UXB.11.mk
|
|
@ -0,0 +1,50 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for HP-UXB.11
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/HP-UX.mk
|
||||
|
||||
OS_CFLAGS += -DHPUX11
|
||||
|
||||
ifeq ($(USE_64), 1)
|
||||
OS_CFLAGS += +DA2.0W +DS2.0 +DChpux
|
||||
IMPL_STRATEGY = _64
|
||||
else
|
||||
OS_CFLAGS += +DAportable +DS1.1
|
||||
|
||||
endif
|
||||
|
||||
CCC = aCC
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
#
|
||||
# The default implementation strategy for Irix is classic nspr.
|
||||
#
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
IMPL_STRATEGY = _n32_PTH
|
||||
endif
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
CC = gcc
|
||||
AS = $(CC) -x assembler-with-cpp
|
||||
ODD_CFLAGS = -Wall -Wno-format
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O6
|
||||
endif
|
||||
else
|
||||
CC = cc
|
||||
CCC = CC
|
||||
ODD_CFLAGS = -fullwarn -xansi
|
||||
ifdef BUILD_OPT
|
||||
ifeq ($(USE_N32),1)
|
||||
OPTIMIZER = -O -OPT:Olimit=4000
|
||||
else
|
||||
OPTIMIZER = -O -Olimit 4000
|
||||
endif
|
||||
endif
|
||||
|
||||
# For 6.x machines, include this flag
|
||||
ifeq (6., $(findstring 6., $(OS_RELEASE)))
|
||||
ifeq ($(USE_N32),1)
|
||||
ODD_CFLAGS += -n32 -exceptions
|
||||
else
|
||||
ODD_CFLAGS += -32 -multigot
|
||||
endif
|
||||
else
|
||||
ODD_CFLAGS += -xgot
|
||||
endif
|
||||
endif
|
||||
|
||||
ODD_CFLAGS += -DSVR4 -DIRIX
|
||||
|
||||
CPU_ARCH = mips
|
||||
|
||||
RANLIB = /bin/true
|
||||
# For purify
|
||||
# XXX: should always define _SGI_MP_SOURCE
|
||||
NOMD_OS_CFLAGS += $(ODD_CFLAGS) -D_SGI_MP_SOURCE
|
||||
|
||||
ifndef NO_MDUPDATE
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
||||
else
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(USE_N32),1)
|
||||
SHLIB_LD_OPTS += -n32
|
||||
endif
|
||||
|
||||
MKSHLIB += $(LD) $(SHLIB_LD_OPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so)
|
||||
|
||||
HAVE_PURIFY = 1
|
||||
|
||||
DSO_LDOPTS = -elf -shared -all
|
||||
|
||||
ifdef DSO_BACKEND
|
||||
DSO_LDOPTS += -soname $(DSO_NAME)
|
||||
endif
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX 5.2
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/IRIX5.mk
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX 5.3
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/IRIX5.mk
|
||||
|
||||
OS_CFLAGS += -DIRIX5_3
|
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX 5
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/IRIX.mk
|
||||
|
||||
ifndef NS_USE_GCC
|
||||
ODD_CFLAGS += -xgot
|
||||
endif
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX 6.2
|
||||
#
|
||||
|
||||
|
||||
# catch unresolved symbols
|
||||
|
||||
SHLIB_LD_OPTS += -no_unresolved
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/IRIX6.mk
|
||||
|
||||
OS_CFLAGS += -DIRIX6_2
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX 6.3
|
||||
#
|
||||
|
||||
# catch unresolved symbols
|
||||
|
||||
SHLIB_LD_OPTS += -no_unresolved
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/IRIX6.mk
|
||||
|
||||
OS_CFLAGS += -DIRIX6_3
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX 6.5
|
||||
#
|
||||
|
||||
# catch unresolved symbols
|
||||
|
||||
SHLIB_LD_OPTS += -no_unresolved
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/IRIX6.mk
|
||||
|
||||
OS_CFLAGS += -DIRIX6_5
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for IRIX 6
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/IRIX.mk
|
||||
|
||||
ifndef NS_USE_GCC
|
||||
ifneq ($(USE_N32),1)
|
||||
OS_CFLAGS += -32
|
||||
endif
|
||||
ODD_CFLAGS += -multigot
|
||||
endif
|
|
@ -0,0 +1,100 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for Linux
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
#
|
||||
# The default implementation strategy for Linux is classic nspr.
|
||||
#
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
RANLIB = ranlib
|
||||
|
||||
DEFAULT_COMPILER = gcc
|
||||
|
||||
ifeq ($(OS_RELEASE),ppc)
|
||||
OS_REL_CFLAGS = -DMACLINUX -DLINUX1_2
|
||||
CPU_ARCH = ppc
|
||||
else
|
||||
ifeq ($(OS_TEST),alpha)
|
||||
OS_REL_CFLAGS = -D_ALPHA_ -DLINUX1_2
|
||||
CPU_ARCH = alpha
|
||||
else
|
||||
OS_REL_CFLAGS = -mno-486 -DLINUX1_2 -Di386
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),2.0)
|
||||
OS_REL_CFLAGS += -DLINUX2_0
|
||||
MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O2
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
ifeq ($(USE_64),1)
|
||||
ARCH_FLAG = -m64
|
||||
OS_REL_CFLAGS = -DLINUX1_2 -Dx86-64
|
||||
CPU_ARCH = x86_64
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
else
|
||||
ARCH_FLAG = -m32
|
||||
OS_REL_CFLAGS = -DLINUX1_2 -Di386
|
||||
CPU_ARCH = x86
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
endif
|
||||
endif
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCH_FLAG) -ansi -Wall -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
|
||||
OS_LIBS = -L/lib -ldl -lc
|
||||
|
||||
ifdef USE_PTHREADS
|
||||
DEFINES += -D_REENTRANT -D_PR_NEED_FAKE_POLL
|
||||
endif
|
||||
|
||||
ARCH = linux
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
DSO_LDOPTS = -shared
|
||||
DSO_LDFLAGS =
|
||||
|
||||
G++INCLUDES = -I/usr/include/g++
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for Linux 2.0 (ELF)
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/Linux.mk
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for Linux 2.0 (ELF)
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/Linux.mk
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for Linux 2.0 (ELF)
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/Linux.mk
|
|
@ -0,0 +1,33 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Sun LDAP C SDK.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun Microsystems, Inc are Copyright
|
||||
# (C) 2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/Linux.mk
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for Linux 1.2 (ELF)
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/Linux.mk
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for Linux 2.0 (ELF)
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/Linux.mk
|
|
@ -0,0 +1,92 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for NCR SysVr4 v 3.0
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
###
|
||||
NS_USE_NATIVE = 1
|
||||
|
||||
# NS_USE_GCC = 1
|
||||
|
||||
export PATH:=$(PATH):/opt/ncc/bin
|
||||
###
|
||||
|
||||
RANLIB = true
|
||||
GCC_FLAGS_EXTRA += -pipe
|
||||
|
||||
DEFINES += -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR
|
||||
|
||||
OS_CFLAGS += -Hnocopyr -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -DPRFSTREAMS_BROKEN
|
||||
|
||||
ifdef NS_USE_NATIVE
|
||||
CC = cc
|
||||
CCC = ncc
|
||||
CXX = ncc
|
||||
# OS_LIBS += -L/opt/ncc/lib
|
||||
else
|
||||
# OS_LIBS +=
|
||||
endif
|
||||
|
||||
#OS_LIBS += -lsocket -lnsl -ldl -lc
|
||||
|
||||
MKSHLIB += $(LD) $(DSO_LDOPTS)
|
||||
#DSO_LDOPTS += -G -z defs
|
||||
DSO_LDOPTS += -G
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCH = ncr
|
||||
|
||||
NOSUCHFILE = /solaris-rm-f-sucks
|
||||
|
||||
# now take care of default GCC (rus@5/5/97)
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
# if gcc-settings are redefined already - don't touch it
|
||||
#
|
||||
ifeq (,$(findstring gcc, $(CC)))
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
CXX = g++
|
||||
# always use -fPIC - some makefiles are still broken and don't distinguish
|
||||
# situation when they build shared and static libraries
|
||||
CFLAGS += -fPIC -Wall $(GCC_FLAGS_EXTRA)
|
||||
# OS_LIBS += -L/usr/local/lib -lstdc++ -lg++ -lgcc
|
||||
endif
|
||||
endif
|
||||
###
|
|
@ -0,0 +1,63 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for NEC Mips SYSV
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc
|
||||
|
||||
CPU_ARCH = mips
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
else
|
||||
CC = $(CORE_DEPTH)/build/hcc
|
||||
OS_CFLAGS = -Xa -KGnum=0 -KOlimit=4000
|
||||
CCC = g++
|
||||
endif
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
RANLIB = /bin/true
|
||||
|
||||
OS_CFLAGS += $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR
|
||||
OS_LIBS = -lsocket -lnsl -ldl $(LDOPTIONS)
|
||||
LDOPTIONS = -lc -L/usr/ucblib -lucb
|
||||
|
||||
NOSUCHFILE = /nec-rm-f-sucks
|
||||
|
||||
DSO_LDOPTS = -G
|
|
@ -0,0 +1,72 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1
|
||||
#
|
||||
|
||||
#
|
||||
# The Bourne shell (sh) on OSF1 doesn't handle "set -e" correctly,
|
||||
# which we use to stop LOOP_OVER_DIRS submakes as soon as any
|
||||
# submake fails. So we use the Korn shell instead.
|
||||
#
|
||||
SHELL = /usr/bin/ksh
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
CC = cc
|
||||
OS_CFLAGS += $(NON_LD_FLAGS) -std1
|
||||
CCC = cxx
|
||||
RANLIB = /bin/true
|
||||
CPU_ARCH = alpha
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER += -Olimit 4000
|
||||
endif
|
||||
|
||||
NON_LD_FLAGS += -ieee_with_inexact
|
||||
OS_CFLAGS += -DOSF1 -D_REENTRANT
|
||||
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
OS_CFLAGS += -pthread
|
||||
endif
|
||||
|
||||
ifeq ($(USE_IPV6),1)
|
||||
OS_CFLAGS += -D_PR_INET6
|
||||
endif
|
||||
|
||||
# The command to build a shared library on OSF1.
|
||||
MKSHLIB += ld -shared -all -expect_unresolved "*"
|
||||
DSO_LDOPTS += -shared
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1 V2.0
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/OSF1.mk
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1 V3.0
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/OSF1.mk
|
|
@ -0,0 +1,46 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On OSF1 V3.2, classic nspr is the default (and only) implementation
|
||||
# strategy.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1 V3.2
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/OSF1.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),V3.2)
|
||||
OS_CFLAGS += -DOSF1V3
|
||||
endif
|
|
@ -0,0 +1,53 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# On OSF1 V4.0, pthreads is the default implementation strategy.
|
||||
# Classic nspr is also available.
|
||||
#
|
||||
ifneq ($(OS_RELEASE),V3.2)
|
||||
USE_PTHREADS = 1
|
||||
ifeq ($(CLASSIC_NSPR), 1)
|
||||
USE_PTHREADS =
|
||||
IMPL_STRATEGY := _CLASSIC
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1 V4.0
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/OSF1.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),V4.0)
|
||||
OS_CFLAGS += -DOSF1V4
|
||||
endif
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1 V4.0B
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1 V4.0D
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk
|
||||
DEFINES += -DOSF1V4D
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1 V5.0D
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk
|
||||
DEFINES += -DOSF1V4D
|
|
@ -0,0 +1,575 @@
|
|||
OVERVIEW of "ns/coreconf":
|
||||
|
||||
This README file is an attempt to provide the reader with a simple
|
||||
synopsis of the "ns/coreconf" build system which was originally
|
||||
fundamentally designed and built to accomodate Netscape's binary
|
||||
release model. Wherever possible, an attempt has been made to
|
||||
comply with the NSPR 2.0 build system, including mimicing the
|
||||
compiler/linker flags, and directory naming structure. The reader
|
||||
should keep in mind that the system builds binary releases of
|
||||
header files, class files, libraries, and executables on numerous
|
||||
flavors of UNIX and Windows operating systems. Unfortunately,
|
||||
no serious attempt has ever been made to incorporate an ability to
|
||||
generate cross-platform binaries on an Apple MacIntosh platform.
|
||||
|
||||
Note that this file will not attempt to redefine or document the
|
||||
architecture of this system. However, documents on this subject
|
||||
are available at the following URL:
|
||||
|
||||
http://warp/hardcore/prj-ttools/specs/release/index.html
|
||||
|
||||
|
||||
|
||||
DEPENDENCIES of "ns/coreconf":
|
||||
|
||||
The "ns/coreconf" build system requires the specified versions of
|
||||
the following platform-dependent tools:
|
||||
|
||||
UNIX Platforms:
|
||||
--------------
|
||||
gmake (version 3.74 or later)
|
||||
perl 4.0 (NOTE: perl 5.003 or later recommended)
|
||||
uname
|
||||
|
||||
Windows Platforms:
|
||||
-----------------
|
||||
gmake 3.74 (must use hacked Netscape version)
|
||||
shmsdos.exe (contained in Netscape gmake.exe)
|
||||
nsinstall.exe (contained in Netscape gmake.exe)
|
||||
perl.exe (version 4.0 for everything except testing;
|
||||
NOTE: MKS toolkit perl 5.002 is broken)
|
||||
perl5.exe (for testing;
|
||||
NOTE: perl 5.003 or later recommended;
|
||||
MKS toolkit perl 5.002 is broken)
|
||||
uname.exe (use nstools version)
|
||||
|
||||
ENHANCEMENTS to "ns/coreconf":
|
||||
|
||||
With the advent of Certificate Server 4.0 using the ns/coreconf
|
||||
build system, several changes had to be made to enhance
|
||||
ns/coreconf support for building Java/JNI classes/programs, as
|
||||
well as libraries slated to be released as binaries. While the
|
||||
following may not represent an exhaustive list of these changes,
|
||||
it does attempt to be at least somewhat comprehensive:
|
||||
|
||||
(1) During the course of these enhancements, a total of
|
||||
four files have been modified, and four new files have
|
||||
been added.
|
||||
|
||||
The following files have been modified:
|
||||
|
||||
- command.mk: removed old definition of JAR
|
||||
|
||||
- config.mk: added include statement of new
|
||||
"jdk.mk" file
|
||||
|
||||
- ruleset.mk: allowed the $(MKPROG) variable to be
|
||||
overridden by supplying it with a
|
||||
default value of $(CC); augmented
|
||||
numerous definitions to enhance
|
||||
ability of ns/coreconf to produce
|
||||
a more robust set of libraries;
|
||||
added some JNI definitions; moved
|
||||
PACKAGE definition to new "jdk.mk"
|
||||
file
|
||||
|
||||
- rules.mk: separated the compile phase of a
|
||||
program from the link phase of a
|
||||
program such that a developer can
|
||||
now strictly override program linkage
|
||||
by simply supplying a $(MKPROG)
|
||||
variable; augmented NETLIBDEPTH
|
||||
to use CORE_DEPTH but retain backward
|
||||
compatibility; added JNI
|
||||
section; modified .PRECIOUS rule;
|
||||
|
||||
The following files have been added:
|
||||
|
||||
- README: this file; an ASCII-based text
|
||||
document used to summarize the
|
||||
ns/coreconf build system and
|
||||
suitable (paginated) for printing
|
||||
|
||||
- jdk.mk: a file comprising most (if not all)
|
||||
of the default Java related build
|
||||
information
|
||||
|
||||
- jniregen.pl: a perl script used to create a
|
||||
dependency for when JNI files should
|
||||
be regenerated (based upon any change
|
||||
to the ".class" file from which the
|
||||
".h" file was originally generated)
|
||||
|
||||
- outofdate.pl: a perl script used to create a
|
||||
dependency for when ".class" files
|
||||
should be regenerated (based upon
|
||||
any change to the ".java" file
|
||||
from which the ".class" file was
|
||||
originally generated)
|
||||
|
||||
(2) As stated above, the ns/coreconf build system now separates
|
||||
the link phase of a program from its compilation phase.
|
||||
While ns/coreconf still works exactly as it used to because
|
||||
the $(MKPROG) variable is assigned $(CC) by default, a developer
|
||||
may now override this behavior by simply supplying their
|
||||
own unique value for $(MKPROG) on every platform. This allows
|
||||
a program compiled with $(CC) to link with external libraries
|
||||
that may contain "C++" linkage. Before this change, a
|
||||
programmer would need to reference their own local copy of
|
||||
rules.mk (see the ns/sectools/cmd/pk12util program for
|
||||
an example of how this used to be accomplished).
|
||||
|
||||
(3) Currently, the ns/coreconf build system differs from the
|
||||
NSPR 2.0 build system which utilizes an "_s" to denote
|
||||
static libraries from import libraries. In fact, the
|
||||
ns/coreconf build system adds no prefixes or suffixes to
|
||||
distinguish one version of static libraries from another.
|
||||
Note that both the ns/coreconf build system as well as the
|
||||
NSPR 2.0 build system do nothing to provide a method of
|
||||
distinguishing 16-bit from 32-bit static libraries on the
|
||||
same machine, either, since:
|
||||
|
||||
a) this might only provide difficulty during
|
||||
development, since static libraries always
|
||||
need to be embedded within a program
|
||||
(note this is highly unlikely, since libraries
|
||||
for different platforms are subdivided via
|
||||
a well-known subdirectory structure, and
|
||||
a developer may use multiple trees for
|
||||
development),
|
||||
|
||||
b) this maintains backwards compatibility,
|
||||
something very important since no legacy
|
||||
programs will need to change their link phase, and
|
||||
|
||||
c) Netscape as a company has dropped any plans
|
||||
of future development of 16-bit products.
|
||||
|
||||
(4) Since several members of the Hardcore Security group did
|
||||
not favor NSPR 2.0's solution of adding an "_s" to static
|
||||
libraries on Windows platforms as a method to distinguish
|
||||
them from their import library cousins, a different solution
|
||||
was proposed and has been recently implemented for ns/coreconf:
|
||||
|
||||
- a 16 has been added as a suffix to both dynamic and
|
||||
import libraries built on 16-bit Windows platforms
|
||||
|
||||
- a 32 has been added as a suffix to both dynamic and
|
||||
import libraries built on 32-bit Windows platforms
|
||||
|
||||
Since, the HCL release process currently only contains a
|
||||
single instance of building a dynamic library,
|
||||
ns/security/lib/fortcrypt/fort12.dll, the impact of this
|
||||
change should be relatively small.
|
||||
|
||||
It should be noted that although this would additionally
|
||||
limit the 8.3 namespace on 16-bit platforms, it is highly
|
||||
unlikely that any future development will be performed on
|
||||
this platform.
|
||||
|
||||
(5) The $(LIBRARY_VERSION) tag has been added to all non-static
|
||||
libraries created on UNIX operating systems to alleviate
|
||||
any future confusion for binary releases which utilize this
|
||||
tag. Again, it should be noted that this tag is only
|
||||
utilized on non-static libraries, since more than one
|
||||
version of the library may need to exist simultaneously
|
||||
if multiple products are utilized.
|
||||
|
||||
Currently, only one HCL released library utilizes this tag:
|
||||
|
||||
ns/security/lib/fortcrypt/fort12.a
|
||||
(e. g. - in this library, the tag has been set to '12')
|
||||
|
||||
Again, it should be noted that although this would
|
||||
additionally limit the 8.3 namespace on 16-bit platforms,
|
||||
it is highly unlikely that any future development will be
|
||||
performed on this platform.
|
||||
|
||||
(6) The $(JDK_DEBUG_SUFFIX) extension has been added to all
|
||||
library and program names to support debug versions of
|
||||
Java programs (e. g. - java_g, javac_g, etc).
|
||||
|
||||
Once again, it should be noted that although this would
|
||||
additionally limit the 8.3 namespace on 16-bit platforms,
|
||||
it is highly unlikely that any future Java development
|
||||
will be performed on this platform.
|
||||
|
||||
(7) Most (if not all) default definitions for java have been
|
||||
encapsulated within their own file, jdk.mk, which is
|
||||
always included by default in ns/coreconf/config.mk.
|
||||
|
||||
(8) Two perl scripts (jniregen.pl and outofdate.pl) have been
|
||||
added to the system to foster a more robust development
|
||||
environment for composing Java and JNI programs
|
||||
utilizing the ns/coreconf build system. Both of these
|
||||
perl scripts are related to resolving dependencies which
|
||||
can not be accomplished through normal makefile dependencies.
|
||||
|
||||
(9) This file, README, was created in an attempt to allow
|
||||
developers who have familiarity with ns/coreconf a simple
|
||||
roadmap for what has changed, as well as a top-level view of
|
||||
what comprises ns/coreconf. This file was written in
|
||||
ASCII (rather than HTML) primarily to promote simple
|
||||
paginated printing.
|
||||
|
||||
OVERVIEW of "config.mk":
|
||||
|
||||
This file contains the configuration information necessary to
|
||||
build each "Core Components" source module:
|
||||
|
||||
include file name Purpose
|
||||
=================== =======================================
|
||||
arch.mk Master "Core Components" source and
|
||||
release <architecture> tags
|
||||
|
||||
command.mk Master "Core Components" default
|
||||
command macros (NOTE: may be overridden
|
||||
in $(OS_CONFIG).mk)
|
||||
|
||||
$(OS_CONFIG).mk Master "Core Components"
|
||||
<architecture>-specific macros
|
||||
(dependent upon <architecture> tags)
|
||||
|
||||
platform.mk Master "Core Components" source and
|
||||
release <platform> tags (dependent upon
|
||||
<architecture> tags)
|
||||
|
||||
tree.mk Master "Core Components" release <tree>
|
||||
tags (dependent upon <architecture>
|
||||
tags)
|
||||
|
||||
module.mk Master "Core Components" source and
|
||||
release <component> tags (NOTE: A
|
||||
component is also called a module or a
|
||||
subsystem. This file is dependent upon
|
||||
$(MODULE) being defined on the command
|
||||
line, as an environment variable, or in
|
||||
individual makefiles, or more
|
||||
appropriately, manifest.mn)
|
||||
|
||||
version.mk Master "Core Components" release
|
||||
<version> tags (dependent upon
|
||||
$(MODULE) being defined on the command
|
||||
line, as an environment variable, or in
|
||||
individual makefiles, or more
|
||||
appropriately, manifest.mn)
|
||||
|
||||
location.mk Master "Core Components" macros to
|
||||
figure out binary code location
|
||||
(dependent upon <platform> tags)
|
||||
|
||||
source.mk Master "Core Components"
|
||||
<component>-specific source path
|
||||
(dependent upon <user_source_tree>,
|
||||
<source_component>, <version>, and
|
||||
<platform> tags)
|
||||
|
||||
headers.mk Master "Core Components" include switch
|
||||
for support header files (dependent
|
||||
upon <tree>, <component>, <version>,
|
||||
and <platform> tags)
|
||||
|
||||
prefix.mk Master "Core Components" for computing
|
||||
program prefixes
|
||||
|
||||
suffix.mk Master "Core Components" for computing
|
||||
program suffixes (dependent upon
|
||||
<architecture> tags)
|
||||
|
||||
jdk.mk Master "Core Components" for defining
|
||||
JDK (dependent upon <architecture>,
|
||||
<source>, and <suffix> tags)
|
||||
|
||||
ruleset.mk Master "Core Components" rule set
|
||||
(should always be the last file
|
||||
included by config.mk)
|
||||
|
||||
|
||||
|
||||
OVERVIEW of "rules.mk":
|
||||
|
||||
The "rules.mk" file consists of four sections. The first section
|
||||
contains the "master" build rules for all binary releases. While
|
||||
this section can (and should) largely be thought of as "language"
|
||||
independent, it does utilize the "perl" scripting language to
|
||||
perform both the "import" and "release" of binary modules.
|
||||
|
||||
The rules which dwell in this section and their purpose:
|
||||
|
||||
|
||||
CATEGORY/rule:: Purpose
|
||||
=================== =======================================
|
||||
|
||||
GENERAL
|
||||
-------
|
||||
all:: "default" all-encompassing rule which
|
||||
performs "export libs program install"
|
||||
|
||||
export:: recursively copy specified
|
||||
cross-platform header files to the
|
||||
$(SOURCE_XPHEADERS_DIR) directory;
|
||||
recursively copy specified
|
||||
machine-dependent header files to the
|
||||
$(SOURCE_MDHEADERS_DIR) directory;
|
||||
although all rules can be written to
|
||||
repetively "chain" into other sections,
|
||||
this rule is the most commonly used
|
||||
rule to "chain" into other sections
|
||||
such as Java providing a simple
|
||||
mechanism which allows no need for
|
||||
developers to memorize specialized
|
||||
rules
|
||||
|
||||
libs:: recursively build
|
||||
static (archival) $(LIBRARY), shared
|
||||
(dynamic link) $(SHARED_LIBRARY),
|
||||
import $(IMPORT_LIBRARY), and/or
|
||||
"purified" $(PURE_LIBRARY)
|
||||
libraries
|
||||
|
||||
program:: recursively build $(PROGRAM)
|
||||
executable
|
||||
|
||||
install:: recursively copy all libraries to
|
||||
$(SOURCE_LIB_DIR) directory;
|
||||
recursively copy all executables to
|
||||
$(SOURCE_BIN_DIR) directory
|
||||
|
||||
clean:: remove all files specified in the
|
||||
$(ALL_TRASH) variable
|
||||
|
||||
clobber:: synonym for "clean::" rule
|
||||
|
||||
realclean:: remove all files specified by
|
||||
$(wildcard *.OBJ), dist, and in
|
||||
the $(ALL_TRASH) variable
|
||||
|
||||
clobber_all:: synonym for "realclean::" rule
|
||||
|
||||
private_export:: recursively copy specified
|
||||
cross-platform header files to the
|
||||
$(SOURCE_XPPRIVATE_DIR) directory
|
||||
|
||||
|
||||
IMPORT
|
||||
------
|
||||
import:: uses perl script to retrieve specified
|
||||
VERSION of the binary release from
|
||||
$(RELEASE_TREE)
|
||||
|
||||
RELEASE
|
||||
-------
|
||||
release_clean:: remove all files from the
|
||||
$(SOURCE_RELEASE_PREFIX) directory
|
||||
|
||||
release:: place specified VERSION of the
|
||||
binary release in the appropriate
|
||||
$(RELEASE_TREE) directory
|
||||
|
||||
release_export:: recursively copy specified
|
||||
cross-platform header files to the
|
||||
$(SOURCE_XPHEADERS_DIR)/include
|
||||
directory
|
||||
|
||||
release_md:: recursively copy all libraries to
|
||||
$(SOURCE_RELEASE_PREFIX)/
|
||||
$(SOURCE_RELEASE_LIB_DIR) directory;
|
||||
recursively copy all executables to
|
||||
$(SOURCE_RELEASE_PREFIX)/
|
||||
$(SOURCE_RELEASE_BIN_DIR) directory
|
||||
|
||||
release_jars:: use perl script to package appropriate
|
||||
files in the $(XPCLASS_JAR),
|
||||
$(XPHEADER_JAR), $(MDHEADER_JAR), and
|
||||
$(MDBINARY_JAR) jar files
|
||||
|
||||
release_cpdistdir:: use perl script to copy the
|
||||
$(XPCLASS_JAR), $(XPHEADER_JAR),
|
||||
$(MDHEADER_JAR), and $(MDBINARY_JAR)
|
||||
jar files to the specified VERSION
|
||||
of the $(RELEASE_TREE) directory
|
||||
|
||||
|
||||
|
||||
TOOLS and AUTOMATION
|
||||
--------------------
|
||||
platform:: tool used to display the platform name
|
||||
as composed within the "arch.mk" file
|
||||
|
||||
autobuild:: automation rule used by "Bonsai" and
|
||||
"Tinderbox" to automatically generate
|
||||
binary releases on various platforms
|
||||
|
||||
tests:: automation tool used to run the
|
||||
"regress" and "reporter" tools
|
||||
on various regression test suites
|
||||
|
||||
The second section of "rules.mk" primarily contains several
|
||||
"language" dependent build rules for binary releases. These are
|
||||
generally "computed" rules (created on the "fly"), and include
|
||||
rules used by "C", "C++", assembly, the preprocessor, perl, and
|
||||
the shell.
|
||||
|
||||
The rules which dwell in this section and their purpose:
|
||||
|
||||
|
||||
CATEGORY/rule:: Purpose
|
||||
=================== =============================
|
||||
|
||||
LIBRARIES
|
||||
---------
|
||||
$(LIBRARY): build the static library
|
||||
specified by the $(LIBRARY)
|
||||
variable
|
||||
|
||||
$(IMPORT_LIBRARY): build the import library
|
||||
specified by the
|
||||
$(IMPORT_LIBRARY) variable
|
||||
|
||||
$(SHARED_LIBRARY): build the shared
|
||||
(dynamic link) library
|
||||
specified by the
|
||||
$(SHARED_LIBRARY) variable
|
||||
|
||||
$(PURE_LIBRARY): build the "purified" library
|
||||
specified by the
|
||||
$(PURE_LIBRARY) variable
|
||||
|
||||
|
||||
PROGRAMS
|
||||
--------
|
||||
$(PROGRAM): build the binary executable
|
||||
specified by the $(PROGRAM)
|
||||
rule
|
||||
|
||||
$(OBJDIR)/
|
||||
$(PROG_PREFIX)%.pure: build the "purified" binary
|
||||
executable specified by this
|
||||
rule
|
||||
|
||||
|
||||
OBJECTS
|
||||
-------
|
||||
$(OBJDIR)/
|
||||
$(PROG_PREFIX)%$(OBJ_SUFFIX): build the object file
|
||||
associated with the
|
||||
makefile rule dependency:
|
||||
|
||||
%.c = C file
|
||||
%.cpp = C++ file
|
||||
%.cc = C++ file
|
||||
%.s = assembly file
|
||||
%.S = assembly file
|
||||
|
||||
$(OBJDIR)/
|
||||
$(PROG_PREFIX)%: (NOTE: deprecated rule)
|
||||
build the object file
|
||||
associated with the
|
||||
makefile rule dependency:
|
||||
|
||||
%.cpp = C++ file
|
||||
|
||||
MISCELLANEOUS
|
||||
-------------
|
||||
$(DIRS):: specifies a helper method
|
||||
used by $(LOOP_THROUGH_DIRS)
|
||||
to recursively change
|
||||
directories and invoke
|
||||
$(MAKE)
|
||||
|
||||
%.i: build the preprocessor file
|
||||
associated with the
|
||||
makefile rule dependency:
|
||||
|
||||
%.c = C file
|
||||
%.cpp = C++ file
|
||||
|
||||
%: process the specified file
|
||||
using the method associated
|
||||
with the makefile rule
|
||||
dependency:
|
||||
|
||||
%.pl = perl script
|
||||
%.sh = shell script
|
||||
|
||||
alltags: tool used to recursively
|
||||
create a "ctags"-style
|
||||
file for reference
|
||||
|
||||
The third section of "rules.mk' primarily contains several JAVA
|
||||
"language" build rules for binary releases. These are also
|
||||
generally "computed" rules (created on the "fly").
|
||||
|
||||
The rules which dwell in this section and their purpose:
|
||||
|
||||
|
||||
CATEGORY/rule:: Purpose
|
||||
=================== =============================
|
||||
$(JAVA_DESTPATH):: create directory specified
|
||||
as the Java destination path
|
||||
for where classes are
|
||||
deposited
|
||||
|
||||
$(JAVA_DESTPATH)/$(PACKAGE):: create directories specified
|
||||
within the $(PACKAGE)
|
||||
variable
|
||||
|
||||
$(JMCSRCDIR):: create directory specified
|
||||
as the JMC destination path
|
||||
|
||||
$(JRI_HEADER_CFILES): used to generate/regenerate
|
||||
JRI header files for "C"
|
||||
|
||||
$(JRI_STUB_CFILES): used to generate/regenerate
|
||||
JRI stub files for "C"
|
||||
|
||||
$(JNI_HEADERS): used to generate/regenerate
|
||||
JNI header files for "C"
|
||||
|
||||
The fourth section of "rules.mk" primarily contains miscellaneous
|
||||
build rules for binary releases. Many of these rules are here to
|
||||
create new subdirectories, manage dependencies, and/or override
|
||||
standard gmake "Makefile" rules.
|
||||
|
||||
The rules which dwell in this section and their purpose:
|
||||
|
||||
|
||||
CATEGORY/rule:: Purpose
|
||||
=================== =============================
|
||||
|
||||
$(PUBLIC_EXPORT_DIR):: create directory used to
|
||||
house public "C" header files
|
||||
|
||||
$(PRIVATE_EXPORT_DIR):: create directory used to
|
||||
house private "C" header
|
||||
files
|
||||
|
||||
$(SOURCE_XP_DIR)/
|
||||
release/include:: create directory used to
|
||||
house "C" header files
|
||||
contained in a release
|
||||
|
||||
$(MKDEPENDENCIES):: for UNIX systems, create
|
||||
a directory used to house
|
||||
dependencies and utilize
|
||||
the $(MKDEPEND) rule to
|
||||
create them
|
||||
|
||||
$(MKDEPEND):: cd to the dependency
|
||||
directory and create them
|
||||
|
||||
depend:: if $(OBJS) exist, perform the
|
||||
$(MKDEPEND) rule followed by
|
||||
the $(MKDEPENDENCIES) rule
|
||||
|
||||
dependclean:: remove all files contained
|
||||
in the dependency repository
|
||||
|
||||
.DEFAULT: standard gmake rule
|
||||
|
||||
.SUFFIXES: standard gmake rule
|
||||
|
||||
.PRECIOUS: standard gmake rule
|
||||
|
||||
.PHONY: standard gmake rule
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for ReliantUNIX
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
## gcc-2.7.2 homebrewn
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
AS = $(CC)
|
||||
ASFLAGS += -x assembler-with-cpp
|
||||
LD = gld
|
||||
ODD_CFLAGS = -pipe -Wall -Wno-format
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER += -O6
|
||||
endif
|
||||
MKSHLIB = $(LD)
|
||||
MKSHLIB += -G -h $(@:$(OBJDIR)/%.so=%.so)
|
||||
DSO_LDOPTS += -G -Xlinker -Blargedynsym
|
||||
else
|
||||
## native compiler (CDS++ 1.0)
|
||||
# CC = /usr/bin/cc
|
||||
CC = cc
|
||||
CCC = /usr/bin/CC
|
||||
AS = /usr/bin/cc
|
||||
ODD_CFLAGS =
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER += -O -F Olimit,4000
|
||||
endif
|
||||
MKSHLIB = $(CC)
|
||||
MKSHLIB += -G -h $(@:$(OBJDIR)/%.so=%.so)
|
||||
DSO_LDOPTS += -G -W l,-Blargedynsym
|
||||
endif
|
||||
|
||||
NOSUCHFILE = /sni-rm-f-sucks
|
||||
ODD_CFLAGS += -DSVR4 -DSNI -DRELIANTUNIX
|
||||
CPU_ARCH = mips
|
||||
RANLIB = /bin/true
|
||||
|
||||
# For purify
|
||||
NOMD_OS_CFLAGS += $(ODD_CFLAGS)
|
||||
|
||||
# we do not have -MDupdate ...
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS)
|
||||
OS_LIBS += -lsocket -lnsl -lresolv -lgen -ldl -lc /usr/ucblib/libucb.a
|
||||
HAVE_PURIFY = 0
|
||||
|
||||
ifdef DSO_BACKEND
|
||||
DSO_LDOPTS += -h $(DSO_NAME)
|
||||
endif
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for ReliantUNIX5.4
|
||||
#
|
||||
include $(CORE_DEPTH)/coreconf/ReliantUNIX.mk
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SCO OpenServer 5.0 for x86.
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SCO_SV3.2.mk
|
|
@ -0,0 +1,88 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SCO Unix for x86.
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
CC = cc
|
||||
OS_CFLAGS += -b elf -KPIC
|
||||
CCC = g++
|
||||
CCC += -b elf -DPRFSTREAMS_BROKEN -I/usr/local/lib/g++-include
|
||||
# CCC = $(CORE_DEPTH)/build/hcpp
|
||||
# CCC += +.cpp +w
|
||||
RANLIB = /bin/true
|
||||
|
||||
#
|
||||
# -DSCO_PM - Policy Manager AKA: SCO Licensing
|
||||
# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..)
|
||||
# -Dsco - Needed for /usr/include/X11/*
|
||||
#
|
||||
OS_CFLAGS += -DSCO_SV -DSYSV -D_SVID3 -DHAVE_STRERROR -DSW_THREADS -DSCO_PM -DSCO -Dsco
|
||||
#OS_LIBS += -lpmapi -lsocket -lc
|
||||
MKSHLIB = $(LD)
|
||||
MKSHLIB += $(DSO_LDOPTS)
|
||||
XINC = /usr/include/X11
|
||||
MOTIFLIB += -lXm
|
||||
INCLUDES += -I$(XINC)
|
||||
CPU_ARCH = x86
|
||||
GFX_ARCH = x
|
||||
ARCH = sco
|
||||
LOCALE_MAP = $(CORE_DEPTH)/cmd/xfe/intl/sco.lm
|
||||
EN_LOCALE = C
|
||||
DE_LOCALE = de_DE.ISO8859-1
|
||||
FR_LOCALE = fr_FR.ISO8859-1
|
||||
JP_LOCALE = ja
|
||||
SJIS_LOCALE = ja_JP.SJIS
|
||||
KR_LOCALE = ko_KR.EUC
|
||||
CN_LOCALE = zh
|
||||
TW_LOCALE = zh
|
||||
I2_LOCALE = i2
|
||||
LOC_LIB_DIR = /usr/lib/X11
|
||||
NOSUCHFILE = /solaris-rm-f-sucks
|
||||
BSDECHO = /bin/echo
|
||||
|
||||
#
|
||||
# These defines are for building unix plugins
|
||||
#
|
||||
BUILD_UNIX_PLUGINS = 1
|
||||
#DSO_LDOPTS += -b elf -G -z defs
|
||||
DSO_LDOPTS += -b elf -G
|
||||
DSO_LDFLAGS += -nostdlib -L/lib -L/usr/lib -lXm -lXt -lX11 -lgen
|
||||
|
||||
# Used for Java compiler
|
||||
EXPORT_FLAGS += -W l,-Bexport
|
|
@ -0,0 +1,61 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS4.1
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
INCLUDES += -I/usr/dt/include -I/usr/openwin/include -I/home/motif/usr/include
|
||||
|
||||
# SunOS 4 _requires_ that shared libs have a version number.
|
||||
# XXX FIXME: Version number should use NSPR_VERSION_NUMBER?
|
||||
DLL_SUFFIX = so.1.0
|
||||
CC = gcc
|
||||
RANLIB = ranlib
|
||||
CPU_ARCH = sparc
|
||||
|
||||
# Purify doesn't like -MDupdate
|
||||
NOMD_OS_CFLAGS += -Wall -Wno-format -DSUNOS4
|
||||
OS_CFLAGS += $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
||||
MKSHLIB = $(LD)
|
||||
MKSHLIB += $(DSO_LDOPTS)
|
||||
HAVE_PURIFY = 1
|
||||
NOSUCHFILE = /solaris-rm-f-sucks
|
||||
DSO_LDOPTS =
|
||||
|
||||
# -fPIC generates position-independent code for use in a shared library.
|
||||
DSO_CFLAGS += -fPIC
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1994-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
# Config stuff for SunOS5.10
|
||||
#
|
||||
|
||||
SOL_CFLAGS += -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),5.10)
|
||||
OS_DEFINES += -DSOLARIS2_10
|
||||
endif
|
||||
|
||||
OS_LIBS += -lnsl -lsocket -lposix4 -ldl -lc
|
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
# Config stuff for Solaris 10 on x86
|
||||
#
|
||||
|
||||
SOL_CFLAGS = -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(USE_64),1)
|
||||
CPU_ARCH = x86_64
|
||||
ARCHFLAG =
|
||||
OS_DEFINES += -Dx86_64
|
||||
else
|
||||
CPU_ARCH = x86
|
||||
ARCHFLAG =
|
||||
OS_DEFINES += -Di386
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),5.10_i86pc)
|
||||
OS_DEFINES += -DSOLARIS2_10
|
||||
endif
|
||||
|
||||
OS_LIBS += -lnsl -lsocket -lposix4 -ldl -lc
|
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS5.3
|
||||
#
|
||||
|
||||
SOL_CFLAGS =
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS5.4
|
||||
#
|
||||
|
||||
SOL_CFLAGS =
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
|
@ -0,0 +1,70 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for Solaris 2.4 on x86
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
CC = gcc
|
||||
OS_CFLAGS += -Wall -Wno-format
|
||||
CCC = g++
|
||||
CCC += -Wall -Wno-format
|
||||
ASFLAGS += -x assembler-with-cpp
|
||||
ifdef NO_MDUPDATE
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS)
|
||||
else
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
||||
endif
|
||||
else
|
||||
CC = cc
|
||||
CCC = CC
|
||||
ASFLAGS += -Wa,-P
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS)
|
||||
endif
|
||||
|
||||
CPU_ARCH = x86
|
||||
|
||||
MKSHLIB = $(LD)
|
||||
MKSHLIB += $(DSO_LDOPTS)
|
||||
NOSUCHFILE = /solx86-rm-f-sucks
|
||||
RANLIB = echo
|
||||
|
||||
# for purify
|
||||
NOMD_OS_CFLAGS += -DSVR4 -DSYSV -D_REENTRANT -DSOLARIS -D__svr4__ -Di386
|
||||
|
||||
DSO_LDOPTS += -G
|
|
@ -0,0 +1,46 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS5.5.1
|
||||
#
|
||||
|
||||
SOL_CFLAGS += -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),5.5.1)
|
||||
OS_DEFINES += -DSOLARIS2_5
|
||||
endif
|
||||
|
||||
OS_LIBS += -lc -lthread -lnsl -lsocket -lposix4 -ldl
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS5.5
|
||||
#
|
||||
|
||||
SOL_CFLAGS += -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),5.5)
|
||||
OS_DEFINES += -DSOLARIS2_5
|
||||
endif
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS5.6
|
||||
#
|
||||
|
||||
SOL_CFLAGS += -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),5.6)
|
||||
OS_DEFINES += -DSOLARIS2_6
|
||||
endif
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS5.8
|
||||
#
|
||||
|
||||
SOL_CFLAGS += -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),5.8)
|
||||
OS_DEFINES += -DSOLARIS2_8
|
||||
endif
|
|
@ -0,0 +1,48 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
# Config stuff for Solaris 8 on x86
|
||||
#
|
||||
|
||||
SOL_CFLAGS = -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCHFLAG =
|
||||
OS_DEFINES += -Di386
|
||||
|
||||
ifeq ($(OS_RELEASE),5.8_i86pc)
|
||||
OS_DEFINES += -DSOLARIS2_8
|
||||
endif
|
||||
|
||||
OS_LIBS += -lnsl -lsocket -lposix4 -ldl -lc
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1994-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
# Config stuff for SunOS5.9
|
||||
#
|
||||
|
||||
SOL_CFLAGS += -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),5.9)
|
||||
OS_DEFINES += -DSOLARIS2_9
|
||||
endif
|
||||
|
||||
OS_LIBS += -lnsl -lsocket -lposix4 -ldl -lc
|
|
@ -0,0 +1,48 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
# Config stuff for Solaris 9 on x86
|
||||
#
|
||||
|
||||
SOL_CFLAGS = -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCHFLAG =
|
||||
OS_DEFINES += -Di386
|
||||
|
||||
ifeq ($(OS_RELEASE),5.9_i86pc)
|
||||
OS_DEFINES += -DSOLARIS2_9
|
||||
endif
|
||||
|
||||
OS_LIBS += -lnsl -lsocket -lposix4 -ldl -lc
|
|
@ -0,0 +1,144 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SunOS5.x
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
#
|
||||
# 64 bit stuff
|
||||
#
|
||||
ifdef USE_64
|
||||
ifeq ($(CPU_ARCH),sparc)
|
||||
ARCH_FLAG=-xarch=v9 -L/usr/lib/sparcv9
|
||||
LD=/usr/ccs/bin/ld
|
||||
IMPL_STRATEGY=_64
|
||||
endif
|
||||
ifeq ($(CPU_ARCH),i386)
|
||||
ARCH_FLAG=-xarch=amd64 -L/usr/lib/64
|
||||
LD=/usr/ccs/bin/amd64/ld
|
||||
IMPL_STRATEGY=_64
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
LOCAL_THREADS_ONLY = 1
|
||||
ifndef NS_USE_NATIVE
|
||||
NS_USE_GCC = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# The default implementation strategy for Solaris is classic nspr.
|
||||
#
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
IMPL_STRATEGY = _PTH
|
||||
else
|
||||
ifeq ($(LOCAL_THREADS_ONLY),1)
|
||||
IMPL_STRATEGY = _LOCAL
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
DEFINES += -D_PR_GLOBAL_THREADS_ONLY
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
IMPL_STRATEGY =
|
||||
endif
|
||||
|
||||
DEFAULT_COMPILER = cc
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
CC = gcc
|
||||
OS_CFLAGS += -Wall -Wno-format
|
||||
CCC = g++
|
||||
CCC += -Wall -Wno-format
|
||||
ASFLAGS += -x assembler-with-cpp
|
||||
ifdef NO_MDUPDATE
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS)
|
||||
else
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
||||
endif
|
||||
else
|
||||
CC = cc
|
||||
CCC = CC
|
||||
ASFLAGS += -Wa,-P
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCH_FLAG)
|
||||
ifndef BUILD_OPT
|
||||
OS_CFLAGS += -xs
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
INCLUDES += -I/usr/dt/include -I/usr/openwin/include
|
||||
|
||||
RANLIB = echo
|
||||
CPU_ARCH = sparc
|
||||
OS_DEFINES += -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS
|
||||
|
||||
ifneq ($(LOCAL_THREADS_ONLY),1)
|
||||
OS_DEFINES += -D_REENTRANT
|
||||
endif
|
||||
|
||||
# Purify doesn't like -MDupdate
|
||||
NOMD_OS_CFLAGS += $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
|
||||
|
||||
MKSHLIB = $(LD)
|
||||
MKSHLIB += $(DSO_LDOPTS)
|
||||
|
||||
# ld options:
|
||||
# -G: produce a shared object
|
||||
# -z defs: no unresolved symbols allowed
|
||||
DSO_LDOPTS += -G
|
||||
|
||||
# -KPIC generates position independent code for use in shared libraries.
|
||||
# (Similarly for -fPIC in case of gcc.)
|
||||
ifdef NS_USE_GCC
|
||||
DSO_CFLAGS += -fPIC
|
||||
else
|
||||
DSO_CFLAGS += -KPIC
|
||||
endif
|
||||
|
||||
HAVE_PURIFY = 1
|
||||
NOSUCHFILE = /solaris-rm-f-sucks
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
XP_DEFINE += -DXP_UNIX
|
||||
LIB_SUFFIX = a
|
||||
DLL_SUFFIX = so
|
||||
AR = ar
|
||||
AR += cr $@
|
||||
LDOPTS += -L$(SOURCE_LIB_DIR)
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER += -O
|
||||
DEFINES += -UDEBUG -DNDEBUG
|
||||
else
|
||||
OPTIMIZER += -g
|
||||
DEFINES += -DDEBUG -UNDEBUG
|
||||
endif
|
||||
|
||||
NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
|
||||
NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
|
||||
|
||||
MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
|
||||
MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
|
||||
MKDEPENDENCIES = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/depend.mk
|
||||
|
||||
####################################################################
|
||||
#
|
||||
# One can define the makefile variable NSDISTMODE to control
|
||||
# how files are published to the 'dist' directory. If not
|
||||
# defined, the default is "install using relative symbolic
|
||||
# links". The two possible values are "copy", which copies files
|
||||
# but preserves source mtime, and "absolute_symlink", which
|
||||
# installs using absolute symbolic links. The "absolute_symlink"
|
||||
# option requires NFSPWD.
|
||||
# - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97
|
||||
# - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY
|
||||
####################################################################
|
||||
|
||||
ifeq ($(NSDISTMODE),copy)
|
||||
# copy files, but preserve source mtime
|
||||
INSTALL = $(NSINSTALL)
|
||||
INSTALL += -t
|
||||
else
|
||||
ifeq ($(NSDISTMODE),absolute_symlink)
|
||||
# install using absolute symbolic links
|
||||
INSTALL = $(NSINSTALL)
|
||||
INSTALL += -L `$(NFSPWD)`
|
||||
else
|
||||
# install using relative symbolic links
|
||||
INSTALL = $(NSINSTALL)
|
||||
INSTALL += -R
|
||||
endif
|
||||
endif
|
||||
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
|
||||
endef
|
|
@ -0,0 +1,51 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for SCO Unixware 2.1
|
||||
#
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/UNIX.mk
|
||||
|
||||
DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc
|
||||
|
||||
CC = $(CORE_DEPTH)/build/hcc
|
||||
CCC = $(CORE_DEPTH)/build/hcpp
|
||||
RANLIB = true
|
||||
OS_CFLAGS = -KPIC -DSVR4 -DSYSV -DUNIXWARE
|
||||
MKSHLIB = $(LD)
|
||||
MKSHLIB += $(DSO_LDOPTS)
|
||||
DSO_LDOPTS += -G
|
||||
CPU_ARCH = x86
|
||||
ARCH = sco
|
||||
NOSUCHFILE = /solaris-rm-f-sucks
|
|
@ -0,0 +1,125 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# win16_3.11.mk -- Make configuration for Win16
|
||||
#
|
||||
# This file configures gmake to build the Win16 variant of
|
||||
# NSPR 2.0. This file has the function of two files commonly
|
||||
# used on other platforms, for example: winnt.mk and
|
||||
# winnt4.0.mk. ... The packaging is easier and there is only
|
||||
# one variant of the Win16 target.
|
||||
#
|
||||
# Win16 is built using the Watcom C/C++ version 11.0
|
||||
# compiler. You gotta set up the compiler first. Follow the
|
||||
# directions in the manual (Ha! ... really, its not a
|
||||
# problem). The Watcom compiler depends on a few environment
|
||||
# variables; these environment variables define where the
|
||||
# compiler components are installed; they must be set before
|
||||
# running the make.
|
||||
#
|
||||
# Notes:
|
||||
# OS_CFLAGS is the command line options for the compiler when
|
||||
# building the .DLL object files.
|
||||
# OS_EXE_CFLAGS is the command line options for the compiler
|
||||
# when building the .EXE object files; this is for the test
|
||||
# programs.
|
||||
# the macro OS_CFLAGS is set to OS_EXE_CFLAGS inside of the
|
||||
# makefile for the pr/tests directory. ... Hack.
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# -- configuration -----------------------------------------
|
||||
|
||||
DEFAULT_COMPILER = wcc
|
||||
|
||||
CC = wcc
|
||||
CCC = wcl
|
||||
LINK = wlink
|
||||
AR = wlib
|
||||
AR += -q $@
|
||||
RC = wrc.exe
|
||||
RC += /r /dWIN16=1 /bt=windows
|
||||
RANLIB = echo
|
||||
BSDECHO = echo
|
||||
NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
|
||||
NSINSTALL = nsinstall
|
||||
INSTALL = $(NSINSTALL)
|
||||
MAKE_OBJDIR = mkdir
|
||||
MAKE_OBJDIR += $(OBJDIR)
|
||||
XP_DEFINE += -DXP_PC
|
||||
LIB_SUFFIX = lib
|
||||
DLL_SUFFIX = dll
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -oneatx -oh -oi -ei -3 -fpi87 -fp3
|
||||
else
|
||||
OPTIMIZER += -d2 -hc -DDEBUG
|
||||
# OPTIMIZER += -d2 -hw -DDEBUG
|
||||
# LDFLAGS += -DEBUG -DEBUGTYPE:CV
|
||||
endif
|
||||
|
||||
# XXX FIXME: I doubt we use this. It is redundant with
|
||||
# SHARED_LIBRARY.
|
||||
ifdef DLL
|
||||
DLL := $(addprefix $(OBJDIR)/, $(DLL))
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# $(CPU_ARCH) has been commented out so that its contents
|
||||
# are not added to the WIN16_?.OBJ names thus expanding
|
||||
# them beyond the 8.3 character limit for this platform.
|
||||
#
|
||||
#CPU_ARCH = x386
|
||||
#
|
||||
# added "-s" to avoid dependency on watcom's libs (e.g. on _STK)
|
||||
# added "-zt3" for compatibility with MSVC's "/Gt3" option
|
||||
#
|
||||
OS_CFLAGS += -ml -3 -bd -zc -zu -bt=windows -s -zt3 -d_X86_ -dWIN16 -d_WINDLL
|
||||
#OS_EXE_CFLAGS += -ml -3 -bt=windows -d_X86_ -dWIN16
|
||||
OS_LIB_FLAGS = -c -iro
|
||||
|
||||
# Name of the binary code directories
|
||||
OS_DLL_OPTION = CASEEXACT
|
||||
OS_DLLFLAGS =
|
||||
OS_LIBS =
|
||||
W16_EXPORTS = #
|
||||
|
||||
#
|
||||
# The following is NOT needed for the NSPR 2.0 library.
|
||||
#
|
||||
|
||||
OS_CFLAGS += -d_WINDOWS -d_MSC_VER=700
|
|
@ -0,0 +1,93 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration common to all versions of Windows NT
|
||||
# and Windows 95
|
||||
#
|
||||
|
||||
DEFAULT_COMPILER = cl
|
||||
|
||||
CC = cl
|
||||
CCC = cl
|
||||
LINK = link
|
||||
AR = lib
|
||||
AR += -NOLOGO -OUT:"$@"
|
||||
RANLIB = echo
|
||||
BSDECHO = echo
|
||||
NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
|
||||
NSINSTALL = nsinstall
|
||||
INSTALL = $(NSINSTALL)
|
||||
MAKE_OBJDIR = mkdir
|
||||
MAKE_OBJDIR += $(OBJDIR)
|
||||
RC = rc.exe
|
||||
GARBAGE += $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb
|
||||
XP_DEFINE += -DXP_PC
|
||||
LIB_SUFFIX = lib
|
||||
DLL_SUFFIX = dll
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OS_CFLAGS += -MD
|
||||
OPTIMIZER += -O2
|
||||
DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
|
||||
DLLFLAGS += -OUT:"$@"
|
||||
else
|
||||
#
|
||||
# Define USE_DEBUG_RTL if you want to use the debug runtime library
|
||||
# (RTL) in the debug build
|
||||
#
|
||||
ifdef USE_DEBUG_RTL
|
||||
OS_CFLAGS += -MDd
|
||||
else
|
||||
OS_CFLAGS += -MD
|
||||
endif
|
||||
OPTIMIZER += -Od -Z7
|
||||
#OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od
|
||||
DEFINES += -DDEBUG -D_DEBUG -UNDEBUG
|
||||
DLLFLAGS += -DEBUG -DEBUGTYPE:CV -OUT:"$@"
|
||||
LDFLAGS += -DEBUG -DEBUGTYPE:CV
|
||||
endif
|
||||
|
||||
# XXX FIXME: I doubt we use this. It is redundant with
|
||||
# SHARED_LIBRARY.
|
||||
ifdef DLL
|
||||
DLL := $(addprefix $(OBJDIR)/, $(DLL))
|
||||
endif
|
||||
|
||||
DEFINES += -DWIN32
|
||||
|
||||
#
|
||||
# The following is NOT needed for the NSPR 2.0 library.
|
||||
#
|
||||
|
||||
DEFINES += -D_WINDOWS
|
|
@ -0,0 +1,63 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for WIN95
|
||||
#
|
||||
# This makefile defines the following variables:
|
||||
# CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
|
||||
# PROCESSOR is an internal variable.
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/WIN32.mk
|
||||
|
||||
PROCESSOR := $(shell uname -p)
|
||||
ifeq ($(PROCESSOR), I386)
|
||||
CPU_ARCH = x386
|
||||
OS_CFLAGS += -W3 -nologo -D_X86_
|
||||
else
|
||||
ifeq ($(PROCESSOR), MIPS)
|
||||
CPU_ARCH = MIPS
|
||||
#OS_CFLAGS += -W3 -nologo -D_MIPS_
|
||||
OS_CFLAGS += -W3 -nologo
|
||||
else
|
||||
ifeq ($(PROCESSOR), ALPHA)
|
||||
CPU_ARCH = ALPHA
|
||||
OS_CFLAGS += -W3 -nologo -D_ALPHA_=1
|
||||
else
|
||||
CPU_ARCH = processor_is_undefined
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
|
||||
DEFINES += -DWIN95
|
|
@ -0,0 +1,70 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for WINNT 3.51
|
||||
#
|
||||
# This makefile defines the following variables:
|
||||
# CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
|
||||
# It has the following internal variables:
|
||||
# OS_PROC_CFLAGS and OS_WIN_CFLAGS.
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/WIN32.mk
|
||||
|
||||
PROCESSOR := $(shell uname -p)
|
||||
ifeq ($(PROCESSOR), I386)
|
||||
CPU_ARCH = x386
|
||||
OS_PROC_CFLAGS += -D_X86_
|
||||
else
|
||||
ifeq ($(PROCESSOR), MIPS)
|
||||
CPU_ARCH = MIPS
|
||||
OS_PROC_CFLAGS += -D_MIPS_
|
||||
else
|
||||
ifeq ($(PROCESSOR), ALPHA)
|
||||
CPU_ARCH = ALPHA
|
||||
OS_PROC_CFLAGS += -D_ALPHA_
|
||||
else
|
||||
CPU_ARCH = processor_is_undefined
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
OS_WIN_CFLAGS += -W3
|
||||
OS_CFLAGS += -nologo $(OS_WIN_CFLAGS) $(OS_PROC_CFLAGS)
|
||||
#OS_DLLFLAGS += -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS
|
||||
OS_DLLFLAGS += -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS
|
||||
#
|
||||
# Win NT needs -GT so that fibers can work
|
||||
#
|
||||
OS_CFLAGS += -GT
|
||||
OS_CFLAGS += -DWINNT
|
|
@ -0,0 +1,67 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Config stuff for WINNT 4.0
|
||||
#
|
||||
# This makefile defines the following variables:
|
||||
# CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
|
||||
# PROCESSOR is an internal variable.
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/WIN32.mk
|
||||
|
||||
PROCESSOR := $(shell uname -p)
|
||||
ifeq ($(PROCESSOR), I386)
|
||||
CPU_ARCH = x386
|
||||
OS_CFLAGS += -W3 -nologo -D_X86_
|
||||
else
|
||||
ifeq ($(PROCESSOR), MIPS)
|
||||
CPU_ARCH = MIPS
|
||||
#OS_CFLAGS += -W3 -nologo -D_MIPS_
|
||||
OS_CFLAGS += -W3 -nologo
|
||||
else
|
||||
ifeq ($(PROCESSOR), ALPHA)
|
||||
CPU_ARCH = ALPHA
|
||||
OS_CFLAGS += -W3 -nologo -D_ALPHA_=1
|
||||
else
|
||||
CPU_ARCH = processor_is_undefined
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
|
||||
#
|
||||
# Win NT needs -GT so that fibers can work
|
||||
#
|
||||
OS_CFLAGS += -GT
|
||||
OS_CFLAGS += -DWINNT
|
|
@ -0,0 +1,316 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# Master "Core Components" macros for getting the OS architecture #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# Macros for getting the OS architecture
|
||||
#
|
||||
|
||||
OS_ARCH := $(subst /,_,$(shell uname -s))
|
||||
OS_RELEASE := $(shell uname -r)
|
||||
OS_TEST := $(shell uname -m)
|
||||
|
||||
#
|
||||
# No -p option in HPUX uname and since we
|
||||
# do not build for Itanic skip it for now
|
||||
#
|
||||
|
||||
ifneq ($(OS_ARCH),HP-UX)
|
||||
CPU_ARCH := $(shell uname -p)
|
||||
endif
|
||||
|
||||
#
|
||||
# Force the IRIX64 machines to use IRIX.
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH),IRIX64)
|
||||
OS_ARCH = IRIX
|
||||
endif
|
||||
|
||||
#
|
||||
# Force the newer BSDI versions to use the old arch name.
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH),BSD_OS)
|
||||
OS_ARCH = BSD_386
|
||||
endif
|
||||
|
||||
#
|
||||
# Drop all but the major revision for FreeBSD releases.
|
||||
#
|
||||
# Handle one dot (2.2-STABLE) and two dot (2.2.5-RELEASE) forms.
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH),FreeBSD)
|
||||
OS_RELEASE := $(basename $(shell uname -r))
|
||||
NEW_OS_RELEASE := $(basename $(OS_RELEASE))
|
||||
ifneq ($(NEW_OS_RELEASE),"")
|
||||
OS_RELEASE := $(NEW_OS_RELEASE)
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Catch NCR butchering of SVR4
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH),UNIX_SV)
|
||||
ifneq ($(findstring NCR, $(shell grep NCR /etc/bcheckrc | head -1 )),)
|
||||
OS_ARCH = NCR
|
||||
else
|
||||
# Make UnixWare something human readable
|
||||
OS_ARCH = UNIXWARE
|
||||
endif
|
||||
|
||||
# Get the OS release number, not 4.2
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),UNIX_System_V)
|
||||
OS_ARCH = NEC
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
OS_RELEASE := $(shell uname -v).$(shell uname -r)
|
||||
endif
|
||||
|
||||
#
|
||||
# Distinguish between OSF1 V4.0B and V4.0D
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0)
|
||||
OS_VERSION := $(shell uname -v)
|
||||
ifeq ($(OS_VERSION),564)
|
||||
OS_RELEASE := V4.0B
|
||||
endif
|
||||
ifeq ($(OS_VERSION),878)
|
||||
OS_RELEASE := V4.0D
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (osfmach3,$(findstring osfmach3,$(OS_RELEASE)))
|
||||
OS_RELEASE = ppc
|
||||
endif
|
||||
|
||||
#
|
||||
# SINIX changes name to ReliantUNIX with 5.43
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH),ReliantUNIX-N)
|
||||
OS_ARCH = ReliantUNIX
|
||||
OS_RELEASE = 5.4
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),SINIX-N)
|
||||
OS_ARCH = ReliantUNIX
|
||||
OS_RELEASE = 5.4
|
||||
endif
|
||||
|
||||
#
|
||||
# OS_OBJTYPE is used only by Linux
|
||||
#
|
||||
# No longer used - mahesht 8/24/98
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
# OS_OBJTYPE = ELF
|
||||
# OS_RELEASE := $(basename $(OS_RELEASE))
|
||||
ifeq (2.6,$(findstring 2.6,$(OS_RELEASE)))
|
||||
OS_RELEASE :=2.6
|
||||
endif
|
||||
ifeq (2.4,$(findstring 2.4,$(OS_RELEASE)))
|
||||
OS_RELEASE :=2.4
|
||||
endif
|
||||
ifeq ($(USE_LIBC),1)
|
||||
LIBC_TAG := _libc
|
||||
else
|
||||
LIBC_TAG := _glibc
|
||||
endif
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# Master "Core Components" macros for getting the OS target #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# Note: OS_TARGET should be specified on the command line for gmake.
|
||||
# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
|
||||
# The difference between the Win95 target and the WinNT target is that
|
||||
# the WinNT target uses Windows NT specific features not available
|
||||
# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
|
||||
# at lesser performance (the Win95 target uses threads; the WinNT target
|
||||
# uses fibers).
|
||||
#
|
||||
# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
|
||||
# is built. See: win16_3.11.mk for lots more about the Win16 target.
|
||||
#
|
||||
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
|
||||
# cross-compilation.
|
||||
#
|
||||
|
||||
#
|
||||
# The following hack allows one to build on a WIN95 machine (as if
|
||||
# s/he were cross-compiling on a WINNT host for a WIN95 target).
|
||||
# It also accomodates for MKS's uname.exe. If you never intend
|
||||
# to do development on a WIN95 machine, you don't need this hack.
|
||||
#
|
||||
ifeq ($(OS_ARCH),WIN95)
|
||||
OS_ARCH = WINNT
|
||||
OS_TARGET = WIN95
|
||||
endif
|
||||
ifeq ($(OS_ARCH),Windows_95)
|
||||
OS_ARCH = Windows_NT
|
||||
OS_TARGET = WIN95
|
||||
endif
|
||||
|
||||
#
|
||||
# On WIN32, we also define the variable CPU_ARCH.
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
CPU_ARCH := $(shell uname -p)
|
||||
ifeq ($(CPU_ARCH),I386)
|
||||
CPU_ARCH = x386
|
||||
endif
|
||||
else
|
||||
#
|
||||
# If uname -s returns "Windows_NT", we assume that we are using
|
||||
# the uname.exe in MKS toolkit.
|
||||
#
|
||||
# The -r option of MKS uname only returns the major version number.
|
||||
# So we need to use its -v option to get the minor version number.
|
||||
# Moreover, it doesn't have the -p option, so we need to use uname -m.
|
||||
#
|
||||
ifeq ($(OS_ARCH), Windows_NT)
|
||||
OS_ARCH = WINNT
|
||||
OS_MINOR_RELEASE := $(shell uname -v)
|
||||
ifeq ($(OS_MINOR_RELEASE),00)
|
||||
OS_MINOR_RELEASE = 0
|
||||
endif
|
||||
OS_RELEASE = $(OS_RELEASE).$(OS_MINOR_RELEASE)
|
||||
CPU_ARCH := $(shell uname -m)
|
||||
#
|
||||
# MKS's uname -m returns "586" on a Pentium machine.
|
||||
#
|
||||
ifneq (,$(findstring 86,$(CPU_ARCH)))
|
||||
CPU_ARCH = x386
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef OS_TARGET
|
||||
OS_TARGET = $(OS_ARCH)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), WIN95)
|
||||
OS_RELEASE = 4.0
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
OS_RELEASE =
|
||||
# OS_RELEASE = _3.11
|
||||
endif
|
||||
|
||||
#
|
||||
# This variable is used to get OS_CONFIG.mk.
|
||||
#
|
||||
|
||||
ifeq ($(OS_TEST),i86pc)
|
||||
OS_CONFIG = $(OS_TARGET)$(OS_OBJTYPE)$(OS_RELEASE)_$(OS_TEST)
|
||||
else
|
||||
OS_CONFIG = $(OS_TARGET)$(OS_OBJTYPE)$(OS_RELEASE)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), SOLARIS)
|
||||
ifdef USE_64
|
||||
64BIT_TAG=_64
|
||||
else
|
||||
64BIT_TAG=
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# OBJDIR_TAG depends on the predefined variable BUILD_OPT,
|
||||
# to distinguish between debug and release builds.
|
||||
#
|
||||
|
||||
ifdef BUILD_OPT
|
||||
ifeq ($(OS_TARGET),WIN16)
|
||||
OBJDIR_TAG = _O
|
||||
else
|
||||
OBJDIR_TAG = $(64BIT_TAG)_OPT
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_TARGET),WIN16)
|
||||
OBJDIR_TAG = _D
|
||||
else
|
||||
OBJDIR_TAG = $(64BIT_TAG)_DBG
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# The following flags are defined in the individual $(OS_CONFIG).mk
|
||||
# files.
|
||||
#
|
||||
# CPU_TAG is defined if the CPU is not the most common CPU.
|
||||
# COMPILER_TAG is defined if the compiler is not the native compiler.
|
||||
# IMPL_STRATEGY may be defined too.
|
||||
#
|
||||
|
||||
# Name of the binary code directories
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifeq ($(CPU_ARCH),x386)
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
|
||||
else
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH)$(OBJDIR_TAG).OBJ
|
||||
endif
|
||||
else
|
||||
endif
|
||||
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifneq ($(OS_TARGET),WIN16)
|
||||
ifndef BUILD_OPT
|
||||
#
|
||||
# Define USE_DEBUG_RTL if you want to use the debug runtime library
|
||||
# (RTL) in the debug build
|
||||
#
|
||||
ifdef USE_DEBUG_RTL
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJD
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# Master "Core Components" default command macros; #
|
||||
# can be overridden in <arch>.mk #
|
||||
#######################################################################
|
||||
|
||||
AS = $(CC)
|
||||
ASFLAGS += $(CFLAGS)
|
||||
CCF = $(CC) $(CFLAGS)
|
||||
PURIFY = purify $(PURIFYOPTIONS)
|
||||
LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
|
||||
LINK_EXE = $(LINK) $(OS_LFLAGS) $(LFLAGS)
|
||||
NFSPWD = $(NSINSTALL_DIR)/nfspwd
|
||||
CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
|
||||
$(XCFLAGS)
|
||||
RANLIB = echo
|
||||
TAR = /bin/tar
|
||||
#
|
||||
# For purify
|
||||
#
|
||||
NOMD_CFLAGS += $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
|
||||
$(XCFLAGS)
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration information for building in the "Core Components" source module
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# [1.0] Master "Core Components" source and release <architecture> #
|
||||
# tags #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/arch.mk
|
||||
|
||||
#######################################################################
|
||||
# [2.0] Master "Core Components" default command macros #
|
||||
# (NOTE: may be overridden in $(OS_CONFIG).mk) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/command.mk
|
||||
|
||||
#######################################################################
|
||||
# [3.0] Master "Core Components" <architecture>-specific macros #
|
||||
# (dependent upon <architecture> tags) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/$(OS_CONFIG).mk
|
||||
|
||||
#######################################################################
|
||||
# [4.0] Master "Core Components" source and release <platform> tags #
|
||||
# (dependent upon <architecture> tags) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/platform.mk
|
||||
|
||||
#######################################################################
|
||||
# [5.0] Master "Core Components" release <tree> tags #
|
||||
# (dependent upon <architecture> tags) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/tree.mk
|
||||
|
||||
#######################################################################
|
||||
# [6.0] Master "Core Components" source and release <component> tags #
|
||||
# NOTE: A component is also called a module or a subsystem. #
|
||||
# (dependent upon $(MODULE) being defined on the #
|
||||
# command line, as an environment variable, or in individual #
|
||||
# makefiles, or more appropriately, manifest.mn) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/module.mk
|
||||
|
||||
#######################################################################
|
||||
# [7.0] Master "Core Components" release <version> tags #
|
||||
# (dependent upon $(MODULE) being defined on the #
|
||||
# command line, as an environment variable, or in individual #
|
||||
# makefiles, or more appropriately, manifest.mn) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/version.mk
|
||||
|
||||
#######################################################################
|
||||
# [8.0] Master "Core Components" macros to figure out #
|
||||
# binary code location #
|
||||
# (dependent upon <platform> tags) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/location.mk
|
||||
|
||||
#######################################################################
|
||||
# [9.0] Master "Core Components" <component>-specific source path #
|
||||
# (dependent upon <user_source_tree>, <source_component>, #
|
||||
# <version>, and <platform> tags) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/source.mk
|
||||
|
||||
#######################################################################
|
||||
# [10.0] Master "Core Components" include switch for support header #
|
||||
# files #
|
||||
# (dependent upon <tree>, <component>, <version>, #
|
||||
# and <platform> tags) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/headers.mk
|
||||
|
||||
#######################################################################
|
||||
# [11.0] Master "Core Components" for computing program prefixes #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/prefix.mk
|
||||
|
||||
#######################################################################
|
||||
# [12.0] Master "Core Components" for computing program suffixes #
|
||||
# (dependent upon <architecture> tags) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/suffix.mk
|
||||
|
||||
#######################################################################
|
||||
# [13.0] Master "Core Components" for defining JDK #
|
||||
# (dependent upon <architecture>, <source>, and <suffix> tags)#
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/jdk.mk
|
||||
|
||||
#######################################################################
|
||||
# [14.0] Master "Core Components" rule set #
|
||||
# (should always be the last file included by config.mk) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/ruleset.mk
|
|
@ -0,0 +1,158 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
sub recursive_copy {
|
||||
local($fromdir);
|
||||
local($todir);
|
||||
local(@dirlist);
|
||||
$fromdir = shift;
|
||||
$todir = shift;
|
||||
|
||||
print STDERR "recursive copy called with $fromdir, $todir\n";
|
||||
|
||||
#remove any trailing slashes.
|
||||
$fromdir =~ s/\/$//;
|
||||
$todir =~ s/\/$//;
|
||||
|
||||
opendir(DIR, $fromdir);
|
||||
@dirlist = readdir DIR;
|
||||
close DIR;
|
||||
|
||||
|
||||
foreach $file (@dirlist) {
|
||||
if (! (($file eq "." ) || ($file eq "..") )) {
|
||||
|
||||
if (-d "$fromdir/$file") {
|
||||
print STDERR "handling directory $todir/$file\n";
|
||||
&rec_mkdir("$todir/$file");
|
||||
&recursive_copy("$fromdir/$file","$todir/$file");
|
||||
}
|
||||
else {
|
||||
print STDERR "handling file $fromdir/$file\n";
|
||||
&my_copy("$fromdir/$file","$todir/$file");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub parse_argv {
|
||||
|
||||
# print STDERR "Parsing Variables\n";
|
||||
|
||||
foreach $q ( @ARGV ) {
|
||||
if (! ($q =~ /=/)) {
|
||||
$var{$lastassigned} .= " $q";
|
||||
}
|
||||
else {
|
||||
$q =~ /^([^=]*)=(.*)/;
|
||||
$left = $1;
|
||||
$right = $2;
|
||||
|
||||
$right =~ s/ *$//;
|
||||
$var{$left} = $right;
|
||||
|
||||
$lastassigned = $left;
|
||||
|
||||
}
|
||||
print STDERR "Assigned $lastassigned = $var{$lastassigned}\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# usage: &my_copy("dir/fromfile","dir2/tofile");
|
||||
# do a 'copy' - files only, 'to' MUST be a filename, not a directory.
|
||||
|
||||
# fix this to be able to use copy on win nt.
|
||||
|
||||
sub my_copy {
|
||||
local($from);
|
||||
local($to);
|
||||
local($cpcmd);
|
||||
|
||||
$from = shift;
|
||||
$to = shift;
|
||||
|
||||
if ( ! defined $var{OS_ARCH}) {
|
||||
die "OS_ARCH not defined!";
|
||||
}
|
||||
else {
|
||||
if ($var{OS_ARCH} eq 'WINNT') {
|
||||
$cpcmd = 'nsftp2';
|
||||
system("$cpcmd $from $to");
|
||||
}
|
||||
else {
|
||||
$cpcmd = 'cp';
|
||||
system("$cpcmd $from $to");
|
||||
}
|
||||
print STDERR "COPYING: $cpcmd $from $to\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub old_my_copy {
|
||||
local($from);
|
||||
local($to);
|
||||
|
||||
$from = shift;
|
||||
$to = shift;
|
||||
open(FIN, "<$from") || die("Can't read from file $from\n");
|
||||
if ( ! open(FOUT,">$to")) {
|
||||
close FIN;
|
||||
die "Can't write to file $to\n";
|
||||
}
|
||||
while (read(FIN, $buf, 100000)) {
|
||||
print FOUT $buf;
|
||||
}
|
||||
close (FIN);
|
||||
close (FOUT);
|
||||
}
|
||||
|
||||
sub rec_mkdir {
|
||||
local($arg);
|
||||
local($t);
|
||||
local($q);
|
||||
|
||||
$arg = shift;
|
||||
$t = "";
|
||||
foreach $q (split(/\//,$arg)) {
|
||||
$t .= $q;
|
||||
if (! ($t =~ /\.\.$/)) {
|
||||
if ($t =~ /./) {
|
||||
mkdir($t,0775);
|
||||
}
|
||||
}
|
||||
$t.= '/';
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
|
@ -0,0 +1,196 @@
|
|||
#! /usr/local/bin/perl
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
require('coreconf.pl');
|
||||
|
||||
#######-- read in variables on command line into %var
|
||||
|
||||
&parse_argv;
|
||||
|
||||
### do the copy
|
||||
|
||||
print STDERR "RELEASE TREE / MODULE = $var{RELEASE_TREE} $var{MODULE}\n";
|
||||
|
||||
|
||||
|
||||
# 1
|
||||
if ($var{RELEASE} eq "") { exit; } # Can't do release here, so exit.
|
||||
|
||||
# 2
|
||||
#if (! ($var{RELEASE} =~ /\//)) { # if no specific version is specified in RELEASE variable
|
||||
# $component = $var{RELEASE};
|
||||
#}
|
||||
#else { # if a subcomponent/version is given in the RELEASE variable
|
||||
# $var{RELEASE} =~ m|^([^/]*)/|;
|
||||
# $component = $1; # everything before the first slash;
|
||||
# }
|
||||
|
||||
# 3
|
||||
$path = $var{RELEASE};
|
||||
|
||||
|
||||
# 4
|
||||
# find out what directory we would create for 'today'
|
||||
|
||||
$year = (localtime)[5] + 1900;
|
||||
$month = (localtime)[4] + 1;
|
||||
$day = (localtime)[3];
|
||||
$today = sprintf( "%d%02d%02d", $year, $month, $day );
|
||||
|
||||
# 5
|
||||
# if version is null, then set the version to today.
|
||||
if ($var{"RELEASE_VERSION"} eq "") {
|
||||
$var{"RELEASE_VERSION"} = $today;
|
||||
}
|
||||
|
||||
#6
|
||||
$version = $var{"RELEASE_VERSION"}; # set RELEASE_VERSION to passed in variable
|
||||
|
||||
#7
|
||||
# if version is today, then we will want to make a 'current' link.
|
||||
|
||||
if ($version eq $today) {
|
||||
$create_current = 1;
|
||||
}
|
||||
|
||||
#8
|
||||
# version can be a) passed in value from command line, b) value in manifest.mn
|
||||
# or c) computed value such as '19970909'
|
||||
|
||||
|
||||
$dir = "$var{'RELEASE_TREE'}/$path";
|
||||
|
||||
#9
|
||||
if (! (-e "$dir/$version" && -d "$dir/$version")) {
|
||||
print "making dir $dir \n";
|
||||
&rec_mkdir("$dir/$version");
|
||||
}
|
||||
|
||||
|
||||
|
||||
print "version = $version\n";
|
||||
print "path = $path\n";
|
||||
print "var{release_tree} = $var{'RELEASE_TREE'}\n";
|
||||
print "dir = $dir = RELEASE_TREE/path\n";
|
||||
|
||||
|
||||
#10
|
||||
if ($create_current == 1) {
|
||||
|
||||
# unlinking and linking always occurs, even if the link is correct
|
||||
print "unlinking $dir/current\n";
|
||||
unlink("$dir/current");
|
||||
|
||||
print "putting version number $today into 'current' file..";
|
||||
|
||||
open(FILE,">$dir/current") || die " couldn't open current\n";
|
||||
print FILE "$today\n";
|
||||
close(FILE);
|
||||
print " ..done\n"
|
||||
|
||||
}
|
||||
|
||||
&rec_mkdir("$dir/$version/$var{'RELEASE_MD_DIR'}");
|
||||
&rec_mkdir("$dir/$version/$var{'RELEASE_XP_DIR'}");
|
||||
|
||||
|
||||
|
||||
|
||||
foreach $jarfile (split(/ /,$var{FILES}) ) {
|
||||
print STDERR "---------------------------------------------\n";
|
||||
|
||||
$jarinfo = $var{$jarfile};
|
||||
|
||||
($jardir,$jaropts) = split(/\|/,$jarinfo);
|
||||
|
||||
if ($jaropts =~ /f/) {
|
||||
print STDERR "Copying files $jardir....\n";
|
||||
}
|
||||
else {
|
||||
print STDERR "Copying jar file $jarfile....\n";
|
||||
}
|
||||
|
||||
print "jaropts = $jaropts\n";
|
||||
|
||||
if ($jaropts =~ /m/) {
|
||||
$destdir = $var{"RELEASE_MD_DIR"};
|
||||
print "found m, using MD dir $destdir\n";
|
||||
}
|
||||
elsif ($jaropts =~ /x/) {
|
||||
$destdir = $var{"RELEASE_XP_DIR"};
|
||||
print "found x, using XP dir $destdir\n";
|
||||
}
|
||||
else {
|
||||
die "Error: must specify m or x in jar options in $jarinfo line\n";
|
||||
}
|
||||
|
||||
|
||||
$distdir = "$dir/$version/$destdir";
|
||||
|
||||
|
||||
|
||||
if ($jaropts =~ /f/) {
|
||||
|
||||
print "splitting: \"$jardir\"\n";
|
||||
for $srcfile (split(/ /,$jardir)) {
|
||||
|
||||
#if srcfile has a slash
|
||||
if ($srcfile =~ m|/|) {
|
||||
#pull out everything before the last slash into $1
|
||||
$srcfile =~ m|(.*)/|;
|
||||
$distsubdir = "/$1";
|
||||
print "making dir $distdir$distsubdir\n";
|
||||
&rec_mkdir("$distdir$distsubdir");
|
||||
}
|
||||
print "copy: from $srcfile\n";
|
||||
print " to $distdir$distsubdir\n";
|
||||
$srcprefix = "";
|
||||
if ($jaropts =~/m/) {
|
||||
$srcprefix = "$var{'PLATFORM'}/";
|
||||
}
|
||||
system("cp $srcprefix$srcfile $distdir$distsubdir");
|
||||
}
|
||||
}
|
||||
else {
|
||||
$srcfile = "$var{SOURCE_RELEASE_PREFIX}/$jardir/$jarfile";
|
||||
|
||||
print "copy: from $srcfile\n";
|
||||
print " to $distdir\n";
|
||||
|
||||
system("cp $srcfile $distdir");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
CORE_DEPTH = ../..
|
||||
|
||||
MODULE = dbm
|
||||
|
||||
IMPORTS = dbm
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# Master "Core Components" include switch for support header files #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# Always append source-side machine-dependent (md) and cross-platform
|
||||
# (xp) include paths
|
||||
#
|
||||
|
||||
INCLUDES += -I$(SOURCE_MDHEADERS_DIR)
|
||||
|
||||
ifneq ($(OS_TARGET),WIN16)
|
||||
INCLUDES += -I$(SOURCE_XPHEADERS_DIR)
|
||||
endif
|
||||
|
||||
#
|
||||
# Only append source-side private cross-platform include paths for
|
||||
# sectools
|
||||
#
|
||||
|
||||
ifeq ($(MODULE), sectools)
|
||||
INCLUDES += -I$(SOURCE_XPPRIVATE_DIR)
|
||||
endif
|
|
@ -0,0 +1,359 @@
|
|||
#! /usr/local/bin/perl
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
print STDERR "import.pl\n";
|
||||
|
||||
require('coreconf.pl');
|
||||
|
||||
sub ftp_get {
|
||||
local($from);
|
||||
local($to);
|
||||
local($file);
|
||||
|
||||
$from = shift;
|
||||
$to = shift;
|
||||
$file = shift;
|
||||
#JP
|
||||
$ftp_server=$ENV{COMPONENT_FTP_SERVER};
|
||||
# if ( ! open(FOUT,"|ftp -n ftp-rel") ){
|
||||
if ( ! open(FOUT,"|ftp -n $ftp_server") ){
|
||||
die "Can't open ftp session\n";
|
||||
}
|
||||
print FOUT "user ftpman ftpman\n";
|
||||
print FOUT "binary\n";
|
||||
print FOUT "hash\n";
|
||||
print FOUT "prompt\n";
|
||||
print FOUT "lcd $to\n";
|
||||
print FOUT "cd $from\n";
|
||||
print FOUT "get $file\n";
|
||||
print FOUT "quit\n";
|
||||
close (FOUT);
|
||||
}
|
||||
|
||||
|
||||
$returncode =0;
|
||||
|
||||
|
||||
#######-- read in variables on command line into %var
|
||||
|
||||
$var{ZIP} = "zip";
|
||||
$var{UNZIP} = "unzip -o";
|
||||
$var{FTPMAN} = "nsftp2.sh";
|
||||
|
||||
&parse_argv;
|
||||
|
||||
if (! ($var{IMPORTS} =~ /\w/)) {
|
||||
print STDERR "nothing to import\n";
|
||||
}
|
||||
|
||||
######-- Do the import!
|
||||
|
||||
foreach $import (split(/ /,$var{IMPORTS}) ) {
|
||||
|
||||
print STDERR "\n\nIMPORTING .... $import\n-----------------------------\n";
|
||||
|
||||
|
||||
# if a specific version specified in IMPORT variable
|
||||
# (if $import has a slash in it)
|
||||
|
||||
if ($import =~ /\//) {
|
||||
# $component=everything before the first slash of $import
|
||||
|
||||
$import =~ m|^([^/]*)/|;
|
||||
$component = $1;
|
||||
|
||||
$import =~ m|^(.*)/([^/]*)$|;
|
||||
|
||||
# $path=everything before the last slash of $import
|
||||
$path = $1;
|
||||
|
||||
# $version=everything after the last slash of $import
|
||||
$version = $2;
|
||||
|
||||
if ($var{VERSION} ne "current") {
|
||||
$version = $var{VERSION};
|
||||
}
|
||||
}
|
||||
else {
|
||||
$component = $import;
|
||||
$path = $import;
|
||||
$version = $var{VERSION};
|
||||
}
|
||||
|
||||
$releasejardir = "$var{RELEASE_TREE}/$path";
|
||||
if ($version eq "current") {
|
||||
print STDERR "Current version specified. Reading 'current' file ... \n";
|
||||
|
||||
open(CURRENT,"$releasejardir/current") || die "NO CURRENT FILE\n";
|
||||
$version = <CURRENT>;
|
||||
$version =~ s/(\r?\n)*$//; # remove any trailing [CR/]LF's
|
||||
close(CURRENT);
|
||||
print STDERR "Using version $version\n";
|
||||
if ( $version eq "") {
|
||||
die "Current version file empty. Stopping\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($var{USE_FTP} ne 'YES')
|
||||
{
|
||||
$releasejardir = "$releasejardir/$version";
|
||||
if ( ! -d $releasejardir) {
|
||||
die "$releasejardir doesn't exist (Invalid Version?)\n";
|
||||
}
|
||||
foreach $jarfile (split(/ /,$var{FILES})) {
|
||||
|
||||
($relpath,$distpath,$options) = split(/\|/, $var{$jarfile});
|
||||
print STDERR " $relpath,$distpath,$options\n";
|
||||
|
||||
if ($var{'OVERRIDE_IMPORT_CHECK'} eq 'YES') {
|
||||
$options =~ s/v//g;
|
||||
}
|
||||
|
||||
if ( $relpath ne "") { $releasejarpathname = "$releasejardir/$relpath";}
|
||||
else { $releasejarpathname = $releasejardir; }
|
||||
|
||||
if (-e "$releasejarpathname/$jarfile") {
|
||||
print STDERR "\nWorking on jarfile: $jarfile\n";
|
||||
|
||||
if ($distpath =~ m|/$|) {
|
||||
$distpathname = "$distpath$component";
|
||||
}
|
||||
else {
|
||||
$distpathname = "$distpath";
|
||||
}
|
||||
|
||||
|
||||
#the block below is used to determine whether or not the xp headers have
|
||||
#already been imported for this component
|
||||
|
||||
$doimport = 1;
|
||||
if ($options =~ /v/) { # if we should check the imported version
|
||||
print STDERR "Checking if version file exists $distpathname/version\n";
|
||||
if (-e "$distpathname/version") {
|
||||
open( VFILE, "<$distpathname/version") ||
|
||||
die "Cannot open $distpathname/version for reading. Permissions?\n";
|
||||
$importversion = <VFILE>;
|
||||
close (VFILE);
|
||||
$importversion =~ s/\r?\n$//; # Strip off any trailing CR/LF
|
||||
if ($version eq $importversion) {
|
||||
print STDERR "$distpathname version '$importversion' already imported. Skipping...\n";
|
||||
$doimport =0;
|
||||
}
|
||||
}
|
||||
}
|
||||
print STDERR "Ready to import from $distpathname\n";
|
||||
if ($doimport == 1) {
|
||||
if (! -d "$distpathname") {
|
||||
&rec_mkdir("$distpathname");
|
||||
}
|
||||
# delete the stuff in there already.
|
||||
# (this should really be recursive delete.)
|
||||
|
||||
if ($options =~ /v/) {
|
||||
$remheader = "\nREMOVING files in '$distpathname/' :";
|
||||
opendir(DIR,"$distpathname") ||
|
||||
die ("Cannot read directory $distpathname\n");
|
||||
@filelist = readdir(DIR);
|
||||
closedir(DIR);
|
||||
foreach $file ( @filelist ) {
|
||||
if (! ($file =~ m!/.?.$!) ) {
|
||||
if (! (-d $file)) {
|
||||
$file =~ m!([^/]*)$!;
|
||||
print STDERR "$remheader $1";
|
||||
$remheader = " ";
|
||||
unlink "$distpathname/$file";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print STDERR "\n\n";
|
||||
|
||||
print STDERR "\nExtracting jarfile '$jarfile' to local directory $distpathname/\n";
|
||||
|
||||
print STDERR "$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname\n";
|
||||
system("$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname");
|
||||
|
||||
$r = $?;
|
||||
|
||||
if ($options =~ /v/) {
|
||||
if ($r == 0) {
|
||||
unlink ("$distpathname/version");
|
||||
if (open(VFILE,">$distpathname/version")) {
|
||||
print VFILE "$version\n";
|
||||
close(VFILE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
print STDERR "Could not create '$distpathname/version'. Permissions?\n";
|
||||
$returncode ++;
|
||||
}
|
||||
}
|
||||
} # if (doimport)
|
||||
} # if (-e releasejarpathname/jarfile)
|
||||
} # foreach jarfile)
|
||||
} # if !ftp
|
||||
else
|
||||
{
|
||||
print STDERR "Using FTP for the transfer\n";
|
||||
$releasejardir = "$releasejardir/$version";
|
||||
foreach $jarfile (split(/ /,$var{FILES})) {
|
||||
|
||||
($relpath,$distpath,$options) = split(/\|/, $var{$jarfile});
|
||||
|
||||
if ($var{'OVERRIDE_IMPORT_CHECK'} eq 'YES') {
|
||||
$options =~ s/v//g;
|
||||
}
|
||||
|
||||
if ( $relpath ne "") {
|
||||
$releasejarpathname = "$releasejardir/$relpath";
|
||||
}
|
||||
else {
|
||||
$releasejarpathname = $releasejardir;
|
||||
}
|
||||
|
||||
$holdingpath = "../../dist/$releasejarpathname";
|
||||
|
||||
if ($distpath =~ m|/$|) {
|
||||
$distpathname = "$distpath$component";
|
||||
}
|
||||
else {
|
||||
$distpathname = "$distpath";
|
||||
}
|
||||
|
||||
if (! -d "$distpathname") {
|
||||
print STDERR "making dir $distpathname\n";
|
||||
&rec_mkdir("$distpathname");
|
||||
}
|
||||
|
||||
if (! -d "$holdingpath") {
|
||||
print STDERR "Making dir $holdingpath\n";
|
||||
&rec_mkdir("$holdingpath");
|
||||
}
|
||||
|
||||
$filename = "$holdingpath/$jarfile";
|
||||
if ( ! -e "$filename") {
|
||||
print STDERR "Time to ftp $holdingpath $distpathname $jarfile\n";
|
||||
&ftp_get("$releasejarpathname","$holdingpath","$jarfile");
|
||||
}
|
||||
if ( -e "$filename") {
|
||||
print STDERR "\nWorking on jarfile: $jarfile\n";
|
||||
|
||||
#the block below is used to determine whether or not the xp headers have
|
||||
#already been imported for this component
|
||||
|
||||
$doimport = 1;
|
||||
if ($options =~ /v/) { # if we should check the imported version
|
||||
print STDERR "Checking if version file exists $distpathname/version\n";
|
||||
if (-e "$distpathname/version") {
|
||||
open( VFILE, "<$distpathname/version") ||
|
||||
die "Cannot open $distpathname/version for reading. Permissions?\n";
|
||||
$importversion = <VFILE>;
|
||||
close (VFILE);
|
||||
$importversion =~ s/\r?\n$//; # Strip off any trailing CR/LF
|
||||
if ($version eq $importversion) {
|
||||
print STDERR "$distpathname version '$importversion' already imported. Skipping...\n";
|
||||
$doimport =0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( -e "$filename" ) {
|
||||
# Check for zero-length file, if ftp failed
|
||||
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
|
||||
$atime,$mtime,$ctime,$blksize,$blocks)
|
||||
= stat($filename);
|
||||
if ( $size == 0 ) {
|
||||
$doimport = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($doimport == 1) {
|
||||
print STDERR "Ready to import to $distpathname\n";
|
||||
# delete the stuff in there already.
|
||||
# (this should really be recursive delete.)
|
||||
|
||||
if ($options =~ /v/) {
|
||||
print STDERR "Deleting contents of $distpathname\n";
|
||||
$remheader = "\nREMOVING files in '$distpathname/' :";
|
||||
opendir(DIR,"$distpathname") ||
|
||||
die ("Cannot read directory $distpathname\n");
|
||||
@filelist = readdir(DIR);
|
||||
closedir(DIR);
|
||||
foreach $file ( @filelist ) {
|
||||
if (! ($file =~ m!/.?.$!) ) {
|
||||
if (! (-d $file)) {
|
||||
$file =~ m!([^/]*)$!;
|
||||
print STDERR "$remheader $1";
|
||||
$remheader = " ";
|
||||
unlink "$distpathname/$file";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print STDERR "$var{UNZIP} $filename -d $distpathname\n";
|
||||
system("$var{UNZIP} $filename -d $distpathname");
|
||||
|
||||
$r = $?;
|
||||
|
||||
if ($options =~ /v/) {
|
||||
if ($r == 0) {
|
||||
unlink ("$distpathname/version");
|
||||
if (open(VFILE,">$distpathname/version")) {
|
||||
print VFILE "$version\n";
|
||||
close(VFILE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
print STDERR "Could not create '$distpathname/version'. Permissions?\n";
|
||||
# XXXcebTHIS IS BAD. We are ignoring the verion stuff
|
||||
# $returncode ++;
|
||||
}
|
||||
}
|
||||
} # if (doimport)
|
||||
} # if (-e releasejarpathname/jarfile)
|
||||
} # foreach jarfile)
|
||||
} # ftp
|
||||
|
||||
} # foreach IMPORT
|
||||
|
||||
|
||||
|
||||
exit($returncode);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,466 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# [1] Define preliminary JDK "Core Components" toolset options #
|
||||
#######################################################################
|
||||
|
||||
# set default JDK java threading model
|
||||
ifeq ($(JDK_THREADING_MODEL),)
|
||||
JDK_THREADING_MODEL = native_threads
|
||||
JDK_THREADING_MODEL_OPT = -native
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# [2] Define platform-independent JDK "Core Components" options #
|
||||
#######################################################################
|
||||
|
||||
# set default location of the java classes repository
|
||||
ifeq ($(JAVA_DESTPATH),)
|
||||
JAVA_DESTPATH = $(SOURCE_CLASSES_DIR)
|
||||
endif
|
||||
|
||||
# set default location of the package under the java classes repository
|
||||
# note that this overrides the default package value in ruleset.mk
|
||||
ifeq ($(PACKAGE),)
|
||||
PACKAGE = .
|
||||
endif
|
||||
|
||||
# set default location of the java source code repository
|
||||
ifeq ($(JAVA_SOURCEPATH),)
|
||||
JAVA_SOURCEPATH = .
|
||||
endif
|
||||
|
||||
# add JNI directory to default include search path
|
||||
ifneq ($(JNI_GEN),)
|
||||
ifdef NSBUILDROOT
|
||||
INCLUDES += -I$(JNI_GEN_DIR) -I$(SOURCE_XP_DIR)
|
||||
else
|
||||
INCLUDES += -I$(JNI_GEN_DIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# [3] Define platform-dependent JDK "Core Components" options #
|
||||
#######################################################################
|
||||
|
||||
# set [Microsoft Windows] platforms (or "vanilla" UNIX platforms)
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifeq ($(JAVA_HOME),)
|
||||
JAVA_HOME = c:\usr\java
|
||||
endif
|
||||
|
||||
PATH_SEPARATOR = ;
|
||||
|
||||
JAVA_ARCH = win32
|
||||
|
||||
JAVA_CLASSES = $(JAVA_HOME)\lib\classes.zip
|
||||
|
||||
ifeq ($(JRE_HOME),)
|
||||
JRE_HOME = $(JAVA_HOME)
|
||||
JRE_CLASSES = $(JAVA_CLASSES)
|
||||
else
|
||||
ifeq ($(JRE_CLASSES),)
|
||||
JRE_CLASSES = $(JRE_HOME)\lib\classes.zip
|
||||
endif
|
||||
endif
|
||||
|
||||
INCLUDES += -I$(JAVA_HOME)\include
|
||||
INCLUDES += -I$(JAVA_HOME)\include\$(JDK_THREADING_MODEL)
|
||||
INCLUDES += -I$(JAVA_HOME)\include\$(JAVA_ARCH)
|
||||
|
||||
ifeq ($(JDK_DEBUG),1)
|
||||
JAVA_LIBS = -LIBPATH:$(JAVA_HOME)\lib javai_g.lib
|
||||
else
|
||||
JAVA_LIBS = -LIBPATH:$(JAVA_HOME)\lib javai.lib
|
||||
endif
|
||||
|
||||
# currently, disable JIT option on this platform
|
||||
JDK_JIT_OPT = -nojit
|
||||
else
|
||||
# "vanilla" UNIX platforms
|
||||
ifeq ($(JAVA_HOME),)
|
||||
JAVA_HOME = /usr/java
|
||||
endif
|
||||
|
||||
INCLUDES += -I$(JAVA_HOME)/include
|
||||
|
||||
PATH_SEPARATOR = :
|
||||
endif
|
||||
|
||||
# set [Sun Solaris] platforms
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
JAVA_ARCH = solaris
|
||||
|
||||
JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
|
||||
|
||||
ifeq ($(JRE_HOME),)
|
||||
JRE_HOME = $(JAVA_HOME)
|
||||
JRE_CLASSES = $(JAVA_CLASSES)
|
||||
else
|
||||
ifeq ($(JRE_CLASSES),)
|
||||
JRE_CLASSES = $(JRE_HOME)/lib/classes.zip
|
||||
endif
|
||||
endif
|
||||
|
||||
JAVA_LIBDIR = lib/sparc/$(JDK_THREADING_MODEL)
|
||||
|
||||
# ** IMPORTANT ** having -lthread before -lnspr is critical on solaris when
|
||||
# linking with -ljava as nspr redefines symbols in libthread that cause
|
||||
# JNI executables to fail with assert of bad thread stack values.
|
||||
JAVA_CLIBS = -lthread
|
||||
|
||||
INCLUDES += -I$(JAVA_HOME)/include/$(JDK_THREADING_MODEL)
|
||||
INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
|
||||
|
||||
ifeq ($(JDK_DEBUG),1)
|
||||
JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava_g $(JAVA_CLIBS)
|
||||
else
|
||||
JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava $(JAVA_CLIBS)
|
||||
endif
|
||||
|
||||
# enable JIT option on this platform
|
||||
JDK_JIT_OPT = -jit
|
||||
endif
|
||||
|
||||
# set [Hewlett Packard HP-UX] platforms
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
# no JIT option available on this platform
|
||||
JDK_JIT_OPT =
|
||||
endif
|
||||
|
||||
# set [Redhat Linux] platforms
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
# no JIT option available on this platform
|
||||
JDK_JIT_OPT =
|
||||
endif
|
||||
|
||||
# set [IBM AIX] platforms
|
||||
ifeq ($(OS_ARCH), AIX)
|
||||
# no JIT option available on this platform
|
||||
JDK_JIT_OPT =
|
||||
endif
|
||||
|
||||
# set [Digital UNIX] platforms
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
# no JIT option available on this platform
|
||||
JDK_JIT_OPT =
|
||||
endif
|
||||
|
||||
# set [Silicon Graphics IRIX] platforms
|
||||
ifeq ($(OS_ARCH), IRIX)
|
||||
JAVA_ARCH = irix
|
||||
|
||||
JAVA_CLASSES = $(JAVA_HOME)/lib/dev.jar:$(JAVA_HOME)/lib/rt.jar
|
||||
|
||||
ifeq ($(JRE_HOME),)
|
||||
JRE_HOME = $(JAVA_HOME)
|
||||
JRE_CLASSES = $(JAVA_CLASSES)
|
||||
else
|
||||
ifeq ($(JRE_CLASSES),)
|
||||
JRE_CLASSES = $(JRE_HOME)/lib/dev.jar:$(JRE_HOME)/lib/rt.jar
|
||||
endif
|
||||
endif
|
||||
|
||||
JAVA_LIBDIR = lib32/sgi/$(JDK_THREADING_MODEL)
|
||||
|
||||
INCLUDES += -I$(JAVA_HOME)/include/$(JDK_THREADING_MODEL)
|
||||
INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
|
||||
|
||||
ifeq ($(JDK_DEBUG),1)
|
||||
JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava_g
|
||||
else
|
||||
JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava
|
||||
endif
|
||||
|
||||
# no JIT option available on this platform
|
||||
JDK_JIT_OPT =
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# [4] Define remaining JDK "Core Components" default toolset options #
|
||||
#######################################################################
|
||||
|
||||
# set JDK optimization model
|
||||
ifneq ($(BUILD_OPT),1)
|
||||
JDK_OPTIMIZER_OPT = -g
|
||||
else
|
||||
JDK_OPTIMIZER_OPT = -O
|
||||
endif
|
||||
|
||||
# set minimal JDK debugging model
|
||||
ifeq ($(JDK_DEBUG),1)
|
||||
JDK_DEBUG_SUFFIX = _g
|
||||
JDK_DEBUG_OPT = -debug
|
||||
else
|
||||
JDK_DEBUG_SUFFIX =
|
||||
JDK_DEBUG_OPT =
|
||||
endif
|
||||
|
||||
# set default path to repository for JDK classes
|
||||
ifeq ($(JDK_CLASS_REPOSITORY_OPT),)
|
||||
JDK_CLASS_REPOSITORY_OPT = -d $(JAVA_DESTPATH)
|
||||
endif
|
||||
|
||||
# initialize the JDK heap size option to a default value
|
||||
ifeq ($(JDK_INIT_HEAP_OPT),)
|
||||
JDK_INIT_HEAP_OPT = -ms8m
|
||||
endif
|
||||
|
||||
# define a default JDK classpath
|
||||
ifeq ($(JDK_CLASSPATH),)
|
||||
JDK_CLASSPATH = $(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)$(PATH_SEPARATOR)$(JAVA_CLASSES)
|
||||
endif
|
||||
|
||||
# by default, override CLASSPATH environment variable using the JDK classpath option with $(JDK_CLASSPATH)
|
||||
ifeq ($(JDK_CLASSPATH_OPT),)
|
||||
JDK_CLASSPATH_OPT = -classpath $(JDK_CLASSPATH)
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# [5] Define JDK "Core Components" toolset; #
|
||||
# (always allow a user to override these values) #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# (1) appletviewer, appletviewer_g
|
||||
#
|
||||
|
||||
ifeq ($(APPLETVIEWER),)
|
||||
APPLETVIEWER_PROG = $(JAVA_HOME)/bin/appletviewer$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
APPLETVIEWER_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
APPLETVIEWER_FLAGS += $(JDK_DEBUG_OPT)
|
||||
APPLETVIEWER_FLAGS += $(JDK_JIT_OPT)
|
||||
APPLETVIEWER = $(APPLETVIEWER_PROG) $(APPLETVIEWER_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (2) jar, jar_g
|
||||
#
|
||||
|
||||
ifeq ($(JAR),)
|
||||
JAR_PROG = $(JAVA_HOME)/bin/jar$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAR_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAR = $(JAR_PROG) $(JAR_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (3) java, java_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVA),)
|
||||
JAVA_PROG = $(JAVA_HOME)/bin/java$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVA_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVA_FLAGS += $(JDK_DEBUG_OPT)
|
||||
JAVA_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JAVA_FLAGS += $(JDK_INIT_HEAP_OPT)
|
||||
JAVA_FLAGS += $(JDK_JIT_OPT)
|
||||
JAVA = $(JAVA_PROG) $(JAVA_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (4) javac, javac_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVAC),)
|
||||
JAVAC_PROG = $(JAVA_HOME)/bin/javac$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVAC_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVAC_FLAGS += $(JDK_OPTIMIZER_OPT)
|
||||
JAVAC_FLAGS += $(JDK_DEBUG_OPT)
|
||||
JAVAC_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JAVAC_FLAGS += -J$(JDK_INIT_HEAP_OPT)
|
||||
JAVAC_FLAGS += $(JDK_CLASS_REPOSITORY_OPT)
|
||||
JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (5) javadoc, javadoc_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVADOC),)
|
||||
JAVADOC_PROG = $(JAVA_HOME)/bin/javadoc$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVADOC_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVADOC_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JAVADOC_FLAGS += -J$(JDK_INIT_HEAP_OPT)
|
||||
JAVADOC = $(JAVADOC_PROG) $(JAVADOC_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (6) javah, javah_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVAH),)
|
||||
JAVAH_PROG = $(JAVA_HOME)/bin/javah$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVAH_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVAH_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JAVAH = $(JAVAH_PROG) $(JAVAH_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (7) javakey, javakey_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVAKEY),)
|
||||
JAVAKEY_PROG = $(JAVA_HOME)/bin/javakey$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVAKEY_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVAKEY = $(JAVAKEY_PROG) $(JAVAKEY_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (8) javap, javap_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVAP),)
|
||||
JAVAP_PROG = $(JAVA_HOME)/bin/javap$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVAP_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVAP_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JAVAP_FLAGS += -J$(JDK_INIT_HEAP_OPT)
|
||||
JAVAP = $(JAVAP_PROG) $(JAVAP_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (9) javat, javat_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVAT),)
|
||||
JAVAT_PROG = $(JAVA_HOME)/bin/javat$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVAT_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVAT = $(JAVAT_PROG) $(JAVAT_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (10) javaverify, javaverify_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVAVERIFY),)
|
||||
JAVAVERIFY_PROG = $(JAVA_HOME)/bin/javaverify$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JAVAVERIFY_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JAVAVERIFY = $(JAVAVERIFY_PROG) $(JAVAVERIFY_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (11) javaw, javaw_g
|
||||
#
|
||||
|
||||
ifeq ($(JAVAW),)
|
||||
jJAVAW_PROG = $(JAVA_HOME)/bin/javaw$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
jJAVAW_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
jJAVAW_FLAGS += $(JDK_DEBUG_OPT)
|
||||
jJAVAW_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
jJAVAW_FLAGS += $(JDK_INIT_HEAP_OPT)
|
||||
jJAVAW_FLAGS += $(JDK_JIT_OPT)
|
||||
jJAVAW = $(JAVAW_PROG) $(JAVAW_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (12) jdb, jdb_g
|
||||
#
|
||||
|
||||
ifeq ($(JDB),)
|
||||
JDB_PROG = $(JAVA_HOME)/bin/jdb$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JDB_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JDB_FLAGS += $(JDK_DEBUG_OPT)
|
||||
JDB_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JDB_FLAGS += $(JDK_INIT_HEAP_OPT)
|
||||
JDB_FLAGS += $(JDK_JIT_OPT)
|
||||
JDB = $(JDB_PROG) $(JDB_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (13) jre, jre_g
|
||||
#
|
||||
|
||||
ifeq ($(JRE),)
|
||||
JRE_PROG = $(JAVA_HOME)/bin/jre$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JRE_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JRE_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JRE_FLAGS += $(JDK_INIT_HEAP_OPT)
|
||||
JRE_FLAGS += $(JDK_JIT_OPT)
|
||||
JRE = $(JRE_PROG) $(JRE_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (14) jrew, jrew_g
|
||||
#
|
||||
|
||||
ifeq ($(JREW),)
|
||||
JREW_PROG = $(JAVA_HOME)/bin/jrew$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
JREW_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
JREW_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
JREW_FLAGS += $(JDK_INIT_HEAP_OPT)
|
||||
JREW_FLAGS += $(JDK_JIT_OPT)
|
||||
JREW = $(JREW_PROG) $(JREW_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (15) native2ascii, native2ascii_g
|
||||
#
|
||||
|
||||
ifeq ($(NATIVE2ASCII),)
|
||||
NATIVE2ASCII_PROG = $(JAVA_HOME)/bin/native2ascii$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
NATIVE2ASCII_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
NATIVE2ASCII = $(NATIVE2ASCII_PROG) $(NATIVE2ASCII_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (16) rmic, rmic_g
|
||||
#
|
||||
|
||||
ifeq ($(RMIC),)
|
||||
RMIC_PROG = $(JAVA_HOME)/bin/rmic$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
RMIC_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
RMIC_FLAGS += $(JDK_OPTIMIZER_OPT)
|
||||
RMIC_FLAGS += $(JDK_CLASSPATH_OPT)
|
||||
RMIC = $(RMIC_PROG) $(RMIC_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (17) rmiregistry, rmiregistry_g
|
||||
#
|
||||
|
||||
ifeq ($(RMIREGISTRY),)
|
||||
RMIREGISTRY_PROG = $(JAVA_HOME)/bin/rmiregistry$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
RMIREGISTRY_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
RMIREGISTRY = $(RMIREGISTRY_PROG) $(RMIREGISTRY_FLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# (18) serialver, serialver_g
|
||||
#
|
||||
|
||||
ifeq ($(SERIALVER),)
|
||||
SERIALVER_PROG = $(JAVA_HOME)/bin/serialver$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)
|
||||
SERIALVER_FLAGS = $(JDK_THREADING_MODEL_OPT)
|
||||
SERIALVER = $(SERIALVER_PROG) $(SERIALVER_FLAGS)
|
||||
endif
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
#!/usr/local/bin/perl
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
# Input: -d dir foo1 foo2 . . .
|
||||
# Compares generated "_jni/foo1.h" file with "foo1.class", and
|
||||
# generated "_jni/foo2.h" file with "foo2.class", etc.
|
||||
# (NOTE: unlike its closely related cousin, outofdate.pl,
|
||||
# the "-d dir" must always be specified)
|
||||
#
|
||||
# Returns: list of headers which are OLDER than corresponding class
|
||||
# files (non-existant class files are considered to be real old :-)
|
||||
|
||||
$found = 1;
|
||||
|
||||
if ($ARGV[0] eq '-d')
|
||||
{
|
||||
$classdir = $ARGV[1];
|
||||
$classdir .= "/";
|
||||
shift;
|
||||
shift;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "Usage: perl ", $0, " -d dir foo1 foo2 . . .\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
foreach $filename (@ARGV)
|
||||
{
|
||||
$headerfilename = "_jni/";
|
||||
$headerfilename .= $filename;
|
||||
$headerfilename =~ s/\./_/g;
|
||||
$headerfilename .= ".h";
|
||||
|
||||
$classfilename = $filename;
|
||||
$classfilename =~ s|\.|/|g;
|
||||
$classfilename .= ".class";
|
||||
|
||||
$classfilename = $classdir . $classfilename;
|
||||
|
||||
|
||||
( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $headermtime,
|
||||
$ctime, $blksize, $blocks ) = stat( $headerfilename );
|
||||
|
||||
( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $classmtime,
|
||||
$ctime, $blksize, $blocks ) = stat( $classfilename );
|
||||
|
||||
if( $headermtime < $classmtime )
|
||||
{
|
||||
# NOTE: Since this is used by "javah", and "javah" refuses to overwrite
|
||||
# an existing file, we force an unlink from this script, since
|
||||
# we actually want to regenerate the header file at this time.
|
||||
unlink $headerfilename;
|
||||
print $filename, " ";
|
||||
$found = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print "\n";
|
||||
exit 0;
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# Master "Core Components" macros to figure out binary code location #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# Figure out where the binary code lives.
|
||||
#
|
||||
|
||||
BUILD = $(PLATFORM)
|
||||
OBJDIR = $(PLATFORM)
|
||||
DIST = $(CORE_DEPTH)/dist/$(PLATFORM)
|
||||
VPATH = $(NSINSTALL_DIR)/$(PLATFORM)
|
||||
DEPENDENCIES = $(PLATFORM)/.md
|
||||
|
||||
ifdef BUILD_DEBUG_GC
|
||||
DEFINES += -DDEBUG_GC
|
||||
endif
|
||||
|
||||
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
|
|
@ -0,0 +1,100 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#
|
||||
# An NMAKE file to set up and adjust coreconf's build system for
|
||||
# Client build. Client build should invoke NMAKE on this file
|
||||
# instead of invoking gmake directly.
|
||||
#
|
||||
|
||||
NS_DEPTH = ..
|
||||
include <$(NS_DEPTH)\config\config.mak>
|
||||
#include <$(NS_DEPTH)\config\rules.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 MOZ_TOOLS_FLIPPED=$(MOZ_TOOLS:\=/)
|
||||
|
||||
GMAKE = $(GMAKE) PR_CLIENT_BUILD=1 PR_CLIENT_BUILD_WINDOWS=1
|
||||
|
||||
#
|
||||
# The Client's debug build uses MSVC's debug runtime library (/MDd).
|
||||
#
|
||||
|
||||
!ifdef MOZ_DEBUG
|
||||
GMAKE = $(GMAKE) USE_DEBUG_RTL=1
|
||||
!else
|
||||
GMAKE = $(GMAKE) BUILD_OPT=1
|
||||
!endif
|
||||
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
GMAKE = $(GMAKE) OS_TARGET=WIN16
|
||||
!else
|
||||
|
||||
GMAKE = $(GMAKE) OS_TARGET=WIN95
|
||||
!ifdef MOZ_DEBUG
|
||||
PR_OBJDIR = WIN954.0_DBG.OBJD
|
||||
!else
|
||||
PR_OBJDIR = WIN954.0_OPT.OBJ
|
||||
!endif
|
||||
|
||||
!endif
|
||||
|
||||
#
|
||||
# The rules. Simply invoke gmake with the same target
|
||||
# for Win16, use the watcom compiler with the MSVC headers and libs
|
||||
#
|
||||
|
||||
# this rule is needed so that nmake with no explicit target will only build
|
||||
# all, and not build all the targets named below in succession!
|
||||
default:: all
|
||||
|
||||
# a rule like this one must only be used for explicitly named targets!
|
||||
all depend export libs install clobber clobber_all clean::
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
set PATH=%WATCPATH%
|
||||
set INCLUDE=%MSVC_INC%
|
||||
set LIB=%MSVC_LIB%
|
||||
!endif
|
||||
$(GMAKE) $@
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
set PATH=%MSVCPATH%
|
||||
set INCLUDE=%MSVC_INC%
|
||||
set LIB=%MSVC_LIB%
|
||||
!endif
|
||||
|
||||
show:
|
||||
@echo "MAKEFLAGS = $(MAKEFLAGS)"
|
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
CORE_DEPTH = ..
|
||||
|
||||
MODULE = coreconf
|
||||
|
||||
DIRS = nsinstall \
|
||||
mkdepend \
|
||||
md \
|
||||
$(NULL)
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
CORE_DEPTH = ../..
|
||||
|
||||
MODULE = coreconf
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
PROGRAM =
|
||||
endif
|
||||
|
||||
DEFINES += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".o\"
|
|
@ -0,0 +1,242 @@
|
|||
/* $XConsortium: cppsetup.c,v 1.13 94/04/17 20:10:32 gildea Exp $ */
|
||||
/*
|
||||
|
||||
Copyright (c) 1993, 1994 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
#include "def.h"
|
||||
|
||||
#ifdef CPP
|
||||
/*
|
||||
* This file is strictly for the sake of cpy.y and yylex.c (if
|
||||
* you indeed have the source for cpp).
|
||||
*/
|
||||
#define IB 1
|
||||
#define SB 2
|
||||
#define NB 4
|
||||
#define CB 8
|
||||
#define QB 16
|
||||
#define WB 32
|
||||
#define SALT '#'
|
||||
#if pdp11 | vax | ns16000 | mc68000 | ibm032
|
||||
#define COFF 128
|
||||
#else
|
||||
#define COFF 0
|
||||
#endif
|
||||
/*
|
||||
* These variables used by cpy.y and yylex.c
|
||||
*/
|
||||
extern char *outp, *inp, *newp, *pend;
|
||||
extern char *ptrtab;
|
||||
extern char fastab[];
|
||||
extern char slotab[];
|
||||
|
||||
/*
|
||||
* cppsetup
|
||||
*/
|
||||
struct filepointer *currentfile;
|
||||
struct inclist *currentinc;
|
||||
|
||||
cppsetup(line, filep, inc)
|
||||
register char *line;
|
||||
register struct filepointer *filep;
|
||||
register struct inclist *inc;
|
||||
{
|
||||
register char *p, savec;
|
||||
static boolean setupdone = FALSE;
|
||||
boolean value;
|
||||
|
||||
if (!setupdone) {
|
||||
cpp_varsetup();
|
||||
setupdone = TRUE;
|
||||
}
|
||||
|
||||
currentfile = filep;
|
||||
currentinc = inc;
|
||||
inp = newp = line;
|
||||
for (p=newp; *p; p++)
|
||||
;
|
||||
|
||||
/*
|
||||
* put a newline back on the end, and set up pend, etc.
|
||||
*/
|
||||
*p++ = '\n';
|
||||
savec = *p;
|
||||
*p = '\0';
|
||||
pend = p;
|
||||
|
||||
ptrtab = slotab+COFF;
|
||||
*--inp = SALT;
|
||||
outp=inp;
|
||||
value = yyparse();
|
||||
*p = savec;
|
||||
return(value);
|
||||
}
|
||||
|
||||
struct symtab *lookup(symbol)
|
||||
char *symbol;
|
||||
{
|
||||
static struct symtab undefined;
|
||||
struct symtab *sp;
|
||||
|
||||
sp = isdefined(symbol, currentinc, NULL);
|
||||
if (sp == NULL) {
|
||||
sp = &undefined;
|
||||
sp->s_value = NULL;
|
||||
}
|
||||
return (sp);
|
||||
}
|
||||
|
||||
pperror(tag, x0,x1,x2,x3,x4)
|
||||
int tag,x0,x1,x2,x3,x4;
|
||||
{
|
||||
warning("\"%s\", line %d: ", currentinc->i_file, currentfile->f_line);
|
||||
warning(x0,x1,x2,x3,x4);
|
||||
}
|
||||
|
||||
|
||||
yyerror(s)
|
||||
register char *s;
|
||||
{
|
||||
fatalerr("Fatal error: %s\n", s);
|
||||
}
|
||||
#else /* not CPP */
|
||||
|
||||
#include "ifparser.h"
|
||||
struct _parse_data {
|
||||
struct filepointer *filep;
|
||||
struct inclist *inc;
|
||||
const char *line;
|
||||
};
|
||||
|
||||
static const char *
|
||||
_my_if_errors (ip, cp, expecting)
|
||||
IfParser *ip;
|
||||
const char *cp;
|
||||
const char *expecting;
|
||||
{
|
||||
struct _parse_data *pd = (struct _parse_data *) ip->data;
|
||||
int lineno = pd->filep->f_line;
|
||||
char *filename = pd->inc->i_file;
|
||||
char prefix[300];
|
||||
int prefixlen;
|
||||
int i;
|
||||
|
||||
sprintf (prefix, "\"%s\":%d", filename, lineno);
|
||||
prefixlen = strlen(prefix);
|
||||
fprintf (stderr, "%s: %s", prefix, pd->line);
|
||||
i = cp - pd->line;
|
||||
if (i > 0 && pd->line[i-1] != '\n') {
|
||||
putc ('\n', stderr);
|
||||
}
|
||||
for (i += prefixlen + 3; i > 0; i--) {
|
||||
putc (' ', stderr);
|
||||
}
|
||||
fprintf (stderr, "^--- expecting %s\n", expecting);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#define MAXNAMELEN 256
|
||||
|
||||
static struct symtab *
|
||||
_lookup_variable (ip, var, len)
|
||||
IfParser *ip;
|
||||
const char *var;
|
||||
int len;
|
||||
{
|
||||
char tmpbuf[MAXNAMELEN + 1];
|
||||
struct _parse_data *pd = (struct _parse_data *) ip->data;
|
||||
|
||||
if (len > MAXNAMELEN)
|
||||
return 0;
|
||||
|
||||
strncpy (tmpbuf, var, len);
|
||||
tmpbuf[len] = '\0';
|
||||
return isdefined (tmpbuf, pd->inc, NULL);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
_my_eval_defined (ip, var, len)
|
||||
IfParser *ip;
|
||||
const char *var;
|
||||
int len;
|
||||
{
|
||||
if (_lookup_variable (ip, var, len))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
|
||||
|
||||
static int
|
||||
_my_eval_variable (ip, var, len)
|
||||
IfParser *ip;
|
||||
const char *var;
|
||||
int len;
|
||||
{
|
||||
struct symtab *s;
|
||||
|
||||
s = _lookup_variable (ip, var, len);
|
||||
if (!s)
|
||||
return 0;
|
||||
do {
|
||||
var = s->s_value;
|
||||
if (!isvarfirstletter(*var))
|
||||
break;
|
||||
s = _lookup_variable (ip, var, strlen(var));
|
||||
} while (s);
|
||||
|
||||
return atoi(var);
|
||||
}
|
||||
|
||||
|
||||
cppsetup(line, filep, inc)
|
||||
register char *line;
|
||||
register struct filepointer *filep;
|
||||
register struct inclist *inc;
|
||||
{
|
||||
IfParser ip;
|
||||
struct _parse_data pd;
|
||||
int val = 0;
|
||||
|
||||
pd.filep = filep;
|
||||
pd.inc = inc;
|
||||
pd.line = line;
|
||||
ip.funcs.handle_error = _my_if_errors;
|
||||
ip.funcs.eval_defined = _my_eval_defined;
|
||||
ip.funcs.eval_variable = _my_eval_variable;
|
||||
ip.data = (char *) &pd;
|
||||
|
||||
(void) ParseIfExpression (&ip, line, &val);
|
||||
if (val)
|
||||
return IF;
|
||||
else
|
||||
return IFFALSE;
|
||||
}
|
||||
#endif /* CPP */
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
/* $XConsortium: def.h,v 1.25 94/04/17 20:10:33 gildea Exp $ */
|
||||
/*
|
||||
|
||||
Copyright (c) 1993, 1994 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#ifndef X_NOT_POSIX
|
||||
#ifndef _POSIX_SOURCE
|
||||
#define _POSIX_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MAXDEFINES 512
|
||||
#define MAXFILES 1024 /* Increased from 512. -mcafee */
|
||||
#define MAXDIRS 64
|
||||
#define SYMTABINC 10 /* must be > 1 for define() to work right */
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* the following must match the directives table in main.c */
|
||||
#define IF 0
|
||||
#define IFDEF 1
|
||||
#define IFNDEF 2
|
||||
#define ELSE 3
|
||||
#define ENDIF 4
|
||||
#define DEFINE 5
|
||||
#define UNDEF 6
|
||||
#define INCLUDE 7
|
||||
#define LINE 8
|
||||
#define PRAGMA 9
|
||||
#define ERROR 10
|
||||
#define IDENT 11
|
||||
#define SCCS 12
|
||||
#define ELIF 13
|
||||
#define EJECT 14
|
||||
#define IFFALSE 15 /* pseudo value --- never matched */
|
||||
#define ELIFFALSE 16 /* pseudo value --- never matched */
|
||||
#define INCLUDEDOT 17 /* pseudo value --- never matched */
|
||||
#define IFGUESSFALSE 18 /* pseudo value --- never matched */
|
||||
#define ELIFGUESSFALSE 19 /* pseudo value --- never matched */
|
||||
|
||||
#ifdef DEBUG
|
||||
extern int _debugmask;
|
||||
/*
|
||||
* debug levels are:
|
||||
*
|
||||
* 0 show ifn*(def)*,endif
|
||||
* 1 trace defined/!defined
|
||||
* 2 show #include
|
||||
* 3 show #include SYMBOL
|
||||
* 4-6 unused
|
||||
*/
|
||||
#define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; }
|
||||
#else
|
||||
#define debug(level,arg) /**/
|
||||
#endif /* DEBUG */
|
||||
|
||||
typedef unsigned char boolean;
|
||||
|
||||
struct symtab {
|
||||
char *s_name;
|
||||
char *s_value;
|
||||
};
|
||||
|
||||
struct inclist {
|
||||
char *i_incstring; /* string from #include line */
|
||||
char *i_file; /* path name of the include file */
|
||||
struct inclist **i_list; /* list of files it itself includes */
|
||||
int i_listlen; /* length of i_list */
|
||||
struct symtab *i_defs; /* symbol table for this file */
|
||||
int i_ndefs; /* current # defines */
|
||||
int i_deflen; /* amount of space in table */
|
||||
boolean i_defchecked; /* whether defines have been checked */
|
||||
boolean i_notified; /* whether we have revealed includes */
|
||||
boolean i_marked; /* whether it's in the makefile */
|
||||
boolean i_searched; /* whether we have read this */
|
||||
boolean i_included_sym; /* whether #include SYMBOL was found */
|
||||
/* Can't use i_list if TRUE */
|
||||
};
|
||||
|
||||
struct filepointer {
|
||||
char *f_p;
|
||||
char *f_base;
|
||||
char *f_end;
|
||||
long f_len;
|
||||
long f_line;
|
||||
};
|
||||
|
||||
#ifndef X_NOT_STDC_ENV
|
||||
#include <stdlib.h>
|
||||
#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
|
||||
char *malloc(), *realloc();
|
||||
#endif /* macII */
|
||||
#else
|
||||
char *malloc();
|
||||
char *realloc();
|
||||
#endif
|
||||
|
||||
char *copy();
|
||||
char *base_name();
|
||||
char *getline();
|
||||
struct symtab *slookup();
|
||||
struct symtab *isdefined();
|
||||
struct symtab *fdefined();
|
||||
struct filepointer *getfile();
|
||||
struct inclist *newinclude();
|
||||
struct inclist *inc_path();
|
||||
|
||||
#if NeedVarargsPrototypes
|
||||
extern fatalerr(char *, ...);
|
||||
extern warning(char *, ...);
|
||||
extern warning1(char *, ...);
|
||||
#endif
|
|
@ -0,0 +1,454 @@
|
|||
/*
|
||||
* $XConsortium: ifparser.c,v 1.8 95/06/03 00:01:41 gildea Exp $
|
||||
*
|
||||
* Copyright 1992 Network Computing Devices, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
* that the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of Network Computing Devices may not be
|
||||
* used in advertising or publicity pertaining to distribution of the software
|
||||
* without specific, written prior permission. Network Computing Devices makes
|
||||
* no representations about the suitability of this software for any purpose.
|
||||
* It is provided ``as is'' without express or implied warranty.
|
||||
*
|
||||
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
|
||||
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
|
||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Author: Jim Fulton
|
||||
* Network Computing Devices, Inc.
|
||||
*
|
||||
* Simple if statement processor
|
||||
*
|
||||
* This module can be used to evaluate string representations of C language
|
||||
* if constructs. It accepts the following grammar:
|
||||
*
|
||||
* EXPRESSION := VALUE
|
||||
* | VALUE BINOP EXPRESSION
|
||||
*
|
||||
* VALUE := '(' EXPRESSION ')'
|
||||
* | '!' VALUE
|
||||
* | '-' VALUE
|
||||
* | 'defined' '(' variable ')'
|
||||
* | 'defined' variable
|
||||
* | # variable '(' variable-list ')'
|
||||
* | variable
|
||||
* | number
|
||||
*
|
||||
* BINOP := '*' | '/' | '%'
|
||||
* | '+' | '-'
|
||||
* | '<<' | '>>'
|
||||
* | '<' | '>' | '<=' | '>='
|
||||
* | '==' | '!='
|
||||
* | '&' | '|'
|
||||
* | '&&' | '||'
|
||||
*
|
||||
* The normal C order of precidence is supported.
|
||||
*
|
||||
*
|
||||
* External Entry Points:
|
||||
*
|
||||
* ParseIfExpression parse a string for #if
|
||||
*/
|
||||
|
||||
#include "ifparser.h"
|
||||
#include <ctype.h>
|
||||
|
||||
/****************************************************************************
|
||||
Internal Macros and Utilities for Parser
|
||||
****************************************************************************/
|
||||
|
||||
#define DO(val) if (!(val)) return NULL
|
||||
#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff))
|
||||
#define SKIPSPACE(ccc) while (isspace(*ccc)) ccc++
|
||||
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
|
||||
|
||||
|
||||
static const char *
|
||||
parse_variable (g, cp, varp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
const char **varp;
|
||||
{
|
||||
SKIPSPACE (cp);
|
||||
|
||||
if (!isvarfirstletter (*cp))
|
||||
return CALLFUNC(g, handle_error) (g, cp, "variable name");
|
||||
|
||||
*varp = cp;
|
||||
/* EMPTY */
|
||||
for (cp++; isalnum(*cp) || *cp == '_'; cp++) ;
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_number (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
SKIPSPACE (cp);
|
||||
|
||||
if (!isdigit(*cp))
|
||||
return CALLFUNC(g, handle_error) (g, cp, "number");
|
||||
|
||||
#ifdef WIN32
|
||||
*valp = strtol(cp, &cp, 0);
|
||||
#else
|
||||
*valp = atoi (cp);
|
||||
/* EMPTY */
|
||||
for (cp++; isdigit(*cp); cp++) ;
|
||||
#endif
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_value (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
const char *var;
|
||||
|
||||
*valp = 0;
|
||||
|
||||
SKIPSPACE (cp);
|
||||
if (!*cp)
|
||||
return cp;
|
||||
|
||||
switch (*cp) {
|
||||
case '(':
|
||||
DO (cp = ParseIfExpression (g, cp + 1, valp));
|
||||
SKIPSPACE (cp);
|
||||
if (*cp != ')')
|
||||
return CALLFUNC(g, handle_error) (g, cp, ")");
|
||||
|
||||
return cp + 1; /* skip the right paren */
|
||||
|
||||
case '!':
|
||||
DO (cp = parse_value (g, cp + 1, valp));
|
||||
*valp = !(*valp);
|
||||
return cp;
|
||||
|
||||
case '-':
|
||||
DO (cp = parse_value (g, cp + 1, valp));
|
||||
*valp = -(*valp);
|
||||
return cp;
|
||||
|
||||
case '#':
|
||||
DO (cp = parse_variable (g, cp + 1, &var));
|
||||
SKIPSPACE (cp);
|
||||
if (*cp != '(')
|
||||
return CALLFUNC(g, handle_error) (g, cp, "(");
|
||||
do {
|
||||
DO (cp = parse_variable (g, cp + 1, &var));
|
||||
SKIPSPACE (cp);
|
||||
} while (*cp && *cp != ')');
|
||||
if (*cp != ')')
|
||||
return CALLFUNC(g, handle_error) (g, cp, ")");
|
||||
*valp = 1; /* XXX */
|
||||
return cp + 1;
|
||||
|
||||
case 'd':
|
||||
if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
|
||||
int paren = 0;
|
||||
int len;
|
||||
|
||||
cp += 7;
|
||||
SKIPSPACE (cp);
|
||||
if (*cp == '(') {
|
||||
paren = 1;
|
||||
cp++;
|
||||
}
|
||||
DO (cp = parse_variable (g, cp, &var));
|
||||
len = cp - var;
|
||||
SKIPSPACE (cp);
|
||||
if (paren && *cp != ')')
|
||||
return CALLFUNC(g, handle_error) (g, cp, ")");
|
||||
*valp = (*(g->funcs.eval_defined)) (g, var, len);
|
||||
return cp + paren; /* skip the right paren */
|
||||
}
|
||||
/* fall out */
|
||||
}
|
||||
|
||||
if (isdigit(*cp)) {
|
||||
DO (cp = parse_number (g, cp, valp));
|
||||
} else if (!isvarfirstletter(*cp))
|
||||
return CALLFUNC(g, handle_error) (g, cp, "variable or number");
|
||||
else {
|
||||
DO (cp = parse_variable (g, cp, &var));
|
||||
*valp = (*(g->funcs.eval_variable)) (g, var, cp - var);
|
||||
}
|
||||
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const char *
|
||||
parse_product (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_value (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '*':
|
||||
DO (cp = parse_product (g, cp + 1, &rightval));
|
||||
*valp = (*valp * rightval);
|
||||
break;
|
||||
|
||||
case '/':
|
||||
DO (cp = parse_product (g, cp + 1, &rightval));
|
||||
*valp = (*valp / rightval);
|
||||
break;
|
||||
|
||||
case '%':
|
||||
DO (cp = parse_product (g, cp + 1, &rightval));
|
||||
*valp = (*valp % rightval);
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_sum (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_product (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '+':
|
||||
DO (cp = parse_sum (g, cp + 1, &rightval));
|
||||
*valp = (*valp + rightval);
|
||||
break;
|
||||
|
||||
case '-':
|
||||
DO (cp = parse_sum (g, cp + 1, &rightval));
|
||||
*valp = (*valp - rightval);
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_shift (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_sum (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '<':
|
||||
if (cp[1] == '<') {
|
||||
DO (cp = parse_shift (g, cp + 2, &rightval));
|
||||
*valp = (*valp << rightval);
|
||||
}
|
||||
break;
|
||||
|
||||
case '>':
|
||||
if (cp[1] == '>') {
|
||||
DO (cp = parse_shift (g, cp + 2, &rightval));
|
||||
*valp = (*valp >> rightval);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_inequality (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_shift (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '<':
|
||||
if (cp[1] == '=') {
|
||||
DO (cp = parse_inequality (g, cp + 2, &rightval));
|
||||
*valp = (*valp <= rightval);
|
||||
} else {
|
||||
DO (cp = parse_inequality (g, cp + 1, &rightval));
|
||||
*valp = (*valp < rightval);
|
||||
}
|
||||
break;
|
||||
|
||||
case '>':
|
||||
if (cp[1] == '=') {
|
||||
DO (cp = parse_inequality (g, cp + 2, &rightval));
|
||||
*valp = (*valp >= rightval);
|
||||
} else {
|
||||
DO (cp = parse_inequality (g, cp + 1, &rightval));
|
||||
*valp = (*valp > rightval);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_equality (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_inequality (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '=':
|
||||
if (cp[1] == '=')
|
||||
cp++;
|
||||
DO (cp = parse_equality (g, cp + 1, &rightval));
|
||||
*valp = (*valp == rightval);
|
||||
break;
|
||||
|
||||
case '!':
|
||||
if (cp[1] != '=')
|
||||
break;
|
||||
DO (cp = parse_equality (g, cp + 2, &rightval));
|
||||
*valp = (*valp != rightval);
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_band (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_equality (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '&':
|
||||
if (cp[1] != '&') {
|
||||
DO (cp = parse_band (g, cp + 1, &rightval));
|
||||
*valp = (*valp & rightval);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_bor (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_band (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '|':
|
||||
if (cp[1] != '|') {
|
||||
DO (cp = parse_bor (g, cp + 1, &rightval));
|
||||
*valp = (*valp | rightval);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_land (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_bor (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '&':
|
||||
if (cp[1] != '&')
|
||||
return CALLFUNC(g, handle_error) (g, cp, "&&");
|
||||
DO (cp = parse_land (g, cp + 2, &rightval));
|
||||
*valp = (*valp && rightval);
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
parse_lor (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
int rightval;
|
||||
|
||||
DO (cp = parse_land (g, cp, valp));
|
||||
SKIPSPACE (cp);
|
||||
|
||||
switch (*cp) {
|
||||
case '|':
|
||||
if (cp[1] != '|')
|
||||
return CALLFUNC(g, handle_error) (g, cp, "||");
|
||||
DO (cp = parse_lor (g, cp + 2, &rightval));
|
||||
*valp = (*valp || rightval);
|
||||
break;
|
||||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
External Entry Points
|
||||
****************************************************************************/
|
||||
|
||||
const char *
|
||||
ParseIfExpression (g, cp, valp)
|
||||
IfParser *g;
|
||||
const char *cp;
|
||||
int *valp;
|
||||
{
|
||||
return parse_lor (g, cp, valp);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* $XConsortium: ifparser.h,v 1.1 92/08/22 13:05:39 rws Exp $
|
||||
*
|
||||
* Copyright 1992 Network Computing Devices, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
* that the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of Network Computing Devices may not be
|
||||
* used in advertising or publicity pertaining to distribution of the software
|
||||
* without specific, written prior permission. Network Computing Devices makes
|
||||
* no representations about the suitability of this software for any purpose.
|
||||
* It is provided ``as is'' without express or implied warranty.
|
||||
*
|
||||
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
|
||||
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
|
||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Author: Jim Fulton
|
||||
* Network Computing Devices, Inc.
|
||||
*
|
||||
* Simple if statement processor
|
||||
*
|
||||
* This module can be used to evaluate string representations of C language
|
||||
* if constructs. It accepts the following grammar:
|
||||
*
|
||||
* EXPRESSION := VALUE
|
||||
* | VALUE BINOP EXPRESSION
|
||||
*
|
||||
* VALUE := '(' EXPRESSION ')'
|
||||
* | '!' VALUE
|
||||
* | '-' VALUE
|
||||
* | 'defined' '(' variable ')'
|
||||
* | variable
|
||||
* | number
|
||||
*
|
||||
* BINOP := '*' | '/' | '%'
|
||||
* | '+' | '-'
|
||||
* | '<<' | '>>'
|
||||
* | '<' | '>' | '<=' | '>='
|
||||
* | '==' | '!='
|
||||
* | '&' | '|'
|
||||
* | '&&' | '||'
|
||||
*
|
||||
* The normal C order of precidence is supported.
|
||||
*
|
||||
*
|
||||
* External Entry Points:
|
||||
*
|
||||
* ParseIfExpression parse a string for #if
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define const /**/
|
||||
typedef int Bool;
|
||||
#define False 0
|
||||
#define True 1
|
||||
|
||||
typedef struct _if_parser {
|
||||
struct { /* functions */
|
||||
char *(*handle_error) (/* struct _if_parser *, const char *,
|
||||
const char * */);
|
||||
int (*eval_variable) (/* struct _if_parser *, const char *, int */);
|
||||
int (*eval_defined) (/* struct _if_parser *, const char *, int */);
|
||||
} funcs;
|
||||
char *data;
|
||||
} IfParser;
|
||||
|
||||
char *ParseIfExpression (/* IfParser *, const char *, int * */);
|
||||
|
|
@ -0,0 +1,727 @@
|
|||
|
||||
/* $XConsortium: imakemdep.h,v 1.83 95/04/07 19:47:46 kaleb Exp $ */
|
||||
/* $XFree86: xc/config/imake/imakemdep.h,v 3.12 1995/07/08 10:22:17 dawes Exp $ */
|
||||
/*
|
||||
|
||||
Copyright (c) 1993, 1994 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* This file contains machine-dependent constants for the imake utility.
|
||||
* When porting imake, read each of the steps below and add in any necessary
|
||||
* definitions. In general you should *not* edit ccimake.c or imake.c!
|
||||
*/
|
||||
|
||||
#ifdef CCIMAKE
|
||||
/*
|
||||
* Step 1: imake_ccflags
|
||||
* Define any special flags that will be needed to get imake.c to compile.
|
||||
* These will be passed to the compile along with the contents of the
|
||||
* make variable BOOTSTRAPCFLAGS.
|
||||
*/
|
||||
#ifdef hpux
|
||||
#ifdef hp9000s800
|
||||
#define imake_ccflags "-DSYSV"
|
||||
#else
|
||||
#define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(macII) || defined(_AUX_SOURCE)
|
||||
#define imake_ccflags "-DmacII -DSYSV"
|
||||
#endif
|
||||
|
||||
#ifdef stellar
|
||||
#define imake_ccflags "-DSYSV"
|
||||
#endif
|
||||
|
||||
#if defined(USL) || defined(Oki) || defined(NCR)
|
||||
#define imake_ccflags "-Xc -DSVR4"
|
||||
#endif
|
||||
|
||||
#ifdef sony
|
||||
#if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
|
||||
#define imake_ccflags "-DSVR4"
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
#if NEWSOS < 41
|
||||
#define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
|
||||
#else
|
||||
#if NEWSOS < 42
|
||||
#define imake_ccflags "-Dbsd43"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _CRAY
|
||||
#define imake_ccflags "-DSYSV -DUSG"
|
||||
#endif
|
||||
|
||||
#if defined(_IBMR2) || defined(aix)
|
||||
#define imake_ccflags "-Daix -DSYSV"
|
||||
#endif
|
||||
|
||||
#ifdef Mips
|
||||
# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
|
||||
# define imake_ccflags "-DBSD43"
|
||||
# else
|
||||
# define imake_ccflags "-DSYSV"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef is68k
|
||||
#define imake_ccflags "-Dluna -Duniosb"
|
||||
#endif
|
||||
|
||||
#ifdef SYSV386
|
||||
# ifdef SVR4
|
||||
# define imake_ccflags "-Xc -DSVR4"
|
||||
# else
|
||||
# define imake_ccflags "-DSYSV"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SVR4
|
||||
# ifdef i386
|
||||
# define imake_ccflags "-Xc -DSVR4"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SYSV
|
||||
# ifdef i386
|
||||
# define imake_ccflags "-DSYSV"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __convex__
|
||||
#define imake_ccflags "-fn -tm c1"
|
||||
#endif
|
||||
|
||||
#ifdef apollo
|
||||
#define imake_ccflags "-DX_NOT_POSIX"
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define imake_ccflags "-nologo -batch -D__STDC__"
|
||||
#endif
|
||||
|
||||
#ifdef __uxp__
|
||||
#define imake_ccflags "-DSVR4 -DANSICPP"
|
||||
#endif
|
||||
|
||||
#ifdef __sxg__
|
||||
#define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
|
||||
#endif
|
||||
|
||||
#ifdef sequent
|
||||
#define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
|
||||
#endif
|
||||
|
||||
#ifdef _SEQUENT_
|
||||
#define imake_ccflags "-DSYSV -DUSG"
|
||||
#endif
|
||||
|
||||
#if defined(SX) || defined(PC_UX)
|
||||
#define imake_ccflags "-DSYSV"
|
||||
#endif
|
||||
|
||||
#ifdef nec_ews_svr2
|
||||
#define imake_ccflags "-DUSG"
|
||||
#endif
|
||||
|
||||
#if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
|
||||
#define imake_ccflags "-DSVR4"
|
||||
#endif
|
||||
|
||||
#ifdef MACH
|
||||
#define imake_ccflags "-DNOSTDHDRS"
|
||||
#endif
|
||||
|
||||
/* this is for OS/2 under EMX. This won't work with DOS */
|
||||
#if defined(__EMX__)
|
||||
#define imake_ccflags "-DBSD43"
|
||||
#endif
|
||||
|
||||
#else /* not CCIMAKE */
|
||||
#ifndef MAKEDEPEND
|
||||
/*
|
||||
* Step 2: dup2
|
||||
* If your OS doesn't have a dup2() system call to duplicate one file
|
||||
* descriptor onto another, define such a mechanism here (if you don't
|
||||
* already fall under the existing category(ies).
|
||||
*/
|
||||
#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_)
|
||||
#define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
|
||||
fcntl(fd1, F_DUPFD, fd2)))
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Step 3: FIXUP_CPP_WHITESPACE
|
||||
* If your cpp collapses tabs macro expansions into a single space and
|
||||
* replaces escaped newlines with a space, define this symbol. This will
|
||||
* cause imake to attempt to patch up the generated Makefile by looking
|
||||
* for lines that have colons in them (this is why the rules file escapes
|
||||
* all colons). One way to tell if you need this is to see whether or not
|
||||
* your Makefiles have no tabs in them and lots of @@ strings.
|
||||
*/
|
||||
#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
|
||||
#define FIXUP_CPP_WHITESPACE
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#define REMOVE_CPP_LEADSPACE
|
||||
#define INLINE_SYNTAX
|
||||
#define MAGIC_MAKE_VARS
|
||||
#endif
|
||||
#ifdef __minix_vmd
|
||||
#define FIXUP_CPP_WHITESPACE
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Step 4: USE_CC_E, DEFAULT_CC, DEFAULT_CPP
|
||||
* If you want to use cc -E instead of cpp, define USE_CC_E.
|
||||
* If use cc -E but want a different compiler, define DEFAULT_CC.
|
||||
* If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
|
||||
*/
|
||||
#ifdef hpux
|
||||
#define USE_CC_E
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#define USE_CC_E
|
||||
#define DEFAULT_CC "cl"
|
||||
#endif
|
||||
#ifdef apollo
|
||||
#define DEFAULT_CPP "/usr/lib/cpp"
|
||||
#endif
|
||||
#if defined(_IBMR2) && !defined(DEFAULT_CPP)
|
||||
#define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
|
||||
#endif
|
||||
#if defined(sun) && defined(SVR4)
|
||||
#define DEFAULT_CPP "/usr/ccs/lib/cpp"
|
||||
#endif
|
||||
#ifdef __bsdi__
|
||||
#define DEFAULT_CPP "/usr/bin/cpp"
|
||||
#endif
|
||||
#ifdef __uxp__
|
||||
#define DEFAULT_CPP "/usr/ccs/lib/cpp"
|
||||
#endif
|
||||
#ifdef __sxg__
|
||||
#define DEFAULT_CPP "/usr/lib/cpp"
|
||||
#endif
|
||||
#ifdef _CRAY
|
||||
#define DEFAULT_CPP "/lib/pcpp"
|
||||
#endif
|
||||
#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#define DEFAULT_CPP "/usr/libexec/cpp"
|
||||
#endif
|
||||
#ifdef MACH
|
||||
#define USE_CC_E
|
||||
#endif
|
||||
#ifdef __minix_vmd
|
||||
#define DEFAULT_CPP "/usr/lib/cpp"
|
||||
#endif
|
||||
#if defined(__EMX__)
|
||||
/* expects cpp in PATH */
|
||||
#define DEFAULT_CPP "cpp"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Step 5: cpp_argv
|
||||
* The following table contains the flags that should be passed
|
||||
* whenever a Makefile is being generated. If your preprocessor
|
||||
* doesn't predefine any unique symbols, choose one and add it to the
|
||||
* end of this table. Then, do the following:
|
||||
*
|
||||
* a. Use this symbol in Imake.tmpl when setting MacroFile.
|
||||
* b. Put this symbol in the definition of BootstrapCFlags in your
|
||||
* <platform>.cf file.
|
||||
* c. When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol"
|
||||
* to the end of the command line.
|
||||
*
|
||||
* Note that you may define more than one symbol (useful for platforms
|
||||
* that support multiple operating systems).
|
||||
*/
|
||||
|
||||
#define ARGUMENTS 50 /* number of arguments in various arrays */
|
||||
char *cpp_argv[ARGUMENTS] = {
|
||||
"cc", /* replaced by the actual program to exec */
|
||||
"-I.", /* add current directory to include path */
|
||||
#ifdef unix
|
||||
"-Uunix", /* remove unix symbol so that filename unix.c okay */
|
||||
#endif
|
||||
#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACH)
|
||||
# ifdef __i386__
|
||||
"-D__i386__",
|
||||
# endif
|
||||
# ifdef __GNUC__
|
||||
"-traditional",
|
||||
# endif
|
||||
#endif
|
||||
#ifdef M4330
|
||||
"-DM4330", /* Tektronix */
|
||||
#endif
|
||||
#ifdef M4310
|
||||
"-DM4310", /* Tektronix */
|
||||
#endif
|
||||
#if defined(macII) || defined(_AUX_SOURCE)
|
||||
"-DmacII", /* Apple A/UX */
|
||||
#endif
|
||||
#ifdef USL
|
||||
"-DUSL", /* USL */
|
||||
#endif
|
||||
#ifdef sony
|
||||
"-Dsony", /* Sony */
|
||||
#if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
|
||||
"-Dbsd43",
|
||||
#endif
|
||||
#endif
|
||||
#ifdef _IBMR2
|
||||
"-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */
|
||||
#ifndef aix
|
||||
#define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
|
||||
#endif
|
||||
#endif /* _IBMR2 */
|
||||
#ifdef aix
|
||||
"-Daix", /* AIX instead of AOS */
|
||||
#ifndef ibm
|
||||
#define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */
|
||||
#endif
|
||||
#endif /* aix */
|
||||
#ifdef ibm
|
||||
"-Dibm", /* IBM PS/2 and RT under both AOS and AIX */
|
||||
#endif
|
||||
#ifdef luna
|
||||
"-Dluna", /* OMRON luna 68K and 88K */
|
||||
#ifdef luna1
|
||||
"-Dluna1",
|
||||
#endif
|
||||
#ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */
|
||||
"-traditional", /* for some older version */
|
||||
#endif /* instead of "-DXCOMM=\\#" */
|
||||
#ifdef uniosb
|
||||
"-Duniosb",
|
||||
#endif
|
||||
#ifdef uniosu
|
||||
"-Duniosu",
|
||||
#endif
|
||||
#endif /* luna */
|
||||
#ifdef _CRAY /* Cray */
|
||||
"-Ucray",
|
||||
#endif
|
||||
#ifdef Mips
|
||||
"-DMips", /* Define and use Mips for Mips Co. OS/mach. */
|
||||
# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
|
||||
"-DBSD43", /* Mips RISCOS supports two environments */
|
||||
# else
|
||||
"-DSYSV", /* System V environment is the default */
|
||||
# endif
|
||||
#endif /* Mips */
|
||||
#ifdef MOTOROLA
|
||||
"-DMOTOROLA", /* Motorola Delta Systems */
|
||||
# ifdef SYSV
|
||||
"-DSYSV",
|
||||
# endif
|
||||
# ifdef SVR4
|
||||
"-DSVR4",
|
||||
# endif
|
||||
#endif /* MOTOROLA */
|
||||
#ifdef i386
|
||||
"-Di386",
|
||||
# ifdef SVR4
|
||||
"-DSVR4",
|
||||
# endif
|
||||
# ifdef SYSV
|
||||
"-DSYSV",
|
||||
# ifdef ISC
|
||||
"-DISC",
|
||||
# ifdef ISC40
|
||||
"-DISC40", /* ISC 4.0 */
|
||||
# else
|
||||
# ifdef ISC202
|
||||
"-DISC202", /* ISC 2.0.2 */
|
||||
# else
|
||||
# ifdef ISC30
|
||||
"-DISC30", /* ISC 3.0 */
|
||||
# else
|
||||
"-DISC22", /* ISC 2.2.1 */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifdef SCO
|
||||
"-DSCO",
|
||||
# ifdef SCO324
|
||||
"-DSCO324",
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifdef ESIX
|
||||
"-DESIX",
|
||||
# endif
|
||||
# ifdef ATT
|
||||
"-DATT",
|
||||
# endif
|
||||
# ifdef DELL
|
||||
"-DDELL",
|
||||
# endif
|
||||
#endif
|
||||
#ifdef SYSV386 /* System V/386 folks, obsolete */
|
||||
"-Di386",
|
||||
# ifdef SVR4
|
||||
"-DSVR4",
|
||||
# endif
|
||||
# ifdef ISC
|
||||
"-DISC",
|
||||
# ifdef ISC40
|
||||
"-DISC40", /* ISC 4.0 */
|
||||
# else
|
||||
# ifdef ISC202
|
||||
"-DISC202", /* ISC 2.0.2 */
|
||||
# else
|
||||
# ifdef ISC30
|
||||
"-DISC30", /* ISC 3.0 */
|
||||
# else
|
||||
"-DISC22", /* ISC 2.2.1 */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifdef SCO
|
||||
"-DSCO",
|
||||
# ifdef SCO324
|
||||
"-DSCO324",
|
||||
# endif
|
||||
# endif
|
||||
# ifdef ESIX
|
||||
"-DESIX",
|
||||
# endif
|
||||
# ifdef ATT
|
||||
"-DATT",
|
||||
# endif
|
||||
# ifdef DELL
|
||||
"-DDELL",
|
||||
# endif
|
||||
#endif
|
||||
#ifdef __osf__
|
||||
"-D__osf__",
|
||||
# ifdef __mips__
|
||||
"-D__mips__",
|
||||
# endif
|
||||
# ifdef __alpha
|
||||
"-D__alpha",
|
||||
# endif
|
||||
# ifdef __i386__
|
||||
"-D__i386__",
|
||||
# endif
|
||||
# ifdef __GNUC__
|
||||
"-traditional",
|
||||
# endif
|
||||
#endif
|
||||
#ifdef Oki
|
||||
"-DOki",
|
||||
#endif
|
||||
#ifdef sun
|
||||
#ifdef SVR4
|
||||
"-DSVR4",
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
"-DWIN32",
|
||||
"-nologo",
|
||||
"-batch",
|
||||
"-D__STDC__",
|
||||
#endif
|
||||
#ifdef NCR
|
||||
"-DNCR", /* NCR */
|
||||
#endif
|
||||
#ifdef linux
|
||||
"-traditional",
|
||||
"-Dlinux",
|
||||
#endif
|
||||
#ifdef __uxp__
|
||||
"-D__uxp__",
|
||||
#endif
|
||||
#ifdef __sxg__
|
||||
"-D__sxg__",
|
||||
#endif
|
||||
#ifdef nec_ews_svr2
|
||||
"-Dnec_ews_svr2",
|
||||
#endif
|
||||
#ifdef AMOEBA
|
||||
"-DAMOEBA",
|
||||
# ifdef CROSS_COMPILE
|
||||
"-DCROSS_COMPILE",
|
||||
# ifdef CROSS_i80386
|
||||
"-Di80386",
|
||||
# endif
|
||||
# ifdef CROSS_sparc
|
||||
"-Dsparc",
|
||||
# endif
|
||||
# ifdef CROSS_mc68000
|
||||
"-Dmc68000",
|
||||
# endif
|
||||
# else
|
||||
# ifdef i80386
|
||||
"-Di80386",
|
||||
# endif
|
||||
# ifdef sparc
|
||||
"-Dsparc",
|
||||
# endif
|
||||
# ifdef mc68000
|
||||
"-Dmc68000",
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#ifdef __minix_vmd
|
||||
"-Dminix",
|
||||
#endif
|
||||
|
||||
#if defined(__EMX__)
|
||||
"-traditional",
|
||||
"-Demxos2",
|
||||
#endif
|
||||
|
||||
};
|
||||
#else /* else MAKEDEPEND */
|
||||
/*
|
||||
* Step 6: predefs
|
||||
* If your compiler and/or preprocessor define any specific symbols, add
|
||||
* them to the the following table. The definition of struct symtab is
|
||||
* in util/makedepend/def.h.
|
||||
*/
|
||||
struct symtab predefs[] = {
|
||||
#ifdef apollo
|
||||
{"apollo", "1"},
|
||||
#endif
|
||||
#ifdef ibm032
|
||||
{"ibm032", "1"},
|
||||
#endif
|
||||
#ifdef ibm
|
||||
{"ibm", "1"},
|
||||
#endif
|
||||
#ifdef aix
|
||||
{"aix", "1"},
|
||||
#endif
|
||||
#ifdef sun
|
||||
{"sun", "1"},
|
||||
#endif
|
||||
#ifdef sun2
|
||||
{"sun2", "1"},
|
||||
#endif
|
||||
#ifdef sun3
|
||||
{"sun3", "1"},
|
||||
#endif
|
||||
#ifdef sun4
|
||||
{"sun4", "1"},
|
||||
#endif
|
||||
#ifdef sparc
|
||||
{"sparc", "1"},
|
||||
#endif
|
||||
#ifdef __sparc__
|
||||
{"__sparc__", "1"},
|
||||
#endif
|
||||
#ifdef hpux
|
||||
{"hpux", "1"},
|
||||
#endif
|
||||
#ifdef __hpux
|
||||
{"__hpux", "1"},
|
||||
#endif
|
||||
#ifdef __hp9000s800
|
||||
{"__hp9000s800", "1"},
|
||||
#endif
|
||||
#ifdef __hp9000s700
|
||||
{"__hp9000s700", "1"},
|
||||
#endif
|
||||
#ifdef vax
|
||||
{"vax", "1"},
|
||||
#endif
|
||||
#ifdef VMS
|
||||
{"VMS", "1"},
|
||||
#endif
|
||||
#ifdef cray
|
||||
{"cray", "1"},
|
||||
#endif
|
||||
#ifdef CRAY
|
||||
{"CRAY", "1"},
|
||||
#endif
|
||||
#ifdef _CRAY
|
||||
{"_CRAY", "1"},
|
||||
#endif
|
||||
#ifdef att
|
||||
{"att", "1"},
|
||||
#endif
|
||||
#ifdef mips
|
||||
{"mips", "1"},
|
||||
#endif
|
||||
#ifdef __mips__
|
||||
{"__mips__", "1"},
|
||||
#endif
|
||||
#ifdef ultrix
|
||||
{"ultrix", "1"},
|
||||
#endif
|
||||
#ifdef stellar
|
||||
{"stellar", "1"},
|
||||
#endif
|
||||
#ifdef mc68000
|
||||
{"mc68000", "1"},
|
||||
#endif
|
||||
#ifdef mc68020
|
||||
{"mc68020", "1"},
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
{"__GNUC__", "1"},
|
||||
#endif
|
||||
#if __STDC__
|
||||
{"__STDC__", "1"},
|
||||
#endif
|
||||
#ifdef __HIGHC__
|
||||
{"__HIGHC__", "1"},
|
||||
#endif
|
||||
#ifdef CMU
|
||||
{"CMU", "1"},
|
||||
#endif
|
||||
#ifdef luna
|
||||
{"luna", "1"},
|
||||
#ifdef luna1
|
||||
{"luna1", "1"},
|
||||
#endif
|
||||
#ifdef luna2
|
||||
{"luna2", "1"},
|
||||
#endif
|
||||
#ifdef luna88k
|
||||
{"luna88k", "1"},
|
||||
#endif
|
||||
#ifdef uniosb
|
||||
{"uniosb", "1"},
|
||||
#endif
|
||||
#ifdef uniosu
|
||||
{"uniosu", "1"},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef ieeep754
|
||||
{"ieeep754", "1"},
|
||||
#endif
|
||||
#ifdef is68k
|
||||
{"is68k", "1"},
|
||||
#endif
|
||||
#ifdef m68k
|
||||
{"m68k", "1"},
|
||||
#endif
|
||||
#ifdef m88k
|
||||
{"m88k", "1"},
|
||||
#endif
|
||||
#ifdef __m88k__
|
||||
{"__m88k__", "1"},
|
||||
#endif
|
||||
#ifdef bsd43
|
||||
{"bsd43", "1"},
|
||||
#endif
|
||||
#ifdef hcx
|
||||
{"hcx", "1"},
|
||||
#endif
|
||||
#ifdef sony
|
||||
{"sony", "1"},
|
||||
#ifdef SYSTYPE_SYSV
|
||||
{"SYSTYPE_SYSV", "1"},
|
||||
#endif
|
||||
#ifdef _SYSTYPE_SYSV
|
||||
{"_SYSTYPE_SYSV", "1"},
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __OSF__
|
||||
{"__OSF__", "1"},
|
||||
#endif
|
||||
#ifdef __osf__
|
||||
{"__osf__", "1"},
|
||||
#endif
|
||||
#ifdef __alpha
|
||||
{"__alpha", "1"},
|
||||
#endif
|
||||
#ifdef __DECC
|
||||
{"__DECC", "1"},
|
||||
#endif
|
||||
#ifdef __decc
|
||||
{"__decc", "1"},
|
||||
#endif
|
||||
#ifdef __uxp__
|
||||
{"__uxp__", "1"},
|
||||
#endif
|
||||
#ifdef __sxg__
|
||||
{"__sxg__", "1"},
|
||||
#endif
|
||||
#ifdef _SEQUENT_
|
||||
{"_SEQUENT_", "1"},
|
||||
{"__STDC__", "1"},
|
||||
#endif
|
||||
#ifdef __bsdi__
|
||||
{"__bsdi__", "1"},
|
||||
#endif
|
||||
#ifdef nec_ews_svr2
|
||||
{"nec_ews_svr2", "1"},
|
||||
#endif
|
||||
#ifdef nec_ews_svr4
|
||||
{"nec_ews_svr4", "1"},
|
||||
#endif
|
||||
#ifdef _nec_ews_svr4
|
||||
{"_nec_ews_svr4", "1"},
|
||||
#endif
|
||||
#ifdef _nec_up
|
||||
{"_nec_up", "1"},
|
||||
#endif
|
||||
#ifdef SX
|
||||
{"SX", "1"},
|
||||
#endif
|
||||
#ifdef nec
|
||||
{"nec", "1"},
|
||||
#endif
|
||||
#ifdef _nec_ft
|
||||
{"_nec_ft", "1"},
|
||||
#endif
|
||||
#ifdef PC_UX
|
||||
{"PC_UX", "1"},
|
||||
#endif
|
||||
#ifdef sgi
|
||||
{"sgi", "1"},
|
||||
#endif
|
||||
#ifdef __sgi
|
||||
{"__sgi", "1"},
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
{"__FreeBSD__", "1"},
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
{"__NetBSD__", "1"},
|
||||
#endif
|
||||
#ifdef __EMX__
|
||||
{"__EMX__", "1"},
|
||||
#endif
|
||||
/* add any additional symbols before this line */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
#endif /* MAKEDEPEND */
|
||||
#endif /* CCIMAKE */
|
|
@ -0,0 +1,308 @@
|
|||
/* $XConsortium: include.c,v 1.17 94/12/05 19:33:08 gildea Exp $ */
|
||||
/*
|
||||
|
||||
Copyright (c) 1993, 1994 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "def.h"
|
||||
|
||||
extern struct inclist inclist[ MAXFILES ],
|
||||
*inclistp;
|
||||
extern char *includedirs[ ];
|
||||
extern char *notdotdot[ ];
|
||||
extern boolean show_where_not;
|
||||
extern boolean warn_multiple;
|
||||
|
||||
struct inclist *inc_path(file, include, dot)
|
||||
register char *file,
|
||||
*include;
|
||||
boolean dot;
|
||||
{
|
||||
static char path[ BUFSIZ ];
|
||||
register char **pp, *p;
|
||||
register struct inclist *ip;
|
||||
struct stat st;
|
||||
boolean found = FALSE;
|
||||
|
||||
/*
|
||||
* Check all previously found include files for a path that
|
||||
* has already been expanded.
|
||||
*/
|
||||
for (ip = inclist; ip->i_file; ip++)
|
||||
if ((strcmp(ip->i_incstring, include) == 0) && !ip->i_included_sym)
|
||||
{
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the path was surrounded by "" or is an absolute path,
|
||||
* then check the exact path provided.
|
||||
*/
|
||||
if (!found && (dot || *include == '/')) {
|
||||
if (stat(include, &st) == 0) {
|
||||
ip = newinclude(include, include);
|
||||
found = TRUE;
|
||||
}
|
||||
else if (show_where_not)
|
||||
warning1("\tnot in %s\n", include);
|
||||
}
|
||||
|
||||
/*
|
||||
* See if this include file is in the directory of the
|
||||
* file being compiled.
|
||||
*/
|
||||
if (!found) {
|
||||
for (p=file+strlen(file); p>file; p--)
|
||||
if (*p == '/')
|
||||
break;
|
||||
if (p == file)
|
||||
strcpy(path, include);
|
||||
else {
|
||||
strncpy(path, file, (p-file) + 1);
|
||||
path[ (p-file) + 1 ] = '\0';
|
||||
strcpy(path + (p-file) + 1, include);
|
||||
}
|
||||
remove_dotdot(path);
|
||||
if (stat(path, &st) == 0) {
|
||||
ip = newinclude(path, include);
|
||||
found = TRUE;
|
||||
}
|
||||
else if (show_where_not)
|
||||
warning1("\tnot in %s\n", path);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the include directories specified. (standard include dir
|
||||
* should be at the end.)
|
||||
*/
|
||||
if (!found)
|
||||
for (pp = includedirs; *pp; pp++) {
|
||||
sprintf(path, "%s/%s", *pp, include);
|
||||
remove_dotdot(path);
|
||||
if (stat(path, &st) == 0) {
|
||||
ip = newinclude(path, include);
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
else if (show_where_not)
|
||||
warning1("\tnot in %s\n", path);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
ip = NULL;
|
||||
return(ip);
|
||||
}
|
||||
|
||||
/*
|
||||
* Occasionally, pathnames are created that look like .../x/../y
|
||||
* Any of the 'x/..' sequences within the name can be eliminated.
|
||||
* (but only if 'x' is not a symbolic link!!)
|
||||
*/
|
||||
remove_dotdot(path)
|
||||
char *path;
|
||||
{
|
||||
register char *end, *from, *to, **cp;
|
||||
char *components[ MAXFILES ],
|
||||
newpath[ BUFSIZ ];
|
||||
boolean component_copied;
|
||||
|
||||
/*
|
||||
* slice path up into components.
|
||||
*/
|
||||
to = newpath;
|
||||
if (*path == '/')
|
||||
*to++ = '/';
|
||||
*to = '\0';
|
||||
cp = components;
|
||||
for (from=end=path; *end; end++)
|
||||
if (*end == '/') {
|
||||
while (*end == '/')
|
||||
*end++ = '\0';
|
||||
if (*from)
|
||||
*cp++ = from;
|
||||
from = end;
|
||||
}
|
||||
*cp++ = from;
|
||||
*cp = NULL;
|
||||
|
||||
/*
|
||||
* Recursively remove all 'x/..' component pairs.
|
||||
*/
|
||||
cp = components;
|
||||
while(*cp) {
|
||||
if (!isdot(*cp) && !isdotdot(*cp) && isdotdot(*(cp+1))
|
||||
&& !issymbolic(newpath, *cp))
|
||||
{
|
||||
char **fp = cp + 2;
|
||||
char **tp = cp;
|
||||
|
||||
do
|
||||
*tp++ = *fp; /* move all the pointers down */
|
||||
while (*fp++);
|
||||
if (cp != components)
|
||||
cp--; /* go back and check for nested ".." */
|
||||
} else {
|
||||
cp++;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Concatenate the remaining path elements.
|
||||
*/
|
||||
cp = components;
|
||||
component_copied = FALSE;
|
||||
while(*cp) {
|
||||
if (component_copied)
|
||||
*to++ = '/';
|
||||
component_copied = TRUE;
|
||||
for (from = *cp; *from; )
|
||||
*to++ = *from++;
|
||||
*to = '\0';
|
||||
cp++;
|
||||
}
|
||||
*to++ = '\0';
|
||||
|
||||
/*
|
||||
* copy the reconstituted path back to our pointer.
|
||||
*/
|
||||
strcpy(path, newpath);
|
||||
}
|
||||
|
||||
isdot(p)
|
||||
register char *p;
|
||||
{
|
||||
if(p && *p++ == '.' && *p++ == '\0')
|
||||
return(TRUE);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
isdotdot(p)
|
||||
register char *p;
|
||||
{
|
||||
if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0')
|
||||
return(TRUE);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
issymbolic(dir, component)
|
||||
register char *dir, *component;
|
||||
{
|
||||
#ifdef S_IFLNK
|
||||
struct stat st;
|
||||
char buf[ BUFSIZ ], **pp;
|
||||
|
||||
sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component);
|
||||
for (pp=notdotdot; *pp; pp++)
|
||||
if (strcmp(*pp, buf) == 0)
|
||||
return (TRUE);
|
||||
if (lstat(buf, &st) == 0
|
||||
&& (st.st_mode & S_IFMT) == S_IFLNK) {
|
||||
*pp++ = copy(buf);
|
||||
if (pp >= ¬dotdot[ MAXDIRS ])
|
||||
fatalerr("out of .. dirs, increase MAXDIRS\n");
|
||||
return(TRUE);
|
||||
}
|
||||
#endif
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add an include file to the list of those included by 'file'.
|
||||
*/
|
||||
struct inclist *newinclude(newfile, incstring)
|
||||
register char *newfile, *incstring;
|
||||
{
|
||||
register struct inclist *ip;
|
||||
|
||||
/*
|
||||
* First, put this file on the global list of include files.
|
||||
*/
|
||||
ip = inclistp++;
|
||||
if (inclistp == inclist + MAXFILES - 1)
|
||||
fatalerr("out of space: increase MAXFILES\n");
|
||||
ip->i_file = copy(newfile);
|
||||
ip->i_included_sym = FALSE;
|
||||
if (incstring == NULL)
|
||||
ip->i_incstring = ip->i_file;
|
||||
else
|
||||
ip->i_incstring = copy(incstring);
|
||||
|
||||
return(ip);
|
||||
}
|
||||
|
||||
included_by(ip, newfile)
|
||||
register struct inclist *ip, *newfile;
|
||||
{
|
||||
register i;
|
||||
|
||||
if (ip == NULL)
|
||||
return;
|
||||
/*
|
||||
* Put this include file (newfile) on the list of files included
|
||||
* by 'file'. If 'file' is NULL, then it is not an include
|
||||
* file itself (i.e. was probably mentioned on the command line).
|
||||
* If it is already on the list, don't stick it on again.
|
||||
*/
|
||||
if (ip->i_list == NULL)
|
||||
ip->i_list = (struct inclist **)
|
||||
malloc(sizeof(struct inclist *) * ++ip->i_listlen);
|
||||
else {
|
||||
for (i=0; i<ip->i_listlen; i++)
|
||||
if (ip->i_list[ i ] == newfile) {
|
||||
i = strlen(newfile->i_file);
|
||||
if (!ip->i_included_sym &&
|
||||
!(i > 2 &&
|
||||
newfile->i_file[i-1] == 'c' &&
|
||||
newfile->i_file[i-2] == '.'))
|
||||
{
|
||||
/* only bitch if ip has */
|
||||
/* no #include SYMBOL lines */
|
||||
/* and is not a .c file */
|
||||
if (warn_multiple)
|
||||
{
|
||||
warning("%s includes %s more than once!\n",
|
||||
ip->i_file, newfile->i_file);
|
||||
warning1("Already have\n");
|
||||
for (i=0; i<ip->i_listlen; i++)
|
||||
warning1("\t%s\n", ip->i_list[i]->i_file);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
ip->i_list = (struct inclist **) realloc(ip->i_list,
|
||||
sizeof(struct inclist *) * ++ip->i_listlen);
|
||||
}
|
||||
ip->i_list[ ip->i_listlen-1 ] = newfile;
|
||||
}
|
||||
|
||||
inc_clean ()
|
||||
{
|
||||
register struct inclist *ip;
|
||||
|
||||
for (ip = inclist; ip < inclistp; ip++) {
|
||||
ip->i_marked = FALSE;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,705 @@
|
|||
/* $XConsortium: main.c,v 1.84 94/11/30 16:10:44 kaleb Exp $ */
|
||||
/* $XFree86: xc/config/makedepend/main.c,v 3.4 1995/07/15 14:53:49 dawes Exp $ */
|
||||
/*
|
||||
|
||||
Copyright (c) 1993, 1994 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
#include "def.h"
|
||||
#ifdef hpux
|
||||
#define sigvec sigvector
|
||||
#endif /* hpux */
|
||||
|
||||
#ifdef X_POSIX_C_SOURCE
|
||||
#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
|
||||
#include <signal.h>
|
||||
#undef _POSIX_C_SOURCE
|
||||
#else
|
||||
#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE)
|
||||
#include <signal.h>
|
||||
#else
|
||||
#define _POSIX_SOURCE
|
||||
#include <signal.h>
|
||||
#undef _POSIX_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if NeedVarargsPrototypes
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef MINIX
|
||||
#define USE_CHMOD 1
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
int _debugmask;
|
||||
#endif
|
||||
|
||||
char *ProgramName;
|
||||
|
||||
char *directives[] = {
|
||||
"if",
|
||||
"ifdef",
|
||||
"ifndef",
|
||||
"else",
|
||||
"endif",
|
||||
"define",
|
||||
"undef",
|
||||
"include",
|
||||
"line",
|
||||
"pragma",
|
||||
"error",
|
||||
"ident",
|
||||
"sccs",
|
||||
"elif",
|
||||
"eject",
|
||||
NULL
|
||||
};
|
||||
|
||||
#define MAKEDEPEND
|
||||
#include "imakemdep.h" /* from config sources */
|
||||
#undef MAKEDEPEND
|
||||
|
||||
struct inclist inclist[ MAXFILES ],
|
||||
*inclistp = inclist,
|
||||
maininclist;
|
||||
|
||||
char *filelist[ MAXFILES ];
|
||||
char *includedirs[ MAXDIRS + 1 ];
|
||||
char *notdotdot[ MAXDIRS ];
|
||||
char *objprefix = "";
|
||||
char *objsuffix = OBJSUFFIX;
|
||||
char *startat = "# DO NOT DELETE";
|
||||
int width = 78;
|
||||
boolean append = FALSE;
|
||||
boolean printed = FALSE;
|
||||
boolean verbose = FALSE;
|
||||
boolean show_where_not = FALSE;
|
||||
boolean warn_multiple = FALSE; /* Warn on multiple includes of same file */
|
||||
|
||||
static
|
||||
#ifdef SIGNALRETURNSINT
|
||||
int
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
catch (sig)
|
||||
int sig;
|
||||
{
|
||||
fflush (stdout);
|
||||
fatalerr ("got signal %d\n", sig);
|
||||
}
|
||||
|
||||
#if defined(USG) || (defined(i386) && defined(SYSV)) || defined(WIN32) || defined(__EMX__) || defined(Lynx_22)
|
||||
#define USGISH
|
||||
#endif
|
||||
|
||||
#ifndef USGISH
|
||||
#ifndef _POSIX_SOURCE
|
||||
#define sigaction sigvec
|
||||
#define sa_handler sv_handler
|
||||
#define sa_mask sv_mask
|
||||
#define sa_flags sv_flags
|
||||
#endif
|
||||
struct sigaction sig_act;
|
||||
#endif /* USGISH */
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
register char **fp = filelist;
|
||||
register char **incp = includedirs;
|
||||
register char *p;
|
||||
register struct inclist *ip;
|
||||
char *makefile = NULL;
|
||||
struct filepointer *filecontent;
|
||||
struct symtab *psymp = predefs;
|
||||
char *endmarker = NULL;
|
||||
char *defincdir = NULL;
|
||||
|
||||
ProgramName = argv[0];
|
||||
|
||||
while (psymp->s_name)
|
||||
{
|
||||
define2(psymp->s_name, psymp->s_value, &maininclist);
|
||||
psymp++;
|
||||
}
|
||||
if (argc == 2 && argv[1][0] == '@') {
|
||||
struct stat ast;
|
||||
int afd;
|
||||
char *args;
|
||||
char **nargv;
|
||||
int nargc;
|
||||
char quotechar = '\0';
|
||||
|
||||
nargc = 1;
|
||||
if ((afd = open(argv[1]+1, O_RDONLY)) < 0)
|
||||
fatalerr("cannot open \"%s\"\n", argv[1]+1);
|
||||
fstat(afd, &ast);
|
||||
args = (char *)malloc(ast.st_size + 1);
|
||||
if ((ast.st_size = read(afd, args, ast.st_size)) < 0)
|
||||
fatalerr("failed to read %s\n", argv[1]+1);
|
||||
args[ast.st_size] = '\0';
|
||||
close(afd);
|
||||
for (p = args; *p; p++) {
|
||||
if (quotechar) {
|
||||
if (quotechar == '\\' ||
|
||||
(*p == quotechar && p[-1] != '\\'))
|
||||
quotechar = '\0';
|
||||
continue;
|
||||
}
|
||||
switch (*p) {
|
||||
case '\\':
|
||||
case '"':
|
||||
case '\'':
|
||||
quotechar = *p;
|
||||
break;
|
||||
case ' ':
|
||||
case '\n':
|
||||
*p = '\0';
|
||||
if (p > args && p[-1])
|
||||
nargc++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (p[-1])
|
||||
nargc++;
|
||||
nargv = (char **)malloc(nargc * sizeof(char *));
|
||||
nargv[0] = argv[0];
|
||||
argc = 1;
|
||||
for (p = args; argc < nargc; p += strlen(p) + 1)
|
||||
if (*p) nargv[argc++] = p;
|
||||
argv = nargv;
|
||||
}
|
||||
for(argc--, argv++; argc; argc--, argv++) {
|
||||
/* if looking for endmarker then check before parsing */
|
||||
if (endmarker && strcmp (endmarker, *argv) == 0) {
|
||||
endmarker = NULL;
|
||||
continue;
|
||||
}
|
||||
if (**argv != '-') {
|
||||
/* treat +thing as an option for C++ */
|
||||
if (endmarker && **argv == '+')
|
||||
continue;
|
||||
*fp++ = argv[0];
|
||||
continue;
|
||||
}
|
||||
switch(argv[0][1]) {
|
||||
case '-':
|
||||
endmarker = &argv[0][2];
|
||||
if (endmarker[0] == '\0') endmarker = "--";
|
||||
break;
|
||||
case 'D':
|
||||
if (argv[0][2] == '\0') {
|
||||
argv++;
|
||||
argc--;
|
||||
}
|
||||
for (p=argv[0] + 2; *p ; p++)
|
||||
if (*p == '=') {
|
||||
*p = ' ';
|
||||
break;
|
||||
}
|
||||
define(argv[0] + 2, &maininclist);
|
||||
break;
|
||||
case 'I':
|
||||
if (incp >= includedirs + MAXDIRS)
|
||||
fatalerr("Too many -I flags.\n");
|
||||
*incp++ = argv[0]+2;
|
||||
if (**(incp-1) == '\0') {
|
||||
*(incp-1) = *(++argv);
|
||||
argc--;
|
||||
}
|
||||
break;
|
||||
case 'Y':
|
||||
defincdir = argv[0]+2;
|
||||
break;
|
||||
/* do not use if endmarker processing */
|
||||
case 'a':
|
||||
if (endmarker) break;
|
||||
append = TRUE;
|
||||
break;
|
||||
case 'w':
|
||||
if (endmarker) break;
|
||||
if (argv[0][2] == '\0') {
|
||||
argv++;
|
||||
argc--;
|
||||
width = atoi(argv[0]);
|
||||
} else
|
||||
width = atoi(argv[0]+2);
|
||||
break;
|
||||
case 'o':
|
||||
if (endmarker) break;
|
||||
if (argv[0][2] == '\0') {
|
||||
argv++;
|
||||
argc--;
|
||||
objsuffix = argv[0];
|
||||
} else
|
||||
objsuffix = argv[0]+2;
|
||||
break;
|
||||
case 'p':
|
||||
if (endmarker) break;
|
||||
if (argv[0][2] == '\0') {
|
||||
argv++;
|
||||
argc--;
|
||||
objprefix = argv[0];
|
||||
} else
|
||||
objprefix = argv[0]+2;
|
||||
break;
|
||||
case 'v':
|
||||
if (endmarker) break;
|
||||
verbose = TRUE;
|
||||
#ifdef DEBUG
|
||||
if (argv[0][2])
|
||||
_debugmask = atoi(argv[0]+2);
|
||||
#endif
|
||||
break;
|
||||
case 's':
|
||||
if (endmarker) break;
|
||||
startat = argv[0]+2;
|
||||
if (*startat == '\0') {
|
||||
startat = *(++argv);
|
||||
argc--;
|
||||
}
|
||||
if (*startat != '#')
|
||||
fatalerr("-s flag's value should start %s\n",
|
||||
"with '#'.");
|
||||
break;
|
||||
case 'f':
|
||||
if (endmarker) break;
|
||||
makefile = argv[0]+2;
|
||||
if (*makefile == '\0') {
|
||||
makefile = *(++argv);
|
||||
argc--;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
warn_multiple = TRUE;
|
||||
break;
|
||||
|
||||
/* Ignore -O, -g so we can just pass ${CFLAGS} to
|
||||
makedepend
|
||||
*/
|
||||
case 'O':
|
||||
case 'g':
|
||||
break;
|
||||
default:
|
||||
if (endmarker) break;
|
||||
/* fatalerr("unknown opt = %s\n", argv[0]); */
|
||||
warning("ignoring option %s\n", argv[0]);
|
||||
}
|
||||
}
|
||||
if (!defincdir) {
|
||||
#ifdef PREINCDIR
|
||||
if (incp >= includedirs + MAXDIRS)
|
||||
fatalerr("Too many -I flags.\n");
|
||||
*incp++ = PREINCDIR;
|
||||
#endif
|
||||
if (incp >= includedirs + MAXDIRS)
|
||||
fatalerr("Too many -I flags.\n");
|
||||
*incp++ = INCLUDEDIR;
|
||||
#ifdef POSTINCDIR
|
||||
if (incp >= includedirs + MAXDIRS)
|
||||
fatalerr("Too many -I flags.\n");
|
||||
*incp++ = POSTINCDIR;
|
||||
#endif
|
||||
} else if (*defincdir) {
|
||||
if (incp >= includedirs + MAXDIRS)
|
||||
fatalerr("Too many -I flags.\n");
|
||||
*incp++ = defincdir;
|
||||
}
|
||||
|
||||
redirect(startat, makefile);
|
||||
|
||||
/*
|
||||
* catch signals.
|
||||
*/
|
||||
#ifdef USGISH
|
||||
/* should really reset SIGINT to SIG_IGN if it was. */
|
||||
#ifdef SIGHUP
|
||||
signal (SIGHUP, catch);
|
||||
#endif
|
||||
signal (SIGINT, catch);
|
||||
#ifdef SIGQUIT
|
||||
signal (SIGQUIT, catch);
|
||||
#endif
|
||||
signal (SIGILL, catch);
|
||||
#ifdef SIGBUS
|
||||
signal (SIGBUS, catch);
|
||||
#endif
|
||||
signal (SIGSEGV, catch);
|
||||
#ifdef SIGSYS
|
||||
signal (SIGSYS, catch);
|
||||
#endif
|
||||
#else
|
||||
sig_act.sa_handler = catch;
|
||||
#ifdef _POSIX_SOURCE
|
||||
sigemptyset(&sig_act.sa_mask);
|
||||
sigaddset(&sig_act.sa_mask, SIGINT);
|
||||
sigaddset(&sig_act.sa_mask, SIGQUIT);
|
||||
#ifdef SIGBUS
|
||||
sigaddset(&sig_act.sa_mask, SIGBUS);
|
||||
#endif
|
||||
sigaddset(&sig_act.sa_mask, SIGILL);
|
||||
sigaddset(&sig_act.sa_mask, SIGSEGV);
|
||||
sigaddset(&sig_act.sa_mask, SIGHUP);
|
||||
sigaddset(&sig_act.sa_mask, SIGPIPE);
|
||||
#ifdef SIGSYS
|
||||
sigaddset(&sig_act.sa_mask, SIGSYS);
|
||||
#endif
|
||||
#else
|
||||
sig_act.sa_mask = ((1<<(SIGINT -1))
|
||||
|(1<<(SIGQUIT-1))
|
||||
#ifdef SIGBUS
|
||||
|(1<<(SIGBUS-1))
|
||||
#endif
|
||||
|(1<<(SIGILL-1))
|
||||
|(1<<(SIGSEGV-1))
|
||||
|(1<<(SIGHUP-1))
|
||||
|(1<<(SIGPIPE-1))
|
||||
#ifdef SIGSYS
|
||||
|(1<<(SIGSYS-1))
|
||||
#endif
|
||||
);
|
||||
#endif /* _POSIX_SOURCE */
|
||||
sig_act.sa_flags = 0;
|
||||
sigaction(SIGHUP, &sig_act, (struct sigaction *)0);
|
||||
sigaction(SIGINT, &sig_act, (struct sigaction *)0);
|
||||
sigaction(SIGQUIT, &sig_act, (struct sigaction *)0);
|
||||
sigaction(SIGILL, &sig_act, (struct sigaction *)0);
|
||||
#ifdef SIGBUS
|
||||
sigaction(SIGBUS, &sig_act, (struct sigaction *)0);
|
||||
#endif
|
||||
sigaction(SIGSEGV, &sig_act, (struct sigaction *)0);
|
||||
#ifdef SIGSYS
|
||||
sigaction(SIGSYS, &sig_act, (struct sigaction *)0);
|
||||
#endif
|
||||
#endif /* USGISH */
|
||||
|
||||
/*
|
||||
* now peruse through the list of files.
|
||||
*/
|
||||
for(fp=filelist; *fp; fp++) {
|
||||
filecontent = getfile(*fp);
|
||||
ip = newinclude(*fp, (char *)NULL);
|
||||
|
||||
find_includes(filecontent, ip, ip, 0, FALSE);
|
||||
freefile(filecontent);
|
||||
recursive_pr_include(ip, ip->i_file, base_name(*fp));
|
||||
inc_clean();
|
||||
}
|
||||
if (printed)
|
||||
printf("\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
struct filepointer *getfile(file)
|
||||
char *file;
|
||||
{
|
||||
register int fd;
|
||||
struct filepointer *content;
|
||||
struct stat st;
|
||||
|
||||
content = (struct filepointer *)malloc(sizeof(struct filepointer));
|
||||
if ((fd = open(file, O_RDONLY)) < 0) {
|
||||
warning("cannot open \"%s\"\n", file);
|
||||
content->f_p = content->f_base = content->f_end = (char *)malloc(1);
|
||||
*content->f_p = '\0';
|
||||
return(content);
|
||||
}
|
||||
fstat(fd, &st);
|
||||
content->f_base = (char *)malloc(st.st_size+1);
|
||||
if (content->f_base == NULL)
|
||||
fatalerr("cannot allocate mem\n");
|
||||
if ((st.st_size = read(fd, content->f_base, st.st_size)) < 0)
|
||||
fatalerr("failed to read %s\n", file);
|
||||
close(fd);
|
||||
content->f_len = st.st_size+1;
|
||||
content->f_p = content->f_base;
|
||||
content->f_end = content->f_base + st.st_size;
|
||||
*content->f_end = '\0';
|
||||
content->f_line = 0;
|
||||
return(content);
|
||||
}
|
||||
|
||||
freefile(fp)
|
||||
struct filepointer *fp;
|
||||
{
|
||||
free(fp->f_base);
|
||||
free(fp);
|
||||
}
|
||||
|
||||
char *copy(str)
|
||||
register char *str;
|
||||
{
|
||||
register char *p = (char *)malloc(strlen(str) + 1);
|
||||
|
||||
strcpy(p, str);
|
||||
return(p);
|
||||
}
|
||||
|
||||
match(str, list)
|
||||
register char *str, **list;
|
||||
{
|
||||
register int i;
|
||||
|
||||
for (i=0; *list; i++, list++)
|
||||
if (strcmp(str, *list) == 0)
|
||||
return(i);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the next line. We only return lines beginning with '#' since that
|
||||
* is all this program is ever interested in.
|
||||
*/
|
||||
char *getline(filep)
|
||||
register struct filepointer *filep;
|
||||
{
|
||||
register char *p, /* walking pointer */
|
||||
*eof, /* end of file pointer */
|
||||
*bol; /* beginning of line pointer */
|
||||
register lineno; /* line number */
|
||||
|
||||
p = filep->f_p;
|
||||
eof = filep->f_end;
|
||||
if (p >= eof)
|
||||
return((char *)NULL);
|
||||
lineno = filep->f_line;
|
||||
|
||||
for(bol = p--; ++p < eof; ) {
|
||||
if (*p == '/' && *(p+1) == '*') { /* consume comments */
|
||||
*p++ = ' ', *p++ = ' ';
|
||||
while (*p) {
|
||||
if (*p == '*' && *(p+1) == '/') {
|
||||
*p++ = ' ', *p = ' ';
|
||||
break;
|
||||
}
|
||||
else if (*p == '\n')
|
||||
lineno++;
|
||||
*p++ = ' ';
|
||||
}
|
||||
continue;
|
||||
}
|
||||
#ifdef WIN32
|
||||
else if (*p == '/' && *(p+1) == '/') { /* consume comments */
|
||||
*p++ = ' ', *p++ = ' ';
|
||||
while (*p && *p != '\n')
|
||||
*p++ = ' ';
|
||||
lineno++;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
else if (*p == '\\') {
|
||||
if (*(p+1) == '\n') {
|
||||
*p = ' ';
|
||||
*(p+1) = ' ';
|
||||
lineno++;
|
||||
}
|
||||
}
|
||||
else if (*p == '\n') {
|
||||
lineno++;
|
||||
if (*bol == '#') {
|
||||
register char *cp;
|
||||
|
||||
*p++ = '\0';
|
||||
/* punt lines with just # (yacc generated) */
|
||||
for (cp = bol+1;
|
||||
*cp && (*cp == ' ' || *cp == '\t'); cp++);
|
||||
if (*cp) goto done;
|
||||
}
|
||||
bol = p+1;
|
||||
}
|
||||
}
|
||||
if (*bol != '#')
|
||||
bol = NULL;
|
||||
done:
|
||||
filep->f_p = p;
|
||||
filep->f_line = lineno;
|
||||
return(bol);
|
||||
}
|
||||
|
||||
/*
|
||||
* Strip the file name down to what we want to see in the Makefile.
|
||||
* It will have objprefix and objsuffix around it.
|
||||
*/
|
||||
char *base_name(file)
|
||||
register char *file;
|
||||
{
|
||||
register char *p;
|
||||
|
||||
file = copy(file);
|
||||
for(p=file+strlen(file); p>file && *p != '.'; p--) ;
|
||||
|
||||
if (*p == '.')
|
||||
*p = '\0';
|
||||
return(file);
|
||||
}
|
||||
|
||||
#if defined(USG) && !defined(CRAY) && !defined(SVR4) && !defined(__EMX__)
|
||||
int rename (from, to)
|
||||
char *from, *to;
|
||||
{
|
||||
(void) unlink (to);
|
||||
if (link (from, to) == 0) {
|
||||
unlink (from);
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif /* USGISH */
|
||||
|
||||
redirect(line, makefile)
|
||||
char *line,
|
||||
*makefile;
|
||||
{
|
||||
struct stat st;
|
||||
FILE *fdin, *fdout;
|
||||
char backup[ BUFSIZ ],
|
||||
buf[ BUFSIZ ];
|
||||
boolean found = FALSE;
|
||||
int len;
|
||||
|
||||
/*
|
||||
* if makefile is "-" then let it pour onto stdout.
|
||||
*/
|
||||
if (makefile && *makefile == '-' && *(makefile+1) == '\0')
|
||||
return;
|
||||
|
||||
/*
|
||||
* use a default makefile is not specified.
|
||||
*/
|
||||
if (!makefile) {
|
||||
if (stat("Makefile", &st) == 0)
|
||||
makefile = "Makefile";
|
||||
else if (stat("makefile", &st) == 0)
|
||||
makefile = "makefile";
|
||||
else
|
||||
fatalerr("[mM]akefile is not present\n");
|
||||
}
|
||||
else
|
||||
stat(makefile, &st);
|
||||
if ((fdin = fopen(makefile, "r")) == NULL)
|
||||
fatalerr("cannot open \"%s\"\n", makefile);
|
||||
sprintf(backup, "%s.bak", makefile);
|
||||
unlink(backup);
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
fclose(fdin);
|
||||
#endif
|
||||
if (rename(makefile, backup) < 0)
|
||||
fatalerr("cannot rename %s to %s\n", makefile, backup);
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
if ((fdin = fopen(backup, "r")) == NULL)
|
||||
fatalerr("cannot open \"%s\"\n", backup);
|
||||
#endif
|
||||
if ((fdout = freopen(makefile, "w", stdout)) == NULL)
|
||||
fatalerr("cannot open \"%s\"\n", backup);
|
||||
len = strlen(line);
|
||||
while (!found && fgets(buf, BUFSIZ, fdin)) {
|
||||
if (*buf == '#' && strncmp(line, buf, len) == 0)
|
||||
found = TRUE;
|
||||
fputs(buf, fdout);
|
||||
}
|
||||
if (!found) {
|
||||
if (verbose)
|
||||
warning("Adding new delimiting line \"%s\" and dependencies...\n",
|
||||
line);
|
||||
puts(line); /* same as fputs(fdout); but with newline */
|
||||
} else if (append) {
|
||||
while (fgets(buf, BUFSIZ, fdin)) {
|
||||
fputs(buf, fdout);
|
||||
}
|
||||
}
|
||||
fflush(fdout);
|
||||
#if defined(USGISH) || defined(_SEQUENT_) || defined(USE_CHMOD)
|
||||
chmod(makefile, st.st_mode);
|
||||
#else
|
||||
fchmod(fileno(fdout), st.st_mode);
|
||||
#endif /* USGISH */
|
||||
}
|
||||
|
||||
#if NeedVarargsPrototypes
|
||||
fatalerr(char *msg, ...)
|
||||
#else
|
||||
/*VARARGS*/
|
||||
fatalerr(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
|
||||
char *msg;
|
||||
#endif
|
||||
{
|
||||
#if NeedVarargsPrototypes
|
||||
va_list args;
|
||||
#endif
|
||||
fprintf(stderr, "%s: error: ", ProgramName);
|
||||
#if NeedVarargsPrototypes
|
||||
va_start(args, msg);
|
||||
vfprintf(stderr, msg, args);
|
||||
va_end(args);
|
||||
#else
|
||||
fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
|
||||
#endif
|
||||
exit (1);
|
||||
}
|
||||
|
||||
#if NeedVarargsPrototypes
|
||||
warning(char *msg, ...)
|
||||
#else
|
||||
/*VARARGS0*/
|
||||
warning(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
|
||||
char *msg;
|
||||
#endif
|
||||
{
|
||||
#if NeedVarargsPrototypes
|
||||
va_list args;
|
||||
#endif
|
||||
fprintf(stderr, "%s: warning: ", ProgramName);
|
||||
#if NeedVarargsPrototypes
|
||||
va_start(args, msg);
|
||||
vfprintf(stderr, msg, args);
|
||||
va_end(args);
|
||||
#else
|
||||
fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NeedVarargsPrototypes
|
||||
warning1(char *msg, ...)
|
||||
#else
|
||||
/*VARARGS0*/
|
||||
warning1(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
|
||||
char *msg;
|
||||
#endif
|
||||
{
|
||||
#if NeedVarargsPrototypes
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
vfprintf(stderr, msg, args);
|
||||
va_end(args);
|
||||
#else
|
||||
fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
CORE_DEPTH = ../..
|
||||
|
||||
MODULE = coreconf
|
||||
|
||||
CSRCS = cppsetup.c \
|
||||
ifparser.c \
|
||||
include.c \
|
||||
main.c \
|
||||
parse.c \
|
||||
pr.c \
|
||||
$(NULL)
|
||||
|
||||
PROGRAM = mkdepend
|
|
@ -0,0 +1,368 @@
|
|||
.\" $XConsortium: mkdepend.man,v 1.15 94/04/17 20:10:37 gildea Exp $
|
||||
.\" Copyright (c) 1993, 1994 X Consortium
|
||||
.\"
|
||||
.\" Permission is hereby granted, free of charge, to any person obtaining a
|
||||
.\" copy of this software and associated documentation files (the "Software"),
|
||||
.\" to deal in the Software without restriction, including without limitation
|
||||
.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
.\" and/or sell copies of the Software, and to permit persons to whom the
|
||||
.\" Software furnished to do so, subject to the following conditions:
|
||||
.\"
|
||||
.\" The above copyright notice and this permission notice shall be included in
|
||||
.\" all copies or substantial portions of the Software.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
.\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
.\" SOFTWARE.
|
||||
.\"
|
||||
.\" Except as contained in this notice, the name of the X Consortium shall not
|
||||
.\" be used in advertising or otherwise to promote the sale, use or other
|
||||
.\" dealing in this Software without prior written authorization from the
|
||||
.\" X Consortium.
|
||||
.TH MAKEDEPEND 1 "Release 6" "X Version 11"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
makedepend \- create dependencies in makefiles
|
||||
.SH SYNOPSIS
|
||||
.B makedepend
|
||||
[
|
||||
.B \-Dname=def
|
||||
] [
|
||||
.B \-Dname
|
||||
] [
|
||||
.B \-Iincludedir
|
||||
] [
|
||||
.B \-Yincludedir
|
||||
] [
|
||||
.B \-a
|
||||
] [
|
||||
.B \-fmakefile
|
||||
] [
|
||||
.B \-oobjsuffix
|
||||
] [
|
||||
.B \-pobjprefix
|
||||
] [
|
||||
.B \-sstring
|
||||
] [
|
||||
.B \-wwidth
|
||||
] [
|
||||
.B \-v
|
||||
] [
|
||||
.B \-m
|
||||
] [
|
||||
\-\^\-
|
||||
.B otheroptions
|
||||
\-\^\-
|
||||
]
|
||||
sourcefile .\|.\|.
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.B Makedepend
|
||||
reads each
|
||||
.I sourcefile
|
||||
in sequence and parses it like a C-preprocessor,
|
||||
processing all
|
||||
.I #include,
|
||||
.I #define,
|
||||
.I #undef,
|
||||
.I #ifdef,
|
||||
.I #ifndef,
|
||||
.I #endif,
|
||||
.I #if
|
||||
and
|
||||
.I #else
|
||||
directives so that it can correctly tell which
|
||||
.I #include,
|
||||
directives would be used in a compilation.
|
||||
Any
|
||||
.I #include,
|
||||
directives can reference files having other
|
||||
.I #include
|
||||
directives, and parsing will occur in these files as well.
|
||||
.PP
|
||||
Every file that a
|
||||
.I sourcefile
|
||||
includes,
|
||||
directly or indirectly,
|
||||
is what
|
||||
.B makedepend
|
||||
calls a "dependency".
|
||||
These dependencies are then written to a
|
||||
.I makefile
|
||||
in such a way that
|
||||
.B make(1)
|
||||
will know which object files must be recompiled when a dependency has changed.
|
||||
.PP
|
||||
By default,
|
||||
.B makedepend
|
||||
places its output in the file named
|
||||
.I makefile
|
||||
if it exists, otherwise
|
||||
.I Makefile.
|
||||
An alternate makefile may be specified with the
|
||||
.B \-f
|
||||
option.
|
||||
It first searches the makefile for
|
||||
the line
|
||||
.sp
|
||||
# DO NOT DELETE THIS LINE \-\^\- make depend depends on it.
|
||||
.sp
|
||||
or one provided with the
|
||||
.B \-s
|
||||
option,
|
||||
as a delimiter for the dependency output.
|
||||
If it finds it, it will delete everything
|
||||
following this to the end of the makefile
|
||||
and put the output after this line.
|
||||
If it doesn't find it, the program
|
||||
will append the string to the end of the makefile
|
||||
and place the output following that.
|
||||
For each
|
||||
.I sourcefile
|
||||
appearing on the command line,
|
||||
.B makedepend
|
||||
puts lines in the makefile of the form
|
||||
.sp
|
||||
sourcefile.o:\0dfile .\|.\|.
|
||||
.sp
|
||||
Where "sourcefile.o" is the name from the command
|
||||
line with its suffix replaced with ".o",
|
||||
and "dfile" is a dependency discovered in a
|
||||
.I #include
|
||||
directive while parsing
|
||||
.I sourcefile
|
||||
or one of the files it included.
|
||||
.SH EXAMPLE
|
||||
Normally,
|
||||
.B makedepend
|
||||
will be used in a makefile target so that typing "make depend" will
|
||||
bring the dependencies up to date for the makefile.
|
||||
For example,
|
||||
.nf
|
||||
SRCS\0=\0file1.c\0file2.c\0.\|.\|.
|
||||
CFLAGS\0=\0\-O\0\-DHACK\0\-I\^.\^.\^/foobar\0\-xyz
|
||||
depend:
|
||||
makedepend\0\-\^\-\0$(CFLAGS)\0\-\^\-\0$(SRCS)
|
||||
.fi
|
||||
.SH OPTIONS
|
||||
.B Makedepend
|
||||
will ignore any option that it does not understand so that you may use
|
||||
the same arguments that you would for
|
||||
.B cc(1).
|
||||
.TP 5
|
||||
.B \-Dname=def or \-Dname
|
||||
Define.
|
||||
This places a definition for
|
||||
.I name
|
||||
in
|
||||
.B makedepend's
|
||||
symbol table.
|
||||
Without
|
||||
.I =def
|
||||
the symbol becomes defined as "1".
|
||||
.TP 5
|
||||
.B \-Iincludedir
|
||||
Include directory.
|
||||
This option tells
|
||||
.B makedepend
|
||||
to prepend
|
||||
.I includedir
|
||||
to its list of directories to search when it encounters
|
||||
a
|
||||
.I #include
|
||||
directive.
|
||||
By default,
|
||||
.B makedepend
|
||||
only searches the standard include directories (usually /usr/include
|
||||
and possibly a compiler-dependent directory).
|
||||
.TP 5
|
||||
.B \-Yincludedir
|
||||
Replace all of the standard include directories with the single specified
|
||||
include directory; you can omit the
|
||||
.I includedir
|
||||
to simply prevent searching the standard include directories.
|
||||
.TP 5
|
||||
.B \-a
|
||||
Append the dependencies to the end of the file instead of replacing them.
|
||||
.TP 5
|
||||
.B \-fmakefile
|
||||
Filename.
|
||||
This allows you to specify an alternate makefile in which
|
||||
.B makedepend
|
||||
can place its output.
|
||||
.TP 5
|
||||
.B \-oobjsuffix
|
||||
Object file suffix.
|
||||
Some systems may have object files whose suffix is something other
|
||||
than ".o".
|
||||
This option allows you to specify another suffix, such as
|
||||
".b" with
|
||||
.I -o.b
|
||||
or ":obj"
|
||||
with
|
||||
.I -o:obj
|
||||
and so forth.
|
||||
.TP 5
|
||||
.B \-pobjprefix
|
||||
Object file prefix.
|
||||
The prefix is prepended to the name of the object file. This is
|
||||
usually used to designate a different directory for the object file.
|
||||
The default is the empty string.
|
||||
.TP 5
|
||||
.B \-sstring
|
||||
Starting string delimiter.
|
||||
This option permits you to specify
|
||||
a different string for
|
||||
.B makedepend
|
||||
to look for in the makefile.
|
||||
.TP 5
|
||||
.B \-wwidth
|
||||
Line width.
|
||||
Normally,
|
||||
.B makedepend
|
||||
will ensure that every output line that it writes will be no wider than
|
||||
78 characters for the sake of readability.
|
||||
This option enables you to change this width.
|
||||
.TP 5
|
||||
.B \-v
|
||||
Verbose operation.
|
||||
This option causes
|
||||
.B makedepend
|
||||
to emit the list of files included by each input file on standard output.
|
||||
.TP 5
|
||||
.B \-m
|
||||
Warn about multiple inclusion.
|
||||
This option causes
|
||||
.B makedepend
|
||||
to produce a warning if any input file includes another file more than
|
||||
once. In previous versions of
|
||||
.B makedepend
|
||||
this was the default behavior; the default has been changed to better
|
||||
match the behavior of the C compiler, which does not consider multiple
|
||||
inclusion to be an error. This option is provided for backward
|
||||
compatibility, and to aid in debugging problems related to multiple
|
||||
inclusion.
|
||||
.TP 5
|
||||
.B "\-\^\- options \-\^\-"
|
||||
If
|
||||
.B makedepend
|
||||
encounters a double hyphen (\-\^\-) in the argument list,
|
||||
then any unrecognized argument following it
|
||||
will be silently ignored; a second double hyphen terminates this
|
||||
special treatment.
|
||||
In this way,
|
||||
.B makedepend
|
||||
can be made to safely ignore esoteric compiler arguments that might
|
||||
normally be found in a CFLAGS
|
||||
.B make
|
||||
macro (see the
|
||||
.B EXAMPLE
|
||||
section above).
|
||||
All options that
|
||||
.B makedepend
|
||||
recognizes and appear between the pair of double hyphens
|
||||
are processed normally.
|
||||
.SH ALGORITHM
|
||||
The approach used in this program enables it to run an order of magnitude
|
||||
faster than any other "dependency generator" I have ever seen.
|
||||
Central to this performance are two assumptions:
|
||||
that all files compiled by a single
|
||||
makefile will be compiled with roughly the same
|
||||
.I -I
|
||||
and
|
||||
.I -D
|
||||
options;
|
||||
and that most files in a single directory will include largely the
|
||||
same files.
|
||||
.PP
|
||||
Given these assumptions,
|
||||
.B makedepend
|
||||
expects to be called once for each makefile, with
|
||||
all source files that are maintained by the
|
||||
makefile appearing on the command line.
|
||||
It parses each source and include
|
||||
file exactly once, maintaining an internal symbol table
|
||||
for each.
|
||||
Thus, the first file on the command line will take an amount of time
|
||||
proportional to the amount of time that a normal C preprocessor takes.
|
||||
But on subsequent files, if it encounter's an include file
|
||||
that it has already parsed, it does not parse it again.
|
||||
.PP
|
||||
For example,
|
||||
imagine you are compiling two files,
|
||||
.I file1.c
|
||||
and
|
||||
.I file2.c,
|
||||
they each include the header file
|
||||
.I header.h,
|
||||
and the file
|
||||
.I header.h
|
||||
in turn includes the files
|
||||
.I def1.h
|
||||
and
|
||||
.I def2.h.
|
||||
When you run the command
|
||||
.sp
|
||||
makedepend\0file1.c\0file2.c
|
||||
.sp
|
||||
.B makedepend
|
||||
will parse
|
||||
.I file1.c
|
||||
and consequently,
|
||||
.I header.h
|
||||
and then
|
||||
.I def1.h
|
||||
and
|
||||
.I def2.h.
|
||||
It then decides that the dependencies for this file are
|
||||
.sp
|
||||
file1.o:\0header.h\0def1.h\0def2.h
|
||||
.sp
|
||||
But when the program parses
|
||||
.I file2.c
|
||||
and discovers that it, too, includes
|
||||
.I header.h,
|
||||
it does not parse the file,
|
||||
but simply adds
|
||||
.I header.h,
|
||||
.I def1.h
|
||||
and
|
||||
.I def2.h
|
||||
to the list of dependencies for
|
||||
.I file2.o.
|
||||
.SH "SEE ALSO"
|
||||
cc(1), make(1)
|
||||
.SH BUGS
|
||||
.B makedepend
|
||||
parses, but does not currently evaluate, the SVR4
|
||||
#predicate(token-list) preprocessor expression;
|
||||
such expressions are simply assumed to be true.
|
||||
This may cause the wrong
|
||||
.I #include
|
||||
directives to be evaluated.
|
||||
.PP
|
||||
Imagine you are parsing two files,
|
||||
say
|
||||
.I file1.c
|
||||
and
|
||||
.I file2.c,
|
||||
each includes the file
|
||||
.I def.h.
|
||||
The list of files that
|
||||
.I def.h
|
||||
includes might truly be different when
|
||||
.I def.h
|
||||
is included by
|
||||
.I file1.c
|
||||
than when it is included by
|
||||
.I file2.c.
|
||||
But once
|
||||
.B makedepend
|
||||
arrives at a list of dependencies for a file,
|
||||
it is cast in concrete.
|
||||
.SH AUTHOR
|
||||
Todd Brunhoff, Tektronix, Inc. and MIT Project Athena
|
|
@ -0,0 +1,567 @@
|
|||
/* $XConsortium: parse.c,v 1.30 94/04/17 20:10:38 gildea Exp $ */
|
||||
/*
|
||||
|
||||
Copyright (c) 1993, 1994 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
#include "def.h"
|
||||
|
||||
extern char *directives[];
|
||||
extern struct inclist maininclist;
|
||||
|
||||
find_includes(filep, file, file_red, recursion, failOK)
|
||||
struct filepointer *filep;
|
||||
struct inclist *file, *file_red;
|
||||
int recursion;
|
||||
boolean failOK;
|
||||
{
|
||||
register char *line;
|
||||
register int type;
|
||||
boolean recfailOK;
|
||||
|
||||
while (line = getline(filep)) {
|
||||
switch(type = deftype(line, filep, file_red, file, TRUE)) {
|
||||
case IF:
|
||||
doif:
|
||||
type = find_includes(filep, file,
|
||||
file_red, recursion+1, failOK);
|
||||
while ((type == ELIF) || (type == ELIFFALSE) ||
|
||||
(type == ELIFGUESSFALSE))
|
||||
type = gobble(filep, file, file_red);
|
||||
if (type == ELSE)
|
||||
gobble(filep, file, file_red);
|
||||
break;
|
||||
case IFFALSE:
|
||||
case IFGUESSFALSE:
|
||||
doiffalse:
|
||||
if (type == IFGUESSFALSE || type == ELIFGUESSFALSE)
|
||||
recfailOK = TRUE;
|
||||
else
|
||||
recfailOK = failOK;
|
||||
type = gobble(filep, file, file_red);
|
||||
if (type == ELSE)
|
||||
find_includes(filep, file,
|
||||
file_red, recursion+1, recfailOK);
|
||||
else
|
||||
if (type == ELIF)
|
||||
goto doif;
|
||||
else
|
||||
if ((type == ELIFFALSE) || (type == ELIFGUESSFALSE))
|
||||
goto doiffalse;
|
||||
break;
|
||||
case IFDEF:
|
||||
case IFNDEF:
|
||||
if ((type == IFDEF && isdefined(line, file_red, NULL))
|
||||
|| (type == IFNDEF && !isdefined(line, file_red, NULL))) {
|
||||
debug(1,(type == IFNDEF ?
|
||||
"line %d: %s !def'd in %s via %s%s\n" : "",
|
||||
filep->f_line, line,
|
||||
file->i_file, file_red->i_file, ": doit"));
|
||||
type = find_includes(filep, file,
|
||||
file_red, recursion+1, failOK);
|
||||
while (type == ELIF || type == ELIFFALSE || type == ELIFGUESSFALSE)
|
||||
type = gobble(filep, file, file_red);
|
||||
if (type == ELSE)
|
||||
gobble(filep, file, file_red);
|
||||
}
|
||||
else {
|
||||
debug(1,(type == IFDEF ?
|
||||
"line %d: %s !def'd in %s via %s%s\n" : "",
|
||||
filep->f_line, line,
|
||||
file->i_file, file_red->i_file, ": gobble"));
|
||||
type = gobble(filep, file, file_red);
|
||||
if (type == ELSE)
|
||||
find_includes(filep, file,
|
||||
file_red, recursion+1, failOK);
|
||||
else if (type == ELIF)
|
||||
goto doif;
|
||||
else if (type == ELIFFALSE || type == ELIFGUESSFALSE)
|
||||
goto doiffalse;
|
||||
}
|
||||
break;
|
||||
case ELSE:
|
||||
case ELIFFALSE:
|
||||
case ELIFGUESSFALSE:
|
||||
case ELIF:
|
||||
if (!recursion)
|
||||
gobble(filep, file, file_red);
|
||||
case ENDIF:
|
||||
if (recursion)
|
||||
return(type);
|
||||
case DEFINE:
|
||||
define(line, file);
|
||||
break;
|
||||
case UNDEF:
|
||||
if (!*line) {
|
||||
warning("%s, line %d: incomplete undef == \"%s\"\n",
|
||||
file_red->i_file, filep->f_line, line);
|
||||
break;
|
||||
}
|
||||
undefine(line, file_red);
|
||||
break;
|
||||
case INCLUDE:
|
||||
add_include(filep, file, file_red, line, FALSE, failOK);
|
||||
break;
|
||||
case INCLUDEDOT:
|
||||
add_include(filep, file, file_red, line, TRUE, failOK);
|
||||
break;
|
||||
case ERROR:
|
||||
warning("%s: %d: %s\n", file_red->i_file,
|
||||
filep->f_line, line);
|
||||
break;
|
||||
|
||||
case PRAGMA:
|
||||
case IDENT:
|
||||
case SCCS:
|
||||
case EJECT:
|
||||
break;
|
||||
case -1:
|
||||
warning("%s", file_red->i_file);
|
||||
if (file_red != file)
|
||||
warning1(" (reading %s)", file->i_file);
|
||||
warning1(", line %d: unknown directive == \"%s\"\n",
|
||||
filep->f_line, line);
|
||||
break;
|
||||
case -2:
|
||||
warning("%s", file_red->i_file);
|
||||
if (file_red != file)
|
||||
warning1(" (reading %s)", file->i_file);
|
||||
warning1(", line %d: incomplete include == \"%s\"\n",
|
||||
filep->f_line, line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
gobble(filep, file, file_red)
|
||||
register struct filepointer *filep;
|
||||
struct inclist *file, *file_red;
|
||||
{
|
||||
register char *line;
|
||||
register int type;
|
||||
|
||||
while (line = getline(filep)) {
|
||||
switch(type = deftype(line, filep, file_red, file, FALSE)) {
|
||||
case IF:
|
||||
case IFFALSE:
|
||||
case IFGUESSFALSE:
|
||||
case IFDEF:
|
||||
case IFNDEF:
|
||||
type = gobble(filep, file, file_red);
|
||||
while ((type == ELIF) || (type == ELIFFALSE) ||
|
||||
(type == ELIFGUESSFALSE))
|
||||
type = gobble(filep, file, file_red);
|
||||
if (type == ELSE)
|
||||
(void)gobble(filep, file, file_red);
|
||||
break;
|
||||
case ELSE:
|
||||
case ENDIF:
|
||||
debug(0,("%s, line %d: #%s\n",
|
||||
file->i_file, filep->f_line,
|
||||
directives[type]));
|
||||
return(type);
|
||||
case DEFINE:
|
||||
case UNDEF:
|
||||
case INCLUDE:
|
||||
case INCLUDEDOT:
|
||||
case PRAGMA:
|
||||
case ERROR:
|
||||
case IDENT:
|
||||
case SCCS:
|
||||
case EJECT:
|
||||
break;
|
||||
case ELIF:
|
||||
case ELIFFALSE:
|
||||
case ELIFGUESSFALSE:
|
||||
return(type);
|
||||
case -1:
|
||||
warning("%s, line %d: unknown directive == \"%s\"\n",
|
||||
file_red->i_file, filep->f_line, line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Decide what type of # directive this line is.
|
||||
*/
|
||||
int deftype (line, filep, file_red, file, parse_it)
|
||||
register char *line;
|
||||
register struct filepointer *filep;
|
||||
register struct inclist *file_red, *file;
|
||||
int parse_it;
|
||||
{
|
||||
register char *p;
|
||||
char *directive, savechar;
|
||||
register int ret;
|
||||
|
||||
/*
|
||||
* Parse the directive...
|
||||
*/
|
||||
directive=line+1;
|
||||
while (*directive == ' ' || *directive == '\t')
|
||||
directive++;
|
||||
|
||||
p = directive;
|
||||
while (*p >= 'a' && *p <= 'z')
|
||||
p++;
|
||||
savechar = *p;
|
||||
*p = '\0';
|
||||
ret = match(directive, directives);
|
||||
*p = savechar;
|
||||
|
||||
/* If we don't recognize this compiler directive or we happen to just
|
||||
* be gobbling up text while waiting for an #endif or #elif or #else
|
||||
* in the case of an #elif we must check the zero_value and return an
|
||||
* ELIF or an ELIFFALSE.
|
||||
*/
|
||||
|
||||
if (ret == ELIF && !parse_it)
|
||||
{
|
||||
while (*p == ' ' || *p == '\t')
|
||||
p++;
|
||||
/*
|
||||
* parse an expression.
|
||||
*/
|
||||
debug(0,("%s, line %d: #elif %s ",
|
||||
file->i_file, filep->f_line, p));
|
||||
ret = zero_value(p, filep, file_red);
|
||||
if (ret != IF)
|
||||
{
|
||||
debug(0,("false...\n"));
|
||||
if (ret == IFFALSE)
|
||||
return(ELIFFALSE);
|
||||
else
|
||||
return(ELIFGUESSFALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug(0,("true...\n"));
|
||||
return(ELIF);
|
||||
}
|
||||
}
|
||||
|
||||
if (ret < 0 || ! parse_it)
|
||||
return(ret);
|
||||
|
||||
/*
|
||||
* now decide how to parse the directive, and do it.
|
||||
*/
|
||||
while (*p == ' ' || *p == '\t')
|
||||
p++;
|
||||
switch (ret) {
|
||||
case IF:
|
||||
/*
|
||||
* parse an expression.
|
||||
*/
|
||||
ret = zero_value(p, filep, file_red);
|
||||
debug(0,("%s, line %d: %s #if %s\n",
|
||||
file->i_file, filep->f_line, ret?"false":"true", p));
|
||||
break;
|
||||
case IFDEF:
|
||||
case IFNDEF:
|
||||
debug(0,("%s, line %d: #%s %s\n",
|
||||
file->i_file, filep->f_line, directives[ret], p));
|
||||
case UNDEF:
|
||||
/*
|
||||
* separate the name of a single symbol.
|
||||
*/
|
||||
while (isalnum(*p) || *p == '_')
|
||||
*line++ = *p++;
|
||||
*line = '\0';
|
||||
break;
|
||||
case INCLUDE:
|
||||
debug(2,("%s, line %d: #include %s\n",
|
||||
file->i_file, filep->f_line, p));
|
||||
|
||||
/* Support ANSI macro substitution */
|
||||
{
|
||||
struct symtab *sym = isdefined(p, file_red, NULL);
|
||||
while (sym) {
|
||||
p = sym->s_value;
|
||||
debug(3,("%s : #includes SYMBOL %s = %s\n",
|
||||
file->i_incstring,
|
||||
sym -> s_name,
|
||||
sym -> s_value));
|
||||
/* mark file as having included a 'soft include' */
|
||||
file->i_included_sym = TRUE;
|
||||
sym = isdefined(p, file_red, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Separate the name of the include file.
|
||||
*/
|
||||
while (*p && *p != '"' && *p != '<')
|
||||
p++;
|
||||
if (! *p)
|
||||
return(-2);
|
||||
if (*p++ == '"') {
|
||||
ret = INCLUDEDOT;
|
||||
while (*p && *p != '"')
|
||||
*line++ = *p++;
|
||||
} else
|
||||
while (*p && *p != '>')
|
||||
*line++ = *p++;
|
||||
*line = '\0';
|
||||
break;
|
||||
case DEFINE:
|
||||
/*
|
||||
* copy the definition back to the beginning of the line.
|
||||
*/
|
||||
strcpy (line, p);
|
||||
break;
|
||||
case ELSE:
|
||||
case ENDIF:
|
||||
case ELIF:
|
||||
case PRAGMA:
|
||||
case ERROR:
|
||||
case IDENT:
|
||||
case SCCS:
|
||||
case EJECT:
|
||||
debug(0,("%s, line %d: #%s\n",
|
||||
file->i_file, filep->f_line, directives[ret]));
|
||||
/*
|
||||
* nothing to do.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
struct symtab *isdefined(symbol, file, srcfile)
|
||||
register char *symbol;
|
||||
struct inclist *file;
|
||||
struct inclist **srcfile;
|
||||
{
|
||||
register struct symtab *val;
|
||||
|
||||
if (val = slookup(symbol, &maininclist)) {
|
||||
debug(1,("%s defined on command line\n", symbol));
|
||||
if (srcfile != NULL) *srcfile = &maininclist;
|
||||
return(val);
|
||||
}
|
||||
if (val = fdefined(symbol, file, srcfile))
|
||||
return(val);
|
||||
debug(1,("%s not defined in %s\n", symbol, file->i_file));
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
struct symtab *fdefined(symbol, file, srcfile)
|
||||
register char *symbol;
|
||||
struct inclist *file;
|
||||
struct inclist **srcfile;
|
||||
{
|
||||
register struct inclist **ip;
|
||||
register struct symtab *val;
|
||||
register int i;
|
||||
static int recurse_lvl = 0;
|
||||
|
||||
if (file->i_defchecked)
|
||||
return(NULL);
|
||||
file->i_defchecked = TRUE;
|
||||
if (val = slookup(symbol, file))
|
||||
debug(1,("%s defined in %s as %s\n", symbol, file->i_file, val->s_value));
|
||||
if (val == NULL && file->i_list)
|
||||
{
|
||||
for (ip = file->i_list, i=0; i < file->i_listlen; i++, ip++)
|
||||
if (val = fdefined(symbol, *ip, srcfile)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (val != NULL && srcfile != NULL) *srcfile = file;
|
||||
recurse_lvl--;
|
||||
file->i_defchecked = FALSE;
|
||||
|
||||
return(val);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return type based on if the #if expression evaluates to 0
|
||||
*/
|
||||
zero_value(exp, filep, file_red)
|
||||
register char *exp;
|
||||
register struct filepointer *filep;
|
||||
register struct inclist *file_red;
|
||||
{
|
||||
if (cppsetup(exp, filep, file_red))
|
||||
return(IFFALSE);
|
||||
else
|
||||
return(IF);
|
||||
}
|
||||
|
||||
define(def, file)
|
||||
char *def;
|
||||
struct inclist *file;
|
||||
{
|
||||
char *val;
|
||||
|
||||
/* Separate symbol name and its value */
|
||||
val = def;
|
||||
while (isalnum(*val) || *val == '_')
|
||||
val++;
|
||||
if (*val)
|
||||
*val++ = '\0';
|
||||
while (*val == ' ' || *val == '\t')
|
||||
val++;
|
||||
|
||||
if (!*val)
|
||||
val = "1";
|
||||
define2(def, val, file);
|
||||
}
|
||||
|
||||
define2(name, val, file)
|
||||
char *name, *val;
|
||||
struct inclist *file;
|
||||
{
|
||||
int first, last, below;
|
||||
register struct symtab *sp = NULL, *dest;
|
||||
|
||||
/* Make space if it's needed */
|
||||
if (file->i_defs == NULL)
|
||||
{
|
||||
file->i_defs = (struct symtab *)
|
||||
malloc(sizeof (struct symtab) * SYMTABINC);
|
||||
file->i_deflen = SYMTABINC;
|
||||
file->i_ndefs = 0;
|
||||
}
|
||||
else if (file->i_ndefs == file->i_deflen)
|
||||
file->i_defs = (struct symtab *)
|
||||
realloc(file->i_defs,
|
||||
sizeof(struct symtab)*(file->i_deflen+=SYMTABINC));
|
||||
|
||||
if (file->i_defs == NULL)
|
||||
fatalerr("malloc()/realloc() failure in insert_defn()\n");
|
||||
|
||||
below = first = 0;
|
||||
last = file->i_ndefs - 1;
|
||||
while (last >= first)
|
||||
{
|
||||
/* Fast inline binary search */
|
||||
register char *s1;
|
||||
register char *s2;
|
||||
register int middle = (first + last) / 2;
|
||||
|
||||
/* Fast inline strchr() */
|
||||
s1 = name;
|
||||
s2 = file->i_defs[middle].s_name;
|
||||
while (*s1++ == *s2++)
|
||||
if (s2[-1] == '\0') break;
|
||||
|
||||
/* If exact match, set sp and break */
|
||||
if (*--s1 == *--s2)
|
||||
{
|
||||
sp = file->i_defs + middle;
|
||||
break;
|
||||
}
|
||||
|
||||
/* If name > i_defs[middle] ... */
|
||||
if (*s1 > *s2)
|
||||
{
|
||||
below = first;
|
||||
first = middle + 1;
|
||||
}
|
||||
/* else ... */
|
||||
else
|
||||
{
|
||||
below = last = middle - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Search is done. If we found an exact match to the symbol name,
|
||||
just replace its s_value */
|
||||
if (sp != NULL)
|
||||
{
|
||||
free(sp->s_value);
|
||||
sp->s_value = copy(val);
|
||||
return;
|
||||
}
|
||||
|
||||
sp = file->i_defs + file->i_ndefs++;
|
||||
dest = file->i_defs + below + 1;
|
||||
while (sp > dest)
|
||||
{
|
||||
*sp = sp[-1];
|
||||
sp--;
|
||||
}
|
||||
sp->s_name = copy(name);
|
||||
sp->s_value = copy(val);
|
||||
}
|
||||
|
||||
struct symtab *slookup(symbol, file)
|
||||
register char *symbol;
|
||||
register struct inclist *file;
|
||||
{
|
||||
register int first = 0;
|
||||
register int last = file->i_ndefs - 1;
|
||||
|
||||
if (file) while (last >= first)
|
||||
{
|
||||
/* Fast inline binary search */
|
||||
register char *s1;
|
||||
register char *s2;
|
||||
register int middle = (first + last) / 2;
|
||||
|
||||
/* Fast inline strchr() */
|
||||
s1 = symbol;
|
||||
s2 = file->i_defs[middle].s_name;
|
||||
while (*s1++ == *s2++)
|
||||
if (s2[-1] == '\0') break;
|
||||
|
||||
/* If exact match, we're done */
|
||||
if (*--s1 == *--s2)
|
||||
{
|
||||
return file->i_defs + middle;
|
||||
}
|
||||
|
||||
/* If symbol > i_defs[middle] ... */
|
||||
if (*s1 > *s2)
|
||||
{
|
||||
first = middle + 1;
|
||||
}
|
||||
/* else ... */
|
||||
else
|
||||
{
|
||||
last = middle - 1;
|
||||
}
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
undefine(symbol, file)
|
||||
char *symbol;
|
||||
register struct inclist *file;
|
||||
{
|
||||
register struct symtab *ptr;
|
||||
struct inclist *srcfile;
|
||||
while ((ptr = isdefined(symbol, file, &srcfile)) != NULL)
|
||||
{
|
||||
srcfile->i_ndefs--;
|
||||
for (; ptr < srcfile->i_defs + srcfile->i_ndefs; ptr++)
|
||||
*ptr = ptr[1];
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
/* $XConsortium: pr.c,v 1.17 94/04/17 20:10:38 gildea Exp $ */
|
||||
/*
|
||||
|
||||
Copyright (c) 1993, 1994 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
#include "def.h"
|
||||
|
||||
extern struct inclist inclist[ MAXFILES ],
|
||||
*inclistp;
|
||||
extern char *objprefix;
|
||||
extern char *objsuffix;
|
||||
extern int width;
|
||||
extern boolean printed;
|
||||
extern boolean verbose;
|
||||
extern boolean show_where_not;
|
||||
|
||||
add_include(filep, file, file_red, include, dot, failOK)
|
||||
struct filepointer *filep;
|
||||
struct inclist *file, *file_red;
|
||||
char *include;
|
||||
boolean dot;
|
||||
{
|
||||
register struct inclist *newfile;
|
||||
register struct filepointer *content;
|
||||
|
||||
/*
|
||||
* First decide what the pathname of this include file really is.
|
||||
*/
|
||||
newfile = inc_path(file->i_file, include, dot);
|
||||
if (newfile == NULL) {
|
||||
if (failOK)
|
||||
return;
|
||||
if (file != file_red)
|
||||
warning("%s (reading %s, line %d): ",
|
||||
file_red->i_file, file->i_file, filep->f_line);
|
||||
else
|
||||
warning("%s, line %d: ", file->i_file, filep->f_line);
|
||||
warning1("cannot find include file \"%s\"\n", include);
|
||||
show_where_not = TRUE;
|
||||
newfile = inc_path(file->i_file, include, dot);
|
||||
show_where_not = FALSE;
|
||||
}
|
||||
|
||||
if (newfile) {
|
||||
included_by(file, newfile);
|
||||
if (!newfile->i_searched) {
|
||||
newfile->i_searched = TRUE;
|
||||
content = getfile(newfile->i_file);
|
||||
find_includes(content, newfile, file_red, 0, failOK);
|
||||
freefile(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
recursive_pr_include(head, file, base)
|
||||
register struct inclist *head;
|
||||
register char *file, *base;
|
||||
{
|
||||
register int i;
|
||||
|
||||
if (head->i_marked)
|
||||
return;
|
||||
head->i_marked = TRUE;
|
||||
if (head->i_file != file)
|
||||
pr(head, file, base);
|
||||
for (i=0; i<head->i_listlen; i++)
|
||||
recursive_pr_include(head->i_list[ i ], file, base);
|
||||
}
|
||||
|
||||
pr(ip, file, base)
|
||||
register struct inclist *ip;
|
||||
char *file, *base;
|
||||
{
|
||||
static char *lastfile;
|
||||
static int current_len;
|
||||
register int len, i;
|
||||
char buf[ BUFSIZ ];
|
||||
|
||||
printed = TRUE;
|
||||
len = strlen(ip->i_file)+1;
|
||||
if (current_len + len > width || file != lastfile) {
|
||||
lastfile = file;
|
||||
sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
|
||||
ip->i_file);
|
||||
len = current_len = strlen(buf);
|
||||
}
|
||||
else {
|
||||
buf[0] = ' ';
|
||||
strcpy(buf+1, ip->i_file);
|
||||
current_len += len;
|
||||
}
|
||||
fwrite(buf, len, 1, stdout);
|
||||
|
||||
/*
|
||||
* If verbose is set, then print out what this file includes.
|
||||
*/
|
||||
if (! verbose || ip->i_list == NULL || ip->i_notified)
|
||||
return;
|
||||
ip->i_notified = TRUE;
|
||||
lastfile = NULL;
|
||||
printf("\n# %s includes:", ip->i_file);
|
||||
for (i=0; i<ip->i_listlen; i++)
|
||||
printf("\n#\t%s", ip->i_list[ i ]->i_incstring);
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# The master "Core Components" source and release component directory #
|
||||
# names are ALWAYS identical and are the value of $(MODULE). #
|
||||
# NOTE: A component is also called a module or a subsystem. #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# All "Core Components" <component>-specific source-side tags must
|
||||
# always be identified for compiling/linking purposes
|
||||
#
|
||||
|
||||
ifndef JAVA_SOURCE_COMPONENT
|
||||
JAVA_SOURCE_COMPONENT = java
|
||||
endif
|
||||
|
||||
ifndef NETLIB_SOURCE_COMPONENT
|
||||
NETLIB_SOURCE_COMPONENT = netlib
|
||||
endif
|
||||
|
||||
ifndef NSPR_SOURCE_COMPONENT
|
||||
NSPR_SOURCE_COMPONENT = nspr20
|
||||
endif
|
||||
|
||||
ifndef SECTOOLS_SOURCE_COMPONENT
|
||||
SECTOOLS_SOURCE_COMPONENT = sectools
|
||||
endif
|
||||
|
||||
ifndef SECURITY_SOURCE_COMPONENT
|
||||
SECURITY_SOURCE_COMPONENT = security
|
||||
endif
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
CORE_DEPTH = ../..
|
||||
|
||||
MODULE = netlib
|
||||
|
||||
IMPORTS = netlib
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
# FTP script for downloading /share/builds/components stuff.
|
||||
#
|
||||
# syntax:
|
||||
# nsftp <srcdir-relative to /share/builds/components> <destdir>
|
||||
#
|
||||
# Example
|
||||
#
|
||||
# nsftp ldapsdk/19961108 c:\3.0\ns\components\ldapsdk
|
||||
# nsftp ldapsdk/19961108 c:\3.0\ns\components\ldapsdk
|
||||
sdk_binary.jar
|
||||
#
|
||||
|
||||
#SERVER=ftp-rel
|
||||
#SERVER=gaida
|
||||
SERVER=$COMPONENT_FTP_SERVER
|
||||
USER=ftpman
|
||||
PASSWD=ftpman
|
||||
TMPFILE=tmp.foo
|
||||
|
||||
SRC=$1
|
||||
DEST=$2
|
||||
if [ -z $3 ]; then
|
||||
FILENAME=*
|
||||
else
|
||||
FILENAME=$3
|
||||
fi
|
||||
|
||||
echo ${USER} contents of ${SRC} to ${DEST}
|
||||
|
||||
cd ${DEST}
|
||||
ftp -n ${SERVER} << -=EOF=-
|
||||
user ${USER} ${PASSWD}
|
||||
binary
|
||||
hash
|
||||
prompt
|
||||
cd ${SRC}
|
||||
get ${FILENAME}
|
||||
quit
|
||||
-=EOF=-
|
||||
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче