diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist deleted file mode 100644 index 15d6b76b101..00000000000 --- a/CVSROOT/checkoutlist +++ /dev/null @@ -1,15 +0,0 @@ -# The "checkoutlist" file is used to support additional version controlled -# administrative files in $CVSROOT/CVSROOT, such as template files. -# -# The first entry on a line is a filename which will be checked out from -# the corresponding RCS file in the $CVSROOT/CVSROOT directory. -# The remainder of the line is an error message to use if the file cannot -# be checked out. -# -# File format: -# -# [] -# -# comment lines begin with '#' -passwd -readers diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo deleted file mode 100644 index b19e7b7a63e..00000000000 --- a/CVSROOT/commitinfo +++ /dev/null @@ -1,15 +0,0 @@ -# The "commitinfo" file is used to control pre-commit checks. -# The filter on the right is invoked with the repository and a list -# of files to check. A non-zero exit of the filter program will -# cause the commit to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/config b/CVSROOT/config deleted file mode 100644 index 51b03f663d8..00000000000 --- a/CVSROOT/config +++ /dev/null @@ -1,6 +0,0 @@ -# Set this to "no" if pserver shouldn't check system users/passwords -#SystemAuth=no - -# Set `PreservePermissions' to `yes' to save file status information -# in the repository. -#PreservePermissions=no diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers deleted file mode 100644 index 0accaf1b153..00000000000 --- a/CVSROOT/cvswrappers +++ /dev/null @@ -1,23 +0,0 @@ -# This file affects handling of files based on their names. -# -# The -t/-f options allow one to treat directories of files -# as a single file, or to transform a file in other ways on -# its way in and out of CVS. -# -# The -m option specifies whether CVS attempts to merge files. -# -# The -k option specifies keyword expansion (e.g. -kb for binary). -# -# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) -# -# wildcard [option value][option value]... -# -# where option is one of -# -f from cvs filter value: path to filter -# -t to cvs filter value: path to filter -# -m update methodology value: MERGE or COPY -# -k expansion mode value: b, o, kkv, &c -# -# and value is a single-quote delimited value. -# For example: -#*.gif -k 'b' diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo deleted file mode 100644 index d78886c1522..00000000000 --- a/CVSROOT/editinfo +++ /dev/null @@ -1,21 +0,0 @@ -# The "editinfo" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo deleted file mode 100644 index 5a59f0a5440..00000000000 --- a/CVSROOT/loginfo +++ /dev/null @@ -1,26 +0,0 @@ -# The "loginfo" file controls where "cvs commit" log information -# is sent. The first entry on a line is a regular expression which must match -# the directory that the change is being made to, relative to the -# $CVSROOT. If a match is found, then the remainder of the line is a filter -# program that should expect log information on its standard input. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name ALL appears as a regular expression it is always used -# in addition to the first matching regex or DEFAULT. -# -# You may specify a format string as part of the -# filter. The string is composed of a `%' followed -# by a single format character, or followed by a set of format -# characters surrounded by `{' and `}' as separators. The format -# characters are: -# -# s = file name -# V = old version number (pre-checkin) -# v = new version number (post-checkin) -# -# For example: -#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog -# or -#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog diff --git a/CVSROOT/modules b/CVSROOT/modules deleted file mode 100644 index e3ea19a7646..00000000000 --- a/CVSROOT/modules +++ /dev/null @@ -1,320 +0,0 @@ -# Three different line formats are valid: -# key -a aliases... -# key [options] directory -# key [options] directory files... -# -# Where "options" are composed of: -# -i prog Run "prog" on "cvs commit" from top-level of module. -# -o prog Run "prog" on "cvs checkout" of module. -# -e prog Run "prog" on "cvs export" of module. -# -t prog Run "prog" on "cvs rtag" of module. -# -u prog Run "prog" on "cvs update" of module. -# -d dir Place module in directory "dir" instead of module name. -# -l Top-level directory only -- do not recurse. -# -# NOTE: If you change any of the "Run" options above, you'll have to -# release and re-checkout any working directories of these modules. -# -# And "directory" is a path to a directory relative to $CVSROOT. -# -# The "-a" option specifies an alias. An alias is interpreted as if -# everything on the right of the "-a" had been typed on the command line. -# -# You can encode a module within a module by using the special '&' -# character to interpose another module into the current module. This -# can be useful for creating a module that consists of many directories -# spread out over the entire source repository. - -MozillaSource -a \ - MozillaSourceWin \ - MozillaSourceMac \ - MozillaSourceUnix \ - -MozillaSourceWin -a MozillaSourceCommon MozillaSourceWinOnly - -MozillaSourceMac -a MozillaSourceCommon MozillaSourceMacOnly - -MozillaSourceUnix -a MozillaSourceCommon MozillaSourceUnixOnly - -MozillaSourceCommon -a \ - mozilla/LEGAL \ - mozilla/LICENSE \ - mozilla/CHANGES.html \ - mozilla/build \ - mozilla/include \ - mozilla/jpeg \ - mozilla/js \ - mozilla/lib/htmldlgs \ - mozilla/lib/layout \ - mozilla/lib/libcnv \ - mozilla/lib/libi18n \ - mozilla/lib/liblayer \ - mozilla/lib/libmisc \ - mozilla/lib/libmime \ - mozilla/lib/libmocha \ - mozilla/lib/libnet \ - mozilla/lib/libparse \ - mozilla/lib/libpics \ - mozilla/lib/libpwcac \ - mozilla/lib/libstyle \ - mozilla/lib/plugin \ - mozilla/lib/xlate \ - mozilla/lib/xp \ - mozilla/modules/calendar \ - mozilla/modules/edtplug/classes \ - mozilla/modules/edtplug/src \ - mozilla/modules/edtplug/include \ - mozilla/modules/libfont/classes \ - mozilla/modules/libfont/public \ - mozilla/modules/libfont/src \ - mozilla/modules/libhook \ - mozilla/modules/libimg \ - mozilla/modules/libnls \ - mozilla/modules/libpref \ - mozilla/modules/libreg \ - mozilla/modules/libutil \ - mozilla/modules/oji \ - mozilla/modules/progress/src \ - mozilla/modules/rdf \ - mozilla/modules/schedulr \ - mozilla/modules/security/freenav \ - mozilla/modules/softupdt/classes \ - mozilla/modules/softupdt/include \ - mozilla/modules/softupdt/src \ - mozilla/modules/xml \ - mozilla/modules/zlib/src \ - mozilla/nav-java/stubs \ - mozilla/network \ - mozilla/nsprpub \ - mozilla/privacy \ - mozilla/xpcom \ - mozilla/l10n \ - mozilla/dbm \ - mozilla/README - -MozillaSourceWinOnly -a \ - mozilla/client.mak \ - mozilla/cmd/makefile.win \ - mozilla/cmd/dialup \ - mozilla/cmd/wincom \ - mozilla/cmd/winfe \ - mozilla/config \ - mozilla/lib/makefile.win \ - mozilla/modules/coreincl \ - mozilla/modules/edtplug/makefile.win \ - mozilla/makefile.win \ - mozilla/modules/libfont/jmcgen \ - mozilla/modules/libfont/makefile.win \ - mozilla/modules/libfont/producers/makefile.win \ - mozilla/modules/libfont/producers/win \ - mozilla/modules/libfont/producers/win/classes \ - mozilla/modules/libfont/producers/win/classes/netscape \ - mozilla/modules/libfont/producers/win/classes/netscape/fonts \ - mozilla/modules/libfont/producers/win/src \ - mozilla/modules/makefile.win \ - mozilla/modules/progress/makefile.win \ - mozilla/modules/progress/public \ - mozilla/modules/security/makefile.win \ - mozilla/modules/softupdt/makefile.win \ - mozilla/modules/zlib/makefile.win \ - mozilla/nav-java/makefile.win \ - JavaStubWin - - -MozillaSourceUnixOnly -a \ - mozilla/cmd/Makefile \ - mozilla/cmd/stubfe \ - mozilla/cmd/xfe \ - mozilla/config/.cvsignore \ - mozilla/config/AIX.mk \ - mozilla/config/BSD_OS.mk \ - mozilla/config/bsdecho.c \ - mozilla/config/clobber_miss.pl \ - mozilla/config/common.mk \ - mozilla/config/config.guess \ - mozilla/config/config.mk \ - mozilla/config/coreconf.mk \ - mozilla/config/cvsco.pl \ - mozilla/config/fastcwd.pl \ - mozilla/config/FreeBSD.mk \ - mozilla/config/gtscc.c \ - mozilla/config/HP-UX.mk \ - mozilla/config/IRIX.mk \ - mozilla/config/Linux.mk \ - mozilla/config/makecopy.c \ - mozilla/config/Makefile \ - mozilla/config/mangle.c \ - mozilla/config/mantomak.c \ - mozilla/config/mkdepend \ - mozilla/config/NCR.mk \ - mozilla/config/NEC.mk \ - mozilla/config/NEWS-OS.mk \ - mozilla/config/NEXTSTEP.mk \ - mozilla/config/nfspwd.pl \ - mozilla/config/nodl.pl \ - mozilla/config/nsinstall.c \ - mozilla/config/OSF1.mk \ - mozilla/config/outofdate.pl \ - mozilla/config/pathsub.c \ - mozilla/config/pathsub.h \ - mozilla/config/pkg2dpth.pl \ - mozilla/config/ports \ - mozilla/config/revdepth.pl \ - mozilla/config/Rhapsody.mk \ - mozilla/config/rules.mk \ - mozilla/config/SCOOS.mk \ - mozilla/config/SINIX.mk \ - mozilla/config/sj.pl \ - mozilla/config/SunOS.mk \ - mozilla/config/SunOS4.mk \ - mozilla/config/SunOS5.mk \ - mozilla/config/UNIXWARE.mk \ - mozilla/config/xmversion.sh \ - mozilla/lib/Makefile \ - mozilla/Makefile \ - mozilla/modules/edtplug/Makefile \ - mozilla/modules/libfont/jmcgen \ - mozilla/modules/libfont/Makefile \ - mozilla/modules/libfont/producers/Makefile \ - mozilla/modules/Makefile \ - mozilla/modules/progress/Makefile \ - mozilla/modules/progress/public \ - mozilla/modules/security/Makefile \ - mozilla/modules/softupdt/Makefile \ - mozilla/modules/zlib/Makefile \ - mozilla/nav-java/Makefile \ - mozilla/lib/mariner \ - JavaStubUnix - - -MozillaSourceMacOnly -a \ - mozilla/config/mac \ - mozilla/cmd/dialup \ - mozilla/cmd/macfe \ - mozilla/lib/mac/AutoAdmin \ - mozilla/lib/mac/Includes \ - mozilla/lib/mac/MacMemoryAllocator \ - mozilla/lib/mac/Misc \ - mozilla/lib/mac/MoreFiles \ - mozilla/lib/mac/NSRuntime \ - mozilla/lib/mac/NSStdLib \ - mozilla/lib/mac/patches \ - mozilla/lib/mac/PowerPlant \ - mozilla/lib/mac/UserInterface \ - mozilla/modules/coreincl \ - mozilla/modules/edtplug/macbuild \ - mozilla/modules/libfont \ - mozilla/modules/progress/macbuild \ - mozilla/modules/progress/public \ - mozilla/modules/softupdt/macbuild \ - mozilla/modules/zlib/macbuild \ - mozilla/lib/mariner \ - JavaStubMac - -JavaStubAll -a \ - JavaStubWin \ - JavaStubMac \ - JavaStubUnix - -JavaStubCore -a \ - mozilla/sun-java/stubs/include \ - mozilla/sun-java/stubs/src - -JavaStubMac -a \ - JavaStubCore \ - mozilla/sun-java/stubs/macbuild \ - mozilla/sun-java/stubs/macjri - -JavaStubUnix -a \ - JavaStubCore \ - mozilla/sun-java/Makefile \ - mozilla/sun-java/stubs/jri \ - mozilla/sun-java/stubs/Makefile - -JavaStubWin -a \ - JavaStubCore \ - mozilla/sun-java/makefile.win \ - mozilla/sun-java/stubs/jri \ - mozilla/sun-java/stubs/makefile.win - -###################################################################### - -# -# Modules for the raptor layout effort. Note that raptor dist is temporary -# until raptor is integrated into the mainline build. -# - -RaptorDist -a \ - mozilla/nsprpub \ - mozilla/include \ - mozilla/jpeg \ - mozilla/modules/libreg \ - mozilla/xpcom \ - mozilla/modules/zlib \ - mozilla/modules/libutil \ - mozilla/sun-java \ - mozilla/nav-java \ - mozilla/js \ - mozilla/modules/security/freenav \ - mozilla/modules/libpref \ - mozilla/modules/libimg \ - mozilla/lib/xp \ - mozilla/lib/libnet \ - mozilla/base \ - mozilla/network - -Raptor -a \ - mozilla/htmlparser \ - mozilla/dom \ - mozilla/gfx \ - mozilla/view \ - mozilla/widget \ - mozilla/layout \ - mozilla/webshell - -RaptorAll -a \ - RaptorDist \ - Raptor - -##################################################################### -# Module for the Normandy landing. - -NormandyBeach -a \ - MozillaSource \ - mozilla/lib/libaddr \ - mozilla/lib/libmsg - -NormandyBeachWin -a \ - MozillaSourceWin \ - mozilla/lib/libaddr \ - mozilla/lib/libmsg - -NormandyBeachUnix -a \ - MozillaSourceUnix \ - mozilla/lib/libaddr \ - mozilla/lib/libmsg - -NormandyBeachMac -a \ - MozillaSourceMac \ - mozilla/lib/libaddr \ - mozilla/lib/libmsg - -####################################################################### -# Modules for the Directory SDK. There are two users of the libldap -# Mozilla and the DirectorySDK - -DirectorySDKSource -a \ - DirectorySDKSourceCommon \ - DirectorySDKSourceBuild - -DirectorySDKSourceCommon -a \ - mozilla/directory/ldapsdk.mak \ - mozilla/directory/ldapsdk.mk \ - mozilla/directory/buildsdk.txt \ - mozilla/directory/Makefile \ - mozilla/directory/c-sdk - -DirectorySDKSourceBuild -a \ - mozilla/cmd/winfe/mkfiles32 \ - mozilla/config - diff --git a/CVSROOT/notify b/CVSROOT/notify deleted file mode 100644 index 34f0bc28880..00000000000 --- a/CVSROOT/notify +++ /dev/null @@ -1,12 +0,0 @@ -# The "notify" file controls where notifications from watches set by -# "cvs watch add" or "cvs edit" are sent. The first entry on a line is -# a regular expression which is tested against the directory that the -# change is being made to, relative to the $CVSROOT. If it matches, -# then the remainder of the line is a filter program that should contain -# one occurrence of %s for the user to notify, and information on its -# standard input. -# -# "ALL" or "DEFAULT" can be used in place of the regular expression. -# -# For example: -#ALL mail %s -s "CVS notification" diff --git a/CVSROOT/passwd b/CVSROOT/passwd deleted file mode 100644 index 5224ce2b5f4..00000000000 --- a/CVSROOT/passwd +++ /dev/null @@ -1 +0,0 @@ -friedman%netscape.com:eyXRDOnq4TplQ:cvsadm diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo deleted file mode 100644 index 49e59f4d0df..00000000000 --- a/CVSROOT/rcsinfo +++ /dev/null @@ -1,13 +0,0 @@ -# The "rcsinfo" file is used to control templates with which the editor -# is invoked on commit and import. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being made to, relative to the -# $CVSROOT. For the first match that is found, then the remainder of the -# line is the name of the file that contains the template. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/readers b/CVSROOT/readers deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo deleted file mode 100644 index 274a46dd5b6..00000000000 --- a/CVSROOT/taginfo +++ /dev/null @@ -1,20 +0,0 @@ -# The "taginfo" file is used to control pre-tag checks. -# The filter on the right is invoked with the following arguments: -# -# $1 -- tagname -# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d -# $3 -- repository -# $4-> file revision [file revision ...] -# -# A non-zero exit of the filter program will cause the tag to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg deleted file mode 100644 index 86f747ce222..00000000000 --- a/CVSROOT/verifymsg +++ /dev/null @@ -1,21 +0,0 @@ -# The "verifymsg" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/buildtools/windows/batch/MOZENV.BAT b/buildtools/windows/batch/MOZENV.BAT deleted file mode 100755 index 07a0c9aff82..00000000000 --- a/buildtools/windows/batch/MOZENV.BAT +++ /dev/null @@ -1,74 +0,0 @@ -@echo off - -rem * To set up your local build read and customize this batch file. -rem * You shouldn't have to touch anything but "set" statements -rem * Batch file contributed by Lucas Gonze (lucas@gonze.com) and -rem * Rick Ekle (rele@iconect.net) - -rem * This stuff forces us to not reset the environment variables more -rem * than once. It would cause some vars to get longer than 127 chars -rem * (the longest possible batch line) to run this stuff more than once. -if "%1%" == "-force" goto skiptest -if "%MOZBUILD%" == "ALREADYDONE" goto alldone -:skiptest -echo setting up environment... -set MOZBUILD=ALREADYDONE - -rem * if this isn't set properly your build will get -rem * "file './config/WIN' not found" -set MOZ_BITS=32 - -set MOZ_GOLD=1 -set MOZ_MEDIUM=1 -set NO_SECURITY=1 -set NSPR20=1 - -rem * don't set this if you want to make an optimized release build -set MOZ_DEBUG=1 - -rem * set if running NT 3.51, don't set otherwise -rem * set MOZ_NT=351 - -rem * location of resulting executable and totally optional. -rem * If you don't set this, mozilla.exe will be generated into -rem * mozilla\cmd\winfe\mkfiles32\x86dbg (or x86rel for optimized builds) -rem * set MOZ_OUT=d:\bin - -rem * top of your tree, drive letter and path, i.e. set d:\mozilla_src. -rem * The topmost directory under this should be mozilla -rem * so if you extracted zip file to z:\foo, this should be z:\foo -set MOZ_SRC=d:\moz\ - -rem * location of the bin directory containing your GNU tools. The build - -rem * looks for MOZ_TOOLS\bin\gmake.exe, so after you download and unpack -rem * wintools.zip, make some directory called "bin", put your new -rem * uname.exe, shmsdos.exe, and gmake.exe in it, and set MOZ_TOOLS to -rem * the place where you put it. -set MOZ_TOOLS=d: - -rem * where to find cp.exe and rm.exe, aka gnu tools for windows -set gnuTools=D:\CDK\H-I386~1\bin - -rem * the important thing is that your new moz tools should be first -SET PATH=%MOZ_TOOLS%\bin;%gnuTools%;%PATH% - -rem * if you are running VC++ 5.0 or higher, this will prevent the build - -rem * from trying to pick up uuid2.lib, which only exists in previous -rem * versions of vc++. -set _MSC_VER=1100 - -rem * vcvars32.bat is created by visual c++ install to -rem * enable command line builds -echo setting up visual c++ environment... -call d:\bin\vcvars32.bat - -:alldone -@echo environment set up, building mozilla... - -rem * uncomment these to make the script build as well - -rem cd %MOZ_SRC% -rem cd mozilla -rem nmake -f client.mak diff --git a/buildtools/windows/bin/README b/buildtools/windows/bin/README deleted file mode 100644 index 3e8ebd4c215..00000000000 --- a/buildtools/windows/bin/README +++ /dev/null @@ -1,26 +0,0 @@ -Building NSPR on Windows NT Using Netscape's gmake and Other Tools - -This directory contains the following tools: -- gmake.exe: GNU make 3.74, modified to use shmsdos.exe as the shell -- shmsdos.exe: a lightweight shell developed by Netscape programmers. - It has most of the file manipulation operations (such as cp, - rm, mkdir as well as Netscape's own nsinstall) as built-in - commands, so even if you have these - file utilities installed on your NT machine, they won't be invoked - by gmake and shmsdos. Also, since shmsdos is not a full-blown - shell and its built-in file commands are not fully compatible - with the true Unix file utilities, our makefiles have had to - avoid some features of sh and work around the incompatibilities - on Windows NT. -- uname.exe: this uname.exe returns the OS as "WINNT", which is what - our makefiles assume. Do not use a uname.exe that returns other - strings, such as "Windows_NT". - -Binaries for the x86 processors can be found in the 'x86' subdirectory. -Binaries for the alpha processors can be found in the 'alpha' -subdirectory. - -INSTALLATION: - -Install gmake.exe, shmsdos.exe, and uname.exe in any directory. -Add that directory to your Path environment variable. \ No newline at end of file diff --git a/buildtools/windows/bin/alpha/gmake.exe b/buildtools/windows/bin/alpha/gmake.exe deleted file mode 100755 index 732c20d440d..00000000000 Binary files a/buildtools/windows/bin/alpha/gmake.exe and /dev/null differ diff --git a/buildtools/windows/bin/alpha/nsinstall.exe b/buildtools/windows/bin/alpha/nsinstall.exe deleted file mode 100755 index 77145fd1e29..00000000000 Binary files a/buildtools/windows/bin/alpha/nsinstall.exe and /dev/null differ diff --git a/buildtools/windows/bin/alpha/shmsdos.exe b/buildtools/windows/bin/alpha/shmsdos.exe deleted file mode 100755 index 6ef07bf3e2e..00000000000 Binary files a/buildtools/windows/bin/alpha/shmsdos.exe and /dev/null differ diff --git a/buildtools/windows/bin/alpha/uname.exe b/buildtools/windows/bin/alpha/uname.exe deleted file mode 100755 index 6511a154c9c..00000000000 Binary files a/buildtools/windows/bin/alpha/uname.exe and /dev/null differ diff --git a/buildtools/windows/bin/x86/gmake.exe b/buildtools/windows/bin/x86/gmake.exe deleted file mode 100755 index bd1f70bcb3d..00000000000 Binary files a/buildtools/windows/bin/x86/gmake.exe and /dev/null differ diff --git a/buildtools/windows/bin/x86/nsinstall.exe b/buildtools/windows/bin/x86/nsinstall.exe deleted file mode 100755 index 11a32d12815..00000000000 Binary files a/buildtools/windows/bin/x86/nsinstall.exe and /dev/null differ diff --git a/buildtools/windows/bin/x86/shmsdos.exe b/buildtools/windows/bin/x86/shmsdos.exe deleted file mode 100755 index a44667648cc..00000000000 Binary files a/buildtools/windows/bin/x86/shmsdos.exe and /dev/null differ diff --git a/buildtools/windows/bin/x86/uname.exe b/buildtools/windows/bin/x86/uname.exe deleted file mode 100755 index 5788c84b195..00000000000 Binary files a/buildtools/windows/bin/x86/uname.exe and /dev/null differ diff --git a/buildtools/windows/source/make/COPYING b/buildtools/windows/source/make/COPYING deleted file mode 100644 index a43ea2126fb..00000000000 --- a/buildtools/windows/source/make/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/buildtools/windows/source/make/ChangeLog b/buildtools/windows/source/make/ChangeLog deleted file mode 100644 index 3532eb6dcd1..00000000000 --- a/buildtools/windows/source/make/ChangeLog +++ /dev/null @@ -1,3263 +0,0 @@ -Fri May 19 16:36:32 1995 Roland McGrath - - * Version 3.74 released. - -Wed May 10 17:43:34 1995 Roland McGrath - - * Version 3.73.3. - -Tue May 9 17:15:23 1995 Roland McGrath - - * compatMakefile ($(infodir)/make.info): Make sure $$dir is set in - install-info cmd. - -Wed May 3 15:56:06 1995 Roland McGrath - - * file.c (print_file): Grok update_status of 1 for -q. - -Thu Apr 27 12:39:35 1995 Roland McGrath - - * Version 3.73.2. - -Wed Apr 26 17:15:57 1995 Roland McGrath - - * file.c (remove_intermediates): Fix inverted test to bail under - -n for signal case. Bail under -q or -t. - Skip files with update_status==-1. - - * job.c (job_next_command): Skip empty lines. - (new_job): Don't test the return of job_next_command. - Just let start_waiting_job handle the case of empty commands. - -Wed Apr 19 03:25:54 1995 Roland McGrath - - * function.c [__MSDOS__]: Include . From DJ Delorie. - - * Version 3.73.1. - -Sat Apr 8 14:53:24 1995 Roland McGrath - - * remake.c (notice_finished_file): Set FILE->update_status to zero - if it's -1. - -Wed Apr 5 00:20:24 1995 Roland McGrath - - * Version 3.73 released. - -Tue Mar 28 13:25:46 1995 Roland McGrath - - * main.c (main): Fixed braino in assert. - - * Version 3.72.13. - -Mon Mar 27 05:29:12 1995 Roland McGrath - - * main.c: Avoid string in assert expression. Some systems are broken. - -Fri Mar 24 00:32:32 1995 Roland McGrath - - * main.c (main): Handle 1 and 2 returns from update_goal_chain - makefile run properly. - - * Version 3.72.12. - - * main.c (handle_non_switch_argument): New function, broken out of - decode_switches. - (decode_switches): Set optind to 0 to reinitialize getopt, not to 1. - When getopt_long returns EOF, break the loop and handle remaining args - with a simple second loop. - - * remake.c (remake_file): Set update_status to 2 instead of 1 for - no rule to make. Mention parent (dependent) in error message. - (update_file_1): Handle FILE->update_status == 2 in -d printout. - * job.c (start_job_command, reap_children): Set update_status to 2 - instead of 1 for failed commands. - -Tue Mar 21 16:23:38 1995 Roland McGrath - - * job.c (search_path): Function removed (was already #if 0'd out). - * configure.in: Remove AC_TYPE_GETGROUPS; nothing needs it any more. - -Fri Mar 17 15:57:40 1995 Roland McGrath - - * configure.bat: Write @CPPFLAGS@ translation. - -Mon Mar 13 00:45:59 1995 Roland McGrath - - * read.c (parse_file_seq): Rearranged `l(a b)' -> `l(a) l(b)' loop - to not skip the elt immediately preceding `l(...'. - -Fri Mar 10 13:56:49 1995 Roland McGrath - - * Version 3.72.11. - - * read.c (find_char_unquote): Make second arg a string of stop - chars instead of a single stop char. Stop when any char in the - string is hit. All callers changed. - (find_semicolon): Pass stop chars "#;" to one find_char_unquote call, - instead of using two calls. If the match is not a ; but a #, - return zero. - * misc.c: Changed find_char_unquote callers here too. - - * Version 3.72.10. - - * read.c (read_makefile, parse_file_seq): Fix typo __MS_DOS__ -> - __MSDOS__. - - * GNUmakefile (globfiles): Add glob/configure.bat. - (distfiles): Add configh.dos, configure.bat. - -Wed Mar 8 13:10:57 1995 Roland McGrath - - Fixes for MS-DOS from DJ Delorie. - * read.c (read_makefile, parse_file_seq) [__MS_DOS__]: Don't see : - as separator in "C:\...". - * configh.dos (STDC_HEADERS): Define only if undefined. - (HAVE_SYS_PARAM_H): Don't define this. - (HAVE_STRERROR): Define this. - * job.c (construct_command_argv_internal) [__MSDOS__]: Fix typos. - - * Version 3.72.9. - - * main.c (decode_switches): Reset optind to 1 instead of 0. - -Tue Mar 7 17:31:06 1995 Roland McGrath - - * main.c (decode_switches): If non-option arg is "-", ignore it. - -Mon Mar 6 23:57:38 1995 Roland McGrath - - * Version 3.72.8. - -Wed Feb 22 21:26:36 1995 Roland McGrath - - * Version 3.72.7. - -Tue Feb 21 22:10:43 1995 Roland McGrath - - * main.c (main): Pass missing arg to tmpnam. - - * configure.in: Check for strsignal. - * job.c (child_error): Use strsignal. - * main.c (main): Don't call signame_init #ifdef HAVE_STRSIGNAL. - - * misc.c (strerror): Fix swapped args in sprintf. - -Mon Feb 13 11:50:08 1995 Roland McGrath - - * configure.in (CFLAGS, LDFLAGS): Don't set these variables. - -Fri Feb 10 18:44:12 1995 Roland McGrath - - * main.c (print_version): Add 95 to copyright years. - - * Version 3.72.6. - - * job.c (start_job_command): Remember to call notice_finished_file - under -n when not recursing. To do this, consolidate that code - under the empty command case and goto there for the -n case. - -Tue Feb 7 13:36:03 1995 Roland McGrath - - * make.h [! STDC_HEADERS]: Don't declare qsort. Sun headers - declare it int. - -Mon Feb 6 17:37:01 1995 Roland McGrath - - * read.c (read_makefile): For bogus line starting with tab, ignore - it if blank after removing comments. - - * main.c: Cast results of `alloca' to `char *'. - * expand.c: Likewise. - -Sun Feb 5 18:35:46 1995 Roland McGrath - - * Version 3.72.5. - - * configure.in: Check for mktemp. - * main.c (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp. - - * configure.in (make_cv_sysconf_open_max): New check for `sysconf - (_SC_OPEN_MAX)'. - * acconfig.h: Added #undef HAVE_SYSCONF_OPEN_MAX. - * job.c [HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro - using sysconf. - -Fri Jan 27 04:42:09 1995 Roland McGrath - - * remake.c (update_file_1): When !MUST_MAKE, don't set - FILE->update_status to zero before calling notice_finished_file. - (notice_finished_file): Touch only when FILE->update_status is zero. - (remake_file): Set FILE->update_status to zero after not calling - execute_file_command and deciding to touch instead. - -Thu Jan 26 01:29:32 1995 Roland McGrath - - * main.c (debug_signal_handler): New function; toggles debug_flag. - (main): Handle SIGUSR1 with that. - -Mon Jan 16 15:46:56 1995 Roland McGrath - - * compatMakefile (realclean): Remove Info files. - -Sun Jan 15 08:23:09 1995 Roland McGrath - - * Version 3.72.4. - - * job.c (start_job_command): Save and restore environ around vfork - call. - (search_path): Function #if 0'd out. - (exec_command): Use execvp instead of search_path. - - * expand.c (variable_expand): Rewrote computed variable name and - substitution reference handling to be simpler. First expand the - entire text between the parens if it contains any $s, then examine - the result of that for subtitution references and do no further - expansion while parsing them. - - * job.c (construct_command_argv_internal): Handle " quoting too, - when no backslash, $ or ` characters appear inside the quotes. - - * configure.in (union wait check): If WEXITSTATUS and WTERMSIG are - defined, just use int. - -Tue Jan 10 06:27:27 1995 Roland McGrath - - * default.c (default_variables) [__hpux]: Remove special - definition of ARFLAGS. Existence of the `f' flag is not - consistent across HPUX versions; and one might be using GNU ar - anyway. - - * compatMakefile (clean): Don't remove Info files. - - * compatMakefile (check): Remove gratuitous target declaration. - -Sat Jan 7 11:38:23 1995 Roland McGrath - - * compatMakefile (ETAGS, CTAGS): Don't use -t. - - * arscan.c (ar_name_equal) [cray]: Subtract 1 like [__hpux]. - - * main.c (decode_switches): For --help, print usage to stdout. - -Mon Dec 5 12:42:18 1994 Roland McGrath - - * Version 3.72.3. - - * remake.c (update_file_1): Do set_command_state (FILE, - cs_not_started) only if old state was deps_running. - -Mon Nov 28 14:24:03 1994 Roland McGrath - - * job.c (start_waiting_job): Use set_command_state. - - * build.template (CPPFLAGS): New variable. - (prefix, exec_prefix): Set from @...@. - (compilation loop): Pass $CPPFLAGS to compiler. - - * GNUmakefile (build.sh.in): Make it executable. - - * GNUmakefile (globfiles): Add configure.in, configure. - - * Version 3.72.2. - - * configure.in (AC_OUTPUT): Don't write glob/Makefile. - - * configure.in (AC_CHECK_SYMBOL): Use AC_DEFINE_UNQUOTED. - - * configure.in: Don't check for ranlib. - -Tue Nov 22 22:42:40 1994 Roland McGrath - - * remake.c (notice_finished_file): Only mark also_make's as - updated if really ran cmds. - -Tue Nov 15 06:32:46 1994 Roland McGrath - - * configure.in: Put dnls before random whitespace. - -Sun Nov 13 05:02:25 1994 Roland McGrath - - * compatMakefile (CPPFLAGS): New variable, set from @CPPFLAGS@. - (RANLIB): Variable removed. - (prefix, exec_prefix): Set these from @...@. - (.c.o): Use $(CPPFLAGS). - (glob/libglob.a): Don't pass down variables to sub-make. - glob/Makefile should be configured properly by configure. - (distclean): Remove config.log and config.cache (autoconf stuff). - -Mon Nov 7 13:58:06 1994 Roland McGrath - - * acconfig.h: Add #undef HAVE_UNION_WAIT. - * configure.in: Converted to Autoconf v2. - * dir.c: Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H instead - of DIRENT, SYSDIR, NDIR. - * build.sh.in (prefix, exec_prefix): Set these from @...@. - (CPPFLAGS): New variable, set from @CPPFLAGS@. - (compiling loop): Pass $CPPFLAGS before $CFLAGS. - * install.sh: File renamed to install-sh. - - * main.c (define_makeflags): When no flags, set WORDS to zero. - -Sun Nov 6 18:34:01 1994 Roland McGrath - - * Version 3.72.1. - - * main.c (define_makeflags): Terminate properly when FLAGSTRING is - empty. - -Fri Nov 4 16:02:51 1994 Roland McGrath - - * Version 3.72. - -Tue Nov 1 01:18:10 1994 Roland McGrath - - * Version 3.71.5. - - * job.c (start_job_command): When ARGV is nil, only set - update_state and call notice_finished_file if job_next_command - returns zero. - - * job.c (start_job_command): Call notice_finished_file for empty - command line. - -Thu Oct 27 02:02:45 1994 Roland McGrath - - * file.c (snap_deps): Set COMMANDS_SILENT for .SILENT, not - COMMANDS_NOERROR. - -Wed Oct 26 02:14:10 1994 Roland McGrath - - * Version 3.71.4. - -Tue Oct 25 22:49:24 1994 Roland McGrath - - * file.c (snap_deps): Set command_flags bits in all :: entries. - -Mon Oct 24 18:47:50 1994 Roland McGrath - - * make.h (posix_pedantic): Declare it. - * main.c (main): Move checks .IGNORE, .SILENT, .POSIX to - snap_deps. - * file.c (snap_deps): Check .IGNORE, .SILENT, .POSIX here instead - of in main. If .IGNORE has deps, OR COMMANDS_NOERROR into their - command_flags and don't set -i. Likewise .SILENT. - * job.c (start_job_command): In FLAGS initialization, OR in - CHILD->file->command_flags. - * file.h (struct file): New member `command_flags'. - -Sun Oct 16 01:01:51 1994 Roland McGrath - - * main.c (switches): Bump flag values for --no-print-directory and - --warn-undefined-variables, so neither is 1 (which indicates a - nonoption argument). - -Sat Oct 15 23:39:48 1994 Roland McGrath - - * main.c (main): Add missing code in .IGNORE test. - -Mon Oct 10 04:09:03 1994 Roland McGrath - - * variable.c (define_automatic_variables): Define +D and +F. - -Sat Oct 1 04:07:48 1994 Roland McGrath - - * main.c (main): Define hidden automatic variable with command - vars, and MAKEOVERRIDES to a reference to that. - (define_makeflags): If posix_pedantic, write a reference to that - instead. - -Thu Sep 29 00:14:26 1994 Roland McGrath - - * main.c (posix_pedantic): New variable. - (main): Set posix_pedantic if .POSIX is a target. - Fix .IGNORE and .SILENT checks to require is_target. - - * commands.c (set_file_variables): Define new automatic variable - $+, like $^ but before calling uniquize_deps. - - * job.c (reap_children): Call delete_child_targets for non-signal - error if .DELETE_ON_ERROR is a target. - -Tue Sep 27 01:57:14 1994 Roland McGrath - - * Version 3.71.3. - -Mon Sep 26 18:16:55 1994 Roland McGrath - - * job.c (reap_children): Don't change C->file->command_state when - dying. Test it only after calling start_job_command for a new - command line. When no more cmds, just set C->file->update_status. - (start_job_command): When the last line is empty or under -n, set - C->file->update_status. - (start_waiting_job): Grok cs_not_started after start_job_command - as success. - (new_job): Set C->file->update_status when there are no cmds. - (job_next_command): When out of lines, don't set - CHILD->file->update_status or CHILD->file->command_state. - - * main.c (quote_as_word): Renamed from shell_quote. Take new arg; - if nonzero, also double $s. - (main): Define MAKEOVERRIDES from command_variables here. - (define_makeflags): Don't use command_variables here; instead write a - reference $(MAKEOVERRIDES) in MAKEFLAGS. Make vars recursive. - - * dir.c [__MSDOS__]: Fixed typo. - - * vpath.c (selective_vpath_search): Reset EXISTS when stat fails. - -Sat Sep 10 03:01:35 1994 Roland McGrath - - * remake.c: Include and use assert instead of printfs - and abort. - - * main.c (decode_switches): Loop until optind hits ARGC, not just - until getopt_long returns EOF. Initialize C to zero before loop; - in loop if C is EOF, set optarg from ARGV[optind++], else call - getopt_long. - (decode_env_switches): Use variable_expand instead of - allocated_variable_expand. Allocate a fresh buffer to copy split - words into; scan characters by hand to break words and - debackslashify. - (shell_quote): New function. - (define_makeflags): Allocate doubled space for switch args, and command - variable names and values; use shell_quote to quote those things. - -Fri Sep 9 01:37:47 1994 Roland McGrath - - * Version 3.71.2. - - * acconfig.h: Add HAVE_SYS_SIGLIST and HAVE__SYS_SIGLIST. - - * main.c (decode_switches): The non-option return from getopt is - 1, not 0. - (command_variables): New type and variable. - (decode_switches, decode_env_switches): After making a variable - definition, record the struct variable pointer in the - command_variables chain. - (define_makeflags): If ALL, write variable definitions for - command_variables. - - * main.c (other_args): Variable removed. - (goals, lastgoal): New static variables (moved from auto in main). - (main): Don't process OTHER_ARGS at all. - Don't set variable MAKEOVERRIDES at all; define MAKE to just - $(MAKE_COMMAND). - (init_switches): Prepend a - {return in order} instead of a + - {require order}. - (decode_switches): Don't set OTHER_ARGS at all. - Grok '\0' return from getopt_long as non-option argument; try - variable definition and (if !ENV) enter goal targets here. - (decode_env_switches): Use allocated_variable_expand to store value. - Use find_next_token to simplify word-splitting loop. Don't - prepend a dash to uninterpreted value. Instead, if split into - only one word, try variable definition and failing that prepend a - dash to the word and pass it to decode_switches as a single arg. - -Wed Sep 7 03:02:46 1994 Roland McGrath - - * remake.c (notice_finished_file): Only recheck modtimes if - FILE->command_state was cs_running on entry (meaning the commands - actually just ran). - (update_file_1): Whenever we set FILE->update_status, call - notice_finished_file instead of just set_command_state. - * job.c (start_job_command): Whenever we set - CHILD->file->update_status, call notice_finished_file instead of - just set_command_state. - -Tue Sep 6 19:13:54 1994 Roland McGrath - - * default.c: Add missing ". - - * job.c: Changed all assignments of command_state members to calls - to set_command_state. - * remake.c: Likewise. - * file.c (set_command_state): New function. - * file.h: Declare set_command_state. - - * main.c (init_switches): Put a + first in options. - -Mon Jul 25 18:07:46 1994 Roland McGrath - - Merge MSDOS/GO32 port from DJ Delorie . - * vpath.c: Changed all uses of ':' to PATH_SEPARATOR_CHAR. - * main.c (directory_before_chdir): New variable, moved out of main - (was local). - (main) [__MSDOS__]: Look for \ or : to delimit last component of - PROGRAM. Don't frob ARGV[0] before setting MAKE_COMMAND variable. - (die): Change back to `directory_before_chdir' before dying. - * make.h (PATH_SEPARATOR_CHAR): New macro; differing defns for - [__MSDOS__] and not. - * job.c [__MSDOS__]: Include . - [__MSDOS__] (dos_pid, dos_status, dos_bname, dos_bename, - dos_batch_file): New variables. - (reap_children) [__MSDOS__]: Don't call wait; just examine those vars. - (unblock_sigs) [__MSDOS__]: Do nothing. - (start_job_command) [__MSDOS__]: Use spawnvpe instead of vfork & exec. - (load_too_high) [__MSDOS__]: Always return true. - (search_path) [__MSDOS__]: Check for : or / in FILE to punt. - Use PATH_SEPARATOR_CHAR instead of ':'. - (construct_command_argv_internal) [__MSDOS__]: Wholly different - values for sh_chars and sh_cmds. Wholly new code to handle shell - scripts. - * function.c (expand_function: `shell') [__MSDOS__]: Wholly new - implementation. - * dir.c [__MSDOS__] (dosify): New function. - (dir_contents_file_exists_p) [__MSDOS__]: Call it on FILENAME and - process the result instead of FILENAME itself. - (file_impossible_p) [__MSDOS__]: Likewise. - * default.c [__MSDOS__]: Define GCC_IS_NATIVE. - (default_suffix_rules) [__MSDOS__]: Use `y_tab.c' instead of `y.tab.c'. - (default_variables) [GCC_IS_NATIVE]: Set CC and CXX to `gcc', YACC to - `bison -y', and LEX to `flex'. - * configure.bat, configh.dos: New files. - * commands.c (fatal_error_signal) [__MSDOS__]: Just remove - intermediates and exit. - - * commands.c (set_file_variables): Add parens in length - computation in .SUFFIXES dep loop to quiet compiler warning. From - Jim Meyering. - - * read.c (read_makefile): Free FILENAME if we allocated it. From - Jim Meyering. - -Mon Jul 4 17:47:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * misc.c (safe_stat): New function, EINTR-safe wrapper around stat. - * vpath.c (selective_vpath_search): Use safe_stat in place of stat. - * read.c (construct_include_path): Use safe_stat in place of stat. - * job.c (search_path): Use safe_stat in place of stat. - * dir.c (find_directory): Use safe_stat in place of stat. - * commands.c (delete_target): Use safe_stat in place of stat. - * arscan.c (ar_member_touch) [EINTR]: Do EINTR looping around fstat. - * remake.c (name_mtime): Use safe_stat in place of stat. - (touch_file) [EINTR]: Do EINTR looping around fstat. - -Fri Jun 24 05:40:24 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Check for a shell command first, and - then strip leading tabs before further checking if it's not a - shell command line. - - * make.h [__arm]: Undefine POSIX. - [!__GNU_LIBRARY__ && !POSIX && !_POSIX_VERSION]: Don't declare system - functions that return int. - - * job.c (construct_command_argv_internal): After swallowing a - backslash-newline combination, if INSTRING is set goto string_char - (new label) for normal INSTRING handling code. - -Sat Jun 4 01:11:20 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * configure.in: Don't check for sys_siglist and _sys_siglist with - AC_HAVE_FUNCS. Instead use two AC_COMPILE_CHECKs. - -Mon May 23 18:20:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.71.1 released. - - * make.h [!__GNU_LIBRARY__ && !POSIX]: Also test #ifndef - _POSIX_VERSION for these declarations. - - * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Remove bogus #ifndefs - around #undefs of HAVE_SETREUID and HAVE_SETREGID. - -Sat May 21 16:26:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.71 released. - - * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Don't test [HAVE_SETUID] - and [HAVE_SETGID]. Every system has those, and configure doesn't - check for them. - - * make.h [_POSIX_VERSION]: Don't #define POSIX #ifdef ultrix. - - * compatMakefile (loadavg): Depend on and use loadavg.c instead of - getloadavg.c. - (loadavg.c): Link or copy it from getloadavg.c. - (distclean): Remove loadavg.c. - -Mon May 16 22:59:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.70.4. - - * misc.c [GETLOADAVG_PRIVILEGED] [! POSIX]: Undefine HAVE_SETEUID - and HAVE_SETEGID. - - * default.c (default_terminal_rules): In SCCS rules, put - $(SCCS_OUTPUT_OPTION) before $<. On some systems -G is grokked - only before the file name. - * configure.in (SCCS_GET_MINUS_G check): Put -G flag before file name. - -Tue May 10 16:27:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): Swallow - backslash-newline combinations inside '' strings too. - -Thu May 5 04:15:10 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (do_define): Call collapse_continuations on each line - before all else. - -Mon Apr 25 19:32:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): Notice newline inside - '' string when RESTP is non-null. - -Fri Apr 22 17:33:30 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.70.3. - - * remake.c (update_goal_chain): Reset FILE to G->file after the - double-colon loop so it is never null for following code. - - * read.c (read_makefile): Fix `override define' parsing to skip - whitespace after `define' properly. - - * compatMakefile (srcdir): Define as @srcdir@; don't reference - $(VPATH). - (glob/Makefile): New target. - -Thu Apr 21 16:16:55 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.70.2. - - * misc.c (remove_comments): Use find_char_unquote. - * make.h (find_char_unquote): Declare it. - * read.c (find_char_unquote): New function, generalized from - find_percent. - (find_percent, find_semicolon, parse_file_seq): Use that. - -Wed Apr 20 18:42:39 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * implicit.c (pattern_search): Always allocate new storage for - FILE->stem. It is not safe to store STEM's address because it - might be auto storage. - - * configure.in: Check for seteuid and setegid. - * misc.c [HAVE_SETEUID]: Declare seteuid. - [HAVE_SETEGID]: Declare setegid. - (make_access, user_access) [HAVE_SETEUID]: Use seteuid. - [HAVE_SETEGID]: Use setegid. - - * remake.c (update_goal_chain): Set STATUS to FILE->update_status, - to preserve whether it's 2 for error or 1 for -q trigger. When - STATUS gets nonzero and -q is set, always stop immediately. - * main.c (main, decode_switches): Die with 2 for errors. - (main): Accept 2 return from update_goal_chain and die with that. - * misc.c (fatal, makefile_fatal): Die with 2; 1 is reserved for -q - answer. - * job.c (reap_children): Die with 2 for error. - (start_job_command): Set update_status to 2 for error. Set it to - 1 when we would run a command and question_flag is set. - - * read.c (read_makefile): Don't mark makefiles as precious. Just - like other targets, they can be left inconsistent and in need of - remaking by aborted commands. - - * read.c (read_makefile): Write no error msg for -include file. - -Tue Apr 5 05:22:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * commands.c (fatal_error_signal): Don't unblock signals. - - * file.h (struct file): Change member `double_colon' from flag to - `struct file *'. - * read.c (record_files): Set double_colon pointer instead of flag. - * main.c (main): When disqualifying makefiles for updating, use - double_colon pointer to find all entries for a file. - * file.c (enter_file): If there is already a double-colon entry - for the file, set NEW->double_colon to that pointer. - (file_hash_enter): Use FILE->double_colon to find all entries to - set name. - * remake.c (update_goal_chain): Do inner loop on double-colon entries. - (update_file): Use FILE->double_colon pointer to find all entries. - (f_mtime): Likewise. - (notice_finished_file): Propagate mtime change to all entries. - - * variable.c (try_variable_definition): Return after abort. - -Fri Apr 1 18:44:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Remove unused variable. - (parse_file_seq): When removing an elt that is just `)', properly - fix up the previous elt's next pointer. - -Mon Mar 28 18:31:49 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu) - - * configure.in: Do AC_SET_MAKE. - * GNUmakefile (Makefile.in): Edit MAKE assignment into @SET_MAKE@. - -Fri Mar 4 00:02:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * function.c (subst_expand): If BY_WORD or SUFFIX_ONLY is set and - the search string is the empty string, find a match at the end of - each word (using end_of_token in place of sindex). - - * misc.c (end_of_token): Don't treat backslashes specially; you - can no longer escape blanks with backslashes in export, unexport, - and vpath. This was never documented anyway. - -Thu Mar 3 23:53:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Variable name for `define' is not just - first token; use whole rest of line and strip trailing blanks. - -Wed Feb 16 16:03:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.70.1. - - * read.c (read_makefile): Add -d msg stating args. - - * read.c (read_makefile): Use isspace to skip over leading - whitespace, and explicitly avoid skipping over tabs. Don't want - to skip just spaces though; formfeeds et al should be skipped. - - * default.c (default_variables) [__hpux]: Add f in ARFLAGS. - - * arscan.c (ar_name_equal) [__hpux]: Subtract 2 instead of 1 from - sizeof ar_name for max length to compare. - - * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Undefine HAVE_SETREUID - #ifdef HAVE_SETUID; likewise HAVE_SETREGID and HAVE_SETGID. - - * main.c (main): Call user_access after setting `program', in case - it needs to use it in an error message. - - * read.c (read_makefile): Ignore an empty line starting with a tab. - -Thu Feb 10 21:45:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in (AC_SYS_SIGLIST_DECLARED): Use this instead of - AC_COMPILE_CHECK that is now its contents. - -Fri Feb 4 16:28:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * make.h: #undef strerror after #include . - [! ANSI_STRING]: Declare strerror. - -Thu Feb 3 02:21:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * misc.c (strerror): #undef any macro before function definition. - -Mon Jan 31 19:07:23 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * variable.c (try_variable_definition): Calculate BEG before loop - to strip blanks by decrementing END. Don't decr END to before BEG. - - * read.c (read_makefile): Skip over leading space characters, but - not tabs, after removing continuations and comments (it used to - use isspace). - -Tue Jan 25 16:45:05 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * variable.c (define_automatic_variables): In $(@D) et al, use - patsubst to remove trailing slash. - - * commands.c (delete_target): New function, broken out of - delete_child_targets. Check for archive members and give special msg. - (delete_child_targets): Use delete_target. - -Mon Jan 17 17:03:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * default.c (default_suffix_rules): Use $(TEXI2DVI_FLAGS) in - texi2dvi rules. Use $(MAKEINFO_FLAGS) in makeinfo rules. - -Tue Jan 11 19:29:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * GNUmakefile (tarfiles): Omit make-doc. - (make-$(version).tar): Include make.info*. - -Fri Jan 7 16:27:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (configure, config.h.in): Comment out rules. - -Thu Jan 6 18:08:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (binprefix, manprefix): New variables. - (instname): Variable removed. - (install): Use $({bin,man}prefix)make in place of $(instname). - File targets likewised renamed. - -Mon Jan 3 17:50:25 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.70 released. - -Thu Dec 23 14:46:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.69.3. - - * read.c (parse_file_seq): Inside multi-word archive ref - translation loop, check NEW1==0 at end and break out of the loop. - - * GNUmakefile (make-$(version).tar): Distribute install.sh. - * install.sh: New file. - - * configure.in (SCCS_GET_MINUS_G check): Put redirection for admin - cmds outside subshell parens, to avoid "command not found" msgs - from the shell. - -Wed Dec 22 17:00:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in (SCCS_GET_MINUS_G check): Put -G flag last in get cmd. - Redirect output & error from get to /dev/null. - Fix reversed sense of test. - -Fri Dec 17 15:31:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in (SCCS_GET_MINUS_G check): Use parens instead of - braces inside if condition command; some shells lose. - -Thu Dec 16 15:10:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.69.2. - - * arscan.c [M_UNIX]: Move #undef M_XENIX for PORTAR stuff. - (PORTAR) [M_XENIX]: Define to 0 instead of 1. - - * main.c (define_makeflags): Only export MAKEFLAGS if !ALL. - -Wed Dec 15 17:47:48 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (main): Cast result of pointer arith to unsigned int - before passing to define_variable for envars. Matters when - sizeof(unsigned)!=sizeof(ptrdiff_t). - -Tue Dec 14 14:21:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in: Add new check for SCCS_GET_MINUS_G. - * config.h.in: Add #undef SCCS_GET_MINUS_G. - * default.c (default_terminal_rules): Use `$(SCCS_OUTPUT_OPTION)' in - place of `-G $@' in SCCS commands. - (default_variables) [SCCS_GET_MINUS_G]: Define SCCS_OUTPUT_OPTION - to "-G$@". - - * configure.in (AC_OUTPUT): Put touch stamp-config in second arg - (so it goes in config.status), rather than afterward. - - * ar.c (ar_member_date): Don't call enter_file on the archive file - if it doesn't exist (by file_exists_p). - - * compatMakefile ($(infodir)/make.info): Replace `$$d/foo.info' - with `$$dir/make.info' in install-info invocation (oops). - - * vpath.c (construct_vpath_list): Only set LASTPATH set PATH when - we do not unlink and free PATH. - - * file.c (print_file_data_base): Fix inverted calculation for - average files per hash bucket. - - * read.c (readline): When we see a NUL, give only a warning and - synthesize a newline to terminate the building line (used to - fatal). Move fgets call into the loop condition, and after the - loop test ferror (used to test !feof in the loop). - -Fri Dec 3 16:40:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in: Check for strerror in AC_HAVE_FUNCS. - -Thu Dec 2 15:37:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - Differentiate different flavors of missing makefile error msgs, - removing gratuitous `fopen: ' and giving caller for included makefiles. - * misc.c [! HAVE_STRERROR]: Define our own strerror here. - (perror_with_name, pfatal_with_name): Use strerror instead of - replicating its functionality. - * read.c (read_makefile): Return int instead of void. - (read_all_makefiles, read_makefile): Change callers to notice zero - return and give error msg. - -Thu Nov 11 11:47:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.69.1. - - * default.c: Put `-G $@' before $< in SCCS cmds. - -Wed Nov 10 06:06:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): After trying a variable defn, notice if - the line begins with a tab, and diagnose an error. - -Sun Nov 7 08:07:37 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.69. - -Wed Nov 3 06:54:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.10. - - * implicit.c (try_implicit_rule): Look for a normal rule before an - archive rule. - -Fri Oct 29 16:45:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * function.c (expand_function: `sort'): Double NWORDS when it - overflows, instead of adding five. - - * compatMakefile (clean): Remove loadavg. - -Wed Oct 27 17:58:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.9. - - * file.h (NEW_MTIME): Define new macro. - * main.c (main): Set time of NEW_FILES to NEW_MTIME, not to - current time returned from system. Removed variable NOW. - * remake.c (notice_finished_file): Use NEW_MTIME in place of - current time here too. - -Tue Oct 26 19:45:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.8. - - * remake.c (update_file_1): Don't clear MUST_MAKE when FILE has no - cmds and !DEPS_CHANGED unless also !NOEXIST. - -Mon Oct 25 15:25:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (parse_file_seq): When converting multi-word archive - refs, ignore a word beginning with a '('. - -Fri Oct 22 02:53:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in: Check for sys/timeb.h. - * make.h [HAVE_SYS_TIMEB_H]: Test this before including it. - -Thu Oct 21 16:48:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.7. - - * rule.c (convert_suffix_rule): New local TARGPERCENT. Set it to - TARGNAME+1 for "(%.o)", to TARGNAME for "%.?". Use it in place of - TARGNAME to initialize PERCENTS[0]. - -Mon Oct 18 06:49:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H. - Remove AC_USG; it is no longer used. - - * file.c (print_file): New function, broken out of - print_file_data_base. - (print_file_data_base): Call it. - * rule.c (print_rule): New function, broken out of - print_rule_data_base. - (print_rule_data_base): Call it. - -Thu Oct 14 14:54:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * default.c (install_default_suffix_rules): New function, broken - out of install_default_implicit_rules. - (install_default_implicit_rules): Move suffix rule code there. - * make.h: Declare install_default_suffix_rules. - * main.c (main): Call install_default_suffix_rules before reading - makefiles. Move convert_to_pattern call before - install_default_implicit_rules. - - * job.h (struct child): Make `pid' member type `pid_t' instead of - `int'. - - * compatMakefile (RANLIB): New variable, set by configure. - (glob/libglob.a): Pass RANLIB value down to submake. - - Fixes for SCO 3.2 "devsys 4.2" from pss@tfn.com (Peter Salvitti). - * make.h: Include before for SCO lossage. - * job.c [! getdtablesize] [! HAVE_GETDTABLESIZE]: If NOFILE is not - defined but NOFILES_MAX is, define it to be that. - -Mon Oct 11 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * GNUmakefile (make-$(version).tar): Depend on acconfig.h, so it - is distributed. - -Sun Oct 3 15:15:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * default.c (default_terminal_rules): Add `-G $@' to SCCS get cmds. - -Tue Sep 28 14:18:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): Add ^ to SH_CHARS; it - is another symbol for | in some shells. - * main.c (main): Add it to CMD_DEFS quoting list as well. - -Mon Sep 20 18:05:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): Remove '=' from - SH_CHARS. Only punt on '=' if it is unquoted in a word before the - first word without an unquoted '='. - - * main.c (define_makeflags): Set v_export for MAKEFLAGS. - -Fri Sep 17 00:37:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * remake.c (update_file_1): Use .DEFAULT cmds for phony targets. - - * make.h [_AIX && _POSIX_SOURCE]: Define POSIX. - - * commands.c (delete_child_targets): Don't delete phony files. - - * job.c (start_job_command): Set COMMANDS_RECURSE in FLAGS if we - see a `+' at the beginning of the command line. - -Thu Sep 9 17:57:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.6. - -Wed Sep 8 20:14:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (define_makeflags): Define MAKEFLAGS with o_file, not o_env. - -Mon Aug 30 12:31:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * expand.c (variable_expand): Fatal on an unterminated reference. - -Thu Aug 19 16:27:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.5. - - * variable.c (define_automatic_variables): Define new o_default - variable `MAKE_VERSION' from version_string and remote_description. - - * make.h (version_string, remote_description): Declare these here. - * main.c: Don't declare version_string. - (print_version): Don't declare remote_description. - -Wed Aug 18 15:01:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Free space pointed to by CONDITIONALS - before restoring the old pointer. - -Mon Aug 16 17:33:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile ($(objs)): Depend on config.h. - - * GNUmakefile (build.sh.in): Depend on compatMakefile. - - * configure.in: Touch stamp-config after AC_OUTPUT. - -Fri Aug 13 16:04:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.4. - -Thu Aug 12 17:18:57 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * make.h: Include instead of "config.h". - -Wed Aug 11 02:35:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (main): Make all variables interned from ENVP be v_export. - * variable.c (try_variable_definition): In v_default case, don't - check for an o_file variable that `getenv' finds. - - * job.c (reap_children): New local variable ANY_LOCAL; set it - while setting ANY_REMOTE. If !ANY_LOCAL, don't wait for local kids. - - * main.c (main): Don't call decode_env_switches on MFLAGS. DOC THIS. - - * function.c (expand_function): #if 0 out freeing of ENVP since it - is environ. - -Mon Aug 9 17:37:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.3. - - * remote-stub.c (remote_status): Set errno to ECHILD before return. - * job.c (reap_children): Scan the chain for remote children and - never call remote_status if there are none. - - * function.c (expand_function: `shell'): #if 0 out calling - target_environment; just set ENVP to environ instead. - - * job.c (reap_children): Check for negative return from - remote_status and fatal for it. - When blocking local child wait returns 0, then try a blocking call - to remote_status. - -Tue Aug 3 00:19:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (clean): Delete make.info* and make.dvi here. - (distclean): Not here. - - * dep.h (RM_*): Use #defines instead of enum to avoid lossage from - compilers that don't like enum values used as ints. - -Mon Aug 2 16:46:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (loadavg): Add $(LOADLIBES). - -Sun Aug 1 16:01:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.2. - - * compatMakefile (loadavg, check-loadavg): New targets. - (check): Depend on check-loadavg. - - * compatMakefile (glob/libglob.a): Depend on config.h. - - * misc.c (log_access): Write to stderr instead of stdout. - -Fri Jul 30 00:07:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68.1. - -Thu Jul 29 23:26:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in (SYS_SIGLIST_DECLARED): In test program include - #ifdef HAVE_UNISTD_H. - - * compatMakefile (.PHONY): Put after `all' et al. - - * configure.in: Add AC_IRIX_SUN. - -Wed Jul 28 17:41:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.68. - -Mon Jul 26 14:36:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.8. - -Sun Jul 25 22:09:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.7. - - * compatMakefile ($(infodir)/make.info): Don't use $(instname). - Run install-info script if present. - -Fri Jul 23 16:03:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * make.h [STAT_MACROS_BROKEN]: Test this instead of [uts]. - - * configure.in: Add AC_STAT_MACROS_BROKEN. - -Wed Jul 14 18:48:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.6. - - * read.c (read_makefile): Recognize directive `-include', like - `include' but sets RM_DONTCARE flag. - - * variable.c (target_environment): If FILE is nil, use - current_variable_set_list in place of FILE->variables. - * function.c (expand_function: `shell'): Get an environment for - the child from target_environment instead of using environ. - - * dep.h: Declare read_all_makefiles here. - (RM_*): Define new enum constants. - * read.c (read_makefile): Second arg is FLAGS instead of TYPE. - Treat it as a bit mask containing RM_*. - (read_all_makefiles): For default makefiles, set D->changed to - RM_DONTCARE instead of 1. - * main.c: Don't declare read_all_makefiles here. - (main): Check `changed' member of read_makefiles elts for RM_* - flags instead of specific integer values. - -Mon Jul 12 22:42:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * make.h [sequent && i386]: #undef POSIX. From trost@cse.ogi.edu. - -Thu Jul 8 19:51:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * vpath.c (construct_vpath_list): If ELEM is zero 0, free PATTERN - as well as VPATH. - (build_vpath_lists): Empty `vpaths' around construct_vpath_list - call for $(VPATH). Expand $(strip $(VPATH)), not just $(VPATH). - - * rule.c (convert_suffix_rule): Use alloca instead of xmalloc for - PERCENTS, whose storage is not consumed by create_pattern_rule. - - * make.h [__mips && _SYSTYPE_SVR3]: #undef POSIX. - -Wed Jun 30 18:11:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.5. - - * rule.c (max_pattern_targets): New variable. - (count_implicit_rule_limits): Compute its value. - * rule.h: Declare it. - * implicit.c (pattern_search): Make TRYRULES max_target_patterns - times bigger. Move adding new TRYRULES elt inside the inner - targets loop, so each matching target gets its own elt in MATCHES - and CHECKED_LASTSLASH. - - * file.c (remove_intermediates): If SIG!=0 say `intermediate file' - instead of just `file' in error msg. - -Fri Jun 25 14:55:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (construct_command_argv): Turn off - --warn-undefined-variables around expansion of SHELL and IFS. - * read.c (tilde_expand): Likewise for HOME. - (read_all_makefiles): Likewise for MAKEFILES. - * vpath.c (build_vpath_lists): Likewise for VPATH. - - * main.c (warn_undefined_variables_flag): New flag variable. - (switches): Add --warn-undefined-variables. - * make.h (warn_undefined_variables_flag): Declare it. - * expand.c (warn_undefined): New function. - (reference_variable): Call it if the variable is undefined. - (variable_expand): In substitution ref, call warn_undefined if the - variable is undefined. - - * default.c (default_pattern_rules): Add `%.c: %.w %.ch' and - `%.tex: %.w %.ch' rules. - (default_suffix_rules: .w.c, .w.tex): Pass three args: $< - $@. - (default_suffixes): Add `.ch'. - -Mon Jun 21 17:55:39 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * default.c (default_suffixes): Replace `.cweb' with `.w'. - (default_suffix_rules): Rename `.cweb.c' and `.cweb.tex' to `.w.c' - and `.w.tex'. - -Fri Jun 11 14:42:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile ($(bindir)/$(instname)): Add missing backslash. - -Thu Jun 10 18:14:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.4. - - * read.c (multi_glob): Don't free OLD and OLD->name in the - FOUND!=0 fork. Use new block-local variable F instead of - clobbering OLD. - - * ar.c (glob_pattern_p): New function, snarfed from glob/glob.c. - (ar_glob): Call it; return nil immediately if MEMBER_PATTERN - contains no metacharacters. - -Wed Jun 9 16:25:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * ar.c (ar_glob{_match,_alphacompare}): New function. - - * dep.h [! NO_ARCHIVES]: Declare it. - * read.c (multi_glob) [! NO_ARCHIVES]: Use it on archive member elts. - - * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to - multi_glob (which doesn't take a 3rd arg). - * rule.c (install_pattern_rule): Likewise. - * default.c (set_default_suffixes): Here too. - * function.c (string_glob): Don't pass gratuitous arg to multi_glob. - - * read.c (parse_file_seq) [! NO_ARCHIVES]: Add post-processing - loop to translate archive refs "lib(a b)" into "lib(a) lib(b)". - -Mon Jun 7 19:26:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (installdirs): Actually pass directory names. - ($(bindir)/$(instname)): Test chgrp&&chmod exit status with `if'; - if it fails, echo a warning msg, but don't make the rule fail. - - * read.c (tilde_expand): New function, broken out of tilde_expand. - (multi_glob): Call it. - (construct_include_path): Expand ~ in directory names. - * dep.h: Declare tilde_expand. - * main.c (enter_command_line_file): Expand ~ at the start of NAME. - (main): Expand ~ in -C args. - * read.c (read_makefile): Expand ~ in FILENAME unless TYPE==2. - -Fri Jun 4 13:34:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (decode_env_switches): Use xmalloc instead of alloca for ARGS. - - * main.c (main): Put result of alloca in temporary variable with - simple assignment, to make SGI compiler happy. - -Thu Jun 3 20:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.3. - - * main.c (main): Before re-execing, remove intermediate files, and - print the data base under -p. Sexier debugging message. - - * implicit.c (pattern_search): Allocate an extra copy of the name - of a winning intermediate file when putting it in FOUND_FILES. - -Wed Jun 2 16:38:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to - multi_glob (which doesn't take a 3rd arg). - - * dir.c (dir_contents_file_exists_p): When reading dirents, ignore - chars within D_NAMLEN that are NULs. - - * main.c (decode_switches): Don't savestring ARGV[0] to put it - into `other_args'. - For string switch, don't savestring `optarg'. - (main): Don't free elts of makefiles->list that are "-". - Use alloca'd rather than savestring'd storage for elts of - makefiles->list that are temporary file names. - * read.c (read_all_makefiles): Don't free *MAKEFILES. - * file.c (enter_file): Don't strip `./'s. - * main.c (enter_command_line_file): New function. - (main): Use it in place of enter_file for command-line goals from - other_files, and for old_files and new_files. - -Mon May 31 18:41:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.2. - - * compatMakefile (.SUFFIXES): Add .info. - ($(infodir)/$(instname).info): Find make.info* in cwd if there, - else in $srcdir. Use basename to remove dir name from installed name. - -Thu May 27 17:35:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * implicit.c (pattern_search): When interning FOUND_FILES, try - lookup_file first; if found, free the storage for our copy of the name. - -Wed May 26 14:31:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67.1. - - * main.c (decode_switches): In usage msg, write `--switch=ARG' or - `--switch[=OPTARG]' rather than `--switch ARG' or `--switch [ARG]'. - -Mon May 24 16:17:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * rule.c (convert_suffix_rule): New function. - (convert_to_pattern): Use it instead of doing all the work here - several times. - For target suffix `.a', generate both the archive magic rule and - the normal rule. - - * compatMakefile (distclean): Remove stamp-config. - -Sat May 22 16:15:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.67. - - * file.c (remove_intermediates): Don't write extra space after `rm'. - - * main.c (struct command_switch.type): Remove `usage_and_exit'. - (print_usage_flag): New variable. - (switches: --help): Make type `flag', to set print_usage_flag. - (init_switches): Remove `usage_and_exit' case. - (decode_switches): Likewise. - (decode_switches): Print usage if print_usage_flag is set. - When printing usage, die with status of BAD. - (main): Die with 0 if print_version_flag. - -Fri May 21 16:09:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.66. - -Wed May 19 21:30:44 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (installdirs): New target. - (install): Depend on it. - -Sun May 16 20:15:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.65.2. - -Fri May 14 16:40:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * vpath.c (construct_vpath_list): In removal loop for DIRPATH==0, - set LASTPATH to PATH, not NEXT. - - * dir.c (read_dirstream): Break out of loop after incrementing - DS->buckets such that it reaches DIRFILE_BUCKETS; avoid trying to - dereference DS->contents->files[DIRFILE_BUCKETS]. - - * read.c (read_makefile): Clear no_targets after reading a - targetful rule line. - - * main.c (main): If print_version_flag is set, exit after printing - the version. - (switches): Change --version docstring to say it exits. - - * make.h [butterfly]: #undef POSIX. - -Wed May 12 15:20:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.65.1. - - * arscan.c (ar_scan) [! AIAMAG]: Don't declare LONG_NAME. - [AIAMAG]: Pass TRUNCATE flag arg to (*FUNCTION), always zero. - - * function.c (handle_function): Use fatal instead of - makefile_fatal when reading_filename is nil. - - * configure.in: Add AC_GETGROUPS_T. - * job.c (search_path): Use GETGROUPS_T in place of gid_t. - -Sun May 9 15:41:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.65. - -Fri May 7 18:34:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * function.c (handle_function): Fatal for unmatched paren. - -Thu May 6 16:13:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.64.3. - - * commands.c (handling_fatal_signal): New variable. - (fatal_error_signal): Set it. - * job.c (reap_children): Avoid nonreentrant operations if that is set. - * make.h: Declare handling_fatal_signal. - - * expand.c (reference_variable): New function, snippet of code - broken out of simple-reference case of variable_expand. - (variable_expand): Use it for simple refs. - (variable_expand): When checking for a computed variable name, - notice a colon that comes before the final CLOSEPAREN. Expand - only up to the colon, and then replace the pending text with a - copy containing the expanded name and fall through to subst ref - handling. - (variable_expand): Don't bother expanding the name if a colon - appears before the first $. - (expand_argument): Use alloca instead of savestring. - (variable_expand): For subst ref, expand both sides of = before - passing to [pat]subst_expand. Use find_percent instead of lindex - to check the lhs for a %. - -Wed May 5 14:45:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.64.2. - -Mon May 3 17:00:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * arscan.c (ar_name_equal) [AIAMAG]: Abort if TRUNCATED is nonzero. - - * read.c (read_makefile): Pass extra arg of 1 to parse_file_seq, - not to multi_glob. - -Thu Apr 29 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.64.1. - - * arscan.c (ar_scan): New local flag var LONG_NAME. Set it when - we read the member name in any of the fashions that allow it to be - arbitrarily long. Pass its negation to FUNCTION. - (describe_member): Take TRUNCATED from ar_scan and print it. - (ar_name_equal): Take new arg TRUNCATED; if nonzero, compare only - the first sizeof (struct ar_hdr.ar_name) chars. - (ar_member_pos): Take TRUNCATED from ar_scan, pass to ar_name_equal. - * ar.c (ar_member_date_1): Likewise. - -Wed Apr 28 21:18:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (reap_children): Before calling start_job_command to start - the next command line, reset C->remote by calling start_remote_job_p. - -Mon Apr 26 15:56:15 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * arscan.c (ar_scan): New local var NAMEMAP. - In loop, rename NAME to NAMEBUF; new var NAME is a pointer; new - flag IS_NAMEMAP. When extracting the member name, always put a - null at its end first. If the name is "//" or "/ARFILENAMES", set - IS_NAMEMAP. If we have already read in NAMEMAP, and NAME looks - like " /N", get full name from NAMEMAP+N. - Else if NAME looks like "#1/N", read N chars from the - elt data to be the full name. At end of loop, if IS_NAMEMAP, read - the elt's data into alloca'd NAMEMAP. - (ar_name_equal): #if 0 truncating code. - - * make.h: Don't declare vfork at all. It returns int anyway, - unless declared it; and we conflicted with some systems. - - * main.c (define_makeflags): If FLAGSTRING[1] is '-', define - MAKEFLAGS to all of FLAGSTRING, not &FLAGSTRING[1]. Don't want to - define it to something like "-no-print-directory". - Use %g format instead of %f for floating-valued things. - -Thu Apr 22 18:40:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * GNUmakefile (Makefile.in): Use a substitution ref on nolib-deps - to change remote-%.dep to remote-stub.dep. - -Wed Apr 21 15:17:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.64. - -Fri Apr 16 14:22:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (install): Remove - prefix from chgrp+chmod. - - * Version 3.63.8. - -Thu Apr 15 18:24:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * acconfig.h: New file; contains "#undef SCCS_GET" for autoheader. - * configure.in: If /usr/sccs/get exists, define SCCS_GET to that, - else to "get". - * default.c (default_variables): Set GET to macro SCCS_GET. - - * read.c (parse_file_seq): Take extra arg STRIP; strip `./' only - if nonzero. I hope this is the last time this argument is added - or removed. - (read_makefile): Pass it 1 when parsing include file names. - Pass it 1 when parsing target file names. - Pass it 1 when parsing static pattern target pattern names. - * rule.c (install_pattern_rule): Pass it 1 when parsing rule deps. - * default.c (set_default_suffixes): Pass it 1 when parsing - default_suffixes. - * function.c (string_glob): Pass it 0 here. - -Wed Apr 14 11:32:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * misc.c (log_access): New function. - ({init,user,make,child}_access): Call it. - (child_access): Abort if !access_inited. - - * main.c (switches: --no-print-directory): Use 1 instead of -1 for - single-letter option. - (init_switches, decode_switches, define_makeflags): An option with - no single-letter version is no longer indicated by a value of -1; - instead a value that is !isalnum. - (init_switches): Don't put such switches into the string, only - into the long_option table. - - * make.h [!NSIG] [!_NSIG]: #define NSIG 32. - - * job.c [HAVE_WAITPID]: Remove #undef HAVE_UNION_WAIT. AIX's - bsdcc defined WIF* to use union wait. - - * main.c (struct command_switch): Change member `c' to type int. - (switches): Make const. - (decode_switches): Use `const struct command_switch *'. - (define_makeflags): Likewise. - - * default.c (default_suffix_rules): Add `-o $@' to makeinfo rules. - -Mon Apr 12 12:30:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.63.7. - - * configure.in (AC_HAVE_HEADERS): Check for string.h and memory.h. - Removed AC_MEMORY_H. - * make.h [USG, NeXT]: Don't test these. - [HAVE_STRING_H]: Test this to include string.h and define ANSI_STRING. - [HAVE_MEMORY_H]: Test this instead of NEED_MEMORY_H. - [! ANSI_STRING]: Put decls of bcopy et al here. - [sparc]: Don't test this for alloca.h; HAVE_ALLOCA_H is sufficient. - [HAVE_SIGSETMASK]: Test this rather than USG. - [__GNU_LIBRARY__ || POSIX]: Don't #include again. - * main.c (main): Handle SIGCHLD if defined, and SIGCLD if defined. - It doesn't hurt to do both if they are both defined, and testing - USG is useless. - * dir.c: Rationalize directory header conditionals. - * arscan.c [HAVE_FCNTL_H]: Test this rather than USG || POSIX. - - * default.c (default_suffixes): Add `.txinfo'. - (default_suffix_rules): Add `.txinfo.info' and `.txinfo.dvi' rules. - - * variable.c (try_variable_definition): Replace RECURSIVE flag - with enum FLAVOR, which can be simple, recursive, or append. - Recognize += as append flavor. Set new variable VALUE in a switch - on FLAVOR. For append flavor, prepend the variable's old value. - If the variable was previously defined recursive, set FLAVOR to - recursive; if it was defined simple, expand the new value before - appending it to the old value. Pass RECURSIVE flag to - define_variable iff FLAVOR == recursive. - - * variable.c (try_variable_definition): Use alloca and bcopy for - NAME, instead of savestring. Might as well use stack storage - since we free it immediately anyway. - -Thu Apr 8 18:04:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (start_waiting_jobs): Move decl of JOB outside of loop. - - * main.c (define_makeflags): Rename `struct flag' member `switch' - to `cs', which is not a reserved word. - -Wed Apr 7 15:30:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (new_job): Call start_waiting_jobs first thing. - (start_waiting_job): Changed return type from void to int. - Return 0 when putting the child on the waiting_jobs chain. - (start_waiting_jobs): Don't check load and job_slots here. - Always take a job off the chain and call start_waiting_job on it; - give up and return when start_waiting_job returns zero. - - * main.c (define_makeflags: struct flag): Change member `char c' to - `struct command_switch *switch'. - (ADD_FLAG): Set that to CS instead of CS->c. - If CS->c is -1, increment FLAGSLEN for the long name. - When writing out FLAGS, handle FLAGS->switch->c == -1 and write - the long name instead. - - * compatMakefile (stamp-config): New target of old config.h rule. - Touch stamp-config after running config.status. - (config.h): Just depend on stamp-config, and have empty commands. - -Mon Apr 5 20:14:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c [HAVE_WAITPID]: #undef HAVE_UNION_WAIT. - - * configure.in (AC_HAVE_FUNCS): Check for psignal. - -Fri Apr 2 17:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (long_option_aliases): Remove "new"; it is already an - unambiguous prefix of "new-file". - -Sun Mar 28 16:57:17 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.63.6. - -Wed Mar 24 14:26:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * vpath.c (selective_vpath_search): When adding the - name-within-directory at the end of NAME, and we don't add a - slash, don't copy FILENAME in one char too far into NAME. - - * variable.c (define_automatic_variables): Find default_shell's - length with strlen, not numerology. - -Wed Mar 17 20:02:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (define_makeflags): Add the elts of a string option in - reverse order, so they come out right when reversed again. - -Fri Mar 12 15:38:45 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile (make.info): Use `-o make.info'. - -Thu Mar 11 14:13:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile (REMOTE): Set to @REMOTE@; change comments to - reflect new use. - (objs): Replace remote.o with remote-$(REMOTE).o. - (srcs): Replace remote.c with remote-$(REMOTE).c. - (remote.o): Rule removed. - - * configure.in (REMOTE): Subst this in Makefile et al; default "stub". - Use AC_WITH to grok --with-customs arg to set REMOTE=cstms. - * GNUmakefile (build.sh.in): Filter out remote-% from objs list. - * build.template (REMOTE): New var; set to @REMOTE@. - (objs): Add remote-${REMOTE}.o. - -Wed Mar 10 15:12:24 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.63.5. - - * implicit.c (pattern_search): Fix "dependent"->"dependency" in - "Rejecting impossible" -d msg. - - * file.c (file_hash_enter): New local vars {OLD,NEW}BUCKET. Store - mod'd values there; never mod {OLD,NEW}HASH. - -Mon Mar 8 13:32:48 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * remake.c [eta10]: Include instead of . - - * compatMakefile (VPATH): Set this to @srcdir@. - (srcdir): Set this to $(VPATH). - - * main.c (main): New local var DIRECTORY_BEFORE_CHDIR. Save in it - a copy of CURRENT_DIRECTORY after the first getcwd. Use it - instead of CURRENT_DIRECTORY when chdir'ing back before re-execing. - - * remake.c (notice_finished_file): Pass missing SEARCH arg to f_mtime. - - * read.c (read_makefile): Remove extraneous arg to parse_file_seq. - -Mon Feb 22 14:19:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile ($(infodir)/$(instname).info): Use , instead of / - as the sed delimiter char. - -Sun Feb 21 14:11:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.63.4. - - * rule.h (struct rule): Removed `subdir' member. - * rule.c (new_pattern_rule): No need to clear it. - (count_implicit_rule_limits): Set the `changed' flag in each dep - that refers to a nonexistent directory. No longer set rule-global - `subdir' flag with that information. - (print_rule_data_base): Don't record info on `subdir' flags. - - * implicit.c (pattern_search): Check the DEP->changed flag rather - than the (now gone) RULE->subdir flag. Also test CHECK_LASTSLASH; - if it is set, the file might exist even though the DEP->changed - flag is set. - - * rule.c (count_implicit_rule_limits): Pass "", not ".", as file - name arg to dir_file_exists_p to check for existence of directory. - - * implicit.c (pattern_search): Inside dep-finding loop, set - CHECK_LASTSLASH from the value recorded in CHECKED_LASTSLASH[I], - rather than computing it anew. - - * commands.c (set_file_variables): Must alloca space for PERCENT - and copy it, to avoid leaving the trailing `)' in the value. - - * misc.c (remove_comments): Fixed backslash-checking loop - condition to allow it to look at the first char on the line. - P2 >= LINE, not P2 > LINE. - - * compatMakefile ($(bindir)/$(instname)): Before moving $@.new to - $@, rm $@.old and mv $@ to $@.old. - - * variable.c (try_variable_definition): Take new args FILENAME and - LINENO. Fatal if the variable name is empty. - * read.c (read_makefile): Change callers. - * main.c (main): Likewise. - - * compatMakefile (group): Define to @KMEM_GROUP@, autoconf magic - that configure will replace with the group owning /dev/kmem. - -Mon Feb 8 14:26:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * vpath.c (vpath_search): Take second arg MTIME_PTR, pass thru to - selective_vpath_search. - (selective_vpath_search): Take second arg MTIME_PTR. - If the dir cache thinks a file exists, stat it to make sure, and - put the modtime in *MTIME_PTR. - * remake.c (library_search): Take second arg MTIME_PTR. - When we find a match, record its mtime there. - Pass MTIME_PTR through to vpath_search to do same. - (f_mtime): Pass &MTIME as new 2nd arg to {vpath,library}_search; - store it in FILE->last_mtime if set nonzero. - * implicit.c (pattern_search): Pass nil 2nd arg to vpath_search. - - * compatMakefile (remote.o): Prepend `$(srcdir)/' to `remote-*.c', - so globbing looks somewhere it will find things. - - * compatMakefile ($(infodir)/$(instname).info): Install `make.info*' - not `$(srcdir)/make.info*'; no need to use basename. - -Fri Feb 5 12:52:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.63.3. - - * compatMakefile (install): Add missing ;\s. - - Make -, @, and + prefixes on a pre-expanded command line affect - all lines in the expansion, not just the first. - * commands.h (struct commands): Replace `lines_recurse' member - with `lines_flags'. - (COMMANDS_{RECURSE,SILENT,NOERROR}): New macros, bits to set in - that flag byte. - * commands.c (chop_commands): Set `lines_flags' instead of - `lines_recurse'. Record not only + but also @ and - prefixes. - * remake.c (notice_finished_file): Check the COMMANDS_RECURSE bit - in FILE->cmds->lines_flags, rather than FILE->cmds->lines_recurse. - * job.c (start_job_command): Replaced RECURSIVE and NOPRINT local - var with FLAGS; initialize it to the appropriate `lines_flags' byte. - Set CHILD->noerror if the COMMANDS_NOERROR bit is set in FLAGS. - Set the COMMANDS_SILENT bit in FLAGS for a @ prefix. - - * remake.c (update_goal_chain): Set G->file to its prev after - checking for G being finished, since that check needs to examine - G->file. - - * configure.in (union wait check) [HAVE_WAITPID]: Try using - waitpid with a `union wait' STATUS arg. If waitpid and union wait - don't work together, we should not use union wait. - - * Version 3.63.2. - - * remake.c (update_goal_chain): When G->file->updated, move - G->file to its prev. We aren't finished until G->file is nil. - -Thu Feb 4 12:53:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (starting_directory): New global variable. - (main): Set it to cwd after doing -Cs. - (log_working_directory): Use it, rather than computing each time. - * make.h: Declare it. - - * compatMakefile (SHELL): Define to /bin/sh for losing Unix makes. - - * main.c (decode_env_switches): Allocate (1 + LEN + 1) words for - ARGV, rather than LEN words plus one byte. - -Wed Feb 3 18:13:52 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile ($(bindir)/$(instname)): Put - before - install_setgid command line, so its failure won't be an error. - (infodir): New variable. - (install): Depend on $(infodir)/$(instname).info. - ($(infodir)/$(instname).info): New target. - - * read.c (read_makefile): If FILENAMES is nil when we see a line - starting with a tab, don't treat it as a command. Just fall - through, rather than giving an error. - - * read.c (read_makefile): If the NO_TARGETS flag is set when we see a - command line, don't clear it before continuing. We want - subsequent command lines to be ignored as well. - - * job.c (new_job): Before expanding each command line, collapse - backslash-newline combinations that are inside var or fn references. - -Mon Feb 1 16:00:13 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile (exec_prefix): Default to $(prefix), not /usr/local. - - * compatMakefile (make.info): Pass -I$(srcdir) to makeinfo. - - * job.c [POSIX] (unblock_sigs): Made global. - [!POSIX] (unblock_sigs): Move defns to job.h. - * job.h [POSIX] (unblock_sigs): Declare. - -Sun Jan 31 19:11:05 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * read.c (read_makefile): In vpath parsing, after finding the - pattern token, take entire rest of line as the search path, not - just the next token. - - * compatMakefile (remote.o): Depend on remote-*.c. - -Thu Jan 28 16:40:29 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * commands.c (set_file_variables): Don't define any F or D versions. - * variable.c (define_automatic_variables): Define them here as - recursively-expanded variables that use the dir and notdir funcs. - - * variable.c (target_environment): In v_default case, don't export - o_default or o_automatic variables. - - * configure.in (union wait check): Remove ` and ' inside C code; - they confuse the shell script. - -Mon Jan 25 13:10:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.63.1. - - * vpath.c (construct_vpath_list): When skipping further processing - of an elt that is ".", don't also skip the code that pushes P past - the next separator. - - * compatMakefile (distclean): Don't remove make-*. - - * configure.in (HAVE_UNION_WAIT): Try to use WEXITSTATUS if it's - defined. If one cannot use WEXITSTATUS with a `union wait' - argument, we don't want to believe the system has `union wait' at all. - - * remake.c (update_file): Do nothing to print "up to date" msgs. - (update_goal_chain): Do it here instead. - Use the `changed' flag of each goal's `struct dep' to keep track - of whether files_remade (now commands_started) changed around a - call to update_file for that goal. - When a goal is finished, and its file's update_status is zero (i.e., - success or nothing done), test the `changed' flag and give an "up - to date" msg iff it is clear. - * make.h (files_remade): Renamed to commands_started. - * remake.c: Changed defn. - (update_goal_chain): Changed uses. - * job.c (start_job_command): Increment commands_started here. - (reap_children): Not here. - - * remake.c (update_goal_chain): Don't do anything with files' - `prev' members. update_file now completely handles this. - - * variable.c (target_environment): Don't expand recursive - variables if they came from the environment. - - * main.c (define_makeflags): For flags with omitted optional args, - store {"", 0} with ADD_FLAG. When constructing FLAGSTRING, a flag - so stored cannot have more flags appended to the same word. - -Fri Jan 22 14:46:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * variable.c (print_variable_set): In vars/bucket calculation, - don't spuriously multiply by 100. - - * Version 3.63. - - * job.c [!HAVE_UNION_WAIT] (WTERMSIG, WCOREDUMP, WEXITSTATUS): - Don't define if already defined. - - * remake.c (update_file): Don't keep track of the command_state before - calling update_file_1. Remove local variable COMMANDS_FINISHED, - and don't test it to decide to print the "is up to date" msg. - Testing for files_remade having changed should always be sufficient. - The old method lost when we are called in the goal chain run on a - makefile, because the makefile's command_state is already - `cs_finished' from the makefile chain run. - - * misc.c [HAVE_SETRE[GU]ID]: Test these to decl setre[gu]id. - - * configure.in: Rewrote wait checking. - Use AC_HAVE_HEADERS to check for . - Use AC_HAVE_FUNCS to check for waitpid and wait3. - Use a compile check to test just for `union wait'. - * job.c: Rewrote conditionals accordingly. - [HAVE_WAITPID]: Test this only to define WAIT_NOHANG. - [HAVE_WAIT3]: Likewise. - [HAVE_UNION_WAIT]: Test this to define WAIT_T and W*. - - * configure.in: Set CFLAGS and LDFLAGS before all checks. - - * dir.c: Add static forward decls of {open,read}_dirstream. - -Thu Jan 21 17:18:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.31. - - * job.c [NGROUPS_MAX && NGROUPS_MAX==0]: #undef NGROUPS_MAX. - - * compatMakefile (CFLAGS, LDFLAGS): Set to @CFLAGS@/@LDFLAGS@. - * build.template (CFLAGS, LDFLAGS): Same here. - * configure.in: AC_SUBST(CFLAGS) and LDFLAGS. - Set them to -g if not defined in the environment. - - * remake.c (library_search): Use LIBNAME consistently, setting it - only once, to be the passed name sans `-l'. - Pass new var FILE to be modified by vpath_search. - -Mon Jan 18 14:53:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.30. - - * job.c (start_waiting_jobs): Return when job_slots_used is equal to - job_slots. - - * configure.in: Add AC_CONST for the sake of getopt. - - * read.c (read_makefile): Continue after parsing `override' - directive, rather than falling through to lossage. - Check for EOL or blank after "override define". - - * compatMakefile (.c.o, remote.o): Put $(CFLAGS) after other switches. - -Fri Jan 15 12:52:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.29. - - * main.c (define_makeflags): After writing everything into - FLAGSTRING, only back up two chars if [-1] is a dash, meaning we - just wrote " -". Always terminate the string at *P. - - * remake.c (library_search): When constructing names in std dirs, - use &(*LIB)[2] for the stem, not LIBNAME (which points at the - buffer we are writing into!). - -Thu Jan 14 13:50:06 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Set IN_IGNORED_DEFINE for "override - define" when IGNORING is true. - - * compatMakefile (distclean): Remove config.status and build.sh. - -Wed Jan 13 16:01:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.28. - - * misc.c (xmalloc, xrealloc): Cast result of malloc/realloc to - (char *). - - * arscan.c (ar_scan) [AIAMAG]: Cast read arg to (char *). - - * variable.c (define_automatic_variables): Override SHELL value for - origin o_env_override as well as o_env. - - * GNUmakefile (build.sh.in): Don't replace %globobjs%. Instead, - add the names of the glob objects (w/subdir) to %objs%. - * build.template (globobjs): Removed. - Take basename of $objs before linking. - -Tue Jan 12 12:31:06 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.27. - - * configure.in (AC_OUTPUT): Also edit build.sh. - * build.template: New file. - * GNUmakefile (build.sh.in): New rule to create it from build.template. - (make-$(version).tar.Z): Depend on build.sh.in. - - * main.c (die): Call print_data_base if -p. - (main): Don't call it here. - - * compatMakefile (defines): Add @DEFS@. configure should turn this - into -DHAVE_CONFIG_H. - -Mon Jan 11 14:39:23 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.26. - - * misc.c (init_access): Surround with #ifdef GETLOADAVG_PRIVILEGED. - ({make,user,child}_access) [! GETLOADAVG_PRIVILEGED]: Make no-op. - * compatMakefile (install_setgid): New var, set by configure. - (install): Install setgid $(group) only if $(install_setgid) is true. - -Fri Jan 8 15:31:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (load_too_high): If getloadavg fails with errno==0, give a - message saying that load limits are not supported. - - * vpath.c (construct_vpath_list): Rewrote path deletion code to - not try to use PATH's next link after freeing PATH. - - * main.c (define_makeflags): Rewritten; now handles string-valued - option, and has no arbitrary limits. - (switches): Set `toenv' flag for -I and -v. - - * main.c (decode_env_switches): Cast return value of alloca to char *. - - * misc.c (child_access) [HAVE_SETREUID, HAVE_SETREGID]: Use - setre[gu]id in place of set[gu]id. - -Wed Jan 6 15:06:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (main): Define MAKEOVERRIDES, MAKE, and MAKE_COMMAND with - origin o_default. - - * make.h [POSIX]: Don't test this to use ANSI_STRING. - Testing STDC_HEADERS should be sufficient. - - * job.h: Declare start_waiting_jobs. - - * read.c (read_makefile): Add missing parens in if stmt that find - conditional directives. - - * main.c (main): Declare init_dir. - * implicit.c (pattern_search): Always use two % specs in a - DEBUGP2, and always pass two non-nil args. - Cast field width args to int. - Add missing parens in !RULE->subdir if stmt. - * function.c (expand_function, patsubst_expand): Add parens around - assignments inside `while' stmts. - * commands.c (print_commands): Cast field width args to int. - - * read.c (do_define): Cast return value of alloca to (char *). - - * main.c (init_switches): New function, broken out of decode_switches. - (decode_switches): Take new arg ENV. If set, ignore non-option - args; print no error msgs; ignore options with clear `env' flags. - (decode_env_switches): Rewritten to chop envar value into words - and pass them to decode_switches. - (switches): Set `env' flag for -I and -v. - - * dir.c (init_dir): Cast free to __glob_closedir_hook's type. - -Tue Jan 5 14:52:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.25. - - * job.c [HAVE_SYS_WAIT || !USG]: Don't #include and - . interacts badly with , and - we don't need these anyway. - - * configure.in (AC_HAVE_FUNCS): Check for setre[gu]id. - * misc.c ({user,make}_access): Test #ifndef HAVE_SETRE[GU]ID, not - #ifdef POSIX || USG. SunOS 4.1 is supposedly POSIX.1 compliant, - but its set[gu]id functions aren't; its setre[gu]id functions work. - - * misc.c ({user,make,child}_access): Give name of caller in error msgs. - - * job.c (load_too_high): Say "cannot enforce load limit" in error msg. - - * configure.in: Call AC_PROG_CC. - * compatMakefile (CC): Define to @CC@ (autoconf magic). - - * compatMakefile: Add .NOEXPORT magic target. - -Mon Jan 4 17:00:03 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (print_version): Updated copyright to include 93. - -Thu Dec 31 12:26:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * make.h [_AIX]: Don't declare alloca. - -Tue Dec 29 13:45:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.24. - - * compatMakefile (objs): Add signame.o. - (srcs): Add signame.[ch]. - - * compatMakefile (srcs): Add config.h.in. - (remote.o): Add -I. before -I$(srcdir). - -Mon Dec 28 15:51:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.23. - - * read.c (readline): Fatal when LEN==0, indicating a line starting - with a NUL. - (readline): Take new arg LINENO, for use in error msg. - (read_makefile, do_define): Pass it. - - * compatMakefile (glob/libglob.a): Pass -DHAVE_CONFIG_H in CPPFLAGS. - (.c.o): Add -I. before -I$(srcdir). - -Wed Dec 23 12:12:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Accept and ignore a rule with no targets. - - * compatMakefile (ALLOCA_SRC): New variable. - (srcs): Include its value. - - * read.c (struct conditional): Renamed member `max_ignoring' to - `allocated'; added new member `seen_else'. - (conditional_line): Initialize seen_else flag when starting an `if...'; - set it when we see an `else'; fatal if set when we see `else'. - (read_makefile): Fatal "missing `endif'" if there are any pending - conditionals, not just if we are still ignoring. - -Tue Dec 22 15:36:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (manext): Set to 1, not l. - ($(mandir)/$(instname).$(manext)): Use $(srcdir) for make.man in cmds. - - * file.c (file_hash_enter): Don't call uniquize_deps here. - * read.c (record_files): Likewise. - * implicit.c (pattern_search): Likewise. - * commands.c (set_file_variables): Call it only here. - - * default.c (default_variables) [__convex__]: FC=fc. - - * variable.c (target_environment): Expand the values of recursively - expanded variables when putting them into the environment. - * expand.c (recursively_expand): Made global. - * make.h (recursively_expand): Declare it. - - * remake.c (check_dep): Set FILE->command_state to cs_deps_running - when a dep's command_state is cs_running or cs_deps_running. - - * read.c (read_makefile): Changed error msg for spurious cmds to - not say "first target". - -Sun Dec 20 17:56:09 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * configure.in: Do AC_CONFIG_HEADER right after AC_INIT. - * make.h (HAVE_CONFIG_H): #include "config.h", then #define this. - * compatMakefile (config.h, configure, config.h.in): New rules. - (defines): Removed @DEFS@. - -Thu Dec 17 16:11:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (realclean): Just depend on distclean; no cmds. - (distclean): Do what realclean did before; also remove Makefile and - config.h; don't remove configure. - (info, dvi): New targets; depend on make.{info,dvi}. - (doc): Removed target. - (MAKEINFO, TEXI2DVI): New vars. - (make.info, make.dvi): Use them instead of explicit cmds. - -Wed Dec 16 16:25:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * configure.in: Added fcntl.h to AC_HAVE_HEADERS. getloadavg cares. - -Wed Dec 9 15:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (long_option_aliases): Add --new-file alias for -W. - - * default.c (default_variables): Change all C++ to CXX and C++FLAGS - to CXXFLAGS. - - * read.c (do_define): Expand the variable name before using it. - - * main.c (main): Define variable "MAKE_COMMAND" to argv[0]; - define "MAKE=$(MAKE_COMMAND) $(MAKEOVERRIDES)" always. - - * remake.c (library_search): Search for libNAME.a in cwd; look in - vpath before looking in standard dirs, not after. - Changed order of std dirs to: /lib, /usr/lib, ${prefix}/lib. - -Mon Nov 23 14:57:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * default.c (default_pattern_rules, default_terminal_rules): Added - brackets around initializers. - - * variable.c (try_variable_definition): Don't check for LINE[0]=='\t'. - (try_variable_definition): Expand the name before defining the var. - - * job.c (init_siglist): Removed function. - Removed decl of `sys_siglist'. - * make.h [! HAVE_SYS_SIGLIST]: #include "signame.h". - [HAVE_SYS_SIGLIST && !SYS_SIGLIST_DECLARED]: Declare sys_siglist - only under these conditions. - * main.c (main): Don't declare init_siglist. - (main) [! HAVE_SYS_SIGLIST]: Call signame_init instead of init_siglist. - -Wed Nov 18 14:52:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (record_files): Don't try to append to FIRSTDEPS if it's - nil; instead just set it to MOREDEPS. - -Mon Nov 16 17:49:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * vpath.c (construct_vpath_list): Initialize P to DIRPATH before - loop that sets MAXELEM. - -Fri Nov 13 18:23:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.22. - -Thu Nov 12 15:45:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (start_job_command): Under -n, increment files_remade after - processing (i.e., printing) all command lines. - -Tue Nov 10 15:33:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * read.c (record_files): Append new deps if this rule has no - commands; prepend them to existing deps if this rule has no commands. - - * dir.c (open_dirstream): Return nil if DIR->contents->files is nil. - - * read.c (parse_file_seq): Removed last arg STRIP. Always strip `./'s. - (read_makefile): Changed callers. - * function.c (string_glob): Likewise. - * rule.c (install_pattern_rule): Likewise. - -Mon Nov 9 17:50:16 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * remake.c (files_remade): Made global. - (notice_finished_file): Don't increment files_remade here; this - function gets called in many situations where no remaking was in - fact done. - * job.c (reap_children): Do it here instead, when we know that - actual commands have been run for the file. - * make.h (files_remade): Declare it. - -Thu Nov 5 18:26:10 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * vpath.c (construct_vpath_list): Allow blanks as well as colons to - separate elts in the search path. - - * read.c (read_makefile): Don't fatal on extra tokens in `vpath'. - The search path can contain spaces now. - -Tue Nov 3 20:44:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile (check): New target; no-op. - - * file.c (file_hash_enter): Mod OLDHASH by FILE_BUCKETS after - testing for OLDHASH==0 but before using the value. - (rename_file): Don't mod OLDHASH by FILE_BUCKETS before passing it - to file_hash_enter. - - * file.c (rename_file): Notice when OLDFILE->cmds came from - default.c, and don't try to print ->filename in that case. - -Sun Oct 25 01:48:23 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * remake.c (update_file): Don't process F->also_make here. - (notice_finished_file): Don't process FILE->also_make if no attempt - to update FILE was actually made. - Fixed to call f_mtime directly to refresh their modtimes. - -Sat Oct 24 22:08:59 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (find_percent): Don't increment P again after skipping - an escaped %. - - * expand.c (variable_expand): In call to patsubst_expand, don't - find `%'s ourselves; let that function do it. - - * read.c (read_makefile: record_waiting_files): Don't call - record_files if FILENAMES is nil. - (read_makefile): All alternatives in the parsing, except for rule - lines, fall through to the end of the loop. At the end of the - loop, do record_waiting_files so we notice later spurious cmds. - -Fri Oct 23 15:57:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * variable.c (define_automatic_variables): Free old value of SHELL - before replacing it. - -Thu Oct 15 18:57:56 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile (.c.o): Add -I$(srcdir)/glob to flags. - - * dir.c (open_dirstream): Cast return value to __ptr_t. - - * default.c (default_variables: "GET") [_IBMR2]: Use USG defn. - - * make.h (MAXPATHLEN): Moved out of #ifndef POSIX. - (GET_PATH_MAX): Moved from #ifdef POSIX to #ifdef PATH_MAX #else. - Define as (get_path_max ()). - [! PATH_MAX] (NEED_GET_PATH_MAX): Define. - [! PATH_MAX] (get_path_max): Declare fn. - * misc.c [NEED_GET_PATH_MAX] (get_path_max): New function. - -Mon Oct 12 13:34:45 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.21. - - * job.c (sys_siglist): Only declare #ifndef SYS_SIGLIST_DECLARED. - * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define - SYS_SIGLIST_DECLARED. - - * dir.c (file_impossible): When initializing DIR->contents, set - DIR->contents->dirstream to nil. - - * compatMakefile (GLOB): Define new variable. - (objs): Use it, rather than glob/libglob.a explicitly. - - * read.c (parse_file_seq): When stripping "./", handle cases like - ".///foo" and "./////". - * file.c (lookup_file, enter_file): Likewise. - -Sun Oct 11 17:00:35 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * dir.c (struct dirstream, {open,read}_dirstream): New - data type and functions to read a directory sequentially. - (init_dir): New function to hook it into glob. - * main.c (main): Call init_dir. - - * compatMakefile (objs): Added glob/libglob.a. - * configure.in: Remove code to test for glob. - -Fri Oct 9 12:08:30 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (record_files): Generalized test for NAME pointing - somewhere into F->name. - - * variable.c (define_variable_in_set): Free old value when replacing. - - * read.c (do_define): Free the linebuffer before returning. - (record_files): When clearing .SUFFIXES deps, free their data. - (multi_glob): Free OLD and its data when replacing it with results - of glob run. - - * commands.c (set_file_variables): Use alloca in place of xmalloc - for temp space for $^, $?, et al. - - * dir.c (struct directory): New member `contents' replaces `files' - and `dirstream'. - (struct directory_contents): New type. - (directories_contents): New hash table. - (dir_struct_file_exists_p): Take a struct directory_contents. - (dir_file_exists_p): Pass it the `contents' member of the dir found. - (dir_struct_file_exists_p): Renamed to dir_contents_file_exists_p; - made static. Return 0 if DIR is nil (meaning it couldn't be stat'd). - (dir_file_exists_p, find_directory): Change all callers. - (file_impossible): Use DIR->contents, initializing it if nil. - (print_dir_data_base): Use DIR->contents, and print out device and - inode numbers with each directory. - - * Changes for performance win from John Gilmore : - * dir.c (DIRECTORY_BUCKETS): Increase to 199. - (DIRFILE_BUCKETS): Decrease to 107. - (find_directory): Allocate and zero a multiple of - sizeof (struct dirfile *), not of sizeof (struct dirfile). - (dir_struct_file_exists_p): New function, nearly all code from - dir_file_exists_p. - (dir_file_exists_p): Just call find_directory+dir_struct_file_exists_p. - * vpath.c (selective_vpath_search): Remove redundant - dir_file_exists_p call. - - * configure.in: Comment out glob check; always use our code. - -Fri Oct 2 19:41:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define - HAVE_SYS_SIGLIST; after doing #define sys_siglist _sys_siglist, we - do have it. - -Wed Sep 30 19:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (main): Don't do -w automatically if -s. - -Tue Sep 29 21:07:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (printed_version): Move variable inside print_version. - (print_version): Return immediately if printed_version is set. - (die): Don't test printed_version here. - (decode_switches): Under -v, do print_version before giving usage. - (DESCRIPTION_COLUMN): New macro. - (decode_switches): Use it when printing the usage message. - Leave at least two spaces between options and their descriptions. - -Fri Sep 25 13:12:42 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.20. - -Wed Sep 16 16:15:22 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * read.c (read_makefile): Save errno value from trying to open - FILENAME, and restore it before erring; otherwise we get the errno - value from the last elt of the search path. - -Tue Sep 15 15:12:47 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (long_option_aliases): Add --stop for -S. - - * read.c (word1eq): Do strncmp before dereferencing someplace that - may be out in space. - -Wed Sep 9 15:50:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * remake.c (notice_finished_file): If all the command lines were - recursive, don't do the touching. - - * job.c (start_job_command): Don't check for + here. - * commands.c (chop_commands): Do it here instead. - - * default.c (default_terminal_rules): Prepend + to cmds for RCS. - -Wed Sep 2 17:53:08 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile (objs): Include $(ALLOCA). - - * make.h [CRAY]: Move #define signal bsdsignal to before #includes. - -Thu Aug 27 17:45:43 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * read.c (default_include_directories): Add INCLUDEDIR first. - * compatMakefile (includedir): Define. - (defines): Add -D for INCLUDEDIR="$(includedir)". - - * read.c (read_makefile): Grok multiple files in `include'; - globbing too. - - * remake.c (library_search): New function. - (library_file_mtime): Remove function. - (f_mtime): Use library_search instead of library_file_mtime. - * compatMakefile (libdir): Define. - (defines): Add -D for LIBDIR="$(libdir)". - * make.texinfo (Libraries/Search): Document change. - - * file.c (rename_file): Fix file_hash_enter call with missing arg. - -Wed Aug 26 17:10:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.19. - - * main.c (main): Set command_state to cs_finished for temp files - made for stdin makefiles. - - * main.c (decode_switches): Don't tell getopt to return non-option - args in order. - Ignore an argument of `-'. - -Thu Aug 20 13:36:04 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * job.c (start_job_command): If (touch_flag && !RECURSIVE), ignore - the command line and go to the next. - (notice_finished_file): Under -t, touch FILE. - * remake.c (remake_file): Don't touch it here. - -Wed Aug 19 16:06:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * function.c (pattern_matches): Use temporary for strlen (WORD) - instead of two function calls. - - * compatMakefile (LOAD_AVG): Remove variable and comments. - -Tue Aug 18 14:58:58 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * make.texinfo (Running): Node renamed to `make Invocation'. - -Fri Aug 14 12:27:10 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * arscan.c (ar_name_equal): Don't compare [MAX-3..MAX] if - NAMELEN != MEMLEN. - -Thu Aug 13 17:50:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.18. - - * main.c: Don't #include ; make.h already does. - -Mon Aug 10 17:03:01 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * implicit.c (pattern_search): Fixed copying of suffix when building - also_make elts. - - * function.c (expand_function: `shell'): Make sure BUFFER is - null-terminated before replacing newlines. - - * compatMakefile (mandir): Use man$(manext), not always manl. - -Sun Aug 2 01:42:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * rule.c (new_pattern_rule): Not static. - * rule.h: Declare it. - - * file.c (file_hash_enter): New function, most code from rename_file. - (rename_file): Call it. - * file.h (file_hash_enter): Declare it. - - * dep.h: Doc fix. - -Thu Jul 30 15:40:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (decode_switches): Handle usage_and_exit when building - long options vector. - - * default.c (default_terminal_rules): Make RCS rules use $(CHECKOUT,v). - (default_variables): Define CHECKOUT,v (hairy). - - * make.h [!HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define - sys_siglist to _sys_siglist. - -Sun Jul 26 16:56:32 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * NEWS: Add header and tail copyright info like Emacs NEWS. - - * make.h [ANSI_STRING]: Don't #define index, rindex, bcmp, bzero, - bcopy if already #define'd. - [STDC_HEADERS] (qsort, abort, exit): Declare here. - [! __GNU_LIBRARY__ && !POSIX]: Not here. - - * make.h [_AIX]: #pragma alloca first thing. - - * job.c (start_waiting_job): Set the command_state to cs_running - when we queue a job on waiting_jobs. - -Fri Jul 24 02:16:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * variable.c (define_automatic_variables): Use "" instead of nil - for empty value. - -Thu Jul 23 22:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.17. - - * main.c (struct command_switch.type): Add alternative usage_and_exit. - (command_switches): Add -h/--help. - -Thu Jul 16 14:27:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * GNUmakefile (make-$(version).tar.Z): Include NEWS, not CHANGES. - * README.template: Mention NEWS. - * CHANGES: Renamed to NEWS. - - * main.c [! STDC_HEADERS] [sun]: Don't declare exit. - -Tue Jul 14 18:48:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (main): Set -o files' command_states to cs_finished. - - * rule.c (count_implicit_rule_limits): Decrement num_pattern_rules - when tossing a rule. - - * main.c (main): Use alloca only in simple local var assignment, - for braindead SGI compiler. - - * rule.c (print_rule_data_base): Barf if num_pattern_rules is - inconsistent with the number computed when listing them. - -Mon Jul 13 17:51:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * commands.c (set_file_variables): For $? and $^ elts that are archive - member refs, use member name only. - -Fri Jul 10 00:05:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * variable.h (struct variable.export): Add new alternative v_ifset. - * variable.c (target_environment): Check for it. - (define_automatic_variables): Set it for MAKEFILES. - -Thu Jul 9 21:24:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (objs): Remove getloadavg.o; $(extras) gets it. - (remote.o): Use $(srcdir)/remote.c, not $remote.c<. - (distclean, mostlyclean): New targets. - -Tue Jul 7 19:12:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.16. - - * compatMakefile (config.status): Remove rule. - - * job.c (start_waiting_job): Free C after using C->file, not before. - -Sat Jul 4 20:51:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * commands.c, job.c, main.c, make.h, remote-cstms.c: Use #ifdef - HAVE_* instead of #ifndef *_MISSING. - * configure.in: Use AC_HAVE_FUNCS instead of AC_MISSING_FUNCS (gone). - -Thu Jul 2 18:47:52 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * main.c (main): makelevel>0 or -C implies -w. - -Tue Jun 30 20:50:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * file.c, job.c, function.c: Don't #include . - make.h: Do it here instead. - * arscan.c (ar_member_touch): Don't declare errno. - -Thu Jun 25 17:06:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * GNUmakefile (make-$(version).tar.Z): Depend on INSTALL, configure.in. - - * remake.c (update_file): If commands or deps are running after - update_file_1 returns, break out of the :: rule (->prev) loop and - just return. - - * job.c (job_next_command): New function; code from start_job. - (start_job_command): Renamed from start_job. Call job_next_command - and recurse for empty command lines and -n. - (start_waiting_job): Call start_job_command, not start_job. - (new_job): Call job_next_command to prime the child structure, and - then call start_waiting_job. - (reap_children): Use job_next_command and start_job_command. - (start_waiting_job): Call start_remote_job_p here, and store its - result in C->remote. If zero, check the load average and - maybe put C on waiting_jobs. - (start_job_command): Test CHILD->remote rather than calling - start_remote_job_p. Don't do load avg checking at all here. - - * main.c (main): Don't handle SIGILL, SIGIOT, SIGEMT, SIGBUS, - SIGSEGV, SIGFPE or SIGTRAP. - - * compatMakefile (glob/libglob.a): Don't pass srcdir to sub-make. - configure will set it in glob/Makefile. - -Wed Jun 24 19:40:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * dir.c [DIRENT] (direct): Don't define to dirent. - [! DIRENT] (direct): Define to dirent. - (dir_file_exists_p): Use struct dirent instead of struct direct. - - * make.h (getcwd): No space between macro and ( for args! - - * job.c (start_job): Don't put the job on waiting_jobs if - job_slots_used==0. - - * make.texinfo (Missing): Shortened title. - -Tue Jun 23 18:42:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * file.c (remove_intermediates): Print "rm" commands under -n. - -Mon Jun 22 16:20:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.15. - -Fri Jun 19 16:20:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * arscan.c [M_UNIX]: #undef M_XENIX. - -Wed Jun 17 17:59:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * default.c (default_terminal_rules): Put @ prefix on RCS cmds. - -Tue Jun 16 19:24:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile (getloadavg.o): Removed special rule. - (CFLAGS): Don't include $(defines). - (.c.o): Define suffix rule. - (glob/libglob.a): Pass CPPFLAGS=$(defines) to submake. - (GETOPT_SRC, srcs, tagsrcs): Prefix files with $(srcdir)/. - - * arscan.c (ar_name_equal): Moved local vars inside #if'd block. - - * make.h (max): Removed. - * expand.c (variable_buffer_output): Don't use it. - - * compatMakefile (INSTALL): Define. - (Makefile): New rule to make from Makefile.in. - (srcdir): Define. - (VPATH): Define. - (getloadavg.o, remote.o): Use autoconf $foo< hack. - - * commands.c (fatal_error_signal): Removed return. - -Mon Jun 15 17:42:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.14. - - * make.texinfo (Summary): New node. - (Special Targets): Mention .EXPORT_ALL_VARIABLES here. - - * variable.c (max): Moved to make.h. - - * compatMakefile (objs, srcs): Added ar & arscan. - - * job.c (start_waiting_job): New function, 2nd half of new_job. - (new_job): Call it. - (start_waiting_jobs): New function. - * remake.c (update_goal_chain): Call start_waiting_jobs at the top - of the main loop. - * compatMakefile (objs, srcs): Removed load, added getloadavg. - -Fri Jun 12 19:33:16 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * job.c (load_too_high): New function. Uses getloadavg. - (waiting_jobs): New variable. - (start_job): Don't call wait_to_start_job. Instead, if - load_too_high returns nonzero, add the child to the - `waiting_jobs' chain and return without starting the job. - -Thu Jun 11 00:05:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * expand.c (variable_buffer_output): Made global again. - * variable.h: And declare it. - - * arscan.c (PORTAR): Define for all systems if PORT5AR is not defined. - (AR_NAMELEN, AR_TRAILING_SLASH): Removed. - (ar_scan): Don't use it. Don't #ifdef AR_TRAILING_SLASH; just look - for a slash in the archive at run time. - (ar_name_equal): Rewrote .o hacking to not use AR_NAMELEN, and to - cope with trailing-slash and non-trailing-slash archives. - - * main.c (main) [! SETVBUF_REVERSED]: Test this instead of USGr3 et al. - [SETVBUF_REVERSED]: Always allocate a buffer ourselves. - - * load.c (load_average) [sgi]: Use sysmp call. - - * compatMakefile (INSTALL_DATA, INSTALL_PROGRAM): Define. - ($(bindir)/$(instname), $(mandir)/make.$(manext)): Use them. - - * make.h [HAVE_VFORK_H]: #include . - (vfork, VFORK_NAME): Don't define. - * job.c (start_job): Use "vfork" in place of VFORK_NAME. - - * make.h [HAVE_LIMITS_H, HAVE_SYS_PARAM_H]: If #define'd, #include - the each file. Rearranged PATH_MAX hacking. - * job.c: Rearranged NGROUPS_MAX hacking. - - * remake.c (fstat, time): Don't declare. - - * compatMakefile (defines): Value is @DEFS@. - (LOADLIBES): Value is @LIBS@. - (extras): Value is @LIBOBJS@. - (ARCHIVES, ARCHIVES_SRC, ALLOCASRC): Removed. - * arscan.c, ar.c: Surround body with #ifndef NO_ARCHIVES. - - * misc.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl get*id. - - * make.h [GETCWD_MISSING]: Test instead of !USG && !POSIX et al. - (getcwd): Just declare if present. If not, declare as a macro - using getwd, and declare getwd. - [PATH_MAX] (GET_PATH_MAX): #define to PATH_MAX. - * main.c (main, log_working_directory): Use getcwd instead of getwd. - - * main.c (main) [SETLINEBUF_MISSING]: Test this instead of USG. - - * make.h (SIGHANDLER, SIGNAL): Removed. - (RETSIGTYPE): Define if not #define'd. - * main.c (main): Use signal in place of SIGNAL. - - * main.c [SYS_SIGLIST_MISSING]: Test instead of USG. - - * job.c (search_path) [GETGROUPS_MISSING]: Test instead of USG. - [HAVE_UNISTD_H]: Test instead of POSIX to not decl getgroups. - - * main.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl chdir. - [! STDC_HEADERS]: Test instead of !POSIX to decl exit & atof. - - * job.c (child_handler), commands.c (fatal_error_signal): Return - RETSIGTYPE instead of int. - * main.c (main): Declare fatal_error_signal and child_handler here - to return RETSIGTYPE; removed top-level decl of former. - - * commands.c (fatal_error_signal), job.c (unblock_sigs, start_job), - main.c [SIGSETMASK_MISSING]: Test this instead of USG. - -Wed Jun 10 22:06:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * job.c [HAVE_WAITPID]: Test this instead of USG. - [! HAVE_UNISTD_H]: Test this instead of !POSIX to declare misc fns. - (GID_T): Don't #define. - (search_path): Use gid_t instead of GID_T. - [GETDTABLESIZE_MISSING, SYS_SIGLIST_MISSING, DUP2_MISSING]: Test - these individually instead of USG for all. - * make.h (ctime): Don't declare. #include time.h instead. - [HAVE_UNISTD_H]: #include and #define POSIX #ifdef - _POSIX_VERSION. - * dir.c [__GNU_LIBRARY__] (D_NAMLEN): Define to use d_namlen member. - * make.h [NEED_MEMORY_H]: Only include memory.h #ifdef this. - - * arscan.c: Removed #ifdef mess about string.h et al. - Just #include make.h instead. - * make.h (fstat, atol): Declare. - - * commands.c (fatal_error_signal): Don't use sigmask to check for - propagated signals; use ||s instead. - (PROPAGATED_SIGNAL_MASK): Removed. - (fatal_error_signal) [POSIX]: Use sigprocmask in place of sigsetmask. - - * variable.c (variable_buffer, variable_buffer_length, - initialize_variable_output, variable_output): Moved to expand.c; - made all static. - (struct output_state, save_variable_output, - restore_variable_output): Removed. - * expand.c (initialize_variable_output): Put a NUL at the beginning - of the new buffer after allocating it. - (allocated_variable_expand_for_file): Don't use - {save,restore}_variable_output. Do it by hand instead, keeping - state on the stack instead of malloc'ing it. - (allocated_variable_expand): Removed. - * variable.h (allocated_variable_expand): Define here as macro. - (variable_buffer_output, initialize_variable_output, - save_variable_output, restore_variable_output): Removed decls. - - * read.c (conditional_line): For an if cmd, if any elt of the - conditionals stack is ignoring, just push a new level that ignores - and return 1; don't evaluate the condition. - -Thu Jun 4 21:01:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (main): Put #ifdef's around frobbing SIGSYS and SIGBUS. - - * job.c (getdtablesize): Don't declare or #define if already #define'd. - -Wed Jun 3 23:42:36 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * file.c (snap_deps): If `.EXPORT_ALL_VARIABLES' is a target, set - export_all_variables. - * make.texinfo (Variables/Recursion): Document .EXPORT_ALL_VARIABLES. - -Tue Jun 2 21:08:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.13. - - * commands.c (set_file_variables): Calculate length for ^D and ?D - individually, making sure to give them at least enough space for "./". - - * make.h [CRAY]: #define signal to bsdsignal. - - * default.c (default_variables) [CRAY]: Define PC, SEGLDR, - CF77PPFLAGS, CF77PP, CFT, CF, and FC. - - * arscan.c (AR_HDR_SIZE): Define to sizeof (struct ar_hdr), if it - wasn't defined by . - -Thu May 28 00:56:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.12. - -Tue May 26 01:26:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * rule.c (new_pattern_rule): Initialize LASTRULE to nil, not - pattern_rules. - -Mon May 25 19:02:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (decode_switches): Initialize all the long_option elt members. - -Thu May 21 16:34:24 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * make.texinfo (Text Functions): Correct filter-out description. - -Tue May 19 20:50:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * compatMakefile (realclean): Don't remove backup files. - - * main.c (decode_switches): Allocate ARGC+1 elts in `other_args'. - -Sun May 17 16:38:48 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * Version 3.62.11. - -Thu May 14 16:42:33 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * job.c (reap_children): Don't die if wait returns EINTR. - -Wed May 13 18:28:25 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * job.c (reap_children): Always run the next command for a - successful target. If we are going to die, we don't want to leave - the target partially made. - -Tue May 12 00:39:19 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): After loop, if we only - have one word, check it for being a shell command. - - * main.c (decode_switches): Allocate ARGC slots in other_args to - begin with, so we never need to worry about growing it. - If we get a non-option arg and POSIXLY_CORRECT is in the - environment, break out of the loop. After the loop, add all remaining - args to other_args list. - - * main.c (decode_switches): For positive_int and floating switches - when optarg is nil, use next arg if it looks right (start with a - digit, or maybe decimal point for floating). - - * variable.c (define_automatic_variables): Always set SHELL to - default if it comes from the environment. Set its export bit. - * make.texinfo (Environment): Document change. - -Mon May 11 00:32:46 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * Version 3.62.10. - - * compatMakefile (tags, TAGS): Use vars for cmds. - (ETAGS, CTAGS): Define. - - * main.c (decode_switches): If a switches elt has a nil long_name, - make the long option name elt be "". - Fixed loop to not ignore all the options. - - * make.texinfo (Option Summary): Added long options. - - * main.c (switches): Changed -m's description to "-b". - (decode_switches): When printing the usage message, don't print - switches whose descriptions start with -. - When constructing the list of names for switch -C, search the - switches vector for switches whose descriptions are "-C". - - * main.c (switches): Call -S --no-keep-going, not --dont-keep-going. - Call -I --include-dir, not --include-path. - (long_option_aliases): Added --new == -W, --assume-new == -W, - --assume-old == -o, --max-load == -l, --dry-run == -n, --recon == -n, - --makefile == -f. - - * main.c (switches): Removed bogus "silent" elt. - (long_option_aliases): Define new var. - (decode_switches): Add long_option_aliases onto the end of the long - options vector created for getopt_long. - Look through long_option_aliases for extra names to list - in usage message. - -Sat May 9 00:21:05 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (log_working_directory): Fixed to properly not print the - leaving message when we haven't printed the entering message. - -Fri May 8 21:55:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * main.c (struct command_switch): Added elts `long_name', - `description', and `argdesc'. - (switches): Added initializers for new members. - (decode_switches): Rewritten to use getopt_long. - * compatMakefile (GETOPT, GETOPT_SRC): Define. - (objs, srcs): Include them. - - * job.c (child_died): Renamed to dead_children; made static. - (child_handler): Increment dead_children instead of setting child_died. - (reap_children): Decrement dead_children instead of clearing - child_died. The point of all this is to avoid printing "waiting - for unfinished jobs" when we don't actually need to block. - This happened when multiple SIGCHLDs before reap_children was called. - - * job.c (reap_children): If ERR is set, so we don't call start_job - on the child being reaped, instead set its command_state to - cs_finished. - (reap_children, child_handler, new_job): I added several - debugging printf's while fixing this. I left them in if (debug_flag) - because they may be useful for debugging this stuff again. - -Wed May 6 22:02:37 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * read.c (read_makefile): v_export is not 1. - -Mon May 4 17:27:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.9. - - * variable.c (export_all_variables): New variable. - (target_environment): Export variables whose `export' member is - v_default if export_all_variables is set and their names are benign. - * variable.h: Declare export_all_variables. - * read.c (read_makefile): If export or unexport is given with no - args, set or clear export_all_variables, respectively. - - * variable.c (target_environment): Exclude MAKELEVEL in the loop, - so it isn't duplicated when we add it at the end. - -Sun May 3 17:44:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.8. - - * variable.h (struct variable): Added new member `export'. - * variable.c (define_variable_in_set): Initialize it to v_default. - (target_environment): Don't check for .NOEXPORT. - Export variables whose `export' member is v_default and that would - have been exported under .NOEXPORT, and variables whose `export' - member is v_export. - (try_variable_definition): Return the variable defined. - * variable.h (try_variable_definition): Changed decl. - * read.c (read_makefile): Recognize `export' and `unexport' directives. - -Fri May 1 11:39:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * main.c (main) [POSIX]: Reversed args to sigaddset. - -Thu Apr 30 17:33:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * job.c [POSIX || !USG] (unblock_sigs): New fn. - (start_job): Block signals before forking. - (new_job): Unblock signals after putting the new child on the chain. - * main.c (main) [POSIX]: Use sigset_t fatal_signal_set instead of - int fatal_signal_mask. - - * load.c [sgi] (LDAV_CVT): Define. - -Wed Apr 29 17:15:59 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * Version 3.62.7. - - * load.c (load_average) [sgi]: Clear the high bit of the address - from the symbol table before looking it up in kmem. - - * misc.c (fatal, makefile_fatal): Put *** in fatal error messages. - (remake_file): No longer needed in message here. - - * main.c (die): Call reap_children with BLOCK==1. - -Tue Apr 28 20:44:35 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * rule.c (freerule): Don't set LASTRULE->next if LASTRULE is nil. - -Sun Apr 26 15:09:51 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * rule.c (count_implicit_rule_limits): Initialize LASTRULE to nil, - not to head of chain. Extract next ptr before we might do - freerule, and use that for next iteration. - (freerule): Still do next ptr frobbing if LASTRULE is nil. - -Tue Apr 21 03:16:29 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * job.c (child_error): Removed extra %s from error msg format. - - * Version 3.62.6. - - * job.c (reap_children): Don't start later commands in a sequence - if ERR is nonzero. - - * job.c (new_job): Always call reap_children with BLOCK==0 first thing. - - * job.c (reap_children): New function; work that used to be done in - child_handler. - (child_died): New global var. - (child_handler): Now just sets child_died. - (wait_for_children): Removed. - (unknown_children_possible, block_signals, unblock_signals, - push_signals_blocked_p, pop_signals_blocked_p): Removed. - (child_execute_job): Removed call to unblock_signals. - (new_job): Removed calls to push_signals_blocked_p and - pop_signals_blocked_p. - * job.h: Declare reap_children, not wait_for_children. - * commands.c (fatal_error_signal), job.c (new_job), - load.c [LDAV_BASED] (wait_to_start_job), main.c (die), - remake.c (update_goal_chain), function.c (expand_function: `shell'): - Changed wait_for_children calls to reap_children. - Some needed to be loops to wait for all children to die. - * commands.c (fatal_error_signal), main.c (main, - log_working_directory), function.c (expand_function): Removed calls - to push_signals_blocked_p and pop_signals_blocked_p. - * job.h: Removed decls. - - * job.h: Added copyright notice. - -Wed Apr 15 02:02:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (child_error): No *** for ignored error. - -Tue Apr 14 18:31:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * implicit.c (DEBUGP2): Use do ... while (0) instead of if ... else to - avoid compiler warnings. - - * read.c (parse_file_seq): Don't remove ./ when it is followed by a - blank. - -Mon Apr 13 21:56:15 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * make.h (DEBUGPR): Use do ... while (0) instead of if ... else to - avoid compiler warnings. - - * remake.c (notice_finished_file): Run file_mtime on the also_make - files, so vpath_search can happen. - - * GNUmakefile (tests): Use perl test suite from csa@sw.stratus.com. - (alpha-files): Include test suite tar file. - -Fri Apr 3 00:50:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * Version 3.62.5. - -Wed Apr 1 05:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * remake.c (update_file, update_file_1): Do check_renamed on elts - of dep chains when traversing them. Something unrelated might have - renamed one of the files the dep chain points to. - - * file.c (rename_file): If FILE has been renamed, follow its - `renamed' ptr, so we get to the final real FILE. Using the renamed - ones loses because they are not in the hash table, so the removal - code loops infinitely. - - * read.c (read_all_makefiles): Clobber null terminator into - MAKEFILES expansion, so string passed to read_makefile is properly - terminated. - -Mon Mar 30 20:18:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * commands.c (set_file_variables): $* for archive member with - explicit cmds is stem of member, not of whole `lib(member)'. - -Thu Mar 26 15:24:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * Version 3.62.4. - -Tue Mar 24 05:20:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * rule.c (new_pattern_rule): Rules are identical only if all their - targets match (regardless of order). - -Wed Mar 11 13:49:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) - - * remake.c (remake_file): Changed error "no way to make" to "no - rule to make". Fiat Hugh. - - * make.texinfo (Last Resort): Describe %:: rules and new .DEFAULT - behavior. - - * remake.c (update_file_1): Only use .DEFAULT cmds if FILE is not a - target. - -Tue Mar 10 18:13:13 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * remote-stub.c, remote-cstms.c (start_remote_job): Take new arg, - environment to pass to child. - * job.c (start_job): Pass it. - -Mon Mar 9 19:00:11 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * file.c (enter_file): Also strip ./s here, to get command-line - target names. - - * remote-cstms.c: Add comment telling people to leave me alone. - - * compatMakefile (manpage install): Remove target before copying. - -Tue Mar 3 18:43:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * make.texinfo (Missing): Renamed to "Incompatibilities and ...". - Added paragraph describing $? incompatibility with Unix and POSIX.2. - -Sun Mar 1 15:50:54 1992 Roland McGrath (roland@nutrimat.gnu.ai.mit.edu) - - * function.c (expand_function: `shell'): Don't declare fork or pipe. - Use vfork instead of fork. - -Tue Feb 25 22:05:32 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * make.texinfo (Chained Rules): Clarify .PRECIOUS to save - intermediate files. - - * load.c [sun] (LDAV_CVT): Define to divide by FSCALE. - -Sun Feb 16 02:05:16 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * Version 3.62.3. - -Sat Feb 15 17:12:20 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * compatMakefile (makeinfo): Use emacs batch-texinfo-format fn. - -Fri Feb 14 00:11:55 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * read.c (read_makefile): Correctly handle define & endef in ifdefs. - - * read.c (record_files): Pass arg for %s in error msg. - - * main.c (main) [__IBMR2, POSIX]: Use correct (a la USGr3) setvbuf - call. - -Wed Feb 12 12:07:39 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * make.texinfo (Libraries/Search): Say it does /usr/local/lib too. - -Sun Feb 9 23:06:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * read.c (read_makefile): Check for extraneous `endef' when ignoring. - -Thu Feb 6 16:15:48 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * Version 3.62.2. - -Tue Feb 4 20:04:46 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): Correctly ignore - whitespace after backslash-NL. - -Fri Jan 31 18:30:05 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * compatMakefile: Ignore errors from chgrp and chmod when installing. - -Wed Jan 29 18:13:30 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * main.c (main): When setting MAKELEVEL in the env to re-exec, - allocate space so as not to clobber past the end of the old string. - - * make.h [HAVE_ALLOCA_H]: Include - * compatMakefile (defines): Document HAVE_ALLOCA_H. - -Mon Jan 20 13:40:05 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * make.h [VFORK_MISSING]: Use fork instead. - * compatMakefile (defines): Document same. - - * job.c (construct_command_argv_internal): Don't create an empty - arg if backslash-NL is at beginning of word. - -Sun Jan 19 16:26:53 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * main.c [DGUX]: Call setvbuf as for USGr3. - - * job.c (construct_command_argv_internal): Notice correctly that - backslash-NL is the end of the arg (because it is replaced with a - space). - -Thu Jan 16 18:42:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): If SHELL is nil, set it - to default_shell before proceeding. - - * make.h [sgi]: No alloca.h, after all. - -Wed Jan 15 12:30:04 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * read.c (multi_glob): Cons up the chain of the results of glob - from back to front, so it comes out in forward order. - - * job.c (construct_command_argv_internal): Don't eat char following - backslash-NL. - -Mon Jan 13 19:16:56 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * Version 3.62.1. - - * default.c (default_variables) [ultrix]: GET=get, like USG. - - * job.c (construct_command_argv_internal): Remove tabs following - backslash-NL combos in the input line, so they don't show up when - that line is printed. - - * read.c (read_makefile): Don't collapse_continuations the line on - input; do it on the copy we do remove_comments on. - For rule lines, collapse_continuations the line after chopping - ";cmds" off the end, so we don't eat conts in the cmds. - Give error for ";cmds" with no rule. - * job.c (construct_command_argv_internal): Eat backslash-NL combos - when constructing the line to recurse on for slow, too. - -Sat Jan 11 02:20:27 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) - - * file.c (enter_file): Don't strip leading `./'s. - * read.c (parse_file_seq): Take new arg STRIP; if nonzero, do it here. - * default.c (set_default_suffixes), function.c (string_glob), - read.c (read_makefile), rule.c (install_pattern_rule): Change callers. - - * default.c (default_variables) [_IBMR2]: FC=xlf - - * job.c (construct_command_argv_internal): Turn backslash-NL and - following whitespace into a single space, rather than just eating - the backslash. - - * make.texinfo (Copying): @include gpl.texinfo, rather than - duplicating its contents. - -Fri Nov 8 20:06:03 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): Make sure not to bother - processing an empty line. - - * Version 3.62.0. - - * job.c (construct_command_argv_internal): Always recurse for slow; - simple case didn't handle finding newlines. - -Tue Nov 5 18:51:10 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) - - * job.c (construct_command_argv_internal): Set RESTP properly when - slow; don't \ify past a newline. - -Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - - * make.h [sgi]: #include . - - - -See ChangeLog.1 for earlier changes. diff --git a/buildtools/windows/source/make/INSTALL b/buildtools/windows/source/make/INSTALL deleted file mode 100644 index 95d84c820fb..00000000000 --- a/buildtools/windows/source/make/INSTALL +++ /dev/null @@ -1,176 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. - diff --git a/buildtools/windows/source/make/Makefile b/buildtools/windows/source/make/Makefile deleted file mode 100644 index 9c049840c46..00000000000 --- a/buildtools/windows/source/make/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# GNU Makefile for building gmake.exe on WIN32 -# This is the top-level makefile. It only does the optimized build. -# - -CSRCS = ar.c \ - arscan.c \ - commands.c \ - default.c \ - dir.c \ - expand.c \ - file.c \ - function.c \ - getloadavg.c \ - getopt.c \ - getopt1.c \ - implicit.c \ - job.c \ - main.c \ - misc.c \ - read.c \ - remake.c \ - remote-stub.c \ - rule.c \ - signame.c \ - variable.c \ - version.c \ - vpath.c - -OBJS = $(CSRCS:.c=.obj) glob/fnmatch.obj glob/glob.obj - -CC = cl - -CFLAGS = $(CC_SWITCHES) $(INCLUDES) $(DEFINES) $(CC_OUTPUTS) - -CC_SWITCHES = -nologo -ML -W3 -O2 - -INCLUDES = -I. -Iglob - -DEFINES = -DWIN32 -DNDEBUG -D_CONSOLE -DNETSCAPE -DHAVE_CONFIG_H - -CC_OUTPUTS = -Fpgmake.pch -YX -c - -LINK = link - -LINK_FLAGS = -nologo -subsystem:console \ - -incremental:no -machine:I386 -out:$@ - -all: gmake.exe - -build_glob: - cd glob; $(MAKE) - -gmake.exe: build_glob $(OBJS) - $(LINK) $(LINK_FLAGS) $(OBJS) - -%.obj: %.c - $(CC) $(CFLAGS) $< - -clean: - cd glob; $(MAKE) $@ - rm -rf $(OBJS) gmake.pch gmake.exe diff --git a/buildtools/windows/source/make/Makefile.in b/buildtools/windows/source/make/Makefile.in deleted file mode 100644 index b77794f744c..00000000000 --- a/buildtools/windows/source/make/Makefile.in +++ /dev/null @@ -1,307 +0,0 @@ -# NOTE: If you have no `make' program at all to process this makefile, run -# `build.sh' instead. -# -# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. -# This file is part of GNU Make. -# -# GNU Make is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# GNU Make is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Make; see the file COPYING. If not, write to -# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -# -# Makefile for GNU Make -# - -# Ultrix 2.2 make doesn't expand the value of VPATH. -VPATH = @srcdir@ -# This must repeat the value, because configure will remove `VPATH = .'. -srcdir = @srcdir@ - -CC = @CC@ - -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ - -# Define these for your system as follows: -# -DNO_ARCHIVES To disable `ar' archive support. -# -DNO_FLOAT To avoid using floating-point numbers. -# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2. -# Some compilers apparently accept this -# without complaint but produce losing code, -# so beware. -# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline. -# See also `config.h'. -defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" - -# Which flavor of remote job execution support to use. -# The code is found in `remote-$(REMOTE).c'. -REMOTE = @REMOTE@ - -# If you are using the GNU C library, or have the GNU getopt functions in -# your C library, you can comment these out. -GETOPT = getopt.o getopt1.o -GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h - -# If you are using the GNU C library, or have the GNU glob functions in -# your C library, you can comment this out. GNU make uses special hooks -# into the glob functions to be more efficient (by using make's directory -# cache for globbing), so you must use the GNU functions even if your -# system's C library has the 1003.2 glob functions already. Also, the glob -# functions in the AIX and HPUX C libraries are said to be buggy. -GLOB = glob/libglob.a - -# If your system doesn't have alloca, or the one provided is bad, define this. -ALLOCA = @ALLOCA@ -ALLOCA_SRC = $(srcdir)/alloca.c - -# If your system needs extra libraries loaded in, define them here. -# System V probably need -lPW for alloca. HP-UX 7.0's alloca in -# libPW.a is broken on HP9000s300 and HP9000s400 machines. Use -# alloca.c instead on those machines. -LOADLIBES = @LIBS@ - -# Any extra object files your system needs. -extras = @LIBOBJS@ - -# Common prefix for machine-independent installed files. -prefix = @prefix@ -# Common prefix for machine-dependent installed files. -exec_prefix = @exec_prefix@ - -# Directory to install `make' in. -bindir = $(exec_prefix)/bin -# Directory to find libraries in for `-lXXX'. -libdir = $(exec_prefix)/lib -# Directory to search by default for included makefiles. -includedir = $(prefix)/include -# Directory to install the Info files in. -infodir = $(prefix)/info -# Directory to install the man page in. -mandir = $(prefix)/man/man$(manext) -# Number to put on the man page filename. -manext = 1 -# Prefix to put on installed `make' binary file name. -binprefix = -# Prefix to put on installed `make' man page file name. -manprefix = $(binprefix) - -# Whether or not make needs to be installed setgid. -# The value should be either `true' or `false'. -# On many systems, the getloadavg function (used to implement the `-l' -# switch) will not work unless make is installed setgid kmem. -install_setgid = @NEED_SETGID@ -# Install make setgid to this group so it can read /dev/kmem. -group = @KMEM_GROUP@ - -# Program to install `make'. -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -# Program to install the man page. -INSTALL_DATA = @INSTALL_DATA@ -# Generic install program. -INSTALL = @INSTALL@ - -# Program to format Texinfo source into Info files. -MAKEINFO = makeinfo -# Program to format Texinfo source into DVI files. -TEXI2DVI = texi2dvi - -# Programs to make tags files. -ETAGS = etags -w -CTAGS = ctags -w - -objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \ - rule.o implicit.o default.o variable.o expand.o function.o \ - vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \ - $(GLOB) $(GETOPT) $(ALLOCA) $(extras) -srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \ - $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c \ - $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c \ - $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c \ - $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c \ - $(srcdir)/vpath.c $(srcdir)/version.c \ - $(srcdir)/remote-$(REMOTE).c \ - $(srcdir)/ar.c $(srcdir)/arscan.c \ - $(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC) \ - $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h \ - $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h \ - $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in - - -.SUFFIXES: -.SUFFIXES: .o .c .h .ps .dvi .info .texinfo - -all: make -info: make.info -dvi: make.dvi -# Some makes apparently use .PHONY as the default goal if it is before `all'. -.PHONY: all check info dvi - -make.info: make.texinfo - $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info - -make.dvi: make.texinfo - $(TEXI2DVI) $(srcdir)/make.texinfo - -make.ps: make.dvi - dvi2ps make.dvi > make.ps - -make: $(objs) - $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new - mv -f make.new make - -# -I. is needed to find config.h in the build directory. -.c.o: - $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \ - $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) - -# For some losing Unix makes. -SHELL = /bin/sh -@SET_MAKE@ - -glob/libglob.a: FORCE config.h - cd glob; $(MAKE) libglob.a -FORCE: - -tagsrcs = $(srcs) $(srcdir)/remote-*.c -TAGS: $(tagsrcs) - $(ETAGS) $(tagsrcs) -tags: $(tagsrcs) - $(CTAGS) $(tagsrcs) - -.PHONY: install installdirs -install: installdirs \ - $(bindir)/$(binprefix)make $(infodir)/make.info \ - $(mandir)/$(manprefix)make.$(manext) - -installdirs: - $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir) - -$(bindir)/$(binprefix)make: make - $(INSTALL_PROGRAM) make $@.new - @if $(install_setgid); then \ - if chgrp $(group) $@.new && chmod g+s $@.new; then \ - echo "chgrp $(group) $@.new && chmod g+s $@.new"; \ - else \ - echo "$@ needs to be owned by group $(group) and setgid;"; \ - echo "otherwise the \`-l' option will probably not work."; \ - echo "You may need special privileges to install $@."; \ - fi; \ - else true; fi -# Some systems can't deal with renaming onto a running binary. - -rm -f $@.old - -mv $@ $@.old - mv $@.new $@ - -$(infodir)/make.info: make.info - if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \ - for file in $${dir}/make.info*; do \ - name="`basename $$file`"; \ - $(INSTALL_DATA) $$file \ - `echo $@ | sed "s,make.info\$$,$$name,"`; \ - done -# Run install-info only if it exists. -# Use `if' instead of just prepending `-' to the -# line so we notice real errors from install-info. -# We use `$(SHELL) -c' because some shells do not -# fail gracefully when there is an unknown command. - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \ - install-info --infodir=$(infodir) $$dir/make.info; \ - else true; fi - -$(mandir)/$(manprefix)make.$(manext): make.man - $(INSTALL_DATA) $(srcdir)/make.man $@ - - -loadavg: loadavg.c config.h - $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \ - loadavg.c $(LOADLIBES) -o $@ -# We copy getloadavg.c into a different file rather than compiling it -# directly because some compilers clobber getloadavg.o in the process. -loadavg.c: getloadavg.c - ln $(srcdir)/getloadavg.c loadavg.c || \ - cp $(srcdir)/getloadavg.c loadavg.c -check-loadavg: loadavg - @echo The system uptime program believes the load average to be: - -uptime - @echo The GNU load average checking code believes: - ./loadavg -check: check-loadavg - - -.PHONY: clean realclean distclean mostlyclean -clean: glob-clean - -rm -f make loadavg *.o core make.dvi -distclean: clean glob-realclean - -rm -f Makefile config.h config.status build.sh stamp-config - -rm -f config.log config.cache - -rm -f TAGS tags - -rm -f make.?? make.??s make.log make.toc make.*aux - -rm -f loadavg.c -realclean: distclean - -rm -f make.info* -mostlyclean: clean - -.PHONY: glob-clean glob-realclean -glob-clean glob-realclean: - cd glob; $(MAKE) $@ - -Makefile: config.status $(srcdir)/Makefile.in - $(SHELL) config.status -glob/Makefile: config.status $(srcdir)/glob/Makefile.in - $(SHELL) config.status -config.h: stamp-config ; -stamp-config: config.status $(srcdir)/config.h.in - $(SHELL) config.status - touch stamp-config - -#configure: configure.in aclocal.m4 -# cd $(srcdir) && autoconf $(ACFLAGS) -#config.h.in: configure.in aclocal.m4 -# cd $(srcdir) && autoheader $(ACFLAGS) - -# This tells versions [3.59,3.63) of GNU make not to export all variables. -.NOEXPORT: - -# The automatically generated dependencies below may omit config.h -# because it is included with ``#include '' rather than -# ``#include "config.h"''. So we add the explicit dependency to make sure. -$(objs): config.h - -# Automatically generated dependencies will be put at the end of the file. - -# Automatically generated dependencies. -commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h -job.o: job.c make.h commands.h job.h file.h variable.h -dir.o: dir.c make.h -file.o: file.c make.h commands.h dep.h file.h variable.h -misc.o: misc.c make.h dep.h -main.o: main.c make.h commands.h dep.h file.h variable.h job.h getopt.h -read.o: read.c make.h commands.h dep.h file.h variable.h glob/glob.h -remake.o: remake.c make.h commands.h job.h dep.h file.h -rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h -implicit.o : implicit.c make.h rule.h dep.h file.h -default.o: default.c make.h rule.h dep.h file.h commands.h variable.h -variable.o : variable.c make.h commands.h variable.h dep.h file.h -expand.o: expand.c make.h commands.h file.h variable.h -function.o: function.c make.h variable.h dep.h commands.h job.h -vpath.o : vpath.c make.h file.h variable.h -version.o: version.c -ar.o : ar.c make.h file.h dep.h -arscan.o: arscan.c make.h -signame.o: signame.c signame.h -remote-stub.o : remote-stub.c make.h commands.h -getopt.o: getopt.c getopt.h -getopt1.o : getopt1.c getopt.h -getloadavg.o: getloadavg.c diff --git a/buildtools/windows/source/make/NEWS b/buildtools/windows/source/make/NEWS deleted file mode 100644 index 6c97107a97b..00000000000 --- a/buildtools/windows/source/make/NEWS +++ /dev/null @@ -1,557 +0,0 @@ -GNU make NEWS -- history of user-visible changes. 26 January 1995 - -Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. -See the end for copying conditions. - -Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu. - -Version 3.73 - -* Converted to use Autoconf version 2, so `configure' has some new options. - See INSTALL for details. - -* You can now send a SIGUSR1 signal to Make to toggle printing of debugging - output enable by -d, at any time during the run. - -Version 3.72 - -* DJ Delorie has ported Make to MS-DOS using the GO32 extender. - He is maintaining the DOS port, not the GNU Make maintainer; - please direct bugs and questions for DOS to . - MS-DOS binaries are available for FTP from oak.oakland.edu:pub/msdos/djgpp. - -* The `MAKEFLAGS' variable (in the environment or in a makefile) can now - contain variable definitions itself; these are treated just like - command-line variable definitions. Make will automatically insert any - variable definitions from the environment value of `MAKEFLAGS' or from - the command line, into the `MAKEFLAGS' value exported to children. The - `MAKEOVERRIDES' variable previously included in the value of `$(MAKE)' - for sub-makes is now included in `MAKEFLAGS' instead. As before, you can - reset `MAKEOVERRIDES' in your makefile to avoid putting all the variables - in the environment when its size is limited. - -* If `.DELETE_ON_ERROR' appears as a target, Make will delete the target of - a rule if it has changed when its commands exit with a nonzero status, - just as when the commands get a signal. - -* The automatic variable `$+' is new. It lists all the dependencies like - `$^', but preserves duplicates listed in the makefile. This is useful - for linking rules, where library files sometimes need to be listed twice - in the link order. - -* You can now specify the `.IGNORE' and `.SILENT' special targets with - dependencies to limit their effects to those files. If a file appears as - a dependency of `.IGNORE', then errors will be ignored while running the - commands to update that file. Likewise if a file appears as a dependency - of `.SILENT', then the commands to update that file will not be printed - before they are run. (This change was made to conform to POSIX.2.) - -Version 3.71 - -* The automatic variables `$(@D)', `$(%D)', `$(*D)', `$( renames program database file -# /Fo creates an object file -# /Fp specifies a precompiled header file name -# /O2 creates fast code -# /Od disables optimization -# /W sets warning levels -# /YX Automates precompiled header -# /Zi Generates complete debugging information - -CFLAGS_any = /nologo /W3 /YX /I . /I glob /D NETSCAPE /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H -CFLAGS_debug = $(CFLAGS_any) /MLd /Zi /Od /D _DEBUG /FpWinDebug/make.pch /FoWinDebug/ /FdWinDebug/make.pdb -CFLAGS_release = $(CFLAGS_any) /ML /O2 /D NDEBUG /FpWinRel/make.pch /FoWinRel/ - -LDFLAGS_debug = /NOLOGO /SUBSYSTEM:console\ - /INCREMENTAL:no /PDB:WinDebug/make.pdb \ - /OUT:WinDebug/make.exe /DEBUG -LDFLAGS_release = /NOLOGO /SUBSYSTEM:console\ - /INCREMENTAL:no /OUT:WinRel/make.exe - -all: Release Debug - -Release: - nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe -Debug: - nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe - -clean: - rmdir /s /q WinDebug WinRel - -$(OUTDIR): - if not exist .\$@\nul mkdir .\$@ - -#LIBS = kernel32.lib user32.lib advapi32.lib -#LIBS = kernel32.lib - -OBJS = \ - $(OUTDIR)/ar.obj \ - $(OUTDIR)/arscan.obj \ - $(OUTDIR)/commands.obj \ - $(OUTDIR)/default.obj \ - $(OUTDIR)/dir.obj \ - $(OUTDIR)/expand.obj \ - $(OUTDIR)/file.obj \ - $(OUTDIR)/function.obj \ - $(OUTDIR)/getloadavg.obj \ - $(OUTDIR)/getopt.obj \ - $(OUTDIR)/getopt1.obj \ - $(OUTDIR)/implicit.obj \ - $(OUTDIR)/job.obj \ - $(OUTDIR)/main.obj \ - $(OUTDIR)/misc.obj \ - $(OUTDIR)/read.obj \ - $(OUTDIR)/remake.obj \ - $(OUTDIR)/remote-stub.obj \ - $(OUTDIR)/rule.obj \ - $(OUTDIR)/signame.obj \ - $(OUTDIR)/variable.obj \ - $(OUTDIR)/version.obj \ - $(OUTDIR)/vpath.obj \ - $(OUTDIR)/glob.obj \ - $(OUTDIR)/fnmatch.obj - -$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS) - $(LINK) @<< - $(LDFLAGS) $(LIBS) $(OBJS) -<< - -.c{$(OUTDIR)}.obj: - $(CC) $(CFLAGS) /c $< - -$(OUTDIR)/ar.obj : ar.c make.h file.h dep.h -$(OUTDIR)/arscan.obj : arscan.c make.h -$(OUTDIR)/commands.obj : commands.c -$(OUTDIR)/default.obj : default.c make.h rule.h dep.h file.h job.h commands.h variable.h -$(OUTDIR)/dir.obj : dir.c make.h -$(OUTDIR)/expand.obj : expand.c make.h file.h job.h commands.h variable.h -$(OUTDIR)/file.obj : file.c make.h dep.h file.h job.h commands.h variable.h -$(OUTDIR)/function.obj : function.c make.h file.h variable.h dep.h job.h commands.h -$(OUTDIR)/getloadavg.obj : getloadavg.c -$(OUTDIR)/getopt.obj : getopt.c -$(OUTDIR)/getopt1.obj : getopt1.c getopt.h -$(OUTDIR)/implicit.obj : implicit.c make.h rule.h dep.h file.h -$(OUTDIR)/job.obj : job.c make.h job.h file.h commands.h variable.h -$(OUTDIR)/main.obj : main.c make.h dep.h file.h variable.h job.h commands.h getopt.h -$(OUTDIR)/misc.obj : misc.c make.h dep.h -$(OUTDIR)/read.obj : read.c make.h dep.h file.h job.h commands.h variable.h glob/glob.h -$(OUTDIR)/remake.obj : remake.c make.h file.h job.h commands.h dep.h -$(OUTDIR)/remote-stub.obj : remote-stub.c make.h file.h job.h commands.h -$(OUTDIR)/rule.obj : rule.c make.h dep.h file.h job.h commands.h variable.h rule.h -$(OUTDIR)/signame.obj : signame.c signame.h -$(OUTDIR)/variable.obj : variable.c make.h dep.h file.h job.h commands.h variable.h -$(OUTDIR)/version.obj : version.c -$(OUTDIR)/vpath.obj : vpath.c make.h file.h variable.h -$(OUTDIR)/glob.obj : glob/glob.c - $(CC) $(CFLAGS) /c glob/glob.c -$(OUTDIR)/fnmatch.obj : glob/fnmatch.c - $(CC) $(CFLAGS) /c glob/fnmatch.c diff --git a/buildtools/windows/source/make/README b/buildtools/windows/source/make/README deleted file mode 100644 index 43003a33861..00000000000 --- a/buildtools/windows/source/make/README +++ /dev/null @@ -1,28 +0,0 @@ -This directory contains the 3.74 test release of GNU Make. -All bugs reported for previous test releases have been fixed. -Some bugs surely remain. - -For general building and installation instructions, see the file INSTALL. -If you need to build GNU Make and have no other `make' program to use, -you can use the shell script `build.sh' instead. To do this, first run -`configure' as described in INSTALL. Then, instead of typing `make' to -build the program, type `sh build.sh'. This should compile the program -in the current directory. Then you will have a Make program that you can -use for `make install', or whatever else. - -It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such -that if you compile make with `cc -O' on AIX 3.2, it will not work correctly. -It is said that using `cc' without `-O' does work. - -One area that is often a problem in configuration and porting is the code -to check the system's current load average. To make it easier to test and -debug this code, you can do `make check-loadavg' to see if it works -properly on your system. (You must run `configure' beforehand, but you -need not build Make itself to run this test.) - -See the file NEWS for what has changed since previous releases. - -GNU Make is fully documented in make.texinfo. See the section entitled -`Problems and Bugs' for information on submitting bug reports. - -GNU Make is free software. See the file COPYING for copying conditions. diff --git a/buildtools/windows/source/make/README.MOZILLA b/buildtools/windows/source/make/README.MOZILLA deleted file mode 100644 index 3a751d64405..00000000000 --- a/buildtools/windows/source/make/README.MOZILLA +++ /dev/null @@ -1,16 +0,0 @@ -This directory contains the source files for the GNU make -that is used to build some components (e.g., NSPR) on Win32. - -This GNU make is based on version 3.74 and was ported to -Win32 by Netscape engineers. Its default shell is shmsdos.exe, -a lightweight shell written by Netscape engineers. - -To build it, you need Microsoft Visual C++ and nmake. If -you want to change the build number, which is displayed by -the '-v' command line option, you can edit the value of the -macro BUILD_NUMBER in main.c. Then, issue the command: - nmake /f NMakefile -The outputs are WinDebug\make.exe and WinRel\make.exe. -Assuming you want to use the optmized executable file, -copy WinRel\make.exe to a directory on your Path and -rename it gmake.exe. diff --git a/buildtools/windows/source/make/acconfig.h b/buildtools/windows/source/make/acconfig.h deleted file mode 100644 index 192dc0f828a..00000000000 --- a/buildtools/windows/source/make/acconfig.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Define to the name of the SCCS `get' command. */ -#undef SCCS_GET - -/* Define this if the SCCS `get' command understands the `-G' option. */ -#undef SCCS_GET_MINUS_G - -/* Define this if the C library defines the variable `sys_siglist'. */ -#undef HAVE_SYS_SIGLIST - -/* Define this if the C library defines the variable `_sys_siglist'. */ -#undef HAVE__SYS_SIGLIST - -/* Define this if you have the `union wait' type in . */ -#undef HAVE_UNION_WAIT - -/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */ -#undef HAVE_SYSCONF_OPEN_MAX diff --git a/buildtools/windows/source/make/alloca.c b/buildtools/windows/source/make/alloca.c deleted file mode 100644 index 7020f32c882..00000000000 --- a/buildtools/windows/source/make/alloca.c +++ /dev/null @@ -1,492 +0,0 @@ -/* alloca.c -- allocate automatically reclaimed memory - (Mostly) portable public-domain implementation -- D A Gwyn - - This implementation of the PWB library alloca function, - which is used to allocate space off the run-time stack so - that it is automatically reclaimed upon procedure exit, - was inspired by discussions with J. Q. Johnson of Cornell. - J.Otto Tennant contributed the Cray support. - - There are some preprocessor constants that can - be defined when compiling for your specific system, for - improved efficiency; however, the defaults should be okay. - - The general concept of this implementation is to keep - track of all alloca-allocated blocks, and reclaim any - that are found to be deeper in the stack than the current - invocation. This heuristic does not reclaim storage as - soon as it becomes invalid, but it will do so eventually. - - As a special case, alloca(0) reclaims storage without - allocating any. It is a good idea to use alloca(0) in - your main control loop, etc. to force garbage collection. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef emacs -#include "blockinput.h" -#endif - -/* If compiling with GCC 2, this file's not needed. */ -#if !defined (__GNUC__) || __GNUC__ < 2 - -/* If someone has defined alloca as a macro, - there must be some other way alloca is supposed to work. */ -#ifndef alloca - -#ifdef emacs -#ifdef static -/* actually, only want this if static is defined as "" - -- this is for usg, in which emacs must undefine static - in order to make unexec workable - */ -#ifndef STACK_DIRECTION -you -lose --- must know STACK_DIRECTION at compile-time -#endif /* STACK_DIRECTION undefined */ -#endif /* static */ -#endif /* emacs */ - -/* If your stack is a linked list of frames, you have to - provide an "address metric" ADDRESS_FUNCTION macro. */ - -#if defined (CRAY) && defined (CRAY_STACKSEG_END) -long i00afunc (); -#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) -#else -#define ADDRESS_FUNCTION(arg) &(arg) -#endif - -#if __STDC__ -typedef void *pointer; -#else -typedef char *pointer; -#endif - -#define NULL 0 - -/* Different portions of Emacs need to call different versions of - malloc. The Emacs executable needs alloca to call xmalloc, because - ordinary malloc isn't protected from input signals. On the other - hand, the utilities in lib-src need alloca to call malloc; some of - them are very simple, and don't have an xmalloc routine. - - Non-Emacs programs expect this to call use xmalloc. - - Callers below should use malloc. */ - -#ifndef emacs -#define malloc xmalloc -#endif -extern pointer malloc (); - -/* Define STACK_DIRECTION if you know the direction of stack - growth for your system; otherwise it will be automatically - deduced at run-time. - - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ - -#ifndef STACK_DIRECTION -#define STACK_DIRECTION 0 /* Direction unknown. */ -#endif - -#if STACK_DIRECTION != 0 - -#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ - -#else /* STACK_DIRECTION == 0; need run-time code. */ - -static int stack_dir; /* 1 or -1 once known. */ -#define STACK_DIR stack_dir - -static void -find_stack_direction () -{ - static char *addr = NULL; /* Address of first `dummy', once known. */ - auto char dummy; /* To get stack address. */ - - if (addr == NULL) - { /* Initial entry. */ - addr = ADDRESS_FUNCTION (dummy); - - find_stack_direction (); /* Recurse once. */ - } - else - { - /* Second entry. */ - if (ADDRESS_FUNCTION (dummy) > addr) - stack_dir = 1; /* Stack grew upward. */ - else - stack_dir = -1; /* Stack grew downward. */ - } -} - -#endif /* STACK_DIRECTION == 0 */ - -/* An "alloca header" is used to: - (a) chain together all alloca'ed blocks; - (b) keep track of stack depth. - - It is very important that sizeof(header) agree with malloc - alignment chunk size. The following default should work okay. */ - -#ifndef ALIGN_SIZE -#define ALIGN_SIZE sizeof(double) -#endif - -typedef union hdr -{ - char align[ALIGN_SIZE]; /* To force sizeof(header). */ - struct - { - union hdr *next; /* For chaining headers. */ - char *deep; /* For stack depth measure. */ - } h; -} header; - -static header *last_alloca_header = NULL; /* -> last alloca header. */ - -/* Return a pointer to at least SIZE bytes of storage, - which will be automatically reclaimed upon exit from - the procedure that called alloca. Originally, this space - was supposed to be taken from the current stack frame of the - caller, but that method cannot be made to work for some - implementations of C, for example under Gould's UTX/32. */ - -pointer -alloca (size) - unsigned size; -{ - auto char probe; /* Probes stack depth: */ - register char *depth = ADDRESS_FUNCTION (probe); - -#if STACK_DIRECTION == 0 - if (STACK_DIR == 0) /* Unknown growth direction. */ - find_stack_direction (); -#endif - - /* Reclaim garbage, defined as all alloca'd storage that - was allocated from deeper in the stack than currently. */ - - { - register header *hp; /* Traverses linked list. */ - -#ifdef emacs - BLOCK_INPUT; -#endif - - for (hp = last_alloca_header; hp != NULL;) - if ((STACK_DIR > 0 && hp->h.deep > depth) - || (STACK_DIR < 0 && hp->h.deep < depth)) - { - register header *np = hp->h.next; - - free ((pointer) hp); /* Collect garbage. */ - - hp = np; /* -> next header. */ - } - else - break; /* Rest are not deeper. */ - - last_alloca_header = hp; /* -> last valid storage. */ - -#ifdef emacs - UNBLOCK_INPUT; -#endif - } - - if (size == 0) - return NULL; /* No allocation required. */ - - /* Allocate combined header + user data storage. */ - - { - register pointer new = malloc (sizeof (header) + size); - /* Address of header. */ - - ((header *) new)->h.next = last_alloca_header; - ((header *) new)->h.deep = depth; - - last_alloca_header = (header *) new; - - /* User storage begins just after header. */ - - return (pointer) ((char *) new + sizeof (header)); - } -} - -#if defined (CRAY) && defined (CRAY_STACKSEG_END) - -#ifdef DEBUG_I00AFUNC -#include -#endif - -#ifndef CRAY_STACK -#define CRAY_STACK -#ifndef CRAY2 -/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ -struct stack_control_header - { - long shgrow:32; /* Number of times stack has grown. */ - long shaseg:32; /* Size of increments to stack. */ - long shhwm:32; /* High water mark of stack. */ - long shsize:32; /* Current size of stack (all segments). */ - }; - -/* The stack segment linkage control information occurs at - the high-address end of a stack segment. (The stack - grows from low addresses to high addresses.) The initial - part of the stack segment linkage control information is - 0200 (octal) words. This provides for register storage - for the routine which overflows the stack. */ - -struct stack_segment_linkage - { - long ss[0200]; /* 0200 overflow words. */ - long sssize:32; /* Number of words in this segment. */ - long ssbase:32; /* Offset to stack base. */ - long:32; - long sspseg:32; /* Offset to linkage control of previous - segment of stack. */ - long:32; - long sstcpt:32; /* Pointer to task common address block. */ - long sscsnm; /* Private control structure number for - microtasking. */ - long ssusr1; /* Reserved for user. */ - long ssusr2; /* Reserved for user. */ - long sstpid; /* Process ID for pid based multi-tasking. */ - long ssgvup; /* Pointer to multitasking thread giveup. */ - long sscray[7]; /* Reserved for Cray Research. */ - long ssa0; - long ssa1; - long ssa2; - long ssa3; - long ssa4; - long ssa5; - long ssa6; - long ssa7; - long sss0; - long sss1; - long sss2; - long sss3; - long sss4; - long sss5; - long sss6; - long sss7; - }; - -#else /* CRAY2 */ -/* The following structure defines the vector of words - returned by the STKSTAT library routine. */ -struct stk_stat - { - long now; /* Current total stack size. */ - long maxc; /* Amount of contiguous space which would - be required to satisfy the maximum - stack demand to date. */ - long high_water; /* Stack high-water mark. */ - long overflows; /* Number of stack overflow ($STKOFEN) calls. */ - long hits; /* Number of internal buffer hits. */ - long extends; /* Number of block extensions. */ - long stko_mallocs; /* Block allocations by $STKOFEN. */ - long underflows; /* Number of stack underflow calls ($STKRETN). */ - long stko_free; /* Number of deallocations by $STKRETN. */ - long stkm_free; /* Number of deallocations by $STKMRET. */ - long segments; /* Current number of stack segments. */ - long maxs; /* Maximum number of stack segments so far. */ - long pad_size; /* Stack pad size. */ - long current_address; /* Current stack segment address. */ - long current_size; /* Current stack segment size. This - number is actually corrupted by STKSTAT to - include the fifteen word trailer area. */ - long initial_address; /* Address of initial segment. */ - long initial_size; /* Size of initial segment. */ - }; - -/* The following structure describes the data structure which trails - any stack segment. I think that the description in 'asdef' is - out of date. I only describe the parts that I am sure about. */ - -struct stk_trailer - { - long this_address; /* Address of this block. */ - long this_size; /* Size of this block (does not include - this trailer). */ - long unknown2; - long unknown3; - long link; /* Address of trailer block of previous - segment. */ - long unknown5; - long unknown6; - long unknown7; - long unknown8; - long unknown9; - long unknown10; - long unknown11; - long unknown12; - long unknown13; - long unknown14; - }; - -#endif /* CRAY2 */ -#endif /* not CRAY_STACK */ - -#ifdef CRAY2 -/* Determine a "stack measure" for an arbitrary ADDRESS. - I doubt that "lint" will like this much. */ - -static long -i00afunc (long *address) -{ - struct stk_stat status; - struct stk_trailer *trailer; - long *block, size; - long result = 0; - - /* We want to iterate through all of the segments. The first - step is to get the stack status structure. We could do this - more quickly and more directly, perhaps, by referencing the - $LM00 common block, but I know that this works. */ - - STKSTAT (&status); - - /* Set up the iteration. */ - - trailer = (struct stk_trailer *) (status.current_address - + status.current_size - - 15); - - /* There must be at least one stack segment. Therefore it is - a fatal error if "trailer" is null. */ - - if (trailer == 0) - abort (); - - /* Discard segments that do not contain our argument address. */ - - while (trailer != 0) - { - block = (long *) trailer->this_address; - size = trailer->this_size; - if (block == 0 || size == 0) - abort (); - trailer = (struct stk_trailer *) trailer->link; - if ((block <= address) && (address < (block + size))) - break; - } - - /* Set the result to the offset in this segment and add the sizes - of all predecessor segments. */ - - result = address - block; - - if (trailer == 0) - { - return result; - } - - do - { - if (trailer->this_size <= 0) - abort (); - result += trailer->this_size; - trailer = (struct stk_trailer *) trailer->link; - } - while (trailer != 0); - - /* We are done. Note that if you present a bogus address (one - not in any segment), you will get a different number back, formed - from subtracting the address of the first block. This is probably - not what you want. */ - - return (result); -} - -#else /* not CRAY2 */ -/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. - Determine the number of the cell within the stack, - given the address of the cell. The purpose of this - routine is to linearize, in some sense, stack addresses - for alloca. */ - -static long -i00afunc (long address) -{ - long stkl = 0; - - long size, pseg, this_segment, stack; - long result = 0; - - struct stack_segment_linkage *ssptr; - - /* Register B67 contains the address of the end of the - current stack segment. If you (as a subprogram) store - your registers on the stack and find that you are past - the contents of B67, you have overflowed the segment. - - B67 also points to the stack segment linkage control - area, which is what we are really interested in. */ - - stkl = CRAY_STACKSEG_END (); - ssptr = (struct stack_segment_linkage *) stkl; - - /* If one subtracts 'size' from the end of the segment, - one has the address of the first word of the segment. - - If this is not the first segment, 'pseg' will be - nonzero. */ - - pseg = ssptr->sspseg; - size = ssptr->sssize; - - this_segment = stkl - size; - - /* It is possible that calling this routine itself caused - a stack overflow. Discard stack segments which do not - contain the target address. */ - - while (!(this_segment <= address && address <= stkl)) - { -#ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); -#endif - if (pseg == 0) - break; - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - this_segment = stkl - size; - } - - result = address - this_segment; - - /* If you subtract pseg from the current end of the stack, - you get the address of the previous stack segment's end. - This seems a little convoluted to me, but I'll bet you save - a cycle somewhere. */ - - while (pseg != 0) - { -#ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o\n", pseg, size); -#endif - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - result += size; - } - return (result); -} - -#endif /* not CRAY2 */ -#endif /* CRAY */ - -#endif /* no alloca */ -#endif /* not GCC version 2 */ diff --git a/buildtools/windows/source/make/ar.c b/buildtools/windows/source/make/ar.c deleted file mode 100644 index 63fcd34f6f0..00000000000 --- a/buildtools/windows/source/make/ar.c +++ /dev/null @@ -1,317 +0,0 @@ -/* Interface to `ar' archives for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" - -#ifndef NO_ARCHIVES - -#include "file.h" -#include "dep.h" -#include - -/* Defined in arscan.c. */ -extern long int ar_scan (); -extern int ar_member_touch (); -extern int ar_name_equal (); - - -/* Return nonzero if NAME is an archive-member reference, zero if not. - An archive-member reference is a name like `lib(member)'. - If a name like `lib((entry))' is used, a fatal error is signaled at - the attempt to use this unsupported feature. */ - -int -ar_name (name) - char *name; -{ - char *p = index (name, '('), *end = name + strlen (name) - 1; - - if (p == 0 || p == name || *end != ')') - return 0; - - if (p[1] == '(' && end[-1] == ')') - fatal ("attempt to use unsupported feature: `%s'", name); - - return 1; -} - - -/* Parse the archive-member reference NAME into the archive and member names. - Put the malloc'd archive name in *ARNAME_P if ARNAME_P is non-nil; - put the malloc'd member name in *MEMNAME_P if MEMNAME_P is non-nil. */ - -void -ar_parse_name (name, arname_p, memname_p) - char *name, **arname_p, **memname_p; -{ - char *p = index (name, '('), *end = name + strlen (name) - 1; - - if (arname_p != 0) - *arname_p = savestring (name, p - name); - - if (memname_p != 0) - *memname_p = savestring (p + 1, end - (p + 1)); -} - -static long int ar_member_date_1 (); - -/* Return the modtime of NAME. */ - -time_t -ar_member_date (name) - char *name; -{ - char *arname; - int arname_used = 0; - char *memname; - long int val; - - ar_parse_name (name, &arname, &memname); - - /* Make sure we know the modtime of the archive itself because we are - likely to be called just before commands to remake a member are run, - and they will change the archive itself. - - But we must be careful not to enter_file the archive itself if it does - not exist, because pattern_search assumes that files found in the data - base exist or can be made. */ - { - struct file *arfile; - arfile = lookup_file (arname); - if (arfile == 0 && file_exists_p (arname)) - { - arfile = enter_file (arname); - arname_used = 1; - } - - if (arfile != 0) - (void) f_mtime (arfile, 0); - } - - val = ar_scan (arname, ar_member_date_1, (long int) memname); - - if (!arname_used) - free (arname); - free (memname); - - return (val <= 0 ? (time_t) -1 : (time_t) val); -} - -/* This function is called by `ar_scan' to find which member to look at. */ - -/* ARGSUSED */ -static long int -ar_member_date_1 (desc, mem, truncated, - hdrpos, datapos, size, date, uid, gid, mode, name) - int desc; - char *mem; - int truncated; - long int hdrpos, datapos, size, date; - int uid, gid, mode; - char *name; -{ - return ar_name_equal (name, mem, truncated) ? date : 0; -} - -/* Set the archive-member NAME's modtime to now. */ - -int -ar_touch (name) - char *name; -{ - char *arname, *memname; - int arname_used = 0; - register int val; - - ar_parse_name (name, &arname, &memname); - - /* Make sure we know the modtime of the archive itself before we - touch the member, since this will change the archive itself. */ - { - struct file *arfile; - arfile = lookup_file (arname); - if (arfile == 0) - { - arfile = enter_file (arname); - arname_used = 1; - } - - (void) f_mtime (arfile, 0); - } - - val = 1; - switch (ar_member_touch (arname, memname)) - { - case -1: - error ("touch: Archive `%s' does not exist", arname); - break; - case -2: - error ("touch: `%s' is not a valid archive", arname); - break; - case -3: - perror_with_name ("touch: ", arname); - break; - case 1: - error ("touch: Member `%s' does not exist in `%s'", memname, arname); - break; - case 0: - val = 0; - break; - default: - error ("touch: Bad return code from ar_member_touch on `%s'", name); - } - - if (!arname_used) - free (arname); - free (memname); - - return val; -} - -/* State of an `ar_glob' run, passed to `ar_glob_match'. */ - -struct ar_glob_state - { - char *arname; - char *pattern; - unsigned int size; - struct nameseq *chain; - unsigned int n; - }; - -/* This function is called by `ar_scan' to match one archive - element against the pattern in STATE. */ - -static long int -ar_glob_match (desc, mem, truncated, - hdrpos, datapos, size, date, uid, gid, mode, - state) - int desc; - char *mem; - int truncated; - long int hdrpos, datapos, size, date; - int uid, gid, mode; - struct ar_glob_state *state; -{ - if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0) - { - /* We have a match. Add it to the chain. */ - struct nameseq *new = (struct nameseq *) xmalloc (state->size); - new->name = concat (state->arname, mem, ")"); - new->next = state->chain; - state->chain = new; - ++state->n; - } - - return 0L; -} - -/* Alphabetic sorting function for `qsort'. */ - -static int -ar_glob_alphacompare (a, b) - char **a, **b; -{ - return strcmp (*a, *b); -} - -/* Return nonzero if PATTERN contains any metacharacters. - Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ -static int -glob_pattern_p (pattern, quote) - const char *pattern; - const int quote; -{ - register const char *p; - int open = 0; - - for (p = pattern; *p != '\0'; ++p) - switch (*p) - { - case '?': - case '*': - return 1; - - case '\\': - if (quote) - ++p; - break; - - case '[': - open = 1; - break; - - case ']': - if (open) - return 1; - break; - } - - return 0; -} - -/* Glob for MEMBER_PATTERN in archive ARNAME. - Return a malloc'd chain of matching elements (or nil if none). */ - -struct nameseq * -ar_glob (arname, member_pattern, size) - char *arname, *member_pattern; - unsigned int size; -{ - struct ar_glob_state state; - char **names; - struct nameseq *n; - unsigned int i; - - if (! glob_pattern_p (member_pattern, 1)) - return 0; - - /* Scan the archive for matches. - ar_glob_match will accumulate them in STATE.chain. */ - i = strlen (arname); - state.arname = (char *) alloca (i + 2); - bcopy (arname, state.arname, i); - state.arname[i] = '('; - state.arname[i + 1] = '\0'; - state.pattern = member_pattern; - state.size = size; - state.chain = 0; - state.n = 0; - (void) ar_scan (arname, ar_glob_match, (long int) &state); - - if (state.chain == 0) - return 0; - - /* Now put the names into a vector for sorting. */ - names = (char **) alloca (state.n * sizeof (char *)); - i = 0; - for (n = state.chain; n != 0; n = n->next) - names[i++] = n->name; - - /* Sort them alphabetically. */ - qsort ((char *) names, i, sizeof (*names), ar_glob_alphacompare); - - /* Put them back into the chain in the sorted order. */ - i = 0; - for (n = state.chain; n != 0; n = n->next) - n->name = names[i++]; - - return state.chain; -} - -#endif /* Not NO_ARCHIVES. */ diff --git a/buildtools/windows/source/make/arscan.c b/buildtools/windows/source/make/arscan.c deleted file mode 100644 index a3dce83c329..00000000000 --- a/buildtools/windows/source/make/arscan.c +++ /dev/null @@ -1,561 +0,0 @@ -/* Library function for scanning an archive file. - Copyright (C) 1987, 89, 91, 92, 93, 94 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" - -#ifdef HAVE_FCNTL_H -#include -#else -#include -#endif - -#ifndef NO_ARCHIVES - -/* SCO Unix's compiler defines both of these. */ -#ifdef M_UNIX -#undef M_XENIX -#endif - -/* On the sun386i and in System V rel 3, ar.h defines two different archive - formats depending upon whether you have defined PORTAR (normal) or PORT5AR - (System V Release 1). There is no default, one or the other must be defined - to have a nonzero value. */ - -#if (!defined (PORTAR) || PORTAR == 0) && (!defined (PORT5AR) || PORT5AR == 0) -#undef PORTAR -#ifdef M_XENIX -/* According to Jim Sievert , for SCO XENIX defining - PORTAR to 1 gets the wrong archive format, and defining it to 0 gets the - right one. */ -#define PORTAR 0 -#else -#define PORTAR 1 -#endif -#endif - -#include - -/* Cray's apparently defines this. */ -#ifndef AR_HDR_SIZE -#define AR_HDR_SIZE (sizeof (struct ar_hdr)) -#endif - -/* Takes three arguments ARCHIVE, FUNCTION and ARG. - - Open the archive named ARCHIVE, find its members one by one, - and for each one call FUNCTION with the following arguments: - archive file descriptor for reading the data, - member name, - member name might be truncated flag, - member header position in file, - member data position in file, - member data size, - member date, - member uid, - member gid, - member protection mode, - ARG. - - The descriptor is poised to read the data of the member - when FUNCTION is called. It does not matter how much - data FUNCTION reads. - - If FUNCTION returns nonzero, we immediately return - what FUNCTION returned. - - Returns -1 if archive does not exist, - Returns -2 if archive has invalid format. - Returns 0 if have scanned successfully. */ - -long int -ar_scan (archive, function, arg) - char *archive; - long int (*function) (); - long int arg; -{ -#ifdef AIAMAG - FL_HDR fl_header; -#else - int long_name = 0; -#endif - char *namemap = 0; - register int desc = open (archive, O_RDONLY, 0); - if (desc < 0) - return -1; -#ifdef SARMAG - { - char buf[SARMAG]; - register int nread = read (desc, buf, SARMAG); - if (nread != SARMAG || bcmp (buf, ARMAG, SARMAG)) - { - (void) close (desc); - return -2; - } - } -#else -#ifdef AIAMAG - { - register int nread = read (desc, (char *) &fl_header, FL_HSZ); - if (nread != FL_HSZ || bcmp (fl_header.fl_magic, AIAMAG, SAIAMAG)) - { - (void) close (desc); - return -2; - } - } -#else - { -#ifndef M_XENIX - int buf; -#else - unsigned short int buf; -#endif - register int nread = read(desc, &buf, sizeof (buf)); - if (nread != sizeof (buf) || buf != ARMAG) - { - (void) close (desc); - return -2; - } - } -#endif -#endif - - /* Now find the members one by one. */ - { -#ifdef SARMAG - register long int member_offset = SARMAG; -#else -#ifdef AIAMAG - long int member_offset; - long int last_member_offset; - - sscanf (fl_header.fl_fstmoff, "%12ld", &member_offset); - sscanf (fl_header.fl_lstmoff, "%12ld", &last_member_offset); -#else -#ifndef M_XENIX - register long int member_offset = sizeof (int); -#else /* Xenix. */ - register long int member_offset = sizeof (unsigned short int); -#endif /* Not Xenix. */ -#endif -#endif - - while (1) - { - register int nread; - struct ar_hdr member_header; -#ifdef AIAMAG - char name[256]; - int name_len; - long int dateval; - int uidval, gidval; - long int data_offset; -#else - char namebuf[sizeof member_header.ar_name + 1]; - char *name; - int is_namemap; /* Nonzero if this entry maps long names. */ -#endif - long int eltsize; - int eltmode; - long int fnval; - - if (lseek (desc, member_offset, 0) < 0) - { - (void) close (desc); - return -2; - } - -#ifdef AIAMAG -#define AR_MEMHDR (AR_HDR_SIZE - sizeof (member_header._ar_name)) - nread = read (desc, (char *) &member_header, AR_MEMHDR); - - if (nread != AR_MEMHDR) - { - (void) close (desc); - return -2; - } - - sscanf (member_header.ar_namlen, "%4d", &name_len); - nread = read (desc, name, name_len); - - if (nread != name_len) - { - (void) close (desc); - return -2; - } - - name[name_len] = 0; - - sscanf (member_header.ar_date, "%12ld", &dateval); - sscanf (member_header.ar_uid, "%12d", &uidval); - sscanf (member_header.ar_gid, "%12d", &gidval); - sscanf (member_header.ar_mode, "%12o", &eltmode); - sscanf (member_header.ar_size, "%12ld", &eltsize); - - if ((data_offset = member_offset + AR_MEMHDR + name_len + 2) % 2) - ++data_offset; - - fnval = - (*function) (desc, name, 0, - member_offset, data_offset, eltsize, - dateval, uidval, gidval, - eltmode, arg); - -#else /* Not AIAMAG. */ - nread = read (desc, (char *) &member_header, AR_HDR_SIZE); - if (nread == 0) - /* No data left means end of file; that is OK. */ - break; - - if (nread != AR_HDR_SIZE -#ifdef ARFMAG - || bcmp (member_header.ar_fmag, ARFMAG, 2) -#endif - ) - { - (void) close (desc); - return -2; - } - - name = namebuf; - bcopy (member_header.ar_name, name, sizeof member_header.ar_name); - { - register char *p = name + sizeof member_header.ar_name; - do - *p = '\0'; - while (p > name && *--p == ' '); - -#ifndef AIAMAG - /* If the member name is "//" or "ARFILENAMES/" this may be - a list of file name mappings. The maximum file name - length supported by the standard archive format is 14 - characters. This member will actually always be the - first or second entry in the archive, but we don't check - that. */ - is_namemap = (!strcmp (name, "//") - || !strcmp (name, "ARFILENAMES/")); -#endif /* Not AIAMAG. */ - /* On some systems, there is a slash after each member name. */ - if (*p == '/') - *p = '\0'; - -#ifndef AIAMAG - /* If the member name starts with a space or a slash, this - is an index into the file name mappings (used by GNU ar). - Otherwise if the member name looks like #1/NUMBER the - real member name appears in the element data (used by - 4.4BSD). */ - if (! is_namemap - && (name[0] == ' ' || name[0] == '/') - && namemap != 0) - { - name = namemap + atoi (name + 1); - long_name = 1; - } - else if (name[0] == '#' - && name[1] == '1' - && name[2] == '/') - { - int namesize = atoi (name + 3); - - name = (char *) alloca (namesize + 1); - nread = read (desc, name, namesize); - if (nread != namesize) - { - close (desc); - return -2; - } - name[namesize] = '\0'; - - long_name = 1; - } -#endif /* Not AIAMAG. */ - } - -#ifndef M_XENIX - sscanf (member_header.ar_mode, "%o", &eltmode); - eltsize = atol (member_header.ar_size); -#else /* Xenix. */ - eltmode = (unsigned short int) member_header.ar_mode; - eltsize = member_header.ar_size; -#endif /* Not Xenix. */ - - fnval = - (*function) (desc, name, ! long_name, member_offset, - member_offset + AR_HDR_SIZE, eltsize, -#ifndef M_XENIX - atol (member_header.ar_date), - atoi (member_header.ar_uid), - atoi (member_header.ar_gid), -#else /* Xenix. */ - member_header.ar_date, - member_header.ar_uid, - member_header.ar_gid, -#endif /* Not Xenix. */ - eltmode, arg); - -#endif /* AIAMAG. */ - - if (fnval) - { - (void) close (desc); - return fnval; - } - -#ifdef AIAMAG - if (member_offset == last_member_offset) - /* End of the chain. */ - break; - - sscanf (member_header.ar_nxtmem, "%12ld", &member_offset); - - if (lseek (desc, member_offset, 0) != member_offset) - { - (void) close (desc); - return -2; - } -#else - - /* If this member maps archive names, we must read it in. The - name map will always precede any members whose names must - be mapped. */ - if (is_namemap) - { - char *clear; - char *limit; - - namemap = (char *) alloca (eltsize); - nread = read (desc, namemap, eltsize); - if (nread != eltsize) - { - (void) close (desc); - return -2; - } - - /* The names are separated by newlines. Some formats have - a trailing slash. Null terminate the strings for - convenience. */ - limit = namemap + eltsize; - for (clear = namemap; clear < limit; clear++) - { - if (*clear == '\n') - { - *clear = '\0'; - if (clear[-1] == '/') - clear[-1] = '\0'; - } - } - - is_namemap = 0; - } - - member_offset += AR_HDR_SIZE + eltsize; - if (member_offset % 2 != 0) - member_offset++; -#endif - } - } - - close (desc); - return 0; -} - -/* Return nonzero iff NAME matches MEM. - If TRUNCATED is nonzero, MEM may be truncated to - sizeof (struct ar_hdr.ar_name) - 1. */ - -int -ar_name_equal (name, mem, truncated) - char *name, *mem; - int truncated; -{ - char *p; - - p = rindex (name, '/'); - if (p != 0) - name = p + 1; - - /* We no longer use this kludge, since we - now support long archive member names. */ - -#if 0 && !defined (AIAMAG) && !defined (APOLLO) - - { - /* `reallylongname.o' matches `reallylongnam.o'. - If member names have a trailing slash, that's `reallylongna.o'. */ - - struct ar_hdr h; - unsigned int max = sizeof (h.ar_name); - unsigned int namelen, memlen; - - if (strncmp (name, mem, max - 3)) - return 0; - - namelen = strlen (name); - memlen = strlen (mem); - - if (namelen > memlen && memlen >= max - 1 - && name[namelen - 2] == '.' && name[namelen - 1] == 'o' - && mem[memlen - 2] == '.' && mem[memlen - 1] == 'o') - return 1; - - if (namelen != memlen) - return 0; - - return (namelen < max - 3 || !strcmp (name + max - 3, mem + max - 3)); - } - -#else /* AIX or APOLLO. */ - - if (truncated) - { -#ifdef AIAMAG - /* TRUNCATED should never be set on this system. */ - abort (); -#else - struct ar_hdr hdr; - return !strncmp (name, mem, - sizeof (hdr.ar_name) - -#if !defined (__hpux) && !defined (cray) - 1 -#else - 2 -#endif /* !__hpux && !cray */ - ); -#endif - } - - return !strcmp (name, mem); - -#endif -} - -/* ARGSUSED */ -static long int -ar_member_pos (desc, mem, truncated, - hdrpos, datapos, size, date, uid, gid, mode, name) - int desc; - char *mem; - int truncated; - long int hdrpos, datapos, size, date; - int uid, gid, mode; - char *name; -{ - if (!ar_name_equal (name, mem, truncated)) - return 0; - return hdrpos; -} - -/* Set date of member MEMNAME in archive ARNAME to current time. - Returns 0 if successful, - -1 if file ARNAME does not exist, - -2 if not a valid archive, - -3 if other random system call error (including file read-only), - 1 if valid but member MEMNAME does not exist. */ - -int -ar_member_touch (arname, memname) - char *arname, *memname; -{ - register long int pos = ar_scan (arname, ar_member_pos, (long int) memname); - register int fd; - struct ar_hdr ar_hdr; - register int i; - struct stat statbuf; - - if (pos < 0) - return (int) pos; - if (!pos) - return 1; - - fd = open (arname, O_RDWR, 0666); - if (fd < 0) - return -3; - /* Read in this member's header */ - if (lseek (fd, pos, 0) < 0) - goto lose; - if (AR_HDR_SIZE != read (fd, (char *) &ar_hdr, AR_HDR_SIZE)) - goto lose; - /* Write back the header, thus touching the archive file. */ - if (lseek (fd, pos, 0) < 0) - goto lose; - if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE)) - goto lose; - /* The file's mtime is the time we we want. */ -#ifdef EINTR - while (fstat (fd, &statbuf) < 0 && errno == EINTR); -#else - fstat (fd, &statbuf); -#endif -#if defined(ARFMAG) || defined(AIAMAG) - /* Advance member's time to that time */ - for (i = 0; i < sizeof ar_hdr.ar_date; i++) - ar_hdr.ar_date[i] = ' '; - sprintf (ar_hdr.ar_date, "%ld", (long int) statbuf.st_mtime); -#ifdef AIAMAG - ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' '; -#endif -#else - ar_hdr.ar_date = statbuf.st_mtime; -#endif - /* Write back this member's header */ - if (lseek (fd, pos, 0) < 0) - goto lose; - if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE)) - goto lose; - close (fd); - return 0; - - lose: - i = errno; - close (fd); - errno = i; - return -3; -} - -#ifdef TEST - -long int -describe_member (desc, name, truncated, - hdrpos, datapos, size, date, uid, gid, mode) - int desc; - char *name; - int truncated; - long int hdrpos, datapos, size, date; - int uid, gid, mode; -{ - extern char *ctime (); - - printf ("Member `%s'%s: %ld bytes at %ld (%ld).\n", - name, truncated ? " (name might be truncated)" : "", - size, hdrpos, datapos); - printf (" Date %s", ctime (&date)); - printf (" uid = %d, gid = %d, mode = 0%o.\n", uid, gid, mode); - - return 0; -} - -main (argc, argv) - int argc; - char **argv; -{ - ar_scan (argv[1], describe_member); - return 0; -} - -#endif /* TEST. */ - -#endif /* NO_ARCHIVES. */ diff --git a/buildtools/windows/source/make/build.sh.in b/buildtools/windows/source/make/build.sh.in deleted file mode 100644 index 1667f0e15ac..00000000000 --- a/buildtools/windows/source/make/build.sh.in +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# Shell script to build GNU Make in the absence of any `make' program. -# @configure_input@ - -# Copyright (C) 1993, 1994 Free Software Foundation, Inc. -# This file is part of GNU Make. -# -# GNU Make is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# GNU Make is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Make; see the file COPYING. If not, write to -# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -# See Makefile.in for comments describing these variables. - -srcdir='@srcdir@' -CC='@CC@' -CFLAGS='@CFLAGS@' -CPPFLAGS='@CPPFLAGS@' -LDFLAGS='@LDFLAGS@' -defines='@DEFS@ -DLIBDIR="${libdir}" -DINCLUDEDIR="${includedir}"' -ALLOCA='@ALLOCA@' -LOADLIBES='@LIBS@' -extras='@LIBOBJS@' -REMOTE='@REMOTE@' - -# Common prefix for machine-independent installed files. -prefix='@prefix@' -# Common prefix for machine-dependent installed files. -exec_prefix='@exec_prefix@' -# Directory to find libraries in for `-lXXX'. -libdir=${exec_prefix}/lib -# Directory to search by default for included makefiles. -includedir=${prefix}/include - -# Exit as soon as any command fails. -set -e - -# These are all the objects we need to link together. -objs="commands.o job.o dir.o file.o misc.o main.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o glob/glob.o glob/fnmatch.o remote-${REMOTE}.o ${extras} ${ALLOCA}" - -# Compile the source files into those objects. -for file in `echo ${objs} | sed 's/\.o/.c/g'`; do - echo compiling ${file}... - $CC $defines $CPPFLAGS $CFLAGS \ - -c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file -done - -# The object files were actually all put in the current directory. -# Remove the source directory names from the list. -srcobjs="$objs" -objs= -for obj in $srcobjs; do - objs="$objs `basename $obj`" -done - -# Link all the objects together. -echo linking make... -$CC $LDFLAGS $objs $LOADLIBES -o make.new -echo done -mv -f make.new make diff --git a/buildtools/windows/source/make/commands.c b/buildtools/windows/source/make/commands.c deleted file mode 100644 index 7c5614f0f4a..00000000000 --- a/buildtools/windows/source/make/commands.c +++ /dev/null @@ -1,521 +0,0 @@ -/* Command processing for GNU Make. -Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "dep.h" -#include "commands.h" -#include "file.h" -#include "variable.h" -#include "job.h" - -extern int remote_kill (); - -#ifndef HAVE_UNISTD_H -extern int getpid (); -#endif - -/* Set FILE's automatic variables up. */ - -static void -set_file_variables (file) - register struct file *file; -{ -// register char *p; - char *at, *percent, *star, *less; - -#ifndef NO_ARCHIVES - /* If the target is an archive member `lib(member)', - then $@ is `lib' and $% is `member'. */ - - if (ar_name (file->name)) - { - unsigned int len; - p = index (file->name, '('); - at = (char *) alloca (p - file->name + 1); - bcopy (file->name, at, p - file->name); - at[p - file->name] = '\0'; - len = strlen (p + 1); - percent = (char *) alloca (len); - bcopy (p + 1, percent, len - 1); - percent[len - 1] = '\0'; - } - else -#endif /* NO_ARCHIVES. */ - { - at = file->name; - percent = ""; - } - - /* $* is the stem from an implicit or static pattern rule. */ - if (file->stem == 0) - { - /* In Unix make, $* is set to the target name with - any suffix in the .SUFFIXES list stripped off for - explicit rules. We store this in the `stem' member. */ - register struct dep *d; - char *name; - unsigned int len; - -#ifndef NO_ARCHIVES - if (ar_name (file->name)) - { - name = index (file->name, '(') + 1; - len = strlen (name) - 1; - } - else -#endif - { - name = file->name; - len = strlen (name); - } - - for (d = enter_file (".SUFFIXES")->deps; d != 0; d = d->next) - { - unsigned int slen = strlen (dep_name (d)); - if (len > slen && !strncmp (dep_name (d), name + (len - slen), slen)) - { - file->stem = savestring (name, len - slen); - break; - } - } - if (d == 0) - file->stem = ""; - } - star = file->stem; - - /* $< is the first dependency. */ - less = file->deps != 0 ? dep_name (file->deps) : ""; - - if (file->cmds == default_file->cmds) - /* This file got its commands from .DEFAULT. - In this case $< is the same as $@. */ - less = at; - -#define DEFINE_VARIABLE(name, len, value) \ - (void) define_variable_for_file (name, len, value, o_automatic, 0, file) - - /* Define the variables. */ - - DEFINE_VARIABLE ("<", 1, less); - DEFINE_VARIABLE ("*", 1, star); - DEFINE_VARIABLE ("@", 1, at); - DEFINE_VARIABLE ("%", 1, percent); - - /* Compute the values for $^, $+, and $?. */ - - { - register unsigned int qmark_len, plus_len; - char *caret_value, *plus_value; - register char *cp; - char *qmark_value; - register char *qp; - register struct dep *d; - unsigned int len; - - /* Compute first the value for $+, which is supposed to contain - duplicate dependencies as they were listed in the makefile. */ - - plus_len = 0; - for (d = file->deps; d != 0; d = d->next) - plus_len += strlen (dep_name (d)) + 1; - - len = plus_len == 0 ? 1 : plus_len; - cp = plus_value = (char *) alloca (len); - - qmark_len = plus_len; /* Will be this or less. */ - for (d = file->deps; d != 0; d = d->next) - { - char *c = dep_name (d); - -#ifndef NO_ARCHIVES - if (ar_name (c)) - { - c = index (c, '(') + 1; - len = strlen (c) - 1; - } - else -#endif - len = strlen (c); - - bcopy (c, cp, len); - cp += len; - *cp++ = ' '; - - if (! d->changed) - qmark_len -= len + 1; /* Don't space in $? for this one. */ - } - - /* Kill the last space and define the variable. */ - - cp[cp > plus_value ? -1 : 0] = '\0'; - DEFINE_VARIABLE ("+", 1, plus_value); - - /* Make sure that no dependencies are repeated. This does not - really matter for the purpose of updating targets, but it - might make some names be listed twice for $^ and $?. */ - - uniquize_deps (file->deps); - - /* Compute the values for $^ and $?. */ - - cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */ - len = qmark_len == 0 ? 1 : qmark_len; - qp = qmark_value = (char *) alloca (len); - - for (d = file->deps; d != 0; d = d->next) - { - char *c = dep_name (d); - -#ifndef NO_ARCHIVES - if (ar_name (c)) - { - c = index (c, '(') + 1; - len = strlen (c) - 1; - } - else -#endif - len = strlen (c); - - bcopy (c, cp, len); - cp += len; - *cp++ = ' '; - - if (d->changed) - { - bcopy (c, qp, len); - qp += len; - *qp++ = ' '; - } - } - - /* Kill the last spaces and define the variables. */ - - cp[cp > caret_value ? -1 : 0] = '\0'; - DEFINE_VARIABLE ("^", 1, caret_value); - - qp[qp > qmark_value ? -1 : 0] = '\0'; - DEFINE_VARIABLE ("?", 1, qmark_value); - } - -#undef DEFINE_VARIABLE -} - -/* Chop CMDS up into individual command lines if necessary. - Also set the `lines_flag' and `any_recurse' members. */ - -void -chop_commands (cmds) - register struct commands *cmds; -{ - if (cmds != 0 && cmds->command_lines == 0) - { - /* Chop CMDS->commands up into lines in CMDS->command_lines. - Also set the corresponding CMDS->lines_flags elements, - and the CMDS->any_recurse flag. */ - register char *p; - unsigned int nlines, idx; - char **lines; - - nlines = 5; - lines = (char **) xmalloc (5 * sizeof (char *)); - idx = 0; - p = cmds->commands; - while (*p != '\0') - { - char *end = p; - find_end:; - end = index (end, '\n'); - if (end == 0) - end = p + strlen (p); - else if (end > p && end[-1] == '\\') - { - int backslash = 1; - register char *b; - for (b = end - 2; b >= p && *b == '\\'; --b) - backslash = !backslash; - if (backslash) - { - ++end; - goto find_end; - } - } - - if (idx == nlines) - { - nlines += 2; - lines = (char **) xrealloc ((char *) lines, - nlines * sizeof (char *)); - } - lines[idx++] = savestring (p, end - p); - p = end; - if (*p != '\0') - ++p; - } - - if (idx != nlines) - { - nlines = idx; - lines = (char **) xrealloc ((char *) lines, - nlines * sizeof (char *)); - } - - cmds->ncommand_lines = nlines; - cmds->command_lines = lines; - - cmds->any_recurse = 0; - cmds->lines_flags = (char *) xmalloc (nlines); - for (idx = 0; idx < nlines; ++idx) - { - int flags = 0; - - for (p = lines[idx]; - isblank (*p) || *p == '-' || *p == '@' || *p == '+'; - ++p) - switch (*p) - { - case '+': - flags |= COMMANDS_RECURSE; - break; - case '@': - flags |= COMMANDS_SILENT; - break; - case '-': - flags |= COMMANDS_NOERROR; - break; - } - if (!(flags & COMMANDS_RECURSE)) - { - unsigned int len = strlen (p); - if (sindex (p, len, "$(MAKE)", 7) != 0 - || sindex (p, len, "${MAKE}", 7) != 0) - flags |= COMMANDS_RECURSE; - } - - cmds->lines_flags[idx] = flags; - cmds->any_recurse |= flags & COMMANDS_RECURSE; - } - } -} - -/* Execute the commands to remake FILE. If they are currently executing, - return or have already finished executing, just return. Otherwise, - fork off a child process to run the first command line in the sequence. */ - -void -execute_file_commands (file) - struct file *file; -{ - register char *p; - - /* Don't go through all the preparations if - the commands are nothing but whitespace. */ - - for (p = file->cmds->commands; *p != '\0'; ++p) - if (!isspace (*p) && *p != '-' && *p != '@') - break; - if (*p == '\0') - { - /* We are all out of commands. - If we have gotten this far, all the previous commands - have run successfully, so we have winning update status. */ - file->update_status = 0; - notice_finished_file (file); - return; - } - - /* First set the automatic variables according to this file. */ - - initialize_file_variables (file); - - set_file_variables (file); - - /* Start the commands running. */ - new_job (file); -} - -/* This is set while we are inside fatal_error_signal, - so things can avoid nonreentrant operations. */ - -int handling_fatal_signal = 0; - -/* Handle fatal signals. */ - -RETSIGTYPE -fatal_error_signal (sig) - int sig; -{ -#if defined(__MSDOS__) || defined(NETSCAPE) - remove_intermediates (1); - exit (1); -#else /* Not MSDOS. */ - handling_fatal_signal = 1; - - /* Set the handling for this signal to the default. - It is blocked now while we run this handler. */ - signal (sig, SIG_DFL); - - /* A termination signal won't be sent to the entire - process group, but it means we want to kill the children. */ - - if (sig == SIGTERM) - { - register struct child *c; - for (c = children; c != 0; c = c->next) - if (!c->remote) - (void) kill (c->pid, SIGTERM); - } - - /* If we got a signal that means the user - wanted to kill make, remove pending targets. */ - - if (sig == SIGTERM || sig == SIGINT || sig == SIGHUP || sig == SIGQUIT) - { - register struct child *c; - - /* Remote children won't automatically get signals sent - to the process group, so we must send them. */ - for (c = children; c != 0; c = c->next) - if (c->remote) - (void) remote_kill (c->pid, sig); - - for (c = children; c != 0; c = c->next) - delete_child_targets (c); - - /* Clean up the children. We don't just use the call below because - we don't want to print the "Waiting for children" message. */ - while (job_slots_used > 0) - reap_children (1, 0); - } - else - /* Wait for our children to die. */ - while (job_slots_used > 0) - reap_children (1, 1); - - /* Delete any non-precious intermediate files that were made. */ - - remove_intermediates (1); - - if (sig == SIGQUIT) - /* We don't want to send ourselves SIGQUIT, because it will - cause a core dump. Just exit instead. */ - exit (1); - - /* Signal the same code; this time it will really be fatal. The signal - will be unblocked when we return and arrive then to kill us. */ - if (kill (getpid (), sig) < 0) - pfatal_with_name ("kill"); -#endif /* MSDOS. */ -} - -/* Delete FILE unless it's precious or not actually a file (phony), - and it has changed on disk since we last stat'd it. */ - -static void -delete_target (file, on_behalf_of) - struct file *file; - char *on_behalf_of; -{ - struct stat st; - - if (file->precious || file->phony) - return; - -#ifndef NO_ARCHIVES - if (ar_name (file->name)) - { - if (ar_member_date (file->name) != file->last_mtime) - { - if (on_behalf_of) - error ("*** [%s] Archive member `%s' may be bogus; not deleted", - on_behalf_of, file->name); - else - error ("*** Archive member `%s' may be bogus; not deleted", - file->name); - } - return; - } -#endif - - if (safe_stat (file->name, &st) == 0 - && S_ISREG (st.st_mode) - && (time_t) st.st_mtime != file->last_mtime) - { - if (on_behalf_of) - error ("*** [%s] Deleting file `%s'", on_behalf_of, file->name); - else - error ("*** Deleting file `%s'", file->name); - if (unlink (file->name) < 0) - perror_with_name ("unlink: ", file->name); - } -} - - -/* Delete all non-precious targets of CHILD unless they were already deleted. - Set the flag in CHILD to say they've been deleted. */ - -void -delete_child_targets (child) - struct child *child; -{ - struct dep *d; - - if (child->deleted) - return; - - /* Delete the target file if it changed. */ - delete_target (child->file, (char *) 0); - - /* Also remove any non-precious targets listed in the `also_make' member. */ - for (d = child->file->also_make; d != 0; d = d->next) - delete_target (d->file, child->file->name); - - child->deleted = 1; -} - -/* Print out the commands in CMDS. */ - -void -print_commands (cmds) - register struct commands *cmds; -{ - register char *s; - - fputs ("# commands to execute", stdout); - - if (cmds->filename == 0) - puts (" (built-in):"); - else - printf (" (from `%s', line %u):\n", cmds->filename, cmds->lineno); - - s = cmds->commands; - while (*s != '\0') - { - char *end; - - while (isspace (*s)) - ++s; - - end = index (s, '\n'); - if (end == 0) - end = s + strlen (s); - - printf ("\t%.*s\n", (int) (end - s), s); - - s = end; - } -} diff --git a/buildtools/windows/source/make/commands.h b/buildtools/windows/source/make/commands.h deleted file mode 100644 index 31de16ae79e..00000000000 --- a/buildtools/windows/source/make/commands.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Definition of data structures describing shell commands for GNU Make. -Copyright (C) 1988, 1989, 1991, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Structure that gives the commands to make a file - and information about where these commands came from. */ - -struct commands - { - char *filename; /* File that contains commands. */ - unsigned int lineno; /* Line number in file. */ - char *commands; /* Commands text. */ - unsigned int ncommand_lines;/* Number of command lines. */ - char **command_lines; /* Commands chopped up into lines. */ - char *lines_flags; /* One set of flag bits for each line. */ - int any_recurse; /* Nonzero if any `lines_recurse' elt has */ - /* the COMMANDS_RECURSE bit set. */ - }; - -/* Bits in `lines_flags'. */ -#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */ -#define COMMANDS_SILENT 2 /* Silent: @. */ -#define COMMANDS_NOERROR 4 /* No errors: -. */ - -extern void execute_file_commands (); -extern void print_commands (); -extern void delete_child_targets (); -extern void chop_commands (); diff --git a/buildtools/windows/source/make/config.h b/buildtools/windows/source/make/config.h deleted file mode 100644 index 8c12f31d0c2..00000000000 --- a/buildtools/windows/source/make/config.h +++ /dev/null @@ -1,275 +0,0 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -#undef _ALL_SOURCE -#endif - -/* Define if using alloca.c. */ -#undef C_ALLOCA - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -#undef CRAY_STACKSEG_END - -/* Define for DGUX with . */ -#undef DGUX - -/* Define if the `getloadavg' function needs to be run setuid or setgid. */ -#undef GETLOADAVG_PRIVILEGED - -/* Define to `int' if doesn't define. */ -#define gid_t - -/* Define if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you don't have vprintf but do have _doprnt. */ -#undef HAVE_DOPRNT - -/* Define if your system has its own `getloadavg' function. */ -#undef HAVE_GETLOADAVG - -/* Define if you have the getmntent function. */ -#undef HAVE_GETMNTENT - -/* Define if the `long double' type works. */ -#undef HAVE_LONG_DOUBLE - -/* Define if you support file names longer than 14 characters. */ -#define HAVE_LONG_FILE_NAMES - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if system calls automatically restart after interruption - by a signal. */ -#undef HAVE_RESTARTABLE_SYSCALLS - -/* Define if your struct stat has st_blksize. */ -#undef HAVE_ST_BLKSIZE - -/* Define if your struct stat has st_blocks. */ -#undef HAVE_ST_BLOCKS - -/* Define if you have the strcoll function and it is properly defined. */ -#undef HAVE_STRCOLL - -/* Define if your struct stat has st_rdev. */ -#undef HAVE_ST_RDEV - -/* Define if you have the strftime function. */ -#define HAVE_STRFTIME - -/* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define if your struct tm has tm_zone. */ -#undef HAVE_TM_ZONE - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#define HAVE_TZNAME - -/* Define if you have . */ -#undef HAVE_UNISTD_H - -/* Define if utime(file, NULL) sets file's timestamp to the present. */ -#define HAVE_UTIME_NULL - -/* Define if you have . */ -#undef HAVE_VFORK_H - -/* Define if you have the vprintf function. */ -#undef HAVE_VPRINTF - -/* Define if you have the wait3 system call. */ -#undef HAVE_WAIT3 - -/* Define if on MINIX. */ -#undef _MINIX - -/* Define if your struct nlist has an n_un member. */ -#undef NLIST_NAME_UNION - -/* Define if you have . */ -#undef NLIST_STRUCT - -/* Define if your C compiler doesn't accept -c and -o together. */ -#define NO_MINUS_C_MINUS_O - -/* Define to `int' if doesn't define. */ -#define pid_t int - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -#undef _POSIX_1_SOURCE - -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE - -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE - -/* Define if the setvbuf function takes the buffering type as its second - argument and the buffer pointer as the third, as on System V - before release 3. */ -#undef SETVBUF_REVERSED - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION - -/* Define if the `S_IS*' macros in do not work properly. */ -#define STAT_MACROS_BROKEN - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS - -/* Define on System V Release 4. */ -#undef SVR4 - -/* Define if `sys_siglist' is declared by . */ -#undef SYS_SIGLIST_DECLARED - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define for Encore UMAX. */ -#undef UMAX - -/* Define for Encore UMAX 4.3 that has - instead of . */ -#undef UMAX4_3 - -/* Define vfork as fork if vfork does not work. */ -#undef vfork - -/* Define to the name of the SCCS `get' command. */ -#define SCCS_GET "get" - -/* Define this if the SCCS `get' command understands the `-G' option. */ -#undef SCCS_GET_MINUS_G - -/* Define this if the C library defines the variable `sys_siglist'. */ -#undef HAVE_SYS_SIGLIST - -/* Define this if the C library defines the variable `_sys_siglist'. */ -#undef HAVE__SYS_SIGLIST - -/* Define this if you have the `union wait' type in . */ -#undef HAVE_UNION_WAIT - -/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */ -#undef HAVE_SYSCONF_OPEN_MAX - -/* Define if you have the dup2 function. */ -#undef HAVE_DUP2 - -/* Define if you have the getcwd function. */ -#define HAVE_GETCWD - -/* Define if you have the getdtablesize function. */ -#undef HAVE_GETDTABLESIZE - -/* Define if you have the getgroups function. */ -#undef HAVE_GETGROUPS - -/* Define if you have the mktemp function. */ -#undef HAVE_MKTEMP - -/* Define if you have the psignal function. */ -#undef HAVE_PSIGNAL - -/* Define if you have the setegid function. */ -#undef HAVE_SETEGID - -/* Define if you have the seteuid function. */ -#undef HAVE_SETEUID - -/* Define if you have the setlinebuf function. */ -#undef HAVE_SETLINEBUF - -/* Define if you have the setregid function. */ -#undef HAVE_SETREGID - -/* Define if you have the setreuid function. */ -#undef HAVE_SETREUID - -/* Define if you have the sigsetmask function. */ -#undef HAVE_SIGSETMASK - -/* Define if you have the strerror function. */ -#undef HAVE_STRERROR - -/* Define if you have the strsignal function. */ -#undef HAVE_STRSIGNAL - -/* Define if you have the wait3 function. */ -#undef HAVE_WAIT3 - -/* Define if you have the waitpid function. */ -#undef HAVE_WAITPID - -/* Define if you have the header file. */ -#undef HAVE_DIRENT_H - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H - -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the header file. */ -#undef HAVE_MACH_MACH_H - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H - -/* Define if you have the header file. */ -#undef HAVE_NDIR_H - -/* Define if you have the header file. */ -#define HAVE_STRING_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_DIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_NDIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TIMEB_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the dgc library (-ldgc). */ -#undef HAVE_LIBDGC - -/* Define if you have the sun library (-lsun). */ -#undef HAVE_LIBSUN - -/* NETSCAPE: Under win32, define default libdir */ -#define LIBDIR "\\msvc20\\lib" -#define NO_ARCHIVES -#define HAVE_GLOB_H diff --git a/buildtools/windows/source/make/config.h.in b/buildtools/windows/source/make/config.h.in deleted file mode 100644 index 56af1f3a4ac..00000000000 --- a/buildtools/windows/source/make/config.h.in +++ /dev/null @@ -1,270 +0,0 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -#undef _ALL_SOURCE -#endif - -/* Define if using alloca.c. */ -#undef C_ALLOCA - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -#undef CRAY_STACKSEG_END - -/* Define for DGUX with . */ -#undef DGUX - -/* Define if the `getloadavg' function needs to be run setuid or setgid. */ -#undef GETLOADAVG_PRIVILEGED - -/* Define to `int' if doesn't define. */ -#undef gid_t - -/* Define if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you don't have vprintf but do have _doprnt. */ -#undef HAVE_DOPRNT - -/* Define if your system has its own `getloadavg' function. */ -#undef HAVE_GETLOADAVG - -/* Define if you have the getmntent function. */ -#undef HAVE_GETMNTENT - -/* Define if the `long double' type works. */ -#undef HAVE_LONG_DOUBLE - -/* Define if you support file names longer than 14 characters. */ -#undef HAVE_LONG_FILE_NAMES - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if system calls automatically restart after interruption - by a signal. */ -#undef HAVE_RESTARTABLE_SYSCALLS - -/* Define if your struct stat has st_blksize. */ -#undef HAVE_ST_BLKSIZE - -/* Define if your struct stat has st_blocks. */ -#undef HAVE_ST_BLOCKS - -/* Define if you have the strcoll function and it is properly defined. */ -#undef HAVE_STRCOLL - -/* Define if your struct stat has st_rdev. */ -#undef HAVE_ST_RDEV - -/* Define if you have the strftime function. */ -#undef HAVE_STRFTIME - -/* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define if your struct tm has tm_zone. */ -#undef HAVE_TM_ZONE - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#undef HAVE_TZNAME - -/* Define if you have . */ -#undef HAVE_UNISTD_H - -/* Define if utime(file, NULL) sets file's timestamp to the present. */ -#undef HAVE_UTIME_NULL - -/* Define if you have . */ -#undef HAVE_VFORK_H - -/* Define if you have the vprintf function. */ -#undef HAVE_VPRINTF - -/* Define if you have the wait3 system call. */ -#undef HAVE_WAIT3 - -/* Define if on MINIX. */ -#undef _MINIX - -/* Define if your struct nlist has an n_un member. */ -#undef NLIST_NAME_UNION - -/* Define if you have . */ -#undef NLIST_STRUCT - -/* Define if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Define to `int' if doesn't define. */ -#undef pid_t - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -#undef _POSIX_1_SOURCE - -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE - -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE - -/* Define if the setvbuf function takes the buffering type as its second - argument and the buffer pointer as the third, as on System V - before release 3. */ -#undef SETVBUF_REVERSED - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -#undef STACK_DIRECTION - -/* Define if the `S_IS*' macros in do not work properly. */ -#undef STAT_MACROS_BROKEN - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define on System V Release 4. */ -#undef SVR4 - -/* Define if `sys_siglist' is declared by . */ -#undef SYS_SIGLIST_DECLARED - -/* Define to `int' if doesn't define. */ -#undef uid_t - -/* Define for Encore UMAX. */ -#undef UMAX - -/* Define for Encore UMAX 4.3 that has - instead of . */ -#undef UMAX4_3 - -/* Define vfork as fork if vfork does not work. */ -#undef vfork - -/* Define to the name of the SCCS `get' command. */ -#undef SCCS_GET - -/* Define this if the SCCS `get' command understands the `-G' option. */ -#undef SCCS_GET_MINUS_G - -/* Define this if the C library defines the variable `sys_siglist'. */ -#undef HAVE_SYS_SIGLIST - -/* Define this if the C library defines the variable `_sys_siglist'. */ -#undef HAVE__SYS_SIGLIST - -/* Define this if you have the `union wait' type in . */ -#undef HAVE_UNION_WAIT - -/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */ -#undef HAVE_SYSCONF_OPEN_MAX - -/* Define if you have the dup2 function. */ -#undef HAVE_DUP2 - -/* Define if you have the getcwd function. */ -#undef HAVE_GETCWD - -/* Define if you have the getdtablesize function. */ -#undef HAVE_GETDTABLESIZE - -/* Define if you have the getgroups function. */ -#undef HAVE_GETGROUPS - -/* Define if you have the mktemp function. */ -#undef HAVE_MKTEMP - -/* Define if you have the psignal function. */ -#undef HAVE_PSIGNAL - -/* Define if you have the setegid function. */ -#undef HAVE_SETEGID - -/* Define if you have the seteuid function. */ -#undef HAVE_SETEUID - -/* Define if you have the setlinebuf function. */ -#undef HAVE_SETLINEBUF - -/* Define if you have the setregid function. */ -#undef HAVE_SETREGID - -/* Define if you have the setreuid function. */ -#undef HAVE_SETREUID - -/* Define if you have the sigsetmask function. */ -#undef HAVE_SIGSETMASK - -/* Define if you have the strerror function. */ -#undef HAVE_STRERROR - -/* Define if you have the strsignal function. */ -#undef HAVE_STRSIGNAL - -/* Define if you have the wait3 function. */ -#undef HAVE_WAIT3 - -/* Define if you have the waitpid function. */ -#undef HAVE_WAITPID - -/* Define if you have the header file. */ -#undef HAVE_DIRENT_H - -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the header file. */ -#undef HAVE_MACH_MACH_H - -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the header file. */ -#undef HAVE_NDIR_H - -/* Define if you have the header file. */ -#undef HAVE_STRING_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_DIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_NDIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TIMEB_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the dgc library (-ldgc). */ -#undef HAVE_LIBDGC - -/* Define if you have the sun library (-lsun). */ -#undef HAVE_LIBSUN diff --git a/buildtools/windows/source/make/configh.dos b/buildtools/windows/source/make/configh.dos deleted file mode 100644 index da5681bc93d..00000000000 --- a/buildtools/windows/source/make/configh.dos +++ /dev/null @@ -1,136 +0,0 @@ -/* Generated automatically from configure.in by autoheader. DO NOT EDIT! */ - - - -#define INCLUDEDIR "c:/djgpp/include" - -#define LIBDIR "c:/djgpp/lib" - - - -/* Define if you have dirent.h. */ - -#define DIRENT - - - -/* Define if you have the strcoll function and it is properly defined. */ - -#define HAVE_STRCOLL - - - -/* Define if you have unistd.h. */ - -#define HAVE_UNISTD_H - - - -/* Define as the return type of signal handlers (int or void). */ - -#define RETSIGTYPE void - - - -/* Define if you have the ANSI C header files. */ - -#ifndef STDC_HEADERS - -#define STDC_HEADERS - -#endif - - - -/* Define if `sys_siglist' is declared by . */ - -#define SYS_SIGLIST_DECLARED - - - -/* Define if you have getdtablesize. */ - -#define HAVE_GETDTABLESIZE - - - -/* Define if you have dup2. */ - -#define HAVE_DUP2 - - - -/* Define if you have sys_siglist. */ - -#undef HAVE_SYS_SIGLIST - - - -/* Define if you have _sys_siglist. */ - -#undef HAVE__SYS_SIGLIST - - - -/* Define if you have psignal. */ - -#define HAVE_PSIGNAL - - - -/* Define if you have getcwd. */ - -#define HAVE_GETCWD - - - -/* Define if you have sigsetmask. */ - -#define HAVE_SIGSETMASK - - - -/* Define if you have setlinebuf. */ - -#define HAVE_SETLINEBUF - - - -/* Define if you have the header file. */ - -#define HAVE_LIMITS_H - - - -/* Define if you have the header file. */ - -#undef HAVE_SYS_PARAM_H - - - -/* Define if you have the header file. */ - -#define HAVE_FCNTL_H - - - -/* Define if you have the header file. */ - -#define HAVE_STRING_H - - - -/* Define if you have the header file. */ - -#define HAVE_MEMORY_H - - - -/* Define if you have the `strerror' function. */ - -#define HAVE_STRERROR - - - -#define SCCS_GET "get" - diff --git a/buildtools/windows/source/make/configure b/buildtools/windows/source/make/configure deleted file mode 100644 index ec939c3e779..00000000000 --- a/buildtools/windows/source/make/configure +++ /dev/null @@ -1,2991 +0,0 @@ -#! /bin/sh - -# From configure.in Id: configure.in,v 1.48 1995/03/21 21:23:26 roland Exp -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.3 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help -export jobs with the Customs daemon (NOT SUPPORTED)" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE - -# Initialize some other variables. -subdirs= - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -build | --build | --buil | --bui | --bu | --b) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=PREFIX install architecture-dependent files in PREFIX - [same as prefix] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR ---enable and --with options recognized:$ac_help -EOF - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.3" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=vpath.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -subdirs="glob" - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -set dummy ${MAKE-make}; ac_make=$2 -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5 | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes -else - ac_cv_prog_gcc_g=no -fi -rm -f conftest* - -fi - echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_ifs" - # As a last resort, use the slow shell script. - test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh" -fi - INSTALL="$ac_cv_path_install" -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi -fi -CPP="$ac_cv_prog_CPP" -echo "$ac_t""$CPP" 1>&6 - echo $ac_n "checking for AIX""... $ac_c" 1>&6 -cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF -#define _ALL_SOURCE 1 -EOF - -else - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - - -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi -else - echo "$ac_t""no" 1>&6 - ISC= -fi - -ac_safe=`echo "minix/config.h" | tr './\055' '___'` -echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - MINIX=yes -else - echo "$ac_t""no" 1>&6 -MINIX= -fi - -if test "$MINIX" = yes; then - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define _POSIX_1_SOURCE 2 -EOF - - cat >> confdefs.h <<\EOF -#define _MINIX 1 -EOF - -fi - -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext </dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi -cross_compiling=$ac_cv_c_cross -echo "$ac_t""$ac_cv_c_cross" 1>&6 - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - ac_cv_header_stdc=no -else -cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - : -else - ac_cv_header_stdc=no -fi -fi -rm -fr conftest* -fi -fi -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include <$ac_hdr> -int main() { return 0; } -int t() { -DIR *dirp = 0; -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` - cat >> confdefs.h <&6 -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for -ldir""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 -fi - -else -echo $ac_n "checking for -lx""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF -#define pid_t int -EOF - -fi - -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" -#endif -void (*signal ()) (); -int main() { return 0; } -int t() { -int i; -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_type_signal=void -else - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` - cat >> confdefs.h <&6 -fi -done - -if test "x$CC" != xcc; then - echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -else - echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -fi -set dummy $CC; ac_cc="`echo $2 | - sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" -if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -echo 'foo(){}' > conftest.c -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -if ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5 && - test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5 -then - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if cc -c conftest.c 1>&5 2>&5 - then - if cc -c conftest.c -o conftest2.o 1>&5 2>&5 && - test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&5 2>&5 - then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - fi - fi - fi -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF -#define NO_MINUS_C_MINUS_O 1 -EOF - -fi - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_c_const=yes -else - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include - -#if defined(S_ISBLK) && defined(S_IFDIR) -# if S_ISBLK (S_IFDIR) -You lose. -# endif -#endif - -#if defined(S_ISBLK) && defined(S_IFCHR) -# if S_ISBLK (S_IFCHR) -You lose. -# endif -#endif - -#if defined(S_ISLNK) && defined(S_IFREG) -# if S_ISLNK (S_IFREG) -You lose. -# endif -#endif - -#if defined(S_ISSOCK) && defined(S_IFREG) -# if S_ISSOCK (S_IFREG) -You lose. -# endif -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "You lose" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_header_stat_broken=yes -else - rm -rf conftest* - ac_cv_header_stat_broken=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 -if test $ac_cv_header_stat_broken = yes; then - cat >> confdefs.h <<\EOF -#define STAT_MACROS_BROKEN 1 -EOF - -fi - - - - - -for ac_func in getdtablesize psignal mktemp \ - dup2 getcwd sigsetmask getgroups setlinebuf \ - seteuid setegid setreuid setregid strerror strsignal -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <> confdefs.h <&6 -echo $ac_n "checking for _sys_siglist""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_check_symbol__sys_siglist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <> confdefs.h <&6 -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { return 0; } -int t() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -#endif - -int main() { return 0; } -int t() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - ac_cv_func_alloca=yes -else - rm -rf conftest* - ac_cv_func_alloca=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_func_alloca" 1>&6 -if test $ac_cv_func_alloca = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF - -fi - -if test $ac_cv_func_alloca = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes -else - rm -rf conftest* - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_os_cray" 1>&6 -if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <&6 -fi - -done -fi - -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else -cat > conftest.$ac_ext < addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_VFORK_H 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_vfork=no -else -cat > conftest.$ac_ext < -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_VFORK_H -#include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. - The compiler is told about this with #include , - but some compilers (e.g. gcc -O) don't grok . - Test for this by using a static variable whose address - is put into a register that is clobbered by the vfork. */ -static -#ifdef __cplusplus -sparc_address_test (int arg) -#else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) - perror ("vfork"); - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} -main() { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. - This test uses lots of local variables, at least - as many local variables as main has allocated so far - including compiler temporaries. 4 locals are enough for - gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. - A buggy compiler should reuse the register of parent - for one of the local variables, since it will think that - parent can't possibly be used any more in this routine. - Assigning to the local variable will thus munge parent - in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), - vfork doesn't separate parent from child file descriptors. - If the child closes a descriptor before it execs or exits, - this munges the parent's descriptor as well. - Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - exit( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_vfork=yes -else - ac_cv_func_vfork=no -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_func_vfork" 1>&6 -if test $ac_cv_func_vfork = no; then - cat >> confdefs.h <<\EOF -#define vfork fork -EOF - -fi - -echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext < -/* If setvbuf has the reversed format, exit 0. */ -main () { - /* This call has the arguments reversed. - A reversed system may check and see that the address of main - is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ - if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0) - exit(1); - putc('\r', stdout); - exit(0); /* Non-reversed systems segv here. */ -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_setvbuf_reversed=yes -else - ac_cv_func_setvbuf_reversed=no -fi -fi -rm -fr conftest* -rm -f core core.* *.core -fi -echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6 -if test $ac_cv_func_setvbuf_reversed = yes; then - cat >> confdefs.h <<\EOF -#define SETVBUF_REVERSED 1 -EOF - -fi - -ac_have_func=no # yes means we've found a way to get the load average. - -# Some systems with -lutil have (and need) -lkvm as well, some do not. -# On Solaris, -lkvm requires nlist from -lelf, so check that first -# to get the right answer into the cache. -echo $ac_n "checking for -lelf""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_elf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lelf $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="-lelf $LIBS" -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for -lkvm""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_kvm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lkvm $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="-lkvm $LIBS" -else - echo "$ac_t""no" 1>&6 -fi - -# Check for the 4.4BSD definition of getloadavg. -echo $ac_n "checking for -lutil""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_util'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lutil $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes -else - echo "$ac_t""no" 1>&6 -fi - - -if test $ac_have_func = no; then - # There is a commonly available library for RS/6000 AIX. - # Since it is not a standard part of AIX, it might be installed locally. - ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" - echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_getloadavg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lgetloadavg $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="-lgetloadavg $LIBS" -else - echo "$ac_t""no" 1>&6 -LIBS="$ac_save_LIBS" -fi - -fi - -# Make sure it is really in the library, if we think we found it. -for ac_func in getloadavg -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -LIBOBJS="$LIBOBJS ${ac_func}.o" -fi - -done - - -if test $ac_cv_func_getloadavg = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_GETLOADAVG 1 -EOF - - ac_have_func=yes -else - # Figure out what our getloadavg.c needs. - ac_have_func=no - ac_safe=`echo "sys/dg_sys_info.h" | tr './\055' '___'` -echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define DGUX 1 -EOF - - echo $ac_n "checking for -ldgc""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_dgc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldgc $LIBS" -cat > conftest.$ac_ext <&6 - ac_tr_lib=HAVE_LIB`echo dgc | tr '[a-z]' '[A-Z]'` - cat >> confdefs.h <&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - - - # We cannot check for , because Solaris 2 does not use dwarf (it - # uses stabs), but it is still SVR4. We cannot check for because - # Irix 4.0.5F has the header but not the library. - if test $ac_have_func = no && test $ac_cv_lib_elf = yes; then - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define SVR4 1 -EOF - - fi - - if test $ac_have_func = no; then - ac_safe=`echo "inq_stats/cpustats.h" | tr './\055' '___'` -echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define UMAX 1 -EOF - - cat >> confdefs.h <<\EOF -#define UMAX4_3 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - - fi - - if test $ac_have_func = no; then - ac_safe=`echo "sys/cpustats.h" | tr './\055' '___'` -echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define UMAX 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - - fi - - if test $ac_have_func = no; then - for ac_hdr in mach/mach.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` - cat >> confdefs.h <&6 -fi -done - - fi - - ac_safe=`echo "nlist.h" | tr './\055' '___'` -echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define NLIST_STRUCT 1 -EOF - - echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { return 0; } -int t() { -struct nlist n; n.n_un.n_name = 0; -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_struct_nlist_n_un=yes -else - rm -rf conftest* - ac_cv_struct_nlist_n_un=no -fi -rm -f conftest* - -fi - echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6 - if test $ac_cv_struct_nlist_n_un = yes; then - cat >> confdefs.h <<\EOF -#define NLIST_NAME_UNION 1 -EOF - - fi - -else - echo "$ac_t""no" 1>&6 -fi -fi # Do not have getloadavg in system libraries. - -# Some definitions of getloadavg require that the program be installed setgid. -echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 | - egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_func_getloadavg_setgid=yes -else - rm -rf conftest* - ac_cv_func_getloadavg_setgid=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6 -if test $ac_cv_func_getloadavg_setgid = yes; then - NEED_SETGID=true; cat >> confdefs.h <<\EOF -#define GETLOADAVG_PRIVILEGED 1 -EOF - -else - NEED_SETGID=false -fi - -if test $ac_cv_func_getloadavg_setgid = yes; then - echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # On Solaris, /dev/kmem is a symlink. Get info on the real file. - ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` - # If we got an error (system does not support symlinks), try without -L. - test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` - ac_cv_group_kmem=`echo $ac_ls_output \ - | sed -ne 's/[ ][ ]*/ /g; - s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; - / /s/.* //;p;'` - -fi - KMEM_GROUP=$ac_cv_group_kmem - echo "$ac_t""$KMEM_GROUP" 1>&6 -fi - -echo $ac_n "checking for strcoll""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_strcoll=no -else -cat > conftest.$ac_ext < -main () -{ - exit (strcoll ("abc", "def") >= 0 || - strcoll ("ABC", "DEF") >= 0 || - strcoll ("123", "456") >= 0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_strcoll=yes -else - ac_cv_func_strcoll=no -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_func_strcoll" 1>&6 -if test $ac_cv_func_strcoll = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_STRCOLL 1 -EOF - -fi - - -if test $ac_cv_func_getdtablesize = no; then - echo $ac_n "checking for sysconf (_SC_OPEN_MAX)""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'make_cv_sysconf_open_max'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { return 0; } -int t() { -int max = sysconf (_SC_OPEN_MAX); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - make_cv_sysconf_open_max=yes -else - rm -rf conftest* - make_cv_sysconf_open_max=no -fi -rm -f conftest* - -fi - - if test $make_cv_sysconf_open_max = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SYSCONF_OPEN_MAX 1 -EOF - - fi - echo "$ac_t""$make_cv_sysconf_open_max" 1>&6 -fi - -# Check out the wait reality. -for ac_hdr in sys/wait.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` - cat >> confdefs.h <&6 -fi -done - for ac_func in waitpid wait3 -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking for union wait""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { return 0; } -int t() { -union wait status; int pid; pid = wait (&status); -#ifdef WEXITSTATUS -/* Some POSIXoid systems have both the new-style macros and the old - union wait type, and they do not work together. If union wait - conflicts with WEXITSTATUS et al, we don't want to use it at all. */ -if (WEXITSTATUS (status) != 0) pid = -1; -#ifdef WTERMSIG -/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */ --- blow chunks here -- -#endif -#endif -#ifdef HAVE_WAITPID -/* Make sure union wait works with waitpid. */ -pid = waitpid (-1, &status, 0); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - make_cv_union_wait=yes -else - rm -rf conftest* - make_cv_union_wait=no -fi -rm -f conftest* - -fi - -if test "$make_cv_union_wait" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UNION_WAIT 1 -EOF - -fi -echo "$ac_t""$make_cv_union_wait" 1>&6 - -echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -/* NetBSD declares sys_siglist in unistd.h. */ -#ifdef HAVE_UNISTD_H -#include -#endif -int main() { return 0; } -int t() { -char *msg = *(sys_siglist + 1); -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_decl_sys_siglist=yes -else - rm -rf conftest* - ac_cv_decl_sys_siglist=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 -if test $ac_cv_decl_sys_siglist = yes; then - cat >> confdefs.h <<\EOF -#define SYS_SIGLIST_DECLARED 1 -EOF - -fi - - -# The presence of the following is not meant to imply -# that make necessarily works on those systems. -echo $ac_n "checking for -lsun""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_sun'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsun $LIBS" -cat > conftest.$ac_ext <&6 - ac_tr_lib=HAVE_LIB`echo sun | tr '[a-z]' '[A-Z]'` - cat >> confdefs.h <&6 -fi - - - REMOTE=stub -# Check whether --with-customs or --without-customs was given. -withval="$with_customs" -if test -n "$withval"; then - REMOTE=cstms LIBS="$LIBS libcustoms.a" -fi - - -echo checking for location of SCCS get command -if test -f /usr/sccs/get; then - SCCS_GET=/usr/sccs/get - cat >> confdefs.h <<\EOF -#define SCCS_GET "/usr/sccs/get" -EOF - -else - SCCS_GET=get - cat >> confdefs.h <<\EOF -#define SCCS_GET "get" -EOF - -fi -ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later. -if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 && - test -f s.conftest; then - # We successfully created an SCCS file. - echo checking if SCCS get command understands -G - if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 && - test -f conftoast; then - cat >> confdefs.h <<\EOF -#define SCCS_GET_MINUS_G 1 -EOF - - fi -fi -rm -f s.conftest conftoast - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.3" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile build.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@subdirs@%$subdirs%g -s%@SET_MAKE@%$SET_MAKE%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@CPP@%$CPP%g -s%@LIBOBJS@%$LIBOBJS%g -s%@ALLOCA@%$ALLOCA%g -s%@NEED_SETGID@%$NEED_SETGID%g -s%@KMEM_GROUP@%$KMEM_GROUP%g -s%@REMOTE@%$REMOTE%g - -CEOF -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust relative srcdir, etc. for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file -fi; done -rm -f conftest.subs - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - - - -# Makefile uses this timestamp file to know when to remake Makefile, -# build.sh, and glob/Makefile. -touch stamp-config -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in glob; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=../$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } - fi - fi - - cd $ac_popdir - done -fi - - diff --git a/buildtools/windows/source/make/configure.bat b/buildtools/windows/source/make/configure.bat deleted file mode 100755 index 9c3693dcc39..00000000000 --- a/buildtools/windows/source/make/configure.bat +++ /dev/null @@ -1,88 +0,0 @@ -@echo off - -echo Configuring MAKE for go32 - -rem This batch file assumes a unix-type "sed" program - - - -update configh.dos config.h - - - -echo # Makefile generated by "configure.bat"> Makefile - - - -if exist config.sed del config.sed - - - -echo ": try_sl ">> config.sed - -echo "/\\$/ { ">> config.sed - -echo " N ">> config.sed - -echo " s/[ ]*\\\n[ ]*/ / ">> config.sed - -echo " b try_sl ">> config.sed - -echo "} ">> config.sed - - - -echo "s/@srcdir@/./ ">> config.sed - -echo "s/@CC@/gcc/ ">> config.sed - -echo "s/@CFLAGS@/-O2 -g/ ">> config.sed - -echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H/ ">> config.sed - -echo "s/@LDFLAGS@// ">> config.sed - -echo "s/@RANLIB@/ranlib/ ">> config.sed - -echo "s/@DEFS@// ">> config.sed - -echo "s/@REMOTE@/stub/ ">> config.sed - -echo "s/@ALLOCA@// ">> config.sed - -echo "s/@LIBS@// ">> config.sed - -echo "s/@LIBOBJS@// ">> config.sed - -echo "s/@SET_MAKE@// ">> config.sed - -echo "s/^Makefile *:/_Makefile:/ ">> config.sed - -echo "s/^config.h *:/_config.h:/ ">> config.sed - -echo "s/^defines *=.*$/defines =/ ">> config.sed - -echo "/mv -f make.new make/d ">> config.sed - - - -echo "s/cd glob; $(MAKE)/$(MAKE) -C glob/ ">> config.sed - - - -sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed - -sed -f config2.sed Makefile.in >> Makefile - -del config.sed - -del config2.sed - - - -cd glob - -call configure - -cd .. - diff --git a/buildtools/windows/source/make/configure.in b/buildtools/windows/source/make/configure.in deleted file mode 100644 index 2b533e7a7c5..00000000000 --- a/buildtools/windows/source/make/configure.in +++ /dev/null @@ -1,131 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_REVISION([$Id: configure.in,v 1.1 1998-04-13 22:35:14 cyeh Exp $]) -AC_PREREQ(2.1)dnl dnl Minimum Autoconf version required. -AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir. -AC_CONFIG_HEADER(config.h) -AC_CONFIG_SUBDIRS(glob) dnl Run configure in glob subdirectory. - -AC_PROG_MAKE_SET -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_CPP dnl Later checks need this. -AC_AIX -AC_ISC_POSIX -AC_MINIX -AC_HEADER_STDC -AC_HEADER_DIRENT -AC_TYPE_UID_T dnl Also does gid_t. -AC_TYPE_PID_T -AC_TYPE_SIGNAL -AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \ - sys/timeb.h) -AC_PROG_CC_C_O -AC_C_CONST dnl getopt needs this. -AC_HEADER_STAT - -AC_SUBST(LIBOBJS) - -AC_DEFUN(AC_CHECK_SYMBOL, [dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl -AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);], - ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)]) -if test "$ac_cv_check_symbol_$1" = yes; then -changequote(,)dnl - ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'` -changequote([,])dnl - AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol}) -fi -AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl - -AC_CHECK_FUNCS(getdtablesize psignal mktemp \ - dup2 getcwd sigsetmask getgroups setlinebuf \ - seteuid setegid setreuid setregid strerror strsignal) -AC_CHECK_SYMBOL(sys_siglist) -AC_CHECK_SYMBOL(_sys_siglist) -AC_FUNC_ALLOCA -AC_FUNC_VFORK -AC_FUNC_SETVBUF_REVERSED -AC_FUNC_GETLOADAVG -AC_FUNC_STRCOLL - -if test $ac_cv_func_getdtablesize = no; then - AC_MSG_CHECKING(for sysconf (_SC_OPEN_MAX)) - AC_CACHE_VAL(make_cv_sysconf_open_max, [dnl - AC_TRY_LINK([#include ], [int max = sysconf (_SC_OPEN_MAX);], - [make_cv_sysconf_open_max=yes], [make_cv_sysconf_open_max=no])]) - if test $make_cv_sysconf_open_max = yes; then - AC_DEFINE(HAVE_SYSCONF_OPEN_MAX) - fi - AC_MSG_RESULT($make_cv_sysconf_open_max) -fi - -# Check out the wait reality. -AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3) -AC_MSG_CHECKING(for union wait) -AC_CACHE_VAL(make_cv_union_wait, [dnl -AC_TRY_LINK([#include -#include ], - [union wait status; int pid; pid = wait (&status); -#ifdef WEXITSTATUS -/* Some POSIXoid systems have both the new-style macros and the old - union wait type, and they do not work together. If union wait - conflicts with WEXITSTATUS et al, we don't want to use it at all. */ -if (WEXITSTATUS (status) != 0) pid = -1; -#ifdef WTERMSIG -/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */ --- blow chunks here -- -#endif -#endif -#ifdef HAVE_WAITPID -/* Make sure union wait works with waitpid. */ -pid = waitpid (-1, &status, 0); -#endif -], - [make_cv_union_wait=yes], [make_cv_union_wait=no])]) -if test "$make_cv_union_wait" = yes; then - AC_DEFINE(HAVE_UNION_WAIT) -fi -AC_MSG_RESULT($make_cv_union_wait) - -AC_DECL_SYS_SIGLIST - -# The presence of the following is not meant to imply -# that make necessarily works on those systems. -AC_CHECK_LIB(sun, getpwnam) - -AC_SUBST(REMOTE) REMOTE=stub -AC_ARG_WITH(customs, [export jobs with the Customs daemon (NOT SUPPORTED)], -[REMOTE=cstms LIBS="$LIBS libcustoms.a"]) - -echo checking for location of SCCS get command -if test -f /usr/sccs/get; then - SCCS_GET=/usr/sccs/get - AC_DEFINE(SCCS_GET, "/usr/sccs/get") -else - SCCS_GET=get - AC_DEFINE(SCCS_GET, "get") -fi -ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later. -if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 && - test -f s.conftest; then - # We successfully created an SCCS file. - echo checking if SCCS get command understands -G - if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 && - test -f conftoast; then - AC_DEFINE(SCCS_GET_MINUS_G) - fi -fi -rm -f s.conftest conftoast - -AC_OUTPUT(Makefile build.sh, [ -# Makefile uses this timestamp file to know when to remake Makefile, -# build.sh, and glob/Makefile. -touch stamp-config]) - -dnl Local Variables: -dnl comment-start: "dnl " -dnl comment-end: "" -dnl comment-start-skip: "\\bdnl\\b\\s *" -dnl compile-command: "make configure config.h.in" -dnl End: diff --git a/buildtools/windows/source/make/default.c b/buildtools/windows/source/make/default.c deleted file mode 100644 index 5cdca48c094..00000000000 --- a/buildtools/windows/source/make/default.c +++ /dev/null @@ -1,403 +0,0 @@ -/* Data base of default implicit rules for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "rule.h" -#include "dep.h" -#include "file.h" -#include "commands.h" -#include "variable.h" - -/* Define GCC_IS_NATIVE if gcc is the native development environment on - your system (gcc/bison/flex vs cc/yacc/lex). */ -#ifdef __MSDOS__ -#define GCC_IS_NATIVE -#endif - - -/* This is the default list of suffixes for suffix rules. - `.s' must come last, so that a `.o' file will be made from - a `.c' or `.p' or ... file rather than from a .s file. */ - -static char default_suffixes[] - = ".out .a .ln .o .c .cc .C .p .f .F .r .y .l .s .S \ -.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ -.w .ch .web .sh .elc .el"; - -static struct pspec default_pattern_rules[] = - { - { "(%)", "%", - "$(AR) $(ARFLAGS) $@ $<" }, - - /* The X.out rules are only in BSD's default set because - BSD Make has no null-suffix rules, so `foo.out' and - `foo' are the same thing. */ - { "%.out", "%", - "@rm -f $@ \n cp $< $@" }, - - /* Syntax is "ctangle foo.w foo.ch foo.c". */ - { "%.c", "%.w %.ch", - "$(CTANGLE) $^ $@" }, - { "%.tex", "%.w %.ch", - "$(CWEAVE) $^ $@" }, - - { 0, 0, 0 } - }; - -static struct pspec default_terminal_rules[] = - { - /* RCS. */ - { "%", "%,v", - "+$(CHECKOUT,v)" }, - { "%", "RCS/%,v", - "+$(CHECKOUT,v)" }, - - /* SCCS. */ - { "%", "s.%", - "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" }, - { "%", "SCCS/s.%", - "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" }, - - { 0, 0, 0 } - }; - -static char *default_suffix_rules[] = - { - ".o", - "$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".s", - "$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".S", - "$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".c", - "$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".cc", - "$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".C", - "$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".f", - "$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".p", - "$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".F", - "$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".r", - "$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@", - ".mod", - "$(COMPILE.mod) -o $@ -e $@ $^", - - ".def.sym", - "$(COMPILE.def) -o $@ $<", - - ".sh", - "cat $< >$@ \n chmod a+x $@", - - ".s.o", -#if !defined(M_XENIX) || defined(__GNUC__) - "$(COMPILE.s) -o $@ $<", -#else /* Xenix. */ - "$(COMPILE.s) -o$@ $<", -#endif /* Not Xenix. */ - ".S.o", -#if !defined(M_XENIX) || defined(__GNUC__) - "$(COMPILE.S) -o $@ $<", -#else /* Xenix. */ - "$(COMPILE.S) -o$@ $<", -#endif /* Not Xenix. */ - ".c.o", - "$(COMPILE.c) $< $(OUTPUT_OPTION)", - ".cc.o", - "$(COMPILE.cc) $< $(OUTPUT_OPTION)", - ".C.o", - "$(COMPILE.C) $< $(OUTPUT_OPTION)", - ".f.o", - "$(COMPILE.f) $< $(OUTPUT_OPTION)", - ".p.o", - "$(COMPILE.p) $< $(OUTPUT_OPTION)", - ".F.o", - "$(COMPILE.F) $< $(OUTPUT_OPTION)", - ".r.o", - "$(COMPILE.r) $< $(OUTPUT_OPTION)", - ".mod.o", - "$(COMPILE.mod) -o $@ $<", - - ".c.ln", - "$(LINT.c) -C$* $<", - ".y.ln", -#ifndef __MSDOS__ - "$(YACC.y) $< \n $(LINT.c) -C$* y.tab.c \n $(RM) y.tab.c", -#else - "$(YACC.y) $< \n $(LINT.c) -C$* y_tab.c \n $(RM) y_tab.c", -#endif - ".l.ln", - "@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c", - - ".y.c", -#ifndef __MSDOS__ - "$(YACC.y) $< \n mv -f y.tab.c $@", -#else - "$(YACC.y) $< \n mv -f y_tab.c $@", -#endif - ".l.c", - "@$(RM) $@ \n $(LEX.l) $< > $@", - - ".F.f", - "$(PREPROCESS.F) $< $(OUTPUT_OPTION)", - ".r.f", - "$(PREPROCESS.r) $< $(OUTPUT_OPTION)", - - /* This might actually make lex.yy.c if there's no %R% - directive in $*.l, but in that case why were you - trying to make $*.r anyway? */ - ".l.r", - "$(LEX.l) $< > $@ \n mv -f lex.yy.r $@", - - ".S.s", - "$(PREPROCESS.S) $< > $@", - - ".texinfo.info", - "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@", - - ".texi.info", - "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@", - - ".txinfo.info", - "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@", - - ".tex.dvi", - "$(TEX) $<", - - ".texinfo.dvi", - "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<", - - ".texi.dvi", - "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<", - - ".txinfo.dvi", - "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<", - - ".w.c", - "$(CTANGLE) $< - $@", /* The `-' says there is no `.ch' file. */ - - ".web.p", - "$(TANGLE) $<", - - ".w.tex", - "$(CWEAVE) $< - $@", /* The `-' says there is no `.ch' file. */ - - ".web.tex", - "$(WEAVE) $<", - - 0, 0, - }; - -static char *default_variables[] = - { - "AR", "ar", - "ARFLAGS", "rv", - "AS", "as", -#ifdef GCC_IS_NATIVE - "CC", "gcc", - "CXX", "gcc", -#else - "CC", "cc", - "CXX", "g++", -#endif - - /* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist, - and to the empty string if $@ does exist. */ - "CHECKOUT,v", - "$(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@,\ - $(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))", - - "CO", "co", - "CPP", "$(CC) -E", -#ifdef CRAY - "CF77PPFLAGS", "-P", - "CF77PP", "/lib/cpp", - "CFT", "cft77", - "CF", "cf77", - "FC", "$(CF)", -#else /* Not CRAY. */ -#ifdef _IBMR2 - "FC", "xlf", -#else -#ifdef __convex__ - "FC", "fc", -#else - "FC", "f77", -#endif /* __convex__ */ -#endif /* _IBMR2 */ - /* System V uses these, so explicit rules using them should work. - However, there is no way to make implicit rules use them and FC. */ - "F77", "$(FC)", - "F77FLAGS", "$(FFLAGS)", -#endif /* Cray. */ - "GET", SCCS_GET, - "LD", "ld", -#ifdef GCC_IS_NATIVE - "LEX", "flex", -#else - "LEX", "lex", -#endif - "LINT", "lint", - "M2C", "m2c", -#ifdef pyr - "PC", "pascal", -#else -#ifdef CRAY - "PC", "PASCAL", - "SEGLDR", "segldr", -#else - "PC", "pc", -#endif /* CRAY. */ -#endif /* pyr. */ -#ifdef GCC_IS_NATIVE - "YACC", "bison -y", -#else - "YACC", "yacc", /* Or "bison -y" */ -#endif - "MAKEINFO", "makeinfo", - "TEX", "tex", - "TEXI2DVI", "texi2dvi", - "WEAVE", "weave", - "CWEAVE", "cweave", - "TANGLE", "tangle", - "CTANGLE", "ctangle", - - "RM", "rm -f", - - "LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)", - "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", - "LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", - "COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", - "COMPILE.C", "$(COMPILE.cc)", - "LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", - "LINK.C", "$(LINK.cc)", - "YACC.y", "$(YACC) $(YFLAGS)", - "LEX.l", "$(LEX) $(LFLAGS) -t", - "COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c", - "LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)", - "COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", - "LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", - "COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c", - "LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)", - "COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)", - "COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)", - "COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", - "LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", - "LINK.s", "$(CC) $(ASFLAGS) $(LDFLAGS) $(TARGET_MACH)", - "COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)", - "LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)", - "COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c", -#if !defined(M_XENIX) || defined(__GNUC__) - "PREPROCESS.S", "$(CC) -E $(CPPFLAGS)", -#else /* Xenix. */ - "PREPROCESS.S", "$(CC) -EP $(CPPFLAGS)", -#endif /* Not Xenix. */ - "PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F", - "PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F", - "LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)", - -#ifndef NO_MINUS_C_MINUS_O -#if !defined(M_XENIX) || defined(__GNUC__) - "OUTPUT_OPTION", "-o $@", -#else /* Xenix. */ - "OUTPUT_OPTION", "-Fo$@", -#endif /* Not Xenix. */ -#endif - -#ifdef SCCS_GET_MINUS_G - "SCCS_OUTPUT_OPTION", "-G$@", -#endif - - 0, 0 - }; - -/* Set up the default .SUFFIXES list. */ - -void -set_default_suffixes () -{ - suffix_file = enter_file (".SUFFIXES"); - - if (no_builtin_rules_flag) - (void) define_variable ("SUFFIXES", 8, "", o_default, 0); - else - { - char *p = default_suffixes; - suffix_file->deps = (struct dep *) - multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1), - sizeof (struct dep)); - (void) define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0); - } -} - -/* Enter the default suffix rules as file rules. This used to be done in - install_default_implicit_rules, but that loses because we want the - suffix rules installed before reading makefiles, and thee pattern rules - installed after. */ - -void -install_default_suffix_rules () -{ - register char **s; - - if (no_builtin_rules_flag) - return; - - for (s = default_suffix_rules; *s != 0; s += 2) - { - register struct file *f = enter_file (s[0]); - /* Don't clobber cmds given in a makefile if there were any. */ - if (f->cmds == 0) - { - f->cmds = (struct commands *) xmalloc (sizeof (struct commands)); - f->cmds->filename = 0; - f->cmds->commands = s[1]; - f->cmds->command_lines = 0; - } - } -} - - -/* Install the default pattern rules. */ - -void -install_default_implicit_rules () -{ - register struct pspec *p; - - if (no_builtin_rules_flag) - return; - - for (p = default_pattern_rules; p->target != 0; ++p) - install_pattern_rule (p, 0); - - for (p = default_terminal_rules; p->target != 0; ++p) - install_pattern_rule (p, 1); -} - -void -define_default_variables () -{ - register char **s; - - for (s = default_variables; *s != 0; s += 2) - (void) define_variable (s[0], strlen (s[0]), s[1], o_default, 1); -} diff --git a/buildtools/windows/source/make/dep.h b/buildtools/windows/source/make/dep.h deleted file mode 100644 index 244cde243f4..00000000000 --- a/buildtools/windows/source/make/dep.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Definitions of dependency data structures for GNU Make. -Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Structure representing one dependency of a file. - Each struct file's `deps' points to a chain of these, - chained through the `next'. - - Note that the first two words of this match a struct nameseq. */ - -struct dep - { - struct dep *next; - char *name; - struct file *file; - int changed; - }; - - -/* Structure used in chains of names, for parsing and globbing. */ - -struct nameseq - { - struct nameseq *next; - char *name; - }; - - -extern struct nameseq *multi_glob (), *parse_file_seq (); -extern char *tilde_expand (); - -#ifndef NO_ARCHIVES -extern struct nameseq *ar_glob (); -#endif - -#ifndef iAPX286 -#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name) -#else -/* Buggy compiler can't hack this. */ -extern char *dep_name (); -#endif - -extern struct dep *read_all_makefiles (); - -/* Flag bits for the second argument to `read_makefile'. - These flags are saved in the `changed' field of each - `struct dep' in the chain returned by `read_all_makefiles'. */ -#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */ -#define RM_INCLUDED (1 << 1) /* Search makefile search path. */ -#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */ -#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */ -#define RM_NOFLAG 0 diff --git a/buildtools/windows/source/make/dir.c b/buildtools/windows/source/make/dir.c deleted file mode 100644 index eac29fd2f87..00000000000 --- a/buildtools/windows/source/make/dir.c +++ /dev/null @@ -1,760 +0,0 @@ -/* Directory hashing for GNU Make. -Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" - -#ifdef NETSCAPE -#include "windir.h" - -DIR *opendir(char *pathp) -{ - DIR *ret = (DIR *) malloc(sizeof(DIR)); - char path[_MAX_PATH]; - int l; - - sprintf(path, "%s", pathp); - l = strlen(path) - 1; - path[strlen(pathp)] = '\0'; - if(path[strlen(path) - 1] != '\\') - strcpy (path + strlen(path), "\\*.*"); - else - strcat(path, "*.*"); - - ret->de.d_name = NULL; - if( (ret->dp = FindFirstFile(path, &ret->fdata)) != INVALID_HANDLE_VALUE) - return ret; - free(ret); - return NULL; -} - -struct dirent *readdir(DIR *ds) -{ - if(FindNextFile(ds->dp, &ds->fdata) == FALSE) - return NULL; - if(ds->de.d_name) - free(ds->de.d_name); - ds->de.d_name = strdup(ds->fdata.cFileName); - - return &ds->de; -} - -void closedir(DIR *ds) -{ - FindClose(ds->dp); - if(ds->de.d_name) - free(ds->de.d_name); - free(ds); -} - - -#endif - - -#if !defined(NETSCAPE) && defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__) -#include -#ifndef __GNU_LIBRARY__ -#define D_NAMLEN(d) strlen((d)->d_name) -#else /* GNU C library. */ -#define D_NAMLEN(d) ((d)->d_namlen) -#endif /* Not GNU C library. */ -#else /* Not POSIX or HAVE_DIRENT_H. */ -#define direct dirent -#define D_NAMLEN(d) (strlen(d->d_name)) -#ifdef HAVE_SYS_NDIR_H -#include -#endif /* HAVE_SYS_NDIR_H */ -#ifdef HAVE_SYS_DIR_H -#include -#endif /* HAVE_SYS_DIR_H */ -#ifdef HAVE_NDIR_H -#include -#endif /* HAVE_NDIR_H */ -#endif /* POSIX or HAVE_DIRENT_H or __GNU_LIBRARY__. */ - -#if defined (POSIX) && !defined (__GNU_LIBRARY__) || defined(NETSCAPE) -/* Posix does not require that the d_ino field be present, and some - systems do not provide it. */ -#define REAL_DIR_ENTRY(dp) 1 -#else -#define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) -#endif /* POSIX */ - -#ifdef __MSDOS__ -#include - -static char * -dosify (filename) - char *filename; -{ - static char dos_filename[14]; - char *df; - int i; - - if (filename == 0) - return 0; - - if (strpbrk (filename, "\"*+,;<=>?[\\]|") != 0) - return filename; - - df = dos_filename; - - /* First, transform the name part. */ - for (i = 0; *filename != '\0' && i < 8 && *filename != '.'; ++i) - *df++ = tolower (*filename++); - - /* Now skip to the next dot. */ - while (*filename != '\0' && *filename != '.') - ++filename; - if (*filename != '\0') - { - *df++ = *filename++; - for (i = 0; *filename != '\0' && i < 3 && *filename != '.'; ++i) - *df++ = tolower (*filename++); - } - - /* Look for more dots. */ - while (*filename != '\0' && *filename != '.') - ++filename; - if (*filename == '.') - return filename; - *df = 0; - return dos_filename; -} -#endif - -/* Hash table of directories. */ - -#ifndef DIRECTORY_BUCKETS -#define DIRECTORY_BUCKETS 199 -#endif - -struct directory_contents - { - struct directory_contents *next; - -#ifdef NETSCAPE - int dev; /* Device number of this dir. */ - /* - * Inode means nothing on WIN32. Even file key information is - * unreliable because it is random per file open and undefined - * for remote filesystems. The most unique attribute I can - * come up with is the fully qualified name of the directory. Beware - * though, this is also unreliable. I'm open to suggestion on a better - * way to emulate inode. - */ - char *path_key; - int mtime; /* controls check for stale directory cache */ -#else - int dev, ino; /* Device and inode numbers of this dir. */ -#endif - - struct dirfile **files; /* Files in this directory. */ - DIR *dirstream; /* Stream reading this directory. */ - }; - -/* Table of directory contents hashed by device and inode number. */ -static struct directory_contents *directories_contents[DIRECTORY_BUCKETS]; - -struct directory - { - struct directory *next; - - char *name; /* Name of the directory. */ - - /* The directory's contents. This data may be shared by several - entries in the hash table, which refer to the same directory - (identified uniquely by `dev' and `ino') under different names. */ - struct directory_contents *contents; - }; - -/* Table of directories hashed by name. */ -static struct directory *directories[DIRECTORY_BUCKETS]; - - -/* Never have more than this many directories open at once. */ - -#define MAX_OPEN_DIRECTORIES 10 - -static unsigned int open_directories = 0; - - -/* Hash table of files in each directory. */ - -struct dirfile - { - struct dirfile *next; - char *name; /* Name of the file. */ - char impossible; /* This file is impossible. */ - }; - -#ifndef DIRFILE_BUCKETS -#define DIRFILE_BUCKETS 107 -#endif - -static int dir_contents_file_exists_p (); - -/* Find the directory named NAME and return its `struct directory'. */ - -static struct directory * -find_directory (name) - register char *name; -{ - register unsigned int hash = 0; - register char *p; - register struct directory *dir; -#ifdef NETSCAPE - char w32_path[_MAX_PATH]; -#endif - - for (p = name; *p != '\0'; ++p) - HASH (hash, *p); - hash %= DIRECTORY_BUCKETS; - - for (dir = directories[hash]; dir != 0; dir = dir->next) - if (streq (dir->name, name)) - break; - - if (dir == 0) - { - struct stat st; - - /* The directory was not found. Create a new entry for it. */ - - dir = (struct directory *) xmalloc (sizeof (struct directory)); - dir->next = directories[hash]; - directories[hash] = dir; - dir->name = savestring (name, p - name); - - /* The directory is not in the name hash table. - Find its device and inode numbers, and look it up by them. */ - - if (safe_stat (name, &st) < 0) - /* Couldn't stat the directory. Mark this by - setting the `contents' member to a nil pointer. */ - dir->contents = 0; - else - { - /* Search the contents hash table; device and inode are the key. */ - - struct directory_contents *dc; - -#ifdef NETSCAPE - _fullpath (w32_path, name, sizeof (w32_path)); - hash = ((unsigned int) st.st_dev << 16) | (unsigned int) st.st_ctime; -#else - hash = ((unsigned int) st.st_dev << 16) | (unsigned int) st.st_ino; -#endif - hash %= DIRECTORY_BUCKETS; - - for (dc = directories_contents[hash]; dc != 0; dc = dc->next) -#ifdef NETSCAPE - if (!strcmp(dc->path_key, w32_path)) -#else - if (dc->dev == (int)st.st_dev && dc->ino == (int)st.st_ino) -#endif - break; - - if (dc == 0) - { - /* Nope; this really is a directory we haven't seen before. */ - - dc = (struct directory_contents *) - xmalloc (sizeof (struct directory_contents)); - - /* Enter it in the contents hash table. */ - dc->dev = st.st_dev; -#ifdef NETSCAPE - dc->path_key = strdup(w32_path); - dc->mtime = st.st_mtime; -#else - dc->ino = st.st_ino; -#endif - dc->next = directories_contents[hash]; - directories_contents[hash] = dc; - - dc->dirstream = opendir (name); - if (dc->dirstream == 0) - /* Couldn't open the directory. Mark this by - setting the `files' member to a nil pointer. */ - dc->files = 0; - else - { - /* Allocate an array of buckets for files and zero it. */ - dc->files = (struct dirfile **) - xmalloc (sizeof (struct dirfile *) * DIRFILE_BUCKETS); - bzero ((char *) dc->files, - sizeof (struct dirfile *) * DIRFILE_BUCKETS); - - /* Keep track of how many directories are open. */ - ++open_directories; - if (open_directories == MAX_OPEN_DIRECTORIES) - /* We have too many directories open already. - Read the entire directory and then close it. */ - (void) dir_contents_file_exists_p (dc, (char *) 0); - } - } - - /* Point the name-hashed entry for DIR at its contents data. */ - dir->contents = dc; - } - } - - return dir; -} - -/* Return 1 if the name FILENAME is entered in DIR's hash table. - FILENAME must contain no slashes. */ - -static int -dir_contents_file_exists_p (dir, filename) - register struct directory_contents *dir; - register char *filename; -{ - register unsigned int hash; - register char *p; - register struct dirfile *df; - register struct dirent *d; -#ifdef NETSCAPE - struct stat st; - int rehash = 0; -#endif - - if (dir == 0 || dir->files == 0) - /* The directory could not be stat'd or opened. */ - return 0; - -#ifdef __MSDOS__ - filename = dosify (filename); -#endif - - hash = 0; - if (filename != 0) - { - if (*filename == '\0') - /* Checking if the directory exists. */ - return 1; - - for (p = filename; *p != '\0'; ++p) - HASH (hash, *p); - hash %= DIRFILE_BUCKETS; - - /* Search the list of hashed files. */ - - for (df = dir->files[hash]; df != 0; df = df->next) - if (streq (df->name, filename)) - return !df->impossible; - } - - /* The file was not found in the hashed list. - Try to read the directory further. */ - -#ifdef NETSCAPE - if (dir->dirstream == 0) - { - /* Check to see if directory has changed since last read */ - if (dir->path_key && - stat(dir->path_key, &st) == 0 && - st.st_mtime > dir->mtime) { - - /* reset date stamp to show most recent re-process */ - dir->mtime = st.st_mtime; - - /* make sure directory can still be opened */ - dir->dirstream = opendir(dir->path_key); - - if (dir->dirstream) - rehash = 1; - else - return 0; /* couldn't re-read - fail */ - } else - /* The directory has been all read in. */ - return 0; - } -#else - if (dir->dirstream == 0) - /* The directory has been all read in. */ - return 0; -#endif - - while ((d = readdir (dir->dirstream)) != 0) - { - /* Enter the file in the hash table. */ - register unsigned int newhash = 0; - unsigned int len; - register unsigned int i; - - if (!REAL_DIR_ENTRY (d)) - continue; - - len = D_NAMLEN (d); - while (d->d_name[len - 1] == '\0') - --len; - - for (i = 0; i < len; ++i) - HASH (newhash, d->d_name[i]); - newhash %= DIRFILE_BUCKETS; - -#ifdef NETSCAPE - /* - * If re-reading a directory, check that this file isn't already - * in the cache. - */ - if (rehash) { - for (df = dir->files[newhash]; df != 0; df = df->next) - if (streq(df->name, d->d_name)) - break; - } else - df = 0; - - /* - * If re-reading a directory, don't cache files that have - * already been discovered. - */ - if (!df) { -#endif - df = (struct dirfile *) xmalloc (sizeof (struct dirfile)); - df->next = dir->files[newhash]; - dir->files[newhash] = df; - df->name = savestring (d->d_name, len); - df->impossible = 0; -#ifdef NETSCAPE - } -#endif - - /* Check if the name matches the one we're searching for. */ - if (filename != 0 - && newhash == hash && streq (d->d_name, filename)) - return 1; - } - - /* If the directory has been completely read in, - close the stream and reset the pointer to nil. */ - if (d == 0) - { - --open_directories; - closedir (dir->dirstream); - dir->dirstream = 0; - } - - return 0; -} - -/* Return 1 if the name FILENAME in directory DIRNAME - is entered in the dir hash table. - FILENAME must contain no slashes. */ - -int -dir_file_exists_p (dirname, filename) - register char *dirname; - register char *filename; -{ - return dir_contents_file_exists_p (find_directory (dirname)->contents, - filename); -} - -/* Return 1 if the file named NAME exists. */ - -int -file_exists_p (name) - register char *name; -{ - char *dirend; - char *dirname; - -#ifndef NO_ARCHIVES - if (ar_name (name)) - return ar_member_date (name) != (time_t) -1; -#endif - - dirend = rindex (name, '/'); - if (dirend == 0) - return dir_file_exists_p (".", name); - - dirname = (char *) alloca (dirend - name + 1); - bcopy (name, dirname, dirend - name); - dirname[dirend - name] = '\0'; - return dir_file_exists_p (dirname, dirend + 1); -} - -/* Mark FILENAME as `impossible' for `file_impossible_p'. - This means an attempt has been made to search for FILENAME - as an intermediate file, and it has failed. */ - -void -file_impossible (filename) - register char *filename; -{ - char *dirend; - register char *p = filename; - register unsigned int hash; - register struct directory *dir; - register struct dirfile *new; - - dirend = rindex (p, '/'); - if (dirend == 0) - dir = find_directory ("."); - else - { - char *dirname = (char *) alloca (dirend - p + 1); - bcopy (p, dirname, dirend - p); - dirname[dirend - p] = '\0'; - dir = find_directory (dirname); - filename = p = dirend + 1; - } - - for (hash = 0; *p != '\0'; ++p) - HASH (hash, *p); - hash %= DIRFILE_BUCKETS; - - if (dir->contents == 0) - { - /* The directory could not be stat'd. We allocate a contents - structure for it, but leave it out of the contents hash table. */ - dir->contents = (struct directory_contents *) - xmalloc (sizeof (struct directory_contents)); -#ifdef NETSCAPE - dir->contents->dev = 0; - dir->contents->path_key = NULL; - dir->contents->mtime = 0; -#else - dir->contents->dev = dir->contents->ino = 0; -#endif - dir->contents->files = 0; - dir->contents->dirstream = 0; - } - - if (dir->contents->files == 0) - { - /* The directory was not opened; we must allocate the hash buckets. */ - dir->contents->files = (struct dirfile **) - xmalloc (sizeof (struct dirfile) * DIRFILE_BUCKETS); - bzero ((char *) dir->contents->files, - sizeof (struct dirfile) * DIRFILE_BUCKETS); - } - - /* Make a new entry and put it in the table. */ - - new = (struct dirfile *) xmalloc (sizeof (struct dirfile)); - new->next = dir->contents->files[hash]; - dir->contents->files[hash] = new; - new->name = savestring (filename, strlen (filename)); - new->impossible = 1; -} - -/* Return nonzero if FILENAME has been marked impossible. */ - -int -file_impossible_p (filename) - char *filename; -{ - char *dirend; - register char *p = filename; - register unsigned int hash; - register struct directory_contents *dir; - register struct dirfile *next; - - dirend = rindex (filename, '/'); - if (dirend == 0) - dir = find_directory (".")->contents; - else - { - char *dirname = (char *) alloca (dirend - filename + 1); - bcopy (p, dirname, dirend - p); - dirname[dirend - p] = '\0'; - dir = find_directory (dirname)->contents; - p = dirend + 1; - } - - if (dir == 0 || dir->files == 0) - /* There are no files entered for this directory. */ - return 0; - -#ifdef __MSDOS__ - p = filename = dosify (p); -#endif - - for (hash = 0; *p != '\0'; ++p) - HASH (hash, *p); - hash %= DIRFILE_BUCKETS; - - for (next = dir->files[hash]; next != 0; next = next->next) - if (streq (filename, next->name)) - return next->impossible; - - return 0; -} - -/* Return the already allocated name in the - directory hash table that matches DIR. */ - -char * -dir_name (dir) - char *dir; -{ - return find_directory (dir)->name; -} - -/* Print the data base of directories. */ - -void -print_dir_data_base () -{ - register unsigned int i, dirs, files, impossible; - register struct directory *dir; - - puts ("\n# Directories\n"); - - dirs = files = impossible = 0; - for (i = 0; i < DIRECTORY_BUCKETS; ++i) - for (dir = directories[i]; dir != 0; dir = dir->next) - { - ++dirs; - if (dir->contents == 0) - printf ("# %s: could not be stat'd.\n", dir->name); - else if (dir->contents->files == 0) -#ifdef NETSCAPE - printf ("# %s (path_key %s, mtime %d): could not be opened.\n", - dir->name, dir->contents->path_key, dir->contents->mtime); -#else - printf ("# %s (device %d, inode %d): could not be opened.\n", - dir->name, dir->contents->dev, dir->contents->ino); -#endif - else - { - register unsigned int f = 0, im = 0; - register unsigned int j; - register struct dirfile *df; - for (j = 0; j < DIRFILE_BUCKETS; ++j) - for (df = dir->contents->files[j]; df != 0; df = df->next) - if (df->impossible) - ++im; - else - ++f; -#ifdef NETSCAPE - printf ("# %s (device %d, path_key %s, mtime %d): ", - dir->name, dir->contents->dev, - dir->contents->path_key, dir->contents->mtime); -#else - printf ("# %s (device %d, inode %d): ", - dir->name, dir->contents->dev, dir->contents->ino); -#endif - if (f == 0) - fputs ("No", stdout); - else - printf ("%u", f); - fputs (" files, ", stdout); - if (im == 0) - fputs ("no", stdout); - else - printf ("%u", im); - fputs (" impossibilities", stdout); - if (dir->contents->dirstream == 0) - puts ("."); - else - puts (" so far."); - files += f; - impossible += im; - } - } - - fputs ("\n# ", stdout); - if (files == 0) - fputs ("No", stdout); - else - printf ("%u", files); - fputs (" files, ", stdout); - if (impossible == 0) - fputs ("no", stdout); - else - printf ("%u", impossible); - printf (" impossibilities in %u directories.\n", dirs); -} - -/* Hooks for globbing. */ - -#include - -/* Structure describing state of iterating through a directory hash table. */ - -struct dirstream - { - struct directory_contents *contents; /* The directory being read. */ - - unsigned int bucket; /* Current hash bucket. */ - struct dirfile *elt; /* Current elt in bucket. */ - }; - -/* Forward declarations. */ -static __ptr_t open_dirstream __P ((const char *)); -static const char *read_dirstream __P ((__ptr_t)); - -static __ptr_t -open_dirstream (directory) - const char *directory; -{ - struct dirstream *new; - struct directory *dir = find_directory (directory); - - if (dir->contents == 0 || dir->contents->files == 0) - /* DIR->contents is nil if the directory could not be stat'd. - DIR->contents->files is nil if it could not be opened. */ - return 0; - - /* Read all the contents of the directory now. There is no benefit - in being lazy, since glob will want to see every file anyway. */ - - (void) dir_contents_file_exists_p (dir->contents, (char *) 0); - - new = (struct dirstream *) xmalloc (sizeof (struct dirstream)); - new->contents = dir->contents; - new->bucket = 0; - new->elt = new->contents->files[0]; - - return (__ptr_t) new; -} - -static const char * -read_dirstream (stream) - __ptr_t stream; -{ - struct dirstream *const ds = (struct dirstream *) stream; - register struct dirfile *df; - - while (ds->bucket < DIRFILE_BUCKETS) - { - while ((df = ds->elt) != 0) - { - ds->elt = df->next; - if (!df->impossible) - return df->name; - } - if (++ds->bucket == DIRFILE_BUCKETS) - break; - ds->elt = ds->contents->files[ds->bucket]; - } - - return 0; -} - -void -init_dir () -{ - __glob_opendir_hook = open_dirstream; - __glob_readdir_hook = read_dirstream; - __glob_closedir_hook = (void (*) __P ((__ptr_t stream))) free; -} diff --git a/buildtools/windows/source/make/expand.c b/buildtools/windows/source/make/expand.c deleted file mode 100644 index 7348fb26176..00000000000 --- a/buildtools/windows/source/make/expand.c +++ /dev/null @@ -1,456 +0,0 @@ -/* Variable expansion functions for GNU Make. -Copyright (C) 1988, 89, 91, 92, 93, 95 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "file.h" -#include "variable.h" - -/* The next two describe the variable output buffer. - This buffer is used to hold the variable-expansion of a line of the - makefile. It is made bigger with realloc whenever it is too small. - variable_buffer_length is the size currently allocated. - variable_buffer is the address of the buffer. */ - -static unsigned int variable_buffer_length; -static char *variable_buffer; - -/* Subroutine of variable_expand and friends: - The text to add is LENGTH chars starting at STRING to the variable_buffer. - The text is added to the buffer at PTR, and the updated pointer into - the buffer is returned as the value. Thus, the value returned by - each call to variable_buffer_output should be the first argument to - the following call. */ - -char * -variable_buffer_output (ptr, string, length) - char *ptr, *string; - unsigned int length; -{ - register unsigned int newlen = length + (ptr - variable_buffer); - - if (newlen > variable_buffer_length) - { - unsigned int offset = ptr - variable_buffer; - variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length - ? newlen + 100 - : 2 * variable_buffer_length); - variable_buffer = (char *) xrealloc (variable_buffer, - variable_buffer_length); - ptr = variable_buffer + offset; - } - - bcopy (string, ptr, length); - return ptr + length; -} - -/* Return a pointer to the beginning of the variable buffer. */ - -static char * -initialize_variable_output () -{ - /* If we don't have a variable output buffer yet, get one. */ - - if (variable_buffer == 0) - { - variable_buffer_length = 200; - variable_buffer = (char *) xmalloc (variable_buffer_length); - variable_buffer[0] = '\0'; - } - - return variable_buffer; -} - -/* Recursively expand V. The returned string is malloc'd. */ - -char * -recursively_expand (v) - register struct variable *v; -{ - char *value; - - if (v->expanding) - { - /* Expanding V causes infinite recursion. Lose. */ - if (reading_filename == 0) - fatal ("Recursive variable `%s' references itself (eventually)", - v->name); - else - makefile_fatal - (reading_filename, *reading_lineno_ptr, - "Recursive variable `%s' references itself (eventually)", - v->name); - } - - v->expanding = 1; - value = allocated_variable_expand (v->value); - v->expanding = 0; - - return value; -} - -/* Warn that NAME is an undefined variable. */ - -#ifdef __GNUC__ -__inline -#endif -static void -warn_undefined (name, length) - char *name; - unsigned int length; -{ - if (warn_undefined_variables_flag) - { - static const char warnmsg[] = "warning: undefined variable `%.*s'"; - if (reading_filename != 0) - makefile_error (reading_filename, *reading_lineno_ptr, - warnmsg, length, name); - else - error (warnmsg, length, name); - } -} - -/* Expand a simple reference to variable NAME, which is LENGTH chars long. */ - -#ifdef __GNUC__ -__inline -#endif -static char * -reference_variable (o, name, length) - char *o; - char *name; - unsigned int length; -{ - register struct variable *v = lookup_variable (name, length); - - if (v == 0) - warn_undefined (name, length); - - if (v != 0 && *v->value != '\0') - { - char *value = (v->recursive ? recursively_expand (v) : v->value); - o = variable_buffer_output (o, value, strlen (value)); - if (v->recursive) - free (value); - } - - return o; -} - -/* Scan LINE for variable references and expansion-function calls. - Build in `variable_buffer' the result of expanding the references and calls. - Return the address of the resulting string, which is null-terminated - and is valid only until the next time this function is called. */ - -char * -variable_expand (line) - register char *line; -{ - register struct variable *v; - register char *p, *o, *p1; - - p = line; - o = initialize_variable_output (); - - while (1) - { - /* Copy all following uninteresting chars all at once to the - variable output buffer, and skip them. Uninteresting chars end - at the next $ or the end of the input. */ - - p1 = index (p, '$'); - - o = variable_buffer_output (o, p, p1 != 0 ? p1 - p : strlen (p) + 1); - - if (p1 == 0) - break; - p = p1 + 1; - - /* Dispatch on the char that follows the $. */ - - switch (*p) - { - case '$': - /* $$ seen means output one $ to the variable output buffer. */ - o = variable_buffer_output (o, p, 1); - break; - - case '(': - case '{': - /* $(...) or ${...} is the general case of substitution. */ - { - char openparen = *p; - char closeparen = (openparen == '(') ? ')' : '}'; - register char *beg = p + 1; - int free_beg = 0; - char *op, *begp; - char *end, *colon; - - op = o; - begp = p; - if (handle_function (&op, &begp)) - { - o = op; - p = begp; - break; - } - - /* Is there a variable reference inside the parens or braces? - If so, expand it before expanding the entire reference. */ - - end = index (beg, closeparen); - if (end == 0) - { - /* Unterminated variable reference. */ - if (reading_filename != 0) - makefile_fatal (reading_filename, *reading_lineno_ptr, - "unterminated variable reference"); - else - fatal ("unterminated variable reference"); - } - p1 = lindex (beg, end, '$'); - if (p1 != 0) - { - /* BEG now points past the opening paren or brace. - Count parens or braces until it is matched. */ - int count = 0; - for (p = beg; *p != '\0'; ++p) - { - if (*p == openparen) - ++count; - else if (*p == closeparen && --count < 0) - break; - } - /* If COUNT is >= 0, there were unmatched opening parens - or braces, so we go to the simple case of a variable name - such as `$($(a)'. */ - if (count < 0) - { - beg = expand_argument (beg, p); /* Expand the name. */ - free_beg = 1; /* Remember to free BEG when finished. */ - end = index (beg, '\0'); - } - } - else - /* Advance P to the end of this reference. After we are - finished expanding this one, P will be incremented to - continue the scan. */ - p = end; - - /* This is not a reference to a built-in function and - any variable references inside are now expanded. - Is the resultant text a substitution reference? */ - - colon = lindex (beg, end, ':'); - if (colon != 0) - { - /* This looks like a substitution reference: $(FOO:A=B). */ - char *subst_beg, *subst_end, *replace_beg, *replace_end; - - subst_beg = colon + 1; - subst_end = index (subst_beg, '='); - if (subst_end == 0) - /* There is no = in sight. Punt on the substitution - reference and treat this as a variable name containing - a colon, in the code below. */ - colon = 0; - else - { - replace_beg = subst_end + 1; - replace_end = end; - - /* Extract the variable name before the colon - and look up that variable. */ - v = lookup_variable (beg, colon - beg); - if (v == 0) - warn_undefined (beg, colon - beg); - - if (v != 0 && *v->value != '\0') - { - char *value = (v->recursive ? recursively_expand (v) - : v->value); - char *pattern, *percent; - if (free_beg) - { - *subst_end = '\0'; - pattern = subst_beg; - } - else - { - pattern = (char *) alloca (subst_end - subst_beg - + 1); - bcopy (subst_beg, pattern, subst_end - subst_beg); - pattern[subst_end - subst_beg] = '\0'; - } - percent = find_percent (pattern); - if (percent != 0) - { - char *replace; - if (free_beg) - { - *replace_end = '\0'; - replace = replace_beg; - } - else - { - replace = (char *) alloca (replace_end - - replace_beg - + 1); - bcopy (replace_beg, replace, - replace_end - replace_beg); - replace[replace_end - replace_beg] = '\0'; - } - - o = patsubst_expand (o, value, pattern, replace, - percent, (char *) 0); - } - else - o = subst_expand (o, value, - pattern, replace_beg, - strlen (pattern), - end - replace_beg, - 0, 1); - if (v->recursive) - free (value); - } - } - } - - if (colon == 0) - /* This is an ordinary variable reference. - Look up the value of the variable. */ - o = reference_variable (o, beg, end - beg); - - if (free_beg) - free (beg); - } - break; - - case '\0': - break; - - default: - if (isblank (p[-1])) - break; - - /* A $ followed by a random char is a variable reference: - $a is equivalent to $(a). */ - { - /* We could do the expanding here, but this way - avoids code repetition at a small performance cost. */ - char name[5]; - name[0] = '$'; - name[1] = '('; - name[2] = *p; - name[3] = ')'; - name[4] = '\0'; - p1 = allocated_variable_expand (name); - o = variable_buffer_output (o, p1, strlen (p1)); - free (p1); - } - - break; - } - - if (*p == '\0') - break; - else - ++p; - } - - (void) variable_buffer_output (o, "", 1); - return initialize_variable_output (); -} - -/* Expand an argument for an expansion function. - The text starting at STR and ending at END is variable-expanded - into a null-terminated string that is returned as the value. - This is done without clobbering `variable_buffer' or the current - variable-expansion that is in progress. */ - -char * -expand_argument (str, end) - char *str, *end; -{ - char *tmp; - - if (*end == '\0') - tmp = str; - else - { - tmp = (char *) alloca (end - str + 1); - bcopy (str, tmp, end - str); - tmp[end - str] = '\0'; - } - - return allocated_variable_expand (tmp); -} - -/* Expand LINE for FILE. Error messages refer to the file and line where - FILE's commands were found. Expansion uses FILE's variable set list. */ - -char * -variable_expand_for_file (line, file) - char *line; - register struct file *file; -{ - char *result; - struct variable_set_list *save; - - if (file == 0) - return variable_expand (line); - - save = current_variable_set_list; - current_variable_set_list = file->variables; - reading_filename = file->cmds->filename; - reading_lineno_ptr = &file->cmds->lineno; - result = variable_expand (line); - current_variable_set_list = save; - reading_filename = 0; - reading_lineno_ptr = 0; - - return result; -} - -/* Like variable_expand_for_file, but the returned string is malloc'd. - This function is called a lot. It wants to be efficient. */ - -char * -allocated_variable_expand_for_file (line, file) - char *line; - struct file *file; -{ - char *value; - - char *obuf = variable_buffer; - unsigned int olen = variable_buffer_length; - - variable_buffer = 0; - - value = variable_expand_for_file (line, file); - -#if 0 - /* Waste a little memory and save time. */ - value = xrealloc (value, strlen (value)) -#endif - - variable_buffer = obuf; - variable_buffer_length = olen; - - return value; -} diff --git a/buildtools/windows/source/make/file.c b/buildtools/windows/source/make/file.c deleted file mode 100644 index 82e7442cd66..00000000000 --- a/buildtools/windows/source/make/file.c +++ /dev/null @@ -1,566 +0,0 @@ -/* Target file hash table management for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "dep.h" -#include "file.h" -#include "variable.h" -#include - - -/* Hash table of files the makefile knows how to make. */ - -#ifndef FILE_BUCKETS -#define FILE_BUCKETS 1007 -#endif -static struct file *files[FILE_BUCKETS]; - -/* Number of files with the `intermediate' flag set. */ - -unsigned int num_intermediates = 0; - - -/* Access the hash table of all file records. - lookup_file given a name, return the struct file * for that name, - or nil if there is none. - enter_file similar, but create one if there is none. */ - -struct file * -lookup_file (name) - char *name; -{ - register struct file *f; - register char *n; - register unsigned int hashval; - - if (*name == '\0') - abort (); - - /* This is also done in parse_file_seq, so this is redundant - for names read from makefiles. It is here for names passed - on the command line. */ - while (name[0] == '.' && name[1] == '/' && name[2] != '\0') - { - name += 2; - while (*name == '/') - /* Skip following slashes: ".//foo" is "foo", not "/foo". */ - ++name; - } - - if (*name == '\0') - /* It was all slashes after a dot. */ - name = "./"; - - hashval = 0; - for (n = name; *n != '\0'; ++n) - HASH (hashval, *n); - hashval %= FILE_BUCKETS; - - for (f = files[hashval]; f != 0; f = f->next) - if (streq (f->name, name)) - return f; - return 0; -} - -struct file * -enter_file (name) - char *name; -{ - register struct file *f, *new; - register char *n; - register unsigned int hashval; - - if (*name == '\0') - abort (); - - hashval = 0; - for (n = name; *n != '\0'; ++n) - HASH (hashval, *n); - hashval %= FILE_BUCKETS; - - for (f = files[hashval]; f != 0; f = f->next) - if (streq (f->name, name)) - break; - - if (f != 0 && !f->double_colon) - return f; - - new = (struct file *) xmalloc (sizeof (struct file)); - bzero ((char *) new, sizeof (struct file)); - new->name = name; - new->update_status = -1; - - if (f == 0) - { - /* This is a completely new file. */ - new->next = files[hashval]; - files[hashval] = new; - } - else - { - /* There is already a double-colon entry for this file. */ - new->double_colon = f; - while (f->prev != 0) - f = f->prev; - f->prev = new; - } - - return new; -} - -/* Rename FILE to NAME. This is not as simple as resetting - the `name' member, since it must be put in a new hash bucket, - and possibly merged with an existing file called NAME. */ - -void -rename_file (file, name) - register struct file *file; - char *name; -{ - char *oldname = file->name; - register unsigned int oldhash; - register char *n; - - while (file->renamed != 0) - file = file->renamed; - - /* Find the hash values of the old and new names. */ - - oldhash = 0; - for (n = oldname; *n != '\0'; ++n) - HASH (oldhash, *n); - - file_hash_enter (file, name, oldhash, file->name); -} - -void -file_hash_enter (file, name, oldhash, oldname) - register struct file *file; - char *name; - unsigned int oldhash; - char *oldname; -{ - unsigned int oldbucket = oldhash % FILE_BUCKETS; - register unsigned int newhash, newbucket; - struct file *oldfile; - register char *n; - register struct file *f; - - newhash = 0; - for (n = name; *n != '\0'; ++n) - HASH (newhash, *n); - newbucket = newhash % FILE_BUCKETS; - - /* Look for an existing file under the new name. */ - - for (oldfile = files[newbucket]; oldfile != 0; oldfile = oldfile->next) - if (streq (oldfile->name, name)) - break; - - if (oldhash != 0 && (newbucket != oldbucket || oldfile != 0)) - { - /* Remove FILE from its hash bucket. */ - - struct file *lastf = 0; - - for (f = files[oldbucket]; f != file; f = f->next) - lastf = f; - - if (lastf == 0) - files[oldbucket] = f->next; - else - lastf->next = f->next; - } - - /* Give FILE its new name. */ - - file->name = name; - for (f = file->double_colon; f != 0; f = f->prev) - f->name = name; - - if (oldfile == 0) - { - /* There is no existing file with the new name. */ - - if (newbucket != oldbucket) - { - /* Put FILE in its new hash bucket. */ - file->next = files[newbucket]; - files[newbucket] = file; - } - } - else - { - /* There is an existing file with the new name. - We must merge FILE into the existing file. */ - - register struct dep *d; - - if (file->cmds != 0) - { - if (oldfile->cmds == 0) - oldfile->cmds = file->cmds; - else if (file->cmds != oldfile->cmds) - { - /* We have two sets of commands. We will go with the - one given in the rule explicitly mentioning this name, - but give a message to let the user know what's going on. */ - if (oldfile->cmds->filename != 0) - makefile_error (file->cmds->filename, file->cmds->lineno, - "Commands were specified for \ -file `%s' at %s:%u,", - oldname, oldfile->cmds->filename, - oldfile->cmds->lineno); - else - makefile_error (file->cmds->filename, file->cmds->lineno, - "Commands for file `%s' were found by \ -implicit rule search,", - oldname); - makefile_error (file->cmds->filename, file->cmds->lineno, - "but `%s' is now considered the same file \ -as `%s'.", - oldname, name); - makefile_error (file->cmds->filename, file->cmds->lineno, - "Commands for `%s' will be ignored \ -in favor of those for `%s'.", - name, oldname); - } - } - - /* Merge the dependencies of the two files. */ - - d = oldfile->deps; - if (d == 0) - oldfile->deps = file->deps; - else - { - while (d->next != 0) - d = d->next; - d->next = file->deps; - } - - merge_variable_set_lists (&oldfile->variables, file->variables); - - if (oldfile->double_colon && !file->double_colon) - fatal ("can't rename single-colon `%s' to double-colon `%s'", - oldname, name); - if (!oldfile->double_colon && file->double_colon) - fatal ("can't rename double-colon `%s' to single-colon `%s'", - oldname, name); - - if (file->last_mtime > oldfile->last_mtime) - /* %%% Kludge so -W wins on a file that gets vpathized. */ - oldfile->last_mtime = file->last_mtime; - -#define MERGE(field) oldfile->field |= file->field - MERGE (precious); - MERGE (tried_implicit); - MERGE (updating); - MERGE (updated); - MERGE (is_target); - MERGE (cmd_target); - MERGE (phony); -#undef MERGE - - file->renamed = oldfile; - } -} - -/* Remove all nonprecious intermediate files. - If SIG is nonzero, this was caused by a fatal signal, - meaning that a different message will be printed, and - the message will go to stderr rather than stdout. */ - -void -remove_intermediates (sig) - int sig; -{ - register int i; - register struct file *f; - char doneany; - - if (question_flag || touch_flag) - return; - if (sig && just_print_flag) - return; - - doneany = 0; - for (i = 0; i < FILE_BUCKETS; ++i) - for (f = files[i]; f != 0; f = f->next) - if (f->intermediate && (f->dontcare || !f->precious)) - { - int status; - if (f->update_status == -1) - /* If nothing would have created this file yet, - don't print an "rm" command for it. */ - continue; - else if (just_print_flag) - status = 0; - else - { - status = unlink (f->name); - if (status < 0 && errno == ENOENT) - continue; - } - if (!f->dontcare) - { - if (sig) - error ("*** Deleting intermediate file `%s'", f->name); - else if (!silent_flag) - { - if (! doneany) - { - fputs ("rm ", stdout); - doneany = 1; - } - else - putchar (' '); - fputs (f->name, stdout); - fflush (stdout); - } - if (status < 0) - perror_with_name ("unlink: ", f->name); - } - } - - if (doneany && !sig) - { - putchar ('\n'); - fflush (stdout); - } -} - -/* For each dependency of each file, make the `struct dep' point - at the appropriate `struct file' (which may have to be created). - - Also mark the files depended on by .PRECIOUS and .PHONY. */ - -void -snap_deps () -{ - register struct file *f, *f2; - register struct dep *d; - register int i; - - /* Enter each dependency name as a file. */ - for (i = 0; i < FILE_BUCKETS; ++i) - for (f = files[i]; f != 0; f = f->next) - for (f2 = f; f2 != 0; f2 = f2->prev) - for (d = f2->deps; d != 0; d = d->next) - if (d->name != 0) - { - d->file = lookup_file (d->name); - if (d->file == 0) - d->file = enter_file (d->name); - else - free (d->name); - d->name = 0; - } - - for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev) - for (d = f->deps; d != 0; d = d->next) - for (f2 = d->file; f2 != 0; f2 = f2->prev) - f2->precious = 1; - - for (f = lookup_file (".PHONY"); f != 0; f = f->prev) - for (d = f->deps; d != 0; d = d->next) - for (f2 = d->file; f2 != 0; f2 = f2->prev) - { - /* Mark this file as phony and nonexistent. */ - f2->phony = 1; - f2->last_mtime = (time_t) -1; - } - - f = lookup_file (".EXPORT_ALL_VARIABLES"); - if (f != 0 && f->is_target) - export_all_variables = 1; - - f = lookup_file (".IGNORE"); - if (f != 0 && f->is_target) - { - if (f->deps == 0) - ignore_errors_flag = 1; - else - for (d = f->deps; d != 0; d = d->next) - for (f2 = d->file; f2 != 0; f2 = f2->prev) - f2->command_flags |= COMMANDS_NOERROR; - } - - f = lookup_file (".SILENT"); - if (f != 0 && f->is_target) - { - if (f->deps == 0) - silent_flag = 1; - else - for (d = f->deps; d != 0; d = d->next) - for (f2 = d->file; f2 != 0; f2 = f2->prev) - f2->command_flags |= COMMANDS_SILENT; - } - - f = lookup_file (".POSIX"); - if (f != 0 && f->is_target) - posix_pedantic = 1; -} - -/* Set the `command_state' member of FILE and all its `also_make's. */ - -void -set_command_state (file, state) - struct file *file; - int state; -{ - struct dep *d; - - file->command_state = state; - - for (d = file->also_make; d != 0; d = d->next) - d->file->command_state = state; -} - -/* Print the data base of files. */ - -static void -print_file (f) - struct file *f; -{ - register struct dep *d; - - putchar ('\n'); - if (!f->is_target) - puts ("# Not a target:"); - printf ("%s:%s", f->name, f->double_colon ? ":" : ""); - - for (d = f->deps; d != 0; d = d->next) - printf (" %s", dep_name (d)); - putchar ('\n'); - - if (f->precious) - puts ("# Precious file (dependency of .PRECIOUS)."); - if (f->phony) - puts ("# Phony target (dependency of .PHONY)."); - if (f->cmd_target) - puts ("# Command-line target."); - if (f->dontcare) - puts ("# A default or MAKEFILES makefile."); - printf ("# Implicit rule search has%s been done.\n", - f->tried_implicit ? "" : " not"); - if (f->stem != 0) - printf ("# Implicit/static pattern stem: `%s'\n", f->stem); - if (f->intermediate) - puts ("# File is an intermediate dependency."); - if (f->also_make != 0) - { - fputs ("# Also makes:", stdout); - for (d = f->also_make; d != 0; d = d->next) - printf (" %s", dep_name (d)); - putchar ('\n'); - } - if (f->last_mtime == (time_t) 0) - puts ("# Modification time never checked."); - else if (f->last_mtime == (time_t) -1) - puts ("# File does not exist."); - else - printf ("# Last modified %.24s (%ld)\n", - ctime (&f->last_mtime), (long int) f->last_mtime); - printf ("# File has%s been updated.\n", - f->updated ? "" : " not"); - switch (f->command_state) - { - case cs_running: - puts ("# Commands currently running (THIS IS A BUG)."); - break; - case cs_deps_running: - puts ("# Dependencies commands running (THIS IS A BUG)."); - break; - case cs_not_started: - case cs_finished: - switch (f->update_status) - { - case -1: - break; - case 0: - puts ("# Successfully updated."); - break; - case 1: - assert (question_flag); - puts ("# Needs to be updated (-q is set)."); - break; - case 2: - puts ("# Failed to be updated."); - break; - default: - puts ("# Invalid value in `update_status' member!"); - fflush (stdout); - fflush (stderr); - abort (); - } - break; - default: - puts ("# Invalid value in `command_state' member!"); - fflush (stdout); - fflush (stderr); - abort (); - } - - if (f->variables != 0) - print_file_variables (f); - - if (f->cmds != 0) - print_commands (f->cmds); -} - -void -print_file_data_base () -{ - register unsigned int i, nfiles, per_bucket; - register struct file *file; - - puts ("\n# Files"); - - per_bucket = nfiles = 0; - for (i = 0; i < FILE_BUCKETS; ++i) - { - register unsigned int this_bucket = 0; - - for (file = files[i]; file != 0; file = file->next) - { - register struct file *f; - - ++this_bucket; - - for (f = file; f != 0; f = f->prev) - print_file (f); - } - - nfiles += this_bucket; - if (this_bucket > per_bucket) - per_bucket = this_bucket; - } - - if (nfiles == 0) - puts ("\n# No files."); - else - { - printf ("\n# %u files in %u hash buckets.\n", nfiles, FILE_BUCKETS); -#ifndef NO_FLOAT - printf ("# average %.1f files per bucket, max %u files in one bucket.\n", - ((double) nfiles) / ((double) FILE_BUCKETS) * 100.0, per_bucket); -#endif - } -} diff --git a/buildtools/windows/source/make/file.h b/buildtools/windows/source/make/file.h deleted file mode 100644 index 5889474a550..00000000000 --- a/buildtools/windows/source/make/file.h +++ /dev/null @@ -1,111 +0,0 @@ -/* Definition of target file data structures for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Structure that represents the info on one file - that the makefile says how to make. - All of these are chained together through `next'. */ - -struct file - { - struct file *next; - char *name; - struct dep *deps; - struct commands *cmds; /* Commands to execute for this target. */ - int command_flags; /* Flags OR'd in for cmds; see commands.h. */ - char *stem; /* Implicit stem, if an implicit - rule has been used */ - struct dep *also_make; /* Targets that are made by making this. */ - time_t last_mtime; /* File's modtime, if already known. */ - struct file *prev; /* Previous entry for same file name; - used when there are multiple double-colon - entries for the same file. */ - - /* File that this file was renamed to. After any time that a - file could be renamed, call `check_renamed' (below). */ - struct file *renamed; - - /* List of variable sets used for this file. */ - struct variable_set_list *variables; - - /* Immediate dependent that caused this target to be remade, - or nil if there isn't one. */ - struct file *parent; - - /* For a double-colon entry, this is the first double-colon entry for - the same file. Otherwise this is null. */ - struct file *double_colon; - - short int update_status; /* Status of the last attempt to update, - or -1 if none has been made. */ - - enum /* State of the commands. */ - { /* Note: It is important that cs_not_started be zero. */ - cs_not_started, /* Not yet started. */ - cs_deps_running, /* Dep commands running. */ - cs_running, /* Commands running. */ - cs_finished /* Commands finished. */ - } command_state ENUM_BITFIELD (2); - - unsigned int precious:1; /* Non-0 means don't delete file on quit */ - unsigned int tried_implicit:1; /* Nonzero if have searched - for implicit rule for making - this file; don't search again. */ - unsigned int updating:1; /* Nonzero while updating deps of this file */ - unsigned int updated:1; /* Nonzero if this file has been remade. */ - unsigned int is_target:1; /* Nonzero if file is described as target. */ - unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */ - unsigned int phony:1; /* Nonzero if this is a phony file - i.e., a dependency of .PHONY. */ - unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */ - unsigned int dontcare:1; /* Nonzero if no complaint is to be made if - this target cannot be remade. */ - }; - -/* Number of intermediate files entered. */ - -extern unsigned int num_intermediates; - -extern struct file *default_goal_file, *suffix_file, *default_file; - - -extern struct file *lookup_file (), *enter_file (); -extern void remove_intermediates (), snap_deps (); -extern void rename_file (), file_hash_enter (); -extern void set_command_state (); - - -extern time_t f_mtime (); -#define file_mtime_1(f, v) \ - ((f)->last_mtime != (time_t) 0 ? (f)->last_mtime : f_mtime ((f), v)) -#define file_mtime(f) file_mtime_1 ((f), 1) -#define file_mtime_no_search(f) file_mtime_1 ((f), 0) - -/* Modtime value to use for `infinitely new'. We used to get the current time - from the system and use that whenever we wanted `new'. But that causes - trouble when the machine running make and the machine holding a file have - different ideas about what time it is; and can also lose for `force' - targets, which need to be considered newer than anything that depends on - them, even if said dependents' modtimes are in the future. - - NOTE: This assumes 32-bit `time_t's, but I cannot think of a portable way - to produce the largest representable integer of a given signed type. */ -#define NEW_MTIME ((time_t) 0x7fffffff) - - -#define check_renamed(file) \ - while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */ diff --git a/buildtools/windows/source/make/function.c b/buildtools/windows/source/make/function.c deleted file mode 100644 index 428d447008c..00000000000 --- a/buildtools/windows/source/make/function.c +++ /dev/null @@ -1,1329 +0,0 @@ -/* Variable function expansion for GNU Make. -Copyright (C) 1988, 89, 91, 92, 93, 94, 95 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "variable.h" -#include "dep.h" -#include "commands.h" -#include "job.h" - -#if defined(__MSDOS__) || defined(NETSCAPE) -#include -#include -#include -#include -#endif - -static char *string_glob (); - -/* Store into VARIABLE_BUFFER at O the result of scanning TEXT and replacing - each occurrence of SUBST with REPLACE. TEXT is null-terminated. SLEN is - the length of SUBST and RLEN is the length of REPLACE. If BY_WORD is - nonzero, substitutions are done only on matches which are complete - whitespace-delimited words. If SUFFIX_ONLY is nonzero, substitutions are - done only at the ends of whitespace-delimited words. */ - -char * -subst_expand (o, text, subst, replace, slen, rlen, by_word, suffix_only) - char *o; - char *text; - char *subst, *replace; - unsigned int slen, rlen; - int by_word, suffix_only; -{ - register char *t = text; - register char *p; - - if (slen == 0 && !by_word && !suffix_only) - { - /* The first occurrence of "" in any string is its end. */ - o = variable_buffer_output (o, t, strlen (t)); - if (rlen > 0) - o = variable_buffer_output (o, replace, rlen); - return o; - } - - do - { - if ((by_word | suffix_only) && slen == 0) - /* When matching by words, the empty string should match - the end of each word, rather than the end of the whole text. */ - p = end_of_token (next_token (t)); - else - { - p = sindex (t, 0, subst, slen); - if (p == 0) - { - /* No more matches. Output everything left on the end. */ - o = variable_buffer_output (o, t, strlen (t)); - return o; - } - } - - /* Output everything before this occurrence of the string to replace. */ - if (p > t) - o = variable_buffer_output (o, t, p - t); - - /* If we're substituting only by fully matched words, - or only at the ends of words, check that this case qualifies. */ - if ((by_word - && ((p > t && !isblank (p[-1])) - || (p[slen] != '\0' && !isblank (p[slen])))) - || (suffix_only - && (p[slen] != '\0' && !isblank (p[slen])))) - /* Struck out. Output the rest of the string that is - no longer to be replaced. */ - o = variable_buffer_output (o, subst, slen); - else if (rlen > 0) - /* Output the replacement string. */ - o = variable_buffer_output (o, replace, rlen); - - /* Advance T past the string to be replaced. */ - t = p + slen; - } while (*t != '\0'); - - return o; -} - - -/* Store into VARIABLE_BUFFER at O the result of scanning TEXT - and replacing strings matching PATTERN with REPLACE. - If PATTERN_PERCENT is not nil, PATTERN has already been - run through find_percent, and PATTERN_PERCENT is the result. - If REPLACE_PERCENT is not nil, REPLACE has already been - run through find_percent, and REPLACE_PERCENT is the result. */ - -char * -patsubst_expand (o, text, pattern, replace, pattern_percent, replace_percent) - char *o; - char *text; - register char *pattern, *replace; - register char *pattern_percent, *replace_percent; -{ - register int pattern_prepercent_len, pattern_postpercent_len; - register int replace_prepercent_len, replace_postpercent_len; - register char *t; - unsigned int len; - int doneany = 0; - - /* We call find_percent on REPLACE before checking PATTERN so that REPLACE - will be collapsed before we call subst_expand if PATTERN has no %. */ - if (replace_percent == 0) - replace_percent = find_percent (replace); - if (replace_percent != 0) - { - /* Record the length of REPLACE before and after the % so - we don't have to compute these lengths more than once. */ - replace_prepercent_len = replace_percent - replace; - replace_postpercent_len = strlen (replace_percent + 1); - } - else - /* We store the length of the replacement - so we only need to compute it once. */ - replace_prepercent_len = strlen (replace); - - if (pattern_percent == 0) - pattern_percent = find_percent (pattern); - if (pattern_percent == 0) - /* With no % in the pattern, this is just a simple substitution. */ - return subst_expand (o, text, pattern, replace, - strlen (pattern), strlen (replace), 1, 0); - - /* Record the length of PATTERN before and after the % - so we don't have to compute it more than once. */ - pattern_prepercent_len = pattern_percent - pattern; - pattern_postpercent_len = strlen (pattern_percent + 1); - - while ((t = find_next_token (&text, &len)) != 0) - { - int fail = 0; - - /* Is it big enough to match? */ - if ((int)len < pattern_prepercent_len + pattern_postpercent_len) - fail = 1; - - /* Does the prefix match? */ - if (!fail && pattern_prepercent_len > 0 - && (*t != *pattern - || t[pattern_prepercent_len - 1] != pattern_percent[-1] - || strncmp (t + 1, pattern + 1, pattern_prepercent_len - 1))) - fail = 1; - - /* Does the suffix match? */ - if (!fail && pattern_postpercent_len > 0 - && (t[len - 1] != pattern_percent[pattern_postpercent_len] - || t[len - pattern_postpercent_len] != pattern_percent[1] - || strncmp (&t[len - pattern_postpercent_len], - &pattern_percent[1], pattern_postpercent_len - 1))) - fail = 1; - - if (fail) - /* It didn't match. Output the string. */ - o = variable_buffer_output (o, t, len); - else - { - /* It matched. Output the replacement. */ - - /* Output the part of the replacement before the %. */ - o = variable_buffer_output (o, replace, replace_prepercent_len); - - if (replace_percent != 0) - { - /* Output the part of the matched string that - matched the % in the pattern. */ - o = variable_buffer_output (o, t + pattern_prepercent_len, - len - (pattern_prepercent_len - + pattern_postpercent_len)); - /* Output the part of the replacement after the %. */ - o = variable_buffer_output (o, replace_percent + 1, - replace_postpercent_len); - } - } - - /* Output a space, but not if the replacement is "". */ - if (fail || replace_prepercent_len > 0 - || (replace_percent != 0 && len + replace_postpercent_len > 0)) - { - o = variable_buffer_output (o, " ", 1); - doneany = 1; - } - } - if (doneany) - /* Kill the last space. */ - --o; - - return o; -} - -/* Handle variable-expansion-time functions such as $(dir foo/bar) ==> foo/ */ - -/* These enumeration constants distinguish the - various expansion-time built-in functions. */ - -enum function - { - function_subst, - function_addsuffix, - function_addprefix, - function_dir, - function_notdir, - function_suffix, - function_basename, - function_wildcard, - function_firstword, - function_word, - function_words, - function_findstring, - function_strip, - function_join, - function_patsubst, - function_filter, - function_filter_out, - function_foreach, - function_sort, - function_origin, - function_shell, - function_invalid - }; - -/* Greater than the length of any function name. */ -#define MAXFUNCTIONLEN 11 - -/* The function names and lengths of names, for looking them up. */ - -static struct - { - char *name; - unsigned int len; - enum function function; - } function_table[] = - { - { "subst", 5, function_subst }, - { "addsuffix", 9, function_addsuffix }, - { "addprefix", 9, function_addprefix }, - { "dir", 3, function_dir }, - { "notdir", 6, function_notdir }, - { "suffix", 6, function_suffix }, - { "basename", 8, function_basename }, - { "wildcard", 8, function_wildcard }, - { "firstword", 9, function_firstword }, - { "word", 4, function_word }, - { "words", 5, function_words }, - { "findstring", 10, function_findstring }, - { "strip", 5, function_strip }, - { "join", 4, function_join }, - { "patsubst", 8, function_patsubst }, - { "filter", 6, function_filter }, - { "filter-out", 10, function_filter_out }, - { "foreach", 7, function_foreach }, - { "sort", 4, function_sort }, - { "origin", 6, function_origin }, - { "shell", 5, function_shell }, - { 0, 0, function_invalid } - }; - -/* Return 1 if PATTERN matches WORD, 0 if not. */ - -int -pattern_matches (pattern, percent, word) - register char *pattern, *percent, *word; -{ - unsigned int sfxlen, wordlen; - - if (percent == 0) - { - unsigned int len = strlen (pattern) + 1; - char *new = (char *) alloca (len); - bcopy (pattern, new, len); - pattern = new; - percent = find_percent (pattern); - if (percent == 0) - return streq (pattern, word); - } - - sfxlen = strlen (percent + 1); - wordlen = strlen (word); - - if (wordlen < (percent - pattern) + sfxlen - || strncmp (pattern, word, percent - pattern)) - return 0; - - return !strcmp (percent + 1, word + (wordlen - sfxlen)); -} - -int shell_function_pid = 0, shell_function_completed; - -/* Perform the function specified by FUNCTION on the text at TEXT. - END is points to the end of the argument text (exclusive). - The output is written into VARIABLE_BUFFER starting at O. */ - -/* Note this absorbs a semicolon and is safe to use in conditionals. */ -#define BADARGS(func) \ - if (reading_filename != 0) \ - makefile_fatal (reading_filename, *reading_lineno_ptr, \ - "insufficient arguments to function `%s'", \ - func); \ - else \ - fatal ("insufficient arguments to function `%s'", func) - -static char * -expand_function (o, function, text, end) - char *o; - enum function function; - char *text; - char *end; -{ - char *p, *p2, *p3; - unsigned int i, len; - int doneany = 0; - int count; - char endparen = *end, startparen = *end == ')' ? '(' : '{'; - - switch (function) - { - default: - abort (); - break; - - case function_shell: - { - char **argv, **envp; - char *error_prefix; -// int pipedes[2]; -// int pid; - - /* Expand the command line. */ - text = expand_argument (text, end); - - /* Construct the argument list. */ - argv = construct_command_argv (text, (char *) NULL, (struct file *) 0); - if (argv == 0) - break; - - /* Using a target environment for `shell' loses in cases like: - export var = $(shell echo foobie) - because target_environment hits a loop trying to expand $(var) - to put it in the environment. This is even more confusing when - var was not explicitly exported, but just appeared in the - calling environment. */ -#if 1 - envp = environ; -#else - /* Construct the environment. */ - envp = target_environment ((struct file *) 0); -#endif - - /* For error messages. */ - if (reading_filename != 0) - { - error_prefix = (char *) alloca (strlen (reading_filename) + 100); - sprintf (error_prefix, - "%s:%u: ", reading_filename, *reading_lineno_ptr); - } - else - error_prefix = ""; - -#if !defined(__MSDOS__) && !defined(NETSCAPE) - if (pipe (pipedes) < 0) - { - perror_with_name (error_prefix, "pipe"); - break; - } - - pid = vfork (); - if (pid < 0) - perror_with_name (error_prefix, "fork"); - else if (pid == 0) - child_execute_job (0, pipedes[1], argv, envp); - else - { - /* We are the parent. */ - - char *buffer; - unsigned int maxlen; - int cc; - - /* Free the storage only the child needed. */ - free (argv[0]); - free ((char *) argv); -#if 0 - for (i = 0; envp[i] != 0; ++i) - free (envp[i]); - free ((char *) envp); -#endif - - /* Record the PID for reap_children. */ - shell_function_pid = pid; - shell_function_completed = 0; - - - /* Set up and read from the pipe. */ - - maxlen = 200; - buffer = (char *) xmalloc (maxlen + 1); - - /* Close the write side of the pipe. */ - (void) close (pipedes[1]); - - /* Read from the pipe until it gets EOF. */ - i = 0; - do - { - if (i == maxlen) - { - maxlen += 512; - buffer = (char *) xrealloc (buffer, maxlen + 1); - } - - errno = 0; - cc = read (pipedes[0], &buffer[i], maxlen - i); - if (cc > 0) - i += cc; - } -#ifdef EINTR - while (cc > 0 || errno == EINTR); -#else - while (cc > 0); -#endif - - /* Close the read side of the pipe. */ - (void) close (pipedes[0]); - - /* Loop until child_handler sets shell_function_completed - to the status of our child shell. */ - while (shell_function_completed == 0) - reap_children (1, 0); - - shell_function_pid = 0; - - /* The child_handler function will set shell_function_completed - to 1 when the child dies normally, or to -1 if it - dies with status 127, which is most likely an exec fail. */ - - if (shell_function_completed == -1) - { - /* This most likely means that the execvp failed, - so we should just write out the error message - that came in over the pipe from the child. */ - fputs (buffer, stderr); - fflush (stderr); - } - else - { - /* The child finished normally. Replace all - newlines in its output with spaces, and put - that in the variable output buffer. */ - if (i > 0) - { - if (buffer[i - 1] == '\n') - buffer[--i] = '\0'; - else - buffer[i] = '\0'; - p = buffer; - while ((p = index (p, '\n')) != 0) - *p++ = ' '; - o = variable_buffer_output (o, buffer, i); - } - } - - free (buffer); - } -#else /* MSDOS. */ - { - /* MS-DOS can't do fork, but it can do spawn. However, this - means that we don't have an opportunity to reopen stdout to - trap it. Thus, we save our own stdout onto a new descriptor - and dup a temp file's descriptor onto our stdout temporarily. - After we spawn the shell program, we dup our own stdout back - to the stdout descriptor. The buffer reading is the same as - above, except that we're now reading from a file. */ - - int save_stdout; - int child_stdout; - char tmp_output[FILENAME_MAX]; -// FILE *child_stream; - unsigned int maxlen = 200; - int cc; - char *buffer; - - strcpy (tmp_output, "shXXXXXX"); - mktemp (tmp_output); - child_stdout = open (tmp_output, - O_WRONLY|O_CREAT|O_TRUNC|O_TEXT, 0644); - save_stdout = dup (1); - dup2 (child_stdout, 1); -#ifdef NETSCAPE - if (ns_spawn (argv, NULL, NULL) == -1) - { - char errMsg[128]; - FormatMessage ( - FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - GetLastError (), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - errMsg, - sizeof (errMsg), - NULL - ); - error ("%s%s: %s", error_prefix, argv[0], errMsg); - } -#else - spawnvp (P_WAIT, argv[0], argv); -#endif - dup2 (save_stdout, 1); - close (child_stdout); - close (save_stdout); - - child_stdout = open (tmp_output, O_RDONLY|O_TEXT, 0644); - - buffer = xmalloc (maxlen); - i = 0; - do - { - if (i == maxlen) - { - maxlen += 512; - buffer = (char *) xrealloc (buffer, maxlen + 1); - } - - cc = read (child_stdout, &buffer[i], maxlen - i); - if (cc > 0) - i += cc; - } while (cc > 0); - - close (child_stdout); - unlink (tmp_output); - - if (i > 0) - { - if (buffer[i - 1] == '\n') - buffer[--i] = '\0'; - else - buffer[i] = '\0'; - p = buffer; - while ((p = index (p, '\n')) != 0) - *p++ = ' '; - o = variable_buffer_output (o, buffer, i); - } - free (buffer); - } -#endif /* Not MSDOS. */ - - free (text); - break; - } - - case function_origin: - /* Expand the argument. */ - text = expand_argument (text, end); - - { - register struct variable *v = lookup_variable (text, strlen (text)); - if (v == 0) - o = variable_buffer_output (o, "undefined", 9); - else - switch (v->origin) - { - default: - case o_invalid: - abort (); - break; - case o_default: - o = variable_buffer_output (o, "default", 7); - break; - case o_env: - o = variable_buffer_output (o, "environment", 11); - break; - case o_file: - o = variable_buffer_output (o, "file", 4); - break; - case o_env_override: - o = variable_buffer_output (o, "environment override", 20); - break; - case o_command: - o = variable_buffer_output (o, "command line", 12); - break; - case o_override: - o = variable_buffer_output (o, "override", 8); - break; - case o_automatic: - o = variable_buffer_output (o, "automatic", 9); - break; - } - } - - free (text); - break; - - case function_sort: - /* Expand the argument. */ - text = expand_argument (text, end); - - { - char **words = (char **) xmalloc (10 * sizeof (char *)); - unsigned int nwords = 10; - register unsigned int wordi = 0; - char *t; - - /* Chop TEXT into words and put them in WORDS. */ - t = text; - while ((p = find_next_token (&t, &len)) != 0) - { - if (wordi >= nwords - 1) - { - nwords *= 2; - words = (char **) xrealloc ((char *) words, - nwords * sizeof (char *)); - } - words[wordi++] = savestring (p, len); - } - - if (wordi > 0) - { - /* Now sort the list of words. */ - qsort ((char *) words, wordi, sizeof (char *), alpha_compare); - - /* Now write the sorted list. */ - for (i = 0; i < wordi; ++i) - { - len = strlen (words[i]); - if (i == wordi - 1 || strlen (words[i + 1]) != len - || strcmp (words[i], words[i + 1])) - { - o = variable_buffer_output (o, words[i], len); - o = variable_buffer_output (o, " ", 1); - } - free (words[i]); - } - /* Kill the last space. */ - --o; - } - - free ((char *) words); - } - - free (text); - break; - - case function_foreach: - { - /* Get three comma-separated arguments but - expand only the first two. */ - char *var, *list; - register struct variable *v; - - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("foreach"); - var = expand_argument (text, p); - - p2 = p + 1; - count = 0; - for (p = p2; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("foreach"); - list = expand_argument (p2, p); - - ++p; - text = savestring (p, end - p); - - push_new_variable_scope (); - v = define_variable (var, strlen (var), "", o_automatic, 0); - p3 = list; - while ((p = find_next_token (&p3, &len)) != 0) - { - char *result; - char save = p[len]; - p[len] = '\0'; - v->value = p; - result = allocated_variable_expand (text); - p[len] = save; - - o = variable_buffer_output (o, result, strlen (result)); - o = variable_buffer_output (o, " ", 1); - doneany = 1; - free (result); - } - if (doneany) - /* Kill the last space. */ - --o; - - pop_variable_scope (); - - free (var); - free (list); - free (text); - } - break; - - case function_filter: - case function_filter_out: - { - struct word - { - struct word *next; - char *word; - int matched; - } *words, *wordtail, *wp; - - /* Get two comma-separated arguments and expand each one. */ - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS (function == function_filter ? "filter" : "filter-out"); - p2 = expand_argument (text, p); - - text = expand_argument (p + 1, end); - - /* Chop TEXT up into words and then run each pattern through. */ - words = wordtail = 0; - p3 = text; - while ((p = find_next_token (&p3, &len)) != 0) - { - struct word *w = (struct word *) alloca (sizeof (struct word)); - if (words == 0) - words = w; - else - wordtail->next = w; - wordtail = w; - - if (*p3 != '\0') - ++p3; - p[len] = '\0'; - w->word = p; - w->matched = 0; - } - - if (words != 0) - { - wordtail->next = 0; - - /* Run each pattern through the words, killing words. */ - p3 = p2; - while ((p = find_next_token (&p3, &len)) != 0) - { - char *percent; - char save = p[len]; - p[len] = '\0'; - - percent = find_percent (p); - for (wp = words; wp != 0; wp = wp->next) - wp->matched |= (percent == 0 ? streq (p, wp->word) - : pattern_matches (p, percent, wp->word)); - - p[len] = save; - } - - /* Output the words that matched (or didn't, for filter-out). */ - for (wp = words; wp != 0; wp = wp->next) - if (function == function_filter ? wp->matched : !wp->matched) - { - o = variable_buffer_output (o, wp->word, strlen (wp->word)); - o = variable_buffer_output (o, " ", 1); - doneany = 1; - } - if (doneany) - /* Kill the last space. */ - --o; - } - - free (p2); - free (text); - } - break; - - case function_patsubst: - /* Get three comma-separated arguments and expand each one. */ - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("patsubst"); - - p2 = p; - count = 0; - for (++p; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("patsubst"); - - text = expand_argument (text, p2); - p3 = expand_argument (p2 + 1, p); - p2 = expand_argument (p + 1, end); - - o = patsubst_expand (o, p2, text, p3, (char *) 0, (char *) 0); - - free (text); - free (p3); - free (p2); - break; - - case function_join: - /* Get two comma-separated arguments and expand each one. */ - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("join"); - text = expand_argument (text, p); - - p = expand_argument (p + 1, end); - - { - /* Write each word of the first argument directly followed - by the corresponding word of the second argument. - If the two arguments have a different number of words, - the excess words are just output separated by blanks. */ - register char *tp, *pp; - p2 = text; - p3 = p; - do - { - unsigned int tlen, plen; - - tp = find_next_token (&p2, &tlen); - if (tp != 0) - o = variable_buffer_output (o, tp, tlen); - - pp = find_next_token (&p3, &plen); - if (pp != 0) - o = variable_buffer_output (o, pp, plen); - - if (tp != 0 || pp != 0) - { - o = variable_buffer_output (o, " ", 1); - doneany = 1; - } - } - while (tp != 0 || pp != 0); - if (doneany) - /* Kill the last blank. */ - --o; - } - - free (text); - free (p); - break; - - case function_strip: - /* Expand the argument. */ - text = expand_argument (text, end); - - p2 = text; - while ((p = find_next_token (&p2, &i)) != 0) - { - o = variable_buffer_output (o, p, i); - o = variable_buffer_output (o, " ", 1); - doneany = 1; - } - if (doneany) - /* Kill the last space. */ - --o; - - free (text); - break; - - case function_wildcard: - text = expand_argument (text, end); - - p = string_glob (text); - o = variable_buffer_output (o, p, strlen (p)); - - free (text); - break; - - case function_subst: - /* Get three comma-separated arguments and expand each one. */ - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("subst"); - - p2 = p; - count = 0; - for (++p; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("subst"); - - text = expand_argument (text, p2); - p3 = expand_argument (p2 + 1, p); - p2 = expand_argument (p + 1, end); - - o = subst_expand (o, p2, text, p3, strlen (text), strlen (p3), 0, 0); - - free (text); - free (p3); - free (p2); - break; - - case function_firstword: - /* Expand the argument. */ - text = expand_argument (text, end); - - /* Find the first word in TEXT. */ - p2 = text; - p = find_next_token (&p2, &i); - if (p != 0) - o = variable_buffer_output (o, p, i); - - free (text); - break; - - case function_word: - /* Get two comma-separated arguments and expand each one. */ - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("word"); - text = expand_argument (text, p); - - p3 = expand_argument (p + 1, end); - - /* Check the first argument. */ - for (p2 = text; *p2 != '\0'; ++p2) - if (*p2 < '0' || *p2 > '9') - { - if (reading_filename != 0) - makefile_fatal (reading_filename, *reading_lineno_ptr, - "non-numeric first argument to `word' function"); - else - fatal ("non-numeric first argument to `word' function"); - } - - i = (unsigned int) atoi (text); - if (i == 0) - { - if (reading_filename != 0) - makefile_fatal (reading_filename, *reading_lineno_ptr, - "the `word' function takes a one-origin \ -index argument"); - else - fatal ("the `word' function takes a one-origin index argument"); - } - - p2 = p3; - while ((p = find_next_token (&p2, &len)) != 0) - if (--i == 0) - break; - if (i == 0) - o = variable_buffer_output (o, p, len); - - free (text); - free (p3); - break; - - case function_words: - /* Expand the argument. */ - text = expand_argument (text, end); - - i = 0; - p2 = text; - while (find_next_token (&p2, (unsigned int *) 0) != 0) - ++i; - - { - char buf[20]; - sprintf (buf, "%d", i); - o = variable_buffer_output (o, buf, strlen (buf)); - } - - free (text); - break; - - case function_findstring: - /* Get two comma-separated arguments and expand each one. */ - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS ("findstring"); - text = expand_argument (text, p); - - p = expand_argument (p + 1, end); - - /* Find the first occurrence of the first string in the second. */ - i = strlen (text); - if (sindex (p, 0, text, i) != 0) - o = variable_buffer_output (o, text, i); - - free (p); - free (text); - break; - - case function_addsuffix: - case function_addprefix: - /* Get two comma-separated arguments and expand each one. */ - count = 0; - for (p = text; p < end; ++p) - { - if (*p == startparen) - ++count; - else if (*p == endparen) - --count; - else if (*p == ',' && count <= 0) - break; - } - if (p == end) - BADARGS (function == function_addsuffix ? "addsuffix" : "addprefix"); - text = expand_argument (text, p); - i = strlen (text); - - p2 = expand_argument (p + 1, end); - - p3 = p2; - while ((p = find_next_token (&p3, &len)) != 0) - { - if (function == function_addprefix) - o = variable_buffer_output (o, text, i); - o = variable_buffer_output (o, p, len); - if (function == function_addsuffix) - o = variable_buffer_output (o, text, i); - o = variable_buffer_output (o, " ", 1); - doneany = 1; - } - if (doneany) - /* Kill last space. */ - --o; - - free (p2); - free (text); - break; - - case function_dir: - case function_basename: - /* Expand the argument. */ - text = expand_argument (text, end); - - p3 = text; - while ((p2 = find_next_token (&p3, &len)) != 0) - { - p = p2 + len; - while (p >= p2 && *p != (function == function_dir ? '/' : '.')) - --p; - if (p >= p2) - { - if (function == function_dir) - ++p; - o = variable_buffer_output (o, p2, p - p2); - } - else if (function == function_dir) - o = variable_buffer_output (o, "./", 2); - else - /* The entire name is the basename. */ - o = variable_buffer_output (o, p2, len); - - o = variable_buffer_output (o, " ", 1); - doneany = 1; - } - if (doneany) - /* Kill last space. */ - --o; - - free (text); - break; - - case function_notdir: - case function_suffix: - /* Expand the argument. */ - text = expand_argument (text, end); - - p3 = text; - while ((p2 = find_next_token (&p3, &len)) != 0) - { - p = p2 + len; - while (p >= p2 && *p != (function == function_notdir ? '/' : '.')) - --p; - if (p >= p2) - { - if (function == function_notdir) - ++p; - o = variable_buffer_output (o, p, len - (p - p2)); - } - else if (function == function_notdir) - o = variable_buffer_output (o, p2, len); - - if (function == function_notdir || p >= p2) - { - o = variable_buffer_output (o, " ", 1); - doneany = 1; - } - } - if (doneany) - /* Kill last space. */ - --o; - - free (text); - break; - } - - return o; -} - -/* Check for a function invocation in *STRINGP. *STRINGP points at the - opening ( or { and is not null-terminated. If a function invocation - is found, expand it into the buffer at *OP, updating *OP, incrementing - *STRINGP past the reference and returning nonzero. If not, return zero. */ - -int -handle_function (op, stringp) - char **op; - char **stringp; - -{ - register unsigned int code; - unsigned int maxlen; - char *beg = *stringp + 1; - char *endref; - - endref = lindex (beg, beg + MAXFUNCTIONLEN, '\0'); - maxlen = endref != 0 ? endref - beg : MAXFUNCTIONLEN; - - for (code = 0; function_table[code].name != 0; ++code) - { - if (maxlen < function_table[code].len) - continue; - endref = beg + function_table[code].len; - if (isblank (*endref) - && !strncmp (function_table[code].name, beg, - function_table[code].len)) - break; - } - if (function_table[code].name != 0) - { - /* We have found a call to an expansion-time function. - Find the end of the arguments, and do the function. */ - - char openparen = beg[-1], closeparen = openparen == '(' ? ')' : '}'; - int count = 0; - char *argbeg; - register char *p; - - /* Space after function name isn't part of the args. */ - p = next_token (endref); - argbeg = p; - - /* Count nested use of whichever kind of parens we use, - so that nested calls and variable refs work. */ - - for (; *p != '\0'; ++p) - { - if (*p == openparen) - ++count; - else if (*p == closeparen && --count < 0) - break; - } - - if (count >= 0) - { - static const char errmsg[] - = "unterminated call to function `%s': missing `%c'"; - if (reading_filename == 0) - fatal (errmsg, function_table[code].name, closeparen); - else - makefile_fatal (reading_filename, *reading_lineno_ptr, errmsg, - function_table[code].name, closeparen); - } - - /* We found the end; expand the function call. */ - - *op = expand_function (*op, function_table[code].function, argbeg, p); - *stringp = p; - return 1; - } - - return 0; -} - -/* Glob-expand LINE. The returned pointer is - only good until the next call to string_glob. */ - -static char * -string_glob (line) - char *line; -{ - static char *result = 0; - static unsigned int length; - register struct nameseq *chain; - register unsigned int idx; - - chain = multi_glob (parse_file_seq - (&line, '\0', sizeof (struct nameseq), - /* We do not want parse_file_seq to strip `./'s. - That would break examples like: - $(patsubst ./%.c,obj/%.o,$(wildcard ./*.c)). */ - 0), - sizeof (struct nameseq)); - - if (result == 0) - { - length = 100; - result = (char *) xmalloc (100); - } - - idx = 0; - while (chain != 0) - { - register char *name = chain->name; - unsigned int len = strlen (name); - - struct nameseq *next = chain->next; - free ((char *) chain); - chain = next; - - /* multi_glob will pass names without globbing metacharacters - through as is, but we want only files that actually exist. */ - if (file_exists_p (name)) - { - if (idx + len + 1 > length) - { - length += (len + 1) * 2; - result = (char *) xrealloc (result, length); - } - bcopy (name, &result[idx], len); - idx += len; - result[idx++] = ' '; - } - - free (name); - } - - /* Kill the last space and terminate the string. */ - if (idx == 0) - result[0] = '\0'; - else - result[idx - 1] = '\0'; - - return result; -} diff --git a/buildtools/windows/source/make/getloadavg.c b/buildtools/windows/source/make/getloadavg.c deleted file mode 100644 index 3d805ab52f0..00000000000 --- a/buildtools/windows/source/make/getloadavg.c +++ /dev/null @@ -1,938 +0,0 @@ -/* Get the system load averages. - Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Compile-time symbols that this file uses: - - FIXUP_KERNEL_SYMBOL_ADDR() Adjust address in returned struct nlist. - KERNEL_FILE Pathname of the kernel to nlist. - LDAV_CVT() Scale the load average from the kernel. - Returns a double. - LDAV_SYMBOL Name of kernel symbol giving load average. - LOAD_AVE_TYPE Type of the load average array in the kernel. - Must be defined unless one of - apollo, DGUX, NeXT, or UMAX is defined; - otherwise, no load average is available. - NLIST_STRUCT Include nlist.h, not a.out.h, and - the nlist n_name element is a pointer, - not an array. - NLIST_NAME_UNION struct nlist has an n_un member, not n_name. - LINUX_LDAV_FILE [__linux__]: File containing load averages. - - Specific system predefines this file uses, aside from setting - default values if not emacs: - - apollo - BSD Real BSD, not just BSD-like. - DGUX - eunice UNIX emulator under VMS. - hpux - NeXT - sgi - sequent Sequent Dynix 3.x.x (BSD) - _SEQUENT_ Sequent DYNIX/ptx 1.x.x (SYSV) - sony_news NEWS-OS (works at least for 4.1C) - UMAX - UMAX4_3 - VMS - __linux__ Linux: assumes /proc filesystem mounted. - Support from Michael K. Johnson. - __NetBSD__ NetBSD: assumes /kern filesystem mounted. - - In addition, to avoid nesting many #ifdefs, we internally set - LDAV_DONE to indicate that the load average has been computed. - - We also #define LDAV_PRIVILEGED if a program will require - special installation to be able to call getloadavg. */ - -/* This should always be first. */ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -/* Both the Emacs and non-Emacs sections want this. Some - configuration files' definitions for the LOAD_AVE_CVT macro (like - sparc.h's) use macros like FSCALE, defined here. */ -#ifdef unix -#include -#endif - - -/* Exclude all the code except the test program at the end - if the system has its own `getloadavg' function. - - The declaration of `errno' is needed by the test program - as well as the function itself, so it comes first. */ - -#include - -#ifndef errno -extern int errno; -#endif - -#ifndef HAVE_GETLOADAVG - - -/* The existing Emacs configuration files define a macro called - LOAD_AVE_CVT, which accepts a value of type LOAD_AVE_TYPE, and - returns the load average multiplied by 100. What we actually want - is a macro called LDAV_CVT, which returns the load average as an - unmultiplied double. - - For backwards compatibility, we'll define LDAV_CVT in terms of - LOAD_AVE_CVT, but future machine config files should just define - LDAV_CVT directly. */ - -#if !defined(LDAV_CVT) && defined(LOAD_AVE_CVT) -#define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) -#endif - -#if !defined (BSD) && defined (ultrix) -/* Ultrix behaves like BSD on Vaxen. */ -#define BSD -#endif - -#ifdef NeXT -/* NeXT in the 2.{0,1,2} releases defines BSD in , which - conflicts with the definition understood in this file, that this - really is BSD. */ -#undef BSD - -/* NeXT defines FSCALE in . However, we take FSCALE being - defined to mean that the nlist method should be used, which is not true. */ -#undef FSCALE -#endif - -/* Set values that are different from the defaults, which are - set a little farther down with #ifndef. */ - - -/* Some shorthands. */ - -#if defined (HPUX) && !defined (hpux) -#define hpux -#endif - -#if defined(hp300) && !defined(hpux) -#define MORE_BSD -#endif - -#if defined(ultrix) && defined(mips) -#define decstation -#endif - -#if defined(sun) && defined(SVR4) -#define SUNOS_5 -#endif - -#if defined (__osf__) && (defined (__alpha) || defined (__alpha__)) -#define OSF_ALPHA -#include -#endif - -#if defined (__osf__) && (defined (mips) || defined (__mips__)) -#define OSF_MIPS -#include -#endif - -/* UTek's /bin/cc on the 4300 has no architecture specific cpp define by - default, but _MACH_IND_SYS_TYPES is defined in . Combine - that with a couple of other things and we'll have a unique match. */ -#if !defined (tek4300) && defined (unix) && defined (m68k) && defined (mc68000) && defined (mc68020) && defined (_MACH_IND_SYS_TYPES) -#define tek4300 /* Define by emacs, but not by other users. */ -#endif - - -/* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */ -#ifndef LOAD_AVE_TYPE - -#ifdef MORE_BSD -#define LOAD_AVE_TYPE long -#endif - -#ifdef sun -#define LOAD_AVE_TYPE long -#endif - -#ifdef decstation -#define LOAD_AVE_TYPE long -#endif - -#ifdef _SEQUENT_ -#define LOAD_AVE_TYPE long -#endif - -#ifdef sgi -#define LOAD_AVE_TYPE long -#endif - -#ifdef SVR4 -#define LOAD_AVE_TYPE long -#endif - -#ifdef sony_news -#define LOAD_AVE_TYPE long -#endif - -#ifdef sequent -#define LOAD_AVE_TYPE long -#endif - -#ifdef OSF_ALPHA -#define LOAD_AVE_TYPE long -#endif - -#if defined (ardent) && defined (titan) -#define LOAD_AVE_TYPE long -#endif - -#ifdef tek4300 -#define LOAD_AVE_TYPE long -#endif - -#if defined(alliant) && defined(i860) /* Alliant FX/2800 */ -#define LOAD_AVE_TYPE long -#endif - -#ifdef _AIX -#define LOAD_AVE_TYPE long -#endif - -#endif /* No LOAD_AVE_TYPE. */ - -#ifdef OSF_ALPHA -/* defines an incorrect value for FSCALE on Alpha OSF/1, - according to ghazi@noc.rutgers.edu. */ -#undef FSCALE -#define FSCALE 1024.0 -#endif - -#if defined(alliant) && defined(i860) /* Alliant FX/2800 */ -/* defines an incorrect value for FSCALE on an - Alliant FX/2800 Concentrix 2.2, according to ghazi@noc.rutgers.edu. */ -#undef FSCALE -#define FSCALE 100.0 -#endif - - -#ifndef FSCALE - -/* SunOS and some others define FSCALE in sys/param.h. */ - -#ifdef MORE_BSD -#define FSCALE 2048.0 -#endif - -#if defined(MIPS) || defined(SVR4) || defined(decstation) -#define FSCALE 256 -#endif - -#if defined (sgi) || defined (sequent) -/* Sometimes both MIPS and sgi are defined, so FSCALE was just defined - above under #ifdef MIPS. But we want the sgi value. */ -#undef FSCALE -#define FSCALE 1000.0 -#endif - -#if defined (ardent) && defined (titan) -#define FSCALE 65536.0 -#endif - -#ifdef tek4300 -#define FSCALE 100.0 -#endif - -#ifdef _AIX -#define FSCALE 65536.0 -#endif - -#endif /* Not FSCALE. */ - -#if !defined (LDAV_CVT) && defined (FSCALE) -#define LDAV_CVT(n) (((double) (n)) / FSCALE) -#endif - -/* VAX C can't handle multi-line #ifs, or lines longer that 256 characters. */ -#ifndef NLIST_STRUCT - -#ifdef MORE_BSD -#define NLIST_STRUCT -#endif - -#ifdef sun -#define NLIST_STRUCT -#endif - -#ifdef decstation -#define NLIST_STRUCT -#endif - -#ifdef hpux -#define NLIST_STRUCT -#endif - -#if defined (_SEQUENT_) || defined (sequent) -#define NLIST_STRUCT -#endif - -#ifdef sgi -#define NLIST_STRUCT -#endif - -#ifdef SVR4 -#define NLIST_STRUCT -#endif - -#ifdef sony_news -#define NLIST_STRUCT -#endif - -#ifdef OSF_ALPHA -#define NLIST_STRUCT -#endif - -#if defined (ardent) && defined (titan) -#define NLIST_STRUCT -#endif - -#ifdef tek4300 -#define NLIST_STRUCT -#endif - -#ifdef butterfly -#define NLIST_STRUCT -#endif - -#if defined(alliant) && defined(i860) /* Alliant FX/2800 */ -#define NLIST_STRUCT -#endif - -#ifdef _AIX -#define NLIST_STRUCT -#endif - -#endif /* defined (NLIST_STRUCT) */ - - -#if defined(sgi) || (defined(mips) && !defined(BSD)) -#define FIXUP_KERNEL_SYMBOL_ADDR(nl) ((nl)[0].n_value &= ~(1 << 31)) -#endif - - -#if !defined (KERNEL_FILE) && defined (sequent) -#define KERNEL_FILE "/dynix" -#endif - -#if !defined (KERNEL_FILE) && defined (hpux) -#define KERNEL_FILE "/hp-ux" -#endif - -#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || defined(SVR4) || (defined (ardent) && defined (titan))) -#define KERNEL_FILE "/unix" -#endif - - -#if !defined (LDAV_SYMBOL) && defined (alliant) -#define LDAV_SYMBOL "_Loadavg" -#endif - -#if !defined(LDAV_SYMBOL) && ((defined(hpux) && !defined(hp9000s300)) || defined(_SEQUENT_) || defined(SVR4) || defined(ISC) || defined(sgi) || (defined (ardent) && defined (titan)) || defined (_AIX)) -#define LDAV_SYMBOL "avenrun" -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include - -/* LOAD_AVE_TYPE should only get defined if we're going to use the - nlist method. */ -#if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) -#define LOAD_AVE_TYPE double -#endif - -#ifdef LOAD_AVE_TYPE - -#ifndef VMS -#ifndef NLIST_STRUCT -#include -#else /* NLIST_STRUCT */ -#include -#endif /* NLIST_STRUCT */ - -#ifdef SUNOS_5 -#include -#include -#endif - -#ifndef KERNEL_FILE -#define KERNEL_FILE "/vmunix" -#endif /* KERNEL_FILE */ - -#ifndef LDAV_SYMBOL -#define LDAV_SYMBOL "_avenrun" -#endif /* LDAV_SYMBOL */ - -#else /* VMS */ - -#ifndef eunice -#include -#include -#else /* eunice */ -#include -#endif /* eunice */ -#endif /* VMS */ - -#ifndef LDAV_CVT -#define LDAV_CVT(n) ((double) (n)) -#endif /* !LDAV_CVT */ - -#endif /* LOAD_AVE_TYPE */ - -#ifdef NeXT -#ifdef HAVE_MACH_MACH_H -#include -#else -#include -#endif -#endif /* NeXT */ - -#ifdef sgi -#include -#endif /* sgi */ - -#ifdef UMAX -#include -#include -#include -#include -#include - -#ifdef UMAX_43 -#include -#include -#include -#include -#include -#else /* Not UMAX_43. */ -#include -#include -#include -#include -#include -#include -#endif /* Not UMAX_43. */ -#endif /* UMAX */ - -#ifdef DGUX -#include -#endif - -#if defined(HAVE_FCNTL_H) || defined(_POSIX_VERSION) -#include -#else -#include -#endif - -/* Avoid static vars inside a function since in HPUX they dump as pure. */ - -#ifdef NeXT -static processor_set_t default_set; -static int getloadavg_initialized; -#endif /* NeXT */ - -#ifdef UMAX -static unsigned int cpus = 0; -static unsigned int samples; -#endif /* UMAX */ - -#ifdef DGUX -static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */ -#endif /* DGUX */ - -#ifdef LOAD_AVE_TYPE -/* File descriptor open to /dev/kmem or VMS load ave driver. */ -static int channel; -/* Nonzero iff channel is valid. */ -static int getloadavg_initialized; -/* Offset in kmem to seek to read load average, or 0 means invalid. */ -static long offset; - -#if !defined(VMS) && !defined(sgi) -static struct nlist nl[2]; -#endif /* Not VMS or sgi */ - -#ifdef SUNOS_5 -static kvm_t *kd; -#endif /* SUNOS_5 */ - -#endif /* LOAD_AVE_TYPE */ - -/* Put the 1 minute, 5 minute and 15 minute load averages - into the first NELEM elements of LOADAVG. - Return the number written (never more than 3, but may be less than NELEM), - or -1 if an error occurred. */ - -int -getloadavg (loadavg, nelem) - double loadavg[]; - int nelem; -{ - int elem = 0; /* Return value. */ - -#ifdef NO_GET_LOAD_AVG -#define LDAV_DONE - /* Set errno to zero to indicate that there was no particular error; - this function just can't work at all on this system. */ - errno = 0; - elem = -1; -#endif - -#if !defined (LDAV_DONE) && defined (__linux__) -#define LDAV_DONE -#undef LOAD_AVE_TYPE - -#ifndef LINUX_LDAV_FILE -#define LINUX_LDAV_FILE "/proc/loadavg" -#endif - - char ldavgbuf[40]; - double load_ave[3]; - int fd, count; - - fd = open (LINUX_LDAV_FILE, O_RDONLY); - if (fd == -1) - return -1; - count = read (fd, ldavgbuf, 40); - (void) close (fd); - if (count <= 0) - return -1; - - count = sscanf (ldavgbuf, "%lf %lf %lf", - &load_ave[0], &load_ave[1], &load_ave[2]); - if (count < 1) - return -1; - - for (elem = 0; elem < nelem && elem < count; elem++) - loadavg[elem] = load_ave[elem]; - - return elem; - -#endif /* __linux__ */ - -#if !defined (LDAV_DONE) && defined (__NetBSD__) -#define LDAV_DONE -#undef LOAD_AVE_TYPE - -#ifndef NETBSD_LDAV_FILE -#define NETBSD_LDAV_FILE "/kern/loadavg" -#endif - - unsigned long int load_ave[3], scale; - int count; - FILE *fp; - - fp = fopen (NETBSD_LDAV_FILE, "r"); - if (fp == NULL) - return -1; - count = fscanf (fp, "%lu %lu %lu %lu\n", - &load_ave[0], &load_ave[1], &load_ave[2], - &scale); - (void) fclose (fp); - if (count != 4) - return -1; - - for (elem = 0; elem < nelem; elem++) - loadavg[elem] = (double) load_ave[elem] / (double) scale; - - return elem; - -#endif /* __NetBSD__ */ - -#if !defined (LDAV_DONE) && defined (NeXT) -#define LDAV_DONE - /* The NeXT code was adapted from iscreen 3.2. */ - - host_t host; - struct processor_set_basic_info info; - unsigned info_count; - - /* We only know how to get the 1-minute average for this system, - so even if the caller asks for more than 1, we only return 1. */ - - if (!getloadavg_initialized) - { - if (processor_set_default (host_self (), &default_set) == KERN_SUCCESS) - getloadavg_initialized = 1; - } - - if (getloadavg_initialized) - { - info_count = PROCESSOR_SET_BASIC_INFO_COUNT; - if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host, - (processor_set_info_t) &info, &info_count) - != KERN_SUCCESS) - getloadavg_initialized = 0; - else - { - if (nelem > 0) - loadavg[elem++] = (double) info.load_average / LOAD_SCALE; - } - } - - if (!getloadavg_initialized) - return -1; -#endif /* NeXT */ - -#if !defined (LDAV_DONE) && defined (UMAX) -#define LDAV_DONE -/* UMAX 4.2, which runs on the Encore Multimax multiprocessor, does not - have a /dev/kmem. Information about the workings of the running kernel - can be gathered with inq_stats system calls. - We only know how to get the 1-minute average for this system. */ - - struct proc_summary proc_sum_data; - struct stat_descr proc_info; - double load; - register unsigned int i, j; - - if (cpus == 0) - { - register unsigned int c, i; - struct cpu_config conf; - struct stat_descr desc; - - desc.sd_next = 0; - desc.sd_subsys = SUBSYS_CPU; - desc.sd_type = CPUTYPE_CONFIG; - desc.sd_addr = (char *) &conf; - desc.sd_size = sizeof conf; - - if (inq_stats (1, &desc)) - return -1; - - c = 0; - for (i = 0; i < conf.config_maxclass; ++i) - { - struct class_stats stats; - bzero ((char *) &stats, sizeof stats); - - desc.sd_type = CPUTYPE_CLASS; - desc.sd_objid = i; - desc.sd_addr = (char *) &stats; - desc.sd_size = sizeof stats; - - if (inq_stats (1, &desc)) - return -1; - - c += stats.class_numcpus; - } - cpus = c; - samples = cpus < 2 ? 3 : (2 * cpus / 3); - } - - proc_info.sd_next = 0; - proc_info.sd_subsys = SUBSYS_PROC; - proc_info.sd_type = PROCTYPE_SUMMARY; - proc_info.sd_addr = (char *) &proc_sum_data; - proc_info.sd_size = sizeof (struct proc_summary); - proc_info.sd_sizeused = 0; - - if (inq_stats (1, &proc_info) != 0) - return -1; - - load = proc_sum_data.ps_nrunnable; - j = 0; - for (i = samples - 1; i > 0; --i) - { - load += proc_sum_data.ps_nrun[j]; - if (j++ == PS_NRUNSIZE) - j = 0; - } - - if (nelem > 0) - loadavg[elem++] = load / samples / cpus; -#endif /* UMAX */ - -#if !defined (LDAV_DONE) && defined (DGUX) -#define LDAV_DONE - /* This call can return -1 for an error, but with good args - it's not supposed to fail. The first argument is for no - apparent reason of type `long int *'. */ - dg_sys_info ((long int *) &load_info, - DG_SYS_INFO_LOAD_INFO_TYPE, - DG_SYS_INFO_LOAD_VERSION_0); - - if (nelem > 0) - loadavg[elem++] = load_info.one_minute; - if (nelem > 1) - loadavg[elem++] = load_info.five_minute; - if (nelem > 2) - loadavg[elem++] = load_info.fifteen_minute; -#endif /* DGUX */ - -#if !defined (LDAV_DONE) && defined (apollo) -#define LDAV_DONE -/* Apollo code from lisch@mentorg.com (Ray Lischner). - - This system call is not documented. The load average is obtained as - three long integers, for the load average over the past minute, - five minutes, and fifteen minutes. Each value is a scaled integer, - with 16 bits of integer part and 16 bits of fraction part. - - I'm not sure which operating system first supported this system call, - but I know that SR10.2 supports it. */ - - extern void proc1_$get_loadav (); - unsigned long load_ave[3]; - - proc1_$get_loadav (load_ave); - - if (nelem > 0) - loadavg[elem++] = load_ave[0] / 65536.0; - if (nelem > 1) - loadavg[elem++] = load_ave[1] / 65536.0; - if (nelem > 2) - loadavg[elem++] = load_ave[2] / 65536.0; -#endif /* apollo */ - -#if !defined (LDAV_DONE) && defined (OSF_MIPS) -#define LDAV_DONE - - struct tbl_loadavg load_ave; - table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); - loadavg[elem++] - = (load_ave.tl_lscale == 0 - ? load_ave.tl_avenrun.d[0] - : (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale)); -#endif /* OSF_MIPS */ - -#if !defined (LDAV_DONE) && defined (OSF_ALPHA) -#define LDAV_DONE - - struct tbl_loadavg load_ave; - table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); - for (elem = 0; elem < nelem; elem++) - loadavg[elem] - = (load_ave.tl_lscale == 0 - ? load_ave.tl_avenrun.d[elem] - : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); -#endif /* OSF_ALPHA */ - -#if !defined (LDAV_DONE) && defined (VMS) - /* VMS specific code -- read from the Load Ave driver. */ - - LOAD_AVE_TYPE load_ave[3]; - static int getloadavg_initialized = 0; -#ifdef eunice - struct - { - int dsc$w_length; - char *dsc$a_pointer; - } descriptor; -#endif - - /* Ensure that there is a channel open to the load ave device. */ - if (!getloadavg_initialized) - { - /* Attempt to open the channel. */ -#ifdef eunice - descriptor.dsc$w_length = 18; - descriptor.dsc$a_pointer = "$$VMS_LOAD_AVERAGE"; -#else - $DESCRIPTOR (descriptor, "LAV0:"); -#endif - if (sys$assign (&descriptor, &channel, 0, 0) & 1) - getloadavg_initialized = 1; - } - - /* Read the load average vector. */ - if (getloadavg_initialized - && !(sys$qiow (0, channel, IO$_READVBLK, 0, 0, 0, - load_ave, 12, 0, 0, 0, 0) & 1)) - { - sys$dassgn (channel); - getloadavg_initialized = 0; - } - - if (!getloadavg_initialized) - return -1; -#endif /* VMS */ - -#if !defined (LDAV_DONE) && defined(LOAD_AVE_TYPE) && !defined(VMS) - - /* UNIX-specific code -- read the average from /dev/kmem. */ - -#define LDAV_PRIVILEGED /* This code requires special installation. */ - - LOAD_AVE_TYPE load_ave[3]; - - /* Get the address of LDAV_SYMBOL. */ - if (offset == 0) - { -#ifndef sgi -#ifndef NLIST_STRUCT - strcpy (nl[0].n_name, LDAV_SYMBOL); - strcpy (nl[1].n_name, ""); -#else /* NLIST_STRUCT */ -#ifdef NLIST_NAME_UNION - nl[0].n_un.n_name = LDAV_SYMBOL; - nl[1].n_un.n_name = 0; -#else /* not NLIST_NAME_UNION */ - nl[0].n_name = LDAV_SYMBOL; - nl[1].n_name = 0; -#endif /* not NLIST_NAME_UNION */ -#endif /* NLIST_STRUCT */ - -#ifndef SUNOS_5 - if ( -#ifndef _AIX - nlist (KERNEL_FILE, nl) -#else /* _AIX */ - knlist (nl, 1, sizeof (nl[0])) -#endif - >= 0) - /* Omit "&& nl[0].n_type != 0 " -- it breaks on Sun386i. */ - { -#ifdef FIXUP_KERNEL_SYMBOL_ADDR - FIXUP_KERNEL_SYMBOL_ADDR (nl); -#endif - offset = nl[0].n_value; - } -#endif /* !SUNOS_5 */ -#else /* sgi */ - int ldav_off; - - ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN); - if (ldav_off != -1) - offset = (long) ldav_off & 0x7fffffff; -#endif /* sgi */ - } - - /* Make sure we have /dev/kmem open. */ - if (!getloadavg_initialized) - { -#ifndef SUNOS_5 - channel = open ("/dev/kmem", 0); - if (channel >= 0) - getloadavg_initialized = 1; -#else /* SUNOS_5 */ - /* We pass 0 for the kernel, corefile, and swapfile names - to use the currently running kernel. */ - kd = kvm_open (0, 0, 0, O_RDONLY, 0); - if (kd != 0) - { - /* nlist the currently running kernel. */ - kvm_nlist (kd, nl); - offset = nl[0].n_value; - getloadavg_initialized = 1; - } -#endif /* SUNOS_5 */ - } - - /* If we can, get the load average values. */ - if (offset && getloadavg_initialized) - { - /* Try to read the load. */ -#ifndef SUNOS_5 - if (lseek (channel, offset, 0) == -1L - || read (channel, (char *) load_ave, sizeof (load_ave)) - != sizeof (load_ave)) - { - close (channel); - getloadavg_initialized = 0; - } -#else /* SUNOS_5 */ - if (kvm_read (kd, offset, (char *) load_ave, sizeof (load_ave)) - != sizeof (load_ave)) - { - kvm_close (kd); - getloadavg_initialized = 0; - } -#endif /* SUNOS_5 */ - } - - if (offset == 0 || !getloadavg_initialized) - return -1; -#endif /* LOAD_AVE_TYPE and not VMS */ - -#if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) /* Including VMS. */ - if (nelem > 0) - loadavg[elem++] = LDAV_CVT (load_ave[0]); - if (nelem > 1) - loadavg[elem++] = LDAV_CVT (load_ave[1]); - if (nelem > 2) - loadavg[elem++] = LDAV_CVT (load_ave[2]); - -#define LDAV_DONE -#endif /* !LDAV_DONE && LOAD_AVE_TYPE */ - -#ifdef LDAV_DONE - return elem; -#else - /* Set errno to zero to indicate that there was no particular error; - this function just can't work at all on this system. */ - errno = 0; - return -1; -#endif -} - -#endif /* ! HAVE_GETLOADAVG */ - -#ifdef TEST -void -main (argc, argv) - int argc; - char **argv; -{ - int naptime = 0; - - if (argc > 1) - naptime = atoi (argv[1]); - - while (1) - { - double avg[3]; - int loads; - - errno = 0; /* Don't be misled if it doesn't set errno. */ - loads = getloadavg (avg, 3); - if (loads == -1) - { - perror ("Error getting load average"); - exit (1); - } - if (loads > 0) - printf ("1-minute: %f ", avg[0]); - if (loads > 1) - printf ("5-minute: %f ", avg[1]); - if (loads > 2) - printf ("15-minute: %f ", avg[2]); - if (loads > 0) - putchar ('\n'); - - if (naptime == 0) - break; - sleep (naptime); - } - - exit (0); -} -#endif /* TEST */ diff --git a/buildtools/windows/source/make/getopt.c b/buildtools/windows/source/make/getopt.c deleted file mode 100644 index 077b02c8464..00000000000 --- a/buildtools/windows/source/make/getopt.c +++ /dev/null @@ -1,763 +0,0 @@ -/* Getopt for GNU. - NOTE: getopt is now part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu - before changing it! - - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* This tells Alpha OSF/1 not to define a getopt prototype in . - Ditto for AIX 3.2 and . */ -#ifndef _NO_PROTO -#define _NO_PROTO -#endif - -#ifdef HAVE_CONFIG_H -#include -#endif - -#if !defined (__STDC__) || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -#ifndef const -#define const -#endif -#endif - -#include -#include - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined (_LIBC) || !defined (__GNU_LIBRARY__) - - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -/* Don't include stdlib.h for non-GNU C libraries because some of them - contain conflicting prototypes for getopt. */ -#include -#endif /* GNU C library. */ - -/* This is for other GNU distributions with internationalized messages. - The GNU C Library itself does not yet support such messages. */ -#if HAVE_LIBINTL_H -# include -#else -# define gettext(msgid) (msgid) -#endif - -/* This version of `getopt' appears to the caller like standard Unix `getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As `getopt' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Setting the environment variable POSIXLY_CORRECT disables permutation. - Then the behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -#include "getopt.h" - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg = NULL; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* XXX 1003.2 says this must be 1 before any call. */ -int optind = 0; - -/* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - -static char *nextchar; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Describe how to deal with options that follow non-option ARGV-elements. - - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using `+' as the first character - of the list of option characters. - - PERMUTE is the default. We permute the contents of ARGV as we scan, - so that eventually all the non-options are at the end. This allows options - to be given in any order, even with programs that were not written to - expect this. - - RETURN_IN_ORDER is an option available to programs that were written - to expect options and other ARGV-elements in any order and that care about - the ordering of the two. We describe each non-option ARGV-element - as if it were the argument of an option with character code 1. - Using `-' as the first character of the list of option characters - selects this mode of operation. - - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return EOF with `optind' != ARGC. */ - -static enum -{ - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER -} ordering; - -/* Value of POSIXLY_CORRECT environment variable. */ -static char *posixly_correct; - -#ifdef __GNU_LIBRARY__ -/* We want to avoid inclusion of string.h with non-GNU libraries - because there are many ways it can cause trouble. - On some systems, it contains special magic macros that don't work - in GCC. */ -#include -#define my_index strchr -#else - -/* Avoid depending on library functions or files - whose names are inconsistent. */ - -char *getenv (); - -static char * -my_index (str, chr) - const char *str; - int chr; -{ - while (*str) - { - if (*str == chr) - return (char *) str; - str++; - } - return 0; -} - -/* If using GCC, we can safely declare strlen this way. - If not using GCC, it is ok not to declare it. */ -#ifdef __GNUC__ -/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. - That was relevant to code that was here before. */ -#if !defined (__STDC__) || !__STDC__ -/* gcc with -traditional declares the built-in strlen to return int, - and has done so at least since version 2.4.5. -- rms. */ -extern int strlen (const char *); -#endif /* not __STDC__ */ -#endif /* __GNUC__ */ - -#endif /* not __GNU_LIBRARY__ */ - -/* Handle permutation of arguments. */ - -/* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first of them; - `last_nonopt' is the index after the last of them. */ - -static int first_nonopt; -static int last_nonopt; - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - `first_nonopt' and `last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void -exchange (argv) - char **argv; -{ - int bottom = first_nonopt; - int middle = last_nonopt; - int top = optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - first_nonopt += (optind - last_nonopt); - last_nonopt = optind; -} - -/* Initialize the internal data when the first call is made. */ - -static const char * -_getopt_initialize (optstring) - const char *optstring; -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - first_nonopt = last_nonopt = optind = 1; - - nextchar = NULL; - - posixly_correct = getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - ordering = REQUIRE_ORDER; - ++optstring; - } - else if (posixly_correct != NULL) - ordering = REQUIRE_ORDER; - else - ordering = PERMUTE; - - return optstring; -} - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If `getopt' - is called repeatedly, it returns successively each of the option characters - from each of the option elements. - - If `getopt' finds another option character, it returns that character, - updating `optind' and `nextchar' so that the next call to `getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, `getopt' returns `EOF'. - Then `optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set `opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in `optarg'. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in `optarg', otherwise `optarg' is set to zero. - - If OPTSTRING starts with `-' or `+', it requests different methods of - handling the non-option ARGV-elements. - See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - - Long-named options begin with `--' instead of `-'. - Their names may be abbreviated as long as the abbreviation is unique - or is an exact match for some defined option. If they have an - argument, it follows the option name in the same ARGV-element, separated - from the option name by a `=', or else the in next ARGV-element. - When `getopt' finds a long-named option, it returns 0 if that option's - `flag' field is nonzero, the value of the option's `val' field - if the `flag' field is zero. - - The elements of ARGV aren't really const, because we permute them. - But we pretend they're const in the prototype to be compatible - with other systems. - - LONGOPTS is a vector of `struct option' terminated by an - element containing a name which is zero. - - LONGIND returns the index in LONGOPT of the long-named option found. - It is only valid when a long-named option has been found by the most - recent call. - - If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. */ - -int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; -{ - optarg = NULL; - - if (optind == 0) - { - optstring = _getopt_initialize (optstring); - optind = 1; /* Don't scan ARGV[0], the program name. */ - } - - if (nextchar == NULL || *nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - if (ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (last_nonopt != optind) - first_nonopt = optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (optind < argc - && (argv[optind][0] != '-' || argv[optind][1] == '\0')) - optind++; - last_nonopt = optind; - } - - /* The special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (optind != argc && !strcmp (argv[optind], "--")) - { - optind++; - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (first_nonopt == last_nonopt) - first_nonopt = optind; - last_nonopt = argc; - - optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (first_nonopt != last_nonopt) - optind = first_nonopt; - return EOF; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if ((argv[optind][0] != '-' || argv[optind][1] == '\0')) - { - if (ordering == REQUIRE_ORDER) - return EOF; - optarg = argv[optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - nextchar = (argv[optind] + 1 - + (longopts != NULL && argv[optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[optind][1] == '-' - || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound; - int option_index; - - for (nameend = nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) - { - if ((size_t)(nameend - nextchar) == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else - /* Second or later nonexact match found. */ - ambig = 1; - } - - if (ambig && !exact) - { - if (opterr) - fprintf (stderr, gettext ("%s: option `%s' is ambiguous\n"), - argv[0], argv[optind]); - nextchar += strlen (nextchar); - optind++; - return '?'; - } - - if (pfound != NULL) - { - option_index = indfound; - optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - optarg = nameend + 1; - else - { - if (opterr) - if (argv[optind - 1][1] == '-') - /* --option */ - fprintf (stderr, - gettext ("%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); - else - /* +option or -option */ - fprintf (stderr, - gettext ("%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); - - nextchar += strlen (nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (optind < argc) - optarg = argv[optind++]; - else - { - if (opterr) - fprintf (stderr, - gettext ("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); - nextchar += strlen (nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - nextchar += strlen (nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[optind][1] == '-' - || my_index (optstring, *nextchar) == NULL) - { - if (opterr) - { - if (argv[optind][1] == '-') - /* --option */ - fprintf (stderr, gettext ("%s: unrecognized option `--%s'\n"), - argv[0], nextchar); - else - /* +option or -option */ - fprintf (stderr, gettext ("%s: unrecognized option `%c%s'\n"), - argv[0], argv[optind][0], nextchar); - } - nextchar = (char *) ""; - optind++; - return '?'; - } - } - - /* Look at and handle the next short option-character. */ - - { - char c = *nextchar++; - char *temp = my_index (optstring, c); - - /* Increment `optind' when we start to process its last character. */ - if (*nextchar == '\0') - ++optind; - - if (temp == NULL || c == ':') - { - if (opterr) - { - if (posixly_correct) - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, gettext ("%s: illegal option -- %c\n"), - argv[0], c); - else - fprintf (stderr, gettext ("%s: invalid option -- %c\n"), - argv[0], c); - } - optopt = c; - return '?'; - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*nextchar != '\0') - { - optarg = nextchar; - optind++; - } - else - optarg = NULL; - nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*nextchar != '\0') - { - optarg = nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - optind++; - } - else if (optind == argc) - { - if (opterr) - { - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, - gettext ("%s: option requires an argument -- %c\n"), - argv[0], c); - } - optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; - nextchar = NULL; - } - } - return c; - } -} - -int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; -{ - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0); -} - -#endif /* _LIBC or not __GNU_LIBRARY__. */ - -#ifdef TEST - -/* Compile with -DTEST to make an executable for use in testing - the above definition of `getopt'. */ - -int -main (argc, argv) - int argc; - char **argv; -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == EOF) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/buildtools/windows/source/make/getopt.h b/buildtools/windows/source/make/getopt.h deleted file mode 100644 index 4ac33b71824..00000000000 --- a/buildtools/windows/source/make/getopt.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifndef _GETOPT_H -#define _GETOPT_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - -struct option -{ -#if defined (__STDC__) && __STDC__ - const char *name; -#else - char *name; -#endif - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; - -/* Names for the values of the `has_arg' field of `struct option'. */ - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ -/* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -extern int getopt (); -#endif /* __GNU_LIBRARY__ */ -extern int getopt_long (int argc, char *const *argv, const char *shortopts, - const struct option *longopts, int *longind); -extern int getopt_long_only (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind); - -/* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind, - int long_only); -#else /* not __STDC__ */ -extern int getopt (); -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -#endif /* __STDC__ */ - -#ifdef __cplusplus -} -#endif - -#endif /* _GETOPT_H */ diff --git a/buildtools/windows/source/make/getopt1.c b/buildtools/windows/source/make/getopt1.c deleted file mode 100644 index 4580211cfac..00000000000 --- a/buildtools/windows/source/make/getopt1.c +++ /dev/null @@ -1,180 +0,0 @@ -/* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "getopt.h" - -#if !defined (__STDC__) || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -#ifndef const -#define const -#endif -#endif - -#include - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined (_LIBC) || !defined (__GNU_LIBRARY__) - - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -#include -#else -char *getenv (); -#endif - -#ifndef NULL -#define NULL 0 -#endif - -int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; -{ - return _getopt_internal (argc, argv, options, long_options, opt_index, 0); -} - -/* Like getopt_long, but '-' as well as '--' can indicate a long option. - If an option that starts with '-' (not '--') doesn't match a long option, - but does match a short option, it is parsed as a short option - instead. */ - -int -getopt_long_only (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; -{ - return _getopt_internal (argc, argv, options, long_options, opt_index, 1); -} - - -#endif /* _LIBC or not __GNU_LIBRARY__. */ - -#ifdef TEST - -#include - -int -main (argc, argv) - int argc; - char **argv; -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static struct option long_options[] = - { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); - if (c == EOF) - break; - - switch (c) - { - case 0: - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case 'd': - printf ("option d with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/buildtools/windows/source/make/glob.c b/buildtools/windows/source/make/glob.c deleted file mode 100644 index c90a40672b9..00000000000 --- a/buildtools/windows/source/make/glob.c +++ /dev/null @@ -1,705 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* AIX requires this to be the first thing in the file. */ -#if defined (_AIX) && !defined (__GNUC__) - #pragma alloca -#endif - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef NETSCAPE -#include "windir.h" -#endif - -#include -#include -#include - - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined (_LIBC) || !defined (__GNU_LIBRARY__) - - -#ifdef STDC_HEADERS -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#ifndef POSIX -#ifdef _POSIX_VERSION -#define POSIX -#endif -#endif -#endif - -#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) -extern int errno; -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -#if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__) -#include -#ifndef __GNU_LIBRARY__ -#define D_NAMLEN(d) strlen((d)->d_name) -#else /* GNU C library. */ -#define D_NAMLEN(d) ((d)->d_namlen) -#endif /* Not GNU C library. */ -#else /* Not POSIX or HAVE_DIRENT_H. */ -#define direct dirent -#define D_NAMLEN(d) ((d)->d_namlen) -#ifdef HAVE_SYS_NDIR_H -#include -#endif /* HAVE_SYS_NDIR_H */ -#ifdef HAVE_SYS_DIR_H -#include -#endif /* HAVE_SYS_DIR_H */ -#ifdef HAVE_NDIR_H -#include -#endif /* HAVE_NDIR_H */ -#endif /* POSIX or HAVE_DIRENT_H or __GNU_LIBRARY__. */ - -#if defined(NETSCAPE) || defined (POSIX) && !defined (__GNU_LIBRARY__) -/* Posix does not require that the d_ino field be present, and some - systems do not provide it. */ -#define REAL_DIR_ENTRY(dp) 1 -#else -#define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) -#endif /* POSIX */ - -#if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)) -#include -#include -#define ANSI_STRING -#else /* No standard headers. */ - -#ifdef HAVE_STRING_H -#include -#define ANSI_STRING -#else -#include -#endif -#ifdef HAVE_MEMORY_H -#include -#endif - -extern char *malloc (), *realloc (); -extern void free (); - -extern void qsort (); -extern void abort (), exit (); - -#endif /* Standard headers. */ - -#ifndef ANSI_STRING - -#ifndef bzero -extern void bzero (); -#endif -#ifndef bcopy -extern void bcopy (); -#endif - -#define memcpy(d, s, n) bcopy ((s), (d), (n)) -#define strrchr rindex -/* memset is only used for zero here, but let's be paranoid. */ -#define memset(s, better_be_zero, n) \ - ((void) ((better_be_zero) == 0 ? (bzero((s), (n)), 0) : (abort(), 0))) -#endif /* Not ANSI_STRING. */ - -#ifndef HAVE_STRCOLL -#define strcoll strcmp -#endif - - -#if !defined(__GNU_LIBRARY__) && !defined(NETSCAPE) -#ifdef __GNUC__ -__inline -#endif -static char * -my_realloc (p, n) - char *p; - unsigned int n; -{ - /* These casts are the for sake of the broken Ultrix compiler, - which warns of illegal pointer combinations otherwise. */ - if (p == NULL) - return (char *) malloc (n); - return (char *) realloc (p, n); -} -#define realloc my_realloc -#endif - - -#if !defined(__alloca) && !defined(__GNU_LIBRARY__) - -#ifdef __GNUC__ -#undef alloca -#define alloca(n) __builtin_alloca (n) -#else /* Not GCC. */ -#if defined (sparc) || defined (HAVE_ALLOCA_H) -#include -#elif defined(NETSCAPE) -#include -#else /* Not sparc or HAVE_ALLOCA_H. */ -#ifndef _AIX -extern char *alloca (); -#endif /* Not _AIX. */ -#endif /* sparc or HAVE_ALLOCA_H. */ -#endif /* GCC. */ - -#define __alloca alloca - -#endif - -#ifndef __GNU_LIBRARY__ -#define __lstat lstat -#ifndef HAVE_LSTAT -#define lstat stat -#endif -#ifdef STAT_MACROS_BROKEN -#undef S_ISDIR -#endif -#ifndef S_ISDIR -#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) -#endif -#endif - -#ifndef STDC_HEADERS -#undef size_t -#define size_t unsigned int -#endif - -/* Some system header files erroneously define these. - We want our own definitions from to take precedence. */ -#undef FNM_PATHNAME -#undef FNM_NOESCAPE -#undef FNM_PERIOD -#include - -/* Some system header files erroneously define these. - We want our own definitions from to take precedence. */ -#undef GLOB_ERR -#undef GLOB_MARK -#undef GLOB_NOSORT -#undef GLOB_DOOFFS -#undef GLOB_NOCHECK -#undef GLOB_APPEND -#undef GLOB_NOESCAPE -#undef GLOB_PERIOD -#include - -__ptr_t (*__glob_opendir_hook) __P ((const char *directory)); -const char *(*__glob_readdir_hook) __P ((__ptr_t stream)); -void (*__glob_closedir_hook) __P ((__ptr_t stream)); - -static int glob_pattern_p __P ((const char *pattern, int quote)); -static int glob_in_dir __P ((const char *pattern, const char *directory, - int flags, - int (*errfunc) __P ((const char *, int)), - glob_t *pglob)); -static int prefix_array __P ((const char *prefix, char **array, size_t n)); -int collated_compare __P ((const void *elem1, const void *elem2)); - -/* Do glob searching for PATTERN, placing results in PGLOB. - The bits defined above may be set in FLAGS. - If a directory cannot be opened or read and ERRFUNC is not nil, - it is called with the pathname that caused the error, and the - `errno' value from the failing call; if it returns non-zero - `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. - If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. - Otherwise, `glob' returns zero. */ -int -glob (pattern, flags, errfunc, pglob) - const char *pattern; - int flags; - int (*errfunc) __P ((const char *, int)); - glob_t *pglob; -{ - const char *filename; - char *dirname; - size_t dirlen; - int status; - int oldcount; - - if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) - { - errno = EINVAL; - return -1; - } - - /* Find the filename. */ - filename = strrchr (pattern, '/'); - if (filename == NULL) - { - filename = pattern; - dirname = (char *) "."; - dirlen = 0; - } - else if (filename == pattern) - { - /* "/pattern". */ - dirname = (char *) "/"; - dirlen = 1; - ++filename; - } - else - { - dirlen = filename - pattern; - dirname = (char *) __alloca (dirlen + 1); - memcpy (dirname, pattern, dirlen); - dirname[dirlen] = '\0'; - ++filename; - } - - if (filename[0] == '\0' && dirlen > 1) - /* "pattern/". Expand "pattern", appending slashes. */ - { - int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob); - if (val == 0) - pglob->gl_flags = (pglob->gl_flags & ~GLOB_MARK) | (flags & GLOB_MARK); - return val; - } - - if (!(flags & GLOB_APPEND)) - { - pglob->gl_pathc = 0; - pglob->gl_pathv = NULL; - } - - oldcount = pglob->gl_pathc; - - if (glob_pattern_p (dirname, !(flags & GLOB_NOESCAPE))) - { - /* The directory name contains metacharacters, so we - have to glob for the directory, and then glob for - the pattern in each directory found. */ - glob_t dirs; - register int i; - - status = glob (dirname, - ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE)) | - GLOB_NOSORT), - errfunc, &dirs); - if (status != 0) - return status; - - /* We have successfully globbed the preceding directory name. - For each name we found, call glob_in_dir on it and FILENAME, - appending the results to PGLOB. */ - for (i = 0; i < dirs.gl_pathc; ++i) - { - int oldcount; - -#ifdef SHELL - { - /* Make globbing interruptible in the bash shell. */ - extern int interrupt_state; - - if (interrupt_state) - { - globfree (&dirs); - globfree (&files); - return GLOB_ABEND; - } - } -#endif /* SHELL. */ - - oldcount = pglob->gl_pathc; - status = glob_in_dir (filename, dirs.gl_pathv[i], - (flags | GLOB_APPEND) & ~GLOB_NOCHECK, - errfunc, pglob); - if (status == GLOB_NOMATCH) - /* No matches in this directory. Try the next. */ - continue; - - if (status != 0) - { - globfree (&dirs); - globfree (pglob); - return status; - } - - /* Stick the directory on the front of each name. */ - if (prefix_array (dirs.gl_pathv[i], - &pglob->gl_pathv[oldcount], - pglob->gl_pathc - oldcount)) - { - globfree (&dirs); - globfree (pglob); - return GLOB_NOSPACE; - } - } - - flags |= GLOB_MAGCHAR; - - if (pglob->gl_pathc == oldcount) - /* No matches. */ - if (flags & GLOB_NOCHECK) - { - size_t len = strlen (pattern) + 1; - char *patcopy = (char *) malloc (len); - if (patcopy == NULL) - return GLOB_NOSPACE; - memcpy (patcopy, pattern, len); - - pglob->gl_pathv - = (char **) realloc (pglob->gl_pathv, - (pglob->gl_pathc + - ((flags & GLOB_DOOFFS) ? - pglob->gl_offs : 0) + - 1 + 1) * - sizeof (char *)); - if (pglob->gl_pathv == NULL) - { - free (patcopy); - return GLOB_NOSPACE; - } - - if (flags & GLOB_DOOFFS) - while (pglob->gl_pathc < pglob->gl_offs) - pglob->gl_pathv[pglob->gl_pathc++] = NULL; - - pglob->gl_pathv[pglob->gl_pathc++] = patcopy; - pglob->gl_pathv[pglob->gl_pathc] = NULL; - pglob->gl_flags = flags; - } - else - return GLOB_NOMATCH; - } - else - { - status = glob_in_dir (filename, dirname, flags, errfunc, pglob); - if (status != 0) - return status; - - if (dirlen > 0) - { - /* Stick the directory on the front of each name. */ - if (prefix_array (dirname, - &pglob->gl_pathv[oldcount], - pglob->gl_pathc - oldcount)) - { - globfree (pglob); - return GLOB_NOSPACE; - } - } - } - - if (flags & GLOB_MARK) - { - /* Append slashes to directory names. glob_in_dir has already - allocated the extra character for us. */ - int i; - struct stat st; - for (i = oldcount; i < pglob->gl_pathc; ++i) - if (__lstat (pglob->gl_pathv[i], &st) == 0 && - S_ISDIR (st.st_mode)) - strcat (pglob->gl_pathv[i], "/"); - } - - if (!(flags & GLOB_NOSORT)) - /* Sort the vector. */ -#if 0 - qsort ((__ptr_t) &pglob->gl_pathv[oldcount], - pglob->gl_pathc - oldcount, - sizeof (char *), collated_compare); -#else - qsort ( &pglob->gl_pathv[oldcount], - (size_t)(pglob->gl_pathc - oldcount), - sizeof (char *), collated_compare); -#endif - - return 0; -} - - -/* Free storage allocated in PGLOB by a previous `glob' call. */ -void -globfree (pglob) - register glob_t *pglob; -{ - if (pglob->gl_pathv != NULL) - { - register int i; - for (i = 0; i < pglob->gl_pathc; ++i) - if (pglob->gl_pathv[i] != NULL) - free ((__ptr_t) pglob->gl_pathv[i]); - free ((__ptr_t) pglob->gl_pathv); - } -} - - -/* Do a collated comparison of A and B. */ -int -collated_compare (const void *elem1, const void *elem2) -{ - const __ptr_t a = (const __ptr_t)elem1; - const __ptr_t b = (const __ptr_t)elem1; - const char *const s1 = *(const char *const * const) a; - const char *const s2 = *(const char *const * const) b; - - if (s1 == s2) - return 0; - if (s1 == NULL) - return 1; - if (s2 == NULL) - return -1; - return strcoll (s1, s2); -} - - -/* Prepend DIRNAME to each of N members of ARRAY, replacing ARRAY's - elements in place. Return nonzero if out of memory, zero if successful. - A slash is inserted between DIRNAME and each elt of ARRAY, - unless DIRNAME is just "/". Each old element of ARRAY is freed. */ -static int -prefix_array (dirname, array, n) - const char *dirname; - char **array; - size_t n; -{ - register size_t i; - size_t dirlen = strlen (dirname); - - if (dirlen == 1 && dirname[0] == '/') - /* DIRNAME is just "/", so normal prepending would get us "//foo". - We want "/foo" instead, so don't prepend any chars from DIRNAME. */ - dirlen = 0; - - for (i = 0; i < n; ++i) - { - size_t eltlen = strlen (array[i]) + 1; - char *new = (char *) malloc (dirlen + 1 + eltlen); - if (new == NULL) - { - while (i > 0) - free ((__ptr_t) array[--i]); - return 1; - } - - memcpy (new, dirname, dirlen); - new[dirlen] = '/'; - memcpy (&new[dirlen + 1], array[i], eltlen); - free ((__ptr_t) array[i]); - array[i] = new; - } - - return 0; -} - - -/* Return nonzero if PATTERN contains any metacharacters. - Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ -static int -glob_pattern_p (pattern, quote) - const char *pattern; - int quote; -{ - register const char *p; - int open = 0; - - for (p = pattern; *p != '\0'; ++p) - switch (*p) - { - case '?': - case '*': - return 1; - - case '\\': - if (quote) - ++p; - break; - - case '[': - open = 1; - break; - - case ']': - if (open) - return 1; - break; - } - - return 0; -} - - -/* Like `glob', but PATTERN is a final pathname component, - and matches are searched for in DIRECTORY. - The GLOB_NOSORT bit in FLAGS is ignored. No sorting is ever done. - The GLOB_APPEND flag is assumed to be set (always appends). */ -static int -glob_in_dir (pattern, directory, flags, errfunc, pglob) - const char *pattern; - const char *directory; - int flags; - int (*errfunc) __P ((const char *, int)); - glob_t *pglob; -{ - __ptr_t stream; - - struct globlink - { - struct globlink *next; - char *name; - }; - struct globlink *names = NULL; - size_t nfound = 0; - - if (!glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE))) - { - stream = NULL; - flags |= GLOB_NOCHECK; - } - else - { - flags |= GLOB_MAGCHAR; - - stream = (__glob_opendir_hook ? (*__glob_opendir_hook) (directory) - : (__ptr_t) opendir (directory)); - if (stream == NULL) - { - if ((errfunc != NULL && (*errfunc) (directory, errno)) || - (flags & GLOB_ERR)) - return GLOB_ABEND; - } - else - while (1) - { - const char *name; - size_t len; - - if (__glob_readdir_hook) - { - name = (*__glob_readdir_hook) (stream); - if (name == NULL) - break; - len = 0; - } - else - { - struct dirent *d = readdir ((DIR *) stream); - if (d == NULL) - break; - if (! REAL_DIR_ENTRY (d)) - continue; - name = d->d_name; -#ifdef HAVE_D_NAMLEN - len = d->d_namlen; -#else - len = 0; -#endif - } - - if (fnmatch (pattern, name, - (!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) | - ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)) == 0) - { - struct globlink *new - = (struct globlink *) __alloca (sizeof (struct globlink)); - if (len == 0) - len = strlen (name); - new->name - = (char *) malloc (len + ((flags & GLOB_MARK) ? 1 : 0) + 1); - if (new->name == NULL) - goto memory_error; - memcpy ((__ptr_t) new->name, name, len); - new->name[len] = '\0'; - new->next = names; - names = new; - ++nfound; - } - } - } - - if (nfound == 0 && (flags & GLOB_NOCHECK)) - { - size_t len = strlen (pattern); - nfound = 1; - names = (struct globlink *) __alloca (sizeof (struct globlink)); - names->next = NULL; - names->name = (char *) malloc (len + 1); - if (names->name == NULL) - goto memory_error; - memcpy (names->name, pattern, len); - names->name[len] = '\0'; - } - - pglob->gl_pathv - = (char **) realloc (pglob->gl_pathv, - (pglob->gl_pathc + - ((flags & GLOB_DOOFFS) ? pglob->gl_offs : 0) + - nfound + 1) * - sizeof (char *)); - if (pglob->gl_pathv == NULL) - goto memory_error; - - if (flags & GLOB_DOOFFS) - while (pglob->gl_pathc < pglob->gl_offs) - pglob->gl_pathv[pglob->gl_pathc++] = NULL; - - for (; names != NULL; names = names->next) - pglob->gl_pathv[pglob->gl_pathc++] = names->name; - pglob->gl_pathv[pglob->gl_pathc] = NULL; - - pglob->gl_flags = flags; - - if (stream != NULL) - { - int save = errno; - if (__glob_closedir_hook) - (*__glob_closedir_hook) (stream); - else - (void) closedir ((DIR *) stream); - errno = save; - } - return nfound == 0 ? GLOB_NOMATCH : 0; - - memory_error: - { - int save = errno; - if (__glob_closedir_hook) - (*__glob_closedir_hook) (stream); - else - (void) closedir ((DIR *) stream); - errno = save; - } - while (names != NULL) - { - if (names->name != NULL) - free ((__ptr_t) names->name); - names = names->next; - } - return GLOB_NOSPACE; -} - -#endif /* _LIBC or not __GNU_LIBRARY__. */ diff --git a/buildtools/windows/source/make/glob/COPYING.LIB b/buildtools/windows/source/make/glob/COPYING.LIB deleted file mode 100644 index eb685a5ec98..00000000000 --- a/buildtools/windows/source/make/glob/COPYING.LIB +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/buildtools/windows/source/make/glob/Makefile b/buildtools/windows/source/make/glob/Makefile deleted file mode 100644 index eb8ac56dd96..00000000000 --- a/buildtools/windows/source/make/glob/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# -# GNU Makefile for building gmake.exe on WIN32 -# This makefile compiles the files in the glob subdirectory. -# - -CSRCS = fnmatch.c glob.c - -OBJS = $(CSRCS:.c=.obj) - -CC = cl - -CFLAGS = $(CC_SWITCHES) $(INCLUDES) $(DEFINES) $(CC_OUTPUTS) - -CC_SWITCHES = -nologo -ML -W3 -O2 - -INCLUDES = -I. -I.. - -DEFINES = -DWIN32 -DNDEBUG -D_CONSOLE -DNETSCAPE -DHAVE_CONFIG_H - -CC_OUTPUTS = -Fpglob.pch -YX -c - -all: $(OBJS) - -%.obj: %.c - $(CC) $(CFLAGS) $< - -clean: - rm -rf $(OBJS) glob.pch diff --git a/buildtools/windows/source/make/glob/Makefile.in b/buildtools/windows/source/make/glob/Makefile.in deleted file mode 100644 index 8c091b33ac9..00000000000 --- a/buildtools/windows/source/make/glob/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# Makefile for standalone distribution of libglob.a (fnmatch, glob). - -# Copyright (C) 1991, 92, 93, 94, 95 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public License -# as published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. - -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public -# License along with this library; see the file COPYING.LIB. If -# not, write to the Free Software Foundation, Inc., 675 Mass Ave, -# Cambridge, MA 02139, USA. - -# Ultrix 2.2 make doesn't expand the value of VPATH. -VPATH = @srcdir@ -# This must repeat the value, because configure will remove `VPATH = .'. -srcdir = @srcdir@ - -CC = @CC@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ - -# Information determined by configure. -DEFS = @DEFS@ - -# How to invoke ar. -AR = @AR@ -ARFLAGS = rv - -# How to invoke ranlib. -RANLIB = @RANLIB@ - -.PHONY: all -all: libglob.a - -libglob.a: glob.o fnmatch.o - $(AR) $(ARFLAGS) $@ glob.o fnmatch.o - $(RANLIB) $@ - -# For some reason, Unix make wants the dependencies on the source files. -# Otherwise it refuses to use an implicit rule! -# And, get this: it doesn't work to use $(srcdir)/foo.c!! -glob.o: $(srcdir)/glob.h $(srcdir)/fnmatch.h glob.c -fnmatch.o: $(srcdir)/fnmatch.h fnmatch.c - -.c.o: - $(CC) -I. -I$(srcdir) -c \ - $(DEFS) $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) - -.PHONY: clean realclean glob-clean glob-realclean distclean -clean glob-clean: - -rm -f libglob.a *.o core -distclean glob-realclean: clean - -rm -f TAGS tags Makefile config.status config.h config.log -realcean: distclean - -# For inside the C library. -glob.tar glob.tar.Z: - $(MAKE) -C .. $@ diff --git a/buildtools/windows/source/make/glob/configure b/buildtools/windows/source/make/glob/configure deleted file mode 100644 index d82e6dd9096..00000000000 --- a/buildtools/windows/source/make/glob/configure +++ /dev/null @@ -1,1547 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.1.2 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE - -# Initialize some other variables. -subdirs= - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -build | --build | --buil | --bui | --bu | --b) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=PREFIX install architecture-dependent files in PREFIX - [same as prefix] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR ---enable and --with options recognized:$ac_help -EOF - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.1.2" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=fnmatch.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5' -ac_link='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS $LDFLAGS -o conftest $LIBS 1>&5 2>&5' - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5 | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes -else - ac_cv_prog_gcc_g=no -fi -rm -f conftest* - -fi - echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -# Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" -fi -fi -AR="$ac_cv_prog_AR" -if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi -fi -CPP="$ac_cv_prog_CPP" -echo "$ac_t""$CPP" 1>&6 - echo $ac_n "checking for AIX""... $ac_c" 1>&6 -cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF -#define _ALL_SOURCE 1 -EOF - -else - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - - -ac_safe=`echo "minix/config.h" | tr './\055' '___'` -echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - MINIX=yes -else - echo "$ac_t""no" 1>&6 -MINIX= -fi - -if test "$MINIX" = yes; then - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define _POSIX_1_SOURCE 2 -EOF - - cat >> confdefs.h <<\EOF -#define _MINIX 1 -EOF - -fi - -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi -else - echo "$ac_t""no" 1>&6 - ISC= -fi - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_c_const=yes -else - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext </dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi -cross_compiling=$ac_cv_c_cross -echo "$ac_t""$ac_cv_c_cross" 1>&6 - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - ac_cv_header_stdc=no -else -cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - : -else - ac_cv_header_stdc=no -fi -fi -rm -fr conftest* -fi -fi -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -for ac_hdr in memory.h unistd.h string.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` - cat >> confdefs.h <&6 -fi -done - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include <$ac_hdr> -int main() { return 0; } -int t() { -DIR *dirp = 0; -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` - cat >> confdefs.h <&6 -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for -ldir""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 -fi - -else -echo $ac_n "checking for -lx""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <&6 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext < -#include <$ac_header_dirent> -int closedir(); main() { exit(closedir(opendir(".")) != 0); } -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_closedir_void=no -else - ac_cv_func_closedir_void=yes -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_func_closedir_void" 1>&6 -if test $ac_cv_func_closedir_void = yes; then - cat >> confdefs.h <<\EOF -#define CLOSEDIR_VOID 1 -EOF - -fi - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { return 0; } -int t() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -#endif - -int main() { return 0; } -int t() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - ac_cv_func_alloca=yes -else - rm -rf conftest* - ac_cv_func_alloca=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_func_alloca" 1>&6 -if test $ac_cv_func_alloca = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF - -fi - -if test $ac_cv_func_alloca = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes -else - rm -rf conftest* - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_os_cray" 1>&6 -if test $ac_cv_os_cray = yes; then -echo $ac_n "checking for _getb67""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func__getb67'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < /* Arbitrary system header to define __stub macros. */ -/* Override any gcc2 internal prototype to avoid an error. */ -char _getb67(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub__getb67) || defined (__stub____getb67) -choke me -#else -_getb67(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func__getb67=yes" -else - rm -rf conftest* - eval "ac_cv_func__getb67=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define CRAY_STACKSEG_END _getb67 -EOF - -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for GETB67""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_GETB67'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < /* Arbitrary system header to define __stub macros. */ -/* Override any gcc2 internal prototype to avoid an error. */ -char GETB67(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_GETB67) || defined (__stub___GETB67) -choke me -#else -GETB67(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_GETB67=yes" -else - rm -rf conftest* - eval "ac_cv_func_GETB67=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define CRAY_STACKSEG_END GETB67 -EOF - -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for getb67""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_getb67'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < /* Arbitrary system header to define __stub macros. */ -/* Override any gcc2 internal prototype to avoid an error. */ -char getb67(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_getb67) || defined (__stub___getb67) -choke me -#else -getb67(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_getb67=yes" -else - rm -rf conftest* - eval "ac_cv_func_getb67=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define CRAY_STACKSEG_END getb67 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -fi - -fi - -fi - -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else -cat > conftest.$ac_ext < addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <&6 -if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_strcoll=no -else -cat > conftest.$ac_ext < -main () -{ - exit (strcoll ("abc", "def") >= 0 || - strcoll ("ABC", "DEF") >= 0 || - strcoll ("123", "456") >= 0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_strcoll=yes -else - ac_cv_func_strcoll=no -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_func_strcoll" 1>&6 -if test $ac_cv_func_strcoll = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_STRCOLL 1 -EOF - -fi - -trap '' 1 2 15 -if test -w $cache_file; then -echo "updating cache $cache_file" -cat > $cache_file <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> $cache_file -else -echo "not updating unwritable cache $cache_file" -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.1.2" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -f Makefile; exit 1' 1 2 15 - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@CC@%$CC%g -s%@AR@%$AR%g -s%@RANLIB@%$RANLIB%g -s%@CPP@%$CPP%g -s%@ALLOCA@%$ALLOCA%g - -CEOF -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust relative srcdir, etc. for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file -fi; done -rm -f conftest.subs - - - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - diff --git a/buildtools/windows/source/make/glob/configure.bat b/buildtools/windows/source/make/glob/configure.bat deleted file mode 100755 index 45fcd63f71f..00000000000 --- a/buildtools/windows/source/make/glob/configure.bat +++ /dev/null @@ -1,52 +0,0 @@ -@echo off - -echo Configuring glob for GO32 - -rem This batch file assumes a unix-type "sed" program - - - -echo # Makefile generated by "configure.bat"> Makefile - - - -if exist config.sed del config.sed - - - -echo "s/@srcdir@/./ ">> config.sed - -echo "s/@CC@/gcc/ ">> config.sed - -echo "s/@CFLAGS@/-O2 -g/ ">> config.sed - -echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -I../ ">> config.sed - -echo "s/@AR@/ar/ ">> config.sed - -echo "s/@RANLIB@/ranlib/ ">> config.sed - -echo "s/@LDFLAGS@// ">> config.sed - -echo "s/@DEFS@// ">> config.sed - -echo "s/@ALLOCA@// ">> config.sed - -echo "s/@LIBS@// ">> config.sed - -echo "s/@LIBOBJS@// ">> config.sed - -echo "s/^Makefile *:/_Makefile:/ ">> config.sed - -echo "s/^config.h *:/_config.h:/ ">> config.sed - - - -sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed - -sed -f config2.sed Makefile.in >> Makefile - -del config.sed - -del config2.sed - diff --git a/buildtools/windows/source/make/glob/configure.in b/buildtools/windows/source/make/glob/configure.in deleted file mode 100644 index 8dc68e42483..00000000000 --- a/buildtools/windows/source/make/glob/configure.in +++ /dev/null @@ -1,19 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(fnmatch.c) dnl A distinctive file to look for in srcdir. -AC_PREREQ(2.1) dnl Minimum Autoconf version required. -AC_PROG_CC -AC_CHECK_PROG(AR, ar, ar, ar) -AC_PROG_RANLIB -AC_PROG_CPP dnl Later checks need this. -dnl These two want to come early. -AC_AIX -AC_MINIX -AC_ISC_POSIX -AC_CONST -AC_HEADER_STDC -AC_CHECK_HEADERS(memory.h unistd.h string.h) -AC_HEADER_DIRENT -AC_FUNC_CLOSEDIR_VOID -AC_FUNC_ALLOCA -AC_FUNC_STRCOLL -AC_OUTPUT(Makefile) diff --git a/buildtools/windows/source/make/glob/fnmatch.c b/buildtools/windows/source/make/glob/fnmatch.c deleted file mode 100644 index 1ef5599e234..00000000000 --- a/buildtools/windows/source/make/glob/fnmatch.c +++ /dev/null @@ -1,200 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined (_LIBC) || !defined (__GNU_LIBRARY__) - - -#ifndef errno -extern int errno; -#endif - -/* Match STRING against the filename pattern PATTERN, returning zero if - it matches, nonzero if not. */ -int -fnmatch (pattern, string, flags) - const char *pattern; - const char *string; - int flags; -{ - register const char *p = pattern, *n = string; - register char c; - -/* Note that this evalutes C many times. */ -#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c)) - - while ((c = *p++) != '\0') - { - c = FOLD (c); - - switch (c) - { - case '?': - if (*n == '\0') - return FNM_NOMATCH; - else if ((flags & FNM_FILE_NAME) && *n == '/') - return FNM_NOMATCH; - else if ((flags & FNM_PERIOD) && *n == '.' && - (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) - return FNM_NOMATCH; - break; - - case '\\': - if (!(flags & FNM_NOESCAPE)) - { - c = *p++; - c = FOLD (c); - } - if (FOLD (*n) != c) - return FNM_NOMATCH; - break; - - case '*': - if ((flags & FNM_PERIOD) && *n == '.' && - (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) - return FNM_NOMATCH; - - for (c = *p++; c == '?' || c == '*'; c = *p++, ++n) - if (((flags & FNM_FILE_NAME) && *n == '/') || - (c == '?' && *n == '\0')) - return FNM_NOMATCH; - - if (c == '\0') - return 0; - - { - char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c; - c1 = FOLD (c1); - for (--p; *n != '\0'; ++n) - if ((c == '[' || FOLD (*n) == c1) && - fnmatch (p, n, flags & ~FNM_PERIOD) == 0) - return 0; - return FNM_NOMATCH; - } - - case '[': - { - /* Nonzero if the sense of the character class is inverted. */ - register int not; - - if (*n == '\0') - return FNM_NOMATCH; - - if ((flags & FNM_PERIOD) && *n == '.' && - (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) - return FNM_NOMATCH; - - not = (*p == '!' || *p == '^'); - if (not) - ++p; - - c = *p++; - for (;;) - { - register char cstart = c, cend = c; - - if (!(flags & FNM_NOESCAPE) && c == '\\') - cstart = cend = *p++; - - cstart = cend = FOLD (cstart); - - if (c == '\0') - /* [ (unterminated) loses. */ - return FNM_NOMATCH; - - c = *p++; - c = FOLD (c); - - if ((flags & FNM_FILE_NAME) && c == '/') - /* [/] can never match. */ - return FNM_NOMATCH; - - if (c == '-' && *p != ']') - { - cend = *p++; - if (!(flags & FNM_NOESCAPE) && cend == '\\') - cend = *p++; - if (cend == '\0') - return FNM_NOMATCH; - cend = FOLD (cend); - - c = *p++; - } - - if (FOLD (*n) >= cstart && FOLD (*n) <= cend) - goto matched; - - if (c == ']') - break; - } - if (!not) - return FNM_NOMATCH; - break; - - matched:; - /* Skip the rest of the [...] that already matched. */ - while (c != ']') - { - if (c == '\0') - /* [... (unterminated) loses. */ - return FNM_NOMATCH; - - c = *p++; - if (!(flags & FNM_NOESCAPE) && c == '\\') - /* XXX 1003.2d11 is unclear if this is right. */ - ++p; - } - if (not) - return FNM_NOMATCH; - } - break; - - default: - if (c != FOLD (*n)) - return FNM_NOMATCH; - } - - ++n; - } - - if (*n == '\0') - return 0; - - if ((flags & FNM_LEADING_DIR) && *n == '/') - /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ - return 0; - - return FNM_NOMATCH; -} - -#endif /* _LIBC or not __GNU_LIBRARY__. */ diff --git a/buildtools/windows/source/make/glob/fnmatch.h b/buildtools/windows/source/make/glob/fnmatch.h deleted file mode 100644 index d9d73b3d86c..00000000000 --- a/buildtools/windows/source/make/glob/fnmatch.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef _FNMATCH_H - -#define _FNMATCH_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) -#undef __P -#define __P(protos) protos -#else /* Not C++ or ANSI C. */ -#undef __P -#define __P(protos) () -/* We can get away without defining `const' here only because in this file - it is used only inside the prototype for `fnmatch', which is elided in - non-ANSI C where `const' is problematical. */ -#endif /* C++ or ANSI C. */ - - -/* We #undef these before defining them because some losing systems - (HP-UX A.08.07 for example) define these in . */ -#undef FNM_PATHNAME -#undef FNM_NOESCAPE -#undef FNM_PERIOD - -/* Bits set in the FLAGS argument to `fnmatch'. */ -#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ -#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ -#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ - -#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) -#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ -#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ -#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ -#endif - -/* Value returned by `fnmatch' if STRING does not match PATTERN. */ -#define FNM_NOMATCH 1 - -/* Match STRING against the filename pattern PATTERN, - returning zero if it matches, FNM_NOMATCH if not. */ -extern int fnmatch __P ((const char *__pattern, const char *__string, - int __flags)); - -#ifdef __cplusplus -} -#endif - -#endif /* fnmatch.h */ diff --git a/buildtools/windows/source/make/glob/glob.c b/buildtools/windows/source/make/glob/glob.c deleted file mode 100644 index c90a40672b9..00000000000 --- a/buildtools/windows/source/make/glob/glob.c +++ /dev/null @@ -1,705 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* AIX requires this to be the first thing in the file. */ -#if defined (_AIX) && !defined (__GNUC__) - #pragma alloca -#endif - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef NETSCAPE -#include "windir.h" -#endif - -#include -#include -#include - - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined (_LIBC) || !defined (__GNU_LIBRARY__) - - -#ifdef STDC_HEADERS -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#ifndef POSIX -#ifdef _POSIX_VERSION -#define POSIX -#endif -#endif -#endif - -#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) -extern int errno; -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -#if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__) -#include -#ifndef __GNU_LIBRARY__ -#define D_NAMLEN(d) strlen((d)->d_name) -#else /* GNU C library. */ -#define D_NAMLEN(d) ((d)->d_namlen) -#endif /* Not GNU C library. */ -#else /* Not POSIX or HAVE_DIRENT_H. */ -#define direct dirent -#define D_NAMLEN(d) ((d)->d_namlen) -#ifdef HAVE_SYS_NDIR_H -#include -#endif /* HAVE_SYS_NDIR_H */ -#ifdef HAVE_SYS_DIR_H -#include -#endif /* HAVE_SYS_DIR_H */ -#ifdef HAVE_NDIR_H -#include -#endif /* HAVE_NDIR_H */ -#endif /* POSIX or HAVE_DIRENT_H or __GNU_LIBRARY__. */ - -#if defined(NETSCAPE) || defined (POSIX) && !defined (__GNU_LIBRARY__) -/* Posix does not require that the d_ino field be present, and some - systems do not provide it. */ -#define REAL_DIR_ENTRY(dp) 1 -#else -#define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) -#endif /* POSIX */ - -#if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)) -#include -#include -#define ANSI_STRING -#else /* No standard headers. */ - -#ifdef HAVE_STRING_H -#include -#define ANSI_STRING -#else -#include -#endif -#ifdef HAVE_MEMORY_H -#include -#endif - -extern char *malloc (), *realloc (); -extern void free (); - -extern void qsort (); -extern void abort (), exit (); - -#endif /* Standard headers. */ - -#ifndef ANSI_STRING - -#ifndef bzero -extern void bzero (); -#endif -#ifndef bcopy -extern void bcopy (); -#endif - -#define memcpy(d, s, n) bcopy ((s), (d), (n)) -#define strrchr rindex -/* memset is only used for zero here, but let's be paranoid. */ -#define memset(s, better_be_zero, n) \ - ((void) ((better_be_zero) == 0 ? (bzero((s), (n)), 0) : (abort(), 0))) -#endif /* Not ANSI_STRING. */ - -#ifndef HAVE_STRCOLL -#define strcoll strcmp -#endif - - -#if !defined(__GNU_LIBRARY__) && !defined(NETSCAPE) -#ifdef __GNUC__ -__inline -#endif -static char * -my_realloc (p, n) - char *p; - unsigned int n; -{ - /* These casts are the for sake of the broken Ultrix compiler, - which warns of illegal pointer combinations otherwise. */ - if (p == NULL) - return (char *) malloc (n); - return (char *) realloc (p, n); -} -#define realloc my_realloc -#endif - - -#if !defined(__alloca) && !defined(__GNU_LIBRARY__) - -#ifdef __GNUC__ -#undef alloca -#define alloca(n) __builtin_alloca (n) -#else /* Not GCC. */ -#if defined (sparc) || defined (HAVE_ALLOCA_H) -#include -#elif defined(NETSCAPE) -#include -#else /* Not sparc or HAVE_ALLOCA_H. */ -#ifndef _AIX -extern char *alloca (); -#endif /* Not _AIX. */ -#endif /* sparc or HAVE_ALLOCA_H. */ -#endif /* GCC. */ - -#define __alloca alloca - -#endif - -#ifndef __GNU_LIBRARY__ -#define __lstat lstat -#ifndef HAVE_LSTAT -#define lstat stat -#endif -#ifdef STAT_MACROS_BROKEN -#undef S_ISDIR -#endif -#ifndef S_ISDIR -#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) -#endif -#endif - -#ifndef STDC_HEADERS -#undef size_t -#define size_t unsigned int -#endif - -/* Some system header files erroneously define these. - We want our own definitions from to take precedence. */ -#undef FNM_PATHNAME -#undef FNM_NOESCAPE -#undef FNM_PERIOD -#include - -/* Some system header files erroneously define these. - We want our own definitions from to take precedence. */ -#undef GLOB_ERR -#undef GLOB_MARK -#undef GLOB_NOSORT -#undef GLOB_DOOFFS -#undef GLOB_NOCHECK -#undef GLOB_APPEND -#undef GLOB_NOESCAPE -#undef GLOB_PERIOD -#include - -__ptr_t (*__glob_opendir_hook) __P ((const char *directory)); -const char *(*__glob_readdir_hook) __P ((__ptr_t stream)); -void (*__glob_closedir_hook) __P ((__ptr_t stream)); - -static int glob_pattern_p __P ((const char *pattern, int quote)); -static int glob_in_dir __P ((const char *pattern, const char *directory, - int flags, - int (*errfunc) __P ((const char *, int)), - glob_t *pglob)); -static int prefix_array __P ((const char *prefix, char **array, size_t n)); -int collated_compare __P ((const void *elem1, const void *elem2)); - -/* Do glob searching for PATTERN, placing results in PGLOB. - The bits defined above may be set in FLAGS. - If a directory cannot be opened or read and ERRFUNC is not nil, - it is called with the pathname that caused the error, and the - `errno' value from the failing call; if it returns non-zero - `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. - If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. - Otherwise, `glob' returns zero. */ -int -glob (pattern, flags, errfunc, pglob) - const char *pattern; - int flags; - int (*errfunc) __P ((const char *, int)); - glob_t *pglob; -{ - const char *filename; - char *dirname; - size_t dirlen; - int status; - int oldcount; - - if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) - { - errno = EINVAL; - return -1; - } - - /* Find the filename. */ - filename = strrchr (pattern, '/'); - if (filename == NULL) - { - filename = pattern; - dirname = (char *) "."; - dirlen = 0; - } - else if (filename == pattern) - { - /* "/pattern". */ - dirname = (char *) "/"; - dirlen = 1; - ++filename; - } - else - { - dirlen = filename - pattern; - dirname = (char *) __alloca (dirlen + 1); - memcpy (dirname, pattern, dirlen); - dirname[dirlen] = '\0'; - ++filename; - } - - if (filename[0] == '\0' && dirlen > 1) - /* "pattern/". Expand "pattern", appending slashes. */ - { - int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob); - if (val == 0) - pglob->gl_flags = (pglob->gl_flags & ~GLOB_MARK) | (flags & GLOB_MARK); - return val; - } - - if (!(flags & GLOB_APPEND)) - { - pglob->gl_pathc = 0; - pglob->gl_pathv = NULL; - } - - oldcount = pglob->gl_pathc; - - if (glob_pattern_p (dirname, !(flags & GLOB_NOESCAPE))) - { - /* The directory name contains metacharacters, so we - have to glob for the directory, and then glob for - the pattern in each directory found. */ - glob_t dirs; - register int i; - - status = glob (dirname, - ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE)) | - GLOB_NOSORT), - errfunc, &dirs); - if (status != 0) - return status; - - /* We have successfully globbed the preceding directory name. - For each name we found, call glob_in_dir on it and FILENAME, - appending the results to PGLOB. */ - for (i = 0; i < dirs.gl_pathc; ++i) - { - int oldcount; - -#ifdef SHELL - { - /* Make globbing interruptible in the bash shell. */ - extern int interrupt_state; - - if (interrupt_state) - { - globfree (&dirs); - globfree (&files); - return GLOB_ABEND; - } - } -#endif /* SHELL. */ - - oldcount = pglob->gl_pathc; - status = glob_in_dir (filename, dirs.gl_pathv[i], - (flags | GLOB_APPEND) & ~GLOB_NOCHECK, - errfunc, pglob); - if (status == GLOB_NOMATCH) - /* No matches in this directory. Try the next. */ - continue; - - if (status != 0) - { - globfree (&dirs); - globfree (pglob); - return status; - } - - /* Stick the directory on the front of each name. */ - if (prefix_array (dirs.gl_pathv[i], - &pglob->gl_pathv[oldcount], - pglob->gl_pathc - oldcount)) - { - globfree (&dirs); - globfree (pglob); - return GLOB_NOSPACE; - } - } - - flags |= GLOB_MAGCHAR; - - if (pglob->gl_pathc == oldcount) - /* No matches. */ - if (flags & GLOB_NOCHECK) - { - size_t len = strlen (pattern) + 1; - char *patcopy = (char *) malloc (len); - if (patcopy == NULL) - return GLOB_NOSPACE; - memcpy (patcopy, pattern, len); - - pglob->gl_pathv - = (char **) realloc (pglob->gl_pathv, - (pglob->gl_pathc + - ((flags & GLOB_DOOFFS) ? - pglob->gl_offs : 0) + - 1 + 1) * - sizeof (char *)); - if (pglob->gl_pathv == NULL) - { - free (patcopy); - return GLOB_NOSPACE; - } - - if (flags & GLOB_DOOFFS) - while (pglob->gl_pathc < pglob->gl_offs) - pglob->gl_pathv[pglob->gl_pathc++] = NULL; - - pglob->gl_pathv[pglob->gl_pathc++] = patcopy; - pglob->gl_pathv[pglob->gl_pathc] = NULL; - pglob->gl_flags = flags; - } - else - return GLOB_NOMATCH; - } - else - { - status = glob_in_dir (filename, dirname, flags, errfunc, pglob); - if (status != 0) - return status; - - if (dirlen > 0) - { - /* Stick the directory on the front of each name. */ - if (prefix_array (dirname, - &pglob->gl_pathv[oldcount], - pglob->gl_pathc - oldcount)) - { - globfree (pglob); - return GLOB_NOSPACE; - } - } - } - - if (flags & GLOB_MARK) - { - /* Append slashes to directory names. glob_in_dir has already - allocated the extra character for us. */ - int i; - struct stat st; - for (i = oldcount; i < pglob->gl_pathc; ++i) - if (__lstat (pglob->gl_pathv[i], &st) == 0 && - S_ISDIR (st.st_mode)) - strcat (pglob->gl_pathv[i], "/"); - } - - if (!(flags & GLOB_NOSORT)) - /* Sort the vector. */ -#if 0 - qsort ((__ptr_t) &pglob->gl_pathv[oldcount], - pglob->gl_pathc - oldcount, - sizeof (char *), collated_compare); -#else - qsort ( &pglob->gl_pathv[oldcount], - (size_t)(pglob->gl_pathc - oldcount), - sizeof (char *), collated_compare); -#endif - - return 0; -} - - -/* Free storage allocated in PGLOB by a previous `glob' call. */ -void -globfree (pglob) - register glob_t *pglob; -{ - if (pglob->gl_pathv != NULL) - { - register int i; - for (i = 0; i < pglob->gl_pathc; ++i) - if (pglob->gl_pathv[i] != NULL) - free ((__ptr_t) pglob->gl_pathv[i]); - free ((__ptr_t) pglob->gl_pathv); - } -} - - -/* Do a collated comparison of A and B. */ -int -collated_compare (const void *elem1, const void *elem2) -{ - const __ptr_t a = (const __ptr_t)elem1; - const __ptr_t b = (const __ptr_t)elem1; - const char *const s1 = *(const char *const * const) a; - const char *const s2 = *(const char *const * const) b; - - if (s1 == s2) - return 0; - if (s1 == NULL) - return 1; - if (s2 == NULL) - return -1; - return strcoll (s1, s2); -} - - -/* Prepend DIRNAME to each of N members of ARRAY, replacing ARRAY's - elements in place. Return nonzero if out of memory, zero if successful. - A slash is inserted between DIRNAME and each elt of ARRAY, - unless DIRNAME is just "/". Each old element of ARRAY is freed. */ -static int -prefix_array (dirname, array, n) - const char *dirname; - char **array; - size_t n; -{ - register size_t i; - size_t dirlen = strlen (dirname); - - if (dirlen == 1 && dirname[0] == '/') - /* DIRNAME is just "/", so normal prepending would get us "//foo". - We want "/foo" instead, so don't prepend any chars from DIRNAME. */ - dirlen = 0; - - for (i = 0; i < n; ++i) - { - size_t eltlen = strlen (array[i]) + 1; - char *new = (char *) malloc (dirlen + 1 + eltlen); - if (new == NULL) - { - while (i > 0) - free ((__ptr_t) array[--i]); - return 1; - } - - memcpy (new, dirname, dirlen); - new[dirlen] = '/'; - memcpy (&new[dirlen + 1], array[i], eltlen); - free ((__ptr_t) array[i]); - array[i] = new; - } - - return 0; -} - - -/* Return nonzero if PATTERN contains any metacharacters. - Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ -static int -glob_pattern_p (pattern, quote) - const char *pattern; - int quote; -{ - register const char *p; - int open = 0; - - for (p = pattern; *p != '\0'; ++p) - switch (*p) - { - case '?': - case '*': - return 1; - - case '\\': - if (quote) - ++p; - break; - - case '[': - open = 1; - break; - - case ']': - if (open) - return 1; - break; - } - - return 0; -} - - -/* Like `glob', but PATTERN is a final pathname component, - and matches are searched for in DIRECTORY. - The GLOB_NOSORT bit in FLAGS is ignored. No sorting is ever done. - The GLOB_APPEND flag is assumed to be set (always appends). */ -static int -glob_in_dir (pattern, directory, flags, errfunc, pglob) - const char *pattern; - const char *directory; - int flags; - int (*errfunc) __P ((const char *, int)); - glob_t *pglob; -{ - __ptr_t stream; - - struct globlink - { - struct globlink *next; - char *name; - }; - struct globlink *names = NULL; - size_t nfound = 0; - - if (!glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE))) - { - stream = NULL; - flags |= GLOB_NOCHECK; - } - else - { - flags |= GLOB_MAGCHAR; - - stream = (__glob_opendir_hook ? (*__glob_opendir_hook) (directory) - : (__ptr_t) opendir (directory)); - if (stream == NULL) - { - if ((errfunc != NULL && (*errfunc) (directory, errno)) || - (flags & GLOB_ERR)) - return GLOB_ABEND; - } - else - while (1) - { - const char *name; - size_t len; - - if (__glob_readdir_hook) - { - name = (*__glob_readdir_hook) (stream); - if (name == NULL) - break; - len = 0; - } - else - { - struct dirent *d = readdir ((DIR *) stream); - if (d == NULL) - break; - if (! REAL_DIR_ENTRY (d)) - continue; - name = d->d_name; -#ifdef HAVE_D_NAMLEN - len = d->d_namlen; -#else - len = 0; -#endif - } - - if (fnmatch (pattern, name, - (!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) | - ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)) == 0) - { - struct globlink *new - = (struct globlink *) __alloca (sizeof (struct globlink)); - if (len == 0) - len = strlen (name); - new->name - = (char *) malloc (len + ((flags & GLOB_MARK) ? 1 : 0) + 1); - if (new->name == NULL) - goto memory_error; - memcpy ((__ptr_t) new->name, name, len); - new->name[len] = '\0'; - new->next = names; - names = new; - ++nfound; - } - } - } - - if (nfound == 0 && (flags & GLOB_NOCHECK)) - { - size_t len = strlen (pattern); - nfound = 1; - names = (struct globlink *) __alloca (sizeof (struct globlink)); - names->next = NULL; - names->name = (char *) malloc (len + 1); - if (names->name == NULL) - goto memory_error; - memcpy (names->name, pattern, len); - names->name[len] = '\0'; - } - - pglob->gl_pathv - = (char **) realloc (pglob->gl_pathv, - (pglob->gl_pathc + - ((flags & GLOB_DOOFFS) ? pglob->gl_offs : 0) + - nfound + 1) * - sizeof (char *)); - if (pglob->gl_pathv == NULL) - goto memory_error; - - if (flags & GLOB_DOOFFS) - while (pglob->gl_pathc < pglob->gl_offs) - pglob->gl_pathv[pglob->gl_pathc++] = NULL; - - for (; names != NULL; names = names->next) - pglob->gl_pathv[pglob->gl_pathc++] = names->name; - pglob->gl_pathv[pglob->gl_pathc] = NULL; - - pglob->gl_flags = flags; - - if (stream != NULL) - { - int save = errno; - if (__glob_closedir_hook) - (*__glob_closedir_hook) (stream); - else - (void) closedir ((DIR *) stream); - errno = save; - } - return nfound == 0 ? GLOB_NOMATCH : 0; - - memory_error: - { - int save = errno; - if (__glob_closedir_hook) - (*__glob_closedir_hook) (stream); - else - (void) closedir ((DIR *) stream); - errno = save; - } - while (names != NULL) - { - if (names->name != NULL) - free ((__ptr_t) names->name); - names = names->next; - } - return GLOB_NOSPACE; -} - -#endif /* _LIBC or not __GNU_LIBRARY__. */ diff --git a/buildtools/windows/source/make/glob/glob.h b/buildtools/windows/source/make/glob/glob.h deleted file mode 100644 index 05ad47f05d9..00000000000 --- a/buildtools/windows/source/make/glob/glob.h +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef _GLOB_H - -#define _GLOB_H 1 - -#ifdef __cplusplus -extern "C" -{ -#endif - -#undef __ptr_t -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) -#undef __P -#define __P(protos) protos -#define __ptr_t void * -#else /* Not C++ or ANSI C. */ -#undef __P -#define __P(protos) () -#undef const -#define const -#define __ptr_t char * -#endif /* C++ or ANSI C. */ - -/* Bits set in the FLAGS argument to `glob'. */ -#define GLOB_ERR (1 << 0)/* Return on read errors. */ -#define GLOB_MARK (1 << 1)/* Append a slash to each name. */ -#define GLOB_NOSORT (1 << 2)/* Don't sort the names. */ -#define GLOB_DOOFFS (1 << 3)/* Insert PGLOB->gl_offs NULLs. */ -#define GLOB_NOCHECK (1 << 4)/* If nothing matches, return the pattern. */ -#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */ -#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ -#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ -#define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ - GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND|GLOB_PERIOD) - -#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE) -#define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ -#endif - -/* Error returns from `glob'. */ -#define GLOB_NOSPACE 1 /* Ran out of memory. */ -#define GLOB_ABEND 2 /* Read error. */ -#define GLOB_NOMATCH 3 /* No matches found. */ - -/* Structure describing a globbing run. */ -typedef struct - { - int gl_pathc; /* Count of paths matched by the pattern. */ - char **gl_pathv; /* List of matched pathnames. */ - int gl_offs; /* Slots to reserve in `gl_pathv'. */ - int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ - } glob_t; - -/* Do glob searching for PATTERN, placing results in PGLOB. - The bits defined above may be set in FLAGS. - If a directory cannot be opened or read and ERRFUNC is not nil, - it is called with the pathname that caused the error, and the - `errno' value from the failing call; if it returns non-zero - `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. - If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. - Otherwise, `glob' returns zero. */ -extern int glob __P ((const char *__pattern, int __flags, - int (*__errfunc) __P ((const char *, int)), - glob_t *__pglob)); - -/* Free storage allocated in PGLOB by a previous `glob' call. */ -extern void globfree __P ((glob_t *__pglob)); - - -#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) -/* If they are not NULL, `glob' uses these functions to read directories. */ -extern __ptr_t (*__glob_opendir_hook) __P ((const char *__directory)); -extern const char *(*__glob_readdir_hook) __P ((__ptr_t __stream)); -extern void (*__glob_closedir_hook) __P ((__ptr_t __stream)); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* glob.h */ diff --git a/buildtools/windows/source/make/implicit.c b/buildtools/windows/source/make/implicit.c deleted file mode 100644 index 1fef4f5909b..00000000000 --- a/buildtools/windows/source/make/implicit.c +++ /dev/null @@ -1,590 +0,0 @@ -/* Implicit rule searching for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "rule.h" -#include "dep.h" -#include "file.h" - -static int pattern_search (); - -/* For a FILE which has no commands specified, try to figure out some - from the implicit pattern rules. - Returns 1 if a suitable implicit rule was found, - after modifying FILE to contain the appropriate commands and deps, - or returns 0 if no implicit rule was found. */ - -int -try_implicit_rule (file, depth) - struct file *file; - unsigned int depth; -{ - DEBUGPR ("Looking for an implicit rule for `%s'.\n"); - - /* The order of these searches was previously reversed. My logic now is - that since the non-archive search uses more information in the target - (the archive search omits the archive name), it is more specific and - should come first. */ - - if (pattern_search (file, 0, depth, 0)) - return 1; - -#ifndef NO_ARCHIVES - /* If this is an archive member reference, use just the - archive member name to search for implicit rules. */ - if (ar_name (file->name)) - { - DEBUGPR ("Looking for archive-member implicit rule for `%s'.\n"); - if (pattern_search (file, 1, depth, 0)) - return 1; - } -#endif - - return 0; -} - -#define DEBUGP2(msg, a1, a2) \ - do { \ - if (debug_flag) \ - { print_spaces (depth); printf (msg, a1, a2); fflush (stdout); } \ - } while (0) - -/* Search the pattern rules for a rule with an existing dependency to make - FILE. If a rule is found, the appropriate commands and deps are put in FILE - and 1 is returned. If not, 0 is returned. - - If ARCHIVE is nonzero, FILE->name is of the form "LIB(MEMBER)". A rule for - "(MEMBER)" will be searched for, and "(MEMBER)" will not be chopped up into - directory and filename parts. - - If an intermediate file is found by pattern search, the intermediate file - is set up as a target by the recursive call and is also made a dependency - of FILE. - - DEPTH is used for debugging messages. */ - -static int -pattern_search (file, archive, depth, recursions) - struct file *file; - int archive; - unsigned int depth; - unsigned int recursions; -{ - /* Filename we are searching for a rule for. */ - char *filename = archive ? index (file->name, '(') : file->name; - - /* Length of FILENAME. */ - unsigned int namelen = strlen (filename); - - /* The last slash in FILENAME (or nil if there is none). */ - char *lastslash; - - /* This is a file-object used as an argument in - recursive calls. It never contains any data - except during a recursive call. */ - struct file *intermediate_file = 0; - - /* List of dependencies found recursively. */ - struct file **intermediate_files - = (struct file **) alloca (max_pattern_deps * sizeof (struct file *)); - - /* List of the patterns used to find intermediate files. */ - char **intermediate_patterns - = (char **) alloca (max_pattern_deps * sizeof (char *)); - - /* This buffer records all the dependencies actually found for a rule. */ - char **found_files = (char **) alloca (max_pattern_deps * sizeof (char *)); - /* Number of dep names now in FOUND_FILES. */ - unsigned int deps_found; - - /* Names of possible dependencies are constructed in this buffer. */ - register char *depname = (char *) alloca (namelen + max_pattern_dep_length); - - /* The start and length of the stem of FILENAME for the current rule. */ - register char *stem; - register unsigned int stemlen; - - /* Buffer in which we store all the rules that are possibly applicable. */ - struct rule **tryrules - = (struct rule **) alloca (num_pattern_rules * max_pattern_targets - * sizeof (struct rule *)); - - /* Number of valid elements in TRYRULES. */ - unsigned int nrules; - - /* The numbers of the rule targets of each rule - in TRYRULES that matched the target file. */ - unsigned int *matches - = (unsigned int *) alloca (num_pattern_rules * sizeof (unsigned int)); - - /* Each element is nonzero if LASTSLASH was used in - matching the corresponding element of TRYRULES. */ - char *checked_lastslash - = (char *) alloca (num_pattern_rules * sizeof (char)); - - /* The index in TRYRULES of the rule we found. */ - unsigned int foundrule; - - /* Nonzero if should consider intermediate files as dependencies. */ - int intermed_ok; - - /* Nonzero if we have matched a pattern-rule target - that is not just `%'. */ - int specific_rule_matched = 0; - - register unsigned int i; - register struct rule *rule; - register struct dep *dep; - - char *p; - -#ifndef NO_ARCHIVES - if (archive || ar_name (filename)) - lastslash = 0; - else -#endif - { - /* Set LASTSLASH to point at the last slash in FILENAME - but not counting any slash at the end. (foo/bar/ counts as - bar/ in directory foo/, not empty in directory foo/bar/.) */ - lastslash = rindex (filename, '/'); - if (lastslash != 0 && lastslash[1] == '\0') - lastslash = 0; - } - - /* First see which pattern rules match this target - and may be considered. Put them in TRYRULES. */ - - nrules = 0; - for (rule = pattern_rules; rule != 0; rule = rule->next) - { - /* If the pattern rule has deps but no commands, ignore it. - Users cancel built-in rules by redefining them without commands. */ - if (rule->deps != 0 && rule->cmds == 0) - continue; - - /* If this rule is in use by a parent pattern_search, - don't use it here. */ - if (rule->in_use) - { - DEBUGP2 ("Avoiding implicit rule recursion.%s%s\n", "", ""); - continue; - } - - for (i = 0; rule->targets[i] != 0; ++i) - { - char *target = rule->targets[i]; - char *suffix = rule->suffixes[i]; - int check_lastslash; - - /* Rules that can match any filename and are not terminal - are ignored if we're recursing, so that they cannot be - intermediate files. */ - if (recursions > 0 && target[1] == '\0' && !rule->terminal) - continue; - - if (rule->lens[i] > namelen) - /* It can't possibly match. */ - continue; - - /* From the lengths of the filename and the pattern parts, - find the stem: the part of the filename that matches the %. */ - stem = filename + (suffix - target - 1); - stemlen = namelen - rule->lens[i] + 1; - - /* Set CHECK_LASTSLASH if FILENAME contains a directory - prefix and the target pattern does not contain a slash. */ - - check_lastslash = lastslash != 0 && index (target, '/') == 0; - if (check_lastslash) - { - /* In that case, don't include the - directory prefix in STEM here. */ - unsigned int difference = lastslash - filename + 1; - if (difference > stemlen) - continue; - stemlen -= difference; - stem += difference; - } - - /* Check that the rule pattern matches the text before the stem. */ - if (check_lastslash) - { - if (stem > (lastslash + 1) - && strncmp (target, lastslash + 1, stem - lastslash - 1)) - continue; - } - else if (stem > filename - && strncmp (target, filename, stem - filename)) - continue; - - /* Check that the rule pattern matches the text after the stem. - We could test simply use streq, but this way we compare the - first two characters immediately. This saves time in the very - common case where the first character matches because it is a - period. */ - if (*suffix != stem[stemlen] - || (*suffix != '\0' && !streq (&suffix[1], &stem[(int)stemlen + 1]))) - continue; - - /* Record if we match a rule that not all filenames will match. */ - if (target[1] != '\0') - specific_rule_matched = 1; - - /* A rule with no dependencies and no commands exists solely to set - specific_rule_matched when it matches. Don't try to use it. */ - if (rule->deps == 0 && rule->cmds == 0) - continue; - - /* Record this rule in TRYRULES and the index of the matching - target in MATCHES. If several targets of the same rule match, - that rule will be in TRYRULES more than once. */ - tryrules[nrules] = rule; - matches[nrules] = i; - checked_lastslash[nrules] = check_lastslash; - ++nrules; - } - } - - /* If we have found a matching rule that won't match all filenames, - retroactively reject any non-"terminal" rules that do always match. */ - if (specific_rule_matched) - for (i = 0; i < nrules; ++i) - if (!tryrules[i]->terminal) - { - register unsigned int j; - for (j = 0; tryrules[i]->targets[j] != 0; ++j) - if (tryrules[i]->targets[j][1] == '\0') - break; - if (tryrules[i]->targets[j] != 0) - tryrules[i] = 0; - } - - /* Try each rule once without intermediate files, then once with them. */ - for (intermed_ok = 0; intermed_ok == !!intermed_ok; ++intermed_ok) - { - /* Try each pattern rule till we find one that applies. - If it does, copy the names of its dependencies (as substituted) - and store them in FOUND_FILES. DEPS_FOUND is the number of them. */ - - for (i = 0; i < nrules; i++) - { - int check_lastslash; - - rule = tryrules[i]; - - /* RULE is nil when we discover that a rule, - already placed in TRYRULES, should not be applied. */ - if (rule == 0) - continue; - - /* Reject any terminal rules if we're - looking to make intermediate files. */ - if (intermed_ok && rule->terminal) - continue; - - /* Mark this rule as in use so a recursive - pattern_search won't try to use it. */ - rule->in_use = 1; - - /* From the lengths of the filename and the matching pattern parts, - find the stem: the part of the filename that matches the %. */ - stem = filename - + (rule->suffixes[matches[i]] - rule->targets[matches[i]]) - 1; - stemlen = namelen - rule->lens[matches[i]] + 1; - check_lastslash = checked_lastslash[i]; - if (check_lastslash) - { - stem += lastslash - filename + 1; - stemlen -= (lastslash - filename) + 1; - } - - DEBUGP2 ("Trying pattern rule with stem `%.*s'.\n", - (int) stemlen, stem); - - /* Try each dependency; see if it "exists". */ - - deps_found = 0; - for (dep = rule->deps; dep != 0; dep = dep->next) - { - /* If the dependency name has a %, substitute the stem. */ - p = index (dep_name (dep), '%'); - if (p != 0) - { - register unsigned int i; - if (check_lastslash) - { - /* Copy directory name from the original FILENAME. */ - i = lastslash - filename + 1; - bcopy (filename, depname, i); - } - else - i = 0; - bcopy (dep_name (dep), depname + i, p - dep_name (dep)); - i += p - dep_name (dep); - bcopy (stem, depname + i, stemlen); - i += stemlen; - strcpy (depname + i, p + 1); - p = depname; - } - else - p = dep_name (dep); - - /* P is now the actual dependency name as substituted. */ - - if (file_impossible_p (p)) - { - /* If this dependency has already been ruled - "impossible", then the rule fails and don't - bother trying it on the second pass either - since we know that will fail too. */ - DEBUGP2 ("Rejecting impossible %s dependency `%s'.\n", - p == depname ? "implicit" : "rule", p); - tryrules[i] = 0; - break; - } - - intermediate_files[deps_found] = 0; - - DEBUGP2 ("Trying %s dependency `%s'.\n", - p == depname ? "implicit" : "rule", p); - - /* The DEP->changed flag says that this dependency resides in a - nonexistent directory. So we normally can skip looking for - the file. However, if CHECK_LASTSLASH is set, then the - dependency file we are actually looking for is in a different - directory (the one gotten by prepending FILENAME's directory), - so it might actually exist. */ - - if ((!dep->changed || check_lastslash) - && (lookup_file (p) != 0 || file_exists_p (p))) - { - found_files[deps_found++] = savestring (p, strlen (p)); - continue; - } - /* This code, given FILENAME = "lib/foo.o", dependency name - "lib/foo.c", and VPATH=src, searches for "src/lib/foo.c". */ - if (vpath_search (&p, (time_t *) 0)) - { - DEBUGP2 ("Found dependency as `%s'.%s\n", p, ""); - found_files[deps_found++] = p; - continue; - } - - /* We could not find the file in any place we should look. - Try to make this dependency as an intermediate file, - but only on the second pass. */ - - if (intermed_ok) - { - if (intermediate_file == 0) - intermediate_file - = (struct file *) alloca (sizeof (struct file)); - - DEBUGP2 ("Looking for a rule with %s file `%s'.\n", - "intermediate", p); - - bzero ((char *) intermediate_file, sizeof (struct file)); - intermediate_file->name = p; - if (pattern_search (intermediate_file, 0, depth + 1, - recursions + 1)) - { - p = savestring (p, strlen (p)); - intermediate_patterns[deps_found] - = intermediate_file->name; - intermediate_file->name = p; - intermediate_files[deps_found] = intermediate_file; - intermediate_file = 0; - /* Allocate an extra copy to go in FOUND_FILES, - because every elt of FOUND_FILES is consumed - or freed later. */ - found_files[deps_found] = savestring (p, strlen (p)); - ++deps_found; - continue; - } - - /* If we have tried to find P as an intermediate - file and failed, mark that name as impossible - so we won't go through the search again later. */ - file_impossible (p); - } - - /* A dependency of this rule does not exist. - Therefore, this rule fails. */ - break; - } - - /* This rule is no longer `in use' for recursive searches. */ - rule->in_use = 0; - - if (dep != 0) - { - /* This pattern rule does not apply. - If some of its dependencies succeeded, - free the data structure describing them. */ - while (deps_found-- > 0) - { - register struct file *f = intermediate_files[deps_found]; - free (found_files[deps_found]); - if (f != 0 - && (f->stem < f->name - || f->stem > f->name + strlen (f->name))) - free (f->stem); - } - } - else - /* This pattern rule does apply. Stop looking for one. */ - break; - } - - /* If we found an applicable rule without - intermediate files, don't try with them. */ - if (i < nrules) - break; - - rule = 0; - } - - /* RULE is nil if the loop went all the way - through the list and everything failed. */ - if (rule == 0) - return 0; - - foundrule = i; - - /* If we are recursing, store the pattern that matched - FILENAME in FILE->name for use in upper levels. */ - - if (recursions > 0) - /* Kludge-o-matic */ - file->name = rule->targets[matches[foundrule]]; - - /* FOUND_FILES lists the dependencies for the rule we found. - This includes the intermediate files, if any. - Convert them into entries on the deps-chain of FILE. */ - - while (deps_found-- > 0) - { - register char *s; - - if (intermediate_files[deps_found] != 0) - { - /* If we need to use an intermediate file, - make sure it is entered as a target, with the info that was - found for it in the recursive pattern_search call. - We know that the intermediate file did not already exist as - a target; therefore we can assume that the deps and cmds - of F below are null before we change them. */ - - struct file *imf = intermediate_files[deps_found]; - register struct file *f = enter_file (imf->name); - f->deps = imf->deps; - f->cmds = imf->cmds; - f->stem = imf->stem; - imf = lookup_file (intermediate_patterns[deps_found]); - if (imf != 0 && imf->precious) - f->precious = 1; - f->intermediate = 1; - f->tried_implicit = 1; - for (dep = f->deps; dep != 0; dep = dep->next) - { - dep->file = enter_file (dep->name); - dep->name = 0; - dep->file->tried_implicit |= dep->changed; - } - num_intermediates++; - } - - dep = (struct dep *) xmalloc (sizeof (struct dep)); - s = found_files[deps_found]; - if (recursions == 0) - { - dep->name = 0; - dep->file = lookup_file (s); - if (dep->file == 0) - /* enter_file consumes S's storage. */ - dep->file = enter_file (s); - else - /* A copy of S is already allocated in DEP->file->name. - So we can free S. */ - free (s); - } - else - { - dep->name = s; - dep->file = 0; - dep->changed = 0; - } - if (intermediate_files[deps_found] == 0 && tryrules[foundrule]->terminal) - { - /* If the file actually existed (was not an intermediate file), - and the rule that found it was a terminal one, then we want - to mark the found file so that it will not have implicit rule - search done for it. If we are not entering a `struct file' for - it now, we indicate this with the `changed' flag. */ - if (dep->file == 0) - dep->changed = 1; - else - dep->file->tried_implicit = 1; - } - dep->next = file->deps; - file->deps = dep; - } - - if (!checked_lastslash[foundrule]) - /* Always allocate new storage, since STEM might be - on the stack for an intermediate file. */ - file->stem = savestring (stem, stemlen); - else - { - /* We want to prepend the directory from - the original FILENAME onto the stem. */ - file->stem = (char *) xmalloc (((lastslash + 1) - filename) - + stemlen + 1); - bcopy (filename, file->stem, (lastslash + 1) - filename); - bcopy (stem, file->stem + ((lastslash + 1) - filename), stemlen); - file->stem[((lastslash + 1) - filename) + stemlen] = '\0'; - } - - file->cmds = rule->cmds; - - /* Put the targets other than the one that - matched into FILE's `also_make' member. */ - - /* If there was only one target, there is nothing to do. */ - if (rule->targets[1] != 0) - for (i = 0; rule->targets[i] != 0; ++i) - if (i != matches[foundrule]) - { - struct dep *new = (struct dep *) xmalloc (sizeof (struct dep)); - new->name = p = (char *) xmalloc (rule->lens[i] + stemlen + 1); - bcopy (rule->targets[i], p, - rule->suffixes[i] - rule->targets[i] - 1); - p += rule->suffixes[i] - rule->targets[i] - 1; - bcopy (stem, p, stemlen); - p += stemlen; - bcopy (rule->suffixes[i], p, - rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1); - new->file = enter_file (new->name); - new->next = file->also_make; - file->also_make = new; - } - - - return 1; -} diff --git a/buildtools/windows/source/make/install-sh b/buildtools/windows/source/make/install-sh deleted file mode 100644 index 89fc9b098b8..00000000000 --- a/buildtools/windows/source/make/install-sh +++ /dev/null @@ -1,238 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. -# - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -tranformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/buildtools/windows/source/make/job.c b/buildtools/windows/source/make/job.c deleted file mode 100644 index 5d8cc42c6e8..00000000000 --- a/buildtools/windows/source/make/job.c +++ /dev/null @@ -1,1852 +0,0 @@ -/* Job execution and handling for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "job.h" -#include "file.h" -#include "variable.h" -#include -#if defined(NETSCAPE) -#include "direct.h" -#include -#endif - - -/* Default shell to use. */ -#if defined(NETSCAPE) -char default_shell[] = "shmsdos"; -#else -char default_shell[] = "/bin/sh"; -#endif - -#if defined(__MSDOS__) || defined(NETSCAPE) -#include -#include -static int dos_pid = 123; -static int dos_status; -static char *dos_bname; -static char *dos_bename; -static int dos_batch_file; -#endif /* MSDOS. */ - - -/* If NGROUPS_MAX == 0 then try other methods for finding a real value. */ -#if defined (NGROUPS_MAX) && NGROUPS_MAX == 0 -#undef NGROUPS_MAX -#endif /* NGROUPS_MAX == 0 */ - -#ifndef NGROUPS_MAX -#ifdef POSIX -#define GET_NGROUPS_MAX sysconf (_SC_NGROUPS_MAX) -#else /* Not POSIX. */ -#define NGROUPS_MAX NGROUPS -#endif /* POSIX. */ -#endif - -#ifdef HAVE_SYS_WAIT_H -#include -#endif - -#ifdef HAVE_WAITPID -#define WAIT_NOHANG(status) waitpid (-1, (status), WNOHANG) -#else /* Don't have waitpid. */ -#ifdef HAVE_WAIT3 -#ifndef wait3 -extern int wait3 (); -#endif -#define WAIT_NOHANG(status) wait3 ((status), WNOHANG, (struct rusage *) 0) -#endif /* Have wait3. */ -#endif /* Have waitpid. */ - -#if !defined (wait) && !defined (POSIX) -extern int wait (); -#endif - -#ifndef HAVE_UNION_WAIT - -#define WAIT_T int - -#ifndef WTERMSIG -#define WTERMSIG(x) ((x) & 0x7f) -#endif -#ifndef WCOREDUMP -#define WCOREDUMP(x) ((x) & 0x80) -#endif -#ifndef WEXITSTATUS -#define WEXITSTATUS(x) (((x) >> 8) & 0xff) -#endif -#ifndef WIFSIGNALED -#define WIFSIGNALED(x) (WTERMSIG (x) != 0) -#endif -#ifndef WIFEXITED -#define WIFEXITED(x) (WTERMSIG (x) == 0) -#endif - -#else /* Have `union wait'. */ - -#define WAIT_T union wait -#ifndef WTERMSIG -#define WTERMSIG(x) ((x).w_termsig) -#endif -#ifndef WCOREDUMP -#define WCOREDUMP(x) ((x).w_coredump) -#endif -#ifndef WEXITSTATUS -#define WEXITSTATUS(x) ((x).w_retcode) -#endif -#ifndef WIFSIGNALED -#define WIFSIGNALED(x) (WTERMSIG(x) != 0) -#endif -#ifndef WIFEXITED -#define WIFEXITED(x) (WTERMSIG(x) == 0) -#endif - -#endif /* Don't have `union wait'. */ - - -#ifndef HAVE_UNISTD_H -extern int dup2 (); -extern int execve (); -extern void _exit (); -extern int geteuid (), getegid (); -extern int setgid (), getgid (); -#endif - -#define getdtablesize() 256 - -#ifndef getdtablesize -#ifdef HAVE_GETDTABLESIZE -extern int getdtablesize (); -#else -#ifdef HAVE_SYSCONF_OPEN_MAX -#define getdtablesize() ((int) sysconf (_SC_OPEN_MAX)) -#else -#include -#define getdtablesize() NOFILE -#if !defined (NOFILE) && defined (NOFILES_MAX) -/* SCO 3.2 "devsys 4.2" defines NOFILES_{MIN,MAX} in lieu of NOFILE. */ -#define NOFILE NOFILES_MAX -#endif -#endif -#endif -#endif - -extern int getloadavg (); -extern int start_remote_job_p (); -extern int start_remote_job (), remote_status (); - -RETSIGTYPE child_handler (); -static void free_child (), start_job_command (); -static int load_too_high (), job_next_command (); - -/* Chain of all live (or recently deceased) children. */ - -struct child *children = 0; - -/* Number of children currently running. */ - -unsigned int job_slots_used = 0; - -/* Nonzero if the `good' standard input is in use. */ - -static int good_stdin_used = 0; - -/* Chain of children waiting to run until the load average goes down. */ - -static struct child *waiting_jobs = 0; - -/* Write an error message describing the exit status given in - EXIT_CODE, EXIT_SIG, and COREDUMP, for the target TARGET_NAME. - Append "(ignored)" if IGNORED is nonzero. */ - -static void -child_error (target_name, exit_code, exit_sig, coredump, ignored) - char *target_name; - int exit_code, exit_sig, coredump; - int ignored; -{ - if (exit_sig == 0) - error (ignored ? "[%s] Error %d (ignored)" : - "*** [%s] Error %d", - target_name, exit_code); - else - error ("*** [%s] %s%s", - target_name, strsignal (exit_sig), - coredump ? " (core dumped)" : ""); -} - -static unsigned int dead_children = 0; - -/* Notice that a child died. - reap_children should be called when convenient. */ -RETSIGTYPE -child_handler (sig) - int sig; -{ - ++dead_children; - - if (debug_flag) - printf ("Got a SIGCHLD; %d unreaped children.\n", dead_children); -} - -extern int shell_function_pid, shell_function_completed; - -/* Reap dead children, storing the returned status and the new command - state (`cs_finished') in the `file' member of the `struct child' for the - dead child, and removing the child from the chain. If BLOCK nonzero, - reap at least one child, waiting for it to die if necessary. If ERR is - nonzero, print an error message first. */ - -void -reap_children (block, err) - int block, err; -{ - WAIT_T status; - - while ((children != 0 || shell_function_pid != 0) && - (block || dead_children > 0)) - { - int remote = 0; - register int pid; - int exit_code, exit_sig, coredump; - register struct child *lastc, *c; - int child_failed; - int any_remote, any_local; - - if (err && dead_children == 0) - { - /* We might block for a while, so let the user know why. */ - fflush (stdout); - error ("*** Waiting for unfinished jobs...."); - } - - /* We have one less dead child to reap. - The test and decrement are not atomic; if it is compiled into: - register = dead_children - 1; - dead_children = register; - a SIGCHLD could come between the two instructions. - child_handler increments dead_children. - The second instruction here would lose that increment. But the - only effect of dead_children being wrong is that we might wait - longer than necessary to reap a child, and lose some parallelism; - and we might print the "Waiting for unfinished jobs" message above - when not necessary. */ - - if (dead_children != 0) - --dead_children; - - any_remote = 0; - any_local = shell_function_pid != -1; - for (c = children; c != 0; c = c->next) - { - any_remote |= c->remote; - any_local |= ! c->remote; - if (debug_flag) - printf ("Live child 0x%08lx PID %d%s\n", - (unsigned long int) c, - c->pid, c->remote ? " (remote)" : ""); - } - - /* First, check for remote children. */ - if (any_remote) - pid = remote_status (&exit_code, &exit_sig, &coredump, 0); - else - pid = 0; - if (pid < 0) - { -#if !defined(__MSDOS__) && !defined(NETSCAPE) - remote_status_lose: -#endif -#ifdef EINTR - if (errno == EINTR) - continue; -#endif - pfatal_with_name ("remote_status"); - } - else if (pid == 0) - { -#if !defined(__MSDOS__) && !defined(NETSCAPE) - /* No remote children. Check for local children. */ - - if (any_local) - { -#ifdef WAIT_NOHANG - if (!block) - pid = WAIT_NOHANG (&status); - else -#endif - pid = wait (&status); - } - else - pid = 0; - - if (pid < 0) - { -#ifdef EINTR - if (errno == EINTR) - continue; -#endif - pfatal_with_name ("wait"); - } - else if (pid == 0) - { - /* No local children. */ - if (block && any_remote) - { - /* Now try a blocking wait for a remote child. */ - pid = remote_status (&exit_code, &exit_sig, &coredump, 1); - if (pid < 0) - goto remote_status_lose; - else if (pid == 0) - /* No remote children either. Finally give up. */ - break; - else - /* We got a remote child. */ - remote = 1; - } - else - break; - } - else - { - /* Chop the status word up. */ - exit_code = WEXITSTATUS (status); - exit_sig = WIFSIGNALED (status) ? WTERMSIG (status) : 0; - coredump = WCOREDUMP (status); - } -#else /* MSDOS. */ - /* Life is very different on MSDOS. */ - pid = dos_pid - 1; - status = dos_status; - exit_code = dos_status; - exit_sig = 0; - coredump = 0; -#endif /* Not MSDOS. */ - } - else - /* We got a remote child. */ - remote = 1; - - /* Check if this is the child of the `shell' function. */ - if (!remote && pid == shell_function_pid) - { - /* It is. Leave an indicator for the `shell' function. */ - if (exit_sig == 0 && exit_code == 127) - shell_function_completed = -1; - else - shell_function_completed = 1; - break; - } - - child_failed = exit_sig != 0 || exit_code != 0; - - /* Search for a child matching the deceased one. */ - lastc = 0; - for (c = children; c != 0; lastc = c, c = c->next) - if ((int)c->remote == remote && (int)c->pid == pid) - break; - - if (c == 0) - { - /* An unknown child died. */ - char buf[100]; - sprintf (buf, "Unknown%s job %d", remote ? " remote" : "", pid); - if (child_failed) - child_error (buf, exit_code, exit_sig, coredump, - ignore_errors_flag); - else - error ("%s finished.", buf); - } - else - { - if (debug_flag) - printf ("Reaping %s child 0x%08lx PID %d%s\n", - child_failed ? "losing" : "winning", - (unsigned long int) c, - c->pid, c->remote ? " (remote)" : ""); - - /* If this child had the good stdin, say it is now free. */ - if (c->good_stdin) - good_stdin_used = 0; - - if (child_failed && !c->noerror && !ignore_errors_flag) - { - /* The commands failed. Write an error message, - delete non-precious targets, and abort. */ - static int delete_on_error = -1; - child_error (c->file->name, exit_code, exit_sig, coredump, 0); - c->file->update_status = 2; - if (delete_on_error == -1) - { - struct file *f = lookup_file (".DELETE_ON_ERROR"); - delete_on_error = f != 0 && f->is_target; - } - if (exit_sig != 0 || delete_on_error) - delete_child_targets (c); - } - else - { - if (child_failed) - { - /* The commands failed, but we don't care. */ - child_error (c->file->name, - exit_code, exit_sig, coredump, 1); - child_failed = 0; - } - - /* If there are more commands to run, try to start them. */ - if (job_next_command (c)) - { - if (handling_fatal_signal) - { - /* Never start new commands while we are dying. - Since there are more commands that wanted to be run, - the target was not completely remade. So we treat - this as if a command had failed. */ - c->file->update_status = 2; - } - else - { - /* Check again whether to start remotely. - Whether or not we want to changes over time. - Also, start_remote_job may need state set up - by start_remote_job_p. */ - c->remote = start_remote_job_p (); - start_job_command (c); - if (c->file->command_state == cs_running) - /* We successfully started the new command. - Loop to reap more children. */ - continue; - } - - if (c->file->update_status != 0) - /* We failed to start the commands. */ - delete_child_targets (c); - } - else - /* There are no more commands. We got through them all - without an unignored error. Now the target has been - successfully updated. */ - c->file->update_status = 0; - } - - /* When we get here, all the commands for C->file are finished - (or aborted) and C->file->update_status contains 0 or 2. But - C->file->command_state is still cs_running if all the commands - ran; notice_finish_file looks for cs_running to tell it that - it's interesting to check the file's modtime again now. */ - - if (! handling_fatal_signal) - /* Notice if the target of the commands has been changed. - This also propagates its values for command_state and - update_status to its also_make files. */ - notice_finished_file (c->file); - - if (debug_flag) - printf ("Removing child 0x%08lx PID %d%s from chain.\n", - (unsigned long int) c, - c->pid, c->remote ? " (remote)" : ""); - - /* Remove the child from the chain and free it. */ - if (lastc == 0) - children = c->next; - else - lastc->next = c->next; - if (! handling_fatal_signal) /* Avoid nonreentrancy. */ - free_child (c); - - /* There is now another slot open. */ - --job_slots_used; - - /* If the job failed, and the -k flag was not given, die, - unless we are already in the process of dying. */ - if (!err && child_failed && !keep_going_flag) - die (2); - } - - /* Only block for one child. */ - block = 0; - } -} - -/* Free the storage allocated for CHILD. */ - -static void -free_child (child) - register struct child *child; -{ - if (child->command_lines != 0) - { - register unsigned int i; - for (i = 0; i < child->file->cmds->ncommand_lines; ++i) - free (child->command_lines[i]); - free ((char *) child->command_lines); - } - - if (child->environment != 0) - { - register char **ep = child->environment; - while (*ep != 0) - free (*ep++); - free ((char *) child->environment); - } - - free ((char *) child); -} - -#if defined(POSIX) -#if defined(__MSDOS__) -void -unblock_sigs (void) -{ - return; -} -#else -extern sigset_t fatal_signal_set; - -void -unblock_sigs () -{ - sigset_t empty; - sigemptyset (&empty); - sigprocmask (SIG_SETMASK, &empty, (sigset_t *) 0); -} -#endif -#endif - -#ifdef NETSCAPE -/* - * The various spawn functions in Microsoft's runtime library - * may fail if the Path environment variable contains nonexistent - * directories. The spawn functions expect to get ENOENT in - * this situation, but on some Compaq PCs I've seen EACCES - * ("Permission denied") being returned. So I wrote our own - * process-spawning function ns_spawn(). My code is inspired - * by Microsoft's implementation of spawnvpe(). - */ - -/* - * Assemble the command line by concatenating the argv array. - * On success, this function returns 0 and the resulting command - * line is returned in *cmdLine. On failure, it returns -1. - */ -static int assembleCmdLine(char **argv, char **cmdLine) -{ - char **arg; - char *p, *q; - int cmdLineSize; - int numBackslashes; - int i; - int argNeedQuotes; - - /* - * Find out how large the command line buffer should be. - */ - cmdLineSize = 0; - for (arg = argv; *arg; arg++) { - /* - * \ and " need to be escaped by a \. In the worst case, - * every character is a \ or ", so the string of length - * may double. If we quote an argument, that needs two ". - * Finally, we need a space between arguments, and - * a null byte at the end of command line. - */ - cmdLineSize += 2 * strlen(*arg) /* \ and " need to be escaped */ - + 2 /* we quote every argument */ - + 1; /* space in between, or final null */ - } - p = *cmdLine = malloc(cmdLineSize); - if (p == NULL) { - return -1; - } - - for (arg = argv; *arg; arg++) { - /* Add a space to separates the arguments */ - if (arg != argv) { - *p++ = ' '; - } - q = *arg; - numBackslashes = 0; - argNeedQuotes = 0; - - /* If the argument contains white space, it needs to be quoted. */ - if (strpbrk(*arg, " \f\n\r\t\v")) { - argNeedQuotes = 1; - } - - if (argNeedQuotes) { - *p++ = '"'; - } - while (*q) { - if (*q == '\\') { - numBackslashes++; - q++; - } else if (*q == '"') { - if (numBackslashes) { - /* - * Double the backslashes since they are followed - * by a quote - */ - for (i = 0; i < 2 * numBackslashes; i++) { - *p++ = '\\'; - } - numBackslashes = 0; - } - /* To escape the quote */ - *p++ = '\\'; - *p++ = *q++; - } else { - if (numBackslashes) { - /* - * Backslashes are not followed by a quote, so - * don't need to double the backslashes. - */ - for (i = 0; i < numBackslashes; i++) { - *p++ = '\\'; - } - numBackslashes = 0; - } - *p++ = *q++; - } - } - - /* Now we are at the end of this argument */ - if (numBackslashes) { - /* - * Double the backslashes if we have a quote string - * delimiter at the end. - */ - if (argNeedQuotes) { - numBackslashes *= 2; - } - for (i = 0; i < numBackslashes; i++) { - *p++ = '\\'; - } - } - if (argNeedQuotes) { - *p++ = '"'; - } - } - - *p = '\0'; - return 0; -} - -/* - * Assemble the environment block by concatenating the envp array - * (preserving the terminating null byte in each array element) - * and adding a null byte at the end. - * - * Returns 0 on success. The resulting environment block is returned - * in *envBlock. Note that if envp is NULL, a NULL pointer is returned - * in *envBlock. Returns -1 on failure. - */ -static int assembleEnvBlock(char **envp, char **envBlock) -{ - char *p; - char *q; - char **env; - char *curEnv; - char *cwdStart, *cwdEnd; - int envBlockSize; - - if (envp == NULL) { - *envBlock = NULL; - return 0; - } - - curEnv = GetEnvironmentStrings(); - - cwdStart = curEnv; - while (*cwdStart) { - if (cwdStart[0] == '=' && cwdStart[1] != '\0' - && cwdStart[2] == ':' && cwdStart[3] == '=') { - break; - } - cwdStart += strlen(cwdStart) + 1; - } - cwdEnd = cwdStart; - if (*cwdEnd) { - cwdEnd += strlen(cwdEnd) + 1; - while (*cwdEnd) { - if (cwdEnd[0] != '=' || cwdEnd[1] == '\0' - || cwdEnd[2] != ':' || cwdEnd[3] != '=') { - break; - } - cwdEnd += strlen(cwdEnd) + 1; - } - } - envBlockSize = cwdEnd - cwdStart; - - for (env = envp; *env; env++) { - envBlockSize += strlen(*env) + 1; - } - envBlockSize++; - - p = *envBlock = malloc(envBlockSize); - if (p == NULL) { - FreeEnvironmentStrings(curEnv); - return -1; - } - - q = cwdStart; - while (q < cwdEnd) { - *p++ = *q++; - } - FreeEnvironmentStrings(curEnv); - - for (env = envp; *env; env++) { - q = *env; - while (*q) { - *p++ = *q++; - } - *p++ = '\0'; - } - *p = '\0'; - return 0; -} - -/* - * For qsort. We sort (case-insensitive) the environment strings - * before generating the environment block. - */ -static int compare(const void *arg1, const void *arg2) -{ - return _stricmp(* (char**)arg1, * (char**)arg2); -} - -/* - * Spawn a new process with arguments argv and environment envp, - * wait until it terminates, and return its exit code in *exitCode. - * Return 0 on success. Return -1 on error. Call GetLastError() - * (note: not errno) to get the error code. - */ -int ns_spawn(char **argv, char **envp, int *exitCode) -{ - char *p; - char *cmdLine; - char *envBlock; - char **newEnvp; - BOOL rv; - STARTUPINFO si; - PROCESS_INFORMATION pi; - - /* - * Before invoking the command, change forward slashes - * in argv[0] to backslashes. - */ - for (p = argv[0]; *p; p++) { - if (*p == '/') { - *p = '\\'; - } - } - - if (assembleCmdLine(argv, &cmdLine) == -1) { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return -1; - } - - if (envp == NULL) { - newEnvp = NULL; - } else { - int i; - int numEnv = 0; - while (envp[numEnv]) { - numEnv++; - } - newEnvp = (char **) malloc((numEnv+1) * sizeof(char *)); - for (i = 0; i <= numEnv; i++) { - newEnvp[i] = envp[i]; - } - qsort((void *) newEnvp, (size_t) numEnv, sizeof(char *), compare); - } - if (assembleEnvBlock(newEnvp, &envBlock) == -1) { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - free(cmdLine); - return -1; - } - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - - rv = CreateProcess( - NULL, - cmdLine, - NULL, - NULL, - TRUE, - 0, - envBlock, - NULL, - &si, - &pi); - free(cmdLine); - free(envBlock); - if (!rv) { - return -1; - } - CloseHandle(pi.hThread); - WaitForSingleObject(pi.hProcess, INFINITE); - if (exitCode) { - GetExitCodeProcess(pi.hProcess, exitCode); - } - CloseHandle(pi.hProcess); - return 0; -} -#endif /* NETSCAPE */ - -/* Start a job to run the commands specified in CHILD. - CHILD is updated to reflect the commands and ID of the child process. */ - -static void -start_job_command (child) - register struct child *child; -{ -#ifndef NETSCAPE - static int bad_stdin = -1; -#endif - register char *p; - int flags; - char **argv; - - /* Combine the flags parsed for the line itself with - the flags specified globally for this target. */ - flags = (child->file->command_flags - | child->file->cmds->lines_flags[child->command_line - 1]); - - p = child->command_ptr; - child->noerror = flags & COMMANDS_NOERROR; - while (*p != '\0') - { - if (*p == '@') - flags |= COMMANDS_SILENT; - else if (*p == '+') - flags |= COMMANDS_RECURSE; - else if (*p == '-') - child->noerror = 1; - else if (!isblank (*p) && *p != '+') - break; - ++p; - } - - /* If -q was given, just say that updating `failed'. The exit status of - 1 tells the user that -q is saying `something to do'; the exit status - for a random error is 2. */ - if (question_flag && !(flags & COMMANDS_RECURSE)) - { - child->file->update_status = 1; - notice_finished_file (child->file); - return; - } - - /* There may be some preceding whitespace left if there - was nothing but a backslash on the first line. */ - p = next_token (p); - - /* Figure out an argument list from this command line. */ - - { - char *end; - argv = construct_command_argv (p, &end, child->file); - if (end == NULL) - child->command_ptr = NULL; - else - { - *end++ = '\0'; - child->command_ptr = end; - } - } - - if (touch_flag && !(flags & COMMANDS_RECURSE)) - { - /* Go on to the next command. It might be the recursive one. - We construct ARGV only to find the end of the command line. */ - free (argv[0]); - free ((char *) argv); - argv = 0; - } - - if (argv == 0) - { - next_command: - /* This line has no commands. Go to the next. */ - if (job_next_command (child)) - start_job_command (child); - else - { - /* No more commands. All done. */ - child->file->update_status = 0; - notice_finished_file (child->file); - } - return; - } - - /* Print out the command. */ - - if (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag)) - puts (p); - - /* Tell update_goal_chain that a command has been started on behalf of - this target. It is important that this happens here and not in - reap_children (where we used to do it), because reap_children might be - reaping children from a different target. We want this increment to - guaranteedly indicate that a command was started for the dependency - chain (i.e., update_file recursion chain) we are processing. */ - - ++commands_started; - - /* If -n was given, recurse to get the next line in the sequence. */ - - if (just_print_flag && !(flags & COMMANDS_RECURSE)) - { - free (argv[0]); - free ((char *) argv); - goto next_command; - } - - /* Flush the output streams so they won't have things written twice. */ - - fflush (stdout); - fflush (stderr); - -#ifndef NETSCAPE - /* Set up a bad standard input that reads from a broken pipe. */ - - if (bad_stdin == -1) - { - /* Make a file descriptor that is the read end of a broken pipe. - This will be used for some children's standard inputs. */ - int pd[2]; - if (pipe (pd) == 0) - { - /* Close the write side. */ - (void) close (pd[1]); - /* Save the read side. */ - bad_stdin = pd[0]; - } - } -#endif - - /* Decide whether to give this child the `good' standard input - (one that points to the terminal or whatever), or the `bad' one - that points to the read side of a broken pipe. */ - - child->good_stdin = !good_stdin_used; - if (child->good_stdin) - good_stdin_used = 1; - - child->deleted = 0; - - /* Set up the environment for the child. */ - if (child->environment == 0) - child->environment = target_environment (child->file); - -#if !defined(__MSDOS__) && !defined(NETSCAPE) - - /* start_waiting_job has set CHILD->remote if we can start a remote job. */ - if (child->remote) - { - int is_remote, id, used_stdin; - if (start_remote_job (argv, child->environment, - child->good_stdin ? 0 : bad_stdin, - &is_remote, &id, &used_stdin)) - goto error; - else - { - if (child->good_stdin && !used_stdin) - { - child->good_stdin = 0; - good_stdin_used = 0; - } - child->remote = is_remote; - child->pid = id; - } - } - else - { - /* Fork the child process. */ - - char **parent_environ; - -#ifdef POSIX - (void) sigprocmask (SIG_BLOCK, &fatal_signal_set, (sigset_t *) 0); -#else -#ifdef HAVE_SIGSETMASK - (void) sigblock (fatal_signal_mask); -#endif -#endif - - child->remote = 0; - parent_environ = environ; - child->pid = vfork (); - environ = parent_environ; /* Restore value child may have clobbered. */ - if (child->pid == 0) - { - /* We are the child side. */ - unblock_sigs (); - child_execute_job (child->good_stdin ? 0 : bad_stdin, 1, - argv, child->environment); - } - else if (child->pid < 0) - { - /* Fork failed! */ - unblock_sigs (); - perror_with_name ("vfork", ""); - goto error; - } - } - -#else /* MSDOS. */ -#ifdef NETSCAPE - if (ns_spawn (argv, child->environment, &dos_status) == -1) - { - char errMsg[128]; - FormatMessage ( - FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - GetLastError (), - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), /* default language */ - errMsg, - sizeof (errMsg), - NULL - ); - error ("%s: %s", argv[0], errMsg); - dos_status = -1; - } -#else - dos_status = spawnvpe (P_WAIT, argv[0], argv, child->environment); -#endif - ++dead_children; - child->pid = dos_pid++; - if (dos_batch_file) - { - dos_batch_file = 0; - remove (dos_bname); /* Ignore errors. */ - if (access (dos_bename, 0)) - dos_status = 1; - else - dos_status = 0; - remove (dos_bename); - } -#endif /* Not MSDOS. */ - - /* We are the parent side. Set the state to - say the commands are running and return. */ - - set_command_state (child->file, cs_running); - - /* Free the storage used by the child's argument list. */ - - free (argv[0]); - free ((char *) argv); - - return; - -#if !defined(__MSDOS__) && !defined(NETSCAPE) - error: - child->file->update_status = 2; - notice_finished_file (child->file); -#endif -} - -/* Try to start a child running. - Returns nonzero if the child was started (and maybe finished), or zero if - the load was too high and the child was put on the `waiting_jobs' chain. */ - -static int -start_waiting_job (c) - struct child *c; -{ - /* If we can start a job remotely, we always want to, and don't care about - the local load average. We record that the job should be started - remotely in C->remote for start_job_command to test. */ - - c->remote = start_remote_job_p (); - - /* If this job is to be started locally, and we are already running - some jobs, make this one wait if the load average is too high. */ - if (!c->remote && job_slots_used > 0 && load_too_high ()) - { - /* Put this child on the chain of children waiting - for the load average to go down. */ - set_command_state (c->file, cs_running); - c->next = waiting_jobs; - waiting_jobs = c; - return 0; - } - - /* Start the first command; reap_children will run later command lines. */ - start_job_command (c); - - switch (c->file->command_state) - { - case cs_running: - c->next = children; - if (debug_flag) - printf ("Putting child 0x%08lx PID %05d%s on the chain.\n", - (unsigned long int) c, - c->pid, c->remote ? " (remote)" : ""); - children = c; - /* One more job slot is in use. */ - ++job_slots_used; - unblock_sigs (); - break; - - case cs_not_started: - /* All the command lines turned out to be empty. */ - c->file->update_status = 0; - /* FALLTHROUGH */ - - case cs_finished: - notice_finished_file (c->file); - free_child (c); - break; - - default: - assert (c->file->command_state == cs_finished); - break; - } - - return 1; -} - -/* Create a `struct child' for FILE and start its commands running. */ - -void -new_job (file) - register struct file *file; -{ - register struct commands *cmds = file->cmds; - register struct child *c; - char **lines; - register unsigned int i; - - /* Let any previously decided-upon jobs that are waiting - for the load to go down start before this new one. */ - start_waiting_jobs (); - - /* Reap any children that might have finished recently. */ - reap_children (0, 0); - - /* Chop the commands up into lines if they aren't already. */ - chop_commands (cmds); - - if (job_slots != 0) - /* Wait for a job slot to be freed up. */ - while (job_slots_used == job_slots) - reap_children (1, 0); - - /* Expand the command lines and store the results in LINES. */ - lines = (char **) xmalloc (cmds->ncommand_lines * sizeof (char *)); - for (i = 0; i < cmds->ncommand_lines; ++i) - { - /* Collapse backslash-newline combinations that are inside variable - or function references. These are left alone by the parser so - that they will appear in the echoing of commands (where they look - nice); and collapsed by construct_command_argv when it tokenizes. - But letting them survive inside function invocations loses because - we don't want the functions to see them as part of the text. */ - - char *in, *out, *ref; - - /* IN points to where in the line we are scanning. - OUT points to where in the line we are writing. - When we collapse a backslash-newline combination, - IN gets ahead out OUT. */ - - in = out = cmds->command_lines[i]; - while ((ref = index (in, '$')) != 0) - { - ++ref; /* Move past the $. */ - - if (out != in) - /* Copy the text between the end of the last chunk - we processed (where IN points) and the new chunk - we are about to process (where REF points). */ - bcopy (in, out, ref - in); - - /* Move both pointers past the boring stuff. */ - out += ref - in; - in = ref; - - if (*ref == '(' || *ref == '{') - { - char openparen = *ref; - char closeparen = openparen == '(' ? ')' : '}'; - int count; - char *p; - - *out++ = *in++; /* Copy OPENPAREN. */ - /* IN now points past the opening paren or brace. - Count parens or braces until it is matched. */ - count = 0; - while (*in != '\0') - { - if (*in == closeparen && --count < 0) - break; - else if (*in == '\\' && in[1] == '\n') - { - /* We have found a backslash-newline inside a - variable or function reference. Eat it and - any following whitespace. */ - - int quoted = 0; - for (p = in - 1; p > ref && *p == '\\'; --p) - quoted = !quoted; - - if (quoted) - /* There were two or more backslashes, so this is - not really a continuation line. We don't collapse - the quoting backslashes here as is done in - collapse_continuations, because the line will - be collapsed again after expansion. */ - *out++ = *in++; - else - { - /* Skip the backslash, newline and - any following whitespace. */ - in = next_token (in + 2); - - /* Discard any preceding whitespace that has - already been written to the output. */ - while (out > ref && isblank (out[-1])) - --out; - - /* Replace it all with a single space. */ - *out++ = ' '; - } - } - else - { - if (*in == openparen) - ++count; - - *out++ = *in++; - } - } - } - } - - /* There are no more references in this line to worry about. - Copy the remaining uninteresting text to the output. */ - if (out != in) - strcpy (out, in); - - /* Finally, expand the line. */ - lines[i] = allocated_variable_expand_for_file (cmds->command_lines[i], - file); - } - - /* Start the command sequence, record it in a new - `struct child', and add that to the chain. */ - - c = (struct child *) xmalloc (sizeof (struct child)); - c->file = file; - c->command_lines = lines; - c->command_line = 0; - c->command_ptr = 0; - c->environment = 0; - - /* Fetch the first command line to be run. */ - job_next_command (c); - - /* The job is now primed. Start it running. - (This will notice if there are in fact no commands.) */ - start_waiting_job (c); - - if (job_slots == 1) - /* Since there is only one job slot, make things run linearly. - Wait for the child to die, setting the state to `cs_finished'. */ - while (file->command_state == cs_running) - reap_children (1, 0); -} - -/* Move CHILD's pointers to the next command for it to execute. - Returns nonzero if there is another command. */ - -static int -job_next_command (child) - struct child *child; -{ - while (child->command_ptr == 0 || *child->command_ptr == '\0') - { - /* There are no more lines in the expansion of this line. */ - if (child->command_line == child->file->cmds->ncommand_lines) - { - /* There are no more lines to be expanded. */ - child->command_ptr = 0; - return 0; - } - else - /* Get the next line to run. */ - child->command_ptr = child->command_lines[child->command_line++]; - } - return 1; -} - -static int -load_too_high () -{ -#ifdef __MSDOS__ - return 1; -#else - extern int getloadavg (); - double load; - - if (max_load_average < 0) - return 0; - - make_access (); - if (getloadavg (&load, 1) != 1) - { - static int lossage = -1; - /* Complain only once for the same error. */ - if (lossage == -1 || errno != lossage) - { - if (errno == 0) - /* An errno value of zero means getloadavg is just unsupported. */ - error ("cannot enforce load limits on this operating system"); - else - perror_with_name ("cannot enforce load limit: ", "getloadavg"); - } - lossage = errno; - load = 0; - } - user_access (); - - return load >= max_load_average; -#endif -} - -/* Start jobs that are waiting for the load to be lower. */ - -void -start_waiting_jobs () -{ - struct child *job; - - if (waiting_jobs == 0) - return; - - do - { - /* Check for recently deceased descendants. */ - reap_children (0, 0); - - /* Take a job off the waiting list. */ - job = waiting_jobs; - waiting_jobs = job->next; - - /* Try to start that job. We break out of the loop as soon - as start_waiting_job puts one back on the waiting list. */ - } while (start_waiting_job (job) && waiting_jobs != 0); -} - -/* Replace the current process with one executing the command in ARGV. - STDIN_FD and STDOUT_FD are used as the process's stdin and stdout; ENVP is - the environment of the new program. This function does not return. */ - -void -child_execute_job (stdin_fd, stdout_fd, argv, envp) - int stdin_fd, stdout_fd; - char **argv, **envp; -{ - if (stdin_fd != 0) - (void) dup2 (stdin_fd, 0); - if (stdout_fd != 1) - (void) dup2 (stdout_fd, 1); - - /* Free up file descriptors. */ - { - register int d; - int max = getdtablesize (); - for (d = 3; d < max; ++d) - (void) close (d); - } - - /* Run the command. */ - exec_command (argv, envp); -} - -/* Replace the current process with one running the command in ARGV, - with environment ENVP. This function does not return. */ - -void -exec_command (argv, envp) - char **argv, **envp; -{ - /* Be the user, permanently. */ - child_access (); - - /* Run the program. */ - environ = envp; - execvp (argv[0], argv); - - switch (errno) - { - case ENOENT: - error ("%s: Command not found", argv[0]); - break; - case ENOEXEC: - { - /* The file is not executable. Try it as a shell script. */ - extern char *getenv (); - char *shell; - char **new_argv; - int argc; - - shell = getenv ("SHELL"); - if (shell == 0) - shell = default_shell; - - argc = 1; - while (argv[argc] != 0) - ++argc; - - new_argv = (char **) alloca ((1 + argc + 1) * sizeof (char *)); - new_argv[0] = shell; - new_argv[1] = program; - while (argc > 0) - { - new_argv[1 + argc] = argv[argc]; - --argc; - } - - execvp (shell, new_argv); - if (errno == ENOENT) - error ("%s: Shell program not found", shell); - else - perror_with_name ("execvp: ", shell); - break; - } - - default: - perror_with_name ("execvp: ", argv[0]); - break; - } - - _exit (127); -} - -/* Figure out the argument list necessary to run LINE as a command. Try to - avoid using a shell. This routine handles only ' quoting, and " quoting - when no backslash, $ or ` characters are seen in the quotes. Starting - quotes may be escaped with a backslash. If any of the characters in - sh_chars[] is seen, or any of the builtin commands listed in sh_cmds[] - is the first word of a line, the shell is used. - - If RESTP is not NULL, *RESTP is set to point to the first newline in LINE. - If *RESTP is NULL, newlines will be ignored. - - SHELL is the shell to use, or nil to use the default shell. - IFS is the value of $IFS, or nil (meaning the default). */ - -#ifdef __MSDOS__ - static char sh_chars[] = "\"|<>"; - static char *sh_cmds[] = { "break", "call", "cd", "chcp", "chdir", "cls", - "copy", "ctty", "date", "del", "dir", "echo", - "erase", "exit", "for", "goto", "if", "if", "md", - "mkdir", "path", "pause", "prompt", "rem", "ren", - "rename", "set", "shift", "time", "type", - "ver", "verify", "vol", ":", 0 }; -#elif defined(NETSCAPE) - static char sh_chars[] = "#;\"*?[]&|<>(){}$`^"; - static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login", - "logout", "set", "umask", "wait", "while", "for", - "case", "if", ":", ".", "break", "continue", - "export", "read", "readonly", "shift", "times", - "trap", "switch", "mkdir", "echo", "cp", "rm", - "touch", "nsinstall", "test", "mv", 0 }; -#else - static char sh_chars[] = "#;\"*?[]&|<>(){}$`^"; - static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login", - "logout", "set", "umask", "wait", "while", "for", - "case", "if", ":", ".", "break", "continue", - "export", "read", "readonly", "shift", "times", - "trap", "switch", 0 }; -#endif - -static char ** -construct_command_argv_internal (line, restp, shell, ifs) - char *line, **restp; - char *shell, *ifs; -{ - register int i; - register char *p; - register char *ap; - char *end; - int instring, word_has_equals, seen_nonequals; - char **new_argv = 0; - - if (restp != NULL) - *restp = NULL; - - /* Make sure not to bother processing an empty line. */ - while (isblank (*line)) - ++line; - if (*line == '\0') - return 0; - - /* See if it is safe to parse commands internally. */ - if (shell == 0) - shell = default_shell; - else if (strcmp (shell, default_shell)) - goto slow; - - if (ifs != 0) - for (ap = ifs; *ap != '\0'; ++ap) - if (*ap != ' ' && *ap != '\t' && *ap != '\n') - goto slow; - - i = strlen (line) + 1; - - /* More than 1 arg per character is impossible. */ - new_argv = (char **) xmalloc (i * sizeof (char *)); - - /* All the args can fit in a buffer as big as LINE is. */ - ap = new_argv[0] = (char *) xmalloc (i); - end = ap + i; - - /* I is how many complete arguments have been found. */ - i = 0; - instring = word_has_equals = seen_nonequals = 0; - for (p = line; *p != '\0'; ++p) - { - if (ap > end) - abort (); - - if (instring) - { - string_char: - /* Inside a string, just copy any char except a closing quote - or a backslash-newline combination. */ - if (*p == instring) - instring = 0; - else if (*p == '\\' && p[1] == '\n') - goto swallow_escaped_newline; - else if (*p == '\n' && restp != NULL) - { - /* End of the command line. */ - *restp = p; - goto end_of_line; - } - /* Backslash, $, and ` are special inside double quotes. - If we see any of those, punt. */ - else if (instring == '"' && index ("\\$`", *p) != 0) - goto slow; - else - *ap++ = *p; - } - else if (index (sh_chars, *p) != 0) - /* Not inside a string, but it's a special char. */ - goto slow; - else - /* Not a special char. */ - switch (*p) - { - case '=': - /* Equals is a special character in leading words before the - first word with no equals sign in it. This is not the case - with sh -k, but we never get here when using nonstandard - shell flags. */ - if (! seen_nonequals) - goto slow; - word_has_equals = 1; - *ap++ = '='; - break; - - case '\\': - /* Backslash-newline combinations are eaten. */ - if (p[1] == '\n') - { - swallow_escaped_newline: - - /* Eat the backslash, the newline, and following whitespace, - replacing it all with a single space. */ - p += 2; - - /* If there is a tab after a backslash-newline, - remove it from the source line which will be echoed, - since it was most likely used to line - up the continued line with the previous one. */ - if (*p == '\t') - strcpy (p, p + 1); - - if (instring) - goto string_char; - else - { - if (ap != new_argv[i]) - /* Treat this as a space, ending the arg. - But if it's at the beginning of the arg, it should - just get eaten, rather than becoming an empty arg. */ - goto end_of_arg; - else - p = next_token (p) - 1; - } - } - else if (p[1] != '\0') - /* Copy and skip the following char. */ - *ap++ = *++p; - break; - - case '\'': - case '"': - instring = *p; - break; - - case '\n': - if (restp != NULL) - { - /* End of the command line. */ - *restp = p; - goto end_of_line; - } - else - /* Newlines are not special. */ - *ap++ = '\n'; - break; - - case ' ': - case '\t': - end_of_arg: - /* We have the end of an argument. - Terminate the text of the argument. */ - *ap++ = '\0'; - new_argv[++i] = ap; - - /* Update SEEN_NONEQUALS, which tells us if every word - heretofore has contained an `='. */ - seen_nonequals |= ! word_has_equals; - if (word_has_equals && ! seen_nonequals) - /* An `=' in a word before the first - word without one is magical. */ - goto slow; - word_has_equals = 0; /* Prepare for the next word. */ - - /* If this argument is the command name, - see if it is a built-in shell command. - If so, have the shell handle it. */ - if (i == 1) - { - register int j; - for (j = 0; sh_cmds[j] != 0; ++j) - if (streq (sh_cmds[j], new_argv[0])) - goto slow; - } - - /* Ignore multiple whitespace chars. */ - p = next_token (p); - /* Next iteration should examine the first nonwhite char. */ - --p; - break; - - default: - *ap++ = *p; - break; - } - } - end_of_line: - - if (instring) - /* Let the shell deal with an unterminated quote. */ - goto slow; - - /* Terminate the last argument and the argument list. */ - - *ap = '\0'; - if (new_argv[i][0] != '\0') - ++i; - new_argv[i] = 0; - - if (i == 1) - { - register int j; - for (j = 0; sh_cmds[j] != 0; ++j) - if (streq (sh_cmds[j], new_argv[0])) - goto slow; - } - - if (new_argv[0] == 0) - /* Line was empty. */ - return 0; - else - return new_argv; - - slow:; -// return new_argv; - - /* We must use the shell. */ - - if (new_argv != 0) - { - /* Free the old argument list we were working on. */ - free (new_argv[0]); - free (new_argv); - } - -#if defined(__MSDOS__) - { - FILE *batch; - dos_batch_file = 1; - if (dos_bname == 0) - { - dos_bname = tempnam (".", "mk"); - for (i = 0; dos_bname[i] != '\0'; ++i) - if (dos_bname[i] == '/') - dos_bname[i] = '\\'; - dos_bename = (char *) xmalloc (strlen (dos_bname) + 5); - strcpy (dos_bename, dos_bname); - strcat (dos_bname, ".bat"); - strcat (dos_bename, ".err"); - } - batch = fopen (dos_bename, "w"); /* Create a file. */ - if (batch != NULL) - fclose (batch); - batch = fopen (dos_bname, "w"); - fputs ("@echo off\n", batch); - fputs (line, batch); - fprintf (batch, "\nif errorlevel 1 del %s\n", dos_bename); - fclose (batch); - new_argv = (char **) xmalloc(2 * sizeof(char *)); - new_argv[0] = strdup (dos_bname); - new_argv[1] = 0; - } -#else /* Not MSDOS. */ - { - /* SHELL may be a multi-word command. Construct a command line - "SHELL -c LINE", with all special chars in LINE escaped. - Then recurse, expanding this command line to get the final - argument list. */ - - unsigned int shell_len = strlen (shell); - static char minus_c[] = " -c "; - unsigned int line_len = strlen (line); - - char *new_line = (char *) alloca (shell_len + (sizeof (minus_c) - 1) - + (line_len * 2) + 1); - - ap = new_line; - bcopy (shell, ap, shell_len); - ap += shell_len; - bcopy (minus_c, ap, sizeof (minus_c) - 1); - ap += sizeof (minus_c) - 1; - for (p = line; *p != '\0'; ++p) - { - if (restp != NULL && *p == '\n') - { - *restp = p; - break; - } - else if (*p == '\\' && p[1] == '\n') - { - /* Eat the backslash, the newline, and following whitespace, - replacing it all with a single space (which is escaped - from the shell). */ - p += 2; - - /* If there is a tab after a backslash-newline, - remove it from the source line which will be echoed, - since it was most likely used to line - up the continued line with the previous one. */ - if (*p == '\t') - strcpy (p, p + 1); - - p = next_token (p); - --p; - *ap++ = '\\'; - *ap++ = ' '; - continue; - } - - if (*p == '\\' || *p == '\'' || *p == '"' - || isspace (*p) - || index (sh_chars, *p) != 0) - *ap++ = '\\'; - *ap++ = *p; - } - *ap = '\0'; - - new_argv = construct_command_argv_internal (new_line, (char **) NULL, - (char *) 0, (char *) 0); - } -#endif /* MSDOS. */ - - return new_argv; -} - -/* Figure out the argument list necessary to run LINE as a command. Try to - avoid using a shell. This routine handles only ' quoting, and " quoting - when no backslash, $ or ` characters are seen in the quotes. Starting - quotes may be escaped with a backslash. If any of the characters in - sh_chars[] is seen, or any of the builtin commands listed in sh_cmds[] - is the first word of a line, the shell is used. - - If RESTP is not NULL, *RESTP is set to point to the first newline in LINE. - If *RESTP is NULL, newlines will be ignored. - - FILE is the target whose commands these are. It is used for - variable expansion for $(SHELL) and $(IFS). */ - -char ** -construct_command_argv (line, restp, file) - char *line, **restp; - struct file *file; -{ - char *shell, *ifs; - char **argv; - - { - /* Turn off --warn-undefined-variables while we expand SHELL and IFS. */ - int save = warn_undefined_variables_flag; - warn_undefined_variables_flag = 0; - - shell = allocated_variable_expand_for_file ("$(SHELL)", file); - ifs = allocated_variable_expand_for_file ("$(IFS)", file); - - warn_undefined_variables_flag = save; - } - - argv = construct_command_argv_internal (line, restp, shell, ifs); - - free (shell); - free (ifs); - - return argv; -} - -#ifndef HAVE_DUP2 -int -dup2 (old, new) - int old, new; -{ - int fd; - - (void) close (new); - fd = dup (old); - if (fd != new) - { - (void) close (fd); - errno = EMFILE; - return -1; - } - - return fd; -} -#endif diff --git a/buildtools/windows/source/make/job.h b/buildtools/windows/source/make/job.h deleted file mode 100644 index 79832212b1b..00000000000 --- a/buildtools/windows/source/make/job.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Definitions for managing subprocesses in GNU Make. -Copyright (C) 1992, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Structure describing a running or dead child process. */ - -struct child - { - struct child *next; /* Link in the chain. */ - - struct file *file; /* File being remade. */ - - char **environment; /* Environment for commands. */ - - char **command_lines; /* Array of variable-expanded cmd lines. */ - unsigned int command_line; /* Index into above. */ - char *command_ptr; /* Ptr into command_lines[command_line]. */ - - pid_t pid; /* Child process's ID number. */ - unsigned int remote:1; /* Nonzero if executing remotely. */ - - unsigned int noerror:1; /* Nonzero if commands contained a `-'. */ - - unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */ - unsigned int deleted:1; /* Nonzero if targets have been deleted. */ - }; - -extern struct child *children; - -extern void new_job (); -extern void reap_children (); -extern void start_waiting_jobs (); - -extern char **construct_command_argv (); -extern void child_execute_job (); -extern void exec_command (); - -extern unsigned int job_slots_used; - -#ifdef POSIX -extern void unblock_sigs (); -#else -#ifdef HAVE_SIGSETMASK -extern int fatal_signal_mask; -#define unblock_sigs() sigsetmask (0) -#else -#define unblock_sigs() -#endif -#endif - -#ifdef NETSCAPE -extern int ns_spawn (char **argv, char **envp, int *exitCode); -#endif diff --git a/buildtools/windows/source/make/main.c b/buildtools/windows/source/make/main.c deleted file mode 100644 index 3e3ab5943a7..00000000000 --- a/buildtools/windows/source/make/main.c +++ /dev/null @@ -1,2035 +0,0 @@ -/* Argument parsing and main program of GNU Make. -Copyright (C) 1988, 89, 90, 91, 94, 1995 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "dep.h" -#include "file.h" -#include "variable.h" -#include "job.h" -#include "getopt.h" -#include - - -extern void print_variable_data_base (); -extern void print_dir_data_base (); -extern void print_rule_data_base (); -extern void print_file_data_base (); -extern void print_vpath_data_base (); - -#ifndef HAVE_UNISTD_H -extern int chdir (); -#endif -#ifndef STDC_HEADERS -#ifndef sun /* Sun has an incorrect decl in a header. */ -extern void exit (); -#endif -extern double atof (); -#endif -extern char *mktemp (); - -static void log_working_directory (); -static void print_data_base (), print_version (); -static void decode_switches (), decode_env_switches (); -static void define_makeflags (); -static char *quote_as_word (); - -/* The structure that describes an accepted command switch. */ - -struct command_switch - { - char c; /* The switch character. */ - - enum /* Type of the value. */ - { - flag, /* Turn int flag on. */ - flag_off, /* Turn int flag off. */ - string, /* One string per switch. */ - positive_int, /* A positive integer. */ - floating, /* A floating-point number (double). */ - ignore /* Ignored. */ - } type; - - char *value_ptr; /* Pointer to the value-holding variable. */ - - unsigned int env:1; /* Can come from MAKEFLAGS. */ - unsigned int toenv:1; /* Should be put in MAKEFLAGS. */ - unsigned int no_makefile:1; /* Don't propagate when remaking makefiles. */ - - char *noarg_value; /* Pointer to value used if no argument is given. */ - char *default_value;/* Pointer to default value. */ - - char *long_name; /* Long option name. */ - char *argdesc; /* Descriptive word for argument. */ - char *description; /* Description for usage message. */ - }; - - -/* The structure used to hold the list of strings given - in command switches of a type that takes string arguments. */ - -struct stringlist - { - char **list; /* Nil-terminated list of strings. */ - unsigned int idx; /* Index into above. */ - unsigned int max; /* Number of pointers allocated. */ - }; - - -/* The recognized command switches. */ - -/* Nonzero means do not print commands to be executed (-s). */ - -int silent_flag; - -/* Nonzero means just touch the files - that would appear to need remaking (-t) */ - -int touch_flag; - -/* Nonzero means just print what commands would need to be executed, - don't actually execute them (-n). */ - -int just_print_flag; - -/* Print debugging trace info (-d). */ - -int debug_flag = 0; - -/* Environment variables override makefile definitions. */ - -int env_overrides = 0; - -/* Nonzero means ignore status codes returned by commands - executed to remake files. Just treat them all as successful (-i). */ - -int ignore_errors_flag = 0; - -/* Nonzero means don't remake anything, just print the data base - that results from reading the makefile (-p). */ - -int print_data_base_flag = 0; - -/* Nonzero means don't remake anything; just return a nonzero status - if the specified targets are not up to date (-q). */ - -int question_flag = 0; - -/* Nonzero means do not use any of the builtin rules (-r). */ - -int no_builtin_rules_flag = 0; - -/* Nonzero means keep going even if remaking some file fails (-k). */ - -int keep_going_flag; -int default_keep_going_flag = 0; - -/* Nonzero means print directory before starting and when done (-w). */ - -int print_directory_flag = 0; - -/* Nonzero means ignore print_directory_flag and never print the directory. - This is necessary because print_directory_flag is set implicitly. */ - -int inhibit_print_directory_flag = 0; - -/* Nonzero means print version information. */ - -int print_version_flag = 0; - -/* List of makefiles given with -f switches. */ - -static struct stringlist *makefiles = 0; - - -/* Number of job slots (commands that can be run at once). */ - -unsigned int job_slots = 1; -unsigned int default_job_slots = 1; - -/* Value of job_slots that means no limit. */ - -static unsigned int inf_jobs = 0; - -/* Maximum load average at which multiple jobs will be run. - Negative values mean unlimited, while zero means limit to - zero load (which could be useful to start infinite jobs remotely - but one at a time locally). */ - -double max_load_average = -1.0; -double default_load_average = -1.0; - -/* List of directories given with -C switches. */ - -static struct stringlist *directories = 0; - -/* List of include directories given with -I switches. */ - -static struct stringlist *include_directories = 0; - -/* List of files given with -o switches. */ - -static struct stringlist *old_files = 0; - -/* List of files given with -W switches. */ - -static struct stringlist *new_files = 0; - -/* If nonzero, we should just print usage and exit. */ - -static int print_usage_flag = 0; - -/* If nonzero, we should print a warning message - for each reference to an undefined variable. */ - -int warn_undefined_variables_flag; - -/* The table of command switches. */ - -static const struct command_switch switches[] = - { - { 'b', ignore, 0, 0, 0, 0, 0, 0, - 0, 0, - "Ignored for compatibility" }, - { 'C', string, (char *) &directories, 0, 0, 0, 0, 0, - "directory", "DIRECTORY", - "Change to DIRECTORY before doing anything" }, - { 'd', flag, (char *) &debug_flag, 1, 1, 0, 0, 0, - "debug", 0, - "Print lots of debugging information" }, - { 'e', flag, (char *) &env_overrides, 1, 1, 0, 0, 0, - "environment-overrides", 0, - "Environment variables override makefiles" }, - { 'f', string, (char *) &makefiles, 0, 0, 0, 0, 0, - "file", "FILE", - "Read FILE as a makefile" }, - { 'h', flag, (char *) &print_usage_flag, 0, 0, 0, 0, 0, - "help", 0, - "Print this message and exit" }, - { 'i', flag, (char *) &ignore_errors_flag, 1, 1, 0, 0, 0, - "ignore-errors", 0, - "Ignore errors from commands" }, - { 'I', string, (char *) &include_directories, 1, 1, 0, 0, 0, - "include-dir", "DIRECTORY", - "Search DIRECTORY for included makefiles" }, - { 'j', positive_int, (char *) &job_slots, 1, 1, 0, - (char *) &inf_jobs, (char *) &default_job_slots, - "jobs", "N", - "Allow N jobs at once; infinite jobs with no arg" }, - { 'k', flag, (char *) &keep_going_flag, 1, 1, 0, - 0, (char *) &default_keep_going_flag, - "keep-going", 0, - "Keep going when some targets can't be made" }, - { 'l', floating, (char *) &max_load_average, 1, 1, 0, - (char *) &default_load_average, (char *) &default_load_average, - "load-average", "N", - "Don't start multiple jobs unless load is below N" }, - { 'm', ignore, 0, 0, 0, 0, 0, 0, - 0, 0, - "-b" }, - { 'n', flag, (char *) &just_print_flag, 1, 1, 1, 0, 0, - "just-print", 0, - "Don't actually run any commands; just print them" }, - { 'o', string, (char *) &old_files, 0, 0, 0, 0, 0, - "old-file", "FILE", - "Consider FILE to be very old and don't remake it" }, - { 'p', flag, (char *) &print_data_base_flag, 1, 1, 0, 0, 0, - "print-data-base", 0, - "Print make's internal database" }, - { 'q', flag, (char *) &question_flag, 1, 1, 1, 0, 0, - "question", 0, - "Run no commands; exit status says if up to date" }, - { 'r', flag, (char *) &no_builtin_rules_flag, 1, 1, 0, 0, 0, - "no-builtin-rules", 0, - "Disable the built-in implicit rules" }, - { 's', flag, (char *) &silent_flag, 1, 1, 0, 0, 0, - "silent", 0, - "Don't echo commands" }, - { 'S', flag_off, (char *) &keep_going_flag, 1, 1, 0, - 0, (char *) &default_keep_going_flag, - "no-keep-going", 0, - "Turns off -k" }, - { 't', flag, (char *) &touch_flag, 1, 1, 1, 0, 0, - "touch", 0, - "Touch targets instead of remaking them" }, - { 'v', flag, (char *) &print_version_flag, 1, 1, 0, 0, 0, - "version", 0, - "Print the version number of make and exit" }, - { 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0, - "print-directory", 0, - "Print the current directory" }, - { 2, flag, (char *) &inhibit_print_directory_flag, 1, 1, 0, 0, 0, - "no-print-directory", 0, - "Turn off -w, even if it was turned on implicitly" }, - { 'W', string, (char *) &new_files, 0, 0, 0, 0, 0, - "what-if", "FILE", - "Consider FILE to be infinitely new" }, - { 3, flag, (char *) &warn_undefined_variables_flag, 1, 1, 0, 0, 0, - "warn-undefined-variables", 0, - "Warn when an undefined variable is referenced" }, - { '\0', } - }; - -/* Secondary long names for options. */ - -static struct option long_option_aliases[] = - { - { "quiet", no_argument, 0, 's' }, - { "stop", no_argument, 0, 'S' }, - { "new-file", required_argument, 0, 'W' }, - { "assume-new", required_argument, 0, 'W' }, - { "assume-old", required_argument, 0, 'o' }, - { "max-load", optional_argument, 0, 'l' }, - { "dry-run", no_argument, 0, 'n' }, - { "recon", no_argument, 0, 'n' }, - { "makefile", required_argument, 0, 'f' }, - }; - -/* The usage message prints the descriptions of options starting in - this column. Make sure it leaves enough room for the longest - description to fit in less than 80 characters. */ - -#define DESCRIPTION_COLUMN 30 - -/* List of goal targets. */ - -static struct dep *goals, *lastgoal; - -/* List of variables which were defined on the command line - (or, equivalently, in MAKEFLAGS). */ - -struct command_variable - { - struct command_variable *next; - struct variable *variable; - }; -static struct command_variable *command_variables; - -/* The name we were invoked with. */ - -char *program; - -/* Our current directory before processing any -C options. */ - -char *directory_before_chdir; - -/* Our current directory after processing all -C options. */ - -char *starting_directory; - -/* Value of the MAKELEVEL variable at startup (or 0). */ - -unsigned int makelevel; - -/* First file defined in the makefile whose name does not - start with `.'. This is the default to remake if the - command line does not specify. */ - -struct file *default_goal_file; - -/* Pointer to structure for the file .DEFAULT - whose commands are used for any file that has none of its own. - This is zero if the makefiles do not define .DEFAULT. */ - -struct file *default_file; - -/* Nonzero if we have seen the magic `.POSIX' target. - This turns on pedantic compliance with POSIX.2. */ - -int posix_pedantic; - -/* Mask of signals that are being caught with fatal_error_signal. */ - -#ifdef POSIX -sigset_t fatal_signal_set; -#else -#ifdef HAVE_SIGSETMASK -int fatal_signal_mask; -#endif -#endif - -static struct file * -enter_command_line_file (name) - char *name; -{ - if (name[0] == '~') - { - char *expanded = tilde_expand (name); - if (expanded != 0) - name = expanded; /* Memory leak; I don't care. */ - } - - /* This is also done in parse_file_seq, so this is redundant - for names read from makefiles. It is here for names passed - on the command line. */ - while (name[0] == '.' && name[1] == '/' && name[2] != '\0') - { - name += 2; - while (*name == '/') - /* Skip following slashes: ".//foo" is "foo", not "/foo". */ - ++name; - } - - if (*name == '\0') - { - /* It was all slashes! Move back to the dot and truncate - it after the first slash, so it becomes just "./". */ - do - --name; - while (name[0] != '.'); - name[2] = '\0'; - } - - return enter_file (savestring (name, strlen (name))); -} - -/* Toggle -d on receipt of SIGUSR1. */ - -static RETSIGTYPE -debug_signal_handler (sig) - int sig; -{ - debug_flag = ! debug_flag; -} - -int -main (argc, argv, envp) - int argc; - char **argv; - char **envp; -{ - extern void init_dir (); - extern RETSIGTYPE fatal_error_signal (), child_handler (); - register struct file *f; - register unsigned int i; - char **p; - struct dep *read_makefiles; - PATH_VAR (current_directory); - - default_goal_file = 0; - reading_filename = 0; - reading_lineno_ptr = 0; - -#if !defined (HAVE_STRSIGNAL) && !defined (HAVE_SYS_SIGLIST) - signame_init (); -#endif - -#ifdef POSIX - sigemptyset (&fatal_signal_set); -#define ADD_SIG(sig) sigaddset (&fatal_signal_set, sig) -#else -#ifdef HAVE_SIGSETMASK - fatal_signal_mask = 0; -#define ADD_SIG(sig) fatal_signal_mask |= sigmask (sig) -#else -#define ADD_SIG(sig) -#endif -#endif - -#define FATAL_SIG(sig) \ - if (signal ((sig), fatal_error_signal) == SIG_IGN) \ - (void) signal ((sig), SIG_IGN); \ - else \ - ADD_SIG (sig); -#ifndef NETSCAPE - FATAL_SIG (SIGHUP); - FATAL_SIG (SIGQUIT); - FATAL_SIG (SIGINT); - FATAL_SIG (SIGTERM); -#endif -#ifdef SIGDANGER - FATAL_SIG (SIGDANGER); -#endif -#ifdef SIGXCPU - FATAL_SIG (SIGXCPU); -#endif -#ifdef SIGXFSZ - FATAL_SIG (SIGXFSZ); -#endif - -#undef FATAL_SIG - - /* Make sure stdout is line-buffered. */ - -#ifdef HAVE_SETLINEBUF - setlinebuf (stdout); -#else -#ifndef SETVBUF_REVERSED - setvbuf (stdout, (char *) 0, _IOLBF, BUFSIZ); -#else /* setvbuf not reversed. */ - /* Some buggy systems lose if we pass 0 instead of allocating ourselves. */ - setvbuf (stdout, _IOLBF, xmalloc (BUFSIZ), BUFSIZ); -#endif /* setvbuf reversed. */ -#endif /* setlinebuf missing. */ - - /* Initialize the directory hashing code. */ - init_dir (); - - /* Figure out where this program lives. */ - - if (argv[0] == 0) - argv[0] = ""; - if (argv[0][0] == '\0') - program = "make"; - else - { - program = rindex (argv[0], '/'); -#if defined(__MSDOS__) || defined(NETSCAPE) - if (program == 0) - program = rindex (argv[0], '\\'); - if (program == 0) - program = rindex (argv[0], ':'); -#endif - if (program == 0) - program = argv[0]; - else - ++program; - } - - /* Set up to access user data (files). */ - user_access (); - - /* Figure out where we are. */ - - if (getcwd (current_directory, GET_PATH_MAX) == 0) - { -#ifdef HAVE_GETCWD - perror_with_name ("getcwd: ", ""); -#else - error ("getwd: %s", current_directory); -#endif - current_directory[0] = '\0'; - directory_before_chdir = 0; - } - else - directory_before_chdir = savestring (current_directory, - strlen (current_directory)); - - /* Read in variables from the environment. It is important that this be - done before $(MAKE) is are figured out so its definitions will not be - one from the environment. */ - - for (i = 0; envp[i] != 0; ++i) - { - register char *ep = envp[i]; - while (*ep != '=') - ++ep; - /* The result of pointer arithmetic is cast to unsigned int for - machines where ptrdiff_t is a different size that doesn't widen - the same. */ - define_variable (envp[i], (unsigned int) (ep - envp[i]), - ep + 1, o_env, 1) - /* Force exportation of every variable culled from the environment. - We used to rely on target_environment's v_default code to do this. - But that does not work for the case where an environment variable - is redefined in a makefile with `override'; it should then still - be exported, because it was originally in the environment. */ - ->export = v_export; - } - - /* Decode the switches. */ - - decode_env_switches ("MAKEFLAGS", 9); -#if 0 - /* People write things like: - MFLAGS="CC=gcc -pipe" "CFLAGS=-g" - and we set the -p, -i and -e switches. Doesn't seem quite right. */ - decode_env_switches ("MFLAGS", 6); -#endif - decode_switches (argc, argv, 0); - - /* Print version information. */ - - if (print_version_flag || print_data_base_flag || debug_flag) - print_version (); - - /* `make --version' is supposed to just print the version and exit. */ - if (print_version_flag) - die (0); - -#if !defined(__MSDOS__) - /* Set the "MAKE_COMMAND" variable to the name we were invoked with. - (If it is a relative pathname with a slash, prepend our directory name - so the result will run the same program regardless of the current dir. - If it is a name with no slash, we can only hope that PATH did not - find it in the current directory.) */ - -#if !defined(NETSCAPE) - - if (current_directory[0] != '\0' - && argv[0] != 0 && argv[0][0] != '/' && index (argv[0], '/') != 0) - argv[0] = concat (current_directory, "/", argv[0]); - -#else /* NETSCAPE */ - - /* - * All the comments above apply, plus the following. - * - * Windows NT seems to allow both '/' and '\' as directory separator. - * Moreover, an absolute pathname on Windows does not always start with - * a slash or backslash. It may start with a drive letter and a colon, - * followed by a slash or a backslash. We use the rule that - * if the pathname contains a colon, then it is an absolute path. - */ - - if (current_directory[0] != '\0' - && argv[0] != 0 && argv[0][0] != '/' && argv[0][0] != '\\' - && index (argv[0], '/') != 0 && index (argv[0], '\\') != 0 - && index (argv[0], ':') == 0) - argv[0] = concat (current_directory, "/", argv[0]); - -#endif /* NETSCAPE */ -#endif - -#if defined(NETSCAPE) - /* - * Before setting the "MAKE" variable, change backslashes (directory - * separators on Windows) to forward slashes, otherwise GNU Make will - * interpret backslashes as escape characters. - */ - - { - char *p; - - for (p = argv[0]; *p; p++) { - if (*p == '\\') { - *p = '/'; - } - } - } -#endif /* NETSCAPE */ - - /* The extra indirection through $(MAKE_COMMAND) is done - for hysterical raisins. */ - (void) define_variable ("MAKE_COMMAND", 12, argv[0], o_default, 0); - (void) define_variable ("MAKE", 4, "$(MAKE_COMMAND)", o_default, 1); - - if (command_variables != 0) - { - struct command_variable *cv; - struct variable *v; - unsigned int len = 0; - char *value, *p; - - /* Figure out how much space will be taken up by the command-line - variable definitions. */ - for (cv = command_variables; cv != 0; cv = cv->next) - { - v = cv->variable; - len += 2 * strlen (v->name); - if (! v->recursive) - ++len; - ++len; - len += 2 * strlen (v->value); - } - - /* Now allocate a buffer big enough and fill it. */ - p = value = (char *) alloca (len); - for (cv = command_variables; cv != 0; cv = cv->next) - { - v = cv->variable; - p = quote_as_word (p, v->name, 0); - if (! v->recursive) - *p++ = ':'; - *p++ = '='; - p = quote_as_word (p, v->value, 0); - *p++ = ' '; - } - p[-1] = '\0'; /* Kill the final space and terminate. */ - - /* Define an unchangeable variable with a name that no POSIX.2 - makefile could validly use for its own variable. */ - (void) define_variable ("-*-command-variables-*-", 23, - value, o_automatic, 0); - - /* Define the variable; this will not override any user definition. - Normally a reference to this variable is written into the value of - MAKEFLAGS, allowing the user to override this value to affect the - exported value of MAKEFLAGS. In POSIX-pedantic mode, we cannot - allow the user's setting of MAKEOVERRIDES to affect MAKEFLAGS, so - a reference to this hidden variable is written instead. */ - (void) define_variable ("MAKEOVERRIDES", 13, - "${-*-command-variables-*-}", o_env, 1); - } - - /* If there were -C flags, move ourselves about. */ - if (directories != 0) - for (i = 0; directories->list[i] != 0; ++i) - { - char *dir = directories->list[i]; - if (dir[0] == '~') - { - char *expanded = tilde_expand (dir); - if (expanded != 0) - dir = expanded; - } - if (chdir (dir) < 0) - pfatal_with_name (dir); - if (dir != directories->list[i]) - free (dir); - } - - /* Figure out the level of recursion. */ - { - struct variable *v = lookup_variable ("MAKELEVEL", 9); - if (v != 0 && *v->value != '\0' && *v->value != '-') - makelevel = (unsigned int) atoi (v->value); - else - makelevel = 0; - } - - /* Except under -s, always do -w in sub-makes and under -C. */ - if (!silent_flag && (directories != 0 || makelevel > 0)) - print_directory_flag = 1; - - /* Let the user disable that with --no-print-directory. */ - if (inhibit_print_directory_flag) - print_directory_flag = 0; - - /* Construct the list of include directories to search. */ - - construct_include_path (include_directories == 0 ? (char **) 0 - : include_directories->list); - - /* Figure out where we are now, after chdir'ing. */ - if (directories == 0) - /* We didn't move, so we're still in the same place. */ - starting_directory = current_directory; - else - { - if (getcwd (current_directory, GET_PATH_MAX) == 0) - { -#ifdef HAVE_GETCWD - perror_with_name ("getcwd: ", ""); -#else - error ("getwd: %s", current_directory); -#endif - starting_directory = 0; - } - else - starting_directory = current_directory; - } - - /* Tell the user where he is. */ - - if (print_directory_flag) - log_working_directory (1); - - /* Read any stdin makefiles into temporary files. */ - - if (makefiles != 0) - { - register unsigned int i; - for (i = 0; i < makefiles->idx; ++i) - if (makefiles->list[i][0] == '-' && makefiles->list[i][1] == '\0') - { - /* This makefile is standard input. Since we may re-exec - and thus re-read the makefiles, we read standard input - into a temporary file and read from that. */ - FILE *outfile; - - /* Make a unique filename. */ -#ifdef HAVE_MKTEMP - static char name[] = "/tmp/GmXXXXXX"; - (void) mktemp (name); -#else - static char name[L_tmpnam]; - (void) tmpnam (name); -#endif - - outfile = fopen (name, "w"); - if (outfile == 0) - pfatal_with_name ("fopen (temporary file)"); - while (!feof (stdin)) - { - char buf[2048]; - int n = fread (buf, 1, sizeof(buf), stdin); - if (n > 0 && fwrite (buf, 1, n, outfile) != (size_t)n) - pfatal_with_name ("fwrite (temporary file)"); - } - /* Try to make sure we won't remake the temporary - file when we are re-exec'd. Kludge-o-matic! */ - fprintf (outfile, "%s:;\n", name); - (void) fclose (outfile); - - /* Replace the name that read_all_makefiles will - see with the name of the temporary file. */ - { - char *temp; - /* SGI compiler requires alloca's result be assigned simply. */ - temp = (char *) alloca (sizeof (name)); - bcopy (name, temp, sizeof (name)); - makefiles->list[i] = temp; - } - - /* Make sure the temporary file will not be remade. */ - f = enter_file (savestring (name, sizeof name - 1)); - f->updated = 1; - f->update_status = 0; - f->command_state = cs_finished; - /* Let it be removed when we're done. */ - f->intermediate = 1; - /* But don't mention it. */ - f->dontcare = 1; - } - } - - /* Set up to handle children dying. This must be done before - reading in the makefiles so that `shell' function calls will work. */ - -#ifdef SIGCHLD - (void) signal (SIGCHLD, child_handler); -#endif -#ifdef SIGCLD - (void) signal (SIGCLD, child_handler); -#endif - - /* Let the user send us SIGUSR1 to toggle the -d flag during the run. */ -#ifdef SIGUSR1 - (void) signal (SIGUSR1, debug_signal_handler); -#endif - - /* Define the initial list of suffixes for old-style rules. */ - - set_default_suffixes (); - - /* Define the file rules for the built-in suffix rules. These will later - be converted into pattern rules. We used to do this in - install_default_implicit_rules, but since that happens after reading - makefiles, it results in the built-in pattern rules taking precedence - over makefile-specified suffix rules, which is wrong. */ - - install_default_suffix_rules (); - - /* Define some internal and special variables. */ - - define_automatic_variables (); - - /* Set up the MAKEFLAGS and MFLAGS variables - so makefiles can look at them. */ - - define_makeflags (0, 0); - - /* Define the default variables. */ - define_default_variables (); - - /* Read all the makefiles. */ - - default_file = enter_file (".DEFAULT"); - - read_makefiles - = read_all_makefiles (makefiles == 0 ? (char **) 0 : makefiles->list); - - /* Decode switches again, in case the variables were set by the makefile. */ - decode_env_switches ("MAKEFLAGS", 9); -#if 0 - decode_env_switches ("MFLAGS", 6); -#endif - - /* Set up MAKEFLAGS and MFLAGS again, so they will be right. */ - - define_makeflags (1, 0); - - /* Make each `struct dep' point at the `struct file' for the file - depended on. Also do magic for special targets. */ - - snap_deps (); - - /* Convert old-style suffix rules to pattern rules. It is important to - do this before installing the built-in pattern rules below, so that - makefile-specified suffix rules take precedence over built-in pattern - rules. */ - - convert_to_pattern (); - - /* Install the default implicit pattern rules. - This used to be done before reading the makefiles. - But in that case, built-in pattern rules were in the chain - before user-defined ones, so they matched first. */ - - install_default_implicit_rules (); - - /* Compute implicit rule limits. */ - - count_implicit_rule_limits (); - - /* Construct the listings of directories in VPATH lists. */ - - build_vpath_lists (); - - /* Mark files given with -o flags as very old (00:00:01.00 Jan 1, 1970) - and as having been updated already, and files given with -W flags as - brand new (time-stamp as far as possible into the future). */ - - if (old_files != 0) - for (p = old_files->list; *p != 0; ++p) - { - f = enter_command_line_file (*p); - f->last_mtime = (time_t) 1; - f->updated = 1; - f->update_status = 0; - f->command_state = cs_finished; - } - - if (new_files != 0) - { - for (p = new_files->list; *p != 0; ++p) - { - f = enter_command_line_file (*p); - f->last_mtime = NEW_MTIME; - } - } - - if (read_makefiles != 0) - { - /* Update any makefiles if necessary. */ - - time_t *makefile_mtimes = 0; - unsigned int mm_idx = 0; - - if (debug_flag) - puts ("Updating makefiles...."); - - /* Remove any makefiles we don't want to try to update. - Also record the current modtimes so we can compare them later. */ - { - register struct dep *d, *last; - last = 0; - d = read_makefiles; - while (d != 0) - { - register struct file *f = d->file; - if (f->double_colon) - for (f = f->double_colon; f != NULL; f = f->prev) - { - if (f->deps == 0 && f->cmds != 0) - { - /* This makefile is a :: target with commands, but - no dependencies. So, it will always be remade. - This might well cause an infinite loop, so don't - try to remake it. (This will only happen if - your makefiles are written exceptionally - stupidly; but if you work for Athena, that's how - you write your makefiles.) */ - - if (debug_flag) - printf ("Makefile `%s' might loop; not remaking it.\n", - f->name); - - if (last == 0) - read_makefiles = d->next; - else - last->next = d->next; - - /* Free the storage. */ - free ((char *) d); - - d = last == 0 ? 0 : last->next; - - break; - } - } - if (f == NULL || !f->double_colon) - { - if (makefile_mtimes == 0) - makefile_mtimes = (time_t *) xmalloc (sizeof (time_t)); - else - makefile_mtimes = (time_t *) - xrealloc ((char *) makefile_mtimes, - (mm_idx + 1) * sizeof (time_t)); - makefile_mtimes[mm_idx++] = file_mtime_no_search (d->file); - last = d; - d = d->next; - } - } - } - - /* Set up `MAKEFLAGS' specially while remaking makefiles. */ - define_makeflags (1, 1); - - switch (update_goal_chain (read_makefiles, 1)) - { - case 1: - default: -#define BOGUS_UPDATE_STATUS 0 - assert (BOGUS_UPDATE_STATUS); - break; - - case -1: - /* Did nothing. */ - break; - - case 2: - /* Failed to update. Figure out if we care. */ - { - /* Nonzero if any makefile was successfully remade. */ - int any_remade = 0; - /* Nonzero if any makefile we care about failed - in updating or could not be found at all. */ - int any_failed = 0; - register unsigned int i; - - for (i = 0; read_makefiles != 0; ++i) - { - struct dep *d = read_makefiles; - read_makefiles = d->next; - if (d->file->updated) - { - /* This makefile was updated. */ - if (d->file->update_status == 0) - { - /* It was successfully updated. */ - any_remade |= (file_mtime_no_search (d->file) - != makefile_mtimes[i]); - } - else if (! (d->changed & RM_DONTCARE)) - { - time_t mtime; - /* The update failed and this makefile was not - from the MAKEFILES variable, so we care. */ - error ("Failed to remake makefile `%s'.", - d->file->name); - mtime = file_mtime_no_search (d->file); - any_remade |= (mtime != (time_t) -1 - && mtime != makefile_mtimes[i]); - } - } - else - /* This makefile was not found at all. */ - if (! (d->changed & RM_DONTCARE)) - { - /* This is a makefile we care about. See how much. */ - if (d->changed & RM_INCLUDED) - /* An included makefile. We don't need - to die, but we do want to complain. */ - error ("Included makefile `%s' was not found.", - dep_name (d)); - else - { - /* A normal makefile. We must die later. */ - error ("Makefile `%s' was not found", dep_name (d)); - any_failed = 1; - } - } - - free ((char *) d); - } - - if (any_remade) - goto re_exec; - else if (any_failed) - die (2); - else - break; - } - - case 0: - re_exec: - /* Updated successfully. Re-exec ourselves. */ - - remove_intermediates (0); - - if (print_data_base_flag) - print_data_base (); - - if (print_directory_flag) - log_working_directory (0); - - if (makefiles != 0) - { - /* These names might have changed. */ - register unsigned int i, j = 0; - for (i = 1; i < (unsigned int)argc; ++i) - if (!strcmp (argv[i], "-f")) /* XXX */ - { - char *p = &argv[i][2]; - if (*p == '\0') - argv[++i] = makefiles->list[j]; - else - argv[i] = concat ("-f", makefiles->list[j], ""); - ++j; - } - } - - if (directories != 0 && directories->idx > 0) - { - char bad; - if (directory_before_chdir != 0) - { - if (chdir (directory_before_chdir) < 0) - { - perror_with_name ("chdir", ""); - bad = 1; - } - else - bad = 0; - } - else - bad = 1; - if (bad) - fatal ("Couldn't change back to original directory."); - } - - for (p = environ; *p != 0; ++p) - if (!strncmp (*p, "MAKELEVEL=", 10)) - { - /* The SGI compiler apparently can't understand - the concept of storing the result of a function - in something other than a local variable. */ - char *sgi_loses; - sgi_loses = (char *) alloca (40); - *p = sgi_loses; - sprintf (*p, "MAKELEVEL=%u", makelevel); - break; - } - - if (debug_flag) - { - char **p; - fputs ("Re-executing:", stdout); - for (p = argv; *p != 0; ++p) - printf (" %s", *p); - puts (""); - } - - fflush (stdout); - fflush (stderr); - - exec_command (argv, environ); - /* NOTREACHED */ - } - } - - /* Set up `MAKEFLAGS' again for the normal targets. */ - define_makeflags (1, 0); - - { - int status; - - /* If there were no command-line goals, use the default. */ - if (goals == 0) - { - if (default_goal_file != 0) - { - goals = (struct dep *) xmalloc (sizeof (struct dep)); - goals->next = 0; - goals->name = 0; - goals->file = default_goal_file; - } - } - else - lastgoal->next = 0; - - if (goals != 0) - { - /* Update the goals. */ - - if (debug_flag) - puts ("Updating goal targets...."); - - switch (update_goal_chain (goals, 0)) - { - case -1: - /* Nothing happened. */ - case 0: - /* Updated successfully. */ - status = 0; - break; - case 2: - /* Updating failed. */ - status = 2; - break; - case 1: - /* We are under -q and would run some commands. */ - status = 1; - break; - default: - abort (); - } - } - else - { - if (read_makefiles == 0) - fatal ("No targets specified and no makefile found"); - else - fatal ("No targets"); - } - - /* Exit. */ - die (status); - } - - return 0; -} - -/* Parsing of arguments, decoding of switches. */ - -static char options[1 + sizeof (switches) / sizeof (switches[0]) * 3]; -static struct option long_options[(sizeof (switches) / sizeof (switches[0])) + - (sizeof (long_option_aliases) / - sizeof (long_option_aliases[0]))]; - -/* Fill in the string and vector for getopt. */ -static void -init_switches () -{ - register char *p; - register int c; - register unsigned int i; - - if (options[0] != '\0') - /* Already done. */ - return; - - p = options; - - /* Return switch and non-switch args in order, regardless of - POSIXLY_CORRECT. Non-switch args are returned as option 1. */ - *p++ = '-'; - - for (i = 0; switches[i].c != '\0'; ++i) - { - long_options[i].name = (switches[i].long_name == 0 ? "" : - switches[i].long_name); - long_options[i].flag = 0; - long_options[i].val = switches[i].c; - if (isalnum (switches[i].c)) - *p++ = switches[i].c; - switch (switches[i].type) - { - case flag: - case flag_off: - case ignore: - long_options[i].has_arg = no_argument; - break; - - case string: - case positive_int: - case floating: - if (isalnum (switches[i].c)) - *p++ = ':'; - if (switches[i].noarg_value != 0) - { - if (isalnum (switches[i].c)) - *p++ = ':'; - long_options[i].has_arg = optional_argument; - } - else - long_options[i].has_arg = required_argument; - break; - } - } - *p = '\0'; - for (c = 0; c < (sizeof (long_option_aliases) / - sizeof (long_option_aliases[0])); - ++c) - long_options[i++] = long_option_aliases[c]; - long_options[i].name = 0; -} - -static void -handle_non_switch_argument (arg, env) - char *arg; - int env; -{ - /* Non-option argument. It might be a variable definition. */ - struct variable *v; - if (arg[0] == '-' && arg[1] == '\0') - /* Ignore plain `-' for compatibility. */ - return; - v = try_variable_definition ((char *) 0, 0, arg, o_command); - if (v != 0) - { - /* It is indeed a variable definition. Record a pointer to - the variable for later use in define_makeflags. */ - struct command_variable *cv - = (struct command_variable *) xmalloc (sizeof (*cv)); - cv->variable = v; - cv->next = command_variables; - command_variables = cv; - } - else if (! env) - { - /* Not an option or variable definition; it must be a goal - target! Enter it as a file and add it to the dep chain of - goals. */ - struct file *f = enter_command_line_file (arg); - f->cmd_target = 1; - - if (goals == 0) - { - goals = (struct dep *) xmalloc (sizeof (struct dep)); - lastgoal = goals; - } - else - { - lastgoal->next - = (struct dep *) xmalloc (sizeof (struct dep)); - lastgoal = lastgoal->next; - } - lastgoal->name = 0; - lastgoal->file = f; - } -} - -/* Decode switches from ARGC and ARGV. - They came from the environment if ENV is nonzero. */ - -static void -decode_switches (argc, argv, env) - int argc; - char **argv; - int env; -{ - int bad = 0; - register const struct command_switch *cs; - register struct stringlist *sl; - register int c; - - /* getopt does most of the parsing for us. - First, get its vectors set up. */ - - init_switches (); - - /* Let getopt produce error messages for the command line, - but not for options from the environment. */ - opterr = !env; - /* Reset getopt's state. */ - optind = 0; - - while (optind < argc) - { - /* Parse the next argument. */ - c = getopt_long (argc, argv, options, long_options, (int *) 0); - if (c == EOF) - /* End of arguments, or "--" marker seen. */ - break; - else if (c == 1) - /* An argument not starting with a dash. */ - handle_non_switch_argument (optarg, env); - else if (c == '?') - /* Bad option. We will print a usage message and die later. - But continue to parse the other options so the user can - see all he did wrong. */ - bad = 1; - else - for (cs = switches; cs->c != '\0'; ++cs) - if (cs->c == c) - { - /* Whether or not we will actually do anything with - this switch. We test this individually inside the - switch below rather than just once outside it, so that - options which are to be ignored still consume args. */ - int doit = !env || cs->env; - - switch (cs->type) - { - default: - abort (); - - case ignore: - break; - - case flag: - case flag_off: - if (doit) - *(int *) cs->value_ptr = cs->type == flag; - break; - - case string: - if (!doit) - break; - - if (optarg == 0) - optarg = cs->noarg_value; - - sl = *(struct stringlist **) cs->value_ptr; - if (sl == 0) - { - sl = (struct stringlist *) - xmalloc (sizeof (struct stringlist)); - sl->max = 5; - sl->idx = 0; - sl->list = (char **) xmalloc (5 * sizeof (char *)); - *(struct stringlist **) cs->value_ptr = sl; - } - else if (sl->idx == sl->max - 1) - { - sl->max += 5; - sl->list = (char **) - xrealloc ((char *) sl->list, - sl->max * sizeof (char *)); - } - sl->list[sl->idx++] = optarg; - sl->list[sl->idx] = 0; - break; - - case positive_int: - if (optarg == 0 && argc > optind - && isdigit (argv[optind][0])) - optarg = argv[optind++]; - - if (!doit) - break; - - if (optarg != 0) - { - int i = atoi (optarg); - if (i < 1) - { - if (doit) - error ("the `-%c' option requires a \ -positive integral argument", - cs->c); - bad = 1; - } - else - *(unsigned int *) cs->value_ptr = i; - } - else - *(unsigned int *) cs->value_ptr - = *(unsigned int *) cs->noarg_value; - break; - - case floating: - if (optarg == 0 && optind < argc - && (isdigit (argv[optind][0]) || argv[optind][0] == '.')) - optarg = argv[optind++]; - - if (doit) - *(double *) cs->value_ptr - = (optarg != 0 ? atof (optarg) - : *(double *) cs->noarg_value); - - break; - } - - /* We've found the switch. Stop looking. */ - break; - } - } - - /* There are no more options according to getting getopt, but there may - be some arguments left. Since we have asked for non-option arguments - to be returned in order, this only happens when there is a "--" - argument to prevent later arguments from being options. */ - while (optind < argc) - handle_non_switch_argument (argv[optind++], env); - - - if (!env && (bad || print_usage_flag)) - { - /* Print a nice usage message. */ - FILE *usageto; - - if (print_version_flag) - print_version (); - - usageto = bad ? stderr : stdout; - - fprintf (usageto, "Usage: %s [options] [target] ...\n", program); - - fputs ("Options:\n", usageto); - for (cs = switches; cs->c != '\0'; ++cs) - { - char buf[1024], shortarg[50], longarg[50], *p; - - if (cs->description[0] == '-') - continue; - - switch (long_options[cs - switches].has_arg) - { - case no_argument: - shortarg[0] = longarg[0] = '\0'; - break; - case required_argument: - sprintf (longarg, "=%s", cs->argdesc); - sprintf (shortarg, " %s", cs->argdesc); - break; - case optional_argument: - sprintf (longarg, "[=%s]", cs->argdesc); - sprintf (shortarg, " [%s]", cs->argdesc); - break; - } - - p = buf; - - if (isalnum (cs->c)) - { - sprintf (buf, " -%c%s", cs->c, shortarg); - p += strlen (p); - } - if (cs->long_name != 0) - { - unsigned int i; - sprintf (p, "%s--%s%s", - !isalnum (cs->c) ? " " : ", ", - cs->long_name, longarg); - p += strlen (p); - for (i = 0; i < (sizeof (long_option_aliases) / - sizeof (long_option_aliases[0])); - ++i) - if (long_option_aliases[i].val == cs->c) - { - sprintf (p, ", --%s%s", - long_option_aliases[i].name, longarg); - p += strlen (p); - } - } - { - const struct command_switch *ncs = cs; - while ((++ncs)->c != '\0') - if (ncs->description[0] == '-' && - ncs->description[1] == cs->c) - { - /* This is another switch that does the same - one as the one we are processing. We want - to list them all together on one line. */ - sprintf (p, ", -%c%s", ncs->c, shortarg); - p += strlen (p); - if (ncs->long_name != 0) - { - sprintf (p, ", --%s%s", ncs->long_name, longarg); - p += strlen (p); - } - } - } - - if (p - buf > DESCRIPTION_COLUMN - 2) - /* The list of option names is too long to fit on the same - line with the description, leaving at least two spaces. - Print it on its own line instead. */ - { - fprintf (usageto, "%s\n", buf); - buf[0] = '\0'; - } - - fprintf (usageto, "%*s%s.\n", - - DESCRIPTION_COLUMN, - buf, cs->description); - } - - die (bad ? 2 : 0); - } -} - -/* Decode switches from environment variable ENVAR (which is LEN chars long). - We do this by chopping the value into a vector of words, prepending a - dash to the first word if it lacks one, and passing the vector to - decode_switches. */ - -static void -decode_env_switches (envar, len) - char *envar; - unsigned int len; -{ - char *varref = (char *) alloca (2 + len + 2); - char *value, *p; - int argc; - char **argv; - - /* Get the variable's value. */ - varref[0] = '$'; - varref[1] = '('; - bcopy (envar, &varref[2], len); - varref[2 + len] = ')'; - varref[2 + len + 1] = '\0'; - value = variable_expand (varref); - - /* Skip whitespace, and check for an empty value. */ - value = next_token (value); - len = strlen (value); - if (len == 0) - return; - - /* Allocate a vector that is definitely big enough. */ - argv = (char **) alloca ((1 + len + 1) * sizeof (char *)); - - /* Allocate a buffer to copy the value into while we split it into words - and unquote it. We must use permanent storage for this because - decode_switches may store pointers into the passed argument words. */ - p = (char *) xmalloc (2 * len); - - /* getopt will look at the arguments starting at ARGV[1]. - Prepend a spacer word. */ - argv[0] = 0; - argc = 1; - argv[argc] = p; - while (*value != '\0') - { - if (*value == '\\') - ++value; /* Skip the backslash. */ - else if (isblank (*value)) - { - /* End of the word. */ - *p++ = '\0'; - argv[++argc] = p; - do - ++value; - while (isblank (*value)); - continue; - } - *p++ = *value++; - } - *p = '\0'; - argv[++argc] = 0; - - if (argc == 2 && argv[1][0] != '-') - { - /* There is just one word in the value, and it is not a switch. - Either this is the single-word form and we should prepend a dash - before calling decode_switches, or this is the multi-word form and - there is no dash because it is a variable definition. */ - struct variable *v; - v = try_variable_definition ((char *) 0, 0, argv[1], o_command); - if (v != 0) - { - /* It was indeed a variable definition, and now it has been - processed. There is nothing for decode_switches to do. - Record a pointer to the variable for later use in - define_makeflags. */ - struct command_variable *cv - = (struct command_variable *) xmalloc (sizeof (*cv)); - cv->variable = v; - cv->next = command_variables; - command_variables = cv; - return; - } - - /* It wasn't a variable definition, so it's some switches without a - leading dash. Add one and pass it along to decode_switches. We - need permanent storage for this in case decode_switches saves - pointers into the value. */ - argv[1] = concat ("-", argv[1], ""); - } - - /* Parse those words. */ - decode_switches (argc, argv, 1); -} - -/* Quote the string IN so that it will be interpreted as a single word with - no magic by the shell; if DOUBLE_DOLLARS is nonzero, also double dollar - signs to avoid variable expansion in make itself. Write the result into - OUT, returning the address of the next character to be written. - Allocating space for OUT twice the length of IN (thrice if - DOUBLE_DOLLARS is nonzero) is always sufficient. */ - -static char * -quote_as_word (out, in, double_dollars) - char *out, *in; - int double_dollars; -{ - while (*in != '\0') - { - if (index ("^;'\"*?[]$<>(){}|&~`\\ \t\r\n\f\v", *in) != 0) - *out++ = '\\'; - if (double_dollars && *in == '$') - *out++ = '$'; - *out++ = *in++; - } - - return out; -} - -/* Define the MAKEFLAGS and MFLAGS variables to reflect the settings of the - command switches. Include options with args if ALL is nonzero. - Don't include options with the `no_makefile' flag set if MAKEFILE. */ - -static void -define_makeflags (all, makefile) - int all, makefile; -{ - static const char ref[] = "$(MAKEOVERRIDES)"; - static const char posixref[] = "$(-*-command-variables-*-)"; - register const struct command_switch *cs; - char *flagstring; - register char *p; - unsigned int words; - struct variable *v; - - /* We will construct a linked list of `struct flag's describing - all the flags which need to go in MAKEFLAGS. Then, once we - know how many there are and their lengths, we can put them all - together in a string. */ - - struct flag - { - struct flag *next; - const struct command_switch *cs; - char *arg; - }; - struct flag *flags = 0; - unsigned int flagslen = 0; -#define ADD_FLAG(ARG, LEN) \ - do { \ - struct flag *new = (struct flag *) alloca (sizeof (struct flag)); \ - new->cs = cs; \ - new->arg = (ARG); \ - new->next = flags; \ - flags = new; \ - if (new->arg == 0) \ - ++flagslen; /* Just a single flag letter. */ \ - else \ - flagslen += 1 + 1 + 1 + 1 + 3 * (LEN); /* " -x foo" */ \ - if (!isalnum (cs->c)) \ - /* This switch has no single-letter version, so we use the long. */ \ - flagslen += 2 + strlen (cs->long_name); \ - } while (0) - - for (cs = switches; cs->c != '\0'; ++cs) - if (cs->toenv && (!makefile || !cs->no_makefile)) - switch (cs->type) - { - default: - abort (); - - case ignore: - break; - - case flag: - case flag_off: - if (!*(int *) cs->value_ptr == (cs->type == flag_off) - && (cs->default_value == 0 - || *(int *) cs->value_ptr != *(int *) cs->default_value)) - ADD_FLAG (0, 0); - break; - - case positive_int: - if (all) - { - if ((cs->default_value != 0 - && (*(unsigned int *) cs->value_ptr - == *(unsigned int *) cs->default_value))) - break; - else if (cs->noarg_value != 0 - && (*(unsigned int *) cs->value_ptr == - *(unsigned int *) cs->noarg_value)) - ADD_FLAG ("", 0); /* Optional value omitted; see below. */ - else if (cs->c == 'j') - /* Special case for `-j'. */ - ADD_FLAG ("1", 1); - else - { - char *buf = (char *) alloca (30); - sprintf (buf, "%u", *(unsigned int *) cs->value_ptr); - ADD_FLAG (buf, strlen (buf)); - } - } - break; - - case floating: - if (all) - { - if (cs->default_value != 0 - && (*(double *) cs->value_ptr - == *(double *) cs->default_value)) - break; - else if (cs->noarg_value != 0 - && (*(double *) cs->value_ptr - == *(double *) cs->noarg_value)) - ADD_FLAG ("", 0); /* Optional value omitted; see below. */ - else - { - char *buf = (char *) alloca (100); - sprintf (buf, "%g", *(double *) cs->value_ptr); - ADD_FLAG (buf, strlen (buf)); - } - } - break; - - case string: - if (all) - { - struct stringlist *sl = *(struct stringlist **) cs->value_ptr; - if (sl != 0) - { - /* Add the elements in reverse order, because - all the flags get reversed below; and the order - matters for some switches (like -I). */ - register unsigned int i = sl->idx; - while (i-- > 0) - ADD_FLAG (sl->list[i], strlen (sl->list[i])); - } - } - break; - } - - flagslen += 4 + sizeof posixref; /* Four more for the possible " -- ". */ - -#undef ADD_FLAG - - /* Construct the value in FLAGSTRING. - We allocate enough space for a preceding dash and trailing null. */ - flagstring = (char *) alloca (1 + flagslen + 1); - p = flagstring; - words = 1; - *p++ = '-'; - while (flags != 0) - { - /* Add the flag letter or name to the string. */ - if (!isalnum (flags->cs->c)) - { - *p++ = '-'; - strcpy (p, flags->cs->long_name); - p += strlen (p); - } - else - *p++ = flags->cs->c; - if (flags->arg != 0) - { - /* A flag that takes an optional argument which in this case is - omitted is specified by ARG being "". We must distinguish - because a following flag appended without an intervening " -" - is considered the arg for the first. */ - if (flags->arg[0] != '\0') - { - /* Add its argument too. */ - *p++ = !isalnum (flags->cs->c) ? '=' : ' '; - p = quote_as_word (p, flags->arg, 1); - } - ++words; - /* Write a following space and dash, for the next flag. */ - *p++ = ' '; - *p++ = '-'; - } - else if (!isalnum (flags->cs->c)) - { - ++words; - /* Long options must each go in their own word, - so we write the following space and dash. */ - *p++ = ' '; - *p++ = '-'; - } - flags = flags->next; - } - - if (all && command_variables != 0) - { - /* Now write a reference to $(MAKEOVERRIDES), which contains all the - command-line variable definitions. */ - - if (p == &flagstring[1]) - /* No flags written, so elide the leading dash already written. */ - p = flagstring; - else - { - /* Separate the variables from the switches with a "--" arg. */ - if (p[-1] != '-') - { - /* We did not already write a trailing " -". */ - *p++ = ' '; - *p++ = '-'; - } - /* There is a trailing " -"; fill it out to " -- ". */ - *p++ = '-'; - *p++ = ' '; - } - - /* Copy in the string. */ - if (posix_pedantic) - { - bcopy (posixref, p, sizeof posixref - 1); - p += sizeof posixref - 1; - } - else - { - bcopy (ref, p, sizeof ref - 1); - p += sizeof ref - 1; - } - } - else if (p == &flagstring[1]) - { - words = 0; - --p; - } - else if (p[-1] == '-') - /* Kill the final space and dash. */ - p -= 2; - /* Terminate the string. */ - *p = '\0'; - - v = define_variable ("MAKEFLAGS", 9, - /* If there is just a single word of switches, - omit the leading dash unless it is a single - long option with two leading dashes. */ - &flagstring[(words == 1 && command_variables == 0 - && flagstring[1] != '-') - ? 1 : 0], - /* This used to use o_env, but that lost when a - makefile defined MAKEFLAGS. Makefiles set - MAKEFLAGS to add switches, but we still want - to redefine its value with the full set of - switches. Of course, an override or command - definition will still take precedence. */ - o_file, 1); - if (! all) - /* The first time we are called, set MAKEFLAGS to always be exported. - We should not do this again on the second call, because that is - after reading makefiles which might have done `unexport MAKEFLAGS'. */ - v->export = v_export; - /* Since MFLAGS is not parsed for flags, there is no reason to - override any makefile redefinition. */ - (void) define_variable ("MFLAGS", 6, flagstring, o_env, 1); -} - -/* Print version information. */ - -static void -print_version () -{ - static int printed_version = 0; - - char *precede = print_data_base_flag ? "# " : ""; - - if (printed_version) - /* Do it only once. */ - return; - - printf ("%sGNU Make version %s", precede, version_string); - if (remote_description != 0 && *remote_description != '\0') - printf ("-%s", remote_description); - - printf (", by Richard Stallman and Roland McGrath.\n\ -%sCopyright (C) 1988, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc.\n\ -%sThis is free software; see the source for copying conditions.\n\ -%sThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ -%sPARTICULAR PURPOSE.\n\n", precede, precede, precede, precede); - -#ifdef NETSCAPE -/* - * When you do a release build, you can define the macros - * DEFAULT_SHELL and BUILD_NUMBER to make the following message - * appear in the version information. - * - * For example, you can say: - * #define DEFAULT_SHELL "shmsdos" - * #define BUILD_NUMBER 19970918 - */ - -#define DEFAULT_SHELL "shmsdos" -#define BUILD_NUMBER 19980324 - -#if defined(DEFAULT_SHELL) && defined(BUILD_NUMBER) - - printf ("\ -%sThis version was ported to Win32 by Netscape Communications Corp.\n\ -%sDefault shell: %s. Build number: %d.\n\n", precede, precede, -DEFAULT_SHELL, BUILD_NUMBER); - -#endif /* DEFAULT_SHELL, BUILD_NUMBER */ -#endif /* NETSCAPE */ - - printed_version = 1; - - /* Flush stdout so the user doesn't have to wait to see the - version information while things are thought about. */ - fflush (stdout); -} - -/* Print a bunch of information about this and that. */ - -static void -print_data_base () -{ - extern char *ctime (); - time_t when; - - when = time ((time_t *) 0); - printf ("\n# Make data base, printed on %s", ctime (&when)); - - print_variable_data_base (); - print_dir_data_base (); - print_rule_data_base (); - print_file_data_base (); - print_vpath_data_base (); - - when = time ((time_t *) 0); - printf ("\n# Finished Make data base on %s\n", ctime (&when)); -} - -/* Exit with STATUS, cleaning up as necessary. */ - -void -die (status) - int status; -{ - static char dying = 0; - - if (!dying) - { - int err; - - dying = 1; - - /* Try to move back to the original directory. This is essential on - MS-DOS (where there is really only one process), and on Unix it - puts core files in the original directory instead of the -C - directory. */ - if (directory_before_chdir != 0) - chdir (directory_before_chdir); - - if (print_version_flag) - print_version (); - - /* Wait for children to die. */ - for (err = status != 0; job_slots_used > 0; err = 0) - reap_children (1, err); - - /* Remove the intermediate files. */ - remove_intermediates (0); - - if (print_data_base_flag) - print_data_base (); - - if (print_directory_flag) - log_working_directory (0); - } - - exit (status); -} - -/* Write a message indicating that we've just entered or - left (according to ENTERING) the current directory. */ - -static void -log_working_directory (entering) - int entering; -{ - static int entered = 0; - char *message = entering ? "Entering" : "Leaving"; - - if (entering) - entered = 1; - else if (!entered) - /* Don't print the leaving message if we - haven't printed the entering message. */ - return; - - if (print_data_base_flag) - fputs ("# ", stdout); - - if (makelevel == 0) - printf ("%s: %s ", program, message); - else - printf ("%s[%u]: %s ", program, makelevel, message); - - if (starting_directory == 0) - puts ("an unknown directory"); - else - printf ("directory `%s'\n", starting_directory); -} diff --git a/buildtools/windows/source/make/make-stds.texi b/buildtools/windows/source/make/make-stds.texi deleted file mode 100644 index 887b7ade207..00000000000 --- a/buildtools/windows/source/make/make-stds.texi +++ /dev/null @@ -1,656 +0,0 @@ -@comment This file is included by both standards.texi and make.texinfo. -@comment It was broken out of standards.texi on 1/6/93 by roland. - -@node Makefile Conventions -@chapter Makefile Conventions -@comment standards.texi does not print an index, but make.texinfo does. -@cindex makefile, conventions for -@cindex conventions for makefiles -@cindex standards for makefiles - -This chapter describes conventions for writing the Makefiles for GNU programs. - -@menu -* Makefile Basics:: -* Utilities in Makefiles:: -* Standard Targets:: -* Command Variables:: -* Directory Variables:: -@end menu - -@node Makefile Basics -@section General Conventions for Makefiles - -Every Makefile should contain this line: - -@example -SHELL = /bin/sh -@end example - -@noindent -to avoid trouble on systems where the @code{SHELL} variable might be -inherited from the environment. (This is never a problem with GNU -@code{make}.) - -Different @code{make} programs have incompatible suffix lists and -implicit rules, and this sometimes creates confusion or misbehavior. So -it is a good idea to set the suffix list explicitly using only the -suffixes you need in the particular Makefile, like this: - -@example -.SUFFIXES: -.SUFFIXES: .c .o -@end example - -@noindent -The first line clears out the suffix list, the second introduces all -suffixes which may be subject to implicit rules in this Makefile. - -Don't assume that @file{.} is in the path for command execution. When -you need to run programs that are a part of your package during the -make, please make sure that it uses @file{./} if the program is built as -part of the make or @file{$(srcdir)/} if the file is an unchanging part -of the source code. Without one of these prefixes, the current search -path is used. - -The distinction between @file{./} and @file{$(srcdir)/} is important -when using the @samp{--srcdir} option to @file{configure}. A rule of -the form: - -@smallexample -foo.1 : foo.man sedscript - sed -e sedscript foo.man > foo.1 -@end smallexample - -@noindent -will fail when the current directory is not the source directory, -because @file{foo.man} and @file{sedscript} are not in the current -directory. - -When using GNU @code{make}, relying on @samp{VPATH} to find the source -file will work in the case where there is a single dependency file, -since the @file{make} automatic variable @samp{$<} will represent the -source file wherever it is. (Many versions of @code{make} set @samp{$<} -only in implicit rules.) A makefile target like - -@smallexample -foo.o : bar.c - $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o -@end smallexample - -@noindent -should instead be written as - -@smallexample -foo.o : bar.c - $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@@ -@end smallexample - -@noindent -in order to allow @samp{VPATH} to work correctly. When the target has -multiple dependencies, using an explicit @samp{$(srcdir)} is the easiest -way to make the rule work well. For example, the target above for -@file{foo.1} is best written as: - -@smallexample -foo.1 : foo.man sedscript - sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@ -@end smallexample - -@node Utilities in Makefiles -@section Utilities in Makefiles - -Write the Makefile commands (and any shell scripts, such as -@code{configure}) to run in @code{sh}, not in @code{csh}. Don't use any -special features of @code{ksh} or @code{bash}. - -The @code{configure} script and the Makefile rules for building and -installation should not use any utilities directly except these: - -@example -cat cmp cp echo egrep expr grep -ln mkdir mv pwd rm rmdir sed test touch -@end example - -Stick to the generally supported options for these programs. For -example, don't use @samp{mkdir -p}, convenient as it may be, because -most systems don't support it. - -The Makefile rules for building and installation can also use compilers -and related programs, but should do so via @code{make} variables so that the -user can substitute alternatives. Here are some of the programs we -mean: - -@example -ar bison cc flex install ld lex -make makeinfo ranlib texi2dvi yacc -@end example - -Use the following @code{make} variables: - -@example -$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX) -$(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) -@end example - -When you use @code{ranlib}, you should make sure nothing bad happens if -the system does not have @code{ranlib}. Arrange to ignore an error -from that command, and print a message before the command to tell the -user that failure of the @code{ranlib} command does not mean a problem. - -If you use symbolic links, you should implement a fallback for systems -that don't have symbolic links. - -It is ok to use other utilities in Makefile portions (or scripts) -intended only for particular systems where you know those utilities to -exist. - -@node Standard Targets -@section Standard Targets for Users - -All GNU programs should have the following targets in their Makefiles: - -@table @samp -@item all -Compile the entire program. This should be the default target. This -target need not rebuild any documentation files; Info files should -normally be included in the distribution, and DVI files should be made -only when explicitly asked for. - -@item install -Compile the program and copy the executables, libraries, and so on to -the file names where they should reside for actual use. If there is a -simple test to verify that a program is properly installed, this target -should run that test. - -If possible, write the @code{install} target rule so that it does not -modify anything in the directory where the program was built, provided -@samp{make all} has just been done. This is convenient for building the -program under one user name and installing it under another. - -The commands should create all the directories in which files are to be -installed, if they don't already exist. This includes the directories -specified as the values of the variables @code{prefix} and -@code{exec_prefix}, as well as all subdirectories that are needed. -One way to do this is by means of an @code{installdirs} target -as described below. - -Use @samp{-} before any command for installing a man page, so that -@code{make} will ignore any errors. This is in case there are systems -that don't have the Unix man page documentation system installed. - -The way to install Info files is to copy them into @file{$(infodir)} -with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run -the @code{install-info} program if it is present. @code{install-info} -is a script that edits the Info @file{dir} file to add or update the -menu entry for the given Info file; it will be part of the Texinfo package. -Here is a sample rule to install an Info file: - -@comment This example has been carefully formatted for the Make manual. -@comment Please do not reformat it without talking to roland@gnu.ai.mit.edu. -@smallexample -$(infodir)/foo.info: foo.info -# There may be a newer info file in . than in srcdir. - -if test -f foo.info; then d=.; \ - else d=$(srcdir); fi; \ - $(INSTALL_DATA) $$d/foo.info $@@; \ -# Run install-info only if it exists. -# Use `if' instead of just prepending `-' to the -# line so we notice real errors from install-info. -# We use `$(SHELL) -c' because some shells do not -# fail gracefully when there is an unknown command. - if $(SHELL) -c 'install-info --version' \ - >/dev/null 2>&1; then \ - install-info --infodir=$(infodir) $$d/foo.info; \ - else true; fi -@end smallexample - -@item uninstall -Delete all the installed files that the @samp{install} target would -create (but not the noninstalled files such as @samp{make all} would -create). - -This rule should not modify the directories where compilation is done, -only the directories where files are installed. - -@comment The gratuitous blank line here is to make the table look better -@comment in the printed Make manual. Please leave it in. -@item clean - -Delete all files from the current directory that are normally created by -building the program. Don't delete the files that record the -configuration. Also preserve files that could be made by building, but -normally aren't because the distribution comes with them. - -Delete @file{.dvi} files here if they are not part of the distribution. - -@item distclean -Delete all files from the current directory that are created by -configuring or building the program. If you have unpacked the source -and built the program without creating any other files, @samp{make -distclean} should leave only the files that were in the distribution. - -@item mostlyclean -Like @samp{clean}, but may refrain from deleting a few files that people -normally don't want to recompile. For example, the @samp{mostlyclean} -target for GCC does not delete @file{libgcc.a}, because recompiling it -is rarely necessary and takes a lot of time. - -@item maintainer-clean -Delete almost everything from the current directory that can be -reconstructed with this Makefile. This typically includes everything -deleted by @code{distclean}, plus more: C source files produced by -Bison, tags tables, Info files, and so on. - -The reason we say ``almost everything'' is that @samp{make -maintainer-clean} should not delete @file{configure} even if -@file{configure} can be remade using a rule in the Makefile. More -generally, @samp{make maintainer-clean} should not delete anything that -needs to exist in order to run @file{configure} and then begin to build -the program. This is the only exception; @code{maintainer-clean} should -delete everything else that can be rebuilt. - -The @samp{maintainer-clean} is intended to be used by a maintainer of -the package, not by ordinary users. You may need special tools to -reconstruct some of the files that @samp{make maintainer-clean} deletes. -Since these files are normally included in the distribution, we don't -take care to make them easy to reconstruct. If you find you need to -unpack the full distribution again, don't blame us. - -To help make users aware of this, the commands for -@code{maintainer-clean} should start with these two: - -@example -@@echo "This command is intended for maintainers to use;" -@@echo "it deletes files that may require special tools to rebuild." -@end example - -@item TAGS -Update a tags table for this program. - -@item info -Generate any Info files needed. The best way to write the rules is as -follows: - -@smallexample -info: foo.info - -foo.info: foo.texi chap1.texi chap2.texi - $(MAKEINFO) $(srcdir)/foo.texi -@end smallexample - -@noindent -You must define the variable @code{MAKEINFO} in the Makefile. It should -run the @code{makeinfo} program, which is part of the Texinfo -distribution. - -@item dvi -Generate DVI files for all TeXinfo documentation. -For example: - -@smallexample -dvi: foo.dvi - -foo.dvi: foo.texi chap1.texi chap2.texi - $(TEXI2DVI) $(srcdir)/foo.texi -@end smallexample - -@noindent -You must define the variable @code{TEXI2DVI} in the Makefile. It should -run the program @code{texi2dvi}, which is part of the Texinfo -distribution. Alternatively, write just the dependencies, and allow GNU -Make to provide the command. - -@item dist -Create a distribution tar file for this program. The tar file should be -set up so that the file names in the tar file start with a subdirectory -name which is the name of the package it is a distribution for. This -name can include the version number. - -For example, the distribution tar file of GCC version 1.40 unpacks into -a subdirectory named @file{gcc-1.40}. - -The easiest way to do this is to create a subdirectory appropriately -named, use @code{ln} or @code{cp} to install the proper files in it, and -then @code{tar} that subdirectory. - -The @code{dist} target should explicitly depend on all non-source files -that are in the distribution, to make sure they are up to date in the -distribution. -@xref{Releases, , Making Releases, standards, GNU Coding Standards}. - -@item check -Perform self-tests (if any). The user must build the program before -running the tests, but need not install the program; you should write -the self-tests so that they work when the program is built but not -installed. -@end table - -The following targets are suggested as conventional names, for programs -in which they are useful. - -@table @code -@item installcheck -Perform installation tests (if any). The user must build and install -the program before running the tests. You should not assume that -@file{$(bindir)} is in the search path. - -@item installdirs -It's useful to add a target named @samp{installdirs} to create the -directories where files are installed, and their parent directories. -There is a script called @file{mkinstalldirs} which is convenient for -this; find it in the Texinfo package.@c It's in /gd/gnu/lib/mkinstalldirs. -You can use a rule like this: - -@comment This has been carefully formatted to look decent in the Make manual. -@comment Please be sure not to make it extend any further to the right.--roland -@smallexample -# Make sure all installation directories (e.g. $(bindir)) -# actually exist by making them if necessary. -installdirs: mkinstalldirs - $(srcdir)/mkinstalldirs $(bindir) $(datadir) \ - $(libdir) $(infodir) \ - $(mandir) -@end smallexample - -This rule should not modify the directories where compilation is done. -It should do nothing but create installation directories. -@end table - -@node Command Variables -@section Variables for Specifying Commands - -Makefiles should provide variables for overriding certain commands, options, -and so on. - -In particular, you should run most utility programs via variables. -Thus, if you use Bison, have a variable named @code{BISON} whose default -value is set with @samp{BISON = bison}, and refer to it with -@code{$(BISON)} whenever you need to use Bison. - -File management utilities such as @code{ln}, @code{rm}, @code{mv}, and -so on, need not be referred to through variables in this way, since users -don't need to replace them with other programs. - -Each program-name variable should come with an options variable that is -used to supply options to the program. Append @samp{FLAGS} to the -program-name variable name to get the options variable name---for -example, @code{BISONFLAGS}. (The name @code{CFLAGS} is an exception to -this rule, but we keep it because it is standard.) Use @code{CPPFLAGS} -in any compilation command that runs the preprocessor, and use -@code{LDFLAGS} in any compilation command that does linking as well as -in any direct use of @code{ld}. - -If there are C compiler options that @emph{must} be used for proper -compilation of certain files, do not include them in @code{CFLAGS}. -Users expect to be able to specify @code{CFLAGS} freely themselves. -Instead, arrange to pass the necessary options to the C compiler -independently of @code{CFLAGS}, by writing them explicitly in the -compilation commands or by defining an implicit rule, like this: - -@smallexample -CFLAGS = -g -ALL_CFLAGS = -I. $(CFLAGS) -.c.o: - $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< -@end smallexample - -Do include the @samp{-g} option in @code{CFLAGS}, because that is not -@emph{required} for proper compilation. You can consider it a default -that is only recommended. If the package is set up so that it is -compiled with GCC by default, then you might as well include @samp{-O} -in the default value of @code{CFLAGS} as well. - -Put @code{CFLAGS} last in the compilation command, after other variables -containing compiler options, so the user can use @code{CFLAGS} to -override the others. - -Every Makefile should define the variable @code{INSTALL}, which is the -basic command for installing a file into the system. - -Every Makefile should also define the variables @code{INSTALL_PROGRAM} -and @code{INSTALL_DATA}. (The default for each of these should be -@code{$(INSTALL)}.) Then it should use those variables as the commands -for actual installation, for executables and nonexecutables -respectively. Use these variables as follows: - -@example -$(INSTALL_PROGRAM) foo $(bindir)/foo -$(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a -@end example - -@noindent -Always use a file name, not a directory name, as the second argument of -the installation commands. Use a separate command for each file to be -installed. - -@node Directory Variables -@section Variables for Installation Directories - -Installation directories should always be named by variables, so it is -easy to install in a nonstandard place. The standard names for these -variables are described below. They are based on a standard filesystem -layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and -other modern operating systems. - -These two variables set the root for the installation. All the other -installation directories should be subdirectories of one of these two, -and nothing should be directly installed into these two directories. - -@table @samp -@item prefix -A prefix used in constructing the default values of the variables listed -below. The default value of @code{prefix} should be @file{/usr/local} -When building the complete GNU system, the prefix will be empty and -@file{/usr} will be a symbolic link to @file{/}. - -@item exec_prefix -A prefix used in constructing the default values of some of the -variables listed below. The default value of @code{exec_prefix} should -be @code{$(prefix)}. - -Generally, @code{$(exec_prefix)} is used for directories that contain -machine-specific files (such as executables and subroutine libraries), -while @code{$(prefix)} is used directly for other directories. -@end table - -Executable programs are installed in one of the following directories. - -@table @samp -@item bindir -The directory for installing executable programs that users can run. -This should normally be @file{/usr/local/bin}, but write it as -@file{$(exec_prefix)/bin}. - -@item sbindir -The directory for installing executable programs that can be run from -the shell, but are only generally useful to system administrators. This -should normally be @file{/usr/local/sbin}, but write it as -@file{$(exec_prefix)/sbin}. - -@item libexecdir -@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94 -The directory for installing executable programs to be run by other -programs rather than by users. This directory should normally be -@file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}. -@end table - -Data files used by the program during its execution are divided into -categories in two ways. - -@itemize @bullet -@item -Some files are normally modified by programs; others are never normally -modified (though users may edit some of these). - -@item -Some files are architecture-independent and can be shared by all -machines at a site; some are architecture-dependent and can be shared -only by machines of the same kind and operating system; others may never -be shared between two machines. -@end itemize - -This makes for six different possibilities. However, we want to -discourage the use of architecture-dependent files, aside from of object -files and libraries. It is much cleaner to make other data files -architecture-independent, and it is generally not hard. - -Therefore, here are the variables makefiles should use to specify -directories: - -@table @samp -@item datadir -The directory for installing read-only architecture independent data -files. This should normally be @file{/usr/local/share}, but write it as -@file{$(prefix)/share}. As a special exception, see @file{$(infodir)} -and @file{$(includedir)} below. - -@item sysconfdir -The directory for installing read-only data files that pertain to a -single machine--that is to say, files for configuring a host. Mailer -and network configuration files, @file{/etc/passwd}, and so forth belong -here. All the files in this directory should be ordinary ASCII text -files. This directory should normally be @file{/usr/local/etc}, but -write it as @file{$(prefix)/etc}. - -@c rewritten to avoid overfull hbox --tower -Do not install executables -@c here -in this directory (they probably -belong in @file{$(libexecdir)} or @file{$(sbindir))}. Also do not -install files that are modified in the normal course of their use -(programs whose purpose is to change the configuration of the system -excluded). Those probably belong in @file{$(localstatedir)}. - -@item sharedstatedir -The directory for installing architecture-independent data files which -the programs modify while they run. This should normally be -@file{/usr/local/com}, but write it as @file{$(prefix)/com}. - -@item localstatedir -The directory for installing data files which the programs modify while -they run, and that pertain to one specific machine. Users should never -need to modify files in this directory to configure the package's -operation; put such configuration information in separate files that go -in @file{datadir} or @file{$(sysconfdir)}. @file{$(localstatedir)} -should normally be @file{/usr/local/var}, but write it as -@file{$(prefix)/var}. - -@item libdir -The directory for object files and libraries of object code. Do not -install executables here, they probably belong in @file{$(libexecdir)} -instead. The value of @code{libdir} should normally be -@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}. - -@item infodir -The directory for installing the Info files for this package. By -default, it should be @file{/usr/local/info}, but it should be written -as @file{$(prefix)/info}. - -@item includedir -@c rewritten to avoid overfull hbox --roland -The directory for installing header files to be included by user -programs with the C @samp{#include} preprocessor directive. This -should normally be @file{/usr/local/include}, but write it as -@file{$(prefix)/include}. - -Most compilers other than GCC do not look for header files in -@file{/usr/local/include}. So installing the header files this way is -only useful with GCC. Sometimes this is not a problem because some -libraries are only really intended to work with GCC. But some libraries -are intended to work with other compilers. They should install their -header files in two places, one specified by @code{includedir} and one -specified by @code{oldincludedir}. - -@item oldincludedir -The directory for installing @samp{#include} header files for use with -compilers other than GCC. This should normally be @file{/usr/include}. - -The Makefile commands should check whether the value of -@code{oldincludedir} is empty. If it is, they should not try to use -it; they should cancel the second installation of the header files. - -A package should not replace an existing header in this directory unless -the header came from the same package. Thus, if your Foo package -provides a header file @file{foo.h}, then it should install the header -file in the @code{oldincludedir} directory if either (1) there is no -@file{foo.h} there or (2) the @file{foo.h} that exists came from the Foo -package. - -To tell whether @file{foo.h} came from the Foo package, put a magic -string in the file---part of a comment---and grep for that string. -@end table - -Unix-style man pages are installed in one of the following: - -@table @samp -@item mandir -The directory for installing the man pages (if any) for this package. -It should include the suffix for the proper section of the -manual---usually @samp{1} for a utility. It will normally be -@file{/usr/local/man/man1}, but you should write it as -@file{$(prefix)/man/man1}. - -@item man1dir -The directory for installing section 1 man pages. -@item man2dir -The directory for installing section 2 man pages. -@item @dots{} -Use these names instead of @samp{mandir} if the package needs to install man -pages in more than one section of the manual. - -@strong{Don't make the primary documentation for any GNU software be a -man page. Write a manual in Texinfo instead. Man pages are just for -the sake of people running GNU software on Unix, which is a secondary -application only.} - -@item manext -The file name extension for the installed man page. This should contain -a period followed by the appropriate digit; it should normally be @samp{.1}. - -@item man1ext -The file name extension for installed section 1 man pages. -@item man2ext -The file name extension for installed section 2 man pages. -@item @dots{} -Use these names instead of @samp{manext} if the package needs to install man -pages in more than one section of the manual. -@end table - -And finally, you should set the following variable: - -@table @samp -@item srcdir -The directory for the sources being compiled. The value of this -variable is normally inserted by the @code{configure} shell script. -@end table - -For example: - -@smallexample -@c I have changed some of the comments here slightly to fix an overfull -@c hbox, so the make manual can format correctly. --roland -# Common prefix for installation directories. -# NOTE: This directory must exist when you start the install. -prefix = /usr/local -exec_prefix = $(prefix) -# Where to put the executable for the command `gcc'. -bindir = $(exec_prefix)/bin -# Where to put the directories used by the compiler. -libexecdir = $(exec_prefix)/libexec -# Where to put the Info files. -infodir = $(prefix)/info -@end smallexample - -If your program installs a large number of files into one of the -standard user-specified directories, it might be useful to group them -into a subdirectory particular to that program. If you do this, you -should write the @code{install} rule to create these subdirectories. - -Do not expect the user to include the subdirectory name in the value of -any of the variables listed above. The idea of having a uniform set of -variable names for installation directories is to enable the user to -specify the exact same values for several different GNU packages. In -order for this to be useful, all the packages must be designed so that -they will work sensibly when the user does so. - diff --git a/buildtools/windows/source/make/make.aux b/buildtools/windows/source/make/make.aux deleted file mode 100644 index ea790c9f12b..00000000000 --- a/buildtools/windows/source/make/make.aux +++ /dev/null @@ -1,354 +0,0 @@ -'xrdef {Overview-title}{Overview of \code {make}} -'xrdef {Overview-pg}{1} -'xrdef {Overview-snt}{Chapter'tie1} -'xrdef {Reading-title}{How to Read This Manual} -'xrdef {Reading-pg}{1} -'xrdef {Reading-snt}{Section'tie1.1} -'xrdef {Bugs-title}{Problems and Bugs} -'xrdef {Bugs-pg}{2} -'xrdef {Bugs-snt}{Section'tie1.2} -'xrdef {Introduction-title}{An Introduction to Makefiles} -'xrdef {Introduction-pg}{5} -'xrdef {Introduction-snt}{Chapter'tie2} -'xrdef {Rule Introduction-title}{What a Rule Looks Like} -'xrdef {Rule Introduction-pg}{5} -'xrdef {Rule Introduction-snt}{Section'tie2.1} -'xrdef {Simple Makefile-title}{A Simple Makefile} -'xrdef {Simple Makefile-pg}{6} -'xrdef {Simple Makefile-snt}{Section'tie2.2} -'xrdef {How Make Works-title}{How \code {make} Processes a Makefile} -'xrdef {How Make Works-pg}{8} -'xrdef {How Make Works-snt}{Section'tie2.3} -'xrdef {Variables Simplify-title}{Variables Make Makefiles Simpler} -'xrdef {Variables Simplify-pg}{9} -'xrdef {Variables Simplify-snt}{Section'tie2.4} -'xrdef {make Deduces-title}{Letting \code {make} Deduce the Commands} -'xrdef {make Deduces-pg}{10} -'xrdef {make Deduces-snt}{Section'tie2.5} -'xrdef {Combine By Dependency-title}{Another Style of Makefile} -'xrdef {Combine By Dependency-pg}{11} -'xrdef {Combine By Dependency-snt}{Section'tie2.6} -'xrdef {Cleanup-title}{Rules for Cleaning the Directory} -'xrdef {Cleanup-pg}{12} -'xrdef {Cleanup-snt}{Section'tie2.7} -'xrdef {Makefiles-title}{Writing Makefiles} -'xrdef {Makefiles-pg}{13} -'xrdef {Makefiles-snt}{Chapter'tie3} -'xrdef {Makefile Contents-title}{What Makefiles Contain} -'xrdef {Makefile Contents-pg}{13} -'xrdef {Makefile Contents-snt}{Section'tie3.1} -'xrdef {Makefile Names-title}{What Name to Give Your Makefile} -'xrdef {Makefile Names-pg}{14} -'xrdef {Makefile Names-snt}{Section'tie3.2} -'xrdef {Include-title}{Including Other Makefiles} -'xrdef {Include-pg}{14} -'xrdef {Include-snt}{Section'tie3.3} -'xrdef {MAKEFILES Variable-title}{The Variable \code {MAKEFILES}} -'xrdef {MAKEFILES Variable-pg}{16} -'xrdef {MAKEFILES Variable-snt}{Section'tie3.4} -'xrdef {Remaking Makefiles-title}{How Makefiles Are Remade} -'xrdef {Remaking Makefiles-pg}{16} -'xrdef {Remaking Makefiles-snt}{Section'tie3.5} -'xrdef {Overriding Makefiles-title}{Overriding Part of Another Makefile} -'xrdef {Overriding Makefiles-pg}{18} -'xrdef {Overriding Makefiles-snt}{Section'tie3.6} -'xrdef {Rules-title}{Writing Rules} -'xrdef {Rules-pg}{19} -'xrdef {Rules-snt}{Chapter'tie4} -'xrdef {Rule Syntax-title}{Rule Syntax} -'xrdef {Rule Syntax-pg}{19} -'xrdef {Rule Syntax-snt}{Section'tie4.1} -'xrdef {Wildcards-title}{Using Wildcard Characters in File Names} -'xrdef {Wildcards-pg}{20} -'xrdef {Wildcards-snt}{Section'tie4.2} -'xrdef {Wildcard Examples-title}{Wildcard Examples} -'xrdef {Wildcard Examples-pg}{21} -'xrdef {Wildcard Examples-snt}{Section'tie4.2.1} -'xrdef {Wildcard Pitfall-title}{Pitfalls of Using Wildcards} -'xrdef {Wildcard Pitfall-pg}{22} -'xrdef {Wildcard Pitfall-snt}{Section'tie4.2.2} -'xrdef {Wildcard Function-title}{The Function \code {wildcard}} -'xrdef {Wildcard Function-pg}{22} -'xrdef {Wildcard Function-snt}{Section'tie4.2.3} -'xrdef {Directory Search-title}{Searching Directories for Dependencies} -'xrdef {Directory Search-pg}{23} -'xrdef {Directory Search-snt}{Section'tie4.3} -'xrdef {General Search-title}{\code {VPATH}: Search Path for All Dependencies} -'xrdef {General Search-pg}{23} -'xrdef {General Search-snt}{Section'tie4.3.1} -'xrdef {Selective Search-title}{The \code {vpath} Directive} -'xrdef {Selective Search-pg}{24} -'xrdef {Selective Search-snt}{Section'tie4.3.2} -'xrdef {Commands/Search-title}{Writing Shell Commands with Directory Search} -'xrdef {Commands/Search-pg}{26} -'xrdef {Commands/Search-snt}{Section'tie4.3.3} -'xrdef {Implicit/Search-title}{Directory Search and Implicit Rules} -'xrdef {Implicit/Search-pg}{27} -'xrdef {Implicit/Search-snt}{Section'tie4.3.4} -'xrdef {Libraries/Search-title}{Directory Search for Link Libraries} -'xrdef {Libraries/Search-pg}{27} -'xrdef {Libraries/Search-snt}{Section'tie4.3.5} -'xrdef {Phony Targets-title}{Phony Targets} -'xrdef {Phony Targets-pg}{28} -'xrdef {Phony Targets-snt}{Section'tie4.4} -'xrdef {Force Targets-title}{Rules without Commands or Dependencies} -'xrdef {Force Targets-pg}{30} -'xrdef {Force Targets-snt}{Section'tie4.5} -'xrdef {Empty Targets-title}{Empty Target Files to Record Events} -'xrdef {Empty Targets-pg}{30} -'xrdef {Empty Targets-snt}{Section'tie4.6} -'xrdef {Special Targets-title}{Special Built-in Target Names} -'xrdef {Special Targets-pg}{31} -'xrdef {Special Targets-snt}{Section'tie4.7} -'xrdef {Multiple Targets-title}{Multiple Targets in a Rule} -'xrdef {Multiple Targets-pg}{32} -'xrdef {Multiple Targets-snt}{Section'tie4.8} -'xrdef {Multiple Rules-title}{Multiple Rules for One Target} -'xrdef {Multiple Rules-pg}{33} -'xrdef {Multiple Rules-snt}{Section'tie4.9} -'xrdef {Static Pattern-title}{Static Pattern Rules} -'xrdef {Static Pattern-pg}{34} -'xrdef {Static Pattern-snt}{Section'tie4.10} -'xrdef {Static Usage-title}{Syntax of Static Pattern Rules} -'xrdef {Static Usage-pg}{34} -'xrdef {Static Usage-snt}{Section'tie4.10.1} -'xrdef {Static versus Implicit-title}{Static Pattern Rules versus Implicit Rules} -'xrdef {Static versus Implicit-pg}{36} -'xrdef {Static versus Implicit-snt}{Section'tie4.10.2} -'xrdef {Double-Colon-title}{Double-Colon Rules} -'xrdef {Double-Colon-pg}{37} -'xrdef {Double-Colon-snt}{Section'tie4.11} -'xrdef {Automatic Dependencies-title}{Generating Dependencies Automatically} -'xrdef {Automatic Dependencies-pg}{37} -'xrdef {Automatic Dependencies-snt}{Section'tie4.12} -'xrdef {Commands-title}{Writing the Commands in Rules} -'xrdef {Commands-pg}{41} -'xrdef {Commands-snt}{Chapter'tie5} -'xrdef {Echoing-title}{Command Echoing} -'xrdef {Echoing-pg}{41} -'xrdef {Echoing-snt}{Section'tie5.1} -'xrdef {Execution-title}{Command Execution} -'xrdef {Execution-pg}{42} -'xrdef {Execution-snt}{Section'tie5.2} -'xrdef {Parallel-title}{Parallel Execution} -'xrdef {Parallel-pg}{42} -'xrdef {Parallel-snt}{Section'tie5.3} -'xrdef {Errors-title}{Errors in Commands} -'xrdef {Errors-pg}{44} -'xrdef {Errors-snt}{Section'tie5.4} -'xrdef {Interrupts-title}{Interrupting or Killing \code {make}} -'xrdef {Interrupts-pg}{45} -'xrdef {Interrupts-snt}{Section'tie5.5} -'xrdef {Recursion-title}{Recursive Use of \code {make}} -'xrdef {Recursion-pg}{46} -'xrdef {Recursion-snt}{Section'tie5.6} -'xrdef {MAKE Variable-title}{How the \code {MAKE} Variable Works} -'xrdef {MAKE Variable-pg}{46} -'xrdef {MAKE Variable-snt}{Section'tie5.6.1} -'xrdef {Variables/Recursion-title}{Communicating Variables to a Sub-\code {make}} -'xrdef {Variables/Recursion-pg}{47} -'xrdef {Variables/Recursion-snt}{Section'tie5.6.2} -'xrdef {Options/Recursion-title}{Communicating Options to a Sub-\code {make}} -'xrdef {Options/Recursion-pg}{50} -'xrdef {Options/Recursion-snt}{Section'tie5.6.3} -'xrdef {-w Option-title}{The \samp {--print-directory} Option} -'xrdef {-w Option-pg}{52} -'xrdef {-w Option-snt}{Section'tie5.6.4} -'xrdef {Sequences-title}{Defining Canned Command Sequences} -'xrdef {Sequences-pg}{52} -'xrdef {Sequences-snt}{Section'tie5.7} -'xrdef {Empty Commands-title}{Using Empty Commands} -'xrdef {Empty Commands-pg}{54} -'xrdef {Empty Commands-snt}{Section'tie5.8} -'xrdef {Using Variables-title}{How to Use Variables} -'xrdef {Using Variables-pg}{55} -'xrdef {Using Variables-snt}{Chapter'tie6} -'xrdef {Reference-title}{Basics of Variable References} -'xrdef {Reference-pg}{55} -'xrdef {Reference-snt}{Section'tie6.1} -'xrdef {Flavors-title}{The Two Flavors of Variables} -'xrdef {Flavors-pg}{56} -'xrdef {Flavors-snt}{Section'tie6.2} -'xrdef {Advanced-title}{Advanced Features for Reference to Variables} -'xrdef {Advanced-pg}{59} -'xrdef {Advanced-snt}{Section'tie6.3} -'xrdef {Substitution Refs-title}{Substitution References} -'xrdef {Substitution Refs-pg}{59} -'xrdef {Substitution Refs-snt}{Section'tie6.3.1} -'xrdef {Computed Names-title}{Computed Variable Names} -'xrdef {Computed Names-pg}{60} -'xrdef {Computed Names-snt}{Section'tie6.3.2} -'xrdef {Values-title}{How Variables Get Their Values} -'xrdef {Values-pg}{63} -'xrdef {Values-snt}{Section'tie6.4} -'xrdef {Setting-title}{Setting Variables} -'xrdef {Setting-pg}{63} -'xrdef {Setting-snt}{Section'tie6.5} -'xrdef {Appending-title}{Appending More Text to Variables} -'xrdef {Appending-pg}{64} -'xrdef {Appending-snt}{Section'tie6.6} -'xrdef {Override Directive-title}{The \code {override} Directive} -'xrdef {Override Directive-pg}{66} -'xrdef {Override Directive-snt}{Section'tie6.7} -'xrdef {Defining-title}{Defining Variables Verbatim} -'xrdef {Defining-pg}{67} -'xrdef {Defining-snt}{Section'tie6.8} -'xrdef {Environment-title}{Variables from the Environment} -'xrdef {Environment-pg}{68} -'xrdef {Environment-snt}{Section'tie6.9} -'xrdef {Conditionals-title}{Conditional Parts of Makefiles} -'xrdef {Conditionals-pg}{71} -'xrdef {Conditionals-snt}{Chapter'tie7} -'xrdef {Conditional Example-title}{Example of a Conditional} -'xrdef {Conditional Example-pg}{71} -'xrdef {Conditional Example-snt}{Section'tie7.1} -'xrdef {Conditional Syntax-title}{Syntax of Conditionals} -'xrdef {Conditional Syntax-pg}{72} -'xrdef {Conditional Syntax-snt}{Section'tie7.2} -'xrdef {Testing Flags-title}{Conditionals that Test Flags} -'xrdef {Testing Flags-pg}{75} -'xrdef {Testing Flags-snt}{Section'tie7.3} -'xrdef {Functions-title}{Functions for Transforming Text} -'xrdef {Functions-pg}{77} -'xrdef {Functions-snt}{Chapter'tie8} -'xrdef {Syntax of Functions-title}{Function Call Syntax} -'xrdef {Syntax of Functions-pg}{77} -'xrdef {Syntax of Functions-snt}{Section'tie8.1} -'xrdef {Text Functions-title}{Functions for String Substitution and Analysis} -'xrdef {Text Functions-pg}{78} -'xrdef {Text Functions-snt}{Section'tie8.2} -'xrdef {Filename Functions-title}{Functions for File Names} -'xrdef {Filename Functions-pg}{81} -'xrdef {Filename Functions-snt}{Section'tie8.3} -'xrdef {Foreach Function-title}{The \code {foreach} Function} -'xrdef {Foreach Function-pg}{83} -'xrdef {Foreach Function-snt}{Section'tie8.4} -'xrdef {Origin Function-title}{The \code {origin} Function} -'xrdef {Origin Function-pg}{85} -'xrdef {Origin Function-snt}{Section'tie8.5} -'xrdef {Shell Function-title}{The \code {shell} Function} -'xrdef {Shell Function-pg}{87} -'xrdef {Shell Function-snt}{Section'tie8.6} -'xrdef {Running-title}{How to Run \code {make}} -'xrdef {Running-pg}{89} -'xrdef {Running-snt}{Chapter'tie9} -'xrdef {Makefile Arguments-title}{Arguments to Specify the Makefile} -'xrdef {Makefile Arguments-pg}{89} -'xrdef {Makefile Arguments-snt}{Section'tie9.1} -'xrdef {Goals-title}{Arguments to Specify the Goals} -'xrdef {Goals-pg}{90} -'xrdef {Goals-snt}{Section'tie9.2} -'xrdef {Instead of Execution-title}{Instead of Executing the Commands} -'xrdef {Instead of Execution-pg}{91} -'xrdef {Instead of Execution-snt}{Section'tie9.3} -'xrdef {Avoiding Compilation-title}{Avoiding Recompilation of Some Files} -'xrdef {Avoiding Compilation-pg}{93} -'xrdef {Avoiding Compilation-snt}{Section'tie9.4} -'xrdef {Overriding-title}{Overriding Variables} -'xrdef {Overriding-pg}{94} -'xrdef {Overriding-snt}{Section'tie9.5} -'xrdef {Testing-title}{Testing the Compilation of a Program} -'xrdef {Testing-pg}{95} -'xrdef {Testing-snt}{Section'tie9.6} -'xrdef {Options Summary-title}{Summary of Options} -'xrdef {Options Summary-pg}{95} -'xrdef {Options Summary-snt}{Section'tie9.7} -'xrdef {Implicit Rules-title}{Using Implicit Rules} -'xrdef {Implicit Rules-pg}{101} -'xrdef {Implicit Rules-snt}{Chapter'tie10} -'xrdef {Using Implicit-title}{Using Implicit Rules} -'xrdef {Using Implicit-pg}{101} -'xrdef {Using Implicit-snt}{Section'tie10.1} -'xrdef {Catalogue of Rules-title}{Catalogue of Implicit Rules} -'xrdef {Catalogue of Rules-pg}{103} -'xrdef {Catalogue of Rules-snt}{Section'tie10.2} -'xrdef {Implicit Variables-title}{Variables Used by Implicit Rules} -'xrdef {Implicit Variables-pg}{106} -'xrdef {Implicit Variables-snt}{Section'tie10.3} -'xrdef {Chained Rules-title}{Chains of Implicit Rules} -'xrdef {Chained Rules-pg}{108} -'xrdef {Chained Rules-snt}{Section'tie10.4} -'xrdef {Pattern Rules-title}{Defining and Redefining Pattern Rules} -'xrdef {Pattern Rules-pg}{109} -'xrdef {Pattern Rules-snt}{Section'tie10.5} -'xrdef {Pattern Intro-title}{Introduction to Pattern Rules} -'xrdef {Pattern Intro-pg}{110} -'xrdef {Pattern Intro-snt}{Section'tie10.5.1} -'xrdef {Pattern Examples-title}{Pattern Rule Examples} -'xrdef {Pattern Examples-pg}{111} -'xrdef {Pattern Examples-snt}{Section'tie10.5.2} -'xrdef {Automatic-title}{Automatic Variables} -'xrdef {Automatic-pg}{112} -'xrdef {Automatic-snt}{Section'tie10.5.3} -'xrdef {Pattern Match-title}{How Patterns Match} -'xrdef {Pattern Match-pg}{114} -'xrdef {Pattern Match-snt}{Section'tie10.5.4} -'xrdef {Match-Anything Rules-title}{Match-Anything Pattern Rules} -'xrdef {Match-Anything Rules-pg}{115} -'xrdef {Match-Anything Rules-snt}{Section'tie10.5.5} -'xrdef {Canceling Rules-title}{Canceling Implicit Rules} -'xrdef {Canceling Rules-pg}{116} -'xrdef {Canceling Rules-snt}{Section'tie10.5.6} -'xrdef {Last Resort-title}{Defining Last-Resort Default Rules} -'xrdef {Last Resort-pg}{116} -'xrdef {Last Resort-snt}{Section'tie10.6} -'xrdef {Suffix Rules-title}{Old-Fashioned Suffix Rules} -'xrdef {Suffix Rules-pg}{117} -'xrdef {Suffix Rules-snt}{Section'tie10.7} -'xrdef {Search Algorithm-title}{Implicit Rule Search Algorithm} -'xrdef {Search Algorithm-pg}{119} -'xrdef {Search Algorithm-snt}{Section'tie10.8} -'xrdef {Archives-title}{Using \code {make} to Update Archive Files} -'xrdef {Archives-pg}{121} -'xrdef {Archives-snt}{Chapter'tie11} -'xrdef {Archive Members-title}{Archive Members as Targets} -'xrdef {Archive Members-pg}{121} -'xrdef {Archive Members-snt}{Section'tie11.1} -'xrdef {Archive Update-title}{Implicit Rule for Archive Member Targets} -'xrdef {Archive Update-pg}{122} -'xrdef {Archive Update-snt}{Section'tie11.2} -'xrdef {Archive Symbols-title}{Updating Archive Symbol Directories} -'xrdef {Archive Symbols-pg}{123} -'xrdef {Archive Symbols-snt}{Section'tie11.2.1} -'xrdef {Archive Pitfalls-title}{Dangers When Using Archives} -'xrdef {Archive Pitfalls-pg}{123} -'xrdef {Archive Pitfalls-snt}{Section'tie11.3} -'xrdef {Archive Suffix Rules-title}{Suffix Rules for Archive Files} -'xrdef {Archive Suffix Rules-pg}{124} -'xrdef {Archive Suffix Rules-snt}{Section'tie11.4} -'xrdef {Features-title}{Features of GNU \code {make}} -'xrdef {Features-pg}{125} -'xrdef {Features-snt}{Chapter'tie12} -'xrdef {Missing-title}{Incompatibilities and Missing Features} -'xrdef {Missing-pg}{129} -'xrdef {Missing-snt}{Chapter'tie13} -'xrdef {Makefile Conventions-title}{Makefile Conventions} -'xrdef {Makefile Conventions-pg}{131} -'xrdef {Makefile Conventions-snt}{Chapter'tie14} -'xrdef {Makefile Basics-title}{General Conventions for Makefiles} -'xrdef {Makefile Basics-pg}{131} -'xrdef {Makefile Basics-snt}{Section'tie14.1} -'xrdef {Utilities in Makefiles-title}{Utilities in Makefiles} -'xrdef {Utilities in Makefiles-pg}{132} -'xrdef {Utilities in Makefiles-snt}{Section'tie14.2} -'xrdef {Standard Targets-title}{Standard Targets for Users} -'xrdef {Standard Targets-pg}{133} -'xrdef {Standard Targets-snt}{Section'tie14.3} -'xrdef {Command Variables-title}{Variables for Specifying Commands} -'xrdef {Command Variables-pg}{136} -'xrdef {Command Variables-snt}{Section'tie14.4} -'xrdef {Directory Variables-title}{Variables for Installation Directories} -'xrdef {Directory Variables-pg}{138} -'xrdef {Directory Variables-snt}{Section'tie14.5} -'xrdef {Quick Reference-title}{Quick Reference} -'xrdef {Quick Reference-pg}{143} -'xrdef {Quick Reference-snt}{Appendix'tie'char65{}} -'xrdef {Complex Makefile-title}{Complex Makefile Example} -'xrdef {Complex Makefile-pg}{149} -'xrdef {Complex Makefile-snt}{Appendix'tie'char66{}} -'xrdef {Concept Index-title}{Index of Concepts} -'xrdef {Concept Index-pg}{155} -'xrdef {Concept Index-snt}{} -'xrdef {Name Index-title}{Index of Functions, Variables, & Directives} -'xrdef {Name Index-pg}{165} -'xrdef {Name Index-snt}{} diff --git a/buildtools/windows/source/make/make.cp b/buildtools/windows/source/make/make.cp deleted file mode 100644 index 04d05fb047e..00000000000 --- a/buildtools/windows/source/make/make.cp +++ /dev/null @@ -1,701 +0,0 @@ -\entry {POSIX}{1}{POSIX} -\entry {IEEE Standard 1003.2}{1}{IEEE Standard 1003.2} -\entry {standards conformance}{1}{standards conformance} -\entry {reporting bugs}{2}{reporting bugs} -\entry {bugs, reporting}{2}{bugs, reporting} -\entry {problems and bugs, reporting}{2}{problems and bugs, reporting} -\entry {makefile}{5}{makefile} -\entry {recompilation}{5}{recompilation} -\entry {editor}{5}{editor} -\entry {rule, introduction to}{5}{rule, introduction to} -\entry {makefile rule parts}{5}{makefile rule parts} -\entry {parts of makefile rule}{5}{parts of makefile rule} -\entry {targets, introduction to}{5}{targets, introduction to} -\entry {dependencies, introduction to}{5}{dependencies, introduction to} -\entry {commands, introduction to}{5}{commands, introduction to} -\entry {tabs in rules}{5}{tabs in rules} -\entry {simple makefile}{6}{simple makefile} -\entry {makefile, simple}{6}{makefile, simple} -\entry {continuation lines}{7}{continuation lines} -\entry {{\tt\indexbackslash } (backslash), for continuation lines}{7}{\code {{\tt\indexbackslash }} (backslash), for continuation lines} -\entry {backslash ({\tt\indexbackslash }), for continuation lines}{7}{backslash (\code {{\tt\indexbackslash }}), for continuation lines} -\entry {quoting newline, in makefile}{7}{quoting newline, in makefile} -\entry {newline, quoting, in makefile}{7}{newline, quoting, in makefile} -\entry {shell command}{8}{shell command} -\entry {clean target}{8}{\code {clean} target} -\entry {rm (shell command)}{8}{\code {rm} (shell command)} -\entry {processing a makefile}{8}{processing a makefile} -\entry {makefile, how make processes}{8}{makefile, how \code {make} processes} -\entry {default goal}{8}{default goal} -\entry {goal, default}{8}{goal, default} -\entry {goal}{8}{goal} -\entry {relinking}{9}{relinking} -\entry {variables}{9}{variables} -\entry {simplifying with variables}{9}{simplifying with variables} -\entry {objects}{9}{\code {objects}} -\entry {OBJECTS}{9}{\code {OBJECTS}} -\entry {objs}{9}{\code {objs}} -\entry {OBJS}{9}{\code {OBJS}} -\entry {obj}{9}{\code {obj}} -\entry {OBJ}{9}{\code {OBJ}} -\entry {deducing commands (implicit rules)}{10}{deducing commands (implicit rules)} -\entry {implicit rule, introduction to}{10}{implicit rule, introduction to} -\entry {rule, implicit, introduction to}{10}{rule, implicit, introduction to} -\entry {combining rules by dependency}{11}{combining rules by dependency} -\entry {cleaning up}{12}{cleaning up} -\entry {removing, to clean up}{12}{removing, to clean up} -\entry {clean target}{12}{\code {clean} target} -\entry {makefile, how to write}{13}{makefile, how to write} -\entry {rule, explicit, definition of}{13}{rule, explicit, definition of} -\entry {explicit rule, definition of}{13}{explicit rule, definition of} -\entry {rule, implicit, definition of}{13}{rule, implicit, definition of} -\entry {implicit rule, definition of}{13}{implicit rule, definition of} -\entry {variable definition}{13}{variable definition} -\entry {directive}{13}{directive} -\entry {comments, in makefile}{13}{comments, in makefile} -\entry {# (comments), in makefile}{13}{\code {#} (comments), in makefile} -\entry {makefile name}{14}{makefile name} -\entry {name of makefile}{14}{name of makefile} -\entry {default makefile name}{14}{default makefile name} -\entry {file name of makefile}{14}{file name of makefile} -\entry {README}{14}{\code {README}} -\entry {-f}{14}{\code {-f}} -\entry {--file}{14}{\code {--file}} -\entry {--makefile}{14}{\code {--makefile}} -\entry {specifying makefile name}{14}{specifying makefile name} -\entry {makefile name, how to specify}{14}{makefile name, how to specify} -\entry {name of makefile, how to specify}{14}{name of makefile, how to specify} -\entry {file name of makefile, how to specify}{14}{file name of makefile, how to specify} -\entry {including other makefiles}{14}{including other makefiles} -\entry {makefile, including}{14}{makefile, including} -\entry {shell file name pattern (in include)}{14}{shell file name pattern (in \code {include})} -\entry {shell wildcards (in include)}{14}{shell wildcards (in \code {include})} -\entry {wildcard, in include}{14}{wildcard, in \code {include}} -\entry {dependencies, automatic generation}{15}{dependencies, automatic generation} -\entry {automatic generation of dependencies}{15}{automatic generation of dependencies} -\entry {generating dependencies automatically}{15}{generating dependencies automatically} -\entry {-I}{15}{\code {-I}} -\entry {--include-dir}{15}{\code {--include-dir}} -\entry {makefile, and MAKEFILES variable}{16}{makefile, and \code {MAKEFILES} variable} -\entry {including (MAKEFILES variable)}{16}{including (\code {MAKEFILES} variable)} -\entry {recursion, and MAKEFILES variable}{16}{recursion, and \code {MAKEFILES} variable} -\entry {updating makefiles}{16}{updating makefiles} -\entry {remaking makefiles}{16}{remaking makefiles} -\entry {makefile, remaking of}{16}{makefile, remaking of} -\entry {overriding makefiles}{18}{overriding makefiles} -\entry {makefile, overriding}{18}{makefile, overriding} -\entry {match-anything rule, used to override}{18}{match-anything rule, used to override} -\entry {writing rules}{19}{writing rules} -\entry {rule, how to write}{19}{rule, how to write} -\entry {target}{19}{target} -\entry {dependency}{19}{dependency} -\entry {default goal}{19}{default goal} -\entry {goal, default}{19}{goal, default} -\entry {rule syntax}{19}{rule syntax} -\entry {syntax of rules}{19}{syntax of rules} -\entry {targets}{19}{targets} -\entry {rule targets}{19}{rule targets} -\entry {commands}{19}{commands} -\entry {tab character (in commands)}{19}{tab character (in commands)} -\entry {dollar sign ($), in rules}{20}{dollar sign (\code {$}), in rules} -\entry {$, in rules}{20}{\code {$}, in rules} -\entry {rule, and $}{20}{rule, and \code {$}} -\entry {dependencies}{20}{dependencies} -\entry {rule dependencies}{20}{rule dependencies} -\entry {wildcard}{20}{wildcard} -\entry {file name with wildcards}{20}{file name with wildcards} -\entry {globbing (wildcards)}{20}{globbing (wildcards)} -\entry {* (wildcard character)}{20}{\code {*} (wildcard character)} -\entry {? (wildcard character)}{20}{\code {?} (wildcard character)} -\entry {[...{}] (wildcard characters)}{20}{\code {[\dots {}]} (wildcard characters)} -\entry {{\tt\char'176} (tilde)}{20}{\code {{\tt\char'176}} (tilde)} -\entry {tilde ({\tt\char'176})}{20}{tilde (\code {{\tt\char'176}})} -\entry {home directory}{20}{home directory} -\entry {rm (shell command)}{21}{\code {rm} (shell command)} -\entry {print target}{21}{\code {print} target} -\entry {lpr (shell command)}{21}{\code {lpr} (shell command)} -\entry {touch (shell command)}{21}{\code {touch} (shell command)} -\entry {wildcard pitfalls}{22}{wildcard pitfalls} -\entry {pitfalls of wildcards}{22}{pitfalls of wildcards} -\entry {mistakes with wildcards}{22}{mistakes with wildcards} -\entry {errors with wildcards}{22}{errors with wildcards} -\entry {problems with wildcards}{22}{problems with wildcards} -\entry {vpath}{23}{vpath} -\entry {search path for dependencies (VPATH)}{23}{search path for dependencies (\code {VPATH})} -\entry {directory search (VPATH)}{23}{directory search (\code {VPATH})} -\entry {%, quoting in vpath}{25}{\code {%}, quoting in \code {vpath}} -\entry {%, quoting with {\tt\indexbackslash } (backslash)}{25}{\code {%}, quoting with \code {{\tt\indexbackslash }} (backslash)} -\entry {{\tt\indexbackslash } (backslash), to quote %}{25}{\code {{\tt\indexbackslash }} (backslash), to quote \code {%}} -\entry {backslash ({\tt\indexbackslash }), to quote %}{25}{backslash (\code {{\tt\indexbackslash }}), to quote \code {%}} -\entry {quoting %, in vpath}{25}{quoting \code {%}, in \code {vpath}} -\entry {shell command, and directory search}{26}{shell command, and directory search} -\entry {directory search (VPATH), and shell commands}{26}{directory search (\code {VPATH}), and shell commands} -\entry {VPATH, and implicit rules}{27}{\code {VPATH}, and implicit rules} -\entry {directory search (VPATH), and implicit rules}{27}{directory search (\code {VPATH}), and implicit rules} -\entry {search path for dependencies (VPATH), and implicit rules}{27}{search path for dependencies (\code {VPATH}), and implicit rules} -\entry {implicit rule, and directory search}{27}{implicit rule, and directory search} -\entry {implicit rule, and VPATH}{27}{implicit rule, and \code {VPATH}} -\entry {rule, implicit, and directory search}{27}{rule, implicit, and directory search} -\entry {rule, implicit, and VPATH}{27}{rule, implicit, and \code {VPATH}} -\entry {link libraries, and directory search}{27}{link libraries, and directory search} -\entry {libraries for linking, directory search}{27}{libraries for linking, directory search} -\entry {directory search (VPATH), and link libraries}{27}{directory search (\code {VPATH}), and link libraries} -\entry {VPATH, and link libraries}{27}{\code {VPATH}, and link libraries} -\entry {search path for dependencies (VPATH), and link libraries}{27}{search path for dependencies (\code {VPATH}), and link libraries} -\entry {-l (library search)}{27}{\code {-l} (library search)} -\entry {phony targets}{28}{phony targets} -\entry {targets, phony}{28}{targets, phony} -\entry {targets without a file}{28}{targets without a file} -\entry {rm (shell command)}{28}{\code {rm} (shell command)} -\entry {force targets}{30}{force targets} -\entry {targets, force}{30}{targets, force} -\entry {FORCE}{30}{\code {FORCE}} -\entry {rule, no commands or dependencies}{30}{rule, no commands or dependencies} -\entry {empty targets}{30}{empty targets} -\entry {targets, empty}{30}{targets, empty} -\entry {recording events with empty targets}{30}{recording events with empty targets} -\entry {print target}{30}{\code {print} target} -\entry {lpr (shell command)}{30}{\code {lpr} (shell command)} -\entry {touch (shell command)}{30}{\code {touch} (shell command)} -\entry {special targets}{31}{special targets} -\entry {built-in special targets}{31}{built-in special targets} -\entry {targets, built-in special}{31}{targets, built-in special} -\entry {precious targets}{31}{precious targets} -\entry {preserving with .PRECIOUS}{31}{preserving with \code {.PRECIOUS}} -\entry {multiple targets}{32}{multiple targets} -\entry {several targets in a rule}{32}{several targets in a rule} -\entry {targets, multiple}{32}{targets, multiple} -\entry {rule, with multiple targets}{32}{rule, with multiple targets} -\entry {multiple rules for one target}{33}{multiple rules for one target} -\entry {several rules for one target}{33}{several rules for one target} -\entry {rule, multiple for one target}{33}{rule, multiple for one target} -\entry {target, multiple rules for one}{33}{target, multiple rules for one} -\entry {static pattern rule}{34}{static pattern rule} -\entry {rule, static pattern}{34}{rule, static pattern} -\entry {pattern rules, static (not implicit)}{34}{pattern rules, static (not implicit)} -\entry {varying dependencies}{34}{varying dependencies} -\entry {dependencies, varying (static pattern)}{34}{dependencies, varying (static pattern)} -\entry {static pattern rule, syntax of}{34}{static pattern rule, syntax of} -\entry {pattern rules, static, syntax of}{34}{pattern rules, static, syntax of} -\entry {target pattern, static (not implicit)}{35}{target pattern, static (not implicit)} -\entry {stem}{35}{stem} -\entry {dependency pattern, static (not implicit)}{35}{dependency pattern, static (not implicit)} -\entry {%, quoting in static pattern}{35}{\code {%}, quoting in static pattern} -\entry {%, quoting with {\tt\indexbackslash } (backslash)}{35}{\code {%}, quoting with \code {{\tt\indexbackslash }} (backslash)} -\entry {{\tt\indexbackslash } (backslash), to quote %}{35}{\code {{\tt\indexbackslash }} (backslash), to quote \code {%}} -\entry {backslash ({\tt\indexbackslash }), to quote %}{35}{backslash (\code {{\tt\indexbackslash }}), to quote \code {%}} -\entry {quoting %, in static pattern}{35}{quoting \code {%}, in static pattern} -\entry {rule, static pattern versus implicit}{36}{rule, static pattern versus implicit} -\entry {static pattern rule, versus implicit}{36}{static pattern rule, versus implicit} -\entry {double-colon rules}{37}{double-colon rules} -\entry {rule, double-colon (::)}{37}{rule, double-colon (\code {::})} -\entry {multiple rules for one target (::)}{37}{multiple rules for one target (\code {::})} -\entry {:: rules (double-colon)}{37}{\code {::} rules (double-colon)} -\entry {dependencies, automatic generation}{37}{dependencies, automatic generation} -\entry {automatic generation of dependencies}{37}{automatic generation of dependencies} -\entry {generating dependencies automatically}{37}{generating dependencies automatically} -\entry {#include}{38}{\code {#include}} -\entry {-M (to compiler)}{38}{\code {-M} (to compiler)} -\entry {make depend}{38}{\code {make depend}} -\entry {-e (shell flag)}{39}{\code {-e} (shell flag)} -\entry {-MM (to GNU compiler)}{39}{\code {-MM} (to GNU compiler)} -\entry {sed (shell command)}{39}{\code {sed} (shell command)} -\entry {.d}{39}{\code {.d}} -\entry {commands, how to write}{41}{commands, how to write} -\entry {rule commands}{41}{rule commands} -\entry {writing rule commands}{41}{writing rule commands} -\entry {comments, in commands}{41}{comments, in commands} -\entry {commands, comments in}{41}{commands, comments in} -\entry {# (comments), in commands}{41}{\code {#} (comments), in commands} -\entry {echoing of commands}{41}{echoing of commands} -\entry {silent operation}{41}{silent operation} -\entry {{\tt\char'100} (in commands)}{41}{\code {{\tt\char'100}} (in commands)} -\entry {commands, echoing}{41}{commands, echoing} -\entry {printing of commands}{41}{printing of commands} -\entry {-n}{41}{\code {-n}} -\entry {--just-print}{41}{\code {--just-print}} -\entry {--dry-run}{41}{\code {--dry-run}} -\entry {--recon}{41}{\code {--recon}} -\entry {-s}{41}{\code {-s}} -\entry {--silent}{41}{\code {--silent}} -\entry {--quiet}{41}{\code {--quiet}} -\entry {commands, execution}{42}{commands, execution} -\entry {execution, of commands}{42}{execution, of commands} -\entry {shell command, execution}{42}{shell command, execution} -\entry {cd (shell command)}{42}{\code {cd} (shell command)} -\entry {commands, backslash ({\tt\indexbackslash }) in}{42}{commands, backslash (\code {{\tt\indexbackslash }}) in} -\entry {commands, quoting newlines in}{42}{commands, quoting newlines in} -\entry {backslash ({\tt\indexbackslash }), in commands}{42}{backslash (\code {{\tt\indexbackslash }}), in commands} -\entry {{\tt\indexbackslash } (backslash), in commands}{42}{\code {{\tt\indexbackslash }} (backslash), in commands} -\entry {quoting newline, in commands}{42}{quoting newline, in commands} -\entry {newline, quoting, in commands}{42}{newline, quoting, in commands} -\entry {environment, SHELL in}{42}{environment, \code {SHELL} in} -\entry {commands, execution in parallel}{42}{commands, execution in parallel} -\entry {parallel execution}{42}{parallel execution} -\entry {execution, in parallel}{42}{execution, in parallel} -\entry {job slots}{42}{job slots} -\entry {-j}{42}{\code {-j}} -\entry {--jobs}{42}{\code {--jobs}} -\entry {broken pipe}{43}{broken pipe} -\entry {standard input}{43}{standard input} -\entry {load average}{43}{load average} -\entry {limiting jobs based on load}{43}{limiting jobs based on load} -\entry {jobs, limiting based on load}{43}{jobs, limiting based on load} -\entry {-l (load average)}{43}{\code {-l} (load average)} -\entry {--max-load}{43}{\code {--max-load}} -\entry {--load-average}{43}{\code {--load-average}} -\entry {errors (in commands)}{44}{errors (in commands)} -\entry {commands, errors in}{44}{commands, errors in} -\entry {exit status (errors)}{44}{exit status (errors)} -\entry {- (in commands)}{44}{\code {-} (in commands)} -\entry {rm (shell command)}{44}{\code {rm} (shell command)} -\entry {-i}{44}{\code {-i}} -\entry {--ignore-errors}{44}{\code {--ignore-errors}} -\entry {-k}{45}{\code {-k}} -\entry {--keep-going}{45}{\code {--keep-going}} -\entry {Emacs (M-x compile)}{45}{Emacs (\code {M-x compile})} -\entry {deletion of target files}{45}{deletion of target files} -\entry {removal of target files}{45}{removal of target files} -\entry {target, deleting on error}{45}{target, deleting on error} -\entry {interrupt}{45}{interrupt} -\entry {signal}{45}{signal} -\entry {deletion of target files}{45}{deletion of target files} -\entry {removal of target files}{45}{removal of target files} -\entry {target, deleting on interrupt}{45}{target, deleting on interrupt} -\entry {killing (interruption)}{45}{killing (interruption)} -\entry {recursion}{46}{recursion} -\entry {subdirectories, recursion for}{46}{subdirectories, recursion for} -\entry {-C}{46}{\code {-C}} -\entry {--directory}{46}{\code {--directory}} -\entry {recursion, and MAKE variable}{46}{recursion, and \code {MAKE} variable} -\entry {cd (shell command)}{47}{\code {cd} (shell command)} -\entry {-t, and recursion}{47}{\code {-t}, and recursion} -\entry {recursion, and -t}{47}{recursion, and \code {-t}} -\entry {--touch, and recursion}{47}{\code {--touch}, and recursion} -\entry {sub-make}{47}{sub-\code {make}} -\entry {environment, and recursion}{47}{environment, and recursion} -\entry {exporting variables}{47}{exporting variables} -\entry {variables, environment}{47}{variables, environment} -\entry {variables, exporting}{47}{variables, exporting} -\entry {recursion, and environment}{47}{recursion, and environment} -\entry {recursion, and variables}{47}{recursion, and variables} -\entry {compatibility in exporting}{49}{compatibility in exporting} -\entry {recursion, level of}{49}{recursion, level of} -\entry {options, and recursion}{50}{options, and recursion} -\entry {recursion, and options}{50}{recursion, and options} -\entry {command line variable definitions, and recursion}{50}{command line variable definitions, and recursion} -\entry {variables, command line, and recursion}{50}{variables, command line, and recursion} -\entry {recursion, and command line variable definitions}{50}{recursion, and command line variable definitions} -\entry {-C, and recursion}{50}{\code {-C}, and recursion} -\entry {-f, and recursion}{50}{\code {-f}, and recursion} -\entry {-o, and recursion}{50}{\code {-o}, and recursion} -\entry {-W, and recursion}{50}{\code {-W}, and recursion} -\entry {--directory, and recursion}{50}{\code {--directory}, and recursion} -\entry {--file, and recursion}{50}{\code {--file}, and recursion} -\entry {--old-file, and recursion}{50}{\code {--old-file}, and recursion} -\entry {--assume-old, and recursion}{50}{\code {--assume-old}, and recursion} -\entry {--assume-new, and recursion}{50}{\code {--assume-new}, and recursion} -\entry {--new-file, and recursion}{50}{\code {--new-file}, and recursion} -\entry {recursion, and -C}{50}{recursion, and \code {-C}} -\entry {recursion, and -f}{50}{recursion, and \code {-f}} -\entry {recursion, and -o}{50}{recursion, and \code {-o}} -\entry {recursion, and -W}{50}{recursion, and \code {-W}} -\entry {-j, and recursion}{50}{\code {-j}, and recursion} -\entry {--jobs, and recursion}{50}{\code {--jobs}, and recursion} -\entry {recursion, and -j}{50}{recursion, and \code {-j}} -\entry {job slots, and recursion}{50}{job slots, and recursion} -\entry {Arg list too long}{51}{Arg list too long} -\entry {E2BIG}{51}{E2BIG} -\entry {POSIX.2}{51}{POSIX.2} -\entry {setting options from environment}{51}{setting options from environment} -\entry {options, setting from environment}{51}{options, setting from environment} -\entry {setting options in makefiles}{51}{setting options in makefiles} -\entry {options, setting in makefiles}{51}{options, setting in makefiles} -\entry {directories, printing them}{52}{directories, printing them} -\entry {printing directories}{52}{printing directories} -\entry {recursion, and printing directories}{52}{recursion, and printing directories} -\entry {-C, and -w}{52}{\code {-C}, and \code {-w}} -\entry {--directory, and --print-directory}{52}{\code {--directory}, and \code {--print-directory}} -\entry {recursion, and -w}{52}{recursion, and \code {-w}} -\entry {-w, and -C}{52}{\code {-w}, and \code {-C}} -\entry {-w, and recursion}{52}{\code {-w}, and recursion} -\entry {--print-directory, and --directory}{52}{\code {--print-directory}, and \code {--directory}} -\entry {--print-directory, and recursion}{52}{\code {--print-directory}, and recursion} -\entry {--no-print-directory}{52}{\code {--no-print-directory}} -\entry {--print-directory, disabling}{52}{\code {--print-directory}, disabling} -\entry {-w, disabling}{52}{\code {-w}, disabling} -\entry {sequences of commands}{52}{sequences of commands} -\entry {commands, sequences of}{52}{commands, sequences of} -\entry {yacc}{53}{\code {yacc}} -\entry {{\tt\char'100}, and define}{53}{{\tt\char'100}, and \code {define}} -\entry {-, and define}{53}{-, and \code {define}} -\entry {{\tt\char43}, and define}{53}{{\tt\char43}, and \code {define}} -\entry {empty commands}{54}{empty commands} -\entry {commands, empty}{54}{commands, empty} -\entry {variable}{55}{variable} -\entry {value}{55}{value} -\entry {recursive variable expansion}{55}{recursive variable expansion} -\entry {simple variable expansion}{55}{simple variable expansion} -\entry {macro}{55}{macro} -\entry {variables, how to reference}{55}{variables, how to reference} -\entry {reference to variables}{55}{reference to variables} -\entry {$, in variable reference}{55}{\code {$}, in variable reference} -\entry {dollar sign ($), in variable reference}{55}{dollar sign (\code {$}), in variable reference} -\entry {flavors of variables}{56}{flavors of variables} -\entry {recursive variable expansion}{56}{recursive variable expansion} -\entry {variables, flavors}{56}{variables, flavors} -\entry {recursively expanded variables}{56}{recursively expanded variables} -\entry {variables, recursively expanded}{56}{variables, recursively expanded} -\entry {=}{56}{=} -\entry {loops in variable expansion}{57}{loops in variable expansion} -\entry {variables, loops in expansion}{57}{variables, loops in expansion} -\entry {simply expanded variables}{57}{simply expanded variables} -\entry {variables, simply expanded}{57}{variables, simply expanded} -\entry {:=}{57}{:=} -\entry {spaces, in variable values}{58}{spaces, in variable values} -\entry {whitespace, in variable values}{58}{whitespace, in variable values} -\entry {variables, spaces in values}{58}{variables, spaces in values} -\entry {reference to variables}{59}{reference to variables} -\entry {modified variable reference}{59}{modified variable reference} -\entry {substitution variable reference}{59}{substitution variable reference} -\entry {variables, modified reference}{59}{variables, modified reference} -\entry {variables, substitution reference}{59}{variables, substitution reference} -\entry {variables, substituting suffix in}{59}{variables, substituting suffix in} -\entry {suffix, substituting in variables}{59}{suffix, substituting in variables} -\entry {nested variable reference}{60}{nested variable reference} -\entry {computed variable name}{60}{computed variable name} -\entry {variables, computed names}{60}{variables, computed names} -\entry {variables, nested references}{60}{variables, nested references} -\entry {variables, $ in name}{60}{variables, \samp {$} in name} -\entry {$, in variable name}{60}{\code {$}, in variable name} -\entry {dollar sign ($), in variable name}{60}{dollar sign (\code {$}), in variable name} -\entry {variables, how they get their values}{63}{variables, how they get their values} -\entry {value, how a variable gets it}{63}{value, how a variable gets it} -\entry {setting variables}{63}{setting variables} -\entry {variables, setting}{63}{variables, setting} -\entry {=}{63}{=} -\entry {:=}{63}{:=} -\entry {{\tt\char43}=}{64}{{\tt\char43}=} -\entry {appending to variables}{64}{appending to variables} -\entry {variables, appending to}{64}{variables, appending to} -\entry {overriding with override}{66}{overriding with \code {override}} -\entry {variables, overriding}{66}{variables, overriding} -\entry {verbatim variable definition}{67}{verbatim variable definition} -\entry {defining variables verbatim}{67}{defining variables verbatim} -\entry {variables, defining verbatim}{67}{variables, defining verbatim} -\entry {variables, environment}{68}{variables, environment} -\entry {environment}{68}{environment} -\entry {conditionals}{71}{conditionals} -\entry {functions}{77}{functions} -\entry {$, in function call}{77}{\code {$}, in function call} -\entry {dollar sign ($), in function call}{77}{dollar sign (\code {$}), in function call} -\entry {arguments of functions}{77}{arguments of functions} -\entry {functions, syntax of}{77}{functions, syntax of} -\entry {functions, for text}{78}{functions, for text} -\entry {%, quoting in patsubst}{78}{\code {%}, quoting in \code {patsubst}} -\entry {%, quoting with {\tt\indexbackslash } (backslash)}{78}{\code {%}, quoting with \code {{\tt\indexbackslash }} (backslash)} -\entry {{\tt\indexbackslash } (backslash), to quote %}{78}{\code {{\tt\indexbackslash }} (backslash), to quote \code {%}} -\entry {backslash ({\tt\indexbackslash }), to quote %}{78}{backslash (\code {{\tt\indexbackslash }}), to quote \code {%}} -\entry {quoting %, in patsubst}{78}{quoting \code {%}, in \code {patsubst}} -\entry {stripping whitespace}{79}{stripping whitespace} -\entry {whitespace, stripping}{79}{whitespace, stripping} -\entry {spaces, stripping}{79}{spaces, stripping} -\entry {searching for strings}{79}{searching for strings} -\entry {finding strings}{79}{finding strings} -\entry {strings, searching for}{79}{strings, searching for} -\entry {filtering words}{80}{filtering words} -\entry {words, filtering}{80}{words, filtering} -\entry {filtering out words}{80}{filtering out words} -\entry {words, filtering out}{80}{words, filtering out} -\entry {sorting words}{80}{sorting words} -\entry {removing duplicate words}{80}{removing duplicate words} -\entry {duplicate words, removing}{80}{duplicate words, removing} -\entry {words, removing duplicates}{80}{words, removing duplicates} -\entry {functions, for file names}{81}{functions, for file names} -\entry {file name functions}{81}{file name functions} -\entry {directory part}{81}{directory part} -\entry {file name, directory part}{81}{file name, directory part} -\entry {file name, nondirectory part}{81}{file name, nondirectory part} -\entry {nondirectory part}{81}{nondirectory part} -\entry {suffix, function to find}{82}{suffix, function to find} -\entry {file name suffix}{82}{file name suffix} -\entry {basename}{82}{basename} -\entry {file name, basename of}{82}{file name, basename of} -\entry {suffix, adding}{82}{suffix, adding} -\entry {file name suffix, adding}{82}{file name suffix, adding} -\entry {prefix, adding}{82}{prefix, adding} -\entry {file name prefix, adding}{82}{file name prefix, adding} -\entry {joining lists of words}{82}{joining lists of words} -\entry {words, joining lists}{82}{words, joining lists} -\entry {words, selecting}{83}{words, selecting} -\entry {selecting words}{83}{selecting words} -\entry {words, finding number}{83}{words, finding number} -\entry {words, extracting first}{83}{words, extracting first} -\entry {wildcard, function}{83}{wildcard, function} -\entry {words, iterating over}{83}{words, iterating over} -\entry {variables, origin of}{85}{variables, origin of} -\entry {origin of variable}{85}{origin of variable} -\entry {commands, expansion}{87}{commands, expansion} -\entry {backquotes}{87}{backquotes} -\entry {shell command, function for}{87}{shell command, function for} -\entry {--file}{89}{\code {--file}} -\entry {--makefile}{89}{\code {--makefile}} -\entry {-f}{89}{\code {-f}} -\entry {goal, how to specify}{90}{goal, how to specify} -\entry {all (standard target)}{91}{\code {all} \r {(standard target)}} -\entry {clean (standard target)}{91}{\code {clean} \r {(standard target)}} -\entry {mostlyclean (standard target)}{91}{\code {mostlyclean} \r {(standard target)}} -\entry {distclean (standard target)}{91}{\code {distclean} \r {(standard target)}} -\entry {realclean (standard target)}{91}{\code {realclean} \r {(standard target)}} -\entry {clobber (standard target)}{91}{\code {clobber} \r {(standard target)}} -\entry {install (standard target)}{91}{\code {install} \r {(standard target)}} -\entry {print (standard target)}{91}{\code {print} \r {(standard target)}} -\entry {tar (standard target)}{91}{\code {tar} \r {(standard target)}} -\entry {shar (standard target)}{91}{\code {shar} \r {(standard target)}} -\entry {dist (standard target)}{91}{\code {dist} \r {(standard target)}} -\entry {TAGS (standard target)}{91}{\code {TAGS} \r {(standard target)}} -\entry {check (standard target)}{91}{\code {check} \r {(standard target)}} -\entry {test (standard target)}{91}{\code {test} \r {(standard target)}} -\entry {execution, instead of}{91}{execution, instead of} -\entry {commands, instead of executing}{91}{commands, instead of executing} -\entry {--just-print}{91}{\code {--just-print}} -\entry {--dry-run}{91}{\code {--dry-run}} -\entry {--recon}{91}{\code {--recon}} -\entry {-n}{91}{\code {-n}} -\entry {--touch}{92}{\code {--touch}} -\entry {touching files}{92}{touching files} -\entry {target, touching}{92}{target, touching} -\entry {-t}{92}{\code {-t}} -\entry {--question}{92}{\code {--question}} -\entry {-q}{92}{\code {-q}} -\entry {question mode}{92}{question mode} -\entry {--what-if}{92}{\code {--what-if}} -\entry {-W}{92}{\code {-W}} -\entry {--assume-new}{92}{\code {--assume-new}} -\entry {--new-file}{92}{\code {--new-file}} -\entry {what if}{92}{what if} -\entry {files, assuming new}{92}{files, assuming new} -\entry {-o}{93}{\code {-o}} -\entry {--old-file}{93}{\code {--old-file}} -\entry {--assume-old}{93}{\code {--assume-old}} -\entry {files, assuming old}{93}{files, assuming old} -\entry {files, avoiding recompilation of}{93}{files, avoiding recompilation of} -\entry {recompilation, avoiding}{93}{recompilation, avoiding} -\entry {overriding variables with arguments}{94}{overriding variables with arguments} -\entry {variables, overriding with arguments}{94}{variables, overriding with arguments} -\entry {command line variables}{94}{command line variables} -\entry {variables, command line}{94}{variables, command line} -\entry {testing compilation}{95}{testing compilation} -\entry {compilation, testing}{95}{compilation, testing} -\entry {-k}{95}{\code {-k}} -\entry {--keep-going}{95}{\code {--keep-going}} -\entry {options}{95}{options} -\entry {flags}{95}{flags} -\entry {switches}{95}{switches} -\entry {-b}{95}{\code {-b}} -\entry {-m}{95}{\code {-m}} -\entry {-C}{95}{\code {-C}} -\entry {--directory}{95}{\code {--directory}} -\entry {-d}{96}{\code {-d}} -\entry {--debug}{96}{\code {--debug}} -\entry {-e}{96}{\code {-e}} -\entry {--environment-overrides}{96}{\code {--environment-overrides}} -\entry {-f}{96}{\code {-f}} -\entry {--file}{96}{\code {--file}} -\entry {--makefile}{96}{\code {--makefile}} -\entry {-h}{96}{\code {-h}} -\entry {--help}{96}{\code {--help}} -\entry {-i}{96}{\code {-i}} -\entry {--ignore-errors}{96}{\code {--ignore-errors}} -\entry {-I}{96}{\code {-I}} -\entry {--include-dir}{96}{\code {--include-dir}} -\entry {-j}{96}{\code {-j}} -\entry {--jobs}{96}{\code {--jobs}} -\entry {-k}{96}{\code {-k}} -\entry {--keep-going}{96}{\code {--keep-going}} -\entry {-l}{97}{\code {-l}} -\entry {--load-average}{97}{\code {--load-average}} -\entry {--max-load}{97}{\code {--max-load}} -\entry {-n}{97}{\code {-n}} -\entry {--just-print}{97}{\code {--just-print}} -\entry {--dry-run}{97}{\code {--dry-run}} -\entry {--recon}{97}{\code {--recon}} -\entry {-o}{97}{\code {-o}} -\entry {--old-file}{97}{\code {--old-file}} -\entry {--assume-old}{97}{\code {--assume-old}} -\entry {-p}{97}{\code {-p}} -\entry {--print-data-base}{97}{\code {--print-data-base}} -\entry {-q}{97}{\code {-q}} -\entry {--question}{97}{\code {--question}} -\entry {-r}{97}{\code {-r}} -\entry {--no-builtin-rules}{97}{\code {--no-builtin-rules}} -\entry {-s}{97}{\code {-s}} -\entry {--silent}{98}{\code {--silent}} -\entry {--quiet}{98}{\code {--quiet}} -\entry {-S}{98}{\code {-S}} -\entry {--no-keep-going}{98}{\code {--no-keep-going}} -\entry {--stop}{98}{\code {--stop}} -\entry {-t}{98}{\code {-t}} -\entry {--touch}{98}{\code {--touch}} -\entry {-v}{98}{\code {-v}} -\entry {--version}{98}{\code {--version}} -\entry {-w}{98}{\code {-w}} -\entry {--print-directory}{98}{\code {--print-directory}} -\entry {--no-print-directory}{98}{\code {--no-print-directory}} -\entry {-W}{98}{\code {-W}} -\entry {--what-if}{98}{\code {--what-if}} -\entry {--new-file}{98}{\code {--new-file}} -\entry {--assume-new}{98}{\code {--assume-new}} -\entry {--warn-undefined-variables}{99}{\code {--warn-undefined-variables}} -\entry {variables, warning for undefined}{99}{variables, warning for undefined} -\entry {undefined variables, warning message}{99}{undefined variables, warning message} -\entry {implicit rule}{101}{implicit rule} -\entry {rule, implicit}{101}{rule, implicit} -\entry {implicit rule, how to use}{101}{implicit rule, how to use} -\entry {rule, implicit, how to use}{101}{rule, implicit, how to use} -\entry {implicit rule, predefined}{103}{implicit rule, predefined} -\entry {rule, implicit, predefined}{103}{rule, implicit, predefined} -\entry {C, rule to compile}{103}{C, rule to compile} -\entry {cc}{103}{\code {cc}} -\entry {gcc}{103}{\code {gcc}} -\entry {.o}{103}{\code {.o}} -\entry {.c}{103}{\code {.c}} -\entry {C{\tt\char43}{\tt\char43}, rule to compile}{103}{C{\tt\char43}{\tt\char43}, rule to compile} -\entry {g{\tt\char43}{\tt\char43}}{103}{\code {g{\tt\char43}{\tt\char43}}} -\entry {.C}{103}{\code {.C}} -\entry {.cc}{103}{\code {.cc}} -\entry {Pascal, rule to compile}{103}{Pascal, rule to compile} -\entry {pc}{103}{\code {pc}} -\entry {.p}{103}{\code {.p}} -\entry {Fortran, rule to compile}{103}{Fortran, rule to compile} -\entry {Ratfor, rule to compile}{103}{Ratfor, rule to compile} -\entry {f77}{103}{\code {f77}} -\entry {.f}{103}{\code {.f}} -\entry {.r}{103}{\code {.r}} -\entry {.F}{103}{\code {.F}} -\entry {Modula-2, rule to compile}{104}{Modula-2, rule to compile} -\entry {m2c}{104}{\code {m2c}} -\entry {.sym}{104}{\code {.sym}} -\entry {.def}{104}{\code {.def}} -\entry {.mod}{104}{\code {.mod}} -\entry {assembly, rule to compile}{104}{assembly, rule to compile} -\entry {as}{104}{\code {as}} -\entry {.s}{104}{\code {.s}} -\entry {.S}{104}{\code {.S}} -\entry {linking, predefined rule for}{104}{linking, predefined rule for} -\entry {ld}{104}{\code {ld}} -\entry {.o}{104}{\code {.o}} -\entry {yacc}{105}{\code {yacc}} -\entry {Yacc, rule to run}{105}{Yacc, rule to run} -\entry {.y}{105}{\code {.y}} -\entry {lex}{105}{\code {lex}} -\entry {Lex, rule to run}{105}{Lex, rule to run} -\entry {.l}{105}{\code {.l}} -\entry {lint}{105}{\code {lint}} -\entry {lint, rule to run}{105}{\code {lint}, rule to run} -\entry {.ln}{105}{\code {.ln}} -\entry {TeX{}, rule to run}{105}{\TeX{}, rule to run} -\entry {Web, rule to run}{105}{Web, rule to run} -\entry {tex}{105}{\code {tex}} -\entry {cweave}{105}{\code {cweave}} -\entry {weave}{105}{\code {weave}} -\entry {tangle}{105}{\code {tangle}} -\entry {ctangle}{105}{\code {ctangle}} -\entry {.dvi}{105}{\code {.dvi}} -\entry {.tex}{105}{\code {.tex}} -\entry {.web}{105}{\code {.web}} -\entry {.w}{105}{\code {.w}} -\entry {.ch}{105}{\code {.ch}} -\entry {Texinfo, rule to format}{105}{Texinfo, rule to format} -\entry {Info, rule to format}{105}{Info, rule to format} -\entry {texi2dvi}{105}{\code {texi2dvi}} -\entry {makeinfo}{105}{\code {makeinfo}} -\entry {.texinfo}{105}{\code {.texinfo}} -\entry {.info}{105}{\code {.info}} -\entry {.texi}{105}{\code {.texi}} -\entry {.txinfo}{105}{\code {.txinfo}} -\entry {RCS, rule to extract from}{105}{RCS, rule to extract from} -\entry {co}{105}{\code {co}} -\entry {,v (RCS file extension)}{105}{\code {,v \r {(RCS file extension)}}} -\entry {SCCS, rule to extract from}{105}{SCCS, rule to extract from} -\entry {get}{105}{\code {get}} -\entry {s. (SCCS file prefix)}{105}{\code {s. \r {(SCCS file prefix)}}} -\entry {.sh}{105}{\code {.sh}} -\entry {flags for compilers}{106}{flags for compilers} -\entry {ar}{107}{\code {ar}} -\entry {as}{107}{\code {as}} -\entry {cc}{107}{\code {cc}} -\entry {g{\tt\char43}{\tt\char43}}{107}{\code {g{\tt\char43}{\tt\char43}}} -\entry {co}{107}{\code {co}} -\entry {f77}{107}{\code {f77}} -\entry {get}{107}{\code {get}} -\entry {lex}{107}{\code {lex}} -\entry {pc}{107}{\code {pc}} -\entry {yacc}{107}{\code {yacc}} -\entry {makeinfo}{107}{\code {makeinfo}} -\entry {tex}{107}{\code {tex}} -\entry {texi2dvi}{107}{\code {texi2dvi}} -\entry {weave}{107}{\code {weave}} -\entry {cweave}{107}{\code {cweave}} -\entry {tangle}{107}{\code {tangle}} -\entry {ctangle}{107}{\code {ctangle}} -\entry {rm}{107}{\code {rm}} -\entry {chains of rules}{108}{chains of rules} -\entry {rule, implicit, chains of}{108}{rule, implicit, chains of} -\entry {intermediate files}{108}{intermediate files} -\entry {files, intermediate}{108}{files, intermediate} -\entry {intermediate files, preserving}{109}{intermediate files, preserving} -\entry {preserving intermediate files}{109}{preserving intermediate files} -\entry {preserving with .PRECIOUS}{109}{preserving with \code {.PRECIOUS}} -\entry {.PRECIOUS intermediate files}{109}{\code {.PRECIOUS} intermediate files} -\entry {pattern rule}{110}{pattern rule} -\entry {rule, pattern}{110}{rule, pattern} -\entry {target pattern, implicit}{110}{target pattern, implicit} -\entry {%, in pattern rules}{110}{\code {%}, in pattern rules} -\entry {dependency pattern, implicit}{110}{dependency pattern, implicit} -\entry {multiple targets, in pattern rule}{110}{multiple targets, in pattern rule} -\entry {target, multiple in pattern rule}{110}{target, multiple in pattern rule} -\entry {pattern rules, order of}{111}{pattern rules, order of} -\entry {order of pattern rules}{111}{order of pattern rules} -\entry {automatic variables}{112}{automatic variables} -\entry {variables, automatic}{112}{variables, automatic} -\entry {variables, and implicit rule}{112}{variables, and implicit rule} -\entry {dependencies, list of changed}{112}{dependencies, list of changed} -\entry {list of changed dependencies}{112}{list of changed dependencies} -\entry {dependencies, list of all}{112}{dependencies, list of all} -\entry {list of all dependencies}{112}{list of all dependencies} -\entry {stem, variable for}{113}{stem, variable for} -\entry {stem}{114}{stem} -\entry {match-anything rule}{115}{match-anything rule} -\entry {terminal rule}{115}{terminal rule} -\entry {last-resort default rules}{116}{last-resort default rules} -\entry {default rules, last-resort}{116}{default rules, last-resort} -\entry {old-fashioned suffix rules}{117}{old-fashioned suffix rules} -\entry {suffix rule}{117}{suffix rule} -\entry {implicit rule, search algorithm}{119}{implicit rule, search algorithm} -\entry {search algorithm, implicit rule}{119}{search algorithm, implicit rule} -\entry {archive}{121}{archive} -\entry {archive member targets}{121}{archive member targets} -\entry {wildcard, in archive member}{121}{wildcard, in archive member} -\entry {{\_}{\_}.SYMDEF}{123}{\code {{\_}{\_}.SYMDEF}} -\entry {updating archive symbol directories}{123}{updating archive symbol directories} -\entry {archive symbol directory updating}{123}{archive symbol directory updating} -\entry {symbol directories, updating archive}{123}{symbol directories, updating archive} -\entry {directories, updating archive symbol}{123}{directories, updating archive symbol} -\entry {archive, and parallel execution}{123}{archive, and parallel execution} -\entry {parallel execution, and archive update}{123}{parallel execution, and archive update} -\entry {archive, and -j}{123}{archive, and \code {-j}} -\entry {-j, and archive update}{123}{\code {-j}, and archive update} -\entry {suffix rule, for archive}{124}{suffix rule, for archive} -\entry {archive, suffix rule for}{124}{archive, suffix rule for} -\entry {library archive, suffix rule for}{124}{library archive, suffix rule for} -\entry {.a (archives)}{124}{\code {.a} (archives)} -\entry {features of GNU make}{125}{features of GNU \code {make}} -\entry {portability}{125}{portability} -\entry {compatibility}{125}{compatibility} -\entry {incompatibilities}{129}{incompatibilities} -\entry {missing features}{129}{missing features} -\entry {features, missing}{129}{features, missing} -\entry {makefile, conventions for}{131}{makefile, conventions for} -\entry {conventions for makefiles}{131}{conventions for makefiles} -\entry {standards for makefiles}{131}{standards for makefiles} diff --git a/buildtools/windows/source/make/make.cps b/buildtools/windows/source/make/make.cps deleted file mode 100644 index 0b8cbac3bfa..00000000000 --- a/buildtools/windows/source/make/make.cps +++ /dev/null @@ -1,652 +0,0 @@ -\initial {#} -\entry {\code {#} (comments), in commands}{41} -\entry {\code {#} (comments), in makefile}{13} -\entry {\code {#include}}{38} -\initial {$} -\entry {\code {$}, in function call}{77} -\entry {\code {$}, in rules}{20} -\entry {\code {$}, in variable name}{60} -\entry {\code {$}, in variable reference}{55} -\initial {%} -\entry {\code {%}, in pattern rules}{110} -\entry {\code {%}, quoting in \code {patsubst}}{78} -\entry {\code {%}, quoting in static pattern}{35} -\entry {\code {%}, quoting in \code {vpath}}{25} -\entry {\code {%}, quoting with \code {{\tt\indexbackslash }} (backslash)}{25, 35, 78} -\initial {*} -\entry {\code {*} (wildcard character)}{20} -\initial {,} -\entry {\code {,v \r {(RCS file extension)}}}{105} -\initial {-} -\entry {\code {-} (in commands)}{44} -\entry {-, and \code {define}}{53} -\entry {\code {--assume-new}}{92, 98} -\entry {\code {--assume-new}, and recursion}{50} -\entry {\code {--assume-old}}{93, 97} -\entry {\code {--assume-old}, and recursion}{50} -\entry {\code {--debug}}{96} -\entry {\code {--directory}}{46, 95} -\entry {\code {--directory}, and \code {--print-directory}}{52} -\entry {\code {--directory}, and recursion}{50} -\entry {\code {--dry-run}}{41, 91, 97} -\entry {\code {--environment-overrides}}{96} -\entry {\code {--file}}{14, 89, 96} -\entry {\code {--file}, and recursion}{50} -\entry {\code {--help}}{96} -\entry {\code {--ignore-errors}}{44, 96} -\entry {\code {--include-dir}}{15, 96} -\entry {\code {--jobs}}{42, 96} -\entry {\code {--jobs}, and recursion}{50} -\entry {\code {--just-print}}{41, 91, 97} -\entry {\code {--keep-going}}{45, 95, 96} -\entry {\code {--load-average}}{43, 97} -\entry {\code {--makefile}}{14, 89, 96} -\entry {\code {--max-load}}{43, 97} -\entry {\code {--new-file}}{92, 98} -\entry {\code {--new-file}, and recursion}{50} -\entry {\code {--no-builtin-rules}}{97} -\entry {\code {--no-keep-going}}{98} -\entry {\code {--no-print-directory}}{52, 98} -\entry {\code {--old-file}}{93, 97} -\entry {\code {--old-file}, and recursion}{50} -\entry {\code {--print-data-base}}{97} -\entry {\code {--print-directory}}{98} -\entry {\code {--print-directory}, and \code {--directory}}{52} -\entry {\code {--print-directory}, and recursion}{52} -\entry {\code {--print-directory}, disabling}{52} -\entry {\code {--question}}{92, 97} -\entry {\code {--quiet}}{41, 98} -\entry {\code {--recon}}{41, 91, 97} -\entry {\code {--silent}}{41, 98} -\entry {\code {--stop}}{98} -\entry {\code {--touch}}{92, 98} -\entry {\code {--touch}, and recursion}{47} -\entry {\code {--version}}{98} -\entry {\code {--warn-undefined-variables}}{99} -\entry {\code {--what-if}}{92, 98} -\entry {\code {-b}}{95} -\entry {\code {-C}}{46, 95} -\entry {\code {-C}, and \code {-w}}{52} -\entry {\code {-C}, and recursion}{50} -\entry {\code {-d}}{96} -\entry {\code {-e}}{96} -\entry {\code {-e} (shell flag)}{39} -\entry {\code {-f}}{14, 89, 96} -\entry {\code {-f}, and recursion}{50} -\entry {\code {-h}}{96} -\entry {\code {-i}}{44, 96} -\entry {\code {-I}}{15, 96} -\entry {\code {-j}}{42, 96} -\entry {\code {-j}, and archive update}{123} -\entry {\code {-j}, and recursion}{50} -\entry {\code {-k}}{45, 95, 96} -\entry {\code {-l}}{97} -\entry {\code {-l} (library search)}{27} -\entry {\code {-l} (load average)}{43} -\entry {\code {-m}}{95} -\entry {\code {-M} (to compiler)}{38} -\entry {\code {-MM} (to GNU compiler)}{39} -\entry {\code {-n}}{41, 91, 97} -\entry {\code {-o}}{93, 97} -\entry {\code {-o}, and recursion}{50} -\entry {\code {-p}}{97} -\entry {\code {-q}}{92, 97} -\entry {\code {-r}}{97} -\entry {\code {-s}}{41, 97} -\entry {\code {-S}}{98} -\entry {\code {-t}}{92, 98} -\entry {\code {-t}, and recursion}{47} -\entry {\code {-v}}{98} -\entry {\code {-w}}{98} -\entry {\code {-W}}{92, 98} -\entry {\code {-w}, and \code {-C}}{52} -\entry {\code {-w}, and recursion}{52} -\entry {\code {-W}, and recursion}{50} -\entry {\code {-w}, disabling}{52} -\initial {.} -\entry {\code {.a} (archives)}{124} -\entry {\code {.c}}{103} -\entry {\code {.C}}{103} -\entry {\code {.cc}}{103} -\entry {\code {.ch}}{105} -\entry {\code {.d}}{39} -\entry {\code {.def}}{104} -\entry {\code {.dvi}}{105} -\entry {\code {.f}}{103} -\entry {\code {.F}}{103} -\entry {\code {.info}}{105} -\entry {\code {.l}}{105} -\entry {\code {.ln}}{105} -\entry {\code {.mod}}{104} -\entry {\code {.o}}{103, 104} -\entry {\code {.p}}{103} -\entry {\code {.PRECIOUS} intermediate files}{109} -\entry {\code {.r}}{103} -\entry {\code {.s}}{104} -\entry {\code {.S}}{104} -\entry {\code {.sh}}{105} -\entry {\code {.sym}}{104} -\entry {\code {.tex}}{105} -\entry {\code {.texi}}{105} -\entry {\code {.texinfo}}{105} -\entry {\code {.txinfo}}{105} -\entry {\code {.w}}{105} -\entry {\code {.web}}{105} -\entry {\code {.y}}{105} -\initial {:} -\entry {\code {::} rules (double-colon)}{37} -\entry {:=}{57, 63} -\initial {=} -\entry {=}{56, 63} -\initial {?} -\entry {\code {?} (wildcard character)}{20} -\initial {[} -\entry {\code {[\dots {}]} (wildcard characters)}{20} -\initial {{\_}} -\entry {\code {{\_}{\_}.SYMDEF}}{123} -\initial {{\tt\char'100}} -\entry {\code {{\tt\char'100}} (in commands)}{41} -\entry {{\tt\char'100}, and \code {define}}{53} -\initial {{\tt\char'176}} -\entry {\code {{\tt\char'176}} (tilde)}{20} -\initial {{\tt\char43}} -\entry {{\tt\char43}, and \code {define}}{53} -\entry {{\tt\char43}=}{64} -\initial {{\tt\indexbackslash }} -\entry {\code {{\tt\indexbackslash }} (backslash), for continuation lines}{7} -\entry {\code {{\tt\indexbackslash }} (backslash), in commands}{42} -\entry {\code {{\tt\indexbackslash }} (backslash), to quote \code {%}}{25, 35, 78} -\initial {A} -\entry {\code {all} \r {(standard target)}}{91} -\entry {appending to variables}{64} -\entry {\code {ar}}{107} -\entry {archive}{121} -\entry {archive member targets}{121} -\entry {archive symbol directory updating}{123} -\entry {archive, and \code {-j}}{123} -\entry {archive, and parallel execution}{123} -\entry {archive, suffix rule for}{124} -\entry {Arg list too long}{51} -\entry {arguments of functions}{77} -\entry {\code {as}}{104, 107} -\entry {assembly, rule to compile}{104} -\entry {automatic generation of dependencies}{15, 37} -\entry {automatic variables}{112} -\initial {B} -\entry {backquotes}{87} -\entry {backslash (\code {{\tt\indexbackslash }}), for continuation lines}{7} -\entry {backslash (\code {{\tt\indexbackslash }}), in commands}{42} -\entry {backslash (\code {{\tt\indexbackslash }}), to quote \code {%}}{25, 35, 78} -\entry {basename}{82} -\entry {broken pipe}{43} -\entry {bugs, reporting}{2} -\entry {built-in special targets}{31} -\initial {C} -\entry {C, rule to compile}{103} -\entry {C{\tt\char43}{\tt\char43}, rule to compile}{103} -\entry {\code {cc}}{103, 107} -\entry {\code {cd} (shell command)}{42, 47} -\entry {chains of rules}{108} -\entry {\code {check} \r {(standard target)}}{91} -\entry {\code {clean} \r {(standard target)}}{91} -\entry {\code {clean} target}{8, 12} -\entry {cleaning up}{12} -\entry {\code {clobber} \r {(standard target)}}{91} -\entry {\code {co}}{105, 107} -\entry {combining rules by dependency}{11} -\entry {command line variable definitions, and recursion}{50} -\entry {command line variables}{94} -\entry {commands}{19} -\entry {commands, backslash (\code {{\tt\indexbackslash }}) in}{42} -\entry {commands, comments in}{41} -\entry {commands, echoing}{41} -\entry {commands, empty}{54} -\entry {commands, errors in}{44} -\entry {commands, execution}{42} -\entry {commands, execution in parallel}{42} -\entry {commands, expansion}{87} -\entry {commands, how to write}{41} -\entry {commands, instead of executing}{91} -\entry {commands, introduction to}{5} -\entry {commands, quoting newlines in}{42} -\entry {commands, sequences of}{52} -\entry {comments, in commands}{41} -\entry {comments, in makefile}{13} -\entry {compatibility}{125} -\entry {compatibility in exporting}{49} -\entry {compilation, testing}{95} -\entry {computed variable name}{60} -\entry {conditionals}{71} -\entry {continuation lines}{7} -\entry {conventions for makefiles}{131} -\entry {\code {ctangle}}{105, 107} -\entry {\code {cweave}}{105, 107} -\initial {D} -\entry {deducing commands (implicit rules)}{10} -\entry {default goal}{8, 19} -\entry {default makefile name}{14} -\entry {default rules, last-resort}{116} -\entry {defining variables verbatim}{67} -\entry {deletion of target files}{45} -\entry {dependencies}{20} -\entry {dependencies, automatic generation}{15, 37} -\entry {dependencies, introduction to}{5} -\entry {dependencies, list of all}{112} -\entry {dependencies, list of changed}{112} -\entry {dependencies, varying (static pattern)}{34} -\entry {dependency}{19} -\entry {dependency pattern, implicit}{110} -\entry {dependency pattern, static (not implicit)}{35} -\entry {directive}{13} -\entry {directories, printing them}{52} -\entry {directories, updating archive symbol}{123} -\entry {directory part}{81} -\entry {directory search (\code {VPATH})}{23} -\entry {directory search (\code {VPATH}), and implicit rules}{27} -\entry {directory search (\code {VPATH}), and link libraries}{27} -\entry {directory search (\code {VPATH}), and shell commands}{26} -\entry {\code {dist} \r {(standard target)}}{91} -\entry {\code {distclean} \r {(standard target)}}{91} -\entry {dollar sign (\code {$}), in function call}{77} -\entry {dollar sign (\code {$}), in rules}{20} -\entry {dollar sign (\code {$}), in variable name}{60} -\entry {dollar sign (\code {$}), in variable reference}{55} -\entry {double-colon rules}{37} -\entry {duplicate words, removing}{80} -\initial {E} -\entry {E2BIG}{51} -\entry {echoing of commands}{41} -\entry {editor}{5} -\entry {Emacs (\code {M-x compile})}{45} -\entry {empty commands}{54} -\entry {empty targets}{30} -\entry {environment}{68} -\entry {environment, and recursion}{47} -\entry {environment, \code {SHELL} in}{42} -\entry {errors (in commands)}{44} -\entry {errors with wildcards}{22} -\entry {execution, in parallel}{42} -\entry {execution, instead of}{91} -\entry {execution, of commands}{42} -\entry {exit status (errors)}{44} -\entry {explicit rule, definition of}{13} -\entry {exporting variables}{47} -\initial {F} -\entry {\code {f77}}{103, 107} -\entry {features of GNU \code {make}}{125} -\entry {features, missing}{129} -\entry {file name functions}{81} -\entry {file name of makefile}{14} -\entry {file name of makefile, how to specify}{14} -\entry {file name prefix, adding}{82} -\entry {file name suffix}{82} -\entry {file name suffix, adding}{82} -\entry {file name with wildcards}{20} -\entry {file name, basename of}{82} -\entry {file name, directory part}{81} -\entry {file name, nondirectory part}{81} -\entry {files, assuming new}{92} -\entry {files, assuming old}{93} -\entry {files, avoiding recompilation of}{93} -\entry {files, intermediate}{108} -\entry {filtering out words}{80} -\entry {filtering words}{80} -\entry {finding strings}{79} -\entry {flags}{95} -\entry {flags for compilers}{106} -\entry {flavors of variables}{56} -\entry {\code {FORCE}}{30} -\entry {force targets}{30} -\entry {Fortran, rule to compile}{103} -\entry {functions}{77} -\entry {functions, for file names}{81} -\entry {functions, for text}{78} -\entry {functions, syntax of}{77} -\initial {G} -\entry {\code {g{\tt\char43}{\tt\char43}}}{103, 107} -\entry {\code {gcc}}{103} -\entry {generating dependencies automatically}{15, 37} -\entry {\code {get}}{105, 107} -\entry {globbing (wildcards)}{20} -\entry {goal}{8} -\entry {goal, default}{8, 19} -\entry {goal, how to specify}{90} -\initial {H} -\entry {home directory}{20} -\initial {I} -\entry {IEEE Standard 1003.2}{1} -\entry {implicit rule}{101} -\entry {implicit rule, and directory search}{27} -\entry {implicit rule, and \code {VPATH}}{27} -\entry {implicit rule, definition of}{13} -\entry {implicit rule, how to use}{101} -\entry {implicit rule, introduction to}{10} -\entry {implicit rule, predefined}{103} -\entry {implicit rule, search algorithm}{119} -\entry {including (\code {MAKEFILES} variable)}{16} -\entry {including other makefiles}{14} -\entry {incompatibilities}{129} -\entry {Info, rule to format}{105} -\entry {\code {install} \r {(standard target)}}{91} -\entry {intermediate files}{108} -\entry {intermediate files, preserving}{109} -\entry {interrupt}{45} -\initial {J} -\entry {job slots}{42} -\entry {job slots, and recursion}{50} -\entry {jobs, limiting based on load}{43} -\entry {joining lists of words}{82} -\initial {K} -\entry {killing (interruption)}{45} -\initial {L} -\entry {last-resort default rules}{116} -\entry {\code {ld}}{104} -\entry {\code {lex}}{105, 107} -\entry {Lex, rule to run}{105} -\entry {libraries for linking, directory search}{27} -\entry {library archive, suffix rule for}{124} -\entry {limiting jobs based on load}{43} -\entry {link libraries, and directory search}{27} -\entry {linking, predefined rule for}{104} -\entry {\code {lint}}{105} -\entry {\code {lint}, rule to run}{105} -\entry {list of all dependencies}{112} -\entry {list of changed dependencies}{112} -\entry {load average}{43} -\entry {loops in variable expansion}{57} -\entry {\code {lpr} (shell command)}{21, 30} -\initial {M} -\entry {\code {m2c}}{104} -\entry {macro}{55} -\entry {\code {make depend}}{38} -\entry {makefile}{5} -\entry {makefile name}{14} -\entry {makefile name, how to specify}{14} -\entry {makefile rule parts}{5} -\entry {makefile, and \code {MAKEFILES} variable}{16} -\entry {makefile, conventions for}{131} -\entry {makefile, how \code {make} processes}{8} -\entry {makefile, how to write}{13} -\entry {makefile, including}{14} -\entry {makefile, overriding}{18} -\entry {makefile, remaking of}{16} -\entry {makefile, simple}{6} -\entry {\code {makeinfo}}{105, 107} -\entry {match-anything rule}{115} -\entry {match-anything rule, used to override}{18} -\entry {missing features}{129} -\entry {mistakes with wildcards}{22} -\entry {modified variable reference}{59} -\entry {Modula-2, rule to compile}{104} -\entry {\code {mostlyclean} \r {(standard target)}}{91} -\entry {multiple rules for one target}{33} -\entry {multiple rules for one target (\code {::})}{37} -\entry {multiple targets}{32} -\entry {multiple targets, in pattern rule}{110} -\initial {N} -\entry {name of makefile}{14} -\entry {name of makefile, how to specify}{14} -\entry {nested variable reference}{60} -\entry {newline, quoting, in commands}{42} -\entry {newline, quoting, in makefile}{7} -\entry {nondirectory part}{81} -\initial {O} -\entry {\code {obj}}{9} -\entry {\code {OBJ}}{9} -\entry {\code {objects}}{9} -\entry {\code {OBJECTS}}{9} -\entry {\code {objs}}{9} -\entry {\code {OBJS}}{9} -\entry {old-fashioned suffix rules}{117} -\entry {options}{95} -\entry {options, and recursion}{50} -\entry {options, setting from environment}{51} -\entry {options, setting in makefiles}{51} -\entry {order of pattern rules}{111} -\entry {origin of variable}{85} -\entry {overriding makefiles}{18} -\entry {overriding variables with arguments}{94} -\entry {overriding with \code {override}}{66} -\initial {P} -\entry {parallel execution}{42} -\entry {parallel execution, and archive update}{123} -\entry {parts of makefile rule}{5} -\entry {Pascal, rule to compile}{103} -\entry {pattern rule}{110} -\entry {pattern rules, order of}{111} -\entry {pattern rules, static (not implicit)}{34} -\entry {pattern rules, static, syntax of}{34} -\entry {\code {pc}}{103, 107} -\entry {phony targets}{28} -\entry {pitfalls of wildcards}{22} -\entry {portability}{125} -\entry {POSIX}{1} -\entry {POSIX.2}{51} -\entry {precious targets}{31} -\entry {prefix, adding}{82} -\entry {preserving intermediate files}{109} -\entry {preserving with \code {.PRECIOUS}}{31, 109} -\entry {\code {print} \r {(standard target)}}{91} -\entry {\code {print} target}{21, 30} -\entry {printing directories}{52} -\entry {printing of commands}{41} -\entry {problems and bugs, reporting}{2} -\entry {problems with wildcards}{22} -\entry {processing a makefile}{8} -\initial {Q} -\entry {question mode}{92} -\entry {quoting \code {%}, in \code {patsubst}}{78} -\entry {quoting \code {%}, in static pattern}{35} -\entry {quoting \code {%}, in \code {vpath}}{25} -\entry {quoting newline, in commands}{42} -\entry {quoting newline, in makefile}{7} -\initial {R} -\entry {Ratfor, rule to compile}{103} -\entry {RCS, rule to extract from}{105} -\entry {\code {README}}{14} -\entry {\code {realclean} \r {(standard target)}}{91} -\entry {recompilation}{5} -\entry {recompilation, avoiding}{93} -\entry {recording events with empty targets}{30} -\entry {recursion}{46} -\entry {recursion, and \code {-C}}{50} -\entry {recursion, and \code {-f}}{50} -\entry {recursion, and \code {-j}}{50} -\entry {recursion, and \code {-o}}{50} -\entry {recursion, and \code {-t}}{47} -\entry {recursion, and \code {-w}}{52} -\entry {recursion, and \code {-W}}{50} -\entry {recursion, and command line variable definitions}{50} -\entry {recursion, and environment}{47} -\entry {recursion, and \code {MAKE} variable}{46} -\entry {recursion, and \code {MAKEFILES} variable}{16} -\entry {recursion, and options}{50} -\entry {recursion, and printing directories}{52} -\entry {recursion, and variables}{47} -\entry {recursion, level of}{49} -\entry {recursive variable expansion}{55, 56} -\entry {recursively expanded variables}{56} -\entry {reference to variables}{55, 59} -\entry {relinking}{9} -\entry {remaking makefiles}{16} -\entry {removal of target files}{45} -\entry {removing duplicate words}{80} -\entry {removing, to clean up}{12} -\entry {reporting bugs}{2} -\entry {\code {rm}}{107} -\entry {\code {rm} (shell command)}{8, 21, 28, 44} -\entry {rule commands}{41} -\entry {rule dependencies}{20} -\entry {rule syntax}{19} -\entry {rule targets}{19} -\entry {rule, and \code {$}}{20} -\entry {rule, double-colon (\code {::})}{37} -\entry {rule, explicit, definition of}{13} -\entry {rule, how to write}{19} -\entry {rule, implicit}{101} -\entry {rule, implicit, and directory search}{27} -\entry {rule, implicit, and \code {VPATH}}{27} -\entry {rule, implicit, chains of}{108} -\entry {rule, implicit, definition of}{13} -\entry {rule, implicit, how to use}{101} -\entry {rule, implicit, introduction to}{10} -\entry {rule, implicit, predefined}{103} -\entry {rule, introduction to}{5} -\entry {rule, multiple for one target}{33} -\entry {rule, no commands or dependencies}{30} -\entry {rule, pattern}{110} -\entry {rule, static pattern}{34} -\entry {rule, static pattern versus implicit}{36} -\entry {rule, with multiple targets}{32} -\initial {S} -\entry {\code {s. \r {(SCCS file prefix)}}}{105} -\entry {SCCS, rule to extract from}{105} -\entry {search algorithm, implicit rule}{119} -\entry {search path for dependencies (\code {VPATH})}{23} -\entry {search path for dependencies (\code {VPATH}), and implicit rules}{27} -\entry {search path for dependencies (\code {VPATH}), and link libraries}{27} -\entry {searching for strings}{79} -\entry {\code {sed} (shell command)}{39} -\entry {selecting words}{83} -\entry {sequences of commands}{52} -\entry {setting options from environment}{51} -\entry {setting options in makefiles}{51} -\entry {setting variables}{63} -\entry {several rules for one target}{33} -\entry {several targets in a rule}{32} -\entry {\code {shar} \r {(standard target)}}{91} -\entry {shell command}{8} -\entry {shell command, and directory search}{26} -\entry {shell command, execution}{42} -\entry {shell command, function for}{87} -\entry {shell file name pattern (in \code {include})}{14} -\entry {shell wildcards (in \code {include})}{14} -\entry {signal}{45} -\entry {silent operation}{41} -\entry {simple makefile}{6} -\entry {simple variable expansion}{55} -\entry {simplifying with variables}{9} -\entry {simply expanded variables}{57} -\entry {sorting words}{80} -\entry {spaces, in variable values}{58} -\entry {spaces, stripping}{79} -\entry {special targets}{31} -\entry {specifying makefile name}{14} -\entry {standard input}{43} -\entry {standards conformance}{1} -\entry {standards for makefiles}{131} -\entry {static pattern rule}{34} -\entry {static pattern rule, syntax of}{34} -\entry {static pattern rule, versus implicit}{36} -\entry {stem}{35, 114} -\entry {stem, variable for}{113} -\entry {strings, searching for}{79} -\entry {stripping whitespace}{79} -\entry {sub-\code {make}}{47} -\entry {subdirectories, recursion for}{46} -\entry {substitution variable reference}{59} -\entry {suffix rule}{117} -\entry {suffix rule, for archive}{124} -\entry {suffix, adding}{82} -\entry {suffix, function to find}{82} -\entry {suffix, substituting in variables}{59} -\entry {switches}{95} -\entry {symbol directories, updating archive}{123} -\entry {syntax of rules}{19} -\initial {T} -\entry {tab character (in commands)}{19} -\entry {tabs in rules}{5} -\entry {\code {TAGS} \r {(standard target)}}{91} -\entry {\code {tangle}}{105, 107} -\entry {\code {tar} \r {(standard target)}}{91} -\entry {target}{19} -\entry {target pattern, implicit}{110} -\entry {target pattern, static (not implicit)}{35} -\entry {target, deleting on error}{45} -\entry {target, deleting on interrupt}{45} -\entry {target, multiple in pattern rule}{110} -\entry {target, multiple rules for one}{33} -\entry {target, touching}{92} -\entry {targets}{19} -\entry {targets without a file}{28} -\entry {targets, built-in special}{31} -\entry {targets, empty}{30} -\entry {targets, force}{30} -\entry {targets, introduction to}{5} -\entry {targets, multiple}{32} -\entry {targets, phony}{28} -\entry {terminal rule}{115} -\entry {\code {test} \r {(standard target)}}{91} -\entry {testing compilation}{95} -\entry {\code {tex}}{105, 107} -\entry {\TeX{}, rule to run}{105} -\entry {\code {texi2dvi}}{105, 107} -\entry {Texinfo, rule to format}{105} -\entry {tilde (\code {{\tt\char'176}})}{20} -\entry {\code {touch} (shell command)}{21, 30} -\entry {touching files}{92} -\initial {U} -\entry {undefined variables, warning message}{99} -\entry {updating archive symbol directories}{123} -\entry {updating makefiles}{16} -\initial {V} -\entry {value}{55} -\entry {value, how a variable gets it}{63} -\entry {variable}{55} -\entry {variable definition}{13} -\entry {variables}{9} -\entry {variables, \samp {$} in name}{60} -\entry {variables, and implicit rule}{112} -\entry {variables, appending to}{64} -\entry {variables, automatic}{112} -\entry {variables, command line}{94} -\entry {variables, command line, and recursion}{50} -\entry {variables, computed names}{60} -\entry {variables, defining verbatim}{67} -\entry {variables, environment}{47, 68} -\entry {variables, exporting}{47} -\entry {variables, flavors}{56} -\entry {variables, how they get their values}{63} -\entry {variables, how to reference}{55} -\entry {variables, loops in expansion}{57} -\entry {variables, modified reference}{59} -\entry {variables, nested references}{60} -\entry {variables, origin of}{85} -\entry {variables, overriding}{66} -\entry {variables, overriding with arguments}{94} -\entry {variables, recursively expanded}{56} -\entry {variables, setting}{63} -\entry {variables, simply expanded}{57} -\entry {variables, spaces in values}{58} -\entry {variables, substituting suffix in}{59} -\entry {variables, substitution reference}{59} -\entry {variables, warning for undefined}{99} -\entry {varying dependencies}{34} -\entry {verbatim variable definition}{67} -\entry {vpath}{23} -\entry {\code {VPATH}, and implicit rules}{27} -\entry {\code {VPATH}, and link libraries}{27} -\initial {W} -\entry {\code {weave}}{105, 107} -\entry {Web, rule to run}{105} -\entry {what if}{92} -\entry {whitespace, in variable values}{58} -\entry {whitespace, stripping}{79} -\entry {wildcard}{20} -\entry {wildcard pitfalls}{22} -\entry {wildcard, function}{83} -\entry {wildcard, in archive member}{121} -\entry {wildcard, in \code {include}}{14} -\entry {words, extracting first}{83} -\entry {words, filtering}{80} -\entry {words, filtering out}{80} -\entry {words, finding number}{83} -\entry {words, iterating over}{83} -\entry {words, joining lists}{82} -\entry {words, removing duplicates}{80} -\entry {words, selecting}{83} -\entry {writing rule commands}{41} -\entry {writing rules}{19} -\initial {Y} -\entry {\code {yacc}}{53, 105, 107} -\entry {Yacc, rule to run}{105} diff --git a/buildtools/windows/source/make/make.fn b/buildtools/windows/source/make/make.fn deleted file mode 100644 index 6000f78fd6b..00000000000 --- a/buildtools/windows/source/make/make.fn +++ /dev/null @@ -1,149 +0,0 @@ -\entry {Makefile}{14}{\code {Makefile}} -\entry {GNUmakefile}{14}{\code {GNUmakefile}} -\entry {makefile}{14}{\code {makefile}} -\entry {include}{14}{\code {include}} -\entry {/usr/gnu/include}{15}{\code {/usr/gnu/include}} -\entry {/usr/local/include}{15}{\code {/usr/local/include}} -\entry {/usr/include}{15}{\code {/usr/include}} -\entry {MAKEFILES}{16}{\code {MAKEFILES}} -\entry {wildcard}{22}{\code {wildcard}} -\entry {VPATH}{23}{\code {VPATH}} -\entry {vpath}{23}{\code {vpath}} -\entry {VPATH}{23}{\code {VPATH}} -\entry {vpath}{24}{\code {vpath}} -\entry {.PHONY}{28}{\code {.PHONY}} -\entry {.PHONY}{31}{\code {.PHONY}} -\entry {.SUFFIXES}{31}{\code {.SUFFIXES}} -\entry {.DEFAULT}{31}{\code {.DEFAULT}} -\entry {.PRECIOUS}{31}{\code {.PRECIOUS}} -\entry {.IGNORE}{31}{\code {.IGNORE}} -\entry {.SILENT}{32}{\code {.SILENT}} -\entry {.EXPORT{\_}ALL{\_}VARIABLES}{32}{\code {.EXPORT{\_}ALL{\_}VARIABLES}} -\entry {subst}{33}{\code {subst}} -\entry {$*, and static pattern}{36}{\code {$*\r {, and static pattern}}} -\entry {.SILENT}{41}{\code {.SILENT}} -\entry {SHELL (command execution)}{42}{\code {SHELL \r {(command execution)}}} -\entry {SHELL}{42}{\code {SHELL}} -\entry {.IGNORE}{44}{\code {.IGNORE}} -\entry {.DELETE{\_}ON{\_}ERROR}{45}{\code {.DELETE{\_}ON{\_}ERROR}} -\entry {.PRECIOUS}{46}{\code {.PRECIOUS}} -\entry {MAKE}{46}{\code {MAKE}} -\entry {export}{48}{\code {export}} -\entry {unexport}{48}{\code {unexport}} -\entry {.EXPORT{\_}ALL{\_}VARIABLES}{49}{\code {.EXPORT{\_}ALL{\_}VARIABLES}} -\entry {MAKELEVEL}{49}{\code {MAKELEVEL}} -\entry {MAKEFILES}{50}{\code {MAKEFILES}} -\entry {MAKEFLAGS}{50}{\code {MAKEFLAGS}} -\entry {MAKEOVERRIDES}{51}{\code {MAKEOVERRIDES}} -\entry {.POSIX}{51}{\code {.POSIX}} -\entry {MFLAGS}{51}{\code {MFLAGS}} -\entry {.DEFAULT, and empty commands}{54}{\code {.DEFAULT\r {, and empty commands}}} -\entry {MAKELEVEL}{58}{\code {MAKELEVEL}} -\entry {MAKE}{58}{\code {MAKE}} -\entry {patsubst}{59}{\code {patsubst}} -\entry {override}{66}{\code {override}} -\entry {define}{67}{\code {define}} -\entry {endef}{67}{\code {endef}} -\entry {ifdef}{72}{\code {ifdef}} -\entry {ifeq}{72}{\code {ifeq}} -\entry {ifndef}{72}{\code {ifndef}} -\entry {ifneq}{72}{\code {ifneq}} -\entry {else}{72}{\code {else}} -\entry {endif}{72}{\code {endif}} -\entry {subst}{78}{\code {subst}} -\entry {patsubst}{78}{\code {patsubst}} -\entry {strip}{79}{\code {strip}} -\entry {findstring}{79}{\code {findstring}} -\entry {filter}{80}{\code {filter}} -\entry {filter-out}{80}{\code {filter-out}} -\entry {sort}{80}{\code {sort}} -\entry {dir}{81}{\code {dir}} -\entry {notdir}{81}{\code {notdir}} -\entry {suffix}{82}{\code {suffix}} -\entry {basename}{82}{\code {basename}} -\entry {addsuffix}{82}{\code {addsuffix}} -\entry {addprefix}{82}{\code {addprefix}} -\entry {join}{82}{\code {join}} -\entry {word}{83}{\code {word}} -\entry {words}{83}{\code {words}} -\entry {firstword}{83}{\code {firstword}} -\entry {wildcard}{83}{\code {wildcard}} -\entry {foreach}{83}{\code {foreach}} -\entry {origin}{85}{\code {origin}} -\entry {shell}{87}{\code {shell}} -\entry {OUTPUT{\_}OPTION}{106}{\code {OUTPUT{\_}OPTION}} -\entry {AR}{107}{\code {AR}} -\entry {AS}{107}{\code {AS}} -\entry {CC}{107}{\code {CC}} -\entry {CXX}{107}{\code {CXX}} -\entry {CO}{107}{\code {CO}} -\entry {CPP}{107}{\code {CPP}} -\entry {FC}{107}{\code {FC}} -\entry {GET}{107}{\code {GET}} -\entry {LEX}{107}{\code {LEX}} -\entry {PC}{107}{\code {PC}} -\entry {YACC}{107}{\code {YACC}} -\entry {YACCR}{107}{\code {YACCR}} -\entry {MAKEINFO}{107}{\code {MAKEINFO}} -\entry {TEX}{107}{\code {TEX}} -\entry {TEXI2DVI}{107}{\code {TEXI2DVI}} -\entry {WEAVE}{107}{\code {WEAVE}} -\entry {CWEAVE}{107}{\code {CWEAVE}} -\entry {TANGLE}{107}{\code {TANGLE}} -\entry {CTANGLE}{107}{\code {CTANGLE}} -\entry {RM}{107}{\code {RM}} -\entry {ARFLAGS}{108}{\code {ARFLAGS}} -\entry {ASFLAGS}{108}{\code {ASFLAGS}} -\entry {CFLAGS}{108}{\code {CFLAGS}} -\entry {CXXFLAGS}{108}{\code {CXXFLAGS}} -\entry {COFLAGS}{108}{\code {COFLAGS}} -\entry {CPPFLAGS}{108}{\code {CPPFLAGS}} -\entry {FFLAGS}{108}{\code {FFLAGS}} -\entry {GFLAGS}{108}{\code {GFLAGS}} -\entry {LDFLAGS}{108}{\code {LDFLAGS}} -\entry {LFLAGS}{108}{\code {LFLAGS}} -\entry {PFLAGS}{108}{\code {PFLAGS}} -\entry {RFLAGS}{108}{\code {RFLAGS}} -\entry {YFLAGS}{108}{\code {YFLAGS}} -\entry {${\tt\char'100}}{112}{\code {${\tt\char'100}}} -\entry {{\tt\char'100} (automatic variable)}{112}{\code {{\tt\char'100} \r {(automatic variable)}}} -\entry {$%}{112}{\code {$%}} -\entry {% (automatic variable)}{112}{\code {% \r {(automatic variable)}}} -\entry {${\tt\less}}{112}{\code {${\tt\less}}} -\entry {{\tt\less} (automatic variable)}{112}{\code {{\tt\less} \r {(automatic variable)}}} -\entry {$?}{112}{\code {$?}} -\entry {? (automatic variable)}{112}{\code {? \r {(automatic variable)}}} -\entry {${\tt\hat}}{112}{\code {${\tt\hat}}} -\entry {{\tt\hat} (automatic variable)}{112}{\code {{\tt\hat} \r {(automatic variable)}}} -\entry {${\tt\char43}}{112}{\code {${\tt\char43}}} -\entry {{\tt\char43} (automatic variable)}{112}{\code {{\tt\char43} \r {(automatic variable)}}} -\entry {$*}{112}{\code {$*}} -\entry {* (automatic variable)}{112}{\code {* \r {(automatic variable)}}} -\entry {$({\tt\char'100}D)}{113}{\code {$({\tt\char'100}D)}} -\entry {{\tt\char'100}D (automatic variable)}{113}{\code {{\tt\char'100}D \r {(automatic variable)}}} -\entry {$({\tt\char'100}F)}{113}{\code {$({\tt\char'100}F)}} -\entry {{\tt\char'100}F (automatic variable)}{113}{\code {{\tt\char'100}F \r {(automatic variable)}}} -\entry {$(*D)}{113}{\code {$(*D)}} -\entry {*D (automatic variable)}{113}{\code {*D \r {(automatic variable)}}} -\entry {$(*F)}{113}{\code {$(*F)}} -\entry {*F (automatic variable)}{113}{\code {*F \r {(automatic variable)}}} -\entry {$(%D)}{113}{\code {$(%D)}} -\entry {%D (automatic variable)}{113}{\code {%D \r {(automatic variable)}}} -\entry {$(%F)}{113}{\code {$(%F)}} -\entry {%F (automatic variable)}{113}{\code {%F \r {(automatic variable)}}} -\entry {$({\tt\less}D)}{114}{\code {$({\tt\less}D)}} -\entry {{\tt\less}D (automatic variable)}{114}{\code {{\tt\less}D \r {(automatic variable)}}} -\entry {$({\tt\less}F)}{114}{\code {$({\tt\less}F)}} -\entry {{\tt\less}F (automatic variable)}{114}{\code {{\tt\less}F \r {(automatic variable)}}} -\entry {$({\tt\hat}D)}{114}{\code {$({\tt\hat}D)}} -\entry {{\tt\hat}D (automatic variable)}{114}{\code {{\tt\hat}D \r {(automatic variable)}}} -\entry {$({\tt\hat}F)}{114}{\code {$({\tt\hat}F)}} -\entry {{\tt\hat}F (automatic variable)}{114}{\code {{\tt\hat}F \r {(automatic variable)}}} -\entry {$(?D)}{114}{\code {$(?D)}} -\entry {?D (automatic variable)}{114}{\code {?D \r {(automatic variable)}}} -\entry {$(?F)}{114}{\code {$(?F)}} -\entry {?F (automatic variable)}{114}{\code {?F \r {(automatic variable)}}} -\entry {.DEFAULT}{117}{\code {.DEFAULT}} -\entry {.SUFFIXES}{118}{\code {.SUFFIXES}} -\entry {SUFFIXES}{119}{\code {SUFFIXES}} -\entry {* (automatic variable), unsupported bizarre usage}{129}{\code {* \r {(automatic variable), unsupported bizarre usage}}} diff --git a/buildtools/windows/source/make/make.fns b/buildtools/windows/source/make/make.fns deleted file mode 100644 index e9fe5cd76de..00000000000 --- a/buildtools/windows/source/make/make.fns +++ /dev/null @@ -1,165 +0,0 @@ -\initial {$} -\entry {\code {$%}}{112} -\entry {\code {$(%D)}}{113} -\entry {\code {$(%F)}}{113} -\entry {\code {$(*D)}}{113} -\entry {\code {$(*F)}}{113} -\entry {\code {$(?D)}}{114} -\entry {\code {$(?F)}}{114} -\entry {\code {$({\tt\char'100}D)}}{113} -\entry {\code {$({\tt\char'100}F)}}{113} -\entry {\code {$({\tt\hat}D)}}{114} -\entry {\code {$({\tt\hat}F)}}{114} -\entry {\code {$({\tt\less}D)}}{114} -\entry {\code {$({\tt\less}F)}}{114} -\entry {\code {$*}}{112} -\entry {\code {$*\r {, and static pattern}}}{36} -\entry {\code {$?}}{112} -\entry {\code {${\tt\char'100}}}{112} -\entry {\code {${\tt\char43}}}{112} -\entry {\code {${\tt\hat}}}{112} -\entry {\code {${\tt\less}}}{112} -\initial {%} -\entry {\code {% \r {(automatic variable)}}}{112} -\entry {\code {%D \r {(automatic variable)}}}{113} -\entry {\code {%F \r {(automatic variable)}}}{113} -\initial {*} -\entry {\code {* \r {(automatic variable)}}}{112} -\entry {\code {* \r {(automatic variable), unsupported bizarre usage}}}{129} -\entry {\code {*D \r {(automatic variable)}}}{113} -\entry {\code {*F \r {(automatic variable)}}}{113} -\initial {.} -\entry {\code {.DEFAULT}}{31, 117} -\entry {\code {.DEFAULT\r {, and empty commands}}}{54} -\entry {\code {.DELETE{\_}ON{\_}ERROR}}{45} -\entry {\code {.EXPORT{\_}ALL{\_}VARIABLES}}{32, 49} -\entry {\code {.IGNORE}}{31, 44} -\entry {\code {.PHONY}}{28, 31} -\entry {\code {.POSIX}}{51} -\entry {\code {.PRECIOUS}}{31, 46} -\entry {\code {.SILENT}}{32, 41} -\entry {\code {.SUFFIXES}}{31, 118} -\initial {/} -\entry {\code {/usr/gnu/include}}{15} -\entry {\code {/usr/include}}{15} -\entry {\code {/usr/local/include}}{15} -\initial {?} -\entry {\code {? \r {(automatic variable)}}}{112} -\entry {\code {?D \r {(automatic variable)}}}{114} -\entry {\code {?F \r {(automatic variable)}}}{114} -\initial {{\tt\char'100}} -\entry {\code {{\tt\char'100} \r {(automatic variable)}}}{112} -\entry {\code {{\tt\char'100}D \r {(automatic variable)}}}{113} -\entry {\code {{\tt\char'100}F \r {(automatic variable)}}}{113} -\initial {{\tt\char43}} -\entry {\code {{\tt\char43} \r {(automatic variable)}}}{112} -\initial {{\tt\hat}} -\entry {\code {{\tt\hat} \r {(automatic variable)}}}{112} -\entry {\code {{\tt\hat}D \r {(automatic variable)}}}{114} -\entry {\code {{\tt\hat}F \r {(automatic variable)}}}{114} -\initial {{\tt\less}} -\entry {\code {{\tt\less} \r {(automatic variable)}}}{112} -\entry {\code {{\tt\less}D \r {(automatic variable)}}}{114} -\entry {\code {{\tt\less}F \r {(automatic variable)}}}{114} -\initial {A} -\entry {\code {addprefix}}{82} -\entry {\code {addsuffix}}{82} -\entry {\code {AR}}{107} -\entry {\code {ARFLAGS}}{108} -\entry {\code {AS}}{107} -\entry {\code {ASFLAGS}}{108} -\initial {B} -\entry {\code {basename}}{82} -\initial {C} -\entry {\code {CC}}{107} -\entry {\code {CFLAGS}}{108} -\entry {\code {CO}}{107} -\entry {\code {COFLAGS}}{108} -\entry {\code {CPP}}{107} -\entry {\code {CPPFLAGS}}{108} -\entry {\code {CTANGLE}}{107} -\entry {\code {CWEAVE}}{107} -\entry {\code {CXX}}{107} -\entry {\code {CXXFLAGS}}{108} -\initial {D} -\entry {\code {define}}{67} -\entry {\code {dir}}{81} -\initial {E} -\entry {\code {else}}{72} -\entry {\code {endef}}{67} -\entry {\code {endif}}{72} -\entry {\code {export}}{48} -\initial {F} -\entry {\code {FC}}{107} -\entry {\code {FFLAGS}}{108} -\entry {\code {filter}}{80} -\entry {\code {filter-out}}{80} -\entry {\code {findstring}}{79} -\entry {\code {firstword}}{83} -\entry {\code {foreach}}{83} -\initial {G} -\entry {\code {GET}}{107} -\entry {\code {GFLAGS}}{108} -\entry {\code {GNUmakefile}}{14} -\initial {I} -\entry {\code {ifdef}}{72} -\entry {\code {ifeq}}{72} -\entry {\code {ifndef}}{72} -\entry {\code {ifneq}}{72} -\entry {\code {include}}{14} -\initial {J} -\entry {\code {join}}{82} -\initial {L} -\entry {\code {LDFLAGS}}{108} -\entry {\code {LEX}}{107} -\entry {\code {LFLAGS}}{108} -\initial {M} -\entry {\code {MAKE}}{46, 58} -\entry {\code {makefile}}{14} -\entry {\code {Makefile}}{14} -\entry {\code {MAKEFILES}}{16, 50} -\entry {\code {MAKEFLAGS}}{50} -\entry {\code {MAKEINFO}}{107} -\entry {\code {MAKELEVEL}}{49, 58} -\entry {\code {MAKEOVERRIDES}}{51} -\entry {\code {MFLAGS}}{51} -\initial {N} -\entry {\code {notdir}}{81} -\initial {O} -\entry {\code {origin}}{85} -\entry {\code {OUTPUT{\_}OPTION}}{106} -\entry {\code {override}}{66} -\initial {P} -\entry {\code {patsubst}}{59, 78} -\entry {\code {PC}}{107} -\entry {\code {PFLAGS}}{108} -\initial {R} -\entry {\code {RFLAGS}}{108} -\entry {\code {RM}}{107} -\initial {S} -\entry {\code {shell}}{87} -\entry {\code {SHELL}}{42} -\entry {\code {SHELL \r {(command execution)}}}{42} -\entry {\code {sort}}{80} -\entry {\code {strip}}{79} -\entry {\code {subst}}{33, 78} -\entry {\code {suffix}}{82} -\entry {\code {SUFFIXES}}{119} -\initial {T} -\entry {\code {TANGLE}}{107} -\entry {\code {TEX}}{107} -\entry {\code {TEXI2DVI}}{107} -\initial {U} -\entry {\code {unexport}}{48} -\initial {V} -\entry {\code {vpath}}{23, 24} -\entry {\code {VPATH}}{23} -\initial {W} -\entry {\code {WEAVE}}{107} -\entry {\code {wildcard}}{22, 83} -\entry {\code {word}}{83} -\entry {\code {words}}{83} -\initial {Y} -\entry {\code {YACC}}{107} -\entry {\code {YACCR}}{107} -\entry {\code {YFLAGS}}{108} diff --git a/buildtools/windows/source/make/make.h b/buildtools/windows/source/make/make.h deleted file mode 100644 index 62ff2d89167..00000000000 --- a/buildtools/windows/source/make/make.h +++ /dev/null @@ -1,355 +0,0 @@ -/* Miscellaneous global declarations and portability cruft for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* AIX requires this to be the first thing in the file. */ -#if defined (_AIX) && !defined (__GNUC__) - #pragma alloca -#endif - -/* We use instead of "config.h" so that a compilation - using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h - (which it would do because make.h was found in $srcdir). */ -#include -#undef HAVE_CONFIG_H -#define HAVE_CONFIG_H - -#ifdef CRAY -/* This must happen before #include so - that the declaration therein is changed. */ -#define signal bsdsignal -#endif - -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_TIMEB_H -/* SCO 3.2 "devsys 4.2" has a prototype for `ftime' in that bombs - unless has been included first. Does every system have a - ? If any does not, configure should check for it. */ -#include -#endif -#include -#include - -#ifndef errno -extern int errno; -#endif - -#ifndef isblank -#define isblank(c) ((c) == ' ' || (c) == '\t') -#endif - -#ifdef HAVE_UNISTD_H -#include -/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get - POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */ -#if defined (_POSIX_VERSION) && !defined (ultrix) -#define POSIX -#endif -#endif - -/* Some systems define _POSIX_VERSION but are not really POSIX.1. */ -#if (defined (butterfly) || defined (__arm) || \ - (defined (__mips) && defined (_SYSTYPE_SVR3)) || \ - (defined (sequent) && defined (i386))) -#undef POSIX -#endif - -#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE) -#define POSIX -#endif - -#if !defined (HAVE_SYS_SIGLIST) && defined (HAVE__SYS_SIGLIST) -#define sys_siglist _sys_siglist -#define HAVE_SYS_SIGLIST /* Now we have it. */ - -/* It was declared in , with who knows what type. - Don't declare it again and risk conflicting. */ -#define SYS_SIGLIST_DECLARED -#endif - -#ifdef HAVE_SYS_SIGLIST -#ifndef SYS_SIGLIST_DECLARED -extern char *sys_siglist[]; -#endif -#else -#include "signame.h" -#endif - -/* Some systems do not define NSIG in . */ -#ifndef NSIG -#ifdef _NSIG -#define NSIG _NSIG -#else -#define NSIG 32 -#endif -#endif - -#ifndef RETSIGTYPE -#define RETSIGTYPE void -#endif - -#ifndef sigmask -#define sigmask(sig) (1 << ((sig) - 1)) -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifndef PATH_MAX -#ifndef POSIX -#define PATH_MAX MAXPATHLEN -#endif /* Not POSIX. */ -#endif /* No PATH_MAX. */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 -#endif /* No MAXPATHLEN. */ - -#ifdef PATH_MAX -#define GET_PATH_MAX PATH_MAX -#define PATH_VAR(var) char var[PATH_MAX] -#else -#define NEED_GET_PATH_MAX -extern unsigned int get_path_max (); -#define GET_PATH_MAX (get_path_max ()) -#define PATH_VAR(var) char *var = (char *) alloca (GET_PATH_MAX) -#endif - -#ifdef STAT_MACROS_BROKEN -#ifdef S_ISREG -#undef S_ISREG -#endif -#ifdef S_ISDIR -#undef S_ISDIR -#endif -#endif /* STAT_MACROS_BROKEN. */ - -#ifndef S_ISREG -#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) -#endif -#ifndef S_ISDIR -#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) -#endif - - -#if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)) -#include -#include -#define ANSI_STRING -#else /* No standard headers. */ - -#ifdef HAVE_STRING_H -#include -#define ANSI_STRING -#else -#include -#endif -#ifdef HAVE_MEMORY_H -#include -#endif - -extern char *malloc (), *realloc (); -extern void free (); - -extern void abort (), exit (); - -#endif /* Standard headers. */ - -#ifdef ANSI_STRING - -#ifndef index -#define index(s, c) strchr((s), (c)) -#endif -#ifndef rindex -#define rindex(s, c) strrchr((s), (c)) -#endif - -#ifndef bcmp -#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) -#endif -#ifndef bzero -#define bzero(s, n) memset ((s), 0, (n)) -#endif -#ifndef bcopy -#define bcopy(s, d, n) memcpy ((d), (s), (n)) -#endif - -#else /* Not ANSI_STRING. */ - -#ifndef bcmp -extern int bcmp (); -#endif -#ifndef bzero -extern void bzero (); -#endif -#ifndef bcopy -extern void bcopy (); -#endif - -#endif /* ANSI_STRING. */ -#undef ANSI_STRING - -/* SCO Xenix has a buggy macro definition in . */ -#undef strerror - -#ifndef ANSI_STRING -extern char *strerror (); -#endif - - -#ifdef __GNUC__ -#undef alloca -#define alloca(n) __builtin_alloca (n) -#else /* Not GCC. */ -#ifdef HAVE_ALLOCA_H -#include -#elif defined(NETSCAPE) -#include -#else /* Not HAVE_ALLOCA_H. */ -#ifndef _AIX -extern char *alloca (); -#endif /* Not AIX. */ -#endif /* HAVE_ALLOCA_H. */ -#endif /* GCC. */ - -#ifndef iAPX286 -#define streq(a, b) \ - ((a) == (b) || \ - (*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1)))) -#else -/* Buggy compiler can't handle this. */ -#define streq(a, b) (strcmp ((a), (b)) == 0) -#endif - -/* Add to VAR the hashing value of C, one character in a name. */ -#define HASH(var, c) \ - ((var += (c)), (var = ((var) << 7) + ((var) >> 20))) - -#if defined(__GNUC__) || defined(ENUM_BITFIELDS) -#define ENUM_BITFIELD(bits) :bits -#else -#define ENUM_BITFIELD(bits) -#endif - -#if defined(__MSDOS__) || defined(NETSCAPE) -#define PATH_SEPARATOR_CHAR ';' -#else -#define PATH_SEPARATOR_CHAR ':' -#endif - -extern void die (); -extern void message (), fatal (), error (); -extern void makefile_error (), makefile_fatal (); -extern void pfatal_with_name (), perror_with_name (); -extern char *savestring (), *concat (); -extern char *xmalloc (), *xrealloc (); -extern char *find_next_token (), *next_token (), *end_of_token (); -extern void collapse_continuations (), remove_comments (); -extern char *sindex (), *lindex (); -extern int alpha_compare (const void *elem1, const void *elem2); -extern void print_spaces (); -extern struct dep *copy_dep_chain (); -extern char *find_char_unquote (), *find_percent (); - -extern int safe_stat (char * name, struct stat * buf); - - -#ifndef NO_ARCHIVES -extern int ar_name (); -extern void ar_parse_name (); -extern int ar_touch (); -extern time_t ar_member_date (); -#endif - -extern void dir_load (); -extern int dir_file_exists_p (), file_exists_p (), file_impossible_p (); -extern void file_impossible (); -extern char *dir_name (); - -extern void define_default_variables (); -extern void set_default_suffixes (), install_default_suffix_rules (); -extern void install_default_implicit_rules (), count_implicit_rule_limits (); -extern void convert_to_pattern (), create_pattern_rule (); - -extern void build_vpath_lists (), construct_vpath_list (); -extern int vpath_search (); - -extern void construct_include_path (); -extern void uniquize_deps (); - -extern int update_goal_chain (); -extern void notice_finished_file (); - -extern void user_access (), make_access (), child_access (); - - -#ifdef HAVE_VFORK_H -#include -#endif - -/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION, - because such systems often declare the in header files anyway. */ - -#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) - -extern long int atol (); -extern long int lseek (); - -#endif /* Not GNU C library or POSIX. */ - -#ifdef HAVE_GETCWD -extern char *getcwd (); -#else -extern char *getwd (); -#define getcwd(buf, len) getwd (buf) -#endif - -extern char **environ; - -extern char *reading_filename; -extern unsigned int *reading_lineno_ptr; - -extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag; -extern int debug_flag, print_data_base_flag, question_flag, touch_flag; -extern int env_overrides, no_builtin_rules_flag, print_version_flag; -extern int print_directory_flag, warn_undefined_variables_flag; -extern int posix_pedantic; - -extern unsigned int job_slots; -extern double max_load_average; - -extern char *program; -extern char *starting_directory; -extern unsigned int makelevel; -extern char *version_string, *remote_description; - -extern unsigned int commands_started; - -extern int handling_fatal_signal; - - -#define DEBUGPR(msg) \ - do if (debug_flag) { print_spaces (depth); printf (msg, file->name); \ - fflush (stdout); } while (0) diff --git a/buildtools/windows/source/make/make.info b/buildtools/windows/source/make/make.info deleted file mode 100644 index be5446863a9..00000000000 --- a/buildtools/windows/source/make/make.info +++ /dev/null @@ -1,163 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -Indirect: -make.info-1: 1141 -make.info-2: 50405 -make.info-3: 97832 -make.info-4: 147393 -make.info-5: 196701 -make.info-6: 243137 -make.info-7: 292772 -make.info-8: 318335 - -Tag Table: -(Indirect) -Node: Top1141 -Node: Overview12012 -Node: Preparing12949 -Node: Reading13904 -Node: Bugs14826 -Node: Introduction16694 -Node: Rule Introduction18281 -Node: Simple Makefile19990 -Node: How Make Works23603 -Node: Variables Simplify26101 -Node: make Deduces28307 -Node: Combine By Dependency30054 -Node: Cleanup31082 -Node: Makefiles32492 -Node: Makefile Contents33189 -Node: Makefile Names35449 -Node: Include37051 -Node: MAKEFILES Variable40462 -Node: Remaking Makefiles41964 -Node: Overriding Makefiles45782 -Node: Rules47805 -Node: Rule Example50405 -Node: Rule Syntax51240 -Node: Wildcards53449 -Node: Wildcard Examples54959 -Node: Wildcard Pitfall56194 -Node: Wildcard Function57444 -Node: Directory Search59225 -Node: General Search60285 -Node: Selective Search61803 -Node: Commands/Search64723 -Node: Implicit/Search66063 -Node: Libraries/Search66998 -Node: Phony Targets68067 -Node: Force Targets71412 -Node: Empty Targets72449 -Node: Special Targets73709 -Node: Multiple Targets77631 -Node: Multiple Rules79498 -Node: Static Pattern81581 -Node: Static Usage82221 -Node: Static versus Implicit85875 -Node: Double-Colon87606 -Node: Automatic Dependencies89136 -Node: Commands93214 -Node: Echoing94906 -Node: Execution96164 -Node: Parallel97832 -Node: Errors101147 -Node: Interrupts104783 -Node: Recursion106364 -Node: MAKE Variable107650 -Node: Variables/Recursion109608 -Node: Options/Recursion114571 -Node: -w Option119257 -Node: Sequences120243 -Node: Empty Commands123238 -Node: Using Variables124406 -Node: Reference127390 -Node: Flavors128935 -Node: Advanced134252 -Node: Substitution Refs134752 -Node: Computed Names136279 -Node: Values140849 -Node: Setting141766 -Node: Appending143475 -Node: Override Directive147393 -Node: Defining148772 -Node: Environment150770 -Node: Conditionals152898 -Node: Conditional Example153607 -Node: Conditional Syntax156173 -Node: Testing Flags160919 -Node: Functions162016 -Node: Syntax of Functions163014 -Node: Text Functions165151 -Node: Filename Functions171905 -Node: Foreach Function177026 -Node: Origin Function180232 -Node: Shell Function183457 -Node: Running184834 -Node: Makefile Arguments186822 -Node: Goals187517 -Node: Instead of Execution191519 -Node: Avoiding Compilation194800 -Node: Overriding196701 -Node: Testing198989 -Node: Options Summary200866 -Node: Implicit Rules207676 -Node: Using Implicit209822 -Node: Catalogue of Rules213309 -Node: Implicit Variables222290 -Node: Chained Rules226416 -Node: Pattern Rules229114 -Node: Pattern Intro230642 -Node: Pattern Examples233453 -Node: Automatic235246 -Node: Pattern Match241533 -Node: Match-Anything Rules243137 -Node: Canceling Rules246996 -Node: Last Resort247699 -Node: Suffix Rules249536 -Node: Search Algorithm253243 -Node: Archives256739 -Node: Archive Members257434 -Node: Archive Update259013 -Node: Archive Symbols260929 -Node: Archive Pitfalls262128 -Node: Archive Suffix Rules262844 -Node: Features264384 -Node: Missing272736 -Node: Makefile Conventions277065 -Node: Makefile Basics277413 -Node: Utilities in Makefiles279752 -Node: Standard Targets281444 -Node: Command Variables289947 -Node: Directory Variables292772 -Node: Quick Reference302070 -Node: Complex Makefile309668 -Node: Concept Index318335 -Node: Name Index357722 - -End Tag Table diff --git a/buildtools/windows/source/make/make.info-1 b/buildtools/windows/source/make/make.info-1 deleted file mode 100644 index 84630943d3f..00000000000 --- a/buildtools/windows/source/make/make.info-1 +++ /dev/null @@ -1,1122 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: make.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) - -Make -**** - - The GNU `make' utility automatically determines which pieces of a -large program need to be recompiled, and issues the commands to -recompile them. - - This is Edition 0.48 of the `GNU Make Manual', last updated 4 April -1995 for `make' Version 3.73 Beta. - - This manual describes `make' and contains the following chapters: - -* Menu: - -* Overview:: Overview of `make'. -* Introduction:: An introduction to `make'. -* Makefiles:: Makefiles tell `make' what to do. -* Rules:: Rules describe when a file must be remade. -* Commands:: Commands say how to remake a file. -* Using Variables:: You can use variables to avoid repetition. -* Conditionals:: Use or ignore parts of the makefile based - on the values of variables. -* Functions:: Many powerful ways to manipulate text. -* make Invocation: Running. How to invoke `make' on the command line. -* Implicit Rules:: Use implicit rules to treat many files alike, - based on their file names. -* Archives:: How `make' can update library archives. -* Features:: Features GNU `make' has over other `make's. -* Missing:: What GNU `make' lacks from other `make's. -* Makefile Conventions:: Conventions for makefiles in GNU programs. -* Quick Reference:: A quick reference for experienced users. -* Complex Makefile:: A real example of a straightforward, - but nontrivial, makefile. -* Concept Index:: Index of Concepts -* Name Index:: Index of Functions, Variables, & Directives - - -- The Detailed Node Listing -- - -Overview of `make' - -* Preparing:: Preparing and Running Make -* Reading:: On Reading this Text -* Bugs:: Problems and Bugs - -An Introduction to Makefiles - -* Rule Introduction:: What a rule looks like. -* Simple Makefile:: A Simple Makefile -* How Make Works:: How `make' Processes This Makefile -* Variables Simplify:: Variables Make Makefiles Simpler -* make Deduces:: Letting `make' Deduce the Commands -* Combine By Dependency:: Another Style of Makefile -* Cleanup:: Rules for Cleaning the Directory - -Writing Makefiles - -* Makefile Contents:: What makefiles contain. -* Makefile Names:: How to name your makefile. -* Include:: How one makefile can use another makefile. -* MAKEFILES Variable:: The environment can specify extra makefiles. -* Remaking Makefiles:: How makefiles get remade. -* Overriding Makefiles:: How to override part of one makefile - with another makefile. - -Writing Rules - -* Rule Example:: An example explained. -* Rule Syntax:: General syntax explained. -* Wildcards:: Using wildcard characters such as `*'. -* Directory Search:: Searching other directories for source files. -* Phony Targets:: Using a target that is not a real file's name. -* Force Targets:: You can use a target without commands - or dependencies to mark other - targets as phony. -* Empty Targets:: When only the date matters and the - files are empty. -* Special Targets:: Targets with special built-in meanings. -* Multiple Targets:: When to make use of several targets in a rule. -* Multiple Rules:: How to use several rules with the same target. -* Static Pattern:: Static pattern rules apply to multiple targets - and can vary the dependencies according to - the target name. -* Double-Colon:: How to use a special kind of rule to allow - several independent rules for one target. -* Automatic Dependencies:: How to automatically generate rules giving - dependencies from the source files themselves. - -Using Wildcard Characters in File Names - -* Wildcard Examples:: Several examples -* Wildcard Pitfall:: Problems to avoid. -* Wildcard Function:: How to cause wildcard expansion where - it does not normally take place. - -Searching Directories for Dependencies - -* General Search:: Specifying a search path that applies - to every dependency. -* Selective Search:: Specifying a search path - for a specified class of names. -* Commands/Search:: How to write shell commands that work together - with search paths. -* Implicit/Search:: How search paths affect implicit rules. -* Libraries/Search:: Directory search for link libraries. - -Static Pattern Rules - -* Static Usage:: The syntax of static pattern rules. -* Static versus Implicit:: When are they better than implicit rules? - -Writing the Commands in Rules - -* Echoing:: How to control when commands are echoed. -* Execution:: How commands are executed. -* Parallel:: How commands can be executed in parallel. -* Errors:: What happens after a command execution error. -* Interrupts:: What happens when a command is interrupted. -* Recursion:: Invoking `make' from makefiles. -* Sequences:: Defining canned sequences of commands. -* Empty Commands:: Defining useful, do-nothing commands. - -Recursive Use of `make' - -* MAKE Variable:: The special effects of using `$(MAKE)'. -* Variables/Recursion:: How to communicate variables to a sub-`make'. -* Options/Recursion:: How to communicate options to a sub-`make'. -* -w Option:: How the `-w' or `--print-directory' option - helps debug use of recursive `make' commands. - -How to Use Variables - -* Reference:: How to use the value of a variable. -* Flavors:: Variables come in two flavors. -* Advanced:: Advanced features for referencing a variable. -* Values:: All the ways variables get their values. -* Setting:: How to set a variable in the makefile. -* Appending:: How to append more text to the old value - of a variable. -* Override Directive:: How to set a variable in the makefile even if - the user has set it with a command argument. -* Defining:: An alternate way to set a variable - to a verbatim string. -* Environment:: Variable values can come from the environment. - -Advanced Features for Reference to Variables - -* Substitution Refs:: Referencing a variable with - substitutions on the value. -* Computed Names:: Computing the name of the variable to refer to. - -Conditional Parts of Makefiles - -* Conditional Example:: Example of a conditional -* Conditional Syntax:: The syntax of conditionals. -* Testing Flags:: Conditionals that test flags. - -Functions for Transforming Text - -* Syntax of Functions:: How to write a function call. -* Text Functions:: General-purpose text manipulation functions. -* Filename Functions:: Functions for manipulating file names. -* Foreach Function:: Repeat some text with controlled variation. -* Origin Function:: Find where a variable got its value. -* Shell Function:: Substitute the output of a shell command. - -How to Run `make' - -* Makefile Arguments:: How to specify which makefile to use. -* Goals:: How to use goal arguments to specify which - parts of the makefile to use. -* Instead of Execution:: How to use mode flags to specify what - kind of thing to do with the commands - in the makefile other than simply - execute them. -* Avoiding Compilation:: How to avoid recompiling certain files. -* Overriding:: How to override a variable to specify - an alternate compiler and other things. -* Testing:: How to proceed past some errors, to - test compilation. -* Options Summary:: Summary of Options - -Using Implicit Rules - -* Using Implicit:: How to use an existing implicit rule - to get the commands for updating a file. -* Catalogue of Rules:: A list of built-in implicit rules. -* Implicit Variables:: How to change what predefined rules do. -* Chained Rules:: How to use a chain of implicit rules. -* Pattern Rules:: How to define new implicit rules. -* Last Resort:: How to defining commands for rules - which cannot find any. -* Suffix Rules:: The old-fashioned style of implicit rule. -* Search Algorithm:: The precise algorithm for applying - implicit rules. - -Defining and Redefining Pattern Rules - -* Pattern Intro:: An introduction to pattern rules. -* Pattern Examples:: Examples of pattern rules. -* Automatic:: How to use automatic variables in the - commands of implicit rules. -* Pattern Match:: How patterns match. -* Match-Anything Rules:: Precautions you should take prior to - defining rules that can match any - target file whatever. -* Canceling Rules:: How to override or cancel built-in rules. - -Using `make' to Update Archive Files - -* Archive Members:: Archive members as targets. -* Archive Update:: The implicit rule for archive member targets. -* Archive Suffix Rules:: You can write a special kind of suffix rule - for updating archives. - -Implicit Rule for Archive Member Targets - -* Archive Symbols:: How to update archive symbol directories. - - -File: make.info, Node: Overview, Next: Introduction, Prev: Top, Up: Top - -Overview of `make' -****************** - - The `make' utility automatically determines which pieces of a large -program need to be recompiled, and issues commands to recompile them. -This manual describes GNU `make', which was implemented by Richard -Stallman and Roland McGrath. GNU `make' conforms to section 6.2 of -`IEEE Standard 1003.2-1992' (POSIX.2). - - Our examples show C programs, since they are most common, but you -can use `make' with any programming language whose compiler can be run -with a shell command. Indeed, `make' is not limited to programs. You -can use it to describe any task where some files must be updated -automatically from others whenever the others change. - -* Menu: - -* Preparing:: Preparing and Running Make -* Reading:: On Reading this Text -* Bugs:: Problems and Bugs - - -File: make.info, Node: Preparing, Next: Reading, Up: Overview - -Preparing and Running Make -========================== - - To prepare to use `make', you must write a file called the -"makefile" that describes the relationships among files in your program -and provides commands for updating each file. In a program, typically, -the executable file is updated from object files, which are in turn -made by compiling source files. - - Once a suitable makefile exists, each time you change some source -files, this simple shell command: - - make - -suffices to perform all necessary recompilations. The `make' program -uses the makefile data base and the last-modification times of the -files to decide which of the files need to be updated. For each of -those files, it issues the commands recorded in the data base. - - You can provide command line arguments to `make' to control which -files should be recompiled, or how. *Note How to Run `make': Running. - - -File: make.info, Node: Reading, Next: Bugs, Prev: Preparing, Up: Overview - -How to Read This Manual -======================= - - If you are new to `make', or are looking for a general introduction, -read the first few sections of each chapter, skipping the later -sections. In each chapter, the first few sections contain introductory -or general information and the later sections contain specialized or -technical information. The exception is the second chapter, *Note An -Introduction to Makefiles: Introduction, all of which is introductory. - - If you are familiar with other `make' programs, see *Note Features -of GNU `make': Features, which lists the enhancements GNU `make' has, -and *Note Incompatibilities and Missing Features: Missing, which -explains the few things GNU `make' lacks that others have. - - For a quick summary, see *Note Options Summary::, *Note Quick -Reference::, and *Note Special Targets::. - - -File: make.info, Node: Bugs, Prev: Reading, Up: Overview - -Problems and Bugs -================= - - If you have problems with GNU `make' or think you've found a bug, -please report it to the developers; we cannot promise to do anything but -we might well want to fix it. - - Before reporting a bug, make sure you've actually found a real bug. -Carefully reread the documentation and see if it really says you can do -what you're trying to do. If it's not clear whether you should be able -to do something or not, report that too; it's a bug in the -documentation! - - Before reporting a bug or trying to fix it yourself, try to isolate -it to the smallest possible makefile that reproduces the problem. Then -send us the makefile and the exact results `make' gave you. Also say -what you expected to occur; this will help us decide whether the -problem was really in the documentation. - - Once you've got a precise problem, please send electronic mail either -through the Internet or via UUCP: - - Internet address: - bug-gnu-utils@prep.ai.mit.edu - - UUCP path: - mit-eddie!prep.ai.mit.edu!bug-gnu-utils - -Please include the version number of `make' you are using. You can get -this information with the command `make --version'. Be sure also to -include the type of machine and operating system you are using. If -possible, include the contents of the file `config.h' that is generated -by the configuration process. - - Non-bug suggestions are always welcome as well. If you have -questions about things that are unclear in the documentation or are -just obscure features, send a message to the bug reporting address. We -cannot guarantee you'll get help with your problem, but many seasoned -`make' users read the mailing list and they will probably try to help -you out. The maintainers sometimes answer such questions as well, when -time permits. - - -File: make.info, Node: Introduction, Next: Makefiles, Prev: Overview, Up: Top - -An Introduction to Makefiles -**************************** - - You need a file called a "makefile" to tell `make' what to do. Most -often, the makefile tells `make' how to compile and link a program. - - In this chapter, we will discuss a simple makefile that describes -how to compile and link a text editor which consists of eight C source -files and three header files. The makefile can also tell `make' how to -run miscellaneous commands when explicitly asked (for example, to remove -certain files as a clean-up operation). To see a more complex example -of a makefile, see *Note Complex Makefile::. - - When `make' recompiles the editor, each changed C source file must -be recompiled. If a header file has changed, each C source file that -includes the header file must be recompiled to be safe. Each -compilation produces an object file corresponding to the source file. -Finally, if any source file has been recompiled, all the object files, -whether newly made or saved from previous compilations, must be linked -together to produce the new executable editor. - -* Menu: - -* Rule Introduction:: What a rule looks like. -* Simple Makefile:: A Simple Makefile -* How Make Works:: How `make' Processes This Makefile -* Variables Simplify:: Variables Make Makefiles Simpler -* make Deduces:: Letting `make' Deduce the Commands -* Combine By Dependency:: Another Style of Makefile -* Cleanup:: Rules for Cleaning the Directory - - -File: make.info, Node: Rule Introduction, Next: Simple Makefile, Up: Introduction - -What a Rule Looks Like -====================== - - A simple makefile consists of "rules" with the following shape: - - TARGET ... : DEPENDENCIES ... - COMMAND - ... - ... - - A "target" is usually the name of a file that is generated by a -program; examples of targets are executable or object files. A target -can also be the name of an action to carry out, such as `clean' (*note -Phony Targets::.). - - A "dependency" is a file that is used as input to create the target. -A target often depends on several files. - - A "command" is an action that `make' carries out. A rule may have -more than one command, each on its own line. *Please note:* you need -to put a tab character at the beginning of every command line! This is -an obscurity that catches the unwary. - - Usually a command is in a rule with dependencies and serves to -create a target file if any of the dependencies change. However, the -rule that specifies commands for the target need not have dependencies. -For example, the rule containing the delete command associated with the -target `clean' does not have dependencies. - - A "rule", then, explains how and when to remake certain files which -are the targets of the particular rule. `make' carries out the -commands on the dependencies to create or update the target. A rule -can also explain how and when to carry out an action. *Note Writing -Rules: Rules. - - A makefile may contain other text besides rules, but a simple -makefile need only contain rules. Rules may look somewhat more -complicated than shown in this template, but all fit the pattern more -or less. - - -File: make.info, Node: Simple Makefile, Next: How Make Works, Prev: Rule Introduction, Up: Introduction - -A Simple Makefile -================= - - Here is a straightforward makefile that describes the way an -executable file called `edit' depends on eight object files which, in -turn, depend on eight C source and three header files. - - In this example, all the C files include `defs.h', but only those -defining editing commands include `command.h', and only low level files -that change the editor buffer include `buffer.h'. - - edit : main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - cc -o edit main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - - main.o : main.c defs.h - cc -c main.c - kbd.o : kbd.c defs.h command.h - cc -c kbd.c - command.o : command.c defs.h command.h - cc -c command.c - display.o : display.c defs.h buffer.h - cc -c display.c - insert.o : insert.c defs.h buffer.h - cc -c insert.c - search.o : search.c defs.h buffer.h - cc -c search.c - files.o : files.c defs.h buffer.h command.h - cc -c files.c - utils.o : utils.c defs.h - cc -c utils.c - clean : - rm edit main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - -We split each long line into two lines using backslash-newline; this is -like using one long line, but is easier to read. - - To use this makefile to create the executable file called `edit', -type: - - make - - To use this makefile to delete the executable file and all the object -files from the directory, type: - - make clean - - In the example makefile, the targets include the executable file -`edit', and the object files `main.o' and `kbd.o'. The dependencies -are files such as `main.c' and `defs.h'. In fact, each `.o' file is -both a target and a dependency. Commands include `cc -c main.c' and -`cc -c kbd.c'. - - When a target is a file, it needs to be recompiled or relinked if any -of its dependencies change. In addition, any dependencies that are -themselves automatically generated should be updated first. In this -example, `edit' depends on each of the eight object files; the object -file `main.o' depends on the source file `main.c' and on the header -file `defs.h'. - - A shell command follows each line that contains a target and -dependencies. These shell commands say how to update the target file. -A tab character must come at the beginning of every command line to -distinguish commands lines from other lines in the makefile. (Bear in -mind that `make' does not know anything about how the commands work. -It is up to you to supply commands that will update the target file -properly. All `make' does is execute the commands in the rule you have -specified when the target file needs to be updated.) - - The target `clean' is not a file, but merely the name of an action. -Since you normally do not want to carry out the actions in this rule, -`clean' is not a dependency of any other rule. Consequently, `make' -never does anything with it unless you tell it specifically. Note that -this rule not only is not a dependency, it also does not have any -dependencies, so the only purpose of the rule is to run the specified -commands. Targets that do not refer to files but are just actions are -called "phony targets". *Note Phony Targets::, for information about -this kind of target. *Note Errors in Commands: Errors, to see how to -cause `make' to ignore errors from `rm' or any other command. - - -File: make.info, Node: How Make Works, Next: Variables Simplify, Prev: Simple Makefile, Up: Introduction - -How `make' Processes a Makefile -=============================== - - By default, `make' starts with the first rule (not counting rules -whose target names start with `.'). This is called the "default goal". -("Goals" are the targets that `make' strives ultimately to update. -*Note Arguments to Specify the Goals: Goals.) - - In the simple example of the previous section, the default goal is to -update the executable program `edit'; therefore, we put that rule first. - - Thus, when you give the command: - - make - -`make' reads the makefile in the current directory and begins by -processing the first rule. In the example, this rule is for relinking -`edit'; but before `make' can fully process this rule, it must process -the rules for the files that `edit' depends on, which in this case are -the object files. Each of these files is processed according to its -own rule. These rules say to update each `.o' file by compiling its -source file. The recompilation must be done if the source file, or any -of the header files named as dependencies, is more recent than the -object file, or if the object file does not exist. - - The other rules are processed because their targets appear as -dependencies of the goal. If some other rule is not depended on by the -goal (or anything it depends on, etc.), that rule is not processed, -unless you tell `make' to do so (with a command such as `make clean'). - - Before recompiling an object file, `make' considers updating its -dependencies, the source file and header files. This makefile does not -specify anything to be done for them--the `.c' and `.h' files are not -the targets of any rules--so `make' does nothing for these files. But -`make' would update automatically generated C programs, such as those -made by Bison or Yacc, by their own rules at this time. - - After recompiling whichever object files need it, `make' decides -whether to relink `edit'. This must be done if the file `edit' does -not exist, or if any of the object files are newer than it. If an -object file was just recompiled, it is now newer than `edit', so `edit' -is relinked. - - Thus, if we change the file `insert.c' and run `make', `make' will -compile that file to update `insert.o', and then link `edit'. If we -change the file `command.h' and run `make', `make' will recompile the -object files `kbd.o', `command.o' and `files.o' and then link the file -`edit'. - - -File: make.info, Node: Variables Simplify, Next: make Deduces, Prev: How Make Works, Up: Introduction - -Variables Make Makefiles Simpler -================================ - - In our example, we had to list all the object files twice in the -rule for `edit' (repeated here): - - edit : main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - cc -o edit main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - - Such duplication is error-prone; if a new object file is added to the -system, we might add it to one list and forget the other. We can -eliminate the risk and simplify the makefile by using a variable. -"Variables" allow a text string to be defined once and substituted in -multiple places later (*note How to Use Variables: Using Variables.). - - It is standard practice for every makefile to have a variable named -`objects', `OBJECTS', `objs', `OBJS', `obj', or `OBJ' which is a list -of all object file names. We would define such a variable `objects' -with a line like this in the makefile: - - objects = main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - -Then, each place we want to put a list of the object file names, we can -substitute the variable's value by writing `$(objects)' (*note How to -Use Variables: Using Variables.). - - Here is how the complete simple makefile looks when you use a -variable for the object files: - - objects = main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - - edit : $(objects) - cc -o edit $(objects) - main.o : main.c defs.h - cc -c main.c - kbd.o : kbd.c defs.h command.h - cc -c kbd.c - command.o : command.c defs.h command.h - cc -c command.c - display.o : display.c defs.h buffer.h - cc -c display.c - insert.o : insert.c defs.h buffer.h - cc -c insert.c - search.o : search.c defs.h buffer.h - cc -c search.c - files.o : files.c defs.h buffer.h command.h - cc -c files.c - utils.o : utils.c defs.h - cc -c utils.c - clean : - rm edit $(objects) - - -File: make.info, Node: make Deduces, Next: Combine By Dependency, Prev: Variables Simplify, Up: Introduction - -Letting `make' Deduce the Commands -================================== - - It is not necessary to spell out the commands for compiling the -individual C source files, because `make' can figure them out: it has an -"implicit rule" for updating a `.o' file from a correspondingly named -`.c' file using a `cc -c' command. For example, it will use the -command `cc -c main.c -o main.o' to compile `main.c' into `main.o'. We -can therefore omit the commands from the rules for the object files. -*Note Using Implicit Rules: Implicit Rules. - - When a `.c' file is used automatically in this way, it is also -automatically added to the list of dependencies. We can therefore omit -the `.c' files from the dependencies, provided we omit the commands. - - Here is the entire example, with both of these changes, and a -variable `objects' as suggested above: - - objects = main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - - edit : $(objects) - cc -o edit $(objects) - - main.o : defs.h - kbd.o : defs.h command.h - command.o : defs.h command.h - display.o : defs.h buffer.h - insert.o : defs.h buffer.h - search.o : defs.h buffer.h - files.o : defs.h buffer.h command.h - utils.o : defs.h - - .PHONY : clean - clean : - -rm edit $(objects) - -This is how we would write the makefile in actual practice. (The -complications associated with `clean' are described elsewhere. See -*Note Phony Targets::, and *Note Errors in Commands: Errors.) - - Because implicit rules are so convenient, they are important. You -will see them used frequently. - - -File: make.info, Node: Combine By Dependency, Next: Cleanup, Prev: make Deduces, Up: Introduction - -Another Style of Makefile -========================= - - When the objects of a makefile are created only by implicit rules, an -alternative style of makefile is possible. In this style of makefile, -you group entries by their dependencies instead of by their targets. -Here is what one looks like: - - objects = main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - - edit : $(objects) - cc -o edit $(objects) - - $(objects) : defs.h - kbd.o command.o files.o : command.h - display.o insert.o search.o files.o : buffer.h - -Here `defs.h' is given as a dependency of all the object files; -`command.h' and `buffer.h' are dependencies of the specific object -files listed for them. - - Whether this is better is a matter of taste: it is more compact, but -some people dislike it because they find it clearer to put all the -information about each target in one place. - - -File: make.info, Node: Cleanup, Prev: Combine By Dependency, Up: Introduction - -Rules for Cleaning the Directory -================================ - - Compiling a program is not the only thing you might want to write -rules for. Makefiles commonly tell how to do a few other things besides -compiling a program: for example, how to delete all the object files -and executables so that the directory is `clean'. - - Here is how we could write a `make' rule for cleaning our example -editor: - - clean: - rm edit $(objects) - - In practice, we might want to write the rule in a somewhat more -complicated manner to handle unanticipated situations. We would do -this: - - .PHONY : clean - clean : - -rm edit $(objects) - -This prevents `make' from getting confused by an actual file called -`clean' and causes it to continue in spite of errors from `rm'. (See -*Note Phony Targets::, and *Note Errors in Commands: Errors.) - -A rule such as this should not be placed at the beginning of the -makefile, because we do not want it to run by default! Thus, in the -example makefile, we want the rule for `edit', which recompiles the -editor, to remain the default goal. - - Since `clean' is not a dependency of `edit', this rule will not run -at all if we give the command `make' with no arguments. In order to -make the rule run, we have to type `make clean'. *Note How to Run -`make': Running. - - -File: make.info, Node: Makefiles, Next: Rules, Prev: Introduction, Up: Top - -Writing Makefiles -***************** - - The information that tells `make' how to recompile a system comes -from reading a data base called the "makefile". - -* Menu: - -* Makefile Contents:: What makefiles contain. -* Makefile Names:: How to name your makefile. -* Include:: How one makefile can use another makefile. -* MAKEFILES Variable:: The environment can specify extra makefiles. -* Remaking Makefiles:: How makefiles get remade. -* Overriding Makefiles:: How to override part of one makefile - with another makefile. - - -File: make.info, Node: Makefile Contents, Next: Makefile Names, Up: Makefiles - -What Makefiles Contain -====================== - - Makefiles contain five kinds of things: "explicit rules", "implicit -rules", "variable definitions", "directives", and "comments". Rules, -variables, and directives are described at length in later chapters. - - * An "explicit rule" says when and how to remake one or more files, - called the rule's targets. It lists the other files that the - targets "depend on", and may also give commands to use to create - or update the targets. *Note Writing Rules: Rules. - - * An "implicit rule" says when and how to remake a class of files - based on their names. It describes how a target may depend on a - file with a name similar to the target and gives commands to - create or update such a target. *Note Using Implicit Rules: - Implicit Rules. - - * A "variable definition" is a line that specifies a text string - value for a variable that can be substituted into the text later. - The simple makefile example shows a variable definition for - `objects' as a list of all object files (*note Variables Make - Makefiles Simpler: Variables Simplify.). - - * A "directive" is a command for `make' to do something special while - reading the makefile. These include: - - * Reading another makefile (*note Including Other Makefiles: - Include.). - - * Deciding (based on the values of variables) whether to use or - ignore a part of the makefile (*note Conditional Parts of - Makefiles: Conditionals.). - - * Defining a variable from a verbatim string containing - multiple lines (*note Defining Variables Verbatim: Defining.). - - * `#' in a line of a makefile starts a "comment". It and the rest of - the line are ignored, except that a trailing backslash not escaped - by another backslash will continue the comment across multiple - lines. Comments may appear on any of the lines in the makefile, - except within a `define' directive, and perhaps within commands - (where the shell decides what is a comment). A line containing - just a comment (with perhaps spaces before it) is effectively - blank, and is ignored. - - -File: make.info, Node: Makefile Names, Next: Include, Prev: Makefile Contents, Up: Makefiles - -What Name to Give Your Makefile -=============================== - - By default, when `make' looks for the makefile, it tries the -following names, in order: `GNUmakefile', `makefile' and `Makefile'. - - Normally you should call your makefile either `makefile' or -`Makefile'. (We recommend `Makefile' because it appears prominently -near the beginning of a directory listing, right near other important -files such as `README'.) The first name checked, `GNUmakefile', is not -recommended for most makefiles. You should use this name if you have a -makefile that is specific to GNU `make', and will not be understood by -other versions of `make'. Other `make' programs look for `makefile' and -`Makefile', but not `GNUmakefile'. - - If `make' finds none of these names, it does not use any makefile. -Then you must specify a goal with a command argument, and `make' will -attempt to figure out how to remake it using only its built-in implicit -rules. *Note Using Implicit Rules: Implicit Rules. - - If you want to use a nonstandard name for your makefile, you can -specify the makefile name with the `-f' or `--file' option. The -arguments `-f NAME' or `--file=NAME' tell `make' to read the file NAME -as the makefile. If you use more than one `-f' or `--file' option, you -can specify several makefiles. All the makefiles are effectively -concatenated in the order specified. The default makefile names -`GNUmakefile', `makefile' and `Makefile' are not checked automatically -if you specify `-f' or `--file'. - - -File: make.info, Node: Include, Next: MAKEFILES Variable, Prev: Makefile Names, Up: Makefiles - -Including Other Makefiles -========================= - - The `include' directive tells `make' to suspend reading the current -makefile and read one or more other makefiles before continuing. The -directive is a line in the makefile that looks like this: - - include FILENAMES... - -FILENAMES can contain shell file name patterns. - - Extra spaces are allowed and ignored at the beginning of the line, -but a tab is not allowed. (If the line begins with a tab, it will be -considered a command line.) Whitespace is required between `include' -and the file names, and between file names; extra whitespace is ignored -there and at the end of the directive. A comment starting with `#' is -allowed at the end of the line. If the file names contain any variable -or function references, they are expanded. *Note How to Use Variables: -Using Variables. - - For example, if you have three `.mk' files, `a.mk', `b.mk', and -`c.mk', and `$(bar)' expands to `bish bash', then the following -expression - - include foo *.mk $(bar) - - is equivalent to - - include foo a.mk b.mk c.mk bish bash - - When `make' processes an `include' directive, it suspends reading of -the containing makefile and reads from each listed file in turn. When -that is finished, `make' resumes reading the makefile in which the -directive appears. - - One occasion for using `include' directives is when several programs, -handled by individual makefiles in various directories, need to use a -common set of variable definitions (*note Setting Variables: Setting.) -or pattern rules (*note Defining and Redefining Pattern Rules: Pattern -Rules.). - - Another such occasion is when you want to generate dependencies from -source files automatically; the dependencies can be put in a file that -is included by the main makefile. This practice is generally cleaner -than that of somehow appending the dependencies to the end of the main -makefile as has been traditionally done with other versions of `make'. -*Note Automatic Dependencies::. - - If the specified name does not start with a slash, and the file is -not found in the current directory, several other directories are -searched. First, any directories you have specified with the `-I' or -`--include-dir' option are searched (*note Summary of Options: Options -Summary.). Then the following directories (if they exist) are -searched, in this order: `PREFIX/include' (normally -`/usr/local/include') `/usr/gnu/include', `/usr/local/include', -`/usr/include'. - - If an included makefile cannot be found in any of these directories, -a warning message is generated, but it is not an immediately fatal -error; processing of the makefile containing the `include' continues. -Once it has finished reading makefiles, `make' will try to remake any -that are out of date or don't exist. *Note How Makefiles Are Remade: -Remaking Makefiles. Only after it has tried to find a way to remake a -makefile and failed, will `make' diagnose the missing makefile as a -fatal error. - - If you want `make' to simply ignore a makefile which does not exist -and cannot be remade, with no error message, use the `-include' -directive instead of `include', like this: - - -include FILENAMES... - - This is acts like `include' in every way except that there is no -error (not even a warning) if any of the FILENAMES do not exist. - - -File: make.info, Node: MAKEFILES Variable, Next: Remaking Makefiles, Prev: Include, Up: Makefiles - -The Variable `MAKEFILES' -======================== - - If the environment variable `MAKEFILES' is defined, `make' considers -its value as a list of names (separated by whitespace) of additional -makefiles to be read before the others. This works much like the -`include' directive: various directories are searched for those files -(*note Including Other Makefiles: Include.). In addition, the default -goal is never taken from one of these makefiles and it is not an error -if the files listed in `MAKEFILES' are not found. - - The main use of `MAKEFILES' is in communication between recursive -invocations of `make' (*note Recursive Use of `make': Recursion.). It -usually is not desirable to set the environment variable before a -top-level invocation of `make', because it is usually better not to -mess with a makefile from outside. However, if you are running `make' -without a specific makefile, a makefile in `MAKEFILES' can do useful -things to help the built-in implicit rules work better, such as -defining search paths (*note Directory Search::.). - - Some users are tempted to set `MAKEFILES' in the environment -automatically on login, and program makefiles to expect this to be done. -This is a very bad idea, because such makefiles will fail to work if -run by anyone else. It is much better to write explicit `include' -directives in the makefiles. *Note Including Other Makefiles: Include. - - -File: make.info, Node: Remaking Makefiles, Next: Overriding Makefiles, Prev: MAKEFILES Variable, Up: Makefiles - -How Makefiles Are Remade -======================== - - Sometimes makefiles can be remade from other files, such as RCS or -SCCS files. If a makefile can be remade from other files, you probably -want `make' to get an up-to-date version of the makefile to read in. - - To this end, after reading in all makefiles, `make' will consider -each as a goal target and attempt to update it. If a makefile has a -rule which says how to update it (found either in that very makefile or -in another one) or if an implicit rule applies to it (*note Using -Implicit Rules: Implicit Rules.), it will be updated if necessary. -After all makefiles have been checked, if any have actually been -changed, `make' starts with a clean slate and reads all the makefiles -over again. (It will also attempt to update each of them over again, -but normally this will not change them again, since they are already up -to date.) - - If the makefiles specify a double-colon rule to remake a file with -commands but no dependencies, that file will always be remade (*note -Double-Colon::.). In the case of makefiles, a makefile that has a -double-colon rule with commands but no dependencies will be remade every -time `make' is run, and then again after `make' starts over and reads -the makefiles in again. This would cause an infinite loop: `make' -would constantly remake the makefile, and never do anything else. So, -to avoid this, `make' will *not* attempt to remake makefiles which are -specified as double-colon targets but have no dependencies. - - If you do not specify any makefiles to be read with `-f' or `--file' -options, `make' will try the default makefile names; *note What Name to -Give Your Makefile: Makefile Names.. Unlike makefiles explicitly -requested with `-f' or `--file' options, `make' is not certain that -these makefiles should exist. However, if a default makefile does not -exist but can be created by running `make' rules, you probably want the -rules to be run so that the makefile can be used. - - Therefore, if none of the default makefiles exists, `make' will try -to make each of them in the same order in which they are searched for -(*note What Name to Give Your Makefile: Makefile Names.) until it -succeeds in making one, or it runs out of names to try. Note that it -is not an error if `make' cannot find or make any makefile; a makefile -is not always necessary. - - When you use the `-t' or `--touch' option (*note Instead of -Executing the Commands: Instead of Execution.), you would not want to -use an out-of-date makefile to decide which targets to touch. So the -`-t' option has no effect on updating makefiles; they are really -updated even if `-t' is specified. Likewise, `-q' (or `--question') -and `-n' (or `--just-print') do not prevent updating of makefiles, -because an out-of-date makefile would result in the wrong output for -other targets. Thus, `make -f mfile -n foo' will update `mfile', read -it in, and then print the commands to update `foo' and its dependencies -without running them. The commands printed for `foo' will be those -specified in the updated contents of `mfile'. - - However, on occasion you might actually wish to prevent updating of -even the makefiles. You can do this by specifying the makefiles as -goals in the command line as well as specifying them as makefiles. -When the makefile name is specified explicitly as a goal, the options -`-t' and so on do apply to them. - - Thus, `make -f mfile -n mfile foo' would read the makefile `mfile', -print the commands needed to update it without actually running them, -and then print the commands needed to update `foo' without running -them. The commands for `foo' will be those specified by the existing -contents of `mfile'. - - -File: make.info, Node: Overriding Makefiles, Prev: Remaking Makefiles, Up: Makefiles - -Overriding Part of Another Makefile -=================================== - - Sometimes it is useful to have a makefile that is mostly just like -another makefile. You can often use the `include' directive to include -one in the other, and add more targets or variable definitions. -However, if the two makefiles give different commands for the same -target, `make' will not let you just do this. But there is another way. - - In the containing makefile (the one that wants to include the other), -you can use a match-anything pattern rule to say that to remake any -target that cannot be made from the information in the containing -makefile, `make' should look in another makefile. *Note Pattern -Rules::, for more information on pattern rules. - - For example, if you have a makefile called `Makefile' that says how -to make the target `foo' (and other targets), you can write a makefile -called `GNUmakefile' that contains: - - foo: - frobnicate > foo - - %: force - @$(MAKE) -f Makefile $@ - force: ; - - If you say `make foo', `make' will find `GNUmakefile', read it, and -see that to make `foo', it needs to run the command `frobnicate > foo'. -If you say `make bar', `make' will find no way to make `bar' in -`GNUmakefile', so it will use the commands from the pattern rule: `make --f Makefile bar'. If `Makefile' provides a rule for updating `bar', -`make' will apply the rule. And likewise for any other target that -`GNUmakefile' does not say how to make. - - The way this works is that the pattern rule has a pattern of just -`%', so it matches any target whatever. The rule specifies a -dependency `force', to guarantee that the commands will be run even if -the target file already exists. We give `force' target empty commands -to prevent `make' from searching for an implicit rule to build -it--otherwise it would apply the same match-anything rule to `force' -itself and create a dependency loop! - - -File: make.info, Node: Rules, Next: Commands, Prev: Makefiles, Up: Top - -Writing Rules -************* - - A "rule" appears in the makefile and says when and how to remake -certain files, called the rule's "targets" (most often only one per -rule). It lists the other files that are the "dependencies" of the -target, and "commands" to use to create or update the target. - - The order of rules is not significant, except for determining the -"default goal": the target for `make' to consider, if you do not -otherwise specify one. The default goal is the target of the first -rule in the first makefile. If the first rule has multiple targets, -only the first target is taken as the default. There are two -exceptions: a target starting with a period is not a default unless it -contains one or more slashes, `/', as well; and, a target that defines -a pattern rule has no effect on the default goal. (*Note Defining and -Redefining Pattern Rules: Pattern Rules.) - - Therefore, we usually write the makefile so that the first rule is -the one for compiling the entire program or all the programs described -by the makefile (often with a target called `all'). *Note Arguments to -Specify the Goals: Goals. - -* Menu: - -* Rule Example:: An example explained. -* Rule Syntax:: General syntax explained. -* Wildcards:: Using wildcard characters such as `*'. -* Directory Search:: Searching other directories for source files. -* Phony Targets:: Using a target that is not a real file's name. -* Force Targets:: You can use a target without commands - or dependencies to mark other - targets as phony. -* Empty Targets:: When only the date matters and the - files are empty. -* Special Targets:: Targets with special built-in meanings. -* Multiple Targets:: When to make use of several targets in a rule. -* Multiple Rules:: How to use several rules with the same target. -* Static Pattern:: Static pattern rules apply to multiple targets - and can vary the dependencies according to - the target name. -* Double-Colon:: How to use a special kind of rule to allow - several independent rules for one target. -* Automatic Dependencies:: How to automatically generate rules giving - dependencies from the source files themselves. - diff --git a/buildtools/windows/source/make/make.info-2 b/buildtools/windows/source/make/make.info-2 deleted file mode 100644 index 3a6e261fcc4..00000000000 --- a/buildtools/windows/source/make/make.info-2 +++ /dev/null @@ -1,1195 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: make.info, Node: Rule Example, Next: Rule Syntax, Up: Rules - -Rule Example -============ - - Here is an example of a rule: - - foo.o : foo.c defs.h # module for twiddling the frobs - cc -c -g foo.c - - Its target is `foo.o' and its dependencies are `foo.c' and `defs.h'. -It has one command, which is `cc -c -g foo.c'. The command line -starts with a tab to identify it as a command. - - This rule says two things: - - * How to decide whether `foo.o' is out of date: it is out of date if - it does not exist, or if either `foo.c' or `defs.h' is more recent - than it. - - * How to update the file `foo.o': by running `cc' as stated. The - command does not explicitly mention `defs.h', but we presume that - `foo.c' includes it, and that that is why `defs.h' was added to - the dependencies. - - -File: make.info, Node: Rule Syntax, Next: Wildcards, Prev: Rule Example, Up: Rules - -Rule Syntax -=========== - - In general, a rule looks like this: - - TARGETS : DEPENDENCIES - COMMAND - ... - -or like this: - - TARGETS : DEPENDENCIES ; COMMAND - COMMAND - ... - - The TARGETS are file names, separated by spaces. Wildcard -characters may be used (*note Using Wildcard Characters in File Names: -Wildcards.) and a name of the form `A(M)' represents member M in -archive file A (*note Archive Members as Targets: Archive Members.). -Usually there is only one target per rule, but occasionally there is a -reason to have more (*note Multiple Targets in a Rule: Multiple -Targets.). - - The COMMAND lines start with a tab character. The first command may -appear on the line after the dependencies, with a tab character, or may -appear on the same line, with a semicolon. Either way, the effect is -the same. *Note Writing the Commands in Rules: Commands. - - Because dollar signs are used to start variable references, if you -really want a dollar sign in a rule you must write two of them, `$$' -(*note How to Use Variables: Using Variables.). You may split a long -line by inserting a backslash followed by a newline, but this is not -required, as `make' places no limit on the length of a line in a -makefile. - - A rule tells `make' two things: when the targets are out of date, -and how to update them when necessary. - - The criterion for being out of date is specified in terms of the -DEPENDENCIES, which consist of file names separated by spaces. -(Wildcards and archive members (*note Archives::.) are allowed here -too.) A target is out of date if it does not exist or if it is older -than any of the dependencies (by comparison of last-modification -times). The idea is that the contents of the target file are computed -based on information in the dependencies, so if any of the dependencies -changes, the contents of the existing target file are no longer -necessarily valid. - - How to update is specified by COMMANDS. These are lines to be -executed by the shell (normally `sh'), but with some extra features -(*note Writing the Commands in Rules: Commands.). - - -File: make.info, Node: Wildcards, Next: Directory Search, Prev: Rule Syntax, Up: Rules - -Using Wildcard Characters in File Names -======================================= - - A single file name can specify many files using "wildcard -characters". The wildcard characters in `make' are `*', `?' and -`[...]', the same as in the Bourne shell. For example, `*.c' specifies -a list of all the files (in the working directory) whose names end in -`.c'. - - The character `~' at the beginning of a file name also has special -significance. If alone, or followed by a slash, it represents your home -directory. For example `~/bin' expands to `/home/you/bin'. If the `~' -is followed by a word, the string represents the home directory of the -user named by that word. For example `~john/bin' expands to -`/home/john/bin'. - - Wildcard expansion happens automatically in targets, in dependencies, -and in commands (where the shell does the expansion). In other -contexts, wildcard expansion happens only if you request it explicitly -with the `wildcard' function. - - The special significance of a wildcard character can be turned off by -preceding it with a backslash. Thus, `foo\*bar' would refer to a -specific file whose name consists of `foo', an asterisk, and `bar'. - -* Menu: - -* Wildcard Examples:: Several examples -* Wildcard Pitfall:: Problems to avoid. -* Wildcard Function:: How to cause wildcard expansion where - it does not normally take place. - - -File: make.info, Node: Wildcard Examples, Next: Wildcard Pitfall, Up: Wildcards - -Wildcard Examples ------------------ - - Wildcards can be used in the commands of a rule, where they are -expanded by the shell. For example, here is a rule to delete all the -object files: - - clean: - rm -f *.o - - Wildcards are also useful in the dependencies of a rule. With the -following rule in the makefile, `make print' will print all the `.c' -files that have changed since the last time you printed them: - - print: *.c - lpr -p $? - touch print - -This rule uses `print' as an empty target file; see *Note Empty Target -Files to Record Events: Empty Targets. (The automatic variable `$?' is -used to print only those files that have changed; see *Note Automatic -Variables: Automatic.) - - Wildcard expansion does not happen when you define a variable. -Thus, if you write this: - - objects = *.o - -then the value of the variable `objects' is the actual string `*.o'. -However, if you use the value of `objects' in a target, dependency or -command, wildcard expansion will take place at that time. To set -`objects' to the expansion, instead use: - - objects := $(wildcard *.o) - -*Note Wildcard Function::. - - -File: make.info, Node: Wildcard Pitfall, Next: Wildcard Function, Prev: Wildcard Examples, Up: Wildcards - -Pitfalls of Using Wildcards ---------------------------- - - Now here is an example of a naive way of using wildcard expansion, -that does not do what you would intend. Suppose you would like to say -that the executable file `foo' is made from all the object files in the -directory, and you write this: - - objects = *.o - - foo : $(objects) - cc -o foo $(CFLAGS) $(objects) - -The value of `objects' is the actual string `*.o'. Wildcard expansion -happens in the rule for `foo', so that each *existing* `.o' file -becomes a dependency of `foo' and will be recompiled if necessary. - - But what if you delete all the `.o' files? When a wildcard matches -no files, it is left as it is, so then `foo' will depend on the -oddly-named file `*.o'. Since no such file is likely to exist, `make' -will give you an error saying it cannot figure out how to make `*.o'. -This is not what you want! - - Actually it is possible to obtain the desired result with wildcard -expansion, but you need more sophisticated techniques, including the -`wildcard' function and string substitution. *Note The Function -`wildcard': Wildcard Function. - - -File: make.info, Node: Wildcard Function, Prev: Wildcard Pitfall, Up: Wildcards - -The Function `wildcard' ------------------------ - - Wildcard expansion happens automatically in rules. But wildcard -expansion does not normally take place when a variable is set, or -inside the arguments of a function. If you want to do wildcard -expansion in such places, you need to use the `wildcard' function, like -this: - - $(wildcard PATTERN...) - -This string, used anywhere in a makefile, is replaced by a -space-separated list of names of existing files that match one of the -given file name patterns. If no existing file name matches a pattern, -then that pattern is omitted from the output of the `wildcard' -function. Note that this is different from how unmatched wildcards -behave in rules, where they are used verbatim rather than ignored -(*note Wildcard Pitfall::.). - - One use of the `wildcard' function is to get a list of all the C -source files in a directory, like this: - - $(wildcard *.c) - - We can change the list of C source files into a list of object files -by replacing the `.o' suffix with `.c' in the result, like this: - - $(patsubst %.c,%.o,$(wildcard *.c)) - -(Here we have used another function, `patsubst'. *Note Functions for -String Substitution and Analysis: Text Functions.) - - Thus, a makefile to compile all C source files in the directory and -then link them together could be written as follows: - - objects := $(patsubst %.c,%.o,$(wildcard *.c)) - - foo : $(objects) - cc -o foo $(objects) - -(This takes advantage of the implicit rule for compiling C programs, so -there is no need to write explicit rules for compiling the files. -*Note The Two Flavors of Variables: Flavors, for an explanation of -`:=', which is a variant of `='.) - - -File: make.info, Node: Directory Search, Next: Phony Targets, Prev: Wildcards, Up: Rules - -Searching Directories for Dependencies -====================================== - - For large systems, it is often desirable to put sources in a separate -directory from the binaries. The "directory search" features of `make' -facilitate this by searching several directories automatically to find -a dependency. When you redistribute the files among directories, you -do not need to change the individual rules, just the search paths. - -* Menu: - -* General Search:: Specifying a search path that applies - to every dependency. -* Selective Search:: Specifying a search path - for a specified class of names. -* Commands/Search:: How to write shell commands that work together - with search paths. -* Implicit/Search:: How search paths affect implicit rules. -* Libraries/Search:: Directory search for link libraries. - - -File: make.info, Node: General Search, Next: Selective Search, Up: Directory Search - -`VPATH': Search Path for All Dependencies ------------------------------------------ - - The value of the `make' variable `VPATH' specifies a list of -directories that `make' should search. Most often, the directories are -expected to contain dependency files that are not in the current -directory; however, `VPATH' specifies a search list that `make' applies -for all files, including files which are targets of rules. - - Thus, if a file that is listed as a target or dependency does not -exist in the current directory, `make' searches the directories listed -in `VPATH' for a file with that name. If a file is found in one of -them, that file becomes the dependency. Rules may then specify the -names of source files in the dependencies as if they all existed in the -current directory. *Note Writing Shell Commands with Directory Search: -Commands/Search. - - In the `VPATH' variable, directory names are separated by colons or -blanks. The order in which directories are listed is the order followed -by `make' in its search. - - For example, - - VPATH = src:../headers - -specifies a path containing two directories, `src' and `../headers', -which `make' searches in that order. - - With this value of `VPATH', the following rule, - - foo.o : foo.c - -is interpreted as if it were written like this: - - foo.o : src/foo.c - -assuming the file `foo.c' does not exist in the current directory but -is found in the directory `src'. - - -File: make.info, Node: Selective Search, Next: Commands/Search, Prev: General Search, Up: Directory Search - -The `vpath' Directive ---------------------- - - Similar to the `VPATH' variable but more selective is the `vpath' -directive (note lower case), which allows you to specify a search path -for a particular class of file names, those that match a particular -pattern. Thus you can supply certain search directories for one class -of file names and other directories (or none) for other file names. - - There are three forms of the `vpath' directive: - -`vpath PATTERN DIRECTORIES' - Specify the search path DIRECTORIES for file names that match - PATTERN. - - The search path, DIRECTORIES, is a list of directories to be - searched, separated by colons or blanks, just like the search path - used in the `VPATH' variable. - -`vpath PATTERN' - Clear out the search path associated with PATTERN. - -`vpath' - Clear all search paths previously specified with `vpath' - directives. - - A `vpath' pattern is a string containing a `%' character. The -string must match the file name of a dependency that is being searched -for, the `%' character matching any sequence of zero or more characters -(as in pattern rules; *note Defining and Redefining Pattern Rules: -Pattern Rules.). For example, `%.h' matches files that end in `.h'. -(If there is no `%', the pattern must match the dependency exactly, -which is not useful very often.) - - `%' characters in a `vpath' directive's pattern can be quoted with -preceding backslashes (`\'). Backslashes that would otherwise quote -`%' characters can be quoted with more backslashes. Backslashes that -quote `%' characters or other backslashes are removed from the pattern -before it is compared to file names. Backslashes that are not in -danger of quoting `%' characters go unmolested. - - When a dependency fails to exist in the current directory, if the -PATTERN in a `vpath' directive matches the name of the dependency file, -then the DIRECTORIES in that directive are searched just like (and -before) the directories in the `VPATH' variable. - - For example, - - vpath %.h ../headers - -tells `make' to look for any dependency whose name ends in `.h' in the -directory `../headers' if the file is not found in the current -directory. - - If several `vpath' patterns match the dependency file's name, then -`make' processes each matching `vpath' directive one by one, searching -all the directories mentioned in each directive. `make' handles -multiple `vpath' directives in the order in which they appear in the -makefile; multiple directives with the same pattern are independent of -each other. - - Thus, - - vpath %.c foo - vpath % blish - vpath %.c bar - -will look for a file ending in `.c' in `foo', then `blish', then `bar', -while - - vpath %.c foo:bar - vpath % blish - -will look for a file ending in `.c' in `foo', then `bar', then `blish'. - - -File: make.info, Node: Commands/Search, Next: Implicit/Search, Prev: Selective Search, Up: Directory Search - -Writing Shell Commands with Directory Search --------------------------------------------- - - When a dependency is found in another directory through directory -search, this cannot change the commands of the rule; they will execute -as written. Therefore, you must write the commands with care so that -they will look for the dependency in the directory where `make' finds -it. - - This is done with the "automatic variables" such as `$^' (*note -Automatic Variables: Automatic.). For instance, the value of `$^' is a -list of all the dependencies of the rule, including the names of the -directories in which they were found, and the value of `$@' is the -target. Thus: - - foo.o : foo.c - cc -c $(CFLAGS) $^ -o $@ - -(The variable `CFLAGS' exists so you can specify flags for C -compilation by implicit rules; we use it here for consistency so it will -affect all C compilations uniformly; *note Variables Used by Implicit -Rules: Implicit Variables..) - - Often the dependencies include header files as well, which you do not -want to mention in the commands. The automatic variable `$<' is just -the first dependency: - - VPATH = src:../headers - foo.o : foo.c defs.h hack.h - cc -c $(CFLAGS) $< -o $@ - - -File: make.info, Node: Implicit/Search, Next: Libraries/Search, Prev: Commands/Search, Up: Directory Search - -Directory Search and Implicit Rules ------------------------------------ - - The search through the directories specified in `VPATH' or with -`vpath' also happens during consideration of implicit rules (*note -Using Implicit Rules: Implicit Rules.). - - For example, when a file `foo.o' has no explicit rule, `make' -considers implicit rules, such as the built-in rule to compile `foo.c' -if that file exists. If such a file is lacking in the current -directory, the appropriate directories are searched for it. If `foo.c' -exists (or is mentioned in the makefile) in any of the directories, the -implicit rule for C compilation is applied. - - The commands of implicit rules normally use automatic variables as a -matter of necessity; consequently they will use the file names found by -directory search with no extra effort. - - -File: make.info, Node: Libraries/Search, Prev: Implicit/Search, Up: Directory Search - -Directory Search for Link Libraries ------------------------------------ - - Directory search applies in a special way to libraries used with the -linker. This special feature comes into play when you write a -dependency whose name is of the form `-lNAME'. (You can tell something -strange is going on here because the dependency is normally the name of -a file, and the *file name* of the library looks like `libNAME.a', not -like `-lNAME'.) - - When a dependency's name has the form `-lNAME', `make' handles it -specially by searching for the file `libNAME.a' in the current -directory, in directories specified by matching `vpath' search paths -and the `VPATH' search path, and then in the directories `/lib', -`/usr/lib', and `PREFIX/lib' (normally `/usr/local/lib'). - - For example, - - foo : foo.c -lcurses - cc $^ -o $@ - -would cause the command `cc foo.c /usr/lib/libcurses.a -o foo' to be -executed when `foo' is older than `foo.c' or than -`/usr/lib/libcurses.a'. - - -File: make.info, Node: Phony Targets, Next: Force Targets, Prev: Directory Search, Up: Rules - -Phony Targets -============= - - A phony target is one that is not really the name of a file. It is -just a name for some commands to be executed when you make an explicit -request. There are two reasons to use a phony target: to avoid a -conflict with a file of the same name, and to improve performance. - - If you write a rule whose commands will not create the target file, -the commands will be executed every time the target comes up for -remaking. Here is an example: - - clean: - rm *.o temp - -Because the `rm' command does not create a file named `clean', probably -no such file will ever exist. Therefore, the `rm' command will be -executed every time you say `make clean'. - - The phony target will cease to work if anything ever does create a -file named `clean' in this directory. Since it has no dependencies, the -file `clean' would inevitably be considered up to date, and its -commands would not be executed. To avoid this problem, you can -explicitly declare the target to be phony, using the special target -`.PHONY' (*note Special Built-in Target Names: Special Targets.) as -follows: - - .PHONY : clean - -Once this is done, `make clean' will run the commands regardless of -whether there is a file named `clean'. - - Since it knows that phony targets do not name actual files that -could be remade from other files, `make' skips the implicit rule search -for phony targets (*note Implicit Rules::.). This is why declaring a -target phony is good for performance, even if you are not worried about -the actual file existing. - - Thus, you first write the line that states that `clean' is a phony -target, then you write the rule, like this: - - .PHONY: clean - clean: - rm *.o temp - - A phony target should not be a dependency of a real target file; if -it is, its commands are run every time `make' goes to update that file. -As long as a phony target is never a dependency of a real target, the -phony target commands will be executed only when the phony target is a -specified goal (*note Arguments to Specify the Goals: Goals.). - - Phony targets can have dependencies. When one directory contains -multiple programs, it is most convenient to describe all of the -programs in one makefile `./Makefile'. Since the target remade by -default will be the first one in the makefile, it is common to make -this a phony target named `all' and give it, as dependencies, all the -individual programs. For example: - - all : prog1 prog2 prog3 - .PHONY : all - - prog1 : prog1.o utils.o - cc -o prog1 prog1.o utils.o - - prog2 : prog2.o - cc -o prog2 prog2.o - - prog3 : prog3.o sort.o utils.o - cc -o prog3 prog3.o sort.o utils.o - -Now you can say just `make' to remake all three programs, or specify as -arguments the ones to remake (as in `make prog1 prog3'). - - When one phony target is a dependency of another, it serves as a -subroutine of the other. For example, here `make cleanall' will delete -the object files, the difference files, and the file `program': - - .PHONY: cleanall cleanobj cleandiff - - cleanall : cleanobj cleandiff - rm program - - cleanobj : - rm *.o - - cleandiff : - rm *.diff - - -File: make.info, Node: Force Targets, Next: Empty Targets, Prev: Phony Targets, Up: Rules - -Rules without Commands or Dependencies -====================================== - - If a rule has no dependencies or commands, and the target of the rule -is a nonexistent file, then `make' imagines this target to have been -updated whenever its rule is run. This implies that all targets -depending on this one will always have their commands run. - - An example will illustrate this: - - clean: FORCE - rm $(objects) - FORCE: - - Here the target `FORCE' satisfies the special conditions, so the -target `clean' that depends on it is forced to run its commands. There -is nothing special about the name `FORCE', but that is one name -commonly used this way. - - As you can see, using `FORCE' this way has the same results as using -`.PHONY: clean'. - - Using `.PHONY' is more explicit and more efficient. However, other -versions of `make' do not support `.PHONY'; thus `FORCE' appears in -many makefiles. *Note Phony Targets::. - - -File: make.info, Node: Empty Targets, Next: Special Targets, Prev: Force Targets, Up: Rules - -Empty Target Files to Record Events -=================================== - - The "empty target" is a variant of the phony target; it is used to -hold commands for an action that you request explicitly from time to -time. Unlike a phony target, this target file can really exist; but -the file's contents do not matter, and usually are empty. - - The purpose of the empty target file is to record, with its -last-modification time, when the rule's commands were last executed. It -does so because one of the commands is a `touch' command to update the -target file. - - The empty target file must have some dependencies. When you ask to -remake the empty target, the commands are executed if any dependency is -more recent than the target; in other words, if a dependency has -changed since the last time you remade the target. Here is an example: - - print: foo.c bar.c - lpr -p $? - touch print - -With this rule, `make print' will execute the `lpr' command if either -source file has changed since the last `make print'. The automatic -variable `$?' is used to print only those files that have changed -(*note Automatic Variables: Automatic.). - - -File: make.info, Node: Special Targets, Next: Multiple Targets, Prev: Empty Targets, Up: Rules - -Special Built-in Target Names -============================= - - Certain names have special meanings if they appear as targets. - -`.PHONY' - The dependencies of the special target `.PHONY' are considered to - be phony targets. When it is time to consider such a target, - `make' will run its commands unconditionally, regardless of - whether a file with that name exists or what its last-modification - time is. *Note Phony Targets: Phony Targets. - -`.SUFFIXES' - The dependencies of the special target `.SUFFIXES' are the list of - suffixes to be used in checking for suffix rules. *Note - Old-Fashioned Suffix Rules: Suffix Rules. - -`.DEFAULT' - The commands specified for `.DEFAULT' are used for any target for - which no rules are found (either explicit rules or implicit rules). - *Note Last Resort::. If `.DEFAULT' commands are specified, every - file mentioned as a dependency, but not as a target in a rule, - will have these commands executed on its behalf. *Note Implicit - Rule Search Algorithm: Search Algorithm. - -`.PRECIOUS' - The targets which `.PRECIOUS' depends on are given the following - special treatment: if `make' is killed or interrupted during the - execution of their commands, the target is not deleted. *Note - Interrupting or Killing `make': Interrupts. Also, if the target - is an intermediate file, it will not be deleted after it is no - longer needed, as is normally done. *Note Chains of Implicit - Rules: Chained Rules. - - You can also list the target pattern of an implicit rule (such as - `%.o') as a dependency file of the special target `.PRECIOUS' to - preserve intermediate files created by rules whose target patterns - match that file's name. - -`.IGNORE' - If you specify dependencies for `.IGNORE', then `make' will ignore - errors in execution of the commands run for those particular - files. The commands for `.IGNORE' are not meaningful. - - If mentioned as a target with no dependencies, `.IGNORE' says to - ignore errors in execution of commands for all files. This usage - of `.IGNORE' is supported only for historical compatibility. Since - this affects every command in the makefile, it is not very useful; - we recommend you use the more selective ways to ignore errors in - specific commands. *Note Errors in Commands: Errors. - -`.SILENT' - If you specify dependencies for `.SILENT', then `make' will not - the print commands to remake those particular files before - executing them. The commands for `.SILENT' are not meaningful. - - If mentioned as a target with no dependencies, `.SILENT' says not - to print any commands before executing them. This usage of - `.SILENT' is supported only for historical compatibility. We - recommend you use the more selective ways to silence specific - commands. *Note Command Echoing: Echoing. If you want to silence - all commands for a particular run of `make', use the `-s' or - `--silent' option (*note Options Summary::.). - -`.EXPORT_ALL_VARIABLES' - Simply by being mentioned as a target, this tells `make' to export - all variables to child processes by default. *Note Communicating - Variables to a Sub-`make': Variables/Recursion. - - Any defined implicit rule suffix also counts as a special target if -it appears as a target, and so does the concatenation of two suffixes, -such as `.c.o'. These targets are suffix rules, an obsolete way of -defining implicit rules (but a way still widely used). In principle, -any target name could be special in this way if you break it in two and -add both pieces to the suffix list. In practice, suffixes normally -begin with `.', so these special target names also begin with `.'. -*Note Old-Fashioned Suffix Rules: Suffix Rules. - - -File: make.info, Node: Multiple Targets, Next: Multiple Rules, Prev: Special Targets, Up: Rules - -Multiple Targets in a Rule -========================== - - A rule with multiple targets is equivalent to writing many rules, -each with one target, and all identical aside from that. The same -commands apply to all the targets, but their effects may vary because -you can substitute the actual target name into the command using `$@'. -The rule contributes the same dependencies to all the targets also. - - This is useful in two cases. - - * You want just dependencies, no commands. For example: - - kbd.o command.o files.o: command.h - - gives an additional dependency to each of the three object files - mentioned. - - * Similar commands work for all the targets. The commands do not - need to be absolutely identical, since the automatic variable `$@' - can be used to substitute the particular target to be remade into - the commands (*note Automatic Variables: Automatic.). For example: - - bigoutput littleoutput : text.g - generate text.g -$(subst output,,$@) > $@ - - is equivalent to - - bigoutput : text.g - generate text.g -big > bigoutput - littleoutput : text.g - generate text.g -little > littleoutput - - Here we assume the hypothetical program `generate' makes two types - of output, one if given `-big' and one if given `-little'. *Note - Functions for String Substitution and Analysis: Text Functions, - for an explanation of the `subst' function. - - Suppose you would like to vary the dependencies according to the -target, much as the variable `$@' allows you to vary the commands. You -cannot do this with multiple targets in an ordinary rule, but you can -do it with a "static pattern rule". *Note Static Pattern Rules: Static -Pattern. - - -File: make.info, Node: Multiple Rules, Next: Static Pattern, Prev: Multiple Targets, Up: Rules - -Multiple Rules for One Target -============================= - - One file can be the target of several rules. All the dependencies -mentioned in all the rules are merged into one list of dependencies for -the target. If the target is older than any dependency from any rule, -the commands are executed. - - There can only be one set of commands to be executed for a file. If -more than one rule gives commands for the same file, `make' uses the -last set given and prints an error message. (As a special case, if the -file's name begins with a dot, no error message is printed. This odd -behavior is only for compatibility with other implementations of -`make'.) There is no reason to write your makefiles this way; that is -why `make' gives you an error message. - - An extra rule with just dependencies can be used to give a few extra -dependencies to many files at once. For example, one usually has a -variable named `objects' containing a list of all the compiler output -files in the system being made. An easy way to say that all of them -must be recompiled if `config.h' changes is to write the following: - - objects = foo.o bar.o - foo.o : defs.h - bar.o : defs.h test.h - $(objects) : config.h - - This could be inserted or taken out without changing the rules that -really specify how to make the object files, making it a convenient -form to use if you wish to add the additional dependency intermittently. - - Another wrinkle is that the additional dependencies could be -specified with a variable that you set with a command argument to `make' -(*note Overriding Variables: Overriding.). For example, - - extradeps= - $(objects) : $(extradeps) - -means that the command `make extradeps=foo.h' will consider `foo.h' as -a dependency of each object file, but plain `make' will not. - - If none of the explicit rules for a target has commands, then `make' -searches for an applicable implicit rule to find some commands *note -Using Implicit Rules: Implicit Rules.). - - -File: make.info, Node: Static Pattern, Next: Double-Colon, Prev: Multiple Rules, Up: Rules - -Static Pattern Rules -==================== - - "Static pattern rules" are rules which specify multiple targets and -construct the dependency names for each target based on the target name. -They are more general than ordinary rules with multiple targets because -the targets do not have to have identical dependencies. Their -dependencies must be *analogous*, but not necessarily *identical*. - -* Menu: - -* Static Usage:: The syntax of static pattern rules. -* Static versus Implicit:: When are they better than implicit rules? - - -File: make.info, Node: Static Usage, Next: Static versus Implicit, Up: Static Pattern - -Syntax of Static Pattern Rules ------------------------------- - - Here is the syntax of a static pattern rule: - - TARGETS ...: TARGET-PATTERN: DEP-PATTERNS ... - COMMANDS - ... - -The TARGETS list specifies the targets that the rule applies to. The -targets can contain wildcard characters, just like the targets of -ordinary rules (*note Using Wildcard Characters in File Names: -Wildcards.). - - The TARGET-PATTERN and DEP-PATTERNS say how to compute the -dependencies of each target. Each target is matched against the -TARGET-PATTERN to extract a part of the target name, called the "stem". -This stem is substituted into each of the DEP-PATTERNS to make the -dependency names (one from each DEP-PATTERN). - - Each pattern normally contains the character `%' just once. When the -TARGET-PATTERN matches a target, the `%' can match any part of the -target name; this part is called the "stem". The rest of the pattern -must match exactly. For example, the target `foo.o' matches the -pattern `%.o', with `foo' as the stem. The targets `foo.c' and -`foo.out' do not match that pattern. - - The dependency names for each target are made by substituting the -stem for the `%' in each dependency pattern. For example, if one -dependency pattern is `%.c', then substitution of the stem `foo' gives -the dependency name `foo.c'. It is legitimate to write a dependency -pattern that does not contain `%'; then this dependency is the same for -all targets. - - `%' characters in pattern rules can be quoted with preceding -backslashes (`\'). Backslashes that would otherwise quote `%' -characters can be quoted with more backslashes. Backslashes that quote -`%' characters or other backslashes are removed from the pattern before -it is compared to file names or has a stem substituted into it. -Backslashes that are not in danger of quoting `%' characters go -unmolested. For example, the pattern `the\%weird\\%pattern\\' has -`the%weird\' preceding the operative `%' character, and `pattern\\' -following it. The final two backslashes are left alone because they -cannot affect any `%' character. - - Here is an example, which compiles each of `foo.o' and `bar.o' from -the corresponding `.c' file: - - objects = foo.o bar.o - - $(objects): %.o: %.c - $(CC) -c $(CFLAGS) $< -o $@ - -Here `$<' is the automatic variable that holds the name of the -dependency and `$@' is the automatic variable that holds the name of -the target; see *Note Automatic Variables: Automatic. - - Each target specified must match the target pattern; a warning is -issued for each target that does not. If you have a list of files, -only some of which will match the pattern, you can use the `filter' -function to remove nonmatching file names (*note Functions for String -Substitution and Analysis: Text Functions.): - - files = foo.elc bar.o lose.o - - $(filter %.o,$(files)): %.o: %.c - $(CC) -c $(CFLAGS) $< -o $@ - $(filter %.elc,$(files)): %.elc: %.el - emacs -f batch-byte-compile $< - -In this example the result of `$(filter %.o,$(files))' is `bar.o -lose.o', and the first static pattern rule causes each of these object -files to be updated by compiling the corresponding C source file. The -result of `$(filter %.elc,$(files))' is `foo.elc', so that file is made -from `foo.el'. - - Another example shows how to use `$*' in static pattern rules: - - bigoutput littleoutput : %output : text.g - generate text.g -$* > $@ - -When the `generate' command is run, `$*' will expand to the stem, -either `big' or `little'. - - -File: make.info, Node: Static versus Implicit, Prev: Static Usage, Up: Static Pattern - -Static Pattern Rules versus Implicit Rules ------------------------------------------- - - A static pattern rule has much in common with an implicit rule -defined as a pattern rule (*note Defining and Redefining Pattern Rules: -Pattern Rules.). Both have a pattern for the target and patterns for -constructing the names of dependencies. The difference is in how -`make' decides *when* the rule applies. - - An implicit rule *can* apply to any target that matches its pattern, -but it *does* apply only when the target has no commands otherwise -specified, and only when the dependencies can be found. If more than -one implicit rule appears applicable, only one applies; the choice -depends on the order of rules. - - By contrast, a static pattern rule applies to the precise list of -targets that you specify in the rule. It cannot apply to any other -target and it invariably does apply to each of the targets specified. -If two conflicting rules apply, and both have commands, that's an error. - - The static pattern rule can be better than an implicit rule for these -reasons: - - * You may wish to override the usual implicit rule for a few files - whose names cannot be categorized syntactically but can be given - in an explicit list. - - * If you cannot be sure of the precise contents of the directories - you are using, you may not be sure which other irrelevant files - might lead `make' to use the wrong implicit rule. The choice - might depend on the order in which the implicit rule search is - done. With static pattern rules, there is no uncertainty: each - rule applies to precisely the targets specified. - - -File: make.info, Node: Double-Colon, Next: Automatic Dependencies, Prev: Static Pattern, Up: Rules - -Double-Colon Rules -================== - - "Double-colon" rules are rules written with `::' instead of `:' -after the target names. They are handled differently from ordinary -rules when the same target appears in more than one rule. - - When a target appears in multiple rules, all the rules must be the -same type: all ordinary, or all double-colon. If they are -double-colon, each of them is independent of the others. Each -double-colon rule's commands are executed if the target is older than -any dependencies of that rule. This can result in executing none, any, -or all of the double-colon rules. - - Double-colon rules with the same target are in fact completely -separate from one another. Each double-colon rule is processed -individually, just as rules with different targets are processed. - - The double-colon rules for a target are executed in the order they -appear in the makefile. However, the cases where double-colon rules -really make sense are those where the order of executing the commands -would not matter. - - Double-colon rules are somewhat obscure and not often very useful; -they provide a mechanism for cases in which the method used to update a -target differs depending on which dependency files caused the update, -and such cases are rare. - - Each double-colon rule should specify commands; if it does not, an -implicit rule will be used if one applies. *Note Using Implicit Rules: -Implicit Rules. - - -File: make.info, Node: Automatic Dependencies, Prev: Double-Colon, Up: Rules - -Generating Dependencies Automatically -===================================== - - In the makefile for a program, many of the rules you need to write -often say only that some object file depends on some header file. For -example, if `main.c' uses `defs.h' via an `#include', you would write: - - main.o: defs.h - -You need this rule so that `make' knows that it must remake `main.o' -whenever `defs.h' changes. You can see that for a large program you -would have to write dozens of such rules in your makefile. And, you -must always be very careful to update the makefile every time you add -or remove an `#include'. - - To avoid this hassle, most modern C compilers can write these rules -for you, by looking at the `#include' lines in the source files. -Usually this is done with the `-M' option to the compiler. For -example, the command: - - cc -M main.c - -generates the output: - - main.o : main.c defs.h - -Thus you no longer have to write all those rules yourself. The -compiler will do it for you. - - Note that such a dependency constitutes mentioning `main.o' in a -makefile, so it can never be considered an intermediate file by implicit -rule search. This means that `make' won't ever remove the file after -using it; *note Chains of Implicit Rules: Chained Rules.. - - With old `make' programs, it was traditional practice to use this -compiler feature to generate dependencies on demand with a command like -`make depend'. That command would create a file `depend' containing -all the automatically-generated dependencies; then the makefile could -use `include' to read them in (*note Include::.). - - In GNU `make', the feature of remaking makefiles makes this practice -obsolete--you need never tell `make' explicitly to regenerate the -dependencies, because it always regenerates any makefile that is out of -date. *Note Remaking Makefiles::. - - The practice we recommend for automatic dependency generation is to -have one makefile corresponding to each source file. For each source -file `NAME.c' there is a makefile `NAME.d' which lists what files the -object file `NAME.o' depends on. That way only the source files that -have changed need to be rescanned to produce the new dependencies. - - Here is the pattern rule to generate a file of dependencies (i.e., a -makefile) called `NAME.d' from a C source file called `NAME.c': - - %.d: %.c - $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \ - | sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@' - -*Note Pattern Rules::, for information on defining pattern rules. The -`-e' flag to the shell makes it exit immediately if the `$(CC)' command -fails (exits with a nonzero status). Normally the shell exits with the -status of the last command in the pipeline (`sed' in this case), so -`make' would not notice a nonzero status from the compiler. - - With the GNU C compiler, you may wish to use the `-MM' flag instead -of `-M'. This omits dependencies on system header files. *Note -Options Controlling the Preprocessor: (gcc.info)Preprocessor Options, -for details. - - The purpose of the `sed' command is to translate (for example): - - main.o : main.c defs.h - -into: - - main.o main.d : main.c defs.h - -This makes each `.d' file depend on all the source and header files -that the corresponding `.o' file depends on. `make' then knows it must -regenerate the dependencies whenever any of the source or header files -changes. - - Once you've defined the rule to remake the `.d' files, you then use -the `include' directive to read them all in. *Note Include::. For -example: - - sources = foo.c bar.c - - include $(sources:.c=.d) - -(This example uses a substitution variable reference to translate the -list of source files `foo.c bar.c' into a list of dependency makefiles, -`foo.d bar.d'. *Note Substitution Refs::, for full information on -substitution references.) Since the `.d' files are makefiles like any -others, `make' will remake them as necessary with no further work from -you. *Note Remaking Makefiles::. - - -File: make.info, Node: Commands, Next: Using Variables, Prev: Rules, Up: Top - -Writing the Commands in Rules -***************************** - - The commands of a rule consist of shell command lines to be executed -one by one. Each command line must start with a tab, except that the -first command line may be attached to the target-and-dependencies line -with a semicolon in between. Blank lines and lines of just comments -may appear among the command lines; they are ignored. (But beware, an -apparently "blank" line that begins with a tab is *not* blank! It is an -empty command; *note Empty Commands::..) - - Users use many different shell programs, but commands in makefiles -are always interpreted by `/bin/sh' unless the makefile specifies -otherwise. *Note Command Execution: Execution. - - The shell that is in use determines whether comments can be written -on command lines, and what syntax they use. When the shell is -`/bin/sh', a `#' starts a comment that extends to the end of the line. -The `#' does not have to be at the beginning of a line. Text on a line -before a `#' is not part of the comment. - -* Menu: - -* Echoing:: How to control when commands are echoed. -* Execution:: How commands are executed. -* Parallel:: How commands can be executed in parallel. -* Errors:: What happens after a command execution error. -* Interrupts:: What happens when a command is interrupted. -* Recursion:: Invoking `make' from makefiles. -* Sequences:: Defining canned sequences of commands. -* Empty Commands:: Defining useful, do-nothing commands. - - -File: make.info, Node: Echoing, Next: Execution, Up: Commands - -Command Echoing -=============== - - Normally `make' prints each command line before it is executed. We -call this "echoing" because it gives the appearance that you are typing -the commands yourself. - - When a line starts with `@', the echoing of that line is suppressed. -The `@' is discarded before the command is passed to the shell. -Typically you would use this for a command whose only effect is to print -something, such as an `echo' command to indicate progress through the -makefile: - - @echo About to make distribution files - - When `make' is given the flag `-n' or `--just-print', echoing is all -that happens, no execution. *Note Summary of Options: Options Summary. -In this case and only this case, even the commands starting with `@' -are printed. This flag is useful for finding out which commands `make' -thinks are necessary without actually doing them. - - The `-s' or `--silent' flag to `make' prevents all echoing, as if -all commands started with `@'. A rule in the makefile for the special -target `.SILENT' without dependencies has the same effect (*note -Special Built-in Target Names: Special Targets.). `.SILENT' is -essentially obsolete since `@' is more flexible. - - -File: make.info, Node: Execution, Next: Parallel, Prev: Echoing, Up: Commands - -Command Execution -================= - - When it is time to execute commands to update a target, they are -executed by making a new subshell for each line. (In practice, `make' -may take shortcuts that do not affect the results.) - - *Please note:* this implies that shell commands such as `cd' that -set variables local to each process will not affect the following -command lines. If you want to use `cd' to affect the next command, put -the two on a single line with a semicolon between them. Then `make' -will consider them a single command and pass them, together, to a shell -which will execute them in sequence. For example: - - foo : bar/lose - cd bar; gobble lose > ../foo - - If you would like to split a single shell command into multiple -lines of text, you must use a backslash at the end of all but the last -subline. Such a sequence of lines is combined into a single line, by -deleting the backslash-newline sequences, before passing it to the -shell. Thus, the following is equivalent to the preceding example: - - foo : bar/lose - cd bar; \ - gobble lose > ../foo - - The program used as the shell is taken from the variable `SHELL'. -By default, the program `/bin/sh' is used. - - Unlike most variables, the variable `SHELL' is never set from the -environment. This is because the `SHELL' environment variable is used -to specify your personal choice of shell program for interactive use. -It would be very bad for personal choices like this to affect the -functioning of makefiles. *Note Variables from the Environment: -Environment. - diff --git a/buildtools/windows/source/make/make.info-3 b/buildtools/windows/source/make/make.info-3 deleted file mode 100644 index d9607df08fc..00000000000 --- a/buildtools/windows/source/make/make.info-3 +++ /dev/null @@ -1,1228 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: make.info, Node: Parallel, Next: Errors, Prev: Execution, Up: Commands - -Parallel Execution -================== - - GNU `make' knows how to execute several commands at once. Normally, -`make' will execute only one command at a time, waiting for it to -finish before executing the next. However, the `-j' or `--jobs' option -tells `make' to execute many commands simultaneously. - - If the `-j' option is followed by an integer, this is the number of -commands to execute at once; this is called the number of "job slots". -If there is nothing looking like an integer after the `-j' option, -there is no limit on the number of job slots. The default number of job -slots is one, which means serial execution (one thing at a time). - - One unpleasant consequence of running several commands -simultaneously is that output from all of the commands comes when the -commands send it, so messages from different commands may be -interspersed. - - Another problem is that two processes cannot both take input from the -same device; so to make sure that only one command tries to take input -from the terminal at once, `make' will invalidate the standard input -streams of all but one running command. This means that attempting to -read from standard input will usually be a fatal error (a `Broken pipe' -signal) for most child processes if there are several. - - It is unpredictable which command will have a valid standard input -stream (which will come from the terminal, or wherever you redirect the -standard input of `make'). The first command run will always get it -first, and the first command started after that one finishes will get -it next, and so on. - - We will change how this aspect of `make' works if we find a better -alternative. In the mean time, you should not rely on any command using -standard input at all if you are using the parallel execution feature; -but if you are not using this feature, then standard input works -normally in all commands. - - If a command fails (is killed by a signal or exits with a nonzero -status), and errors are not ignored for that command (*note Errors in -Commands: Errors.), the remaining command lines to remake the same -target will not be run. If a command fails and the `-k' or -`--keep-going' option was not given (*note Summary of Options: Options -Summary.), `make' aborts execution. If make terminates for any reason -(including a signal) with child processes running, it waits for them to -finish before actually exiting. - - When the system is heavily loaded, you will probably want to run -fewer jobs than when it is lightly loaded. You can use the `-l' option -to tell `make' to limit the number of jobs to run at once, based on the -load average. The `-l' or `--max-load' option is followed by a -floating-point number. For example, - - -l 2.5 - -will not let `make' start more than one job if the load average is -above 2.5. The `-l' option with no following number removes the load -limit, if one was given with a previous `-l' option. - - More precisely, when `make' goes to start up a job, and it already -has at least one job running, it checks the current load average; if it -is not lower than the limit given with `-l', `make' waits until the load -average goes below that limit, or until all the other jobs finish. - - By default, there is no load limit. - - -File: make.info, Node: Errors, Next: Interrupts, Prev: Parallel, Up: Commands - -Errors in Commands -================== - - After each shell command returns, `make' looks at its exit status. -If the command completed successfully, the next command line is executed -in a new shell; after the last command line is finished, the rule is -finished. - - If there is an error (the exit status is nonzero), `make' gives up on -the current rule, and perhaps on all rules. - - Sometimes the failure of a certain command does not indicate a -problem. For example, you may use the `mkdir' command to ensure that a -directory exists. If the directory already exists, `mkdir' will report -an error, but you probably want `make' to continue regardless. - - To ignore errors in a command line, write a `-' at the beginning of -the line's text (after the initial tab). The `-' is discarded before -the command is passed to the shell for execution. - - For example, - - clean: - -rm -f *.o - -This causes `rm' to continue even if it is unable to remove a file. - - When you run `make' with the `-i' or `--ignore-errors' flag, errors -are ignored in all commands of all rules. A rule in the makefile for -the special target `.IGNORE' has the same effect, if there are no -dependencies. These ways of ignoring errors are obsolete because `-' -is more flexible. - - When errors are to be ignored, because of either a `-' or the `-i' -flag, `make' treats an error return just like success, except that it -prints out a message that tells you the status code the command exited -with, and says that the error has been ignored. - - When an error happens that `make' has not been told to ignore, it -implies that the current target cannot be correctly remade, and neither -can any other that depends on it either directly or indirectly. No -further commands will be executed for these targets, since their -preconditions have not been achieved. - - Normally `make' gives up immediately in this circumstance, returning -a nonzero status. However, if the `-k' or `--keep-going' flag is -specified, `make' continues to consider the other dependencies of the -pending targets, remaking them if necessary, before it gives up and -returns nonzero status. For example, after an error in compiling one -object file, `make -k' will continue compiling other object files even -though it already knows that linking them will be impossible. *Note -Summary of Options: Options Summary. - - The usual behavior assumes that your purpose is to get the specified -targets up to date; once `make' learns that this is impossible, it -might as well report the failure immediately. The `-k' option says -that the real purpose is to test as many of the changes made in the -program as possible, perhaps to find several independent problems so -that you can correct them all before the next attempt to compile. This -is why Emacs' `compile' command passes the `-k' flag by default. - - Usually when a command fails, if it has changed the target file at -all, the file is corrupted and cannot be used--or at least it is not -completely updated. Yet the file's timestamp says that it is now up to -date, so the next time `make' runs, it will not try to update that -file. The situation is just the same as when the command is killed by a -signal; *note Interrupts::.. So generally the right thing to do is to -delete the target file if the command fails after beginning to change -the file. `make' will do this if `.DELETE_ON_ERROR' appears as a -target. This is almost always what you want `make' to do, but it is -not historical practice; so for compatibility, you must explicitly -request it. - - -File: make.info, Node: Interrupts, Next: Recursion, Prev: Errors, Up: Commands - -Interrupting or Killing `make' -============================== - - If `make' gets a fatal signal while a command is executing, it may -delete the target file that the command was supposed to update. This is -done if the target file's last-modification time has changed since -`make' first checked it. - - The purpose of deleting the target is to make sure that it is remade -from scratch when `make' is next run. Why is this? Suppose you type -`Ctrl-c' while a compiler is running, and it has begun to write an -object file `foo.o'. The `Ctrl-c' kills the compiler, resulting in an -incomplete file whose last-modification time is newer than the source -file `foo.c'. But `make' also receives the `Ctrl-c' signal and deletes -this incomplete file. If `make' did not do this, the next invocation -of `make' would think that `foo.o' did not require updating--resulting -in a strange error message from the linker when it tries to link an -object file half of which is missing. - - You can prevent the deletion of a target file in this way by making -the special target `.PRECIOUS' depend on it. Before remaking a target, -`make' checks to see whether it appears on the dependencies of -`.PRECIOUS', and thereby decides whether the target should be deleted -if a signal happens. Some reasons why you might do this are that the -target is updated in some atomic fashion, or exists only to record a -modification-time (its contents do not matter), or must exist at all -times to prevent other sorts of trouble. - - -File: make.info, Node: Recursion, Next: Sequences, Prev: Interrupts, Up: Commands - -Recursive Use of `make' -======================= - - Recursive use of `make' means using `make' as a command in a -makefile. This technique is useful when you want separate makefiles for -various subsystems that compose a larger system. For example, suppose -you have a subdirectory `subdir' which has its own makefile, and you -would like the containing directory's makefile to run `make' on the -subdirectory. You can do it by writing this: - - subsystem: - cd subdir; $(MAKE) - -or, equivalently, this (*note Summary of Options: Options Summary.): - - subsystem: - $(MAKE) -C subdir - - You can write recursive `make' commands just by copying this example, -but there are many things to know about how they work and why, and about -how the sub-`make' relates to the top-level `make'. - -* Menu: - -* MAKE Variable:: The special effects of using `$(MAKE)'. -* Variables/Recursion:: How to communicate variables to a sub-`make'. -* Options/Recursion:: How to communicate options to a sub-`make'. -* -w Option:: How the `-w' or `--print-directory' option - helps debug use of recursive `make' commands. - - -File: make.info, Node: MAKE Variable, Next: Variables/Recursion, Up: Recursion - -How the `MAKE' Variable Works ------------------------------ - - Recursive `make' commands should always use the variable `MAKE', not -the explicit command name `make', as shown here: - - subsystem: - cd subdir; $(MAKE) - - The value of this variable is the file name with which `make' was -invoked. If this file name was `/bin/make', then the command executed -is `cd subdir; /bin/make'. If you use a special version of `make' to -run the top-level makefile, the same special version will be executed -for recursive invocations. - - As a special feature, using the variable `MAKE' in the commands of a -rule alters the effects of the `-t' (`--touch'), `-n' (`--just-print'), -or `-q' (`--question') option. Using the `MAKE' variable has the same -effect as using a `+' character at the beginning of the command line. -*Note Instead of Executing the Commands: Instead of Execution. - - Consider the command `make -t' in the above example. (The `-t' -option marks targets as up to date without actually running any -commands; see *Note Instead of Execution::.) Following the usual -definition of `-t', a `make -t' command in the example would create a -file named `subsystem' and do nothing else. What you really want it to -do is run `cd subdir; make -t'; but that would require executing the -command, and `-t' says not to execute commands. - - The special feature makes this do what you want: whenever a command -line of a rule contains the variable `MAKE', the flags `-t', `-n' and -`-q' do not apply to that line. Command lines containing `MAKE' are -executed normally despite the presence of a flag that causes most -commands not to be run. The usual `MAKEFLAGS' mechanism passes the -flags to the sub-`make' (*note Communicating Options to a Sub-`make': -Options/Recursion.), so your request to touch the files, or print the -commands, is propagated to the subsystem. - - -File: make.info, Node: Variables/Recursion, Next: Options/Recursion, Prev: MAKE Variable, Up: Recursion - -Communicating Variables to a Sub-`make' ---------------------------------------- - - Variable values of the top-level `make' can be passed to the -sub-`make' through the environment by explicit request. These -variables are defined in the sub-`make' as defaults, but do not -override what is specified in the makefile used by the sub-`make' -makefile unless you use the `-e' switch (*note Summary of Options: -Options Summary.). - - To pass down, or "export", a variable, `make' adds the variable and -its value to the environment for running each command. The sub-`make', -in turn, uses the environment to initialize its table of variable -values. *Note Variables from the Environment: Environment. - - Except by explicit request, `make' exports a variable only if it is -either defined in the environment initially or set on the command line, -and if its name consists only of letters, numbers, and underscores. -Some shells cannot cope with environment variable names consisting of -characters other than letters, numbers, and underscores. - - The special variables `SHELL' and `MAKEFLAGS' are always exported -(unless you unexport them). `MAKEFILES' is exported if you set it to -anything. - - `make' automatically passes down variable values that were defined -on the command line, by putting them in the `MAKEFLAGS' variable. -*Note Options/Recursion::. - - Variables are *not* normally passed down if they were created by -default by `make' (*note Variables Used by Implicit Rules: Implicit -Variables.). The sub-`make' will define these for itself. - - If you want to export specific variables to a sub-`make', use the -`export' directive, like this: - - export VARIABLE ... - -If you want to *prevent* a variable from being exported, use the -`unexport' directive, like this: - - unexport VARIABLE ... - -As a convenience, you can define a variable and export it at the same -time by doing: - - export VARIABLE = value - -has the same result as: - - VARIABLE = value - export VARIABLE - -and - - export VARIABLE := value - -has the same result as: - - VARIABLE := value - export VARIABLE - - Likewise, - - export VARIABLE += value - -is just like: - - VARIABLE += value - export VARIABLE - -*Note Appending More Text to Variables: Appending. - - You may notice that the `export' and `unexport' directives work in -`make' in the same way they work in the shell, `sh'. - - If you want all variables to be exported by default, you can use -`export' by itself: - - export - -This tells `make' that variables which are not explicitly mentioned in -an `export' or `unexport' directive should be exported. Any variable -given in an `unexport' directive will still *not* be exported. If you -use `export' by itself to export variables by default, variables whose -names contain characters other than alphanumerics and underscores will -not be exported unless specifically mentioned in an `export' directive. - - The behavior elicited by an `export' directive by itself was the -default in older versions of GNU `make'. If your makefiles depend on -this behavior and you want to be compatible with old versions of -`make', you can write a rule for the special target -`.EXPORT_ALL_VARIABLES' instead of using the `export' directive. This -will be ignored by old `make's, while the `export' directive will cause -a syntax error. - - Likewise, you can use `unexport' by itself to tell `make' *not* to -export variables by default. Since this is the default behavior, you -would only need to do this if `export' had been used by itself earlier -(in an included makefile, perhaps). You *cannot* use `export' and -`unexport' by themselves to have variables exported for some commands -and not for others. The last `export' or `unexport' directive that -appears by itself determines the behavior for the entire run of `make'. - - As a special feature, the variable `MAKELEVEL' is changed when it is -passed down from level to level. This variable's value is a string -which is the depth of the level as a decimal number. The value is `0' -for the top-level `make'; `1' for a sub-`make', `2' for a -sub-sub-`make', and so on. The incrementation happens when `make' sets -up the environment for a command. - - The main use of `MAKELEVEL' is to test it in a conditional directive -(*note Conditional Parts of Makefiles: Conditionals.); this way you can -write a makefile that behaves one way if run recursively and another -way if run directly by you. - - You can use the variable `MAKEFILES' to cause all sub-`make' -commands to use additional makefiles. The value of `MAKEFILES' is a -whitespace-separated list of file names. This variable, if defined in -the outer-level makefile, is passed down through the environment; then -it serves as a list of extra makefiles for the sub-`make' to read -before the usual or specified ones. *Note The Variable `MAKEFILES': -MAKEFILES Variable. - - -File: make.info, Node: Options/Recursion, Next: -w Option, Prev: Variables/Recursion, Up: Recursion - -Communicating Options to a Sub-`make' -------------------------------------- - - Flags such as `-s' and `-k' are passed automatically to the -sub-`make' through the variable `MAKEFLAGS'. This variable is set up -automatically by `make' to contain the flag letters that `make' -received. Thus, if you do `make -ks' then `MAKEFLAGS' gets the value -`ks'. - - As a consequence, every sub-`make' gets a value for `MAKEFLAGS' in -its environment. In response, it takes the flags from that value and -processes them as if they had been given as arguments. *Note Summary -of Options: Options Summary. - - Likewise variables defined on the command line are passed to the -sub-`make' through `MAKEFLAGS'. Words in the value of `MAKEFLAGS' that -contain `=', `make' treats as variable definitions just as if they -appeared on the command line. *Note Overriding Variables: Overriding. - - The options `-C', `-f', `-o', and `-W' are not put into `MAKEFLAGS'; -these options are not passed down. - - The `-j' option is a special case (*note Parallel Execution: -Parallel.). If you set it to some numeric value, `-j 1' is always put -into `MAKEFLAGS' instead of the value you specified. This is because if -the `-j' option were passed down to sub-`make's, you would get many -more jobs running in parallel than you asked for. If you give `-j' -with no numeric argument, meaning to run as many jobs as possible in -parallel, this is passed down, since multiple infinities are no more -than one. - - If you do not want to pass the other flags down, you must change the -value of `MAKEFLAGS', like this: - - MAKEFLAGS= - subsystem: - cd subdir; $(MAKE) - - or like this: - - subsystem: - cd subdir; $(MAKE) MAKEFLAGS= - - The command line variable definitions really appear in the variable -`MAKEOVERRIDES', and `MAKEFLAGS' contains a reference to this variable. -If you do want to pass flags down normally, but don't want to pass -down the command line variable definitions, you can reset -`MAKEOVERRIDES' to empty, like this: - - MAKEOVERRIDES = - -This is not usually useful to do. However, some systems have a small -fixed limit on the size of the environment, and putting so much -information in into the value of `MAKEFLAGS' can exceed it. If you see -the error message `Arg list too long', this may be the problem. (For -strict compliance with POSIX.2, changing `MAKEOVERRIDES' does not -affect `MAKEFLAGS' if the special target `.POSIX' appears in the -makefile. You probably do not care about this.) - - A similar variable `MFLAGS' exists also, for historical -compatibility. It has the same value as `MAKEFLAGS' except that it -does not contain the command line variable definitions, and it always -begins with a hyphen unless it is empty (`MAKEFLAGS' begins with a -hyphen only when it begins with an option that has no single-letter -version, such as `--warn-undefined-variables'). `MFLAGS' was -traditionally used explicitly in the recursive `make' command, like -this: - - subsystem: - cd subdir; $(MAKE) $(MFLAGS) - -but now `MAKEFLAGS' makes this usage redundant. If you want your -makefiles to be compatible with old `make' programs, use this -technique; it will work fine with more modern `make' versions too. - - The `MAKEFLAGS' variable can also be useful if you want to have -certain options, such as `-k' (*note Summary of Options: Options -Summary.), set each time you run `make'. You simply put a value for -`MAKEFLAGS' in your environment. You can also set `MAKEFLAGS' in a -makefile, to specify additional flags that should also be in effect for -that makefile. (Note that you cannot use `MFLAGS' this way. That -variable is set only for compatibility; `make' does not interpret a -value you set for it in any way.) - - When `make' interprets the value of `MAKEFLAGS' (either from the -environment or from a makefile), it first prepends a hyphen if the value -does not already begin with one. Then it chops the value into words -separated by blanks, and parses these words as if they were options -given on the command line (except that `-C', `-f', `-h', `-o', `-W', -and their long-named versions are ignored; and there is no error for an -invalid option). - - If you do put `MAKEFLAGS' in your environment, you should be sure not -to include any options that will drastically affect the actions of -`make' and undermine the purpose of makefiles and of `make' itself. -For instance, the `-t', `-n', and `-q' options, if put in one of these -variables, could have disastrous consequences and would certainly have -at least surprising and probably annoying effects. - - -File: make.info, Node: -w Option, Prev: Options/Recursion, Up: Recursion - -The `--print-directory' Option ------------------------------- - - If you use several levels of recursive `make' invocations, the `-w' -or `--print-directory' option can make the output a lot easier to -understand by showing each directory as `make' starts processing it and -as `make' finishes processing it. For example, if `make -w' is run in -the directory `/u/gnu/make', `make' will print a line of the form: - - make: Entering directory `/u/gnu/make'. - -before doing anything else, and a line of the form: - - make: Leaving directory `/u/gnu/make'. - -when processing is completed. - - Normally, you do not need to specify this option because `make' does -it for you: `-w' is turned on automatically when you use the `-C' -option, and in sub-`make's. `make' will not automatically turn on `-w' -if you also use `-s', which says to be silent, or if you use -`--no-print-directory' to explicitly disable it. - - -File: make.info, Node: Sequences, Next: Empty Commands, Prev: Recursion, Up: Commands - -Defining Canned Command Sequences -================================= - - When the same sequence of commands is useful in making various -targets, you can define it as a canned sequence with the `define' -directive, and refer to the canned sequence from the rules for those -targets. The canned sequence is actually a variable, so the name must -not conflict with other variable names. - - Here is an example of defining a canned sequence of commands: - - define run-yacc - yacc $(firstword $^) - mv y.tab.c $@ - endef - -Here `run-yacc' is the name of the variable being defined; `endef' -marks the end of the definition; the lines in between are the commands. -The `define' directive does not expand variable references and -function calls in the canned sequence; the `$' characters, parentheses, -variable names, and so on, all become part of the value of the variable -you are defining. *Note Defining Variables Verbatim: Defining, for a -complete explanation of `define'. - - The first command in this example runs Yacc on the first dependency -of whichever rule uses the canned sequence. The output file from Yacc -is always named `y.tab.c'. The second command moves the output to the -rule's target file name. - - To use the canned sequence, substitute the variable into the -commands of a rule. You can substitute it like any other variable -(*note Basics of Variable References: Reference.). Because variables -defined by `define' are recursively expanded variables, all the -variable references you wrote inside the `define' are expanded now. -For example: - - foo.c : foo.y - $(run-yacc) - -`foo.y' will be substituted for the variable `$^' when it occurs in -`run-yacc''s value, and `foo.c' for `$@'. - - This is a realistic example, but this particular one is not needed in -practice because `make' has an implicit rule to figure out these -commands based on the file names involved (*note Using Implicit Rules: -Implicit Rules.). - - In command execution, each line of a canned sequence is treated just -as if the line appeared on its own in the rule, preceded by a tab. In -particular, `make' invokes a separate subshell for each line. You can -use the special prefix characters that affect command lines (`@', `-', -and `+') on each line of a canned sequence. *Note Writing the Commands -in Rules: Commands. For example, using this canned sequence: - - define frobnicate - @echo "frobnicating target $@" - frob-step-1 $< -o $@-step-1 - frob-step-2 $@-step-1 -o $@ - endef - -`make' will not echo the first line, the `echo' command. But it *will* -echo the following two command lines. - - On the other hand, prefix characters on the command line that refers -to a canned sequence apply to every line in the sequence. So the rule: - - frob.out: frob.in - @$(frobnicate) - -does not echo *any* commands. (*Note Command Echoing: Echoing, for a -full explanation of `@'.) - - -File: make.info, Node: Empty Commands, Prev: Sequences, Up: Commands - -Using Empty Commands -==================== - - It is sometimes useful to define commands which do nothing. This is -done simply by giving a command that consists of nothing but -whitespace. For example: - - target: ; - -defines an empty command string for `target'. You could also use a -line beginning with a tab character to define an empty command string, -but this would be confusing because such a line looks empty. - - You may be wondering why you would want to define a command string -that does nothing. The only reason this is useful is to prevent a -target from getting implicit commands (from implicit rules or the -`.DEFAULT' special target; *note Implicit Rules::. and *note Defining -Last-Resort Default Rules: Last Resort.). - - You may be inclined to define empty command strings for targets that -are not actual files, but only exist so that their dependencies can be -remade. However, this is not the best way to do that, because the -dependencies may not be remade properly if the target file actually -does exist. *Note Phony Targets: Phony Targets, for a better way to do -this. - - -File: make.info, Node: Using Variables, Next: Conditionals, Prev: Commands, Up: Top - -How to Use Variables -******************** - - A "variable" is a name defined in a makefile to represent a string -of text, called the variable's "value". These values are substituted -by explicit request into targets, dependencies, commands, and other -parts of the makefile. (In some other versions of `make', variables -are called "macros".) - - Variables and functions in all parts of a makefile are expanded when -read, except for the shell commands in rules, the right-hand sides of -variable definitions using `=', and the bodies of variable definitions -using the `define' directive. - - Variables can represent lists of file names, options to pass to -compilers, programs to run, directories to look in for source files, -directories to write output in, or anything else you can imagine. - - A variable name may be any sequence of characters not containing `:', -`#', `=', or leading or trailing whitespace. However, variable names -containing characters other than letters, numbers, and underscores -should be avoided, as they may be given special meanings in the future, -and with some shells they cannot be passed through the environment to a -sub-`make' (*note Communicating Variables to a Sub-`make': -Variables/Recursion.). - - Variable names are case-sensitive. The names `foo', `FOO', and -`Foo' all refer to different variables. - - It is traditional to use upper case letters in variable names, but we -recommend using lower case letters for variable names that serve -internal purposes in the makefile, and reserving upper case for -parameters that control implicit rules or for parameters that the user -should override with command options (*note Overriding Variables: -Overriding.). - - A few variables have names that are a single punctuation character or -just a few characters. These are the "automatic variables", and they -have particular specialized uses. *Note Automatic Variables: Automatic. - -* Menu: - -* Reference:: How to use the value of a variable. -* Flavors:: Variables come in two flavors. -* Advanced:: Advanced features for referencing a variable. -* Values:: All the ways variables get their values. -* Setting:: How to set a variable in the makefile. -* Appending:: How to append more text to the old value - of a variable. -* Override Directive:: How to set a variable in the makefile even if - the user has set it with a command argument. -* Defining:: An alternate way to set a variable - to a verbatim string. -* Environment:: Variable values can come from the environment. -* Automatic:: Some special variables have predefined - meanings for use with implicit rules. - - -File: make.info, Node: Reference, Next: Flavors, Up: Using Variables - -Basics of Variable References -============================= - - To substitute a variable's value, write a dollar sign followed by -the name of the variable in parentheses or braces: either `$(foo)' or -`${foo}' is a valid reference to the variable `foo'. This special -significance of `$' is why you must write `$$' to have the effect of a -single dollar sign in a file name or command. - - Variable references can be used in any context: targets, -dependencies, commands, most directives, and new variable values. Here -is an example of a common case, where a variable holds the names of all -the object files in a program: - - objects = program.o foo.o utils.o - program : $(objects) - cc -o program $(objects) - - $(objects) : defs.h - - Variable references work by strict textual substitution. Thus, the -rule - - foo = c - prog.o : prog.$(foo) - $(foo)$(foo) -$(foo) prog.$(foo) - -could be used to compile a C program `prog.c'. Since spaces before the -variable value are ignored in variable assignments, the value of `foo' -is precisely `c'. (Don't actually write your makefiles this way!) - - A dollar sign followed by a character other than a dollar sign, -open-parenthesis or open-brace treats that single character as the -variable name. Thus, you could reference the variable `x' with `$x'. -However, this practice is strongly discouraged, except in the case of -the automatic variables (*note Automatic Variables: Automatic.). - - -File: make.info, Node: Flavors, Next: Advanced, Prev: Reference, Up: Using Variables - -The Two Flavors of Variables -============================ - - There are two ways that a variable in GNU `make' can have a value; -we call them the two "flavors" of variables. The two flavors are -distinguished in how they are defined and in what they do when expanded. - - The first flavor of variable is a "recursively expanded" variable. -Variables of this sort are defined by lines using `=' (*note Setting -Variables: Setting.) or by the `define' directive (*note Defining -Variables Verbatim: Defining.). The value you specify is installed -verbatim; if it contains references to other variables, these -references are expanded whenever this variable is substituted (in the -course of expanding some other string). When this happens, it is -called "recursive expansion". - - For example, - - foo = $(bar) - bar = $(ugh) - ugh = Huh? - - all:;echo $(foo) - -will echo `Huh?': `$(foo)' expands to `$(bar)' which expands to -`$(ugh)' which finally expands to `Huh?'. - - This flavor of variable is the only sort supported by other versions -of `make'. It has its advantages and its disadvantages. An advantage -(most would say) is that: - - CFLAGS = $(include_dirs) -O - include_dirs = -Ifoo -Ibar - -will do what was intended: when `CFLAGS' is expanded in a command, it -will expand to `-Ifoo -Ibar -O'. A major disadvantage is that you -cannot append something on the end of a variable, as in - - CFLAGS = $(CFLAGS) -O - -because it will cause an infinite loop in the variable expansion. -(Actually `make' detects the infinite loop and reports an error.) - - Another disadvantage is that any functions (*note Functions for -Transforming Text: Functions.) referenced in the definition will be -executed every time the variable is expanded. This makes `make' run -slower; worse, it causes the `wildcard' and `shell' functions to give -unpredictable results because you cannot easily control when they are -called, or even how many times. - - To avoid all the problems and inconveniences of recursively expanded -variables, there is another flavor: simply expanded variables. - - "Simply expanded variables" are defined by lines using `:=' (*note -Setting Variables: Setting.). The value of a simply expanded variable -is scanned once and for all, expanding any references to other -variables and functions, when the variable is defined. The actual -value of the simply expanded variable is the result of expanding the -text that you write. It does not contain any references to other -variables; it contains their values *as of the time this variable was -defined*. Therefore, - - x := foo - y := $(x) bar - x := later - -is equivalent to - - y := foo bar - x := later - - When a simply expanded variable is referenced, its value is -substituted verbatim. - - Here is a somewhat more complicated example, illustrating the use of -`:=' in conjunction with the `shell' function. (*Note The `shell' -Function: Shell Function.) This example also shows use of the variable -`MAKELEVEL', which is changed when it is passed down from level to -level. (*Note Communicating Variables to a Sub-`make': -Variables/Recursion, for information about `MAKELEVEL'.) - - ifeq (0,${MAKELEVEL}) - cur-dir := $(shell pwd) - whoami := $(shell whoami) - host-type := $(shell arch) - MAKE := ${MAKE} host-type=${host-type} whoami=${whoami} - endif - -An advantage of this use of `:=' is that a typical `descend into a -directory' command then looks like this: - - ${subdirs}: - ${MAKE} cur-dir=${cur-dir}/$@ -C $@ all - - Simply expanded variables generally make complicated makefile -programming more predictable because they work like variables in most -programming languages. They allow you to redefine a variable using its -own value (or its value processed in some way by one of the expansion -functions) and to use the expansion functions much more efficiently -(*note Functions for Transforming Text: Functions.). - - You can also use them to introduce controlled leading whitespace into -variable values. Leading whitespace characters are discarded from your -input before substitution of variable references and function calls; -this means you can include leading spaces in a variable value by -protecting them with variable references, like this: - - nullstring := - space := $(nullstring) # end of the line - -Here the value of the variable `space' is precisely one space. The -comment `# end of the line' is included here just for clarity. Since -trailing space characters are *not* stripped from variable values, just -a space at the end of the line would have the same effect (but be -rather hard to read). If you put whitespace at the end of a variable -value, it is a good idea to put a comment like that at the end of the -line to make your intent clear. Conversely, if you do *not* want any -whitespace characters at the end of your variable value, you must -remember not to put a random comment on the end of the line after some -whitespace, such as this: - - dir := /foo/bar # directory to put the frobs in - -Here the value of the variable `dir' is `/foo/bar ' (with four -trailing spaces), which was probably not the intention. (Imagine -something like `$(dir)/file' with this definition!) - - -File: make.info, Node: Advanced, Next: Values, Prev: Flavors, Up: Using Variables - -Advanced Features for Reference to Variables -============================================ - - This section describes some advanced features you can use to -reference variables in more flexible ways. - -* Menu: - -* Substitution Refs:: Referencing a variable with - substitutions on the value. -* Computed Names:: Computing the name of the variable to refer to. - - -File: make.info, Node: Substitution Refs, Next: Computed Names, Up: Advanced - -Substitution References ------------------------ - - A "substitution reference" substitutes the value of a variable with -alterations that you specify. It has the form `$(VAR:A=B)' (or -`${VAR:A=B}') and its meaning is to take the value of the variable VAR, -replace every A at the end of a word with B in that value, and -substitute the resulting string. - - When we say "at the end of a word", we mean that A must appear -either followed by whitespace or at the end of the value in order to be -replaced; other occurrences of A in the value are unaltered. For -example: - - foo := a.o b.o c.o - bar := $(foo:.o=.c) - -sets `bar' to `a.c b.c c.c'. *Note Setting Variables: Setting. - - A substitution reference is actually an abbreviation for use of the -`patsubst' expansion function (*note Functions for String Substitution -and Analysis: Text Functions.). We provide substitution references as -well as `patsubst' for compatibility with other implementations of -`make'. - - Another type of substitution reference lets you use the full power of -the `patsubst' function. It has the same form `$(VAR:A=B)' described -above, except that now A must contain a single `%' character. This -case is equivalent to `$(patsubst A,B,$(VAR))'. *Note Functions for -String Substitution and Analysis: Text Functions, for a description of -the `patsubst' function. - -For example: - - foo := a.o b.o c.o - bar := $(foo:%.o=%.c) - -sets `bar' to `a.c b.c c.c'. - - -File: make.info, Node: Computed Names, Prev: Substitution Refs, Up: Advanced - -Computed Variable Names ------------------------ - - Computed variable names are a complicated concept needed only for -sophisticated makefile programming. For most purposes you need not -consider them, except to know that making a variable with a dollar sign -in its name might have strange results. However, if you are the type -that wants to understand everything, or you are actually interested in -what they do, read on. - - Variables may be referenced inside the name of a variable. This is -called a "computed variable name" or a "nested variable reference". -For example, - - x = y - y = z - a := $($(x)) - -defines `a' as `z': the `$(x)' inside `$($(x))' expands to `y', so -`$($(x))' expands to `$(y)' which in turn expands to `z'. Here the -name of the variable to reference is not stated explicitly; it is -computed by expansion of `$(x)'. The reference `$(x)' here is nested -within the outer variable reference. - - The previous example shows two levels of nesting, but any number of -levels is possible. For example, here are three levels: - - x = y - y = z - z = u - a := $($($(x))) - -Here the innermost `$(x)' expands to `y', so `$($(x))' expands to -`$(y)' which in turn expands to `z'; now we have `$(z)', which becomes -`u'. - - References to recursively-expanded variables within a variable name -are reexpanded in the usual fashion. For example: - - x = $(y) - y = z - z = Hello - a := $($(x)) - -defines `a' as `Hello': `$($(x))' becomes `$($(y))' which becomes -`$(z)' which becomes `Hello'. - - Nested variable references can also contain modified references and -function invocations (*note Functions for Transforming Text: -Functions.), just like any other reference. For example, using the -`subst' function (*note Functions for String Substitution and Analysis: -Text Functions.): - - x = variable1 - variable2 := Hello - y = $(subst 1,2,$(x)) - z = y - a := $($($(z))) - -eventually defines `a' as `Hello'. It is doubtful that anyone would -ever want to write a nested reference as convoluted as this one, but it -works: `$($($(z)))' expands to `$($(y))' which becomes `$($(subst -1,2,$(x)))'. This gets the value `variable1' from `x' and changes it -by substitution to `variable2', so that the entire string becomes -`$(variable2)', a simple variable reference whose value is `Hello'. - - A computed variable name need not consist entirely of a single -variable reference. It can contain several variable references, as -well as some invariant text. For example, - - a_dirs := dira dirb - 1_dirs := dir1 dir2 - - a_files := filea fileb - 1_files := file1 file2 - - ifeq "$(use_a)" "yes" - a1 := a - else - a1 := 1 - endif - - ifeq "$(use_dirs)" "yes" - df := dirs - else - df := files - endif - - dirs := $($(a1)_$(df)) - -will give `dirs' the same value as `a_dirs', `1_dirs', `a_files' or -`1_files' depending on the settings of `use_a' and `use_dirs'. - - Computed variable names can also be used in substitution references: - - a_objects := a.o b.o c.o - 1_objects := 1.o 2.o 3.o - - sources := $($(a1)_objects:.o=.c) - -defines `sources' as either `a.c b.c c.c' or `1.c 2.c 3.c', depending -on the value of `a1'. - - The only restriction on this sort of use of nested variable -references is that they cannot specify part of the name of a function -to be called. This is because the test for a recognized function name -is done before the expansion of nested references. For example, - - ifdef do_sort - func := sort - else - func := strip - endif - - bar := a d b g q c - - foo := $($(func) $(bar)) - -attempts to give `foo' the value of the variable `sort a d b g q c' or -`strip a d b g q c', rather than giving `a d b g q c' as the argument -to either the `sort' or the `strip' function. This restriction could -be removed in the future if that change is shown to be a good idea. - - You can also use computed variable names in the left-hand side of a -variable assignment, or in a `define' directive, as in: - - dir = foo - $(dir)_sources := $(wildcard $(dir)/*.c) - define $(dir)_print - lpr $($(dir)_sources) - endef - -This example defines the variables `dir', `foo_sources', and -`foo_print'. - - Note that "nested variable references" are quite different from -"recursively expanded variables" (*note The Two Flavors of Variables: -Flavors.), though both are used together in complex ways when doing -makefile programming. - - -File: make.info, Node: Values, Next: Setting, Prev: Advanced, Up: Using Variables - -How Variables Get Their Values -============================== - - Variables can get values in several different ways: - - * You can specify an overriding value when you run `make'. *Note - Overriding Variables: Overriding. - - * You can specify a value in the makefile, either with an assignment - (*note Setting Variables: Setting.) or with a verbatim definition - (*note Defining Variables Verbatim: Defining.). - - * Variables in the environment become `make' variables. *Note - Variables from the Environment: Environment. - - * Several "automatic" variables are given new values for each rule. - Each of these has a single conventional use. *Note Automatic - Variables: Automatic. - - * Several variables have constant initial values. *Note Variables - Used by Implicit Rules: Implicit Variables. - - -File: make.info, Node: Setting, Next: Appending, Prev: Values, Up: Using Variables - -Setting Variables -================= - - To set a variable from the makefile, write a line starting with the -variable name followed by `=' or `:='. Whatever follows the `=' or -`:=' on the line becomes the value. For example, - - objects = main.o foo.o bar.o utils.o - -defines a variable named `objects'. Whitespace around the variable -name and immediately after the `=' is ignored. - - Variables defined with `=' are "recursively expanded" variables. -Variables defined with `:=' are "simply expanded" variables; these -definitions can contain variable references which will be expanded -before the definition is made. *Note The Two Flavors of Variables: -Flavors. - - The variable name may contain function and variable references, which -are expanded when the line is read to find the actual variable name to -use. - - There is no limit on the length of the value of a variable except the -amount of swapping space on the computer. When a variable definition is -long, it is a good idea to break it into several lines by inserting -backslash-newline at convenient places in the definition. This will not -affect the functioning of `make', but it will make the makefile easier -to read. - - Most variable names are considered to have the empty string as a -value if you have never set them. Several variables have built-in -initial values that are not empty, but you can set them in the usual -ways (*note Variables Used by Implicit Rules: Implicit Variables.). -Several special variables are set automatically to a new value for each -rule; these are called the "automatic" variables (*note Automatic -Variables: Automatic.). - - -File: make.info, Node: Appending, Next: Override Directive, Prev: Setting, Up: Using Variables - -Appending More Text to Variables -================================ - - Often it is useful to add more text to the value of a variable -already defined. You do this with a line containing `+=', like this: - - objects += another.o - -This takes the value of the variable `objects', and adds the text -`another.o' to it (preceded by a single space). Thus: - - objects = main.o foo.o bar.o utils.o - objects += another.o - -sets `objects' to `main.o foo.o bar.o utils.o another.o'. - - Using `+=' is similar to: - - objects = main.o foo.o bar.o utils.o - objects := $(objects) another.o - -but differs in ways that become important when you use more complex -values. - - When the variable in question has not been defined before, `+=' acts -just like normal `=': it defines a recursively-expanded variable. -However, when there *is* a previous definition, exactly what `+=' does -depends on what flavor of variable you defined originally. *Note The -Two Flavors of Variables: Flavors, for an explanation of the two -flavors of variables. - - When you add to a variable's value with `+=', `make' acts -essentially as if you had included the extra text in the initial -definition of the variable. If you defined it first with `:=', making -it a simply-expanded variable, `+=' adds to that simply-expanded -definition, and expands the new text before appending it to the old -value just as `:=' does (*note Setting Variables: Setting., for a full -explanation of `:='). In fact, - - variable := value - variable += more - -is exactly equivalent to: - - variable := value - variable := $(variable) more - - On the other hand, when you use `+=' with a variable that you defined -first to be recursively-expanded using plain `=', `make' does something -a bit different. Recall that when you define a recursively-expanded -variable, `make' does not expand the value you set for variable and -function references immediately. Instead it stores the text verbatim, -and saves these variable and function references to be expanded later, -when you refer to the new variable (*note The Two Flavors of Variables: -Flavors.). When you use `+=' on a recursively-expanded variable, it is -this unexpanded text to which `make' appends the new text you specify. - - variable = value - variable += more - -is roughly equivalent to: - - temp = value - variable = $(temp) more - -except that of course it never defines a variable called `temp'. The -importance of this comes when the variable's old value contains -variable references. Take this common example: - - CFLAGS = $(includes) -O - ... - CFLAGS += -pg # enable profiling - -The first line defines the `CFLAGS' variable with a reference to another -variable, `includes'. (`CFLAGS' is used by the rules for C -compilation; *note Catalogue of Implicit Rules: Catalogue of Rules..) -Using `=' for the definition makes `CFLAGS' a recursively-expanded -variable, meaning `$(includes) -O' is *not* expanded when `make' -processes the definition of `CFLAGS'. Thus, `includes' need not be -defined yet for its value to take effect. It only has to be defined -before any reference to `CFLAGS'. If we tried to append to the value -of `CFLAGS' without using `+=', we might do it like this: - - CFLAGS := $(CFLAGS) -pg # enable profiling - -This is pretty close, but not quite what we want. Using `:=' redefines -`CFLAGS' as a simply-expanded variable; this means `make' expands the -text `$(CFLAGS) -pg' before setting the variable. If `includes' is not -yet defined, we get ` -O -pg', and a later definition of `includes' -will have no effect. Conversely, by using `+=' we set `CFLAGS' to the -*unexpanded* value `$(includes) -O -pg'. Thus we preserve the -reference to `includes', so if that variable gets defined at any later -point, a reference like `$(CFLAGS)' still uses its value. - diff --git a/buildtools/windows/source/make/make.info-4 b/buildtools/windows/source/make/make.info-4 deleted file mode 100644 index 15a1d75dcbd..00000000000 --- a/buildtools/windows/source/make/make.info-4 +++ /dev/null @@ -1,1296 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: make.info, Node: Override Directive, Next: Defining, Prev: Appending, Up: Using Variables - -The `override' Directive -======================== - - If a variable has been set with a command argument (*note Overriding -Variables: Overriding.), then ordinary assignments in the makefile are -ignored. If you want to set the variable in the makefile even though -it was set with a command argument, you can use an `override' -directive, which is a line that looks like this: - - override VARIABLE = VALUE - -or - - override VARIABLE := VALUE - - To append more text to a variable defined on the command line, use: - - override VARIABLE += MORE TEXT - -*Note Appending More Text to Variables: Appending. - - The `override' directive was not invented for escalation in the war -between makefiles and command arguments. It was invented so you can -alter and add to values that the user specifies with command arguments. - - For example, suppose you always want the `-g' switch when you run the -C compiler, but you would like to allow the user to specify the other -switches with a command argument just as usual. You could use this -`override' directive: - - override CFLAGS += -g - - You can also use `override' directives with `define' directives. -This is done as you might expect: - - override define foo - bar - endef - -*Note Defining Variables Verbatim: Defining. - - -File: make.info, Node: Defining, Next: Environment, Prev: Override Directive, Up: Using Variables - -Defining Variables Verbatim -=========================== - -Another way to set the value of a variable is to use the `define' -directive. This directive has an unusual syntax which allows newline -characters to be included in the value, which is convenient for defining -canned sequences of commands (*note Defining Canned Command Sequences: -Sequences.). - - The `define' directive is followed on the same line by the name of -the variable and nothing more. The value to give the variable appears -on the following lines. The end of the value is marked by a line -containing just the word `endef'. Aside from this difference in -syntax, `define' works just like `=': it creates a recursively-expanded -variable (*note The Two Flavors of Variables: Flavors.). The variable -name may contain function and variable references, which are expanded -when the directive is read to find the actual variable name to use. - - define two-lines - echo foo - echo $(bar) - endef - - The value in an ordinary assignment cannot contain a newline; but the -newlines that separate the lines of the value in a `define' become part -of the variable's value (except for the final newline which precedes -the `endef' and is not considered part of the value). - - The previous example is functionally equivalent to this: - - two-lines = echo foo; echo $(bar) - -since two commands separated by semicolon behave much like two separate -shell commands. However, note that using two separate lines means -`make' will invoke the shell twice, running an independent subshell for -each line. *Note Command Execution: Execution. - - If you want variable definitions made with `define' to take -precedence over command-line variable definitions, you can use the -`override' directive together with `define': - - override define two-lines - foo - $(bar) - endef - -*Note The `override' Directive: Override Directive. - - -File: make.info, Node: Environment, Prev: Defining, Up: Using Variables - -Variables from the Environment -============================== - - Variables in `make' can come from the environment in which `make' is -run. Every environment variable that `make' sees when it starts up is -transformed into a `make' variable with the same name and value. But -an explicit assignment in the makefile, or with a command argument, -overrides the environment. (If the `-e' flag is specified, then values -from the environment override assignments in the makefile. *Note -Summary of Options: Options Summary. But this is not recommended -practice.) - - Thus, by setting the variable `CFLAGS' in your environment, you can -cause all C compilations in most makefiles to use the compiler switches -you prefer. This is safe for variables with standard or conventional -meanings because you know that no makefile will use them for other -things. (But this is not totally reliable; some makefiles set `CFLAGS' -explicitly and therefore are not affected by the value in the -environment.) - - When `make' is invoked recursively, variables defined in the outer -invocation can be passed to inner invocations through the environment -(*note Recursive Use of `make': Recursion.). By default, only -variables that came from the environment or the command line are passed -to recursive invocations. You can use the `export' directive to pass -other variables. *Note Communicating Variables to a Sub-`make': -Variables/Recursion, for full details. - - Other use of variables from the environment is not recommended. It -is not wise for makefiles to depend for their functioning on -environment variables set up outside their control, since this would -cause different users to get different results from the same makefile. -This is against the whole purpose of most makefiles. - - Such problems would be especially likely with the variable `SHELL', -which is normally present in the environment to specify the user's -choice of interactive shell. It would be very undesirable for this -choice to affect `make'. So `make' ignores the environment value of -`SHELL'. - - -File: make.info, Node: Conditionals, Next: Functions, Prev: Using Variables, Up: Top - -Conditional Parts of Makefiles -****************************** - - A "conditional" causes part of a makefile to be obeyed or ignored -depending on the values of variables. Conditionals can compare the -value of one variable to another, or the value of a variable to a -constant string. Conditionals control what `make' actually "sees" in -the makefile, so they *cannot* be used to control shell commands at the -time of execution. - -* Menu: - -* Conditional Example:: Example of a conditional -* Conditional Syntax:: The syntax of conditionals. -* Testing Flags:: Conditionals that test flags. - - -File: make.info, Node: Conditional Example, Next: Conditional Syntax, Up: Conditionals - -Example of a Conditional -======================== - - The following example of a conditional tells `make' to use one set -of libraries if the `CC' variable is `gcc', and a different set of -libraries otherwise. It works by controlling which of two command -lines will be used as the command for a rule. The result is that -`CC=gcc' as an argument to `make' changes not only which compiler is -used but also which libraries are linked. - - libs_for_gcc = -lgnu - normal_libs = - - foo: $(objects) - ifeq ($(CC),gcc) - $(CC) -o foo $(objects) $(libs_for_gcc) - else - $(CC) -o foo $(objects) $(normal_libs) - endif - - This conditional uses three directives: one `ifeq', one `else' and -one `endif'. - - The `ifeq' directive begins the conditional, and specifies the -condition. It contains two arguments, separated by a comma and -surrounded by parentheses. Variable substitution is performed on both -arguments and then they are compared. The lines of the makefile -following the `ifeq' are obeyed if the two arguments match; otherwise -they are ignored. - - The `else' directive causes the following lines to be obeyed if the -previous conditional failed. In the example above, this means that the -second alternative linking command is used whenever the first -alternative is not used. It is optional to have an `else' in a -conditional. - - The `endif' directive ends the conditional. Every conditional must -end with an `endif'. Unconditional makefile text follows. - - As this example illustrates, conditionals work at the textual level: -the lines of the conditional are treated as part of the makefile, or -ignored, according to the condition. This is why the larger syntactic -units of the makefile, such as rules, may cross the beginning or the -end of the conditional. - - When the variable `CC' has the value `gcc', the above example has -this effect: - - foo: $(objects) - $(CC) -o foo $(objects) $(libs_for_gcc) - -When the variable `CC' has any other value, the effect is this: - - foo: $(objects) - $(CC) -o foo $(objects) $(normal_libs) - - Equivalent results can be obtained in another way by -conditionalizing a variable assignment and then using the variable -unconditionally: - - libs_for_gcc = -lgnu - normal_libs = - - ifeq ($(CC),gcc) - libs=$(libs_for_gcc) - else - libs=$(normal_libs) - endif - - foo: $(objects) - $(CC) -o foo $(objects) $(libs) - - -File: make.info, Node: Conditional Syntax, Next: Testing Flags, Prev: Conditional Example, Up: Conditionals - -Syntax of Conditionals -====================== - - The syntax of a simple conditional with no `else' is as follows: - - CONDITIONAL-DIRECTIVE - TEXT-IF-TRUE - endif - -The TEXT-IF-TRUE may be any lines of text, to be considered as part of -the makefile if the condition is true. If the condition is false, no -text is used instead. - - The syntax of a complex conditional is as follows: - - CONDITIONAL-DIRECTIVE - TEXT-IF-TRUE - else - TEXT-IF-FALSE - endif - -If the condition is true, TEXT-IF-TRUE is used; otherwise, -TEXT-IF-FALSE is used instead. The TEXT-IF-FALSE can be any number of -lines of text. - - The syntax of the CONDITIONAL-DIRECTIVE is the same whether the -conditional is simple or complex. There are four different directives -that test different conditions. Here is a table of them: - -`ifeq (ARG1, ARG2)' -`ifeq 'ARG1' 'ARG2'' -`ifeq "ARG1" "ARG2"' -`ifeq "ARG1" 'ARG2'' -`ifeq 'ARG1' "ARG2"' - Expand all variable references in ARG1 and ARG2 and compare them. - If they are identical, the TEXT-IF-TRUE is effective; otherwise, - the TEXT-IF-FALSE, if any, is effective. - - Often you want to test if a variable has a non-empty value. When - the value results from complex expansions of variables and - functions, expansions you would consider empty may actually - contain whitespace characters and thus are not seen as empty. - However, you can use the `strip' function (*note Text - Functions::.) to avoid interpreting whitespace as a non-empty - value. For example: - - ifeq ($(strip $(foo)),) - TEXT-IF-EMPTY - endif - - will evaluate TEXT-IF-EMPTY even if the expansion of `$(foo)' - contains whitespace characters. - -`ifneq (ARG1, ARG2)' -`ifneq 'ARG1' 'ARG2'' -`ifneq "ARG1" "ARG2"' -`ifneq "ARG1" 'ARG2'' -`ifneq 'ARG1' "ARG2"' - Expand all variable references in ARG1 and ARG2 and compare them. - If they are different, the TEXT-IF-TRUE is effective; otherwise, - the TEXT-IF-FALSE, if any, is effective. - -`ifdef VARIABLE-NAME' - If the variable VARIABLE-NAME has a non-empty value, the - TEXT-IF-TRUE is effective; otherwise, the TEXT-IF-FALSE, if any, - is effective. Variables that have never been defined have an - empty value. - - Note that `ifdef' only tests whether a variable has a value. It - does not expand the variable to see if that value is nonempty. - Consequently, tests using `ifdef' return true for all definitions - except those like `foo ='. To test for an empty value, use - `ifeq ($(foo),)'. For example, - - bar = - foo = $(bar) - ifdef foo - frobozz = yes - else - frobozz = no - endif - - sets `frobozz' to `yes', while: - - foo = - ifdef foo - frobozz = yes - else - frobozz = no - endif - - sets `frobozz' to `no'. - -`ifndef VARIABLE-NAME' - If the variable VARIABLE-NAME has an empty value, the TEXT-IF-TRUE - is effective; otherwise, the TEXT-IF-FALSE, if any, is effective. - - Extra spaces are allowed and ignored at the beginning of the -conditional directive line, but a tab is not allowed. (If the line -begins with a tab, it will be considered a command for a rule.) Aside -from this, extra spaces or tabs may be inserted with no effect anywhere -except within the directive name or within an argument. A comment -starting with `#' may appear at the end of the line. - - The other two directives that play a part in a conditional are `else' -and `endif'. Each of these directives is written as one word, with no -arguments. Extra spaces are allowed and ignored at the beginning of the -line, and spaces or tabs at the end. A comment starting with `#' may -appear at the end of the line. - - Conditionals affect which lines of the makefile `make' uses. If the -condition is true, `make' reads the lines of the TEXT-IF-TRUE as part -of the makefile; if the condition is false, `make' ignores those lines -completely. It follows that syntactic units of the makefile, such as -rules, may safely be split across the beginning or the end of the -conditional. - - `make' evaluates conditionals when it reads a makefile. -Consequently, you cannot use automatic variables in the tests of -conditionals because they are not defined until commands are run (*note -Automatic Variables: Automatic.). - - To prevent intolerable confusion, it is not permitted to start a -conditional in one makefile and end it in another. However, you may -write an `include' directive within a conditional, provided you do not -attempt to terminate the conditional inside the included file. - - -File: make.info, Node: Testing Flags, Prev: Conditional Syntax, Up: Conditionals - -Conditionals that Test Flags -============================ - - You can write a conditional that tests `make' command flags such as -`-t' by using the variable `MAKEFLAGS' together with the `findstring' -function (*note Functions for String Substitution and Analysis: Text -Functions.). This is useful when `touch' is not enough to make a file -appear up to date. - - The `findstring' function determines whether one string appears as a -substring of another. If you want to test for the `-t' flag, use `t' -as the first string and the value of `MAKEFLAGS' as the other. - - For example, here is how to arrange to use `ranlib -t' to finish -marking an archive file up to date: - - archive.a: ... - ifneq (,$(findstring t,$(MAKEFLAGS))) - +touch archive.a - +ranlib -t archive.a - else - ranlib archive.a - endif - -The `+' prefix marks those command lines as "recursive" so that they -will be executed despite use of the `-t' flag. *Note Recursive Use of -`make': Recursion. - - -File: make.info, Node: Functions, Next: Running, Prev: Conditionals, Up: Top - -Functions for Transforming Text -******************************* - - "Functions" allow you to do text processing in the makefile to -compute the files to operate on or the commands to use. You use a -function in a "function call", where you give the name of the function -and some text (the "arguments") for the function to operate on. The -result of the function's processing is substituted into the makefile at -the point of the call, just as a variable might be substituted. - -* Menu: - -* Syntax of Functions:: How to write a function call. -* Text Functions:: General-purpose text manipulation functions. -* Filename Functions:: Functions for manipulating file names. -* Foreach Function:: Repeat some text with controlled variation. -* Origin Function:: Find where a variable got its value. -* Shell Function:: Substitute the output of a shell command. - - -File: make.info, Node: Syntax of Functions, Next: Text Functions, Up: Functions - -Function Call Syntax -==================== - - A function call resembles a variable reference. It looks like this: - - $(FUNCTION ARGUMENTS) - -or like this: - - ${FUNCTION ARGUMENTS} - - Here FUNCTION is a function name; one of a short list of names that -are part of `make'. There is no provision for defining new functions. - - The ARGUMENTS are the arguments of the function. They are separated -from the function name by one or more spaces or tabs, and if there is -more than one argument, then they are separated by commas. Such -whitespace and commas are not part of an argument's value. The -delimiters which you use to surround the function call, whether -parentheses or braces, can appear in an argument only in matching pairs; -the other kind of delimiters may appear singly. If the arguments -themselves contain other function calls or variable references, it is -wisest to use the same kind of delimiters for all the references; write -`$(subst a,b,$(x))', not `$(subst a,b,${x})'. This is because it is -clearer, and because only one type of delimiter is matched to find the -end of the reference. - - The text written for each argument is processed by substitution of -variables and function calls to produce the argument value, which is -the text on which the function acts. The substitution is done in the -order in which the arguments appear. - - Commas and unmatched parentheses or braces cannot appear in the text -of an argument as written; leading spaces cannot appear in the text of -the first argument as written. These characters can be put into the -argument value by variable substitution. First define variables -`comma' and `space' whose values are isolated comma and space -characters, then substitute these variables where such characters are -wanted, like this: - - comma:= , - empty:= - space:= $(empty) $(empty) - foo:= a b c - bar:= $(subst $(space),$(comma),$(foo)) - # bar is now `a,b,c'. - -Here the `subst' function replaces each space with a comma, through the -value of `foo', and substitutes the result. - - -File: make.info, Node: Text Functions, Next: Filename Functions, Prev: Syntax of Functions, Up: Functions - -Functions for String Substitution and Analysis -============================================== - - Here are some functions that operate on strings: - -`$(subst FROM,TO,TEXT)' - Performs a textual replacement on the text TEXT: each occurrence - of FROM is replaced by TO. The result is substituted for the - function call. For example, - - $(subst ee,EE,feet on the street) - - substitutes the string `fEEt on the strEEt'. - -`$(patsubst PATTERN,REPLACEMENT,TEXT)' - Finds whitespace-separated words in TEXT that match PATTERN and - replaces them with REPLACEMENT. Here PATTERN may contain a `%' - which acts as a wildcard, matching any number of any characters - within a word. If REPLACEMENT also contains a `%', the `%' is - replaced by the text that matched the `%' in PATTERN. - - `%' characters in `patsubst' function invocations can be quoted - with preceding backslashes (`\'). Backslashes that would - otherwise quote `%' characters can be quoted with more backslashes. - Backslashes that quote `%' characters or other backslashes are - removed from the pattern before it is compared file names or has a - stem substituted into it. Backslashes that are not in danger of - quoting `%' characters go unmolested. For example, the pattern - `the\%weird\\%pattern\\' has `the%weird\' preceding the operative - `%' character, and `pattern\\' following it. The final two - backslashes are left alone because they cannot affect any `%' - character. - - Whitespace between words is folded into single space characters; - leading and trailing whitespace is discarded. - - For example, - - $(patsubst %.c,%.o,x.c.c bar.c) - - produces the value `x.c.o bar.o'. - - Substitution references (*note Substitution References: - Substitution Refs.) are a simpler way to get the effect of the - `patsubst' function: - - $(VAR:PATTERN=REPLACEMENT) - - is equivalent to - - $(patsubst PATTERN,REPLACEMENT,$(VAR)) - - The second shorthand simplifies one of the most common uses of - `patsubst': replacing the suffix at the end of file names. - - $(VAR:SUFFIX=REPLACEMENT) - - is equivalent to - - $(patsubst %SUFFIX,%REPLACEMENT,$(VAR)) - - For example, you might have a list of object files: - - objects = foo.o bar.o baz.o - - To get the list of corresponding source files, you could simply - write: - - $(objects:.o=.c) - - instead of using the general form: - - $(patsubst %.o,%.c,$(objects)) - -`$(strip STRING)' - Removes leading and trailing whitespace from STRING and replaces - each internal sequence of one or more whitespace characters with a - single space. Thus, `$(strip a b c )' results in `a b c'. - - The function `strip' can be very useful when used in conjunction - with conditionals. When comparing something with the empty string - `' using `ifeq' or `ifneq', you usually want a string of just - whitespace to match the empty string (*note Conditionals::.). - - Thus, the following may fail to have the desired results: - - .PHONY: all - ifneq "$(needs_made)" "" - all: $(needs_made) - else - all:;@echo 'Nothing to make!' - endif - - Replacing the variable reference `$(needs_made)' with the function - call `$(strip $(needs_made))' in the `ifneq' directive would make - it more robust. - -`$(findstring FIND,IN)' - Searches IN for an occurrence of FIND. If it occurs, the value is - FIND; otherwise, the value is empty. You can use this function in - a conditional to test for the presence of a specific substring in - a given string. Thus, the two examples, - - $(findstring a,a b c) - $(findstring a,b c) - - produce the values `a' and `' (the empty string), respectively. - *Note Testing Flags::, for a practical application of `findstring'. - -`$(filter PATTERN...,TEXT)' - Removes all whitespace-separated words in TEXT that do *not* match - any of the PATTERN words, returning only matching words. The - patterns are written using `%', just like the patterns used in the - `patsubst' function above. - - The `filter' function can be used to separate out different types - of strings (such as file names) in a variable. For example: - - sources := foo.c bar.c baz.s ugh.h - foo: $(sources) - cc $(filter %.c %.s,$(sources)) -o foo - - says that `foo' depends of `foo.c', `bar.c', `baz.s' and `ugh.h' - but only `foo.c', `bar.c' and `baz.s' should be specified in the - command to the compiler. - -`$(filter-out PATTERN...,TEXT)' - Removes all whitespace-separated words in TEXT that *do* match the - PATTERN words, returning only the words that *do not* match. This - is the exact opposite of the `filter' function. - - For example, given: - - objects=main1.o foo.o main2.o bar.o - mains=main1.o main2.o - - the following generates a list which contains all the object files - not in `mains': - - $(filter-out $(mains),$(objects)) - -`$(sort LIST)' - Sorts the words of LIST in lexical order, removing duplicate - words. The output is a list of words separated by single spaces. - Thus, - - $(sort foo bar lose) - - returns the value `bar foo lose'. - - Incidentally, since `sort' removes duplicate words, you can use it - for this purpose even if you don't care about the sort order. - - Here is a realistic example of the use of `subst' and `patsubst'. -Suppose that a makefile uses the `VPATH' variable to specify a list of -directories that `make' should search for dependency files (*note -`VPATH' Search Path for All Dependencies: General Search.). This -example shows how to tell the C compiler to search for header files in -the same list of directories. - - The value of `VPATH' is a list of directories separated by colons, -such as `src:../headers'. First, the `subst' function is used to -change the colons to spaces: - - $(subst :, ,$(VPATH)) - -This produces `src ../headers'. Then `patsubst' is used to turn each -directory name into a `-I' flag. These can be added to the value of -the variable `CFLAGS', which is passed automatically to the C compiler, -like this: - - override CFLAGS += $(patsubst %,-I%,$(subst :, ,$(VPATH))) - -The effect is to append the text `-Isrc -I../headers' to the previously -given value of `CFLAGS'. The `override' directive is used so that the -new value is assigned even if the previous value of `CFLAGS' was -specified with a command argument (*note The `override' Directive: -Override Directive.). - - -File: make.info, Node: Filename Functions, Next: Foreach Function, Prev: Text Functions, Up: Functions - -Functions for File Names -======================== - - Several of the built-in expansion functions relate specifically to -taking apart file names or lists of file names. - - Each of the following functions performs a specific transformation -on a file name. The argument of the function is regarded as a series -of file names, separated by whitespace. (Leading and trailing -whitespace is ignored.) Each file name in the series is transformed in -the same way and the results are concatenated with single spaces -between them. - -`$(dir NAMES...)' - Extracts the directory-part of each file name in NAMES. The - directory-part of the file name is everything up through (and - including) the last slash in it. If the file name contains no - slash, the directory part is the string `./'. For example, - - $(dir src/foo.c hacks) - - produces the result `src/ ./'. - -`$(notdir NAMES...)' - Extracts all but the directory-part of each file name in NAMES. - If the file name contains no slash, it is left unchanged. - Otherwise, everything through the last slash is removed from it. - - A file name that ends with a slash becomes an empty string. This - is unfortunate, because it means that the result does not always - have the same number of whitespace-separated file names as the - argument had; but we do not see any other valid alternative. - - For example, - - $(notdir src/foo.c hacks) - - produces the result `foo.c hacks'. - -`$(suffix NAMES...)' - Extracts the suffix of each file name in NAMES. If the file name - contains a period, the suffix is everything starting with the last - period. Otherwise, the suffix is the empty string. This - frequently means that the result will be empty when NAMES is not, - and if NAMES contains multiple file names, the result may contain - fewer file names. - - For example, - - $(suffix src/foo.c hacks) - - produces the result `.c'. - -`$(basename NAMES...)' - Extracts all but the suffix of each file name in NAMES. If the - file name contains a period, the basename is everything starting - up to (and not including) the last period. Otherwise, the - basename is the entire file name. For example, - - $(basename src/foo.c hacks) - - produces the result `src/foo hacks'. - -`$(addsuffix SUFFIX,NAMES...)' - The argument NAMES is regarded as a series of names, separated by - whitespace; SUFFIX is used as a unit. The value of SUFFIX is - appended to the end of each individual name and the resulting - larger names are concatenated with single spaces between them. - For example, - - $(addsuffix .c,foo bar) - - produces the result `foo.c bar.c'. - -`$(addprefix PREFIX,NAMES...)' - The argument NAMES is regarded as a series of names, separated by - whitespace; PREFIX is used as a unit. The value of PREFIX is - prepended to the front of each individual name and the resulting - larger names are concatenated with single spaces between them. - For example, - - $(addprefix src/,foo bar) - - produces the result `src/foo src/bar'. - -`$(join LIST1,LIST2)' - Concatenates the two arguments word by word: the two first words - (one from each argument) concatenated form the first word of the - result, the two second words form the second word of the result, - and so on. So the Nth word of the result comes from the Nth word - of each argument. If one argument has more words that the other, - the extra words are copied unchanged into the result. - - For example, `$(join a b,.c .o)' produces `a.c b.o'. - - Whitespace between the words in the lists is not preserved; it is - replaced with a single space. - - This function can merge the results of the `dir' and `notdir' - functions, to produce the original list of files which was given - to those two functions. - -`$(word N,TEXT)' - Returns the Nth word of TEXT. The legitimate values of N start - from 1. If N is bigger than the number of words in TEXT, the - value is empty. For example, - - $(word 2, foo bar baz) - - returns `bar'. - -`$(words TEXT)' - Returns the number of words in TEXT. Thus, the last word of TEXT - is `$(word $(words TEXT),TEXT)'. - -`$(firstword NAMES...)' - The argument NAMES is regarded as a series of names, separated by - whitespace. The value is the first name in the series. The rest - of the names are ignored. - - For example, - - $(firstword foo bar) - - produces the result `foo'. Although `$(firstword TEXT)' is the - same as `$(word 1,TEXT)', the `firstword' function is retained for - its simplicity. - -`$(wildcard PATTERN)' - The argument PATTERN is a file name pattern, typically containing - wildcard characters (as in shell file name patterns). The result - of `wildcard' is a space-separated list of the names of existing - files that match the pattern. *Note Using Wildcard Characters in - File Names: Wildcards. - - -File: make.info, Node: Foreach Function, Next: Origin Function, Prev: Filename Functions, Up: Functions - -The `foreach' Function -====================== - - The `foreach' function is very different from other functions. It -causes one piece of text to be used repeatedly, each time with a -different substitution performed on it. It resembles the `for' command -in the shell `sh' and the `foreach' command in the C-shell `csh'. - - The syntax of the `foreach' function is: - - $(foreach VAR,LIST,TEXT) - -The first two arguments, VAR and LIST, are expanded before anything -else is done; note that the last argument, TEXT, is *not* expanded at -the same time. Then for each word of the expanded value of LIST, the -variable named by the expanded value of VAR is set to that word, and -TEXT is expanded. Presumably TEXT contains references to that -variable, so its expansion will be different each time. - - The result is that TEXT is expanded as many times as there are -whitespace-separated words in LIST. The multiple expansions of TEXT -are concatenated, with spaces between them, to make the result of -`foreach'. - - This simple example sets the variable `files' to the list of all -files in the directories in the list `dirs': - - dirs := a b c d - files := $(foreach dir,$(dirs),$(wildcard $(dir)/*)) - - Here TEXT is `$(wildcard $(dir)/*)'. The first repetition finds the -value `a' for `dir', so it produces the same result as `$(wildcard -a/*)'; the second repetition produces the result of `$(wildcard b/*)'; -and the third, that of `$(wildcard c/*)'. - - This example has the same result (except for setting `dirs') as the -following example: - - files := $(wildcard a/* b/* c/* d/*) - - When TEXT is complicated, you can improve readability by giving it a -name, with an additional variable: - - find_files = $(wildcard $(dir)/*) - dirs := a b c d - files := $(foreach dir,$(dirs),$(find_files)) - -Here we use the variable `find_files' this way. We use plain `=' to -define a recursively-expanding variable, so that its value contains an -actual function call to be reexpanded under the control of `foreach'; a -simply-expanded variable would not do, since `wildcard' would be called -only once at the time of defining `find_files'. - - The `foreach' function has no permanent effect on the variable VAR; -its value and flavor after the `foreach' function call are the same as -they were beforehand. The other values which are taken from LIST are -in effect only temporarily, during the execution of `foreach'. The -variable VAR is a simply-expanded variable during the execution of -`foreach'. If VAR was undefined before the `foreach' function call, it -is undefined after the call. *Note The Two Flavors of Variables: -Flavors. - - You must take care when using complex variable expressions that -result in variable names because many strange things are valid variable -names, but are probably not what you intended. For example, - - files := $(foreach Esta escrito en espanol!,b c ch,$(find_files)) - -might be useful if the value of `find_files' references the variable -whose name is `Esta escrito en espanol!' (es un nombre bastante largo, -no?), but it is more likely to be a mistake. - - -File: make.info, Node: Origin Function, Next: Shell Function, Prev: Foreach Function, Up: Functions - -The `origin' Function -===================== - - The `origin' function is unlike most other functions in that it does -not operate on the values of variables; it tells you something *about* -a variable. Specifically, it tells you where it came from. - - The syntax of the `origin' function is: - - $(origin VARIABLE) - - Note that VARIABLE is the *name* of a variable to inquire about; not -a *reference* to that variable. Therefore you would not normally use a -`$' or parentheses when writing it. (You can, however, use a variable -reference in the name if you want the name not to be a constant.) - - The result of this function is a string telling you how the variable -VARIABLE was defined: - -`undefined' - if VARIABLE was never defined. - -`default' - if VARIABLE has a default definition, as is usual with `CC' and so - on. *Note Variables Used by Implicit Rules: Implicit Variables. - Note that if you have redefined a default variable, the `origin' - function will return the origin of the later definition. - -`environment' - if VARIABLE was defined as an environment variable and the `-e' - option is *not* turned on (*note Summary of Options: Options - Summary.). - -`environment override' - if VARIABLE was defined as an environment variable and the `-e' - option *is* turned on (*note Summary of Options: Options Summary.). - -`file' - if VARIABLE was defined in a makefile. - -`command line' - if VARIABLE was defined on the command line. - -`override' - if VARIABLE was defined with an `override' directive in a makefile - (*note The `override' Directive: Override Directive.). - -`automatic' - if VARIABLE is an automatic variable defined for the execution of - the commands for each rule (*note Automatic Variables: Automatic.). - - This information is primarily useful (other than for your curiosity) -to determine if you want to believe the value of a variable. For -example, suppose you have a makefile `foo' that includes another -makefile `bar'. You want a variable `bletch' to be defined in `bar' if -you run the command `make -f bar', even if the environment contains a -definition of `bletch'. However, if `foo' defined `bletch' before -including `bar', you do not want to override that definition. This -could be done by using an `override' directive in `foo', giving that -definition precedence over the later definition in `bar'; -unfortunately, the `override' directive would also override any command -line definitions. So, `bar' could include: - - ifdef bletch - ifeq "$(origin bletch)" "environment" - bletch = barf, gag, etc. - endif - endif - -If `bletch' has been defined from the environment, this will redefine -it. - - If you want to override a previous definition of `bletch' if it came -from the environment, even under `-e', you could instead write: - - ifneq "$(findstring environment,$(origin bletch))" "" - bletch = barf, gag, etc. - endif - - Here the redefinition takes place if `$(origin bletch)' returns -either `environment' or `environment override'. *Note Functions for -String Substitution and Analysis: Text Functions. - - -File: make.info, Node: Shell Function, Prev: Origin Function, Up: Functions - -The `shell' Function -==================== - - The `shell' function is unlike any other function except the -`wildcard' function (*note The Function `wildcard': Wildcard Function.) -in that it communicates with the world outside of `make'. - - The `shell' function performs the same function that backquotes -(``') perform in most shells: it does "command expansion". This means -that it takes an argument that is a shell command and returns the -output of the command. The only processing `make' does on the result, -before substituting it into the surrounding text, is to convert -newlines to spaces. - - The commands run by calls to the `shell' function are run when the -function calls are expanded. In most cases, this is when the makefile -is read in. The exception is that function calls in the commands of -the rules are expanded when the commands are run, and this applies to -`shell' function calls like all others. - - Here are some examples of the use of the `shell' function: - - contents := $(shell cat foo) - -sets `contents' to the contents of the file `foo', with a space (rather -than a newline) separating each line. - - files := $(shell echo *.c) - -sets `files' to the expansion of `*.c'. Unless `make' is using a very -strange shell, this has the same result as `$(wildcard *.c)'. - - -File: make.info, Node: Running, Next: Implicit Rules, Prev: Functions, Up: Top - -How to Run `make' -***************** - - A makefile that says how to recompile a program can be used in more -than one way. The simplest use is to recompile every file that is out -of date. Usually, makefiles are written so that if you run `make' with -no arguments, it does just that. - - But you might want to update only some of the files; you might want -to use a different compiler or different compiler options; you might -want just to find out which files are out of date without changing them. - - By giving arguments when you run `make', you can do any of these -things and many others. - - The exit status of `make' is always one of three values: -`0' - The exit status is zero if `make' is successful. - -`2' - The exit status is two if `make' encounters any errors. It will - print messages describing the particular errors. - -`1' - The exit status is one if you use the `-q' flag and `make' - determines that some target is not already up to date. *Note - Instead of Executing the Commands: Instead of Execution. - -* Menu: - -* Makefile Arguments:: How to specify which makefile to use. -* Goals:: How to use goal arguments to specify which - parts of the makefile to use. -* Instead of Execution:: How to use mode flags to specify what - kind of thing to do with the commands - in the makefile other than simply - execute them. -* Avoiding Compilation:: How to avoid recompiling certain files. -* Overriding:: How to override a variable to specify - an alternate compiler and other things. -* Testing:: How to proceed past some errors, to - test compilation. -* Options Summary:: Summary of Options - - -File: make.info, Node: Makefile Arguments, Next: Goals, Up: Running - -Arguments to Specify the Makefile -================================= - - The way to specify the name of the makefile is with the `-f' or -`--file' option (`--makefile' also works). For example, `-f altmake' -says to use the file `altmake' as the makefile. - - If you use the `-f' flag several times and follow each `-f' with an -argument, all the specified files are used jointly as makefiles. - - If you do not use the `-f' or `--file' flag, the default is to try -`GNUmakefile', `makefile', and `Makefile', in that order, and use the -first of these three which exists or can be made (*note Writing -Makefiles: Makefiles.). - - -File: make.info, Node: Goals, Next: Instead of Execution, Prev: Makefile Arguments, Up: Running - -Arguments to Specify the Goals -============================== - - The "goals" are the targets that `make' should strive ultimately to -update. Other targets are updated as well if they appear as -dependencies of goals, or dependencies of dependencies of goals, etc. - - By default, the goal is the first target in the makefile (not -counting targets that start with a period). Therefore, makefiles are -usually written so that the first target is for compiling the entire -program or programs they describe. If the first rule in the makefile -has several targets, only the first target in the rule becomes the -default goal, not the whole list. - - You can specify a different goal or goals with arguments to `make'. -Use the name of the goal as an argument. If you specify several goals, -`make' processes each of them in turn, in the order you name them. - - Any target in the makefile may be specified as a goal (unless it -starts with `-' or contains an `=', in which case it will be parsed as -a switch or variable definition, respectively). Even targets not in -the makefile may be specified, if `make' can find implicit rules that -say how to make them. - - One use of specifying a goal is if you want to compile only a part of -the program, or only one of several programs. Specify as a goal each -file that you wish to remake. For example, consider a directory -containing several programs, with a makefile that starts like this: - - .PHONY: all - all: size nm ld ar as - - If you are working on the program `size', you might want to say -`make size' so that only the files of that program are recompiled. - - Another use of specifying a goal is to make files that are not -normally made. For example, there may be a file of debugging output, -or a version of the program that is compiled specially for testing, -which has a rule in the makefile but is not a dependency of the default -goal. - - Another use of specifying a goal is to run the commands associated -with a phony target (*note Phony Targets::.) or empty target (*note -Empty Target Files to Record Events: Empty Targets.). Many makefiles -contain a phony target named `clean' which deletes everything except -source files. Naturally, this is done only if you request it -explicitly with `make clean'. Following is a list of typical phony and -empty target names. *Note Standard Targets::, for a detailed list of -all the standard target names which GNU software packages use. - -`all' - Make all the top-level targets the makefile knows about. - -`clean' - Delete all files that are normally created by running `make'. - -`mostlyclean' - Like `clean', but may refrain from deleting a few files that people - normally don't want to recompile. For example, the `mostlyclean' - target for GCC does not delete `libgcc.a', because recompiling it - is rarely necessary and takes a lot of time. - -`distclean' -`realclean' -`clobber' - Any of these targets might be defined to delete *more* files than - `clean' does. For example, this would delete configuration files - or links that you would normally create as preparation for - compilation, even if the makefile itself cannot create these files. - -`install' - Copy the executable file into a directory that users typically - search for commands; copy any auxiliary files that the executable - uses into the directories where it will look for them. - -`print' - Print listings of the source files that have changed. - -`tar' - Create a tar file of the source files. - -`shar' - Create a shell archive (shar file) of the source files. - -`dist' - Create a distribution file of the source files. This might be a - tar file, or a shar file, or a compressed version of one of the - above, or even more than one of the above. - -`TAGS' - Update a tags table for this program. - -`check' -`test' - Perform self tests on the program this makefile builds. - - -File: make.info, Node: Instead of Execution, Next: Avoiding Compilation, Prev: Goals, Up: Running - -Instead of Executing the Commands -================================= - - The makefile tells `make' how to tell whether a target is up to date, -and how to update each target. But updating the targets is not always -what you want. Certain options specify other activities for `make'. - -`-n' -`--just-print' -`--dry-run' -`--recon' - "No-op". The activity is to print what commands would be used to - make the targets up to date, but not actually execute them. - -`-t' -`--touch' - "Touch". The activity is to mark the targets as up to date without - actually changing them. In other words, `make' pretends to compile - the targets but does not really change their contents. - -`-q' -`--question' - "Question". The activity is to find out silently whether the - targets are up to date already; but execute no commands in either - case. In other words, neither compilation nor output will occur. - -`-W FILE' -`--what-if=FILE' -`--assume-new=FILE' -`--new-file=FILE' - "What if". Each `-W' flag is followed by a file name. The given - files' modification times are recorded by `make' as being the - present time, although the actual modification times remain the - same. You can use the `-W' flag in conjunction with the `-n' flag - to see what would happen if you were to modify specific files. - - With the `-n' flag, `make' prints the commands that it would -normally execute but does not execute them. - - With the `-t' flag, `make' ignores the commands in the rules and -uses (in effect) the command `touch' for each target that needs to be -remade. The `touch' command is also printed, unless `-s' or `.SILENT' -is used. For speed, `make' does not actually invoke the program -`touch'. It does the work directly. - - With the `-q' flag, `make' prints nothing and executes no commands, -but the exit status code it returns is zero if and only if the targets -to be considered are already up to date. If the exit status is one, -then some updating needs to be done. If `make' encounters an error, -the exit status is two, so you can distinguish an error from a target -that is not up to date. - - It is an error to use more than one of these three flags in the same -invocation of `make'. - - The `-n', `-t', and `-q' options do not affect command lines that -begin with `+' characters or contain the strings `$(MAKE)' or -`${MAKE}'. Note that only the line containing the `+' character or the -strings `$(MAKE)' or `${MAKE}' is run regardless of these options. -Other lines in the same rule are not run unless they too begin with `+' -or contain `$(MAKE)' or `${MAKE}' (*Note How the `MAKE' Variable Works: -MAKE Variable.) - - The `-W' flag provides two features: - - * If you also use the `-n' or `-q' flag, you can see what `make' - would do if you were to modify some files. - - * Without the `-n' or `-q' flag, when `make' is actually executing - commands, the `-W' flag can direct `make' to act as if some files - had been modified, without actually modifying the files. - - Note that the options `-p' and `-v' allow you to obtain other -information about `make' or about the makefiles in use (*note Summary -of Options: Options Summary.). - - -File: make.info, Node: Avoiding Compilation, Next: Overriding, Prev: Instead of Execution, Up: Running - -Avoiding Recompilation of Some Files -==================================== - - Sometimes you may have changed a source file but you do not want to -recompile all the files that depend on it. For example, suppose you -add a macro or a declaration to a header file that many other files -depend on. Being conservative, `make' assumes that any change in the -header file requires recompilation of all dependent files, but you know -that they do not need to be recompiled and you would rather not waste -the time waiting for them to compile. - - If you anticipate the problem before changing the header file, you -can use the `-t' flag. This flag tells `make' not to run the commands -in the rules, but rather to mark the target up to date by changing its -last-modification date. You would follow this procedure: - - 1. Use the command `make' to recompile the source files that really - need recompilation. - - 2. Make the changes in the header files. - - 3. Use the command `make -t' to mark all the object files as up to - date. The next time you run `make', the changes in the header - files will not cause any recompilation. - - If you have already changed the header file at a time when some files -do need recompilation, it is too late to do this. Instead, you can use -the `-o FILE' flag, which marks a specified file as "old" (*note -Summary of Options: Options Summary.). This means that the file itself -will not be remade, and nothing else will be remade on its account. -Follow this procedure: - - 1. Recompile the source files that need compilation for reasons - independent of the particular header file, with `make -o - HEADERFILE'. If several header files are involved, use a separate - `-o' option for each header file. - - 2. Touch all the object files with `make -t'. - diff --git a/buildtools/windows/source/make/make.info-5 b/buildtools/windows/source/make/make.info-5 deleted file mode 100644 index 13914a10faa..00000000000 --- a/buildtools/windows/source/make/make.info-5 +++ /dev/null @@ -1,1131 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: make.info, Node: Overriding, Next: Testing, Prev: Avoiding Compilation, Up: Running - -Overriding Variables -==================== - - An argument that contains `=' specifies the value of a variable: -`V=X' sets the value of the variable V to X. If you specify a value in -this way, all ordinary assignments of the same variable in the makefile -are ignored; we say they have been "overridden" by the command line -argument. - - The most common way to use this facility is to pass extra flags to -compilers. For example, in a properly written makefile, the variable -`CFLAGS' is included in each command that runs the C compiler, so a -file `foo.c' would be compiled something like this: - - cc -c $(CFLAGS) foo.c - - Thus, whatever value you set for `CFLAGS' affects each compilation -that occurs. The makefile probably specifies the usual value for -`CFLAGS', like this: - - CFLAGS=-g - - Each time you run `make', you can override this value if you wish. -For example, if you say `make CFLAGS='-g -O'', each C compilation will -be done with `cc -c -g -O'. (This illustrates how you can use quoting -in the shell to enclose spaces and other special characters in the -value of a variable when you override it.) - - The variable `CFLAGS' is only one of many standard variables that -exist just so that you can change them this way. *Note Variables Used -by Implicit Rules: Implicit Variables, for a complete list. - - You can also program the makefile to look at additional variables of -your own, giving the user the ability to control other aspects of how -the makefile works by changing the variables. - - When you override a variable with a command argument, you can define -either a recursively-expanded variable or a simply-expanded variable. -The examples shown above make a recursively-expanded variable; to make a -simply-expanded variable, write `:=' instead of `='. But, unless you -want to include a variable reference or function call in the *value* -that you specify, it makes no difference which kind of variable you -create. - - There is one way that the makefile can change a variable that you -have overridden. This is to use the `override' directive, which is a -line that looks like this: `override VARIABLE = VALUE' (*note The -`override' Directive: Override Directive.). - - -File: make.info, Node: Testing, Next: Options Summary, Prev: Overriding, Up: Running - -Testing the Compilation of a Program -==================================== - - Normally, when an error happens in executing a shell command, `make' -gives up immediately, returning a nonzero status. No further commands -are executed for any target. The error implies that the goal cannot be -correctly remade, and `make' reports this as soon as it knows. - - When you are compiling a program that you have just changed, this is -not what you want. Instead, you would rather that `make' try compiling -every file that can be tried, to show you as many compilation errors as -possible. - - On these occasions, you should use the `-k' or `--keep-going' flag. -This tells `make' to continue to consider the other dependencies of the -pending targets, remaking them if necessary, before it gives up and -returns nonzero status. For example, after an error in compiling one -object file, `make -k' will continue compiling other object files even -though it already knows that linking them will be impossible. In -addition to continuing after failed shell commands, `make -k' will -continue as much as possible after discovering that it does not know -how to make a target or dependency file. This will always cause an -error message, but without `-k', it is a fatal error (*note Summary of -Options: Options Summary.). - - The usual behavior of `make' assumes that your purpose is to get the -goals up to date; once `make' learns that this is impossible, it might -as well report the failure immediately. The `-k' flag says that the -real purpose is to test as much as possible of the changes made in the -program, perhaps to find several independent problems so that you can -correct them all before the next attempt to compile. This is why Emacs' -`M-x compile' command passes the `-k' flag by default. - - -File: make.info, Node: Options Summary, Prev: Testing, Up: Running - -Summary of Options -================== - - Here is a table of all the options `make' understands: - -`-b' -`-m' - These options are ignored for compatibility with other versions of - `make'. - -`-C DIR' -`--directory=DIR' - Change to directory DIR before reading the makefiles. If multiple - `-C' options are specified, each is interpreted relative to the - previous one: `-C / -C etc' is equivalent to `-C /etc'. This is - typically used with recursive invocations of `make' (*note - Recursive Use of `make': Recursion.). - -`-d' -`--debug' - Print debugging information in addition to normal processing. The - debugging information says which files are being considered for - remaking, which file-times are being compared and with what - results, which files actually need to be remade, which implicit - rules are considered and which are applied--everything interesting - about how `make' decides what to do. - -`-e' -`--environment-overrides' - Give variables taken from the environment precedence over - variables from makefiles. *Note Variables from the Environment: - Environment. - -`-f FILE' -`--file=FILE' -`--makefile=FILE' - Read the file named FILE as a makefile. *Note Writing Makefiles: - Makefiles. - -`-h' -`--help' - Remind you of the options that `make' understands and then exit. - -`-i' -`--ignore-errors' - Ignore all errors in commands executed to remake files. *Note - Errors in Commands: Errors. - -`-I DIR' -`--include-dir=DIR' - Specifies a directory DIR to search for included makefiles. *Note - Including Other Makefiles: Include. If several `-I' options are - used to specify several directories, the directories are searched - in the order specified. - -`-j [JOBS]' -`--jobs=[JOBS]' - Specifies the number of jobs (commands) to run simultaneously. - With no argument, `make' runs as many jobs simultaneously as - possible. If there is more than one `-j' option, the last one is - effective. *Note Parallel Execution: Parallel, for more - information on how commands are run. - -`-k' -`--keep-going' - Continue as much as possible after an error. While the target that - failed, and those that depend on it, cannot be remade, the other - dependencies of these targets can be processed all the same. - *Note Testing the Compilation of a Program: Testing. - -`-l [LOAD]' -`--load-average[=LOAD]' -`--max-load[=LOAD]' - Specifies that no new jobs (commands) should be started if there - are other jobs running and the load average is at least LOAD (a - floating-point number). With no argument, removes a previous load - limit. *Note Parallel Execution: Parallel. - -`-n' -`--just-print' -`--dry-run' -`--recon' - Print the commands that would be executed, but do not execute them. - *Note Instead of Executing the Commands: Instead of Execution. - -`-o FILE' -`--old-file=FILE' -`--assume-old=FILE' - Do not remake the file FILE even if it is older than its - dependencies, and do not remake anything on account of changes in - FILE. Essentially the file is treated as very old and its rules - are ignored. *Note Avoiding Recompilation of Some Files: Avoiding - Compilation. - -`-p' -`--print-data-base' - Print the data base (rules and variable values) that results from - reading the makefiles; then execute as usual or as otherwise - specified. This also prints the version information given by the - `-v' switch (see below). To print the data base without trying to - remake any files, use `make -p -f /dev/null'. - -`-q' -`--question' - "Question mode". Do not run any commands, or print anything; just - return an exit status that is zero if the specified targets are - already up to date, one if any remaking is required, or two if an - error is encountered. *Note Instead of Executing the Commands: - Instead of Execution. - -`-r' -`--no-builtin-rules' - Eliminate use of the built-in implicit rules (*note Using Implicit - Rules: Implicit Rules.). You can still define your own by writing - pattern rules (*note Defining and Redefining Pattern Rules: - Pattern Rules.). The `-r' option also clears out the default list - of suffixes for suffix rules (*note Old-Fashioned Suffix Rules: - Suffix Rules.). But you can still define your own suffixes with a - rule for `.SUFFIXES', and then define your own suffix rules. - -`-s' -`--silent' -`--quiet' - Silent operation; do not print the commands as they are executed. - *Note Command Echoing: Echoing. - -`-S' -`--no-keep-going' -`--stop' - Cancel the effect of the `-k' option. This is never necessary - except in a recursive `make' where `-k' might be inherited from - the top-level `make' via `MAKEFLAGS' (*note Recursive Use of - `make': Recursion.) or if you set `-k' in `MAKEFLAGS' in your - environment. - -`-t' -`--touch' - Touch files (mark them up to date without really changing them) - instead of running their commands. This is used to pretend that - the commands were done, in order to fool future invocations of - `make'. *Note Instead of Executing the Commands: Instead of - Execution. - -`-v' -`--version' - Print the version of the `make' program plus a copyright, a list - of authors, and a notice that there is no warranty; then exit. - -`-w' -`--print-directory' - Print a message containing the working directory both before and - after executing the makefile. This may be useful for tracking - down errors from complicated nests of recursive `make' commands. - *Note Recursive Use of `make': Recursion. (In practice, you - rarely need to specify this option since `make' does it for you; - see *Note The `--print-directory' Option: -w Option.) - -`--no-print-directory' - Disable printing of the working directory under `-w'. This option - is useful when `-w' is turned on automatically, but you do not - want to see the extra messages. *Note The `--print-directory' - Option: -w Option. - -`-W FILE' -`--what-if=FILE' -`--new-file=FILE' -`--assume-new=FILE' - Pretend that the target FILE has just been modified. When used - with the `-n' flag, this shows you what would happen if you were - to modify that file. Without `-n', it is almost the same as - running a `touch' command on the given file before running `make', - except that the modification time is changed only in the - imagination of `make'. *Note Instead of Executing the Commands: - Instead of Execution. - -`--warn-undefined-variables' - Issue a warning message whenever `make' sees a reference to an - undefined variable. This can be helpful when you are trying to - debug makefiles which use variables in complex ways. - - -File: make.info, Node: Implicit Rules, Next: Archives, Prev: Running, Up: Top - -Using Implicit Rules -******************** - - Certain standard ways of remaking target files are used very often. -For example, one customary way to make an object file is from a C -source file using the C compiler, `cc'. - - "Implicit rules" tell `make' how to use customary techniques so that -you do not have to specify them in detail when you want to use them. -For example, there is an implicit rule for C compilation. File names -determine which implicit rules are run. For example, C compilation -typically takes a `.c' file and makes a `.o' file. So `make' applies -the implicit rule for C compilation when it sees this combination of -file name endings. - - A chain of implicit rules can apply in sequence; for example, `make' -will remake a `.o' file from a `.y' file by way of a `.c' file. - - The built-in implicit rules use several variables in their commands -so that, by changing the values of the variables, you can change the -way the implicit rule works. For example, the variable `CFLAGS' -controls the flags given to the C compiler by the implicit rule for C -compilation. - - You can define your own implicit rules by writing "pattern rules". - - "Suffix rules" are a more limited way to define implicit rules. -Pattern rules are more general and clearer, but suffix rules are -retained for compatibility. - -* Menu: - -* Using Implicit:: How to use an existing implicit rule - to get the commands for updating a file. -* Catalogue of Rules:: A list of built-in implicit rules. -* Implicit Variables:: How to change what predefined rules do. -* Chained Rules:: How to use a chain of implicit rules. -* Pattern Rules:: How to define new implicit rules. -* Last Resort:: How to defining commands for rules - which cannot find any. -* Suffix Rules:: The old-fashioned style of implicit rule. -* Search Algorithm:: The precise algorithm for applying - implicit rules. - - -File: make.info, Node: Using Implicit, Next: Catalogue of Rules, Up: Implicit Rules - -Using Implicit Rules -==================== - - To allow `make' to find a customary method for updating a target -file, all you have to do is refrain from specifying commands yourself. -Either write a rule with no command lines, or don't write a rule at -all. Then `make' will figure out which implicit rule to use based on -which kind of source file exists or can be made. - - For example, suppose the makefile looks like this: - - foo : foo.o bar.o - cc -o foo foo.o bar.o $(CFLAGS) $(LDFLAGS) - -Because you mention `foo.o' but do not give a rule for it, `make' will -automatically look for an implicit rule that tells how to update it. -This happens whether or not the file `foo.o' currently exists. - - If an implicit rule is found, it can supply both commands and one or -more dependencies (the source files). You would want to write a rule -for `foo.o' with no command lines if you need to specify additional -dependencies, such as header files, that the implicit rule cannot -supply. - - Each implicit rule has a target pattern and dependency patterns. -There may be many implicit rules with the same target pattern. For -example, numerous rules make `.o' files: one, from a `.c' file with the -C compiler; another, from a `.p' file with the Pascal compiler; and so -on. The rule that actually applies is the one whose dependencies exist -or can be made. So, if you have a file `foo.c', `make' will run the C -compiler; otherwise, if you have a file `foo.p', `make' will run the -Pascal compiler; and so on. - - Of course, when you write the makefile, you know which implicit rule -you want `make' to use, and you know it will choose that one because you -know which possible dependency files are supposed to exist. *Note -Catalogue of Implicit Rules: Catalogue of Rules, for a catalogue of all -the predefined implicit rules. - - Above, we said an implicit rule applies if the required dependencies -"exist or can be made". A file "can be made" if it is mentioned -explicitly in the makefile as a target or a dependency, or if an -implicit rule can be recursively found for how to make it. When an -implicit dependency is the result of another implicit rule, we say that -"chaining" is occurring. *Note Chains of Implicit Rules: Chained Rules. - - In general, `make' searches for an implicit rule for each target, and -for each double-colon rule, that has no commands. A file that is -mentioned only as a dependency is considered a target whose rule -specifies nothing, so implicit rule search happens for it. *Note -Implicit Rule Search Algorithm: Search Algorithm, for the details of -how the search is done. - - Note that explicit dependencies do not influence implicit rule -search. For example, consider this explicit rule: - - foo.o: foo.p - -The dependency on `foo.p' does not necessarily mean that `make' will -remake `foo.o' according to the implicit rule to make an object file, a -`.o' file, from a Pascal source file, a `.p' file. For example, if -`foo.c' also exists, the implicit rule to make an object file from a C -source file is used instead, because it appears before the Pascal rule -in the list of predefined implicit rules (*note Catalogue of Implicit -Rules: Catalogue of Rules.). - - If you do not want an implicit rule to be used for a target that has -no commands, you can give that target empty commands by writing a -semicolon (*note Defining Empty Commands: Empty Commands.). - - -File: make.info, Node: Catalogue of Rules, Next: Implicit Variables, Prev: Using Implicit, Up: Implicit Rules - -Catalogue of Implicit Rules -=========================== - - Here is a catalogue of predefined implicit rules which are always -available unless the makefile explicitly overrides or cancels them. -*Note Canceling Implicit Rules: Canceling Rules, for information on -canceling or overriding an implicit rule. The `-r' or -`--no-builtin-rules' option cancels all predefined rules. - - Not all of these rules will always be defined, even when the `-r' -option is not given. Many of the predefined implicit rules are -implemented in `make' as suffix rules, so which ones will be defined -depends on the "suffix list" (the list of dependencies of the special -target `.SUFFIXES'). The default suffix list is: `.out', `.a', `.ln', -`.o', `.c', `.cc', `.C', `.p', `.f', `.F', `.r', `.y', `.l', `.s', -`.S', `.mod', `.sym', `.def', `.h', `.info', `.dvi', `.tex', `.texinfo', -`.texi', `.txinfo', `.w', `.ch' `.web', `.sh', `.elc', `.el'. All of -the implicit rules described below whose dependencies have one of these -suffixes are actually suffix rules. If you modify the suffix list, the -only predefined suffix rules in effect will be those named by one or -two of the suffixes that are on the list you specify; rules whose -suffixes fail to be on the list are disabled. *Note Old-Fashioned -Suffix Rules: Suffix Rules, for full details on suffix rules. - -Compiling C programs - `N.o' is made automatically from `N.c' with a command of the form - `$(CC) -c $(CPPFLAGS) $(CFLAGS)'. - -Compiling C++ programs - `N.o' is made automatically from `N.cc' or `N.C' with a command of - the form `$(CXX) -c $(CPPFLAGS) $(CXXFLAGS)'. We encourage you to - use the suffix `.cc' for C++ source files instead of `.C'. - -Compiling Pascal programs - `N.o' is made automatically from `N.p' with the command `$(PC) -c - $(PFLAGS)'. - -Compiling Fortran and Ratfor programs - `N.o' is made automatically from `N.r', `N.F' or `N.f' by running - the Fortran compiler. The precise command used is as follows: - - `.f' - `$(FC) -c $(FFLAGS)'. - - `.F' - `$(FC) -c $(FFLAGS) $(CPPFLAGS)'. - - `.r' - `$(FC) -c $(FFLAGS) $(RFLAGS)'. - -Preprocessing Fortran and Ratfor programs - `N.f' is made automatically from `N.r' or `N.F'. This rule runs - just the preprocessor to convert a Ratfor or preprocessable - Fortran program into a strict Fortran program. The precise - command used is as follows: - - `.F' - `$(FC) -F $(CPPFLAGS) $(FFLAGS)'. - - `.r' - `$(FC) -F $(FFLAGS) $(RFLAGS)'. - -Compiling Modula-2 programs - `N.sym' is made from `N.def' with a command of the form `$(M2C) - $(M2FLAGS) $(DEFFLAGS)'. `N.o' is made from `N.mod'; the form is: - `$(M2C) $(M2FLAGS) $(MODFLAGS)'. - -Assembling and preprocessing assembler programs - `N.o' is made automatically from `N.s' by running the assembler, - `as'. The precise command is `$(AS) $(ASFLAGS)'. - - `N.s' is made automatically from `N.S' by running the C - preprocessor, `cpp'. The precise command is `$(CPP) $(CPPFLAGS)'. - -Linking a single object file - `N' is made automatically from `N.o' by running the linker - (usually called `ld') via the C compiler. The precise command - used is `$(CC) $(LDFLAGS) N.o $(LOADLIBES)'. - - This rule does the right thing for a simple program with only one - source file. It will also do the right thing if there are multiple - object files (presumably coming from various other source files), - one of which has a name matching that of the executable file. - Thus, - - x: y.o z.o - - when `x.c', `y.c' and `z.c' all exist will execute: - - cc -c x.c -o x.o - cc -c y.c -o y.o - cc -c z.c -o z.o - cc x.o y.o z.o -o x - rm -f x.o - rm -f y.o - rm -f z.o - - In more complicated cases, such as when there is no object file - whose name derives from the executable file name, you must write - an explicit command for linking. - - Each kind of file automatically made into `.o' object files will - be automatically linked by using the compiler (`$(CC)', `$(FC)' or - `$(PC)'; the C compiler `$(CC)' is used to assemble `.s' files) - without the `-c' option. This could be done by using the `.o' - object files as intermediates, but it is faster to do the - compiling and linking in one step, so that's how it's done. - -Yacc for C programs - `N.c' is made automatically from `N.y' by running Yacc with the - command `$(YACC) $(YFLAGS)'. - -Lex for C programs - `N.c' is made automatically from `N.l' by by running Lex. The - actual command is `$(LEX) $(LFLAGS)'. - -Lex for Ratfor programs - `N.r' is made automatically from `N.l' by by running Lex. The - actual command is `$(LEX) $(LFLAGS)'. - - The convention of using the same suffix `.l' for all Lex files - regardless of whether they produce C code or Ratfor code makes it - impossible for `make' to determine automatically which of the two - languages you are using in any particular case. If `make' is - called upon to remake an object file from a `.l' file, it must - guess which compiler to use. It will guess the C compiler, because - that is more common. If you are using Ratfor, make sure `make' - knows this by mentioning `N.r' in the makefile. Or, if you are - using Ratfor exclusively, with no C files, remove `.c' from the - list of implicit rule suffixes with: - - .SUFFIXES: - .SUFFIXES: .o .r .f .l ... - -Making Lint Libraries from C, Yacc, or Lex programs - `N.ln' is made from `N.c' by running `lint'. The precise command - is `$(LINT) $(LINTFLAGS) $(CPPFLAGS) -i'. The same command is - used on the C code produced from `N.y' or `N.l'. - -TeX and Web - `N.dvi' is made from `N.tex' with the command `$(TEX)'. `N.tex' - is made from `N.web' with `$(WEAVE)', or from `N.w' (and from - `N.ch' if it exists or can be made) with `$(CWEAVE)'. `N.p' is - made from `N.web' with `$(TANGLE)' and `N.c' is made from `N.w' - (and from `N.ch' if it exists or can be made) with `$(CTANGLE)'. - -Texinfo and Info - `N.dvi' is made from `N.texinfo', `N.texi', or `N.txinfo', with - the command `$(TEXI2DVI) $(TEXI2DVI_FLAGS)'. `N.info' is made from - `N.texinfo', `N.texi', or `N.txinfo', with the command - `$(MAKEINFO) $(MAKEINFO_FLAGS)'. - -RCS - Any file `N' is extracted if necessary from an RCS file named - either `N,v' or `RCS/N,v'. The precise command used is - `$(CO) $(COFLAGS)'. `N' will not be extracted from RCS if it - already exists, even if the RCS file is newer. The rules for RCS - are terminal (*note Match-Anything Pattern Rules: Match-Anything - Rules.), so RCS files cannot be generated from another source; - they must actually exist. - -SCCS - Any file `N' is extracted if necessary from an SCCS file named - either `s.N' or `SCCS/s.N'. The precise command used is - `$(GET) $(GFLAGS)'. The rules for SCCS are terminal (*note - Match-Anything Pattern Rules: Match-Anything Rules.), so SCCS - files cannot be generated from another source; they must actually - exist. - - For the benefit of SCCS, a file `N' is copied from `N.sh' and made - executable (by everyone). This is for shell scripts that are - checked into SCCS. Since RCS preserves the execution permission - of a file, you do not need to use this feature with RCS. - - We recommend that you avoid using of SCCS. RCS is widely held to - be superior, and is also free. By choosing free software in place - of comparable (or inferior) proprietary software, you support the - free software movement. - - Usually, you want to change only the variables listed in the table -above, which are documented in the following section. - - However, the commands in built-in implicit rules actually use -variables such as `COMPILE.c', `LINK.p', and `PREPROCESS.S', whose -values contain the commands listed above. - - `make' follows the convention that the rule to compile a `.X' source -file uses the variable `COMPILE.X'. Similarly, the rule to produce an -executable from a `.X' file uses `LINK.X'; and the rule to preprocess a -`.X' file uses `PREPROCESS.X'. - - Every rule that produces an object file uses the variable -`OUTPUT_OPTION'. `make' defines this variable either to contain `-o -$@', or to be empty, depending on a compile-time option. You need the -`-o' option to ensure that the output goes into the right file when the -source file is in a different directory, as when using `VPATH' (*note -Directory Search::.). However, compilers on some systems do not accept -a `-o' switch for object files. If you use such a system, and use -`VPATH', some compilations will put their output in the wrong place. A -possible workaround for this problem is to give `OUTPUT_OPTION' the -value `; mv $*.o $@'. - - -File: make.info, Node: Implicit Variables, Next: Chained Rules, Prev: Catalogue of Rules, Up: Implicit Rules - -Variables Used by Implicit Rules -================================ - - The commands in built-in implicit rules make liberal use of certain -predefined variables. You can alter these variables in the makefile, -with arguments to `make', or in the environment to alter how the -implicit rules work without redefining the rules themselves. - - For example, the command used to compile a C source file actually -says `$(CC) -c $(CFLAGS) $(CPPFLAGS)'. The default values of the -variables used are `cc' and nothing, resulting in the command `cc -c'. -By redefining `CC' to `ncc', you could cause `ncc' to be used for all C -compilations performed by the implicit rule. By redefining `CFLAGS' to -be `-g', you could pass the `-g' option to each compilation. *All* -implicit rules that do C compilation use `$(CC)' to get the program -name for the compiler and *all* include `$(CFLAGS)' among the arguments -given to the compiler. - - The variables used in implicit rules fall into two classes: those -that are names of programs (like `CC') and those that contain arguments -for the programs (like `CFLAGS'). (The "name of a program" may also -contain some command arguments, but it must start with an actual -executable program name.) If a variable value contains more than one -argument, separate them with spaces. - - Here is a table of variables used as names of programs in built-in -rules: - -`AR' - Archive-maintaining program; default `ar'. - -`AS' - Program for doing assembly; default `as'. - -`CC' - Program for compiling C programs; default `cc'. - -`CXX' - Program for compiling C++ programs; default `g++'. - -`CO' - Program for extracting a file from RCS; default `co'. - -`CPP' - Program for running the C preprocessor, with results to standard - output; default `$(CC) -E'. - -`FC' - Program for compiling or preprocessing Fortran and Ratfor programs; - default `f77'. - -`GET' - Program for extracting a file from SCCS; default `get'. - -`LEX' - Program to use to turn Lex grammars into C programs or Ratfor - programs; default `lex'. - -`PC' - Program for compiling Pascal programs; default `pc'. - -`YACC' - Program to use to turn Yacc grammars into C programs; default - `yacc'. - -`YACCR' - Program to use to turn Yacc grammars into Ratfor programs; default - `yacc -r'. - -`MAKEINFO' - Program to convert a Texinfo source file into an Info file; default - `makeinfo'. - -`TEX' - Program to make TeX DVI files from TeX source; default `tex'. - -`TEXI2DVI' - Program to make TeX DVI files from Texinfo source; default - `texi2dvi'. - -`WEAVE' - Program to translate Web into TeX; default `weave'. - -`CWEAVE' - Program to translate C Web into TeX; default `cweave'. - -`TANGLE' - Program to translate Web into Pascal; default `tangle'. - -`CTANGLE' - Program to translate C Web into C; default `ctangle'. - -`RM' - Command to remove a file; default `rm -f'. - - Here is a table of variables whose values are additional arguments -for the programs above. The default values for all of these is the -empty string, unless otherwise noted. - -`ARFLAGS' - Flags to give the archive-maintaining program; default `rv'. - -`ASFLAGS' - Extra flags to give to the assembler (when explicitly invoked on a - `.s' or `.S' file). - -`CFLAGS' - Extra flags to give to the C compiler. - -`CXXFLAGS' - Extra flags to give to the C++ compiler. - -`COFLAGS' - Extra flags to give to the RCS `co' program. - -`CPPFLAGS' - Extra flags to give to the C preprocessor and programs that use it - (the C and Fortran compilers). - -`FFLAGS' - Extra flags to give to the Fortran compiler. - -`GFLAGS' - Extra flags to give to the SCCS `get' program. - -`LDFLAGS' - Extra flags to give to compilers when they are supposed to invoke - the linker, `ld'. - -`LFLAGS' - Extra flags to give to Lex. - -`PFLAGS' - Extra flags to give to the Pascal compiler. - -`RFLAGS' - Extra flags to give to the Fortran compiler for Ratfor programs. - -`YFLAGS' - Extra flags to give to Yacc. - - -File: make.info, Node: Chained Rules, Next: Pattern Rules, Prev: Implicit Variables, Up: Implicit Rules - -Chains of Implicit Rules -======================== - - Sometimes a file can be made by a sequence of implicit rules. For -example, a file `N.o' could be made from `N.y' by running first Yacc -and then `cc'. Such a sequence is called a "chain". - - If the file `N.c' exists, or is mentioned in the makefile, no -special searching is required: `make' finds that the object file can be -made by C compilation from `N.c'; later on, when considering how to -make `N.c', the rule for running Yacc is used. Ultimately both `N.c' -and `N.o' are updated. - - However, even if `N.c' does not exist and is not mentioned, `make' -knows how to envision it as the missing link between `N.o' and `N.y'! -In this case, `N.c' is called an "intermediate file". Once `make' has -decided to use the intermediate file, it is entered in the data base as -if it had been mentioned in the makefile, along with the implicit rule -that says how to create it. - - Intermediate files are remade using their rules just like all other -files. The difference is that the intermediate file is deleted when -`make' is finished. Therefore, the intermediate file which did not -exist before `make' also does not exist after `make'. The deletion is -reported to you by printing a `rm -f' command that shows what `make' is -doing. (You can list the target pattern of an implicit rule (such as -`%.o') as a dependency of the special target `.PRECIOUS' to preserve -intermediate files made by implicit rules whose target patterns match -that file's name; see *Note Interrupts::.) - - A chain can involve more than two implicit rules. For example, it is -possible to make a file `foo' from `RCS/foo.y,v' by running RCS, Yacc -and `cc'. Then both `foo.y' and `foo.c' are intermediate files that -are deleted at the end. - - No single implicit rule can appear more than once in a chain. This -means that `make' will not even consider such a ridiculous thing as -making `foo' from `foo.o.o' by running the linker twice. This -constraint has the added benefit of preventing any infinite loop in the -search for an implicit rule chain. - - There are some special implicit rules to optimize certain cases that -would otherwise be handled by rule chains. For example, making `foo' -from `foo.c' could be handled by compiling and linking with separate -chained rules, using `foo.o' as an intermediate file. But what -actually happens is that a special rule for this case does the -compilation and linking with a single `cc' command. The optimized rule -is used in preference to the step-by-step chain because it comes -earlier in the ordering of rules. - - -File: make.info, Node: Pattern Rules, Next: Last Resort, Prev: Chained Rules, Up: Implicit Rules - -Defining and Redefining Pattern Rules -===================================== - - You define an implicit rule by writing a "pattern rule". A pattern -rule looks like an ordinary rule, except that its target contains the -character `%' (exactly one of them). The target is considered a -pattern for matching file names; the `%' can match any nonempty -substring, while other characters match only themselves. The -dependencies likewise use `%' to show how their names relate to the -target name. - - Thus, a pattern rule `%.o : %.c' says how to make any file `STEM.o' -from another file `STEM.c'. - - Note that expansion using `%' in pattern rules occurs *after* any -variable or function expansions, which take place when the makefile is -read. *Note How to Use Variables: Using Variables, and *Note Functions -for Transforming Text: Functions. - -* Menu: - -* Pattern Intro:: An introduction to pattern rules. -* Pattern Examples:: Examples of pattern rules. -* Automatic:: How to use automatic variables in the - commands of implicit rules. -* Pattern Match:: How patterns match. -* Match-Anything Rules:: Precautions you should take prior to - defining rules that can match any - target file whatever. -* Canceling Rules:: How to override or cancel built-in rules. - - -File: make.info, Node: Pattern Intro, Next: Pattern Examples, Up: Pattern Rules - -Introduction to Pattern Rules ------------------------------ - - A pattern rule contains the character `%' (exactly one of them) in -the target; otherwise, it looks exactly like an ordinary rule. The -target is a pattern for matching file names; the `%' matches any -nonempty substring, while other characters match only themselves. - - For example, `%.c' as a pattern matches any file name that ends in -`.c'. `s.%.c' as a pattern matches any file name that starts with -`s.', ends in `.c' and is at least five characters long. (There must -be at least one character to match the `%'.) The substring that the -`%' matches is called the "stem". - - `%' in a dependency of a pattern rule stands for the same stem that -was matched by the `%' in the target. In order for the pattern rule to -apply, its target pattern must match the file name under consideration, -and its dependency patterns must name files that exist or can be made. -These files become dependencies of the target. - - Thus, a rule of the form - - %.o : %.c ; COMMAND... - -specifies how to make a file `N.o', with another file `N.c' as its -dependency, provided that `N.c' exists or can be made. - - There may also be dependencies that do not use `%'; such a dependency -attaches to every file made by this pattern rule. These unvarying -dependencies are useful occasionally. - - A pattern rule need not have any dependencies that contain `%', or -in fact any dependencies at all. Such a rule is effectively a general -wildcard. It provides a way to make any file that matches the target -pattern. *Note Last Resort::. - - Pattern rules may have more than one target. Unlike normal rules, -this does not act as many different rules with the same dependencies and -commands. If a pattern rule has multiple targets, `make' knows that -the rule's commands are responsible for making all of the targets. The -commands are executed only once to make all the targets. When searching -for a pattern rule to match a target, the target patterns of a rule -other than the one that matches the target in need of a rule are -incidental: `make' worries only about giving commands and dependencies -to the file presently in question. However, when this file's commands -are run, the other targets are marked as having been updated themselves. - - The order in which pattern rules appear in the makefile is important -since this is the order in which they are considered. Of equally -applicable rules, only the first one found is used. The rules you -write take precedence over those that are built in. Note however, that -a rule whose dependencies actually exist or are mentioned always takes -priority over a rule with dependencies that must be made by chaining -other implicit rules. - - -File: make.info, Node: Pattern Examples, Next: Automatic, Prev: Pattern Intro, Up: Pattern Rules - -Pattern Rule Examples ---------------------- - - Here are some examples of pattern rules actually predefined in -`make'. First, the rule that compiles `.c' files into `.o' files: - - %.o : %.c - $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ - -defines a rule that can make any file `X.o' from `X.c'. The command -uses the automatic variables `$@' and `$<' to substitute the names of -the target file and the source file in each case where the rule applies -(*note Automatic Variables: Automatic.). - - Here is a second built-in rule: - - % :: RCS/%,v - $(CO) $(COFLAGS) $< - -defines a rule that can make any file `X' whatsoever from a -corresponding file `X,v' in the subdirectory `RCS'. Since the target -is `%', this rule will apply to any file whatever, provided the -appropriate dependency file exists. The double colon makes the rule -"terminal", which means that its dependency may not be an intermediate -file (*note Match-Anything Pattern Rules: Match-Anything Rules.). - - This pattern rule has two targets: - - %.tab.c %.tab.h: %.y - bison -d $< - -This tells `make' that the command `bison -d X.y' will make both -`X.tab.c' and `X.tab.h'. If the file `foo' depends on the files -`parse.tab.o' and `scan.o' and the file `scan.o' depends on the file -`parse.tab.h', when `parse.y' is changed, the command `bison -d parse.y' -will be executed only once, and the dependencies of both `parse.tab.o' -and `scan.o' will be satisfied. (Presumably the file `parse.tab.o' -will be recompiled from `parse.tab.c' and the file `scan.o' from -`scan.c', while `foo' is linked from `parse.tab.o', `scan.o', and its -other dependencies, and it will execute happily ever after.) - - -File: make.info, Node: Automatic, Next: Pattern Match, Prev: Pattern Examples, Up: Pattern Rules - -Automatic Variables -------------------- - - Suppose you are writing a pattern rule to compile a `.c' file into a -`.o' file: how do you write the `cc' command so that it operates on the -right source file name? You cannot write the name in the command, -because the name is different each time the implicit rule is applied. - - What you do is use a special feature of `make', the "automatic -variables". These variables have values computed afresh for each rule -that is executed, based on the target and dependencies of the rule. In -this example, you would use `$@' for the object file name and `$<' for -the source file name. - - Here is a table of automatic variables: - -`$@' - The file name of the target of the rule. If the target is an - archive member, then `$@' is the name of the archive file. In a - pattern rule that has multiple targets (*note Introduction to - Pattern Rules: Pattern Intro.), `$@' is the name of whichever - target caused the rule's commands to be run. - -`$%' - The target member name, when the target is an archive member. - *Note Archives::. For example, if the target is `foo.a(bar.o)' - then `$%' is `bar.o' and `$@' is `foo.a'. `$%' is empty when the - target is not an archive member. - -`$<' - The name of the first dependency. If the target got its commands - from an implicit rule, this will be the first dependency added by - the implicit rule (*note Implicit Rules::.). - -`$?' - The names of all the dependencies that are newer than the target, - with spaces between them. For dependencies which are archive - members, only the member named is used (*note Archives::.). - -`$^' - The names of all the dependencies, with spaces between them. For - dependencies which are archive members, only the member named is - used (*note Archives::.). A target has only one dependency on - each other file it depends on, no matter how many times each file - is listed as a dependency. So if you list a dependency more than - once for a target, the value of `$^' contains just one copy of the - name. - -`$+' - This is like `$^', but dependencies listed more than once are - duplicated in the order they were listed in the makefile. This is - primarily useful for use in linking commands where it is - meaningful to repeat library file names in a particular order. - -`$*' - The stem with which an implicit rule matches (*note How Patterns - Match: Pattern Match.). If the target is `dir/a.foo.b' and the - target pattern is `a.%.b' then the stem is `dir/foo'. The stem is - useful for constructing names of related files. - - In a static pattern rule, the stem is part of the file name that - matched the `%' in the target pattern. - - In an explicit rule, there is no stem; so `$*' cannot be determined - in that way. Instead, if the target name ends with a recognized - suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), `$*' is - set to the target name minus the suffix. For example, if the - target name is `foo.c', then `$*' is set to `foo', since `.c' is a - suffix. GNU `make' does this bizarre thing only for compatibility - with other implementations of `make'. You should generally avoid - using `$*' except in implicit rules or static pattern rules. - - If the target name in an explicit rule does not end with a - recognized suffix, `$*' is set to the empty string for that rule. - - `$?' is useful even in explicit rules when you wish to operate on -only the dependencies that have changed. For example, suppose that an -archive named `lib' is supposed to contain copies of several object -files. This rule copies just the changed object files into the archive: - - lib: foo.o bar.o lose.o win.o - ar r lib $? - - Of the variables listed above, four have values that are single file -names, and two have values that are lists of file names. These six have -variants that get just the file's directory name or just the file name -within the directory. The variant variables' names are formed by -appending `D' or `F', respectively. These variants are semi-obsolete -in GNU `make' since the functions `dir' and `notdir' can be used to get -a similar effect (*note Functions for File Names: Filename Functions.). -Note, however, that the `F' variants all omit the trailing slash which -always appears in the output of the `dir' function. Here is a table of -the variants: - -`$(@D)' - The directory part of the file name of the target, with the - trailing slash removed. If the value of `$@' is `dir/foo.o' then - `$(@D)' is `dir'. This value is `.' if `$@' does not contain a - slash. - -`$(@F)' - The file-within-directory part of the file name of the target. If - the value of `$@' is `dir/foo.o' then `$(@F)' is `foo.o'. `$(@F)' - is equivalent to `$(notdir $@)'. - -`$(*D)' -`$(*F)' - The directory part and the file-within-directory part of the stem; - `dir' and `foo' in this example. - -`$(%D)' -`$(%F)' - The directory part and the file-within-directory part of the target - archive member name. This makes sense only for archive member - targets of the form `ARCHIVE(MEMBER)' and is useful only when - MEMBER may contain a directory name. (*Note Archive Members as - Targets: Archive Members.) - -`$( foo.1 - -will fail when the current directory is not the source directory, -because `foo.man' and `sedscript' are not in the current directory. - - When using GNU `make', relying on `VPATH' to find the source file -will work in the case where there is a single dependency file, since -the `make' automatic variable `$<' will represent the source file -wherever it is. (Many versions of `make' set `$<' only in implicit -rules.) A makefile target like - - foo.o : bar.c - $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o - -should instead be written as - - foo.o : bar.c - $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@ - -in order to allow `VPATH' to work correctly. When the target has -multiple dependencies, using an explicit `$(srcdir)' is the easiest way -to make the rule work well. For example, the target above for `foo.1' -is best written as: - - foo.1 : foo.man sedscript - sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@ - - -File: make.info, Node: Utilities in Makefiles, Next: Standard Targets, Prev: Makefile Basics, Up: Makefile Conventions - -Utilities in Makefiles -====================== - - Write the Makefile commands (and any shell scripts, such as -`configure') to run in `sh', not in `csh'. Don't use any special -features of `ksh' or `bash'. - - The `configure' script and the Makefile rules for building and -installation should not use any utilities directly except these: - - cat cmp cp echo egrep expr grep - ln mkdir mv pwd rm rmdir sed test touch - - Stick to the generally supported options for these programs. For -example, don't use `mkdir -p', convenient as it may be, because most -systems don't support it. - - The Makefile rules for building and installation can also use -compilers and related programs, but should do so via `make' variables -so that the user can substitute alternatives. Here are some of the -programs we mean: - - ar bison cc flex install ld lex - make makeinfo ranlib texi2dvi yacc - - Use the following `make' variables: - - $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX) - $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) - - When you use `ranlib', you should make sure nothing bad happens if -the system does not have `ranlib'. Arrange to ignore an error from -that command, and print a message before the command to tell the user -that failure of the `ranlib' command does not mean a problem. - - If you use symbolic links, you should implement a fallback for -systems that don't have symbolic links. - - It is ok to use other utilities in Makefile portions (or scripts) -intended only for particular systems where you know those utilities to -exist. - - -File: make.info, Node: Standard Targets, Next: Command Variables, Prev: Utilities in Makefiles, Up: Makefile Conventions - -Standard Targets for Users -========================== - - All GNU programs should have the following targets in their -Makefiles: - -`all' - Compile the entire program. This should be the default target. - This target need not rebuild any documentation files; Info files - should normally be included in the distribution, and DVI files - should be made only when explicitly asked for. - -`install' - Compile the program and copy the executables, libraries, and so on - to the file names where they should reside for actual use. If - there is a simple test to verify that a program is properly - installed, this target should run that test. - - If possible, write the `install' target rule so that it does not - modify anything in the directory where the program was built, - provided `make all' has just been done. This is convenient for - building the program under one user name and installing it under - another. - - The commands should create all the directories in which files are - to be installed, if they don't already exist. This includes the - directories specified as the values of the variables `prefix' and - `exec_prefix', as well as all subdirectories that are needed. One - way to do this is by means of an `installdirs' target as described - below. - - Use `-' before any command for installing a man page, so that - `make' will ignore any errors. This is in case there are systems - that don't have the Unix man page documentation system installed. - - The way to install Info files is to copy them into `$(infodir)' - with `$(INSTALL_DATA)' (*note Command Variables::.), and then run - the `install-info' program if it is present. `install-info' is a - script that edits the Info `dir' file to add or update the menu - entry for the given Info file; it will be part of the Texinfo - package. Here is a sample rule to install an Info file: - - $(infodir)/foo.info: foo.info - # There may be a newer info file in . than in srcdir. - -if test -f foo.info; then d=.; \ - else d=$(srcdir); fi; \ - $(INSTALL_DATA) $$d/foo.info $@; \ - # Run install-info only if it exists. - # Use `if' instead of just prepending `-' to the - # line so we notice real errors from install-info. - # We use `$(SHELL) -c' because some shells do not - # fail gracefully when there is an unknown command. - if $(SHELL) -c 'install-info --version' \ - >/dev/null 2>&1; then \ - install-info --infodir=$(infodir) $$d/foo.info; \ - else true; fi - -`uninstall' - Delete all the installed files that the `install' target would - create (but not the noninstalled files such as `make all' would - create). - - This rule should not modify the directories where compilation is - done, only the directories where files are installed. - -`clean' - Delete all files from the current directory that are normally - created by building the program. Don't delete the files that - record the configuration. Also preserve files that could be made - by building, but normally aren't because the distribution comes - with them. - - Delete `.dvi' files here if they are not part of the distribution. - -`distclean' - Delete all files from the current directory that are created by - configuring or building the program. If you have unpacked the - source and built the program without creating any other files, - `make distclean' should leave only the files that were in the - distribution. - -`mostlyclean' - Like `clean', but may refrain from deleting a few files that people - normally don't want to recompile. For example, the `mostlyclean' - target for GCC does not delete `libgcc.a', because recompiling it - is rarely necessary and takes a lot of time. - -`maintainer-clean' - Delete almost everything from the current directory that can be - reconstructed with this Makefile. This typically includes - everything deleted by `distclean', plus more: C source files - produced by Bison, tags tables, Info files, and so on. - - The reason we say "almost everything" is that `make - maintainer-clean' should not delete `configure' even if - `configure' can be remade using a rule in the Makefile. More - generally, `make maintainer-clean' should not delete anything that - needs to exist in order to run `configure' and then begin to build - the program. This is the only exception; `maintainer-clean' should - delete everything else that can be rebuilt. - - The `maintainer-clean' is intended to be used by a maintainer of - the package, not by ordinary users. You may need special tools to - reconstruct some of the files that `make maintainer-clean' deletes. - Since these files are normally included in the distribution, we - don't take care to make them easy to reconstruct. If you find you - need to unpack the full distribution again, don't blame us. - - To help make users aware of this, the commands for - `maintainer-clean' should start with these two: - - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -`TAGS' - Update a tags table for this program. - -`info' - Generate any Info files needed. The best way to write the rules - is as follows: - - info: foo.info - - foo.info: foo.texi chap1.texi chap2.texi - $(MAKEINFO) $(srcdir)/foo.texi - - You must define the variable `MAKEINFO' in the Makefile. It should - run the `makeinfo' program, which is part of the Texinfo - distribution. - -`dvi' - Generate DVI files for all TeXinfo documentation. For example: - - dvi: foo.dvi - - foo.dvi: foo.texi chap1.texi chap2.texi - $(TEXI2DVI) $(srcdir)/foo.texi - - You must define the variable `TEXI2DVI' in the Makefile. It should - run the program `texi2dvi', which is part of the Texinfo - distribution. Alternatively, write just the dependencies, and - allow GNU Make to provide the command. - -`dist' - Create a distribution tar file for this program. The tar file - should be set up so that the file names in the tar file start with - a subdirectory name which is the name of the package it is a - distribution for. This name can include the version number. - - For example, the distribution tar file of GCC version 1.40 unpacks - into a subdirectory named `gcc-1.40'. - - The easiest way to do this is to create a subdirectory - appropriately named, use `ln' or `cp' to install the proper files - in it, and then `tar' that subdirectory. - - The `dist' target should explicitly depend on all non-source files - that are in the distribution, to make sure they are up to date in - the distribution. *Note Making Releases: (standards)Releases. - -`check' - Perform self-tests (if any). The user must build the program - before running the tests, but need not install the program; you - should write the self-tests so that they work when the program is - built but not installed. - - The following targets are suggested as conventional names, for -programs in which they are useful. - -`installcheck' - Perform installation tests (if any). The user must build and - install the program before running the tests. You should not - assume that `$(bindir)' is in the search path. - -`installdirs' - It's useful to add a target named `installdirs' to create the - directories where files are installed, and their parent - directories. There is a script called `mkinstalldirs' which is - convenient for this; find it in the Texinfo package.You can use a - rule like this: - - # Make sure all installation directories (e.g. $(bindir)) - # actually exist by making them if necessary. - installdirs: mkinstalldirs - $(srcdir)/mkinstalldirs $(bindir) $(datadir) \ - $(libdir) $(infodir) \ - $(mandir) - - This rule should not modify the directories where compilation is - done. It should do nothing but create installation directories. - - -File: make.info, Node: Command Variables, Next: Directory Variables, Prev: Standard Targets, Up: Makefile Conventions - -Variables for Specifying Commands -================================= - - Makefiles should provide variables for overriding certain commands, -options, and so on. - - In particular, you should run most utility programs via variables. -Thus, if you use Bison, have a variable named `BISON' whose default -value is set with `BISON = bison', and refer to it with `$(BISON)' -whenever you need to use Bison. - - File management utilities such as `ln', `rm', `mv', and so on, need -not be referred to through variables in this way, since users don't -need to replace them with other programs. - - Each program-name variable should come with an options variable that -is used to supply options to the program. Append `FLAGS' to the -program-name variable name to get the options variable name--for -example, `BISONFLAGS'. (The name `CFLAGS' is an exception to this -rule, but we keep it because it is standard.) Use `CPPFLAGS' in any -compilation command that runs the preprocessor, and use `LDFLAGS' in -any compilation command that does linking as well as in any direct use -of `ld'. - - If there are C compiler options that *must* be used for proper -compilation of certain files, do not include them in `CFLAGS'. Users -expect to be able to specify `CFLAGS' freely themselves. Instead, -arrange to pass the necessary options to the C compiler independently -of `CFLAGS', by writing them explicitly in the compilation commands or -by defining an implicit rule, like this: - - CFLAGS = -g - ALL_CFLAGS = -I. $(CFLAGS) - .c.o: - $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< - - Do include the `-g' option in `CFLAGS', because that is not -*required* for proper compilation. You can consider it a default that -is only recommended. If the package is set up so that it is compiled -with GCC by default, then you might as well include `-O' in the default -value of `CFLAGS' as well. - - Put `CFLAGS' last in the compilation command, after other variables -containing compiler options, so the user can use `CFLAGS' to override -the others. - - Every Makefile should define the variable `INSTALL', which is the -basic command for installing a file into the system. - - Every Makefile should also define the variables `INSTALL_PROGRAM' -and `INSTALL_DATA'. (The default for each of these should be -`$(INSTALL)'.) Then it should use those variables as the commands for -actual installation, for executables and nonexecutables respectively. -Use these variables as follows: - - $(INSTALL_PROGRAM) foo $(bindir)/foo - $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a - -Always use a file name, not a directory name, as the second argument of -the installation commands. Use a separate command for each file to be -installed. - diff --git a/buildtools/windows/source/make/make.info-7 b/buildtools/windows/source/make/make.info-7 deleted file mode 100644 index 843095c0a9b..00000000000 --- a/buildtools/windows/source/make/make.info-7 +++ /dev/null @@ -1,727 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: make.info, Node: Directory Variables, Prev: Command Variables, Up: Makefile Conventions - -Variables for Installation Directories -====================================== - - Installation directories should always be named by variables, so it -is easy to install in a nonstandard place. The standard names for these -variables are described below. They are based on a standard filesystem -layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and -other modern operating systems. - - These two variables set the root for the installation. All the other -installation directories should be subdirectories of one of these two, -and nothing should be directly installed into these two directories. - -`prefix' - A prefix used in constructing the default values of the variables - listed below. The default value of `prefix' should be `/usr/local' - When building the complete GNU system, the prefix will be empty and - `/usr' will be a symbolic link to `/'. - -`exec_prefix' - A prefix used in constructing the default values of some of the - variables listed below. The default value of `exec_prefix' should - be `$(prefix)'. - - Generally, `$(exec_prefix)' is used for directories that contain - machine-specific files (such as executables and subroutine - libraries), while `$(prefix)' is used directly for other - directories. - - Executable programs are installed in one of the following -directories. - -`bindir' - The directory for installing executable programs that users can - run. This should normally be `/usr/local/bin', but write it as - `$(exec_prefix)/bin'. - -`sbindir' - The directory for installing executable programs that can be run - from the shell, but are only generally useful to system - administrators. This should normally be `/usr/local/sbin', but - write it as `$(exec_prefix)/sbin'. - -`libexecdir' - The directory for installing executable programs to be run by other - programs rather than by users. This directory should normally be - `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'. - - Data files used by the program during its execution are divided into -categories in two ways. - - * Some files are normally modified by programs; others are never - normally modified (though users may edit some of these). - - * Some files are architecture-independent and can be shared by all - machines at a site; some are architecture-dependent and can be - shared only by machines of the same kind and operating system; - others may never be shared between two machines. - - This makes for six different possibilities. However, we want to -discourage the use of architecture-dependent files, aside from of object -files and libraries. It is much cleaner to make other data files -architecture-independent, and it is generally not hard. - - Therefore, here are the variables makefiles should use to specify -directories: - -`datadir' - The directory for installing read-only architecture independent - data files. This should normally be `/usr/local/share', but write - it as `$(prefix)/share'. As a special exception, see `$(infodir)' - and `$(includedir)' below. - -`sysconfdir' - The directory for installing read-only data files that pertain to a - single machine-that is to say, files for configuring a host. - Mailer and network configuration files, `/etc/passwd', and so - forth belong here. All the files in this directory should be - ordinary ASCII text files. This directory should normally be - `/usr/local/etc', but write it as `$(prefix)/etc'. - - Do not install executables in this directory (they probably belong - in `$(libexecdir)' or `$(sbindir))'. Also do not install files - that are modified in the normal course of their use (programs - whose purpose is to change the configuration of the system - excluded). Those probably belong in `$(localstatedir)'. - -`sharedstatedir' - The directory for installing architecture-independent data files - which the programs modify while they run. This should normally be - `/usr/local/com', but write it as `$(prefix)/com'. - -`localstatedir' - The directory for installing data files which the programs modify - while they run, and that pertain to one specific machine. Users - should never need to modify files in this directory to configure - the package's operation; put such configuration information in - separate files that go in `datadir' or `$(sysconfdir)'. - `$(localstatedir)' should normally be `/usr/local/var', but write - it as `$(prefix)/var'. - -`libdir' - The directory for object files and libraries of object code. Do - not install executables here, they probably belong in - `$(libexecdir)' instead. The value of `libdir' should normally be - `/usr/local/lib', but write it as `$(exec_prefix)/lib'. - -`infodir' - The directory for installing the Info files for this package. By - default, it should be `/usr/local/info', but it should be written - as `$(prefix)/info'. - -`includedir' - The directory for installing header files to be included by user - programs with the C `#include' preprocessor directive. This - should normally be `/usr/local/include', but write it as - `$(prefix)/include'. - - Most compilers other than GCC do not look for header files in - `/usr/local/include'. So installing the header files this way is - only useful with GCC. Sometimes this is not a problem because some - libraries are only really intended to work with GCC. But some - libraries are intended to work with other compilers. They should - install their header files in two places, one specified by - `includedir' and one specified by `oldincludedir'. - -`oldincludedir' - The directory for installing `#include' header files for use with - compilers other than GCC. This should normally be `/usr/include'. - - The Makefile commands should check whether the value of - `oldincludedir' is empty. If it is, they should not try to use - it; they should cancel the second installation of the header files. - - A package should not replace an existing header in this directory - unless the header came from the same package. Thus, if your Foo - package provides a header file `foo.h', then it should install the - header file in the `oldincludedir' directory if either (1) there - is no `foo.h' there or (2) the `foo.h' that exists came from the - Foo package. - - To tell whether `foo.h' came from the Foo package, put a magic - string in the file--part of a comment--and grep for that string. - - Unix-style man pages are installed in one of the following: - -`mandir' - The directory for installing the man pages (if any) for this - package. It should include the suffix for the proper section of - the manual--usually `1' for a utility. It will normally be - `/usr/local/man/man1', but you should write it as - `$(prefix)/man/man1'. - -`man1dir' - The directory for installing section 1 man pages. - -`man2dir' - The directory for installing section 2 man pages. - -`...' - Use these names instead of `mandir' if the package needs to - install man pages in more than one section of the manual. - - *Don't make the primary documentation for any GNU software be a - man page. Write a manual in Texinfo instead. Man pages are just - for the sake of people running GNU software on Unix, which is a - secondary application only.* - -`manext' - The file name extension for the installed man page. This should - contain a period followed by the appropriate digit; it should - normally be `.1'. - -`man1ext' - The file name extension for installed section 1 man pages. - -`man2ext' - The file name extension for installed section 2 man pages. - -`...' - Use these names instead of `manext' if the package needs to - install man pages in more than one section of the manual. - - And finally, you should set the following variable: - -`srcdir' - The directory for the sources being compiled. The value of this - variable is normally inserted by the `configure' shell script. - - For example: - - # Common prefix for installation directories. - # NOTE: This directory must exist when you start the install. - prefix = /usr/local - exec_prefix = $(prefix) - # Where to put the executable for the command `gcc'. - bindir = $(exec_prefix)/bin - # Where to put the directories used by the compiler. - libexecdir = $(exec_prefix)/libexec - # Where to put the Info files. - infodir = $(prefix)/info - - If your program installs a large number of files into one of the -standard user-specified directories, it might be useful to group them -into a subdirectory particular to that program. If you do this, you -should write the `install' rule to create these subdirectories. - - Do not expect the user to include the subdirectory name in the value -of any of the variables listed above. The idea of having a uniform set -of variable names for installation directories is to enable the user to -specify the exact same values for several different GNU packages. In -order for this to be useful, all the packages must be designed so that -they will work sensibly when the user does so. - - -File: make.info, Node: Quick Reference, Next: Complex Makefile, Prev: Makefile Conventions, Up: Top - -Quick Reference -*************** - - This appendix summarizes the directives, text manipulation functions, -and special variables which GNU `make' understands. *Note Special -Targets::, *Note Catalogue of Implicit Rules: Catalogue of Rules, and -*Note Summary of Options: Options Summary, for other summaries. - - Here is a summary of the directives GNU `make' recognizes: - -`define VARIABLE' -`endef' - Define a multi-line, recursively-expanded variable. - *Note Sequences::. - -`ifdef VARIABLE' -`ifndef VARIABLE' -`ifeq (A,B)' -`ifeq "A" "B"' -`ifeq 'A' 'B'' -`ifneq (A,B)' -`ifneq "A" "B"' -`ifneq 'A' 'B'' -`else' -`endif' - Conditionally evaluate part of the makefile. - *Note Conditionals::. - -`include FILE' - Include another makefile. - *Note Including Other Makefiles: Include. - -`override VARIABLE = VALUE' -`override VARIABLE := VALUE' -`override VARIABLE += VALUE' -`override define VARIABLE' -`endef' - Define a variable, overriding any previous definition, even one - from the command line. - *Note The `override' Directive: Override Directive. - -`export' - Tell `make' to export all variables to child processes by default. - *Note Communicating Variables to a Sub-`make': Variables/Recursion. - -`export VARIABLE' -`export VARIABLE = VALUE' -`export VARIABLE := VALUE' -`export VARIABLE += VALUE' -`unexport VARIABLE' - Tell `make' whether or not to export a particular variable to child - processes. - *Note Communicating Variables to a Sub-`make': Variables/Recursion. - -`vpath PATTERN PATH' - Specify a search path for files matching a `%' pattern. - *Note The `vpath' Directive: Selective Search. - -`vpath PATTERN' - Remove all search paths previously specified for PATTERN. - -`vpath' - Remove all search paths previously specified in any `vpath' - directive. - - Here is a summary of the text manipulation functions (*note -Functions::.): - -`$(subst FROM,TO,TEXT)' - Replace FROM with TO in TEXT. - *Note Functions for String Substitution and Analysis: Text - Functions. - -`$(patsubst PATTERN,REPLACEMENT,TEXT)' - Replace words matching PATTERN with REPLACEMENT in TEXT. - *Note Functions for String Substitution and Analysis: Text - Functions. - -`$(strip STRING)' - Remove excess whitespace characters from STRING. - *Note Functions for String Substitution and Analysis: Text - Functions. - -`$(findstring FIND,TEXT)' - Locate FIND in TEXT. - *Note Functions for String Substitution and Analysis: Text - Functions. - -`$(filter PATTERN...,TEXT)' - Select words in TEXT that match one of the PATTERN words. - *Note Functions for String Substitution and Analysis: Text - Functions. - -`$(filter-out PATTERN...,TEXT)' - Select words in TEXT that *do not* match any of the PATTERN words. - *Note Functions for String Substitution and Analysis: Text - Functions. - -`$(sort LIST)' - Sort the words in LIST lexicographically, removing duplicates. - *Note Functions for String Substitution and Analysis: Text - Functions. - -`$(dir NAMES...)' - Extract the directory part of each file name. - *Note Functions for File Names: Filename Functions. - -`$(notdir NAMES...)' - Extract the non-directory part of each file name. - *Note Functions for File Names: Filename Functions. - -`$(suffix NAMES...)' - Extract the suffix (the last `.' and following characters) of each - file name. - *Note Functions for File Names: Filename Functions. - -`$(basename NAMES...)' - Extract the base name (name without suffix) of each file name. - *Note Functions for File Names: Filename Functions. - -`$(addsuffix SUFFIX,NAMES...)' - Append SUFFIX to each word in NAMES. - *Note Functions for File Names: Filename Functions. - -`$(addprefix PREFIX,NAMES...)' - Prepend PREFIX to each word in NAMES. - *Note Functions for File Names: Filename Functions. - -`$(join LIST1,LIST2)' - Join two parallel lists of words. - *Note Functions for File Names: Filename Functions. - -`$(word N,TEXT)' - Extract the Nth word (one-origin) of TEXT. - *Note Functions for File Names: Filename Functions. - -`$(words TEXT)' - Count the number of words in TEXT. - *Note Functions for File Names: Filename Functions. - -`$(firstword NAMES...)' - Extract the first word of NAMES. - *Note Functions for File Names: Filename Functions. - -`$(wildcard PATTERN...)' - Find file names matching a shell file name pattern (*not* a `%' - pattern). - *Note The Function `wildcard': Wildcard Function. - -`$(shell COMMAND)' - Execute a shell command and return its output. - *Note The `shell' Function: Shell Function. - -`$(origin VARIABLE)' - Return a string describing how the `make' variable VARIABLE was - defined. - *Note The `origin' Function: Origin Function. - -`$(foreach VAR,WORDS,TEXT)' - Evaluate TEXT with VAR bound to each word in WORDS, and - concatenate the results. - *Note The `foreach' Function: Foreach Function. - - Here is a summary of the automatic variables. *Note Automatic -Variables: Automatic, for full information. - -`$@' - The file name of the target. - -`$%' - The target member name, when the target is an archive member. - -`$<' - The name of the first dependency. - -`$?' - The names of all the dependencies that are newer than the target, - with spaces between them. For dependencies which are archive - members, only the member named is used (*note Archives::.). - -`$^' -`$+' - The names of all the dependencies, with spaces between them. For - dependencies which are archive members, only the member named is - used (*note Archives::.). The value of `$^' omits duplicate - dependencies, while `$+' retains them and preserves their order. - -`$*' - The stem with which an implicit rule matches (*note How Patterns - Match: Pattern Match.). - -`$(@D)' -`$(@F)' - The directory part and the file-within-directory part of `$@'. - -`$(*D)' -`$(*F)' - The directory part and the file-within-directory part of `$*'. - -`$(%D)' -`$(%F)' - The directory part and the file-within-directory part of `$%'. - -`$( tar-`sed -e '/version_string/!d' \ - -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \ - -e q - version.c`.shar.Z - - dist: $(SRCS) $(AUX) - echo tar-`sed \ - -e '/version_string/!d' \ - -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \ - -e q - version.c` > .fname - -rm -rf `cat .fname` - mkdir `cat .fname` - ln $(SRCS) $(AUX) `cat .fname` - -rm -rf `cat .fname` .fname - tar chZf `cat .fname`.tar.Z `cat .fname` - - tar.zoo: $(SRCS) $(AUX) - -rm -rf tmp.dir - -mkdir tmp.dir - -rm tar.zoo - for X in $(SRCS) $(AUX) ; do \ - echo $$X ; \ - sed 's/$$/^M/' $$X \ - > tmp.dir/$$X ; done - cd tmp.dir ; zoo aM ../tar.zoo * - -rm -rf tmp.dir - diff --git a/buildtools/windows/source/make/make.info-8 b/buildtools/windows/source/make/make.info-8 deleted file mode 100644 index f2c5def3abc..00000000000 --- a/buildtools/windows/source/make/make.info-8 +++ /dev/null @@ -1,896 +0,0 @@ -This is Info file make.info, produced by Makeinfo-1.55 from the input -file ./make.texinfo. - - This file documents the GNU Make utility, which determines -automatically which pieces of a large program need to be recompiled, -and issues the commands to recompile them. - - This is Edition 0.48, last updated 4 April 1995, of `The GNU Make -Manual', for `make', Version 3.73 Beta. - - Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95 Free -Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: make.info, Node: Concept Index, Next: Name Index, Prev: Complex Makefile, Up: Top - -Index of Concepts -***************** - -* Menu: - -* +, and define: Sequences. -* +=: Appending. -* ,v (RCS file extension): Catalogue of Rules. -* -, and define: Sequences. -* .C: Catalogue of Rules. -* .c: Catalogue of Rules. -* .cc: Catalogue of Rules. -* .ch: Catalogue of Rules. -* .def: Catalogue of Rules. -* .dvi: Catalogue of Rules. -* .F: Catalogue of Rules. -* .f: Catalogue of Rules. -* .info: Catalogue of Rules. -* .l: Catalogue of Rules. -* .ln: Catalogue of Rules. -* .mod: Catalogue of Rules. -* .o: Catalogue of Rules. -* .o: Catalogue of Rules. -* .p: Catalogue of Rules. -* .r: Catalogue of Rules. -* .S: Catalogue of Rules. -* .s: Catalogue of Rules. -* .sh: Catalogue of Rules. -* .sym: Catalogue of Rules. -* .tex: Catalogue of Rules. -* .texi: Catalogue of Rules. -* .texinfo: Catalogue of Rules. -* .txinfo: Catalogue of Rules. -* .w: Catalogue of Rules. -* .web: Catalogue of Rules. -* .y: Catalogue of Rules. -* :=: Setting. -* :=: Flavors. -* =: Flavors. -* =: Setting. -* @, and define: Sequences. -* #include: Automatic Dependencies. -* # (comments), in commands: Commands. -* # (comments), in makefile: Makefile Contents. -* $, in function call: Syntax of Functions. -* $, in rules: Rule Syntax. -* $, in variable name: Computed Names. -* $, in variable reference: Reference. -* %, in pattern rules: Pattern Intro. -* %, quoting in patsubst: Text Functions. -* %, quoting in vpath: Selective Search. -* %, quoting in static pattern: Static Usage. -* %, quoting with \ (backslash): Selective Search. -* %, quoting with \ (backslash): Static Usage. -* %, quoting with \ (backslash): Text Functions. -* * (wildcard character): Wildcards. -* -assume-new: Options Summary. -* -assume-new: Instead of Execution. -* -assume-new, and recursion: Options/Recursion. -* -assume-old: Avoiding Compilation. -* -assume-old: Options Summary. -* -assume-old, and recursion: Options/Recursion. -* -debug: Options Summary. -* -directory: Options Summary. -* -directory: Recursion. -* -directory, and -print-directory: -w Option. -* -directory, and recursion: Options/Recursion. -* -dry-run: Echoing. -* -dry-run: Instead of Execution. -* -dry-run: Options Summary. -* -environment-overrides: Options Summary. -* -file: Options Summary. -* -file: Makefile Arguments. -* -file: Makefile Names. -* -file, and recursion: Options/Recursion. -* -help: Options Summary. -* -ignore-errors: Errors. -* -ignore-errors: Options Summary. -* -include-dir: Options Summary. -* -include-dir: Include. -* -jobs: Parallel. -* -jobs: Options Summary. -* -jobs, and recursion: Options/Recursion. -* -just-print: Options Summary. -* -just-print: Instead of Execution. -* -just-print: Echoing. -* -keep-going: Options Summary. -* -keep-going: Errors. -* -keep-going: Testing. -* -load-average: Options Summary. -* -load-average: Parallel. -* -makefile: Options Summary. -* -makefile: Makefile Arguments. -* -makefile: Makefile Names. -* -max-load: Options Summary. -* -max-load: Parallel. -* -new-file: Instead of Execution. -* -new-file: Options Summary. -* -new-file, and recursion: Options/Recursion. -* -no-builtin-rules: Options Summary. -* -no-keep-going: Options Summary. -* -no-print-directory: -w Option. -* -no-print-directory: Options Summary. -* -old-file: Avoiding Compilation. -* -old-file: Options Summary. -* -old-file, and recursion: Options/Recursion. -* -print-data-base: Options Summary. -* -print-directory: Options Summary. -* -print-directory, and -directory: -w Option. -* -print-directory, and recursion: -w Option. -* -print-directory, disabling: -w Option. -* -question: Instead of Execution. -* -question: Options Summary. -* -quiet: Echoing. -* -quiet: Options Summary. -* -recon: Options Summary. -* -recon: Echoing. -* -recon: Instead of Execution. -* -silent: Options Summary. -* -silent: Echoing. -* -stop: Options Summary. -* -touch: Instead of Execution. -* -touch: Options Summary. -* -touch, and recursion: MAKE Variable. -* -version: Options Summary. -* -warn-undefined-variables: Options Summary. -* -what-if: Instead of Execution. -* -what-if: Options Summary. -* -b: Options Summary. -* -C: Options Summary. -* -C: Recursion. -* -C, and -w: -w Option. -* -C, and recursion: Options/Recursion. -* -d: Options Summary. -* -e: Options Summary. -* -e (shell flag): Automatic Dependencies. -* -f: Makefile Arguments. -* -f: Makefile Names. -* -f: Options Summary. -* -f, and recursion: Options/Recursion. -* -h: Options Summary. -* -I: Options Summary. -* -i: Options Summary. -* -i: Errors. -* -I: Include. -* -j: Options Summary. -* -j: Parallel. -* -j, and archive update: Archive Pitfalls. -* -j, and recursion: Options/Recursion. -* -k: Errors. -* -k: Testing. -* -k: Options Summary. -* -l: Options Summary. -* -l (library search): Libraries/Search. -* -l (load average): Parallel. -* -MM (to GNU compiler): Automatic Dependencies. -* -m: Options Summary. -* -M (to compiler): Automatic Dependencies. -* -n: Echoing. -* -n: Instead of Execution. -* -n: Options Summary. -* -o: Avoiding Compilation. -* -o: Options Summary. -* -o, and recursion: Options/Recursion. -* -p: Options Summary. -* -q: Options Summary. -* -q: Instead of Execution. -* -r: Options Summary. -* -s: Echoing. -* -s: Options Summary. -* -S: Options Summary. -* -t: Options Summary. -* -t: Instead of Execution. -* -t, and recursion: MAKE Variable. -* -v: Options Summary. -* -w: Options Summary. -* -W: Options Summary. -* -W: Instead of Execution. -* -w, and -C: -w Option. -* -W, and recursion: Options/Recursion. -* -w, and recursion: -w Option. -* -w, disabling: -w Option. -* - (in commands): Errors. -* .a (archives): Archive Suffix Rules. -* .d: Automatic Dependencies. -* .PRECIOUS intermediate files: Chained Rules. -* :: rules (double-colon): Double-Colon. -* ? (wildcard character): Wildcards. -* @ (in commands): Echoing. -* all (standard target): Goals. -* cd (shell command): Execution. -* cd (shell command): MAKE Variable. -* check (standard target): Goals. -* clean (standard target): Goals. -* clean target: Cleanup. -* clean target: Simple Makefile. -* clobber (standard target): Goals. -* distclean (standard target): Goals. -* dist (standard target): Goals. -* FORCE: Force Targets. -* install (standard target): Goals. -* lint, rule to run: Catalogue of Rules. -* lpr (shell command): Wildcard Examples. -* lpr (shell command): Empty Targets. -* make depend: Automatic Dependencies. -* mostlyclean (standard target): Goals. -* OBJECTS: Variables Simplify. -* objects: Variables Simplify. -* objs: Variables Simplify. -* OBJS: Variables Simplify. -* obj: Variables Simplify. -* OBJ: Variables Simplify. -* print (standard target): Goals. -* print target: Empty Targets. -* print target: Wildcard Examples. -* README: Makefile Names. -* realclean (standard target): Goals. -* rm (shell command): Phony Targets. -* rm (shell command): Errors. -* rm (shell command): Simple Makefile. -* rm (shell command): Wildcard Examples. -* sed (shell command): Automatic Dependencies. -* shar (standard target): Goals. -* TAGS (standard target): Goals. -* tar (standard target): Goals. -* test (standard target): Goals. -* touch (shell command): Empty Targets. -* touch (shell command): Wildcard Examples. -* VPATH, and implicit rules: Implicit/Search. -* VPATH, and link libraries: Libraries/Search. -* yacc: Sequences. -* [...] (wildcard characters): Wildcards. -* \ (backslash), for continuation lines: Simple Makefile. -* \ (backslash), in commands: Execution. -* \ (backslash), to quote %: Text Functions. -* \ (backslash), to quote %: Static Usage. -* \ (backslash), to quote %: Selective Search. -* __.SYMDEF: Archive Symbols. -* ~ (tilde): Wildcards. -* TeX, rule to run: Catalogue of Rules. -* appending to variables: Appending. -* ar: Implicit Variables. -* archive: Archives. -* archive member targets: Archive Members. -* archive symbol directory updating: Archive Symbols. -* archive, and -j: Archive Pitfalls. -* archive, and parallel execution: Archive Pitfalls. -* archive, suffix rule for: Archive Suffix Rules. -* Arg list too long: Options/Recursion. -* arguments of functions: Syntax of Functions. -* as: Implicit Variables. -* as: Catalogue of Rules. -* assembly, rule to compile: Catalogue of Rules. -* automatic generation of dependencies: Include. -* automatic generation of dependencies: Automatic Dependencies. -* automatic variables: Automatic. -* backquotes: Shell Function. -* backslash (\), for continuation lines: Simple Makefile. -* backslash (\), in commands: Execution. -* backslash (\), to quote %: Text Functions. -* backslash (\), to quote %: Selective Search. -* backslash (\), to quote %: Static Usage. -* basename: Filename Functions. -* broken pipe: Parallel. -* bugs, reporting: Bugs. -* built-in special targets: Special Targets. -* C++, rule to compile: Catalogue of Rules. -* C, rule to compile: Catalogue of Rules. -* cc: Implicit Variables. -* cc: Catalogue of Rules. -* chains of rules: Chained Rules. -* cleaning up: Cleanup. -* co: Implicit Variables. -* co: Catalogue of Rules. -* combining rules by dependency: Combine By Dependency. -* command line variable definitions, and recursion: Options/Recursion. -* command line variables: Overriding. -* commands: Rule Syntax. -* commands, backslash (\) in: Execution. -* commands, comments in: Commands. -* commands, echoing: Echoing. -* commands, empty: Empty Commands. -* commands, errors in: Errors. -* commands, execution: Execution. -* commands, execution in parallel: Parallel. -* commands, expansion: Shell Function. -* commands, how to write: Commands. -* commands, instead of executing: Instead of Execution. -* commands, introduction to: Rule Introduction. -* commands, quoting newlines in: Execution. -* commands, sequences of: Sequences. -* comments, in commands: Commands. -* comments, in makefile: Makefile Contents. -* compatibility: Features. -* compatibility in exporting: Variables/Recursion. -* compilation, testing: Testing. -* computed variable name: Computed Names. -* conditionals: Conditionals. -* continuation lines: Simple Makefile. -* conventions for makefiles: Makefile Conventions. -* ctangle: Implicit Variables. -* ctangle: Catalogue of Rules. -* cweave: Catalogue of Rules. -* cweave: Implicit Variables. -* deducing commands (implicit rules): make Deduces. -* default goal: Rules. -* default goal: How Make Works. -* default makefile name: Makefile Names. -* default rules, last-resort: Last Resort. -* defining variables verbatim: Defining. -* deletion of target files: Interrupts. -* deletion of target files: Errors. -* dependencies: Rule Syntax. -* dependencies, automatic generation: Automatic Dependencies. -* dependencies, automatic generation: Include. -* dependencies, introduction to: Rule Introduction. -* dependencies, list of all: Automatic. -* dependencies, list of changed: Automatic. -* dependencies, varying (static pattern): Static Pattern. -* dependency: Rules. -* dependency pattern, implicit: Pattern Intro. -* dependency pattern, static (not implicit): Static Usage. -* directive: Makefile Contents. -* directories, printing them: -w Option. -* directories, updating archive symbol: Archive Symbols. -* directory part: Filename Functions. -* directory search (VPATH): Directory Search. -* directory search (VPATH), and implicit rules: Implicit/Search. -* directory search (VPATH), and link libraries: Libraries/Search. -* directory search (VPATH), and shell commands: Commands/Search. -* dollar sign ($), in function call: Syntax of Functions. -* dollar sign ($), in rules: Rule Syntax. -* dollar sign ($), in variable name: Computed Names. -* dollar sign ($), in variable reference: Reference. -* double-colon rules: Double-Colon. -* duplicate words, removing: Text Functions. -* E2BIG: Options/Recursion. -* echoing of commands: Echoing. -* editor: Introduction. -* Emacs (M-x compile): Errors. -* empty commands: Empty Commands. -* empty targets: Empty Targets. -* environment: Environment. -* environment, SHELL in: Execution. -* environment, and recursion: Variables/Recursion. -* errors (in commands): Errors. -* errors with wildcards: Wildcard Pitfall. -* execution, in parallel: Parallel. -* execution, instead of: Instead of Execution. -* execution, of commands: Execution. -* exit status (errors): Errors. -* explicit rule, definition of: Makefile Contents. -* exporting variables: Variables/Recursion. -* f77: Catalogue of Rules. -* f77: Implicit Variables. -* features of GNU make: Features. -* features, missing: Missing. -* file name functions: Filename Functions. -* file name of makefile: Makefile Names. -* file name of makefile, how to specify: Makefile Names. -* file name prefix, adding: Filename Functions. -* file name suffix: Filename Functions. -* file name suffix, adding: Filename Functions. -* file name with wildcards: Wildcards. -* file name, basename of: Filename Functions. -* file name, directory part: Filename Functions. -* file name, nondirectory part: Filename Functions. -* files, assuming new: Instead of Execution. -* files, assuming old: Avoiding Compilation. -* files, avoiding recompilation of: Avoiding Compilation. -* files, intermediate: Chained Rules. -* filtering out words: Text Functions. -* filtering words: Text Functions. -* finding strings: Text Functions. -* flags: Options Summary. -* flags for compilers: Implicit Variables. -* flavors of variables: Flavors. -* force targets: Force Targets. -* Fortran, rule to compile: Catalogue of Rules. -* functions: Functions. -* functions, for file names: Filename Functions. -* functions, for text: Text Functions. -* functions, syntax of: Syntax of Functions. -* g++: Implicit Variables. -* g++: Catalogue of Rules. -* gcc: Catalogue of Rules. -* generating dependencies automatically: Include. -* generating dependencies automatically: Automatic Dependencies. -* get: Catalogue of Rules. -* get: Implicit Variables. -* globbing (wildcards): Wildcards. -* goal: How Make Works. -* goal, default: Rules. -* goal, default: How Make Works. -* goal, how to specify: Goals. -* home directory: Wildcards. -* IEEE Standard 1003.2: Overview. -* implicit rule: Implicit Rules. -* implicit rule, and VPATH: Implicit/Search. -* implicit rule, and directory search: Implicit/Search. -* implicit rule, definition of: Makefile Contents. -* implicit rule, how to use: Using Implicit. -* implicit rule, introduction to: make Deduces. -* implicit rule, predefined: Catalogue of Rules. -* implicit rule, search algorithm: Search Algorithm. -* including (MAKEFILES variable): MAKEFILES Variable. -* including other makefiles: Include. -* incompatibilities: Missing. -* Info, rule to format: Catalogue of Rules. -* intermediate files: Chained Rules. -* intermediate files, preserving: Chained Rules. -* interrupt: Interrupts. -* job slots: Parallel. -* job slots, and recursion: Options/Recursion. -* jobs, limiting based on load: Parallel. -* joining lists of words: Filename Functions. -* killing (interruption): Interrupts. -* last-resort default rules: Last Resort. -* ld: Catalogue of Rules. -* lex: Implicit Variables. -* lex: Catalogue of Rules. -* Lex, rule to run: Catalogue of Rules. -* libraries for linking, directory search: Libraries/Search. -* library archive, suffix rule for: Archive Suffix Rules. -* limiting jobs based on load: Parallel. -* link libraries, and directory search: Libraries/Search. -* linking, predefined rule for: Catalogue of Rules. -* lint: Catalogue of Rules. -* list of all dependencies: Automatic. -* list of changed dependencies: Automatic. -* load average: Parallel. -* loops in variable expansion: Flavors. -* m2c: Catalogue of Rules. -* macro: Using Variables. -* makefile: Introduction. -* makefile name: Makefile Names. -* makefile name, how to specify: Makefile Names. -* makefile rule parts: Rule Introduction. -* makefile, and MAKEFILES variable: MAKEFILES Variable. -* makefile, conventions for: Makefile Conventions. -* makefile, how make processes: How Make Works. -* makefile, how to write: Makefiles. -* makefile, including: Include. -* makefile, overriding: Overriding Makefiles. -* makefile, remaking of: Remaking Makefiles. -* makefile, simple: Simple Makefile. -* makeinfo: Catalogue of Rules. -* makeinfo: Implicit Variables. -* match-anything rule: Match-Anything Rules. -* match-anything rule, used to override: Overriding Makefiles. -* missing features: Missing. -* mistakes with wildcards: Wildcard Pitfall. -* modified variable reference: Substitution Refs. -* Modula-2, rule to compile: Catalogue of Rules. -* multiple rules for one target: Multiple Rules. -* multiple rules for one target (::): Double-Colon. -* multiple targets: Multiple Targets. -* multiple targets, in pattern rule: Pattern Intro. -* name of makefile: Makefile Names. -* name of makefile, how to specify: Makefile Names. -* nested variable reference: Computed Names. -* newline, quoting, in commands: Execution. -* newline, quoting, in makefile: Simple Makefile. -* nondirectory part: Filename Functions. -* old-fashioned suffix rules: Suffix Rules. -* options: Options Summary. -* options, and recursion: Options/Recursion. -* options, setting from environment: Options/Recursion. -* options, setting in makefiles: Options/Recursion. -* order of pattern rules: Pattern Intro. -* origin of variable: Origin Function. -* overriding makefiles: Overriding Makefiles. -* overriding variables with arguments: Overriding. -* overriding with override: Override Directive. -* parallel execution: Parallel. -* parallel execution, and archive update: Archive Pitfalls. -* parts of makefile rule: Rule Introduction. -* Pascal, rule to compile: Catalogue of Rules. -* pattern rule: Pattern Intro. -* pattern rules, order of: Pattern Intro. -* pattern rules, static (not implicit): Static Pattern. -* pattern rules, static, syntax of: Static Usage. -* pc: Implicit Variables. -* pc: Catalogue of Rules. -* phony targets: Phony Targets. -* pitfalls of wildcards: Wildcard Pitfall. -* portability: Features. -* POSIX: Overview. -* POSIX.2: Options/Recursion. -* precious targets: Special Targets. -* prefix, adding: Filename Functions. -* preserving intermediate files: Chained Rules. -* preserving with .PRECIOUS: Chained Rules. -* preserving with .PRECIOUS: Special Targets. -* printing directories: -w Option. -* printing of commands: Echoing. -* problems and bugs, reporting: Bugs. -* problems with wildcards: Wildcard Pitfall. -* processing a makefile: How Make Works. -* question mode: Instead of Execution. -* quoting %, in patsubst: Text Functions. -* quoting %, in vpath: Selective Search. -* quoting %, in static pattern: Static Usage. -* quoting newline, in commands: Execution. -* quoting newline, in makefile: Simple Makefile. -* Ratfor, rule to compile: Catalogue of Rules. -* RCS, rule to extract from: Catalogue of Rules. -* recompilation: Introduction. -* recompilation, avoiding: Avoiding Compilation. -* recording events with empty targets: Empty Targets. -* recursion: Recursion. -* recursion, and -C: Options/Recursion. -* recursion, and -f: Options/Recursion. -* recursion, and -j: Options/Recursion. -* recursion, and -o: Options/Recursion. -* recursion, and -t: MAKE Variable. -* recursion, and -W: Options/Recursion. -* recursion, and -w: -w Option. -* recursion, and MAKEFILES variable: MAKEFILES Variable. -* recursion, and MAKE variable: MAKE Variable. -* recursion, and command line variable definitions: Options/Recursion. -* recursion, and environment: Variables/Recursion. -* recursion, and options: Options/Recursion. -* recursion, and printing directories: -w Option. -* recursion, and variables: Variables/Recursion. -* recursion, level of: Variables/Recursion. -* recursive variable expansion: Using Variables. -* recursive variable expansion: Flavors. -* recursively expanded variables: Flavors. -* reference to variables: Reference. -* reference to variables: Advanced. -* relinking: How Make Works. -* remaking makefiles: Remaking Makefiles. -* removal of target files: Errors. -* removal of target files: Interrupts. -* removing duplicate words: Text Functions. -* removing, to clean up: Cleanup. -* reporting bugs: Bugs. -* rm: Implicit Variables. -* rule commands: Commands. -* rule dependencies: Rule Syntax. -* rule syntax: Rule Syntax. -* rule targets: Rule Syntax. -* rule, and $: Rule Syntax. -* rule, double-colon (::): Double-Colon. -* rule, explicit, definition of: Makefile Contents. -* rule, how to write: Rules. -* rule, implicit: Implicit Rules. -* rule, implicit, and VPATH: Implicit/Search. -* rule, implicit, and directory search: Implicit/Search. -* rule, implicit, chains of: Chained Rules. -* rule, implicit, definition of: Makefile Contents. -* rule, implicit, how to use: Using Implicit. -* rule, implicit, introduction to: make Deduces. -* rule, implicit, predefined: Catalogue of Rules. -* rule, introduction to: Rule Introduction. -* rule, multiple for one target: Multiple Rules. -* rule, no commands or dependencies: Force Targets. -* rule, pattern: Pattern Intro. -* rule, static pattern: Static Pattern. -* rule, static pattern versus implicit: Static versus Implicit. -* rule, with multiple targets: Multiple Targets. -* s. (SCCS file prefix): Catalogue of Rules. -* SCCS, rule to extract from: Catalogue of Rules. -* search algorithm, implicit rule: Search Algorithm. -* search path for dependencies (VPATH): Directory Search. -* search path for dependencies (VPATH), and implicit rules: Implicit/Search. -* search path for dependencies (VPATH), and link libraries: Libraries/Search. -* searching for strings: Text Functions. -* selecting words: Filename Functions. -* sequences of commands: Sequences. -* setting options from environment: Options/Recursion. -* setting options in makefiles: Options/Recursion. -* setting variables: Setting. -* several rules for one target: Multiple Rules. -* several targets in a rule: Multiple Targets. -* shell command: Simple Makefile. -* shell command, and directory search: Commands/Search. -* shell command, execution: Execution. -* shell command, function for: Shell Function. -* shell file name pattern (in include): Include. -* shell wildcards (in include): Include. -* signal: Interrupts. -* silent operation: Echoing. -* simple makefile: Simple Makefile. -* simple variable expansion: Using Variables. -* simplifying with variables: Variables Simplify. -* simply expanded variables: Flavors. -* sorting words: Text Functions. -* spaces, in variable values: Flavors. -* spaces, stripping: Text Functions. -* special targets: Special Targets. -* specifying makefile name: Makefile Names. -* standard input: Parallel. -* standards conformance: Overview. -* standards for makefiles: Makefile Conventions. -* static pattern rule: Static Pattern. -* static pattern rule, syntax of: Static Usage. -* static pattern rule, versus implicit: Static versus Implicit. -* stem: Pattern Match. -* stem: Static Usage. -* stem, variable for: Automatic. -* strings, searching for: Text Functions. -* stripping whitespace: Text Functions. -* sub-make: Variables/Recursion. -* subdirectories, recursion for: Recursion. -* substitution variable reference: Substitution Refs. -* suffix rule: Suffix Rules. -* suffix rule, for archive: Archive Suffix Rules. -* suffix, adding: Filename Functions. -* suffix, function to find: Filename Functions. -* suffix, substituting in variables: Substitution Refs. -* switches: Options Summary. -* symbol directories, updating archive: Archive Symbols. -* syntax of rules: Rule Syntax. -* tab character (in commands): Rule Syntax. -* tabs in rules: Rule Introduction. -* tangle: Implicit Variables. -* tangle: Catalogue of Rules. -* target: Rules. -* target pattern, implicit: Pattern Intro. -* target pattern, static (not implicit): Static Usage. -* target, deleting on error: Errors. -* target, deleting on interrupt: Interrupts. -* target, multiple in pattern rule: Pattern Intro. -* target, multiple rules for one: Multiple Rules. -* target, touching: Instead of Execution. -* targets: Rule Syntax. -* targets without a file: Phony Targets. -* targets, built-in special: Special Targets. -* targets, empty: Empty Targets. -* targets, force: Force Targets. -* targets, introduction to: Rule Introduction. -* targets, multiple: Multiple Targets. -* targets, phony: Phony Targets. -* terminal rule: Match-Anything Rules. -* testing compilation: Testing. -* tex: Catalogue of Rules. -* tex: Implicit Variables. -* texi2dvi: Catalogue of Rules. -* texi2dvi: Implicit Variables. -* Texinfo, rule to format: Catalogue of Rules. -* tilde (~): Wildcards. -* touching files: Instead of Execution. -* undefined variables, warning message: Options Summary. -* updating archive symbol directories: Archive Symbols. -* updating makefiles: Remaking Makefiles. -* value: Using Variables. -* value, how a variable gets it: Values. -* variable: Using Variables. -* variable definition: Makefile Contents. -* variables: Variables Simplify. -* variables, $ in name: Computed Names. -* variables, and implicit rule: Automatic. -* variables, appending to: Appending. -* variables, automatic: Automatic. -* variables, command line: Overriding. -* variables, command line, and recursion: Options/Recursion. -* variables, computed names: Computed Names. -* variables, defining verbatim: Defining. -* variables, environment: Variables/Recursion. -* variables, environment: Environment. -* variables, exporting: Variables/Recursion. -* variables, flavors: Flavors. -* variables, how they get their values: Values. -* variables, how to reference: Reference. -* variables, loops in expansion: Flavors. -* variables, modified reference: Substitution Refs. -* variables, nested references: Computed Names. -* variables, origin of: Origin Function. -* variables, overriding: Override Directive. -* variables, overriding with arguments: Overriding. -* variables, recursively expanded: Flavors. -* variables, setting: Setting. -* variables, simply expanded: Flavors. -* variables, spaces in values: Flavors. -* variables, substituting suffix in: Substitution Refs. -* variables, substitution reference: Substitution Refs. -* variables, warning for undefined: Options Summary. -* varying dependencies: Static Pattern. -* verbatim variable definition: Defining. -* vpath: Directory Search. -* weave: Catalogue of Rules. -* weave: Implicit Variables. -* Web, rule to run: Catalogue of Rules. -* what if: Instead of Execution. -* whitespace, in variable values: Flavors. -* whitespace, stripping: Text Functions. -* wildcard: Wildcards. -* wildcard pitfalls: Wildcard Pitfall. -* wildcard, function: Filename Functions. -* wildcard, in include: Include. -* wildcard, in archive member: Archive Members. -* words, extracting first: Filename Functions. -* words, filtering: Text Functions. -* words, filtering out: Text Functions. -* words, finding number: Filename Functions. -* words, iterating over: Foreach Function. -* words, joining lists: Filename Functions. -* words, removing duplicates: Text Functions. -* words, selecting: Filename Functions. -* writing rule commands: Commands. -* writing rules: Rules. -* yacc: Implicit Variables. -* yacc: Catalogue of Rules. -* Yacc, rule to run: Catalogue of Rules. - - -File: make.info, Node: Name Index, Prev: Concept Index, Up: Top - -Index of Functions, Variables, & Directives -******************************************* - -* Menu: - -* $%: Automatic. -* $(%D): Automatic. -* $(%F): Automatic. -* $(*D): Automatic. -* $(*F): Automatic. -* $( foo - -%: force - @@$(MAKE) -f Makefile $@@ -force: ; -@end example - -If you say @samp{make foo}, @code{make} will find @file{GNUmakefile}, -read it, and see that to make @file{foo}, it needs to run the command -@samp{frobnicate > foo}. If you say @samp{make bar}, @code{make} will -find no way to make @file{bar} in @file{GNUmakefile}, so it will use the -commands from the pattern rule: @samp{make -f Makefile bar}. If -@file{Makefile} provides a rule for updating @file{bar}, @code{make} -will apply the rule. And likewise for any other target that -@file{GNUmakefile} does not say how to make. - -The way this works is that the pattern rule has a pattern of just -@samp{%}, so it matches any target whatever. The rule specifies a -dependency @file{force}, to guarantee that the commands will be run even -if the target file already exists. We give @file{force} target empty -commands to prevent @code{make} from searching for an implicit rule to -build it---otherwise it would apply the same match-anything rule to -@file{force} itself and create a dependency loop! - -@node Rules, Commands, Makefiles, Top -@chapter Writing Rules -@cindex writing rules -@cindex rule, how to write -@cindex target -@cindex dependency - -A @dfn{rule} appears in the makefile and says when and how to remake -certain files, called the rule's @dfn{targets} (most often only one per rule). -It lists the other files that are the @dfn{dependencies} of the target, and -@dfn{commands} to use to create or update the target. - -@cindex default goal -@cindex goal, default -The order of rules is not significant, except for determining the -@dfn{default goal}: the target for @code{make} to consider, if you do -not otherwise specify one. The default goal is the target of the first -rule in the first makefile. If the first rule has multiple targets, -only the first target is taken as the default. There are two -exceptions: a target starting with a period is not a default unless it -contains one or more slashes, @samp{/}, as well; and, a target that -defines a pattern rule has no effect on the default goal. -(@xref{Pattern Rules, ,Defining and Redefining Pattern Rules}.) - -Therefore, we usually write the makefile so that the first rule is the -one for compiling the entire program or all the programs described by -the makefile (often with a target called @samp{all}). -@xref{Goals, ,Arguments to Specify the Goals}. - -@menu -* Rule Example:: An example explained. -* Rule Syntax:: General syntax explained. -* Wildcards:: Using wildcard characters such as `*'. -* Directory Search:: Searching other directories for source files. -* Phony Targets:: Using a target that is not a real file's name. -* Force Targets:: You can use a target without commands - or dependencies to mark other - targets as phony. -* Empty Targets:: When only the date matters and the - files are empty. -* Special Targets:: Targets with special built-in meanings. -* Multiple Targets:: When to make use of several targets in a rule. -* Multiple Rules:: How to use several rules with the same target. -* Static Pattern:: Static pattern rules apply to multiple targets - and can vary the dependencies according to - the target name. -* Double-Colon:: How to use a special kind of rule to allow - several independent rules for one target. -* Automatic Dependencies:: How to automatically generate rules giving - dependencies from the source files themselves. -@end menu - -@ifinfo -@node Rule Example, Rule Syntax, , Rules -@section Rule Example - -Here is an example of a rule: - -@example -foo.o : foo.c defs.h # module for twiddling the frobs - cc -c -g foo.c -@end example - -Its target is @file{foo.o} and its dependencies are @file{foo.c} and -@file{defs.h}. It has one command, which is @samp{cc -c -g foo.c}. -The command line starts with a tab to identify it as a command. - -This rule says two things: - -@itemize @bullet -@item -How to decide whether @file{foo.o} is out of date: it is out of date -if it does not exist, or if either @file{foo.c} or @file{defs.h} is -more recent than it. - -@item -How to update the file @file{foo.o}: by running @code{cc} as stated. -The command does not explicitly mention @file{defs.h}, but we presume -that @file{foo.c} includes it, and that that is why @file{defs.h} was -added to the dependencies. -@end itemize -@end ifinfo - -@node Rule Syntax, Wildcards, Rule Example, Rules -@section Rule Syntax - -@cindex rule syntax -@cindex syntax of rules -In general, a rule looks like this: - -@example -@var{targets} : @var{dependencies} - @var{command} - @dots{} -@end example - -@noindent -or like this: - -@example -@var{targets} : @var{dependencies} ; @var{command} - @var{command} - @dots{} -@end example - -@cindex targets -@cindex rule targets -The @var{targets} are file names, separated by spaces. Wildcard -characters may be used (@pxref{Wildcards, ,Using Wildcard Characters -in File Names}) and a name of the form @file{@var{a}(@var{m})} -represents member @var{m} in archive file @var{a} -(@pxref{Archive Members, ,Archive Members as Targets}). -Usually there is only one -target per rule, but occasionally there is a reason to have more -(@pxref{Multiple Targets, , Multiple Targets in a Rule}).@refill - -@cindex commands -@cindex tab character (in commands) -The @var{command} lines start with a tab character. The first command may -appear on the line after the dependencies, with a tab character, or may -appear on the same line, with a semicolon. Either way, the effect is the -same. @xref{Commands, ,Writing the Commands in Rules}. - -@cindex dollar sign (@code{$}), in rules -@cindex @code{$}, in rules -@cindex rule, and @code{$} -Because dollar signs are used to start variable references, if you really -want a dollar sign in a rule you must write two of them, @samp{$$} -(@pxref{Using Variables, ,How to Use Variables}). -You may split a long line by inserting a backslash -followed by a newline, but this is not required, as @code{make} places no -limit on the length of a line in a makefile. - -A rule tells @code{make} two things: when the targets are out of date, -and how to update them when necessary. - -@cindex dependencies -@cindex rule dependencies -The criterion for being out of date is specified in terms of the -@var{dependencies}, which consist of file names separated by spaces. -(Wildcards and archive members (@pxref{Archives}) are allowed here too.) -A target is out of date if it does not exist or if it is older than any -of the dependencies (by comparison of last-modification times). The -idea is that the contents of the target file are computed based on -information in the dependencies, so if any of the dependencies changes, -the contents of the existing target file are no longer necessarily -valid. - -How to update is specified by @var{commands}. These are lines to be -executed by the shell (normally @samp{sh}), but with some extra features -(@pxref{Commands, ,Writing the Commands in Rules}). - -@node Wildcards, Directory Search, Rule Syntax, Rules -@section Using Wildcard Characters in File Names -@cindex wildcard -@cindex file name with wildcards -@cindex globbing (wildcards) - -@cindex @code{*} (wildcard character) -@cindex @code{?} (wildcard character) -@cindex @code{[@dots{}]} (wildcard characters) -A single file name can specify many files using @dfn{wildcard characters}. -The wildcard characters in @code{make} are @samp{*}, @samp{?} and -@samp{[@dots{}]}, the same as in the Bourne shell. For example, @file{*.c} -specifies a list of all the files (in the working directory) whose names -end in @samp{.c}.@refill - -@cindex @code{~} (tilde) -@cindex tilde (@code{~}) -@cindex home directory -The character @samp{~} at the beginning of a file name also has special -significance. If alone, or followed by a slash, it represents your home -directory. For example @file{~/bin} expands to @file{/home/you/bin}. -If the @samp{~} is followed by a word, the string represents the home -directory of the user named by that word. For example @file{~john/bin} -expands to @file{/home/john/bin}.@refill - -Wildcard expansion happens automatically in targets, in dependencies, -and in commands (where the shell does the expansion). In other -contexts, wildcard expansion happens only if you request it explicitly -with the @code{wildcard} function. - -The special significance of a wildcard character can be turned off by -preceding it with a backslash. Thus, @file{foo\*bar} would refer to a -specific file whose name consists of @samp{foo}, an asterisk, and -@samp{bar}.@refill - -@menu -* Wildcard Examples:: Several examples -* Wildcard Pitfall:: Problems to avoid. -* Wildcard Function:: How to cause wildcard expansion where - it does not normally take place. -@end menu - -@node Wildcard Examples, Wildcard Pitfall, , Wildcards -@subsection Wildcard Examples - -Wildcards can be used in the commands of a rule, where they are expanded -by the shell. For example, here is a rule to delete all the object files: - -@example -@group -clean: - rm -f *.o -@end group -@end example -@cindex @code{rm} (shell command) - -Wildcards are also useful in the dependencies of a rule. With the -following rule in the makefile, @samp{make print} will print all the -@samp{.c} files that have changed since the last time you printed them: - -@example -print: *.c - lpr -p $? - touch print -@end example - -@cindex @code{print} target -@cindex @code{lpr} (shell command) -@cindex @code{touch} (shell command) -@noindent -This rule uses @file{print} as an empty target file; see @ref{Empty -Targets, ,Empty Target Files to Record Events}. (The automatic variable -@samp{$?} is used to print only those files that have changed; see -@ref{Automatic, ,Automatic Variables}.)@refill - -Wildcard expansion does not happen when you define a variable. Thus, if -you write this: - -@example -objects = *.o -@end example - -@noindent -then the value of the variable @code{objects} is the actual string -@samp{*.o}. However, if you use the value of @code{objects} in a target, -dependency or command, wildcard expansion will take place at that time. -To set @code{objects} to the expansion, instead use: - -@example -objects := $(wildcard *.o) -@end example - -@noindent -@xref{Wildcard Function}. - -@node Wildcard Pitfall, Wildcard Function, Wildcard Examples, Wildcards -@subsection Pitfalls of Using Wildcards -@cindex wildcard pitfalls -@cindex pitfalls of wildcards -@cindex mistakes with wildcards -@cindex errors with wildcards -@cindex problems with wildcards - -Now here is an example of a naive way of using wildcard expansion, that -does not do what you would intend. Suppose you would like to say that the -executable file @file{foo} is made from all the object files in the -directory, and you write this: - -@example -objects = *.o - -foo : $(objects) - cc -o foo $(CFLAGS) $(objects) -@end example - -@noindent -The value of @code{objects} is the actual string @samp{*.o}. Wildcard -expansion happens in the rule for @file{foo}, so that each @emph{existing} -@samp{.o} file becomes a dependency of @file{foo} and will be recompiled if -necessary. - -But what if you delete all the @samp{.o} files? When a wildcard matches -no files, it is left as it is, so then @file{foo} will depend on the -oddly-named file @file{*.o}. Since no such file is likely to exist, -@code{make} will give you an error saying it cannot figure out how to -make @file{*.o}. This is not what you want! - -Actually it is possible to obtain the desired result with wildcard -expansion, but you need more sophisticated techniques, including the -@code{wildcard} function and string substitution. -@ifinfo -@xref{Wildcard Function, ,The Function @code{wildcard}}. -@end ifinfo -@iftex -These are described in the following section. -@end iftex - -@node Wildcard Function, , Wildcard Pitfall, Wildcards -@subsection The Function @code{wildcard} -@findex wildcard - -Wildcard expansion happens automatically in rules. But wildcard expansion -does not normally take place when a variable is set, or inside the -arguments of a function. If you want to do wildcard expansion in such -places, you need to use the @code{wildcard} function, like this: - -@example -$(wildcard @var{pattern}@dots{}) -@end example - -@noindent -This string, used anywhere in a makefile, is replaced by a -space-separated list of names of existing files that match one of the -given file name patterns. If no existing file name matches a pattern, -then that pattern is omitted from the output of the @code{wildcard} -function. Note that this is different from how unmatched wildcards -behave in rules, where they are used verbatim rather than ignored -(@pxref{Wildcard Pitfall}). - -One use of the @code{wildcard} function is to get a list of all the C source -files in a directory, like this: - -@example -$(wildcard *.c) -@end example - -We can change the list of C source files into a list of object files by -replacing the @samp{.o} suffix with @samp{.c} in the result, like this: - -@example -$(patsubst %.c,%.o,$(wildcard *.c)) -@end example - -@noindent -(Here we have used another function, @code{patsubst}. -@xref{Text Functions, ,Functions for String Substitution and Analysis}.)@refill - -Thus, a makefile to compile all C source files in the directory and then -link them together could be written as follows: - -@example -objects := $(patsubst %.c,%.o,$(wildcard *.c)) - -foo : $(objects) - cc -o foo $(objects) -@end example - -@noindent -(This takes advantage of the implicit rule for compiling C programs, so -there is no need to write explicit rules for compiling the files. -@xref{Flavors, ,The Two Flavors of Variables}, for an explanation of -@samp{:=}, which is a variant of @samp{=}.) - -@node Directory Search, Phony Targets, Wildcards, Rules -@section Searching Directories for Dependencies -@vindex VPATH -@findex vpath -@cindex vpath -@cindex search path for dependencies (@code{VPATH}) -@cindex directory search (@code{VPATH}) - -For large systems, it is often desirable to put sources in a separate -directory from the binaries. The @dfn{directory search} features of -@code{make} facilitate this by searching several directories -automatically to find a dependency. When you redistribute the files -among directories, you do not need to change the individual rules, -just the search paths. - -@menu -* General Search:: Specifying a search path that applies - to every dependency. -* Selective Search:: Specifying a search path - for a specified class of names. -* Commands/Search:: How to write shell commands that work together - with search paths. -* Implicit/Search:: How search paths affect implicit rules. -* Libraries/Search:: Directory search for link libraries. -@end menu - -@node General Search, Selective Search, , Directory Search -@subsection @code{VPATH}: Search Path for All Dependencies -@vindex VPATH - -The value of the @code{make} variable @code{VPATH} specifies a list of -directories that @code{make} should search. Most often, the -directories are expected to contain dependency files that are not in the -current directory; however, @code{VPATH} specifies a search list that -@code{make} applies for all files, including files which are targets of -rules. - -Thus, if a file that is listed as a target or dependency does not exist -in the current directory, @code{make} searches the directories listed in -@code{VPATH} for a file with that name. If a file is found in one of -them, that file becomes the dependency. Rules may then specify the -names of source files in the dependencies as if they all existed in the -current directory. @xref{Commands/Search, ,Writing Shell Commands with -Directory Search}. - -In the @code{VPATH} variable, directory names are separated by colons or -blanks. The order in which directories are listed is the order followed -by @code{make} in its search. - -For example, - -@example -VPATH = src:../headers -@end example - -@noindent -specifies a path containing two directories, @file{src} and -@file{../headers}, which @code{make} searches in that order. - -With this value of @code{VPATH}, the following rule, - -@example -foo.o : foo.c -@end example - -@noindent -is interpreted as if it were written like this: - -@example -foo.o : src/foo.c -@end example - -@noindent -assuming the file @file{foo.c} does not exist in the current directory but -is found in the directory @file{src}. - -@node Selective Search, Commands/Search, General Search, Directory Search -@subsection The @code{vpath} Directive -@findex vpath - -Similar to the @code{VPATH} variable but more selective is the @code{vpath} -directive (note lower case), which allows you to specify a search path for a particular class -of file names, those that match a particular pattern. Thus you can supply -certain search directories for one class of file names and other directories -(or none) for other file names. - -There are three forms of the @code{vpath} directive: - -@table @code -@item vpath @var{pattern} @var{directories} -Specify the search path @var{directories} for file names that match -@var{pattern}. - -The search path, @var{directories}, is a list of directories to be -searched, separated by colons or blanks, just like the search path used -in the @code{VPATH} variable. - -@item vpath @var{pattern} -Clear out the search path associated with @var{pattern}. - -@c Extra blank line makes sure this gets two lines. -@item vpath - -Clear all search paths previously specified with @code{vpath} directives. -@end table - -A @code{vpath} pattern is a string containing a @samp{%} character. The -string must match the file name of a dependency that is being searched -for, the @samp{%} character matching any sequence of zero or more -characters (as in pattern rules; @pxref{Pattern Rules, ,Defining and -Redefining Pattern Rules}). For example, @code{%.h} matches files that -end in @code{.h}. (If there is no @samp{%}, the pattern must match the -dependency exactly, which is not useful very often.) - -@cindex @code{%}, quoting in @code{vpath} -@cindex @code{%}, quoting with @code{\} (backslash) -@cindex @code{\} (backslash), to quote @code{%} -@cindex backslash (@code{\}), to quote @code{%} -@cindex quoting @code{%}, in @code{vpath} -@samp{%} characters in a @code{vpath} directive's pattern can be quoted -with preceding backslashes (@samp{\}). Backslashes that would otherwise -quote @samp{%} characters can be quoted with more backslashes. -Backslashes that quote @samp{%} characters or other backslashes are -removed from the pattern before it is compared to file names. Backslashes -that are not in danger of quoting @samp{%} characters go unmolested.@refill - -When a dependency fails to exist in the current directory, if the -@var{pattern} in a @code{vpath} directive matches the name of the -dependency file, then the @var{directories} in that directive are searched -just like (and before) the directories in the @code{VPATH} variable. - -For example, - -@example -vpath %.h ../headers -@end example - -@noindent -tells @code{make} to look for any dependency whose name ends in @file{.h} -in the directory @file{../headers} if the file is not found in the current -directory. - -If several @code{vpath} patterns match the dependency file's name, then -@code{make} processes each matching @code{vpath} directive one by one, -searching all the directories mentioned in each directive. @code{make} -handles multiple @code{vpath} directives in the order in which they -appear in the makefile; multiple directives with the same pattern are -independent of each other. - -@need 750 -Thus, - -@example -@group -vpath %.c foo -vpath % blish -vpath %.c bar -@end group -@end example - -@noindent -will look for a file ending in @samp{.c} in @file{foo}, then -@file{blish}, then @file{bar}, while - -@example -@group -vpath %.c foo:bar -vpath % blish -@end group -@end example - -@noindent -will look for a file ending in @samp{.c} in @file{foo}, then -@file{bar}, then @file{blish}. - -@node Commands/Search, Implicit/Search, Selective Search, Directory Search -@subsection Writing Shell Commands with Directory Search -@cindex shell command, and directory search -@cindex directory search (@code{VPATH}), and shell commands - -When a dependency is found in another directory through directory search, -this cannot change the commands of the rule; they will execute as written. -Therefore, you must write the commands with care so that they will look for -the dependency in the directory where @code{make} finds it. - -This is done with the @dfn{automatic variables} such as @samp{$^} -(@pxref{Automatic, ,Automatic Variables}). -For instance, the value of @samp{$^} is a -list of all the dependencies of the rule, including the names of -the directories in which they were found, and the value of -@samp{$@@} is the target. Thus:@refill - -@example -foo.o : foo.c - cc -c $(CFLAGS) $^ -o $@@ -@end example - -@noindent -(The variable @code{CFLAGS} exists so you can specify flags for C -compilation by implicit rules; we use it here for consistency so it will -affect all C compilations uniformly; -@pxref{Implicit Variables, ,Variables Used by Implicit Rules}.) - -Often the dependencies include header files as well, which you do not -want to mention in the commands. The automatic variable @samp{$<} is -just the first dependency: - -@example -VPATH = src:../headers -foo.o : foo.c defs.h hack.h - cc -c $(CFLAGS) $< -o $@@ -@end example - -@node Implicit/Search, Libraries/Search, Commands/Search, Directory Search -@subsection Directory Search and Implicit Rules -@cindex @code{VPATH}, and implicit rules -@cindex directory search (@code{VPATH}), and implicit rules -@cindex search path for dependencies (@code{VPATH}), and implicit rules -@cindex implicit rule, and directory search -@cindex implicit rule, and @code{VPATH} -@cindex rule, implicit, and directory search -@cindex rule, implicit, and @code{VPATH} - -The search through the directories specified in @code{VPATH} or with -@code{vpath} also happens during consideration of implicit rules -(@pxref{Implicit Rules, ,Using Implicit Rules}). - -For example, when a file @file{foo.o} has no explicit rule, @code{make} -considers implicit rules, such as the built-in rule to compile -@file{foo.c} if that file exists. If such a file is lacking in the -current directory, the appropriate directories are searched for it. If -@file{foo.c} exists (or is mentioned in the makefile) in any of the -directories, the implicit rule for C compilation is applied. - -The commands of implicit rules normally use automatic variables as a -matter of necessity; consequently they will use the file names found by -directory search with no extra effort. - -@node Libraries/Search, , Implicit/Search, Directory Search -@subsection Directory Search for Link Libraries -@cindex link libraries, and directory search -@cindex libraries for linking, directory search -@cindex directory search (@code{VPATH}), and link libraries -@cindex @code{VPATH}, and link libraries -@cindex search path for dependencies (@code{VPATH}), and link libraries -@cindex @code{-l} (library search) - -Directory search applies in a special way to libraries used with the -linker. This special feature comes into play when you write a dependency -whose name is of the form @samp{-l@var{name}}. (You can tell something -strange is going on here because the dependency is normally the name of a -file, and the @emph{file name} of the library looks like -@file{lib@var{name}.a}, not like @samp{-l@var{name}}.)@refill - -When a dependency's name has the form @samp{-l@var{name}}, @code{make} -handles it specially by searching for the file @file{lib@var{name}.a} in -the current directory, in directories specified by matching @code{vpath} -search paths and the @code{VPATH} search path, and then in the -directories @file{/lib}, @file{/usr/lib}, and @file{@var{prefix}/lib} -(normally @file{/usr/local/lib}). - -For example, - -@example -@group -foo : foo.c -lcurses - cc $^ -o $@@ -@end group -@end example - -@noindent -would cause the command @samp{cc foo.c /usr/lib/libcurses.a -o foo} to -be executed when @file{foo} is older than @file{foo.c} or than -@file{/usr/lib/libcurses.a}.@refill - -@node Phony Targets, Force Targets, Directory Search, Rules -@section Phony Targets -@cindex phony targets -@cindex targets, phony -@cindex targets without a file - -A phony target is one that is not really the name of a file. It is just a -name for some commands to be executed when you make an explicit request. -There are two reasons to use a phony target: to avoid a conflict with -a file of the same name, and to improve performance. - -If you write a rule whose commands will not create the target file, the -commands will be executed every time the target comes up for remaking. -Here is an example: - -@example -@group -clean: - rm *.o temp -@end group -@end example - -@noindent -Because the @code{rm} command does not create a file named @file{clean}, -probably no such file will ever exist. Therefore, the @code{rm} command -will be executed every time you say @samp{make clean}. -@cindex @code{rm} (shell command) - -@findex .PHONY -The phony target will cease to work if anything ever does create a file -named @file{clean} in this directory. Since it has no dependencies, the -file @file{clean} would inevitably be considered up to date, and its -commands would not be executed. To avoid this problem, you can explicitly -declare the target to be phony, using the special target @code{.PHONY} -(@pxref{Special Targets, ,Special Built-in Target Names}) as follows: - -@example -.PHONY : clean -@end example - -@noindent -Once this is done, @samp{make clean} will run the commands regardless of -whether there is a file named @file{clean}. - -Since it knows that phony targets do not name actual files that could be -remade from other files, @code{make} skips the implicit rule search for -phony targets (@pxref{Implicit Rules}). This is why declaring a target -phony is good for performance, even if you are not worried about the -actual file existing. - -Thus, you first write the line that states that @code{clean} is a -phony target, then you write the rule, like this: - -@example -@group -.PHONY: clean -clean: - rm *.o temp -@end group -@end example - -A phony target should not be a dependency of a real target file; if it -is, its commands are run every time @code{make} goes to update that -file. As long as a phony target is never a dependency of a real -target, the phony target commands will be executed only when the phony -target is a specified goal (@pxref{Goals, ,Arguments to Specify the -Goals}). - -Phony targets can have dependencies. When one directory contains multiple -programs, it is most convenient to describe all of the programs in one -makefile @file{./Makefile}. Since the target remade by default will be the -first one in the makefile, it is common to make this a phony target named -@samp{all} and give it, as dependencies, all the individual programs. For -example: - -@example -all : prog1 prog2 prog3 -.PHONY : all - -prog1 : prog1.o utils.o - cc -o prog1 prog1.o utils.o - -prog2 : prog2.o - cc -o prog2 prog2.o - -prog3 : prog3.o sort.o utils.o - cc -o prog3 prog3.o sort.o utils.o -@end example - -@noindent -Now you can say just @samp{make} to remake all three programs, or specify -as arguments the ones to remake (as in @samp{make prog1 prog3}). - -When one phony target is a dependency of another, it serves as a subroutine -of the other. For example, here @samp{make cleanall} will delete the -object files, the difference files, and the file @file{program}: - -@example -.PHONY: cleanall cleanobj cleandiff - -cleanall : cleanobj cleandiff - rm program - -cleanobj : - rm *.o - -cleandiff : - rm *.diff -@end example - -@node Force Targets, Empty Targets, Phony Targets, Rules -@section Rules without Commands or Dependencies -@cindex force targets -@cindex targets, force -@cindex @code{FORCE} -@cindex rule, no commands or dependencies - -If a rule has no dependencies or commands, and the target of the rule -is a nonexistent file, then @code{make} imagines this target to have -been updated whenever its rule is run. This implies that all targets -depending on this one will always have their commands run. - -An example will illustrate this: - -@example -@group -clean: FORCE - rm $(objects) -FORCE: -@end group -@end example - -Here the target @samp{FORCE} satisfies the special conditions, so the -target @file{clean} that depends on it is forced to run its commands. -There is nothing special about the name @samp{FORCE}, but that is one name -commonly used this way. - -As you can see, using @samp{FORCE} this way has the same results as using -@samp{.PHONY: clean}. - -Using @samp{.PHONY} is more explicit and more efficient. However, -other versions of @code{make} do not support @samp{.PHONY}; thus -@samp{FORCE} appears in many makefiles. @xref{Phony Targets}. - -@node Empty Targets, Special Targets, Force Targets, Rules -@section Empty Target Files to Record Events -@cindex empty targets -@cindex targets, empty -@cindex recording events with empty targets - -The @dfn{empty target} is a variant of the phony target; it is used to hold -commands for an action that you request explicitly from time to time. -Unlike a phony target, this target file can really exist; but the file's -contents do not matter, and usually are empty. - -The purpose of the empty target file is to record, with its -last-modification time, when the rule's commands were last executed. It -does so because one of the commands is a @code{touch} command to update the -target file. - -The empty target file must have some dependencies. When you ask to remake -the empty target, the commands are executed if any dependency is more -recent than the target; in other words, if a dependency has changed since -the last time you remade the target. Here is an example: - -@example -print: foo.c bar.c - lpr -p $? - touch print -@end example -@cindex @code{print} target -@cindex @code{lpr} (shell command) -@cindex @code{touch} (shell command) - -@noindent -With this rule, @samp{make print} will execute the @code{lpr} command if -either source file has changed since the last @samp{make print}. The -automatic variable @samp{$?} is used to print only those files that have -changed (@pxref{Automatic, ,Automatic Variables}). - -@node Special Targets, Multiple Targets, Empty Targets, Rules -@section Special Built-in Target Names -@cindex special targets -@cindex built-in special targets -@cindex targets, built-in special - -Certain names have special meanings if they appear as targets. - -@table @code -@findex .PHONY -@item .PHONY - -The dependencies of the special target @code{.PHONY} are considered to -be phony targets. When it is time to consider such a target, -@code{make} will run its commands unconditionally, regardless of -whether a file with that name exists or what its last-modification -time is. @xref{Phony Targets, ,Phony Targets}. - -@findex .SUFFIXES -@item .SUFFIXES - -The dependencies of the special target @code{.SUFFIXES} are the list -of suffixes to be used in checking for suffix rules. -@xref{Suffix Rules, , Old-Fashioned Suffix Rules}. - -@findex .DEFAULT -@item .DEFAULT - -The commands specified for @code{.DEFAULT} are used for any target for -which no rules are found (either explicit rules or implicit rules). -@xref{Last Resort}. If @code{.DEFAULT} commands are specified, every -file mentioned as a dependency, but not as a target in a rule, will have -these commands executed on its behalf. @xref{Search Algorithm, -,Implicit Rule Search Algorithm}. - -@findex .PRECIOUS -@item .PRECIOUS -@cindex precious targets -@cindex preserving with @code{.PRECIOUS} - -The targets which @code{.PRECIOUS} depends on are given the following -special treatment: if @code{make} is killed or interrupted during the -execution of their commands, the target is not deleted. -@xref{Interrupts, ,Interrupting or Killing @code{make}}. -Also, if the target is an intermediate file, it will not be deleted -after it is no longer needed, as is normally done. -@xref{Chained Rules, ,Chains of Implicit Rules}. - -You can also list the target pattern of an implicit rule (such as -@samp{%.o}) as a dependency file of the special target @code{.PRECIOUS} -to preserve intermediate files created by rules whose target patterns -match that file's name. - -@findex .IGNORE -@item .IGNORE - -If you specify dependencies for @code{.IGNORE}, then @code{make} will -ignore errors in execution of the commands run for those particular -files. The commands for @code{.IGNORE} are not meaningful. - -If mentioned as a target with no dependencies, @code{.IGNORE} says to -ignore errors in execution of commands for all files. This usage of -@samp{.IGNORE} is supported only for historical compatibility. Since -this affects every command in the makefile, it is not very useful; we -recommend you use the more selective ways to ignore errors in specific -commands. @xref{Errors, ,Errors in Commands}. - -@findex .SILENT -@item .SILENT - -If you specify dependencies for @code{.SILENT}, then @code{make} will -not the print commands to remake those particular files before executing -them. The commands for @code{.SILENT} are not meaningful. - -If mentioned as a target with no dependencies, @code{.SILENT} says not -to print any commands before executing them. This usage of -@samp{.SILENT} is supported only for historical compatibility. We -recommend you use the more selective ways to silence specific commands. -@xref{Echoing, ,Command Echoing}. If you want to silence all commands -for a particular run of @code{make}, use the @samp{-s} or -@w{@samp{--silent}} option (@pxref{Options Summary}). - -@findex .EXPORT_ALL_VARIABLES -@item .EXPORT_ALL_VARIABLES - -Simply by being mentioned as a target, this tells @code{make} to -export all variables to child processes by default. -@xref{Variables/Recursion, ,Communicating Variables to a -Sub-@code{make}}. -@end table - -Any defined implicit rule suffix also counts as a special target if it -appears as a target, and so does the concatenation of two suffixes, such -as @samp{.c.o}. These targets are suffix rules, an obsolete way of -defining implicit rules (but a way still widely used). In principle, any -target name could be special in this way if you break it in two and add -both pieces to the suffix list. In practice, suffixes normally begin with -@samp{.}, so these special target names also begin with @samp{.}. -@xref{Suffix Rules, ,Old-Fashioned Suffix Rules}. - -@node Multiple Targets, Multiple Rules, Special Targets, Rules -@section Multiple Targets in a Rule -@cindex multiple targets -@cindex several targets in a rule -@cindex targets, multiple -@cindex rule, with multiple targets - -A rule with multiple targets is equivalent to writing many rules, each with -one target, and all identical aside from that. The same commands apply to -all the targets, but their effects may vary because you can substitute the -actual target name into the command using @samp{$@@}. The rule contributes -the same dependencies to all the targets also. - -This is useful in two cases. - -@itemize @bullet -@item -You want just dependencies, no commands. For example: - -@example -kbd.o command.o files.o: command.h -@end example - -@noindent -gives an additional dependency to each of the three object files -mentioned. - -@item -Similar commands work for all the targets. The commands do not need -to be absolutely identical, since the automatic variable @samp{$@@} -can be used to substitute the particular target to be remade into the -commands (@pxref{Automatic, ,Automatic Variables}). For example: - -@example -@group -bigoutput littleoutput : text.g - generate text.g -$(subst output,,$@@) > $@@ -@end group -@end example -@findex subst - -@noindent -is equivalent to - -@example -bigoutput : text.g - generate text.g -big > bigoutput -littleoutput : text.g - generate text.g -little > littleoutput -@end example - -@noindent -Here we assume the hypothetical program @code{generate} makes two -types of output, one if given @samp{-big} and one if given -@samp{-little}. -@xref{Text Functions, ,Functions for String Substitution and Analysis}, -for an explanation of the @code{subst} function. -@end itemize - -Suppose you would like to vary the dependencies according to the target, -much as the variable @samp{$@@} allows you to vary the commands. -You cannot do this with multiple targets in an ordinary rule, but you can -do it with a @dfn{static pattern rule}. -@xref{Static Pattern, ,Static Pattern Rules}. - -@node Multiple Rules, Static Pattern, Multiple Targets, Rules -@section Multiple Rules for One Target -@cindex multiple rules for one target -@cindex several rules for one target -@cindex rule, multiple for one target -@cindex target, multiple rules for one - -One file can be the target of several rules. All the dependencies -mentioned in all the rules are merged into one list of dependencies for -the target. If the target is older than any dependency from any rule, -the commands are executed. - -There can only be one set of commands to be executed for a file. -If more than one rule gives commands for the same file, -@code{make} uses the last set given and prints an error message. -(As a special case, if the file's name begins with a dot, no -error message is printed. This odd behavior is only for -compatibility with other implementations of @code{make}.) -There is no reason to -write your makefiles this way; that is why @code{make} gives you -an error message.@refill - -An extra rule with just dependencies can be used to give a few extra -dependencies to many files at once. For example, one usually has a -variable named @code{objects} containing a list of all the compiler output -files in the system being made. An easy way to say that all of them must -be recompiled if @file{config.h} changes is to write the following: - -@example -objects = foo.o bar.o -foo.o : defs.h -bar.o : defs.h test.h -$(objects) : config.h -@end example - -This could be inserted or taken out without changing the rules that really -specify how to make the object files, making it a convenient form to use if -you wish to add the additional dependency intermittently. - -Another wrinkle is that the additional dependencies could be specified with -a variable that you set with a command argument to @code{make} -(@pxref{Overriding, ,Overriding Variables}). For example, - -@example -@group -extradeps= -$(objects) : $(extradeps) -@end group -@end example - -@noindent -means that the command @samp{make extradeps=foo.h} will consider -@file{foo.h} as a dependency of each object file, but plain @samp{make} -will not. - -If none of the explicit rules for a target has commands, then @code{make} -searches for an applicable implicit rule to find some commands -@pxref{Implicit Rules, ,Using Implicit Rules}). - -@node Static Pattern, Double-Colon, Multiple Rules, Rules -@section Static Pattern Rules -@cindex static pattern rule -@cindex rule, static pattern -@cindex pattern rules, static (not implicit) -@cindex varying dependencies -@cindex dependencies, varying (static pattern) - -@dfn{Static pattern rules} are rules which specify multiple targets and -construct the dependency names for each target based on the target name. -They are more general than ordinary rules with multiple targets because the -targets do not have to have identical dependencies. Their dependencies must -be @emph{analogous}, but not necessarily @emph{identical}. - -@menu -* Static Usage:: The syntax of static pattern rules. -* Static versus Implicit:: When are they better than implicit rules? -@end menu - -@node Static Usage, Static versus Implicit, , Static Pattern -@subsection Syntax of Static Pattern Rules -@cindex static pattern rule, syntax of -@cindex pattern rules, static, syntax of - -Here is the syntax of a static pattern rule: - -@example -@var{targets} @dots{}: @var{target-pattern}: @var{dep-patterns} @dots{} - @var{commands} - @dots{} -@end example - -@noindent -The @var{targets} list specifies the targets that the rule applies to. -The targets can contain wildcard characters, just like the targets of -ordinary rules (@pxref{Wildcards, ,Using Wildcard Characters in File -Names}). - -@cindex target pattern, static (not implicit) -@cindex stem -The @var{target-pattern} and @var{dep-patterns} say how to compute the -dependencies of each target. Each target is matched against the -@var{target-pattern} to extract a part of the target name, called the -@dfn{stem}. This stem is substituted into each of the @var{dep-patterns} -to make the dependency names (one from each @var{dep-pattern}). - -Each pattern normally contains the character @samp{%} just once. When the -@var{target-pattern} matches a target, the @samp{%} can match any part of -the target name; this part is called the @dfn{stem}. The rest of the -pattern must match exactly. For example, the target @file{foo.o} matches -the pattern @samp{%.o}, with @samp{foo} as the stem. The targets -@file{foo.c} and @file{foo.out} do not match that pattern.@refill - -@cindex dependency pattern, static (not implicit) -The dependency names for each target are made by substituting the stem -for the @samp{%} in each dependency pattern. For example, if one -dependency pattern is @file{%.c}, then substitution of the stem -@samp{foo} gives the dependency name @file{foo.c}. It is legitimate -to write a dependency pattern that does not contain @samp{%}; then this -dependency is the same for all targets. - -@cindex @code{%}, quoting in static pattern -@cindex @code{%}, quoting with @code{\} (backslash) -@cindex @code{\} (backslash), to quote @code{%} -@cindex backslash (@code{\}), to quote @code{%} -@cindex quoting @code{%}, in static pattern -@samp{%} characters in pattern rules can be quoted with preceding -backslashes (@samp{\}). Backslashes that would otherwise quote @samp{%} -characters can be quoted with more backslashes. Backslashes that quote -@samp{%} characters or other backslashes are removed from the pattern -before it is compared to file names or has a stem substituted into it. -Backslashes that are not in danger of quoting @samp{%} characters go -unmolested. For example, the pattern @file{the\%weird\\%pattern\\} has -@samp{the%weird\} preceding the operative @samp{%} character, and -@samp{pattern\\} following it. The final two backslashes are left alone -because they cannot affect any @samp{%} character.@refill - -Here is an example, which compiles each of @file{foo.o} and @file{bar.o} -from the corresponding @file{.c} file: - -@example -@group -objects = foo.o bar.o - -$(objects): %.o: %.c - $(CC) -c $(CFLAGS) $< -o $@@ -@end group -@end example - -@noindent -Here @samp{$<} is the automatic variable that holds the name of the -dependency and @samp{$@@} is the automatic variable that holds the name -of the target; see @ref{Automatic, , Automatic Variables}. - -Each target specified must match the target pattern; a warning is issued -for each target that does not. If you have a list of files, only some of -which will match the pattern, you can use the @code{filter} function to -remove nonmatching file names (@pxref{Text Functions, ,Functions for String Substitution and Analysis}): - -@example -files = foo.elc bar.o lose.o - -$(filter %.o,$(files)): %.o: %.c - $(CC) -c $(CFLAGS) $< -o $@@ -$(filter %.elc,$(files)): %.elc: %.el - emacs -f batch-byte-compile $< -@end example - -@noindent -In this example the result of @samp{$(filter %.o,$(files))} is -@file{bar.o lose.o}, and the first static pattern rule causes each of -these object files to be updated by compiling the corresponding C source -file. The result of @w{@samp{$(filter %.elc,$(files))}} is -@file{foo.elc}, so that file is made from @file{foo.el}.@refill - -Another example shows how to use @code{$*} in static pattern rules: -@vindex $*@r{, and static pattern} - -@example -@group -bigoutput littleoutput : %output : text.g - generate text.g -$* > $@@ -@end group -@end example - -@noindent -When the @code{generate} command is run, @code{$*} will expand to the -stem, either @samp{big} or @samp{little}. - -@node Static versus Implicit, , Static Usage, Static Pattern -@subsection Static Pattern Rules versus Implicit Rules -@cindex rule, static pattern versus implicit -@cindex static pattern rule, versus implicit - -A static pattern rule has much in common with an implicit rule defined as a -pattern rule (@pxref{Pattern Rules, ,Defining and Redefining Pattern Rules}). -Both have a pattern for the target and patterns for constructing the -names of dependencies. The difference is in how @code{make} decides -@emph{when} the rule applies. - -An implicit rule @emph{can} apply to any target that matches its pattern, -but it @emph{does} apply only when the target has no commands otherwise -specified, and only when the dependencies can be found. If more than one -implicit rule appears applicable, only one applies; the choice depends on -the order of rules. - -By contrast, a static pattern rule applies to the precise list of targets -that you specify in the rule. It cannot apply to any other target and it -invariably does apply to each of the targets specified. If two conflicting -rules apply, and both have commands, that's an error. - -The static pattern rule can be better than an implicit rule for these -reasons: - -@itemize @bullet -@item -You may wish to override the usual implicit rule for a few -files whose names cannot be categorized syntactically but -can be given in an explicit list. - -@item -If you cannot be sure of the precise contents of the directories -you are using, you may not be sure which other irrelevant files -might lead @code{make} to use the wrong implicit rule. The choice -might depend on the order in which the implicit rule search is done. -With static pattern rules, there is no uncertainty: each rule applies -to precisely the targets specified. -@end itemize - -@node Double-Colon, Automatic Dependencies, Static Pattern, Rules -@section Double-Colon Rules -@cindex double-colon rules -@cindex rule, double-colon (@code{::}) -@cindex multiple rules for one target (@code{::}) -@cindex @code{::} rules (double-colon) - -@dfn{Double-colon} rules are rules written with @samp{::} instead of -@samp{:} after the target names. They are handled differently from -ordinary rules when the same target appears in more than one rule. - -When a target appears in multiple rules, all the rules must be the same -type: all ordinary, or all double-colon. If they are double-colon, each of -them is independent of the others. Each double-colon rule's commands are -executed if the target is older than any dependencies of that rule. This -can result in executing none, any, or all of the double-colon rules. - -Double-colon rules with the same target are in fact completely separate -from one another. Each double-colon rule is processed individually, just -as rules with different targets are processed. - -The double-colon rules for a target are executed in the order they appear -in the makefile. However, the cases where double-colon rules really make -sense are those where the order of executing the commands would not matter. - -Double-colon rules are somewhat obscure and not often very useful; they -provide a mechanism for cases in which the method used to update a target -differs depending on which dependency files caused the update, and such -cases are rare. - -Each double-colon rule should specify commands; if it does not, an -implicit rule will be used if one applies. -@xref{Implicit Rules, ,Using Implicit Rules}. - -@node Automatic Dependencies, , Double-Colon, Rules -@section Generating Dependencies Automatically -@cindex dependencies, automatic generation -@cindex automatic generation of dependencies -@cindex generating dependencies automatically - -In the makefile for a program, many of the rules you need to write often -say only that some object file depends on some header -file. For example, if @file{main.c} uses @file{defs.h} via an -@code{#include}, you would write: - -@example -main.o: defs.h -@end example - -@noindent -You need this rule so that @code{make} knows that it must remake -@file{main.o} whenever @file{defs.h} changes. You can see that for a -large program you would have to write dozens of such rules in your -makefile. And, you must always be very careful to update the makefile -every time you add or remove an @code{#include}. -@cindex @code{#include} - -@cindex @code{-M} (to compiler) -To avoid this hassle, most modern C compilers can write these rules for -you, by looking at the @code{#include} lines in the source files. -Usually this is done with the @samp{-M} option to the compiler. -For example, the command: - -@example -cc -M main.c -@end example - -@noindent -generates the output: - -@example -main.o : main.c defs.h -@end example - -@noindent -Thus you no longer have to write all those rules yourself. -The compiler will do it for you. - -Note that such a dependency constitutes mentioning @file{main.o} in a -makefile, so it can never be considered an intermediate file by implicit -rule search. This means that @code{make} won't ever remove the file -after using it; @pxref{Chained Rules, ,Chains of Implicit Rules}. - -@cindex @code{make depend} -With old @code{make} programs, it was traditional practice to use this -compiler feature to generate dependencies on demand with a command like -@samp{make depend}. That command would create a file @file{depend} -containing all the automatically-generated dependencies; then the -makefile could use @code{include} to read them in (@pxref{Include}). - -In GNU @code{make}, the feature of remaking makefiles makes this -practice obsolete---you need never tell @code{make} explicitly to -regenerate the dependencies, because it always regenerates any makefile -that is out of date. @xref{Remaking Makefiles}. - -The practice we recommend for automatic dependency generation is to have -one makefile corresponding to each source file. For each source file -@file{@var{name}.c} there is a makefile @file{@var{name}.d} which lists -what files the object file @file{@var{name}.o} depends on. That way -only the source files that have changed need to be rescanned to produce -the new dependencies. - -Here is the pattern rule to generate a file of dependencies (i.e., a makefile) -called @file{@var{name}.d} from a C source file called @file{@var{name}.c}: - -@example -@group -%.d: %.c - $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \ - | sed '\''s/$*\\.o[ :]*/& $@@/g'\'' > $@@' -@end group -@end example - -@noindent -@xref{Pattern Rules}, for information on defining pattern rules. The -@samp{-e} flag to the shell makes it exit immediately if the -@code{$(CC)} command fails (exits with a nonzero status). Normally the -shell exits with the status of the last command in the pipeline -(@code{sed} in this case), so @code{make} would not notice a nonzero -status from the compiler. -@cindex @code{-e} (shell flag) - -@cindex @code{-MM} (to GNU compiler) -With the GNU C compiler, you may wish to use the @samp{-MM} flag instead -of @samp{-M}. This omits dependencies on system header files. -@xref{Preprocessor Options, , Options Controlling the Preprocessor, -gcc.info, Using GNU CC}, for details. - -@cindex @code{sed} (shell command) -The purpose of the @code{sed} command is to translate (for example): - -@example -main.o : main.c defs.h -@end example - -@noindent -into: - -@example -main.o main.d : main.c defs.h -@end example - -@noindent -@cindex @code{.d} -This makes each @samp{.d} file depend on all the source and header files -that the corresponding @samp{.o} file depends on. @code{make} then -knows it must regenerate the dependencies whenever any of the source or -header files changes. - -Once you've defined the rule to remake the @samp{.d} files, -you then use the @code{include} directive to read them all in. -@xref{Include}. For example: - -@example -@group -sources = foo.c bar.c - -include $(sources:.c=.d) -@end group -@end example - -@noindent -(This example uses a substitution variable reference to translate the -list of source files @samp{foo.c bar.c} into a list of dependency -makefiles, @samp{foo.d bar.d}. @xref{Substitution Refs}, for full -information on substitution references.) Since the @samp{.d} files are -makefiles like any others, @code{make} will remake them as necessary -with no further work from you. @xref{Remaking Makefiles}. - -@node Commands, Using Variables, Rules, Top -@chapter Writing the Commands in Rules -@cindex commands, how to write -@cindex rule commands -@cindex writing rule commands - -The commands of a rule consist of shell command lines to be executed one -by one. Each command line must start with a tab, except that the first -command line may be attached to the target-and-dependencies line with a -semicolon in between. Blank lines and lines of just comments may appear -among the command lines; they are ignored. (But beware, an apparently -``blank'' line that begins with a tab is @emph{not} blank! It is an -empty command; @pxref{Empty Commands}.) - -Users use many different shell programs, but commands in makefiles are -always interpreted by @file{/bin/sh} unless the makefile specifies -otherwise. @xref{Execution, ,Command Execution}. - -@cindex comments, in commands -@cindex commands, comments in -@cindex @code{#} (comments), in commands -The shell that is in use determines whether comments can be written on -command lines, and what syntax they use. When the shell is -@file{/bin/sh}, a @samp{#} starts a comment that extends to the end of -the line. The @samp{#} does not have to be at the beginning of a line. -Text on a line before a @samp{#} is not part of the comment. - -@menu -* Echoing:: How to control when commands are echoed. -* Execution:: How commands are executed. -* Parallel:: How commands can be executed in parallel. -* Errors:: What happens after a command execution error. -* Interrupts:: What happens when a command is interrupted. -* Recursion:: Invoking @code{make} from makefiles. -* Sequences:: Defining canned sequences of commands. -* Empty Commands:: Defining useful, do-nothing commands. -@end menu - -@node Echoing, Execution, , Commands -@section Command Echoing -@cindex echoing of commands -@cindex silent operation -@cindex @code{@@} (in commands) -@cindex commands, echoing -@cindex printing of commands - -Normally @code{make} prints each command line before it is executed. -We call this @dfn{echoing} because it gives the appearance that you -are typing the commands yourself. - -When a line starts with @samp{@@}, the echoing of that line is suppressed. -The @samp{@@} is discarded before the command is passed to the shell. -Typically you would use this for a command whose only effect is to print -something, such as an @code{echo} command to indicate progress through -the makefile: - -@example -@@echo About to make distribution files -@end example - -@cindex @code{-n} -@cindex @code{--just-print} -@cindex @code{--dry-run} -@cindex @code{--recon} -When @code{make} is given the flag @samp{-n} or @samp{--just-print}, -echoing is all that happens, no execution. @xref{Options Summary, -,Summary of Options}. In this case and only this case, even the -commands starting with @samp{@@} are printed. This flag is useful for -finding out which commands @code{make} thinks are necessary without -actually doing them. - -@cindex @code{-s} -@cindex @code{--silent} -@cindex @code{--quiet} -@findex .SILENT -The @samp{-s} or @samp{--silent} -flag to @code{make} prevents all echoing, as if all commands -started with @samp{@@}. A rule in the makefile for the special target -@code{.SILENT} without dependencies has the same effect -(@pxref{Special Targets, ,Special Built-in Target Names}). -@code{.SILENT} is essentially obsolete since @samp{@@} is more flexible.@refill - -@node Execution, Parallel, Echoing, Commands -@section Command Execution -@cindex commands, execution -@cindex execution, of commands -@cindex shell command, execution -@vindex SHELL @r{(command execution)} - -When it is time to execute commands to update a target, they are executed -by making a new subshell for each line. (In practice, @code{make} may -take shortcuts that do not affect the results.) - -@cindex @code{cd} (shell command) -@strong{Please note:} this implies that shell commands such as -@code{cd} that set variables local to each process will not affect the -following command lines. If you want to use @code{cd} to affect the -next command, put the two on a single line with a semicolon between -them. Then @code{make} will consider them a single command and pass -them, together, to a shell which will execute them in sequence. For -example: - -@example -foo : bar/lose - cd bar; gobble lose > ../foo -@end example - -@cindex commands, backslash (@code{\}) in -@cindex commands, quoting newlines in -@cindex backslash (@code{\}), in commands -@cindex @code{\} (backslash), in commands -@cindex quoting newline, in commands -@cindex newline, quoting, in commands -If you would like to split a single shell command into multiple lines of -text, you must use a backslash at the end of all but the last subline. -Such a sequence of lines is combined into a single line, by deleting the -backslash-newline sequences, before passing it to the shell. Thus, the -following is equivalent to the preceding example: - -@example -@group -foo : bar/lose - cd bar; \ - gobble lose > ../foo -@end group -@end example - -@vindex SHELL -The program used as the shell is taken from the variable @code{SHELL}. -By default, the program @file{/bin/sh} is used. - -@cindex environment, @code{SHELL} in -Unlike most variables, the variable @code{SHELL} is never set from the -environment. This is because the @code{SHELL} environment variable is -used to specify your personal choice of shell program for interactive -use. It would be very bad for personal choices like this to affect -the functioning of makefiles. @xref{Environment, ,Variables from the -Environment}. - -@node Parallel, Errors, Execution, Commands -@section Parallel Execution -@cindex commands, execution in parallel -@cindex parallel execution -@cindex execution, in parallel -@cindex job slots -@cindex @code{-j} -@cindex @code{--jobs} - -GNU @code{make} knows how to execute several commands at once. -Normally, @code{make} will execute only one command at a time, waiting -for it to finish before executing the next. However, the @samp{-j} or -@samp{--jobs} option tells @code{make} to execute many commands -simultaneously.@refill - -If the @samp{-j} option is followed by an integer, this is the number of -commands to execute at once; this is called the number of @dfn{job slots}. -If there is nothing looking like an integer after the @samp{-j} option, -there is no limit on the number of job slots. The default number of job -slots is one, which means serial execution (one thing at a time). - -One unpleasant consequence of running several commands simultaneously is -that output from all of the commands comes when the commands send it, so -messages from different commands may be interspersed. - -Another problem is that two processes cannot both take input from the -same device; so to make sure that only one command tries to take input -from the terminal at once, @code{make} will invalidate the standard -input streams of all but one running command. This means that -attempting to read from standard input will usually be a fatal error (a -@samp{Broken pipe} signal) for most child processes if there are -several. -@cindex broken pipe -@cindex standard input - -It is unpredictable which command will have a valid standard input stream -(which will come from the terminal, or wherever you redirect the standard -input of @code{make}). The first command run will always get it first, and -the first command started after that one finishes will get it next, and so -on. - -We will change how this aspect of @code{make} works if we find a better -alternative. In the mean time, you should not rely on any command using -standard input at all if you are using the parallel execution feature; but -if you are not using this feature, then standard input works normally in -all commands. - -If a command fails (is killed by a signal or exits with a nonzero -status), and errors are not ignored for that command -(@pxref{Errors, ,Errors in Commands}), -the remaining command lines to remake the same target will not be run. -If a command fails and the @samp{-k} or @samp{--keep-going} -option was not given -(@pxref{Options Summary, ,Summary of Options}), -@code{make} aborts execution. If make -terminates for any reason (including a signal) with child processes -running, it waits for them to finish before actually exiting.@refill - -@cindex load average -@cindex limiting jobs based on load -@cindex jobs, limiting based on load -@cindex @code{-l} (load average) -@cindex @code{--max-load} -@cindex @code{--load-average} -When the system is heavily loaded, you will probably want to run fewer jobs -than when it is lightly loaded. You can use the @samp{-l} option to tell -@code{make} to limit the number of jobs to run at once, based on the load -average. The @samp{-l} or @samp{--max-load} -option is followed by a floating-point number. For -example, - -@example --l 2.5 -@end example - -@noindent -will not let @code{make} start more than one job if the load average is -above 2.5. The @samp{-l} option with no following number removes the -load limit, if one was given with a previous @samp{-l} option.@refill - -More precisely, when @code{make} goes to start up a job, and it already has -at least one job running, it checks the current load average; if it is not -lower than the limit given with @samp{-l}, @code{make} waits until the load -average goes below that limit, or until all the other jobs finish. - -By default, there is no load limit. - -@node Errors, Interrupts, Parallel, Commands -@section Errors in Commands -@cindex errors (in commands) -@cindex commands, errors in -@cindex exit status (errors) - -After each shell command returns, @code{make} looks at its exit status. -If the command completed successfully, the next command line is executed -in a new shell; after the last command line is finished, the rule is -finished. - -If there is an error (the exit status is nonzero), @code{make} gives up on -the current rule, and perhaps on all rules. - -Sometimes the failure of a certain command does not indicate a problem. -For example, you may use the @code{mkdir} command to ensure that a -directory exists. If the directory already exists, @code{mkdir} will -report an error, but you probably want @code{make} to continue regardless. - -@cindex @code{-} (in commands) -To ignore errors in a command line, write a @samp{-} at the beginning of -the line's text (after the initial tab). The @samp{-} is discarded before -the command is passed to the shell for execution. - -For example, - -@example -@group -clean: - -rm -f *.o -@end group -@end example -@cindex @code{rm} (shell command) - -@noindent -This causes @code{rm} to continue even if it is unable to remove a file. - -@cindex @code{-i} -@cindex @code{--ignore-errors} -@findex .IGNORE -When you run @code{make} with the @samp{-i} or @samp{--ignore-errors} -flag, errors are ignored in all commands of all rules. A rule in the -makefile for the special target @code{.IGNORE} has the same effect, if -there are no dependencies. These ways of ignoring errors are obsolete -because @samp{-} is more flexible. - -When errors are to be ignored, because of either a @samp{-} or the -@samp{-i} flag, @code{make} treats an error return just like success, -except that it prints out a message that tells you the status code -the command exited with, and says that the error has been ignored. - -When an error happens that @code{make} has not been told to ignore, -it implies that the current target cannot be correctly remade, and neither -can any other that depends on it either directly or indirectly. No further -commands will be executed for these targets, since their preconditions -have not been achieved. - - -@cindex @code{-k} -@cindex @code{--keep-going} -Normally @code{make} gives up immediately in this circumstance, returning a -nonzero status. However, if the @samp{-k} or @samp{--keep-going} -flag is specified, @code{make} -continues to consider the other dependencies of the pending targets, -remaking them if necessary, before it gives up and returns nonzero status. -For example, after an error in compiling one object file, @samp{make -k} -will continue compiling other object files even though it already knows -that linking them will be impossible. @xref{Options Summary, ,Summary of Options}. - -The usual behavior assumes that your purpose is to get the specified -targets up to date; once @code{make} learns that this is impossible, it -might as well report the failure immediately. The @samp{-k} option says -that the real purpose is to test as many of the changes made in the -program as possible, perhaps to find several independent problems so -that you can correct them all before the next attempt to compile. This -is why Emacs' @code{compile} command passes the @samp{-k} flag by -default. -@cindex Emacs (@code{M-x compile}) - -@findex .DELETE_ON_ERROR -@cindex deletion of target files -@cindex removal of target files -@cindex target, deleting on error -Usually when a command fails, if it has changed the target file at all, -the file is corrupted and cannot be used---or at least it is not -completely updated. Yet the file's timestamp says that it is now up to -date, so the next time @code{make} runs, it will not try to update that -file. The situation is just the same as when the command is killed by a -signal; @pxref{Interrupts}. So generally the right thing to do is to -delete the target file if the command fails after beginning to change -the file. @code{make} will do this if @code{.DELETE_ON_ERROR} appears -as a target. This is almost always what you want @code{make} to do, but -it is not historical practice; so for compatibility, you must explicitly -request it. - -@node Interrupts, Recursion, Errors, Commands -@section Interrupting or Killing @code{make} -@cindex interrupt -@cindex signal -@cindex deletion of target files -@cindex removal of target files -@cindex target, deleting on interrupt -@cindex killing (interruption) - -If @code{make} gets a fatal signal while a command is executing, it may -delete the target file that the command was supposed to update. This is -done if the target file's last-modification time has changed since -@code{make} first checked it. - -The purpose of deleting the target is to make sure that it is remade from -scratch when @code{make} is next run. Why is this? Suppose you type -@kbd{Ctrl-c} while a compiler is running, and it has begun to write an -object file @file{foo.o}. The @kbd{Ctrl-c} kills the compiler, resulting -in an incomplete file whose last-modification time is newer than the source -file @file{foo.c}. But @code{make} also receives the @kbd{Ctrl-c} signal -and deletes this incomplete file. If @code{make} did not do this, the next -invocation of @code{make} would think that @file{foo.o} did not require -updating---resulting in a strange error message from the linker when it -tries to link an object file half of which is missing. - -@findex .PRECIOUS -You can prevent the deletion of a target file in this way by making the -special target @code{.PRECIOUS} depend on it. Before remaking a target, -@code{make} checks to see whether it appears on the dependencies of -@code{.PRECIOUS}, and thereby decides whether the target should be deleted -if a signal happens. Some reasons why you might do this are that the -target is updated in some atomic fashion, or exists only to record a -modification-time (its contents do not matter), or must exist at all -times to prevent other sorts of trouble. - -@node Recursion, Sequences, Interrupts, Commands -@section Recursive Use of @code{make} -@cindex recursion -@cindex subdirectories, recursion for - -Recursive use of @code{make} means using @code{make} as a command in a -makefile. This technique is useful when you want separate makefiles for -various subsystems that compose a larger system. For example, suppose you -have a subdirectory @file{subdir} which has its own makefile, and you would -like the containing directory's makefile to run @code{make} on the -subdirectory. You can do it by writing this: - -@example -subsystem: - cd subdir; $(MAKE) -@end example - -@noindent -or, equivalently, this (@pxref{Options Summary, ,Summary of Options}): - -@example -subsystem: - $(MAKE) -C subdir -@end example -@cindex @code{-C} -@cindex @code{--directory} - -You can write recursive @code{make} commands just by copying this example, -but there are many things to know about how they work and why, and about -how the sub-@code{make} relates to the top-level @code{make}. - -@menu -* MAKE Variable:: The special effects of using @samp{$(MAKE)}. -* Variables/Recursion:: How to communicate variables to a sub-@code{make}. -* Options/Recursion:: How to communicate options to a sub-@code{make}. -* -w Option:: How the @samp{-w} or @samp{--print-directory} option - helps debug use of recursive @code{make} commands. -@end menu - -@node MAKE Variable, Variables/Recursion, , Recursion -@subsection How the @code{MAKE} Variable Works -@vindex MAKE -@cindex recursion, and @code{MAKE} variable - -Recursive @code{make} commands should always use the variable @code{MAKE}, -not the explicit command name @samp{make}, as shown here: - -@example -@group -subsystem: - cd subdir; $(MAKE) -@end group -@end example - -The value of this variable is the file name with which @code{make} was -invoked. If this file name was @file{/bin/make}, then the command executed -is @samp{cd subdir; /bin/make}. If you use a special version of -@code{make} to run the top-level makefile, the same special version will be -executed for recursive invocations. -@cindex @code{cd} (shell command) - -As a special feature, using the variable @code{MAKE} in the commands of -a rule alters the effects of the @samp{-t} (@samp{--touch}), @samp{-n} -(@samp{--just-print}), or @samp{-q} (@w{@samp{--question}}) option. -Using the @code{MAKE} variable has the same effect as using a @samp{+} -character at the beginning of the command line. @xref{Instead of -Execution, ,Instead of Executing the Commands}.@refill - -Consider the command @samp{make -t} in the above example. (The -@samp{-t} option marks targets as up to date without actually running -any commands; see @ref{Instead of Execution}.) Following the usual -definition of @samp{-t}, a @samp{make -t} command in the example would -create a file named @file{subsystem} and do nothing else. What you -really want it to do is run @samp{@w{cd subdir;} @w{make -t}}; but that would -require executing the command, and @samp{-t} says not to execute -commands.@refill -@cindex @code{-t}, and recursion -@cindex recursion, and @code{-t} -@cindex @code{--touch}, and recursion - -The special feature makes this do what you want: whenever a command -line of a rule contains the variable @code{MAKE}, the flags @samp{-t}, -@samp{-n} and @samp{-q} do not apply to that line. Command lines -containing @code{MAKE} are executed normally despite the presence of a -flag that causes most commands not to be run. The usual -@code{MAKEFLAGS} mechanism passes the flags to the sub-@code{make} -(@pxref{Options/Recursion, ,Communicating Options to a -Sub-@code{make}}), so your request to touch the files, or print the -commands, is propagated to the subsystem.@refill - -@node Variables/Recursion, Options/Recursion, MAKE Variable, Recursion -@subsection Communicating Variables to a Sub-@code{make} -@cindex sub-@code{make} -@cindex environment, and recursion -@cindex exporting variables -@cindex variables, environment -@cindex variables, exporting -@cindex recursion, and environment -@cindex recursion, and variables - -Variable values of the top-level @code{make} can be passed to the -sub-@code{make} through the environment by explicit request. These -variables are defined in the sub-@code{make} as defaults, but do not -override what is specified in the makefile used by the sub-@code{make} -makefile unless you use the @samp{-e} switch (@pxref{Options Summary, -,Summary of Options}).@refill - -To pass down, or @dfn{export}, a variable, @code{make} adds the variable -and its value to the environment for running each command. The -sub-@code{make}, in turn, uses the environment to initialize its table -of variable values. @xref{Environment, ,Variables from the -Environment}. - -Except by explicit request, @code{make} exports a variable only if it -is either defined in the environment initially or set on the command -line, and if its name consists only of letters, numbers, and underscores. -Some shells cannot cope with environment variable names consisting of -characters other than letters, numbers, and underscores. - -The special variables @code{SHELL} and @code{MAKEFLAGS} are always -exported (unless you unexport them). -@code{MAKEFILES} is exported if you set it to anything. - -@code{make} automatically passes down variable values that were defined -on the command line, by putting them in the @code{MAKEFLAGS} variable. -@iftex -See the next section. -@end iftex -@ifinfo -@xref{Options/Recursion}. -@end ifinfo - -Variables are @emph{not} normally passed down if they were created by -default by @code{make} (@pxref{Implicit Variables, ,Variables Used by -Implicit Rules}). The sub-@code{make} will define these for -itself.@refill - -@findex export -If you want to export specific variables to a sub-@code{make}, use the -@code{export} directive, like this: - -@example -export @var{variable} @dots{} -@end example - -@noindent -@findex unexport -If you want to @emph{prevent} a variable from being exported, use the -@code{unexport} directive, like this: - -@example -unexport @var{variable} @dots{} -@end example - -@noindent -As a convenience, you can define a variable and export it at the same -time by doing: - -@example -export @var{variable} = value -@end example - -@noindent -has the same result as: - -@example -@var{variable} = value -export @var{variable} -@end example - -@noindent -and - -@example -export @var{variable} := value -@end example - -@noindent -has the same result as: - -@example -@var{variable} := value -export @var{variable} -@end example - -Likewise, - -@example -export @var{variable} += value -@end example - -@noindent -is just like: - -@example -@var{variable} += value -export @var{variable} -@end example - -@noindent -@xref{Appending, ,Appending More Text to Variables}. - -You may notice that the @code{export} and @code{unexport} directives -work in @code{make} in the same way they work in the shell, @code{sh}. - -If you want all variables to be exported by default, you can use -@code{export} by itself: - -@example -export -@end example - -@noindent -This tells @code{make} that variables which are not explicitly mentioned -in an @code{export} or @code{unexport} directive should be exported. -Any variable given in an @code{unexport} directive will still @emph{not} -be exported. If you use @code{export} by itself to export variables by -default, variables whose names contain characters other than -alphanumerics and underscores will not be exported unless specifically -mentioned in an @code{export} directive.@refill - -@findex .EXPORT_ALL_VARIABLES -The behavior elicited by an @code{export} directive by itself was the -default in older versions of GNU @code{make}. If your makefiles depend -on this behavior and you want to be compatible with old versions of -@code{make}, you can write a rule for the special target -@code{.EXPORT_ALL_VARIABLES} instead of using the @code{export} directive. -This will be ignored by old @code{make}s, while the @code{export} -directive will cause a syntax error.@refill -@cindex compatibility in exporting - -Likewise, you can use @code{unexport} by itself to tell @code{make} -@emph{not} to export variables by default. Since this is the default -behavior, you would only need to do this if @code{export} had been used -by itself earlier (in an included makefile, perhaps). You -@strong{cannot} use @code{export} and @code{unexport} by themselves to -have variables exported for some commands and not for others. The last -@code{export} or @code{unexport} directive that appears by itself -determines the behavior for the entire run of @code{make}.@refill - -@vindex MAKELEVEL -@cindex recursion, level of -As a special feature, the variable @code{MAKELEVEL} is changed when it -is passed down from level to level. This variable's value is a string -which is the depth of the level as a decimal number. The value is -@samp{0} for the top-level @code{make}; @samp{1} for a sub-@code{make}, -@samp{2} for a sub-sub-@code{make}, and so on. The incrementation -happens when @code{make} sets up the environment for a command.@refill - -The main use of @code{MAKELEVEL} is to test it in a conditional -directive (@pxref{Conditionals, ,Conditional Parts of Makefiles}); this -way you can write a makefile that behaves one way if run recursively and -another way if run directly by you.@refill - -@vindex MAKEFILES -You can use the variable @code{MAKEFILES} to cause all sub-@code{make} -commands to use additional makefiles. The value of @code{MAKEFILES} is -a whitespace-separated list of file names. This variable, if defined in -the outer-level makefile, is passed down through the environment; then -it serves as a list of extra makefiles for the sub-@code{make} to read -before the usual or specified ones. @xref{MAKEFILES Variable, ,The -Variable @code{MAKEFILES}}.@refill - -@node Options/Recursion, -w Option, Variables/Recursion, Recursion -@subsection Communicating Options to a Sub-@code{make} -@cindex options, and recursion -@cindex recursion, and options - -@vindex MAKEFLAGS -Flags such as @samp{-s} and @samp{-k} are passed automatically to the -sub-@code{make} through the variable @code{MAKEFLAGS}. This variable is -set up automatically by @code{make} to contain the flag letters that -@code{make} received. Thus, if you do @w{@samp{make -ks}} then -@code{MAKEFLAGS} gets the value @samp{ks}.@refill - -As a consequence, every sub-@code{make} gets a value for @code{MAKEFLAGS} -in its environment. In response, it takes the flags from that value and -processes them as if they had been given as arguments. -@xref{Options Summary, ,Summary of Options}. - -@cindex command line variable definitions, and recursion -@cindex variables, command line, and recursion -@cindex recursion, and command line variable definitions -Likewise variables defined on the command line are passed to the -sub-@code{make} through @code{MAKEFLAGS}. Words in the value of -@code{MAKEFLAGS} that contain @samp{=}, @code{make} treats as variable -definitions just as if they appeared on the command line. -@xref{Overriding, ,Overriding Variables}. - -@cindex @code{-C}, and recursion -@cindex @code{-f}, and recursion -@cindex @code{-o}, and recursion -@cindex @code{-W}, and recursion -@cindex @code{--directory}, and recursion -@cindex @code{--file}, and recursion -@cindex @code{--old-file}, and recursion -@cindex @code{--assume-old}, and recursion -@cindex @code{--assume-new}, and recursion -@cindex @code{--new-file}, and recursion -@cindex recursion, and @code{-C} -@cindex recursion, and @code{-f} -@cindex recursion, and @code{-o} -@cindex recursion, and @code{-W} -The options @samp{-C}, @samp{-f}, @samp{-o}, and @samp{-W} are not put -into @code{MAKEFLAGS}; these options are not passed down.@refill - -@cindex @code{-j}, and recursion -@cindex @code{--jobs}, and recursion -@cindex recursion, and @code{-j} -@cindex job slots, and recursion -The @samp{-j} option is a special case (@pxref{Parallel, ,Parallel Execution}). -If you set it to some numeric value, @samp{-j 1} is always put into -@code{MAKEFLAGS} instead of the value you specified. This is because if -the @w{@samp{-j}} option were passed down to sub-@code{make}s, you would -get many more jobs running in parallel than you asked for. If you give -@samp{-j} with no numeric argument, meaning to run as many jobs as -possible in parallel, this is passed down, since multiple infinities are -no more than one.@refill - -If you do not want to pass the other flags down, you must change the -value of @code{MAKEFLAGS}, like this: - -@example -MAKEFLAGS= -subsystem: - cd subdir; $(MAKE) -@end example - -or like this: - -@example -subsystem: - cd subdir; $(MAKE) MAKEFLAGS= -@end example - -@vindex MAKEOVERRIDES -The command line variable definitions really appear in the variable -@code{MAKEOVERRIDES}, and @code{MAKEFLAGS} contains a reference to this -variable. If you do want to pass flags down normally, but don't want to -pass down the command line variable definitions, you can reset -@code{MAKEOVERRIDES} to empty, like this: - -@example -MAKEOVERRIDES = -@end example - -@noindent -@cindex Arg list too long -@cindex E2BIG -This is not usually useful to do. However, some systems have a small -fixed limit on the size of the environment, and putting so much -information in into the value of @code{MAKEFLAGS} can exceed it. -If you see the error message @samp{Arg list too long}, this may be the problem. -@findex .POSIX -@cindex POSIX.2 -(For strict compliance with POSIX.2, changing @code{MAKEOVERRIDES} does -not affect @code{MAKEFLAGS} if the special target @samp{.POSIX} appears -in the makefile. You probably do not care about this.) - -@vindex MFLAGS -A similar variable @code{MFLAGS} exists also, for historical -compatibility. It has the same value as @code{MAKEFLAGS} except that it -does not contain the command line variable definitions, and it always -begins with a hyphen unless it is empty (@code{MAKEFLAGS} begins with a -hyphen only when it begins with an option that has no single-letter -version, such as @samp{--warn-undefined-variables}). @code{MFLAGS} was -traditionally used explicitly in the recursive @code{make} command, like -this: - -@example -subsystem: - cd subdir; $(MAKE) $(MFLAGS) -@end example - -@noindent -but now @code{MAKEFLAGS} makes this usage redundant. If you want your -makefiles to be compatible with old @code{make} programs, use this -technique; it will work fine with more modern @code{make} versions too. - -@cindex setting options from environment -@cindex options, setting from environment -@cindex setting options in makefiles -@cindex options, setting in makefiles -The @code{MAKEFLAGS} variable can also be useful if you want to have -certain options, such as @samp{-k} (@pxref{Options Summary, ,Summary of -Options}), set each time you run @code{make}. You simply put a value for -@code{MAKEFLAGS} in your environment. You can also set @code{MAKEFLAGS} in -a makefile, to specify additional flags that should also be in effect for -that makefile. (Note that you cannot use @code{MFLAGS} this way. That -variable is set only for compatibility; @code{make} does not interpret a -value you set for it in any way.) - -When @code{make} interprets the value of @code{MAKEFLAGS} (either from the -environment or from a makefile), it first prepends a hyphen if the value -does not already begin with one. Then it chops the value into words -separated by blanks, and parses these words as if they were options given -on the command line (except that @samp{-C}, @samp{-f}, @samp{-h}, -@samp{-o}, @samp{-W}, and their long-named versions are ignored; and there -is no error for an invalid option). - -If you do put @code{MAKEFLAGS} in your environment, you should be sure not -to include any options that will drastically affect the actions of -@code{make} and undermine the purpose of makefiles and of @code{make} -itself. For instance, the @samp{-t}, @samp{-n}, and @samp{-q} options, if -put in one of these variables, could have disastrous consequences and would -certainly have at least surprising and probably annoying effects.@refill - -@node -w Option, , Options/Recursion, Recursion -@subsection The @samp{--print-directory} Option -@cindex directories, printing them -@cindex printing directories -@cindex recursion, and printing directories - -If you use several levels of recursive @code{make} invocations, the -@samp{-w} or @w{@samp{--print-directory}} option can make the output a -lot easier to understand by showing each directory as @code{make} -starts processing it and as @code{make} finishes processing it. For -example, if @samp{make -w} is run in the directory @file{/u/gnu/make}, -@code{make} will print a line of the form:@refill - -@example -make: Entering directory `/u/gnu/make'. -@end example - -@noindent -before doing anything else, and a line of the form: - -@example -make: Leaving directory `/u/gnu/make'. -@end example - -@noindent -when processing is completed. - -@cindex @code{-C}, and @code{-w} -@cindex @code{--directory}, and @code{--print-directory} -@cindex recursion, and @code{-w} -@cindex @code{-w}, and @code{-C} -@cindex @code{-w}, and recursion -@cindex @code{--print-directory}, and @code{--directory} -@cindex @code{--print-directory}, and recursion -@cindex @code{--no-print-directory} -@cindex @code{--print-directory}, disabling -@cindex @code{-w}, disabling -Normally, you do not need to specify this option because @samp{make} -does it for you: @samp{-w} is turned on automatically when you use the -@samp{-C} option, and in sub-@code{make}s. @code{make} will not -automatically turn on @samp{-w} if you also use @samp{-s}, which says to -be silent, or if you use @samp{--no-print-directory} to explicitly -disable it. - -@node Sequences, Empty Commands, Recursion, Commands -@section Defining Canned Command Sequences -@cindex sequences of commands -@cindex commands, sequences of - -When the same sequence of commands is useful in making various targets, you -can define it as a canned sequence with the @code{define} directive, and -refer to the canned sequence from the rules for those targets. The canned -sequence is actually a variable, so the name must not conflict with other -variable names. - -Here is an example of defining a canned sequence of commands: - -@example -define run-yacc -yacc $(firstword $^) -mv y.tab.c $@@ -endef -@end example -@cindex @code{yacc} - -@noindent -Here @code{run-yacc} is the name of the variable being defined; -@code{endef} marks the end of the definition; the lines in between are the -commands. The @code{define} directive does not expand variable references -and function calls in the canned sequence; the @samp{$} characters, -parentheses, variable names, and so on, all become part of the value of the -variable you are defining. -@xref{Defining, ,Defining Variables Verbatim}, -for a complete explanation of @code{define}. - -The first command in this example runs Yacc on the first dependency of -whichever rule uses the canned sequence. The output file from Yacc is -always named @file{y.tab.c}. The second command moves the output to the -rule's target file name. - -To use the canned sequence, substitute the variable into the commands of a -rule. You can substitute it like any other variable -(@pxref{Reference, ,Basics of Variable References}). -Because variables defined by @code{define} are recursively expanded -variables, all the variable references you wrote inside the @code{define} -are expanded now. For example: - -@example -foo.c : foo.y - $(run-yacc) -@end example - -@noindent -@samp{foo.y} will be substituted for the variable @samp{$^} when it occurs in -@code{run-yacc}'s value, and @samp{foo.c} for @samp{$@@}.@refill - -This is a realistic example, but this particular one is not needed in -practice because @code{make} has an implicit rule to figure out these -commands based on the file names involved -(@pxref{Implicit Rules, ,Using Implicit Rules}). - -@cindex @@, and @code{define} -@cindex -, and @code{define} -@cindex +, and @code{define} -In command execution, each line of a canned sequence is treated just as -if the line appeared on its own in the rule, preceded by a tab. In -particular, @code{make} invokes a separate subshell for each line. You -can use the special prefix characters that affect command lines -(@samp{@@}, @samp{-}, and @samp{+}) on each line of a canned sequence. -@xref{Commands, ,Writing the Commands in Rules}. -For example, using this canned sequence: - -@example -define frobnicate -@@echo "frobnicating target $@@" -frob-step-1 $< -o $@@-step-1 -frob-step-2 $@@-step-1 -o $@@ -endef -@end example - -@noindent -@code{make} will not echo the first line, the @code{echo} command. -But it @emph{will} echo the following two command lines. - -On the other hand, prefix characters on the command line that refers to -a canned sequence apply to every line in the sequence. So the rule: - -@example -frob.out: frob.in - @@$(frobnicate) -@end example - -@noindent -does not echo @emph{any} commands. -(@xref{Echoing, ,Command Echoing}, for a full explanation of @samp{@@}.) - -@node Empty Commands, , Sequences, Commands -@section Using Empty Commands -@cindex empty commands -@cindex commands, empty - -It is sometimes useful to define commands which do nothing. This is done -simply by giving a command that consists of nothing but whitespace. For -example: - -@example -target: ; -@end example - -@noindent -defines an empty command string for @file{target}. You could also use a -line beginning with a tab character to define an empty command string, -but this would be confusing because such a line looks empty. - -@findex .DEFAULT@r{, and empty commands} -You may be wondering why you would want to define a command string that -does nothing. The only reason this is useful is to prevent a target -from getting implicit commands (from implicit rules or the -@code{.DEFAULT} special target; @pxref{Implicit Rules} and -@pxref{Last Resort, ,Defining Last-Resort Default Rules}).@refill - -You may be inclined to define empty command strings for targets that are -not actual files, but only exist so that their dependencies can be -remade. However, this is not the best way to do that, because the -dependencies may not be remade properly if the target file actually does exist. -@xref{Phony Targets, ,Phony Targets}, for a better way to do this. - -@node Using Variables, Conditionals, Commands, Top -@chapter How to Use Variables -@cindex variable -@cindex value -@cindex recursive variable expansion -@cindex simple variable expansion - -A @dfn{variable} is a name defined in a makefile to represent a string -of text, called the variable's @dfn{value}. These values are -substituted by explicit request into targets, dependencies, commands, -and other parts of the makefile. (In some other versions of @code{make}, -variables are called @dfn{macros}.) -@cindex macro - -Variables and functions in all parts of a makefile are expanded when -read, except for the shell commands in rules, the right-hand sides of -variable definitions using @samp{=}, and the bodies of variable -definitions using the @code{define} directive.@refill - -Variables can represent lists of file names, options to pass to compilers, -programs to run, directories to look in for source files, directories to -write output in, or anything else you can imagine. - -A variable name may be any sequence of characters not containing @samp{:}, -@samp{#}, @samp{=}, or leading or trailing whitespace. However, -variable names containing characters other than letters, numbers, and -underscores should be avoided, as they may be given special meanings in the -future, and with some shells they cannot be passed through the environment to a -sub-@code{make} -(@pxref{Variables/Recursion, ,Communicating Variables to a Sub-@code{make}}). - -Variable names are case-sensitive. The names @samp{foo}, @samp{FOO}, -and @samp{Foo} all refer to different variables. - -It is traditional to use upper case letters in variable names, but we -recommend using lower case letters for variable names that serve internal -purposes in the makefile, and reserving upper case for parameters that -control implicit rules or for parameters that the user should override with -command options (@pxref{Overriding, ,Overriding Variables}). - -A few variables have names that are a single punctuation character or -just a few characters. These are the @dfn{automatic variables}, and -they have particular specialized uses. @xref{Automatic, ,Automatic Variables}. - -@menu -* Reference:: How to use the value of a variable. -* Flavors:: Variables come in two flavors. -* Advanced:: Advanced features for referencing a variable. -* Values:: All the ways variables get their values. -* Setting:: How to set a variable in the makefile. -* Appending:: How to append more text to the old value - of a variable. -* Override Directive:: How to set a variable in the makefile even if - the user has set it with a command argument. -* Defining:: An alternate way to set a variable - to a verbatim string. -* Environment:: Variable values can come from the environment. -* Automatic:: Some special variables have predefined - meanings for use with implicit rules. -@end menu - -@node Reference, Flavors, , Using Variables -@section Basics of Variable References -@cindex variables, how to reference -@cindex reference to variables -@cindex @code{$}, in variable reference -@cindex dollar sign (@code{$}), in variable reference - -To substitute a variable's value, write a dollar sign followed by the name -of the variable in parentheses or braces: either @samp{$(foo)} or -@samp{$@{foo@}} is a valid reference to the variable @code{foo}. This -special significance of @samp{$} is why you must write @samp{$$} to have -the effect of a single dollar sign in a file name or command. - -Variable references can be used in any context: targets, dependencies, -commands, most directives, and new variable values. Here is an -example of a common case, where a variable holds the names of all the -object files in a program: - -@example -@group -objects = program.o foo.o utils.o -program : $(objects) - cc -o program $(objects) - -$(objects) : defs.h -@end group -@end example - -Variable references work by strict textual substitution. Thus, the rule - -@example -@group -foo = c -prog.o : prog.$(foo) - $(foo)$(foo) -$(foo) prog.$(foo) -@end group -@end example - -@noindent -could be used to compile a C program @file{prog.c}. Since spaces before -the variable value are ignored in variable assignments, the value of -@code{foo} is precisely @samp{c}. (Don't actually write your makefiles -this way!) - -A dollar sign followed by a character other than a dollar sign, -open-parenthesis or open-brace treats that single character as the -variable name. Thus, you could reference the variable @code{x} with -@samp{$x}. However, this practice is strongly discouraged, except in -the case of the automatic variables (@pxref{Automatic, ,Automatic Variables}). - -@node Flavors, Advanced, Reference, Using Variables -@section The Two Flavors of Variables -@cindex flavors of variables -@cindex recursive variable expansion -@cindex variables, flavors -@cindex recursively expanded variables -@cindex variables, recursively expanded - -There are two ways that a variable in GNU @code{make} can have a value; -we call them the two @dfn{flavors} of variables. The two flavors are -distinguished in how they are defined and in what they do when expanded. - -@cindex = -The first flavor of variable is a @dfn{recursively expanded} variable. -Variables of this sort are defined by lines using @samp{=} -(@pxref{Setting, ,Setting Variables}) or by the @code{define} directive -(@pxref{Defining, ,Defining Variables Verbatim}). The value you specify -is installed verbatim; if it contains references to other variables, -these references are expanded whenever this variable is substituted (in -the course of expanding some other string). When this happens, it is -called @dfn{recursive expansion}.@refill - -For example, - -@example -foo = $(bar) -bar = $(ugh) -ugh = Huh? - -all:;echo $(foo) -@end example - -@noindent -will echo @samp{Huh?}: @samp{$(foo)} expands to @samp{$(bar)} which -expands to @samp{$(ugh)} which finally expands to @samp{Huh?}.@refill - -This flavor of variable is the only sort supported by other versions of -@code{make}. It has its advantages and its disadvantages. An advantage -(most would say) is that: - -@example -CFLAGS = $(include_dirs) -O -include_dirs = -Ifoo -Ibar -@end example - -@noindent -will do what was intended: when @samp{CFLAGS} is expanded in a command, -it will expand to @samp{-Ifoo -Ibar -O}. A major disadvantage is that you -cannot append something on the end of a variable, as in - -@example -CFLAGS = $(CFLAGS) -O -@end example - -@noindent -because it will cause an infinite loop in the variable expansion. -(Actually @code{make} detects the infinite loop and reports an error.) -@cindex loops in variable expansion -@cindex variables, loops in expansion - -Another disadvantage is that any functions -(@pxref{Functions, ,Functions for Transforming Text}) -referenced in the definition will be executed every time the variable is -expanded. This makes @code{make} run slower; worse, it causes the -@code{wildcard} and @code{shell} functions to give unpredictable results -because you cannot easily control when they are called, or even how many -times. - -To avoid all the problems and inconveniences of recursively expanded -variables, there is another flavor: simply expanded variables. - -@cindex simply expanded variables -@cindex variables, simply expanded -@cindex := -@dfn{Simply expanded variables} are defined by lines using @samp{:=} -(@pxref{Setting, ,Setting Variables}). -The value of a simply expanded variable is scanned -once and for all, expanding any references to other variables and -functions, when the variable is defined. The actual value of the simply -expanded variable is the result of expanding the text that you write. -It does not contain any references to other variables; it contains their -values @emph{as of the time this variable was defined}. Therefore, - -@example -x := foo -y := $(x) bar -x := later -@end example - -@noindent -is equivalent to - -@example -y := foo bar -x := later -@end example - -When a simply expanded variable is referenced, its value is substituted -verbatim. - -Here is a somewhat more complicated example, illustrating the use of -@samp{:=} in conjunction with the @code{shell} function. -(@xref{Shell Function, , The @code{shell} Function}.) This example -also shows use of the variable @code{MAKELEVEL}, which is changed -when it is passed down from level to level. -(@xref{Variables/Recursion, , Communicating Variables to a -Sub-@code{make}}, for information about @code{MAKELEVEL}.) - -@vindex MAKELEVEL -@vindex MAKE -@example -@group -ifeq (0,$@{MAKELEVEL@}) -cur-dir := $(shell pwd) -whoami := $(shell whoami) -host-type := $(shell arch) -MAKE := $@{MAKE@} host-type=$@{host-type@} whoami=$@{whoami@} -endif -@end group -@end example - -@noindent -An advantage of this use of @samp{:=} is that a typical -`descend into a directory' command then looks like this: - -@example -@group -$@{subdirs@}: - $@{MAKE@} cur-dir=$@{cur-dir@}/$@@ -C $@@ all -@end group -@end example - -Simply expanded variables generally make complicated makefile programming -more predictable because they work like variables in most programming -languages. They allow you to redefine a variable using its own value (or -its value processed in some way by one of the expansion functions) and to -use the expansion functions much more efficiently -(@pxref{Functions, ,Functions for Transforming Text}). - -@cindex spaces, in variable values -@cindex whitespace, in variable values -@cindex variables, spaces in values -You can also use them to introduce controlled leading whitespace into -variable values. Leading whitespace characters are discarded from your -input before substitution of variable references and function calls; -this means you can include leading spaces in a variable value by -protecting them with variable references, like this: - -@example -nullstring := -space := $(nullstring) # end of the line -@end example - -@noindent -Here the value of the variable @code{space} is precisely one space. The -comment @w{@samp{# end of the line}} is included here just for clarity. -Since trailing space characters are @emph{not} stripped from variable -values, just a space at the end of the line would have the same effect -(but be rather hard to read). If you put whitespace at the end of a -variable value, it is a good idea to put a comment like that at the end -of the line to make your intent clear. Conversely, if you do @emph{not} -want any whitespace characters at the end of your variable value, you -must remember not to put a random comment on the end of the line after -some whitespace, such as this: - -@example -dir := /foo/bar # directory to put the frobs in -@end example - -@noindent -Here the value of the variable @code{dir} is @w{@samp{/foo/bar }} -(with four trailing spaces), which was probably not the intention. -(Imagine something like @w{@samp{$(dir)/file}} with this definition!) - -@node Advanced, Values, Flavors, Using Variables -@section Advanced Features for Reference to Variables -@cindex reference to variables - -This section describes some advanced features you can use to reference -variables in more flexible ways. - -@menu -* Substitution Refs:: Referencing a variable with - substitutions on the value. -* Computed Names:: Computing the name of the variable to refer to. -@end menu - -@node Substitution Refs, Computed Names, , Advanced -@subsection Substitution References -@cindex modified variable reference -@cindex substitution variable reference -@cindex variables, modified reference -@cindex variables, substitution reference - -@cindex variables, substituting suffix in -@cindex suffix, substituting in variables -A @dfn{substitution reference} substitutes the value of a variable with -alterations that you specify. It has the form -@samp{$(@var{var}:@var{a}=@var{b})} (or -@samp{$@{@var{var}:@var{a}=@var{b}@}}) and its meaning is to take the value -of the variable @var{var}, replace every @var{a} at the end of a word with -@var{b} in that value, and substitute the resulting string. - -When we say ``at the end of a word'', we mean that @var{a} must appear -either followed by whitespace or at the end of the value in order to be -replaced; other occurrences of @var{a} in the value are unaltered. For -example:@refill - -@example -foo := a.o b.o c.o -bar := $(foo:.o=.c) -@end example - -@noindent -sets @samp{bar} to @samp{a.c b.c c.c}. @xref{Setting, ,Setting Variables}. - -A substitution reference is actually an abbreviation for use of the -@code{patsubst} expansion function (@pxref{Text Functions, ,Functions for String Substitution and Analysis}). We provide -substitution references as well as @code{patsubst} for compatibility with -other implementations of @code{make}. - -@findex patsubst -Another type of substitution reference lets you use the full power of -the @code{patsubst} function. It has the same form -@samp{$(@var{var}:@var{a}=@var{b})} described above, except that now -@var{a} must contain a single @samp{%} character. This case is -equivalent to @samp{$(patsubst @var{a},@var{b},$(@var{var}))}. -@xref{Text Functions, ,Functions for String Substitution and Analysis}, -for a description of the @code{patsubst} function.@refill - -@example -@group -@exdent For example: - -foo := a.o b.o c.o -bar := $(foo:%.o=%.c) -@end group -@end example - -@noindent -sets @samp{bar} to @samp{a.c b.c c.c}. - -@node Computed Names, , Substitution Refs, Advanced -@subsection Computed Variable Names -@cindex nested variable reference -@cindex computed variable name -@cindex variables, computed names -@cindex variables, nested references -@cindex variables, @samp{$} in name -@cindex @code{$}, in variable name -@cindex dollar sign (@code{$}), in variable name - -Computed variable names are a complicated concept needed only for -sophisticated makefile programming. For most purposes you need not -consider them, except to know that making a variable with a dollar sign -in its name might have strange results. However, if you are the type -that wants to understand everything, or you are actually interested in -what they do, read on. - -Variables may be referenced inside the name of a variable. This is -called a @dfn{computed variable name} or a @dfn{nested variable -reference}. For example, - -@example -x = y -y = z -a := $($(x)) -@end example - -@noindent -defines @code{a} as @samp{z}: the @samp{$(x)} inside @samp{$($(x))} expands -to @samp{y}, so @samp{$($(x))} expands to @samp{$(y)} which in turn expands -to @samp{z}. Here the name of the variable to reference is not stated -explicitly; it is computed by expansion of @samp{$(x)}. The reference -@samp{$(x)} here is nested within the outer variable reference. - -The previous example shows two levels of nesting, but any number of levels -is possible. For example, here are three levels: - -@example -x = y -y = z -z = u -a := $($($(x))) -@end example - -@noindent -Here the innermost @samp{$(x)} expands to @samp{y}, so @samp{$($(x))} -expands to @samp{$(y)} which in turn expands to @samp{z}; now we have -@samp{$(z)}, which becomes @samp{u}. - -References to recursively-expanded variables within a variable name are -reexpanded in the usual fashion. For example: - -@example -x = $(y) -y = z -z = Hello -a := $($(x)) -@end example - -@noindent -defines @code{a} as @samp{Hello}: @samp{$($(x))} becomes @samp{$($(y))} -which becomes @samp{$(z)} which becomes @samp{Hello}. - -Nested variable references can also contain modified references and -function invocations (@pxref{Functions, ,Functions for Transforming Text}), -just like any other reference. -For example, using the @code{subst} function -(@pxref{Text Functions, ,Functions for String Substitution and Analysis}): - -@example -@group -x = variable1 -variable2 := Hello -y = $(subst 1,2,$(x)) -z = y -a := $($($(z))) -@end group -@end example - -@noindent -eventually defines @code{a} as @samp{Hello}. It is doubtful that anyone -would ever want to write a nested reference as convoluted as this one, but -it works: @samp{$($($(z)))} expands to @samp{$($(y))} which becomes -@samp{$($(subst 1,2,$(x)))}. This gets the value @samp{variable1} from -@code{x} and changes it by substitution to @samp{variable2}, so that the -entire string becomes @samp{$(variable2)}, a simple variable reference -whose value is @samp{Hello}.@refill - -A computed variable name need not consist entirely of a single variable -reference. It can contain several variable references, as well as some -invariant text. For example, - -@example -@group -a_dirs := dira dirb -1_dirs := dir1 dir2 -@end group - -@group -a_files := filea fileb -1_files := file1 file2 -@end group - -@group -ifeq "$(use_a)" "yes" -a1 := a -else -a1 := 1 -endif -@end group - -@group -ifeq "$(use_dirs)" "yes" -df := dirs -else -df := files -endif - -dirs := $($(a1)_$(df)) -@end group -@end example - -@noindent -will give @code{dirs} the same value as @code{a_dirs}, @code{1_dirs}, -@code{a_files} or @code{1_files} depending on the settings of @code{use_a} -and @code{use_dirs}.@refill - -Computed variable names can also be used in substitution references: - -@example -@group -a_objects := a.o b.o c.o -1_objects := 1.o 2.o 3.o - -sources := $($(a1)_objects:.o=.c) -@end group -@end example - -@noindent -defines @code{sources} as either @samp{a.c b.c c.c} or @samp{1.c 2.c 3.c}, -depending on the value of @code{a1}. - -The only restriction on this sort of use of nested variable references -is that they cannot specify part of the name of a function to be called. -This is because the test for a recognized function name is done before -the expansion of nested references. For example, - -@example -@group -ifdef do_sort -func := sort -else -func := strip -endif -@end group - -@group -bar := a d b g q c -@end group - -@group -foo := $($(func) $(bar)) -@end group -@end example - -@noindent -attempts to give @samp{foo} the value of the variable @samp{sort a d b g -q c} or @samp{strip a d b g q c}, rather than giving @samp{a d b g q c} -as the argument to either the @code{sort} or the @code{strip} function. -This restriction could be removed in the future if that change is shown -to be a good idea. - -You can also use computed variable names in the left-hand side of a -variable assignment, or in a @code{define} directive, as in: - -@example -dir = foo -$(dir)_sources := $(wildcard $(dir)/*.c) -define $(dir)_print -lpr $($(dir)_sources) -endef -@end example - -@noindent -This example defines the variables @samp{dir}, @samp{foo_sources}, and -@samp{foo_print}. - -Note that @dfn{nested variable references} are quite different from -@dfn{recursively expanded variables} -(@pxref{Flavors, ,The Two Flavors of Variables}), though both are -used together in complex ways when doing makefile programming.@refill - -@node Values, Setting, Advanced, Using Variables -@section How Variables Get Their Values -@cindex variables, how they get their values -@cindex value, how a variable gets it - -Variables can get values in several different ways: - -@itemize @bullet -@item -You can specify an overriding value when you run @code{make}. -@xref{Overriding, ,Overriding Variables}. - -@item -You can specify a value in the makefile, either -with an assignment (@pxref{Setting, ,Setting Variables}) or with a -verbatim definition (@pxref{Defining, ,Defining Variables Verbatim}).@refill - -@item -Variables in the environment become @code{make} variables. -@xref{Environment, ,Variables from the Environment}. - -@item -Several @dfn{automatic} variables are given new values for each rule. -Each of these has a single conventional use. -@xref{Automatic, ,Automatic Variables}. - -@item -Several variables have constant initial values. -@xref{Implicit Variables, ,Variables Used by Implicit Rules}. -@end itemize - -@node Setting, Appending, Values, Using Variables -@section Setting Variables -@cindex setting variables -@cindex variables, setting -@cindex = -@cindex := - -To set a variable from the makefile, write a line starting with the -variable name followed by @samp{=} or @samp{:=}. Whatever follows the -@samp{=} or @samp{:=} on the line becomes the value. For example, - -@example -objects = main.o foo.o bar.o utils.o -@end example - -@noindent -defines a variable named @code{objects}. Whitespace around the variable -name and immediately after the @samp{=} is ignored. - -Variables defined with @samp{=} are @dfn{recursively expanded} variables. -Variables defined with @samp{:=} are @dfn{simply expanded} variables; these -definitions can contain variable references which will be expanded before -the definition is made. @xref{Flavors, ,The Two Flavors of Variables}. - -The variable name may contain function and variable references, which -are expanded when the line is read to find the actual variable name to use. - -There is no limit on the length of the value of a variable except the -amount of swapping space on the computer. When a variable definition is -long, it is a good idea to break it into several lines by inserting -backslash-newline at convenient places in the definition. This will not -affect the functioning of @code{make}, but it will make the makefile easier -to read. - -Most variable names are considered to have the empty string as a value if -you have never set them. Several variables have built-in initial values -that are not empty, but you can set them in the usual ways -(@pxref{Implicit Variables, ,Variables Used by Implicit Rules}). -Several special variables are set -automatically to a new value for each rule; these are called the -@dfn{automatic} variables (@pxref{Automatic, ,Automatic Variables}). - -@node Appending, Override Directive, Setting, Using Variables -@section Appending More Text to Variables -@cindex += -@cindex appending to variables -@cindex variables, appending to - -Often it is useful to add more text to the value of a variable already defined. -You do this with a line containing @samp{+=}, like this: - -@example -objects += another.o -@end example - -@noindent -This takes the value of the variable @code{objects}, and adds the text -@samp{another.o} to it (preceded by a single space). Thus: - -@example -objects = main.o foo.o bar.o utils.o -objects += another.o -@end example - -@noindent -sets @code{objects} to @samp{main.o foo.o bar.o utils.o another.o}. - -Using @samp{+=} is similar to: - -@example -objects = main.o foo.o bar.o utils.o -objects := $(objects) another.o -@end example - -@noindent -but differs in ways that become important when you use more complex values. - -When the variable in question has not been defined before, @samp{+=} -acts just like normal @samp{=}: it defines a recursively-expanded -variable. However, when there @emph{is} a previous definition, exactly -what @samp{+=} does depends on what flavor of variable you defined -originally. @xref{Flavors, ,The Two Flavors of Variables}, for an -explanation of the two flavors of variables. - -When you add to a variable's value with @samp{+=}, @code{make} acts -essentially as if you had included the extra text in the initial -definition of the variable. If you defined it first with @samp{:=}, -making it a simply-expanded variable, @samp{+=} adds to that -simply-expanded definition, and expands the new text before appending it -to the old value just as @samp{:=} does -(@pxref{Setting, ,Setting Variables}, for a full explanation of @samp{:=}). -In fact, - -@example -variable := value -variable += more -@end example - -@noindent -is exactly equivalent to: - -@noindent -@example -variable := value -variable := $(variable) more -@end example - -On the other hand, when you use @samp{+=} with a variable that you defined -first to be recursively-expanded using plain @samp{=}, @code{make} does -something a bit different. Recall that when you define a -recursively-expanded variable, @code{make} does not expand the value you set -for variable and function references immediately. Instead it stores the text -verbatim, and saves these variable and function references to be expanded -later, when you refer to the new variable (@pxref{Flavors, ,The Two Flavors -of Variables}). When you use @samp{+=} on a recursively-expanded variable, -it is this unexpanded text to which @code{make} appends the new text you -specify. - -@example -@group -variable = value -variable += more -@end group -@end example - -@noindent -is roughly equivalent to: - -@example -@group -temp = value -variable = $(temp) more -@end group -@end example - -@noindent -except that of course it never defines a variable called @code{temp}. -The importance of this comes when the variable's old value contains -variable references. Take this common example: - -@example -CFLAGS = $(includes) -O -@dots{} -CFLAGS += -pg # enable profiling -@end example - -@noindent -The first line defines the @code{CFLAGS} variable with a reference to another -variable, @code{includes}. (@code{CFLAGS} is used by the rules for C -compilation; @pxref{Catalogue of Rules, ,Catalogue of Implicit Rules}.) -Using @samp{=} for the definition makes @code{CFLAGS} a recursively-expanded -variable, meaning @w{@samp{$(includes) -O}} is @emph{not} expanded when -@code{make} processes the definition of @code{CFLAGS}. Thus, @code{includes} -need not be defined yet for its value to take effect. It only has to be -defined before any reference to @code{CFLAGS}. If we tried to append to the -value of @code{CFLAGS} without using @samp{+=}, we might do it like this: - -@example -CFLAGS := $(CFLAGS) -pg # enable profiling -@end example - -@noindent -This is pretty close, but not quite what we want. Using @samp{:=} -redefines @code{CFLAGS} as a simply-expanded variable; this means -@code{make} expands the text @w{@samp{$(CFLAGS) -pg}} before setting the -variable. If @code{includes} is not yet defined, we get @w{@samp{ -O --pg}}, and a later definition of @code{includes} will have no effect. -Conversely, by using @samp{+=} we set @code{CFLAGS} to the -@emph{unexpanded} value @w{@samp{$(includes) -O -pg}}. Thus we preserve -the reference to @code{includes}, so if that variable gets defined at -any later point, a reference like @samp{$(CFLAGS)} still uses its -value. - -@node Override Directive, Defining, Appending, Using Variables -@section The @code{override} Directive -@findex override -@cindex overriding with @code{override} -@cindex variables, overriding - -If a variable has been set with a command argument -(@pxref{Overriding, ,Overriding Variables}), -then ordinary assignments in the makefile are ignored. If you want to set -the variable in the makefile even though it was set with a command -argument, you can use an @code{override} directive, which is a line that -looks like this:@refill - -@example -override @var{variable} = @var{value} -@end example - -@noindent -or - -@example -override @var{variable} := @var{value} -@end example - -To append more text to a variable defined on the command line, use: - -@example -override @var{variable} += @var{more text} -@end example - -@noindent -@xref{Appending, ,Appending More Text to Variables}. - -The @code{override} directive was not invented for escalation in the war -between makefiles and command arguments. It was invented so you can alter -and add to values that the user specifies with command arguments. - -For example, suppose you always want the @samp{-g} switch when you run the -C compiler, but you would like to allow the user to specify the other -switches with a command argument just as usual. You could use this -@code{override} directive: - -@example -override CFLAGS += -g -@end example - -You can also use @code{override} directives with @code{define} directives. -This is done as you might expect: - -@example -override define foo -bar -endef -@end example - -@noindent -@iftex -See the next section for information about @code{define}. -@end iftex -@ifinfo -@xref{Defining, ,Defining Variables Verbatim}. -@end ifinfo - -@node Defining, Environment, Override Directive, Using Variables -@section Defining Variables Verbatim -@findex define -@findex endef -@cindex verbatim variable definition -@cindex defining variables verbatim -@cindex variables, defining verbatim - -Another way to set the value of a variable is to use the @code{define} -directive. This directive has an unusual syntax which allows newline -characters to be included in the value, which is convenient for defining -canned sequences of commands -(@pxref{Sequences, ,Defining Canned Command Sequences}). - -The @code{define} directive is followed on the same line by the name of the -variable and nothing more. The value to give the variable appears on the -following lines. The end of the value is marked by a line containing just -the word @code{endef}. Aside from this difference in syntax, @code{define} -works just like @samp{=}: it creates a recursively-expanded variable -(@pxref{Flavors, ,The Two Flavors of Variables}). -The variable name may contain function and variable references, which -are expanded when the directive is read to find the actual variable name -to use. - -@example -define two-lines -echo foo -echo $(bar) -endef -@end example - -The value in an ordinary assignment cannot contain a newline; but the -newlines that separate the lines of the value in a @code{define} become -part of the variable's value (except for the final newline which precedes -the @code{endef} and is not considered part of the value).@refill - -@need 800 -The previous example is functionally equivalent to this: - -@example -two-lines = echo foo; echo $(bar) -@end example - -@noindent -since two commands separated by semicolon behave much like two separate -shell commands. However, note that using two separate lines means -@code{make} will invoke the shell twice, running an independent subshell -for each line. @xref{Execution, ,Command Execution}. - -If you want variable definitions made with @code{define} to take -precedence over command-line variable definitions, you can use the -@code{override} directive together with @code{define}: - -@example -override define two-lines -foo -$(bar) -endef -@end example - -@noindent -@xref{Override Directive, ,The @code{override} Directive}. - -@node Environment, , Defining, Using Variables -@section Variables from the Environment - -@cindex variables, environment -@cindex environment -Variables in @code{make} can come from the environment in which -@code{make} is run. Every environment variable that @code{make} sees when -it starts up is transformed into a @code{make} variable with the same name -and value. But an explicit assignment in the makefile, or with a command -argument, overrides the environment. (If the @samp{-e} flag is specified, -then values from the environment override assignments in the makefile. -@xref{Options Summary, ,Summary of Options}. -But this is not recommended practice.) - -Thus, by setting the variable @code{CFLAGS} in your environment, you can -cause all C compilations in most makefiles to use the compiler switches you -prefer. This is safe for variables with standard or conventional meanings -because you know that no makefile will use them for other things. (But -this is not totally reliable; some makefiles set @code{CFLAGS} explicitly -and therefore are not affected by the value in the environment.) - -When @code{make} is invoked recursively, variables defined in the -outer invocation can be passed to inner invocations through the -environment (@pxref{Recursion, ,Recursive Use of @code{make}}). By -default, only variables that came from the environment or the command -line are passed to recursive invocations. You can use the -@code{export} directive to pass other variables. -@xref{Variables/Recursion, , Communicating Variables to a -Sub-@code{make}}, for full details. - -Other use of variables from the environment is not recommended. It is not -wise for makefiles to depend for their functioning on environment variables -set up outside their control, since this would cause different users to get -different results from the same makefile. This is against the whole -purpose of most makefiles. - -Such problems would be especially likely with the variable @code{SHELL}, -which is normally present in the environment to specify the user's choice -of interactive shell. It would be very undesirable for this choice to -affect @code{make}. So @code{make} ignores the environment value of -@code{SHELL}.@refill - -@node Conditionals, Functions, Using Variables, Top -@chapter Conditional Parts of Makefiles - -@cindex conditionals -A @dfn{conditional} causes part of a makefile to be obeyed or ignored -depending on the values of variables. Conditionals can compare the -value of one variable to another, or the value of a variable to -a constant string. Conditionals control what @code{make} actually -``sees'' in the makefile, so they @emph{cannot} be used to control shell -commands at the time of execution.@refill - -@menu -* Conditional Example:: Example of a conditional -* Conditional Syntax:: The syntax of conditionals. -* Testing Flags:: Conditionals that test flags. -@end menu - -@node Conditional Example, Conditional Syntax, , Conditionals -@section Example of a Conditional - -The following example of a conditional tells @code{make} to use one set -of libraries if the @code{CC} variable is @samp{gcc}, and a different -set of libraries otherwise. It works by controlling which of two -command lines will be used as the command for a rule. The result is -that @samp{CC=gcc} as an argument to @code{make} changes not only which -compiler is used but also which libraries are linked. - -@example -libs_for_gcc = -lgnu -normal_libs = - -foo: $(objects) -ifeq ($(CC),gcc) - $(CC) -o foo $(objects) $(libs_for_gcc) -else - $(CC) -o foo $(objects) $(normal_libs) -endif -@end example - -This conditional uses three directives: one @code{ifeq}, one @code{else} -and one @code{endif}. - -The @code{ifeq} directive begins the conditional, and specifies the -condition. It contains two arguments, separated by a comma and surrounded -by parentheses. Variable substitution is performed on both arguments and -then they are compared. The lines of the makefile following the -@code{ifeq} are obeyed if the two arguments match; otherwise they are -ignored. - -The @code{else} directive causes the following lines to be obeyed if the -previous conditional failed. In the example above, this means that the -second alternative linking command is used whenever the first alternative -is not used. It is optional to have an @code{else} in a conditional. - -The @code{endif} directive ends the conditional. Every conditional must -end with an @code{endif}. Unconditional makefile text follows. - -As this example illustrates, conditionals work at the textual level: -the lines of the conditional are treated as part of the makefile, or -ignored, according to the condition. This is why the larger syntactic -units of the makefile, such as rules, may cross the beginning or the -end of the conditional. - -When the variable @code{CC} has the value @samp{gcc}, the above example has -this effect: - -@example -foo: $(objects) - $(CC) -o foo $(objects) $(libs_for_gcc) -@end example - -@noindent -When the variable @code{CC} has any other value, the effect is this: - -@example -foo: $(objects) - $(CC) -o foo $(objects) $(normal_libs) -@end example - -Equivalent results can be obtained in another way by conditionalizing a -variable assignment and then using the variable unconditionally: - -@example -libs_for_gcc = -lgnu -normal_libs = - -ifeq ($(CC),gcc) - libs=$(libs_for_gcc) -else - libs=$(normal_libs) -endif - -foo: $(objects) - $(CC) -o foo $(objects) $(libs) -@end example - -@node Conditional Syntax, Testing Flags, Conditional Example, Conditionals -@section Syntax of Conditionals -@findex ifdef -@findex ifeq -@findex ifndef -@findex ifneq -@findex else -@findex endif - -The syntax of a simple conditional with no @code{else} is as follows: - -@example -@var{conditional-directive} -@var{text-if-true} -endif -@end example - -@noindent -The @var{text-if-true} may be any lines of text, to be considered as part -of the makefile if the condition is true. If the condition is false, no -text is used instead. - -The syntax of a complex conditional is as follows: - -@example -@var{conditional-directive} -@var{text-if-true} -else -@var{text-if-false} -endif -@end example - -@noindent -If the condition is true, @var{text-if-true} is used; otherwise, -@var{text-if-false} is used instead. The @var{text-if-false} can be any -number of lines of text. - -The syntax of the @var{conditional-directive} is the same whether the -conditional is simple or complex. There are four different directives that -test different conditions. Here is a table of them: - -@table @code -@item ifeq (@var{arg1}, @var{arg2}) -@itemx ifeq '@var{arg1}' '@var{arg2}' -@itemx ifeq "@var{arg1}" "@var{arg2}" -@itemx ifeq "@var{arg1}" '@var{arg2}' -@itemx ifeq '@var{arg1}' "@var{arg2}" -Expand all variable references in @var{arg1} and @var{arg2} and -compare them. If they are identical, the @var{text-if-true} is -effective; otherwise, the @var{text-if-false}, if any, is effective. - -Often you want to test if a variable has a non-empty value. When the -value results from complex expansions of variables and functions, -expansions you would consider empty may actually contain whitespace -characters and thus are not seen as empty. However, you can use the -@code{strip} function (@pxref{Text Functions}) to avoid interpreting -whitespace as a non-empty value. For example: - -@example -@group -ifeq ($(strip $(foo)),) -@var{text-if-empty} -endif -@end group -@end example - -@noindent -will evaluate @var{text-if-empty} even if the expansion of -@code{$(foo)} contains whitespace characters. - -@item ifneq (@var{arg1}, @var{arg2}) -@itemx ifneq '@var{arg1}' '@var{arg2}' -@itemx ifneq "@var{arg1}" "@var{arg2}" -@itemx ifneq "@var{arg1}" '@var{arg2}' -@itemx ifneq '@var{arg1}' "@var{arg2}" -Expand all variable references in @var{arg1} and @var{arg2} and -compare them. If they are different, the @var{text-if-true} is -effective; otherwise, the @var{text-if-false}, if any, is effective. - -@item ifdef @var{variable-name} -If the variable @var{variable-name} has a non-empty value, the -@var{text-if-true} is effective; otherwise, the @var{text-if-false}, -if any, is effective. Variables that have never been defined have an -empty value. - -Note that @code{ifdef} only tests whether a variable has a value. It -does not expand the variable to see if that value is nonempty. -Consequently, tests using @code{ifdef} return true for all definitions -except those like @code{foo =}. To test for an empty value, use -@w{@code{ifeq ($(foo),)}}. For example, - -@example -bar = -foo = $(bar) -ifdef foo -frobozz = yes -else -frobozz = no -endif -@end example - -@noindent -sets @samp{frobozz} to @samp{yes}, while: - -@example -foo = -ifdef foo -frobozz = yes -else -frobozz = no -endif -@end example - -@noindent -sets @samp{frobozz} to @samp{no}. - -@item ifndef @var{variable-name} -If the variable @var{variable-name} has an empty value, the -@var{text-if-true} is effective; otherwise, the @var{text-if-false}, -if any, is effective. -@end table - -Extra spaces are allowed and ignored at the beginning of the conditional -directive line, but a tab is not allowed. (If the line begins with a tab, -it will be considered a command for a rule.) Aside from this, extra spaces -or tabs may be inserted with no effect anywhere except within the directive -name or within an argument. A comment starting with @samp{#} may appear at -the end of the line. - -The other two directives that play a part in a conditional are @code{else} -and @code{endif}. Each of these directives is written as one word, with no -arguments. Extra spaces are allowed and ignored at the beginning of the -line, and spaces or tabs at the end. A comment starting with @samp{#} may -appear at the end of the line. - -Conditionals affect which lines of the makefile @code{make} uses. If -the condition is true, @code{make} reads the lines of the -@var{text-if-true} as part of the makefile; if the condition is false, -@code{make} ignores those lines completely. It follows that syntactic -units of the makefile, such as rules, may safely be split across the -beginning or the end of the conditional.@refill - -@code{make} evaluates conditionals when it reads a makefile. -Consequently, you cannot use automatic variables in the tests of -conditionals because they are not defined until commands are run -(@pxref{Automatic, , Automatic Variables}). - -To prevent intolerable confusion, it is not permitted to start a -conditional in one makefile and end it in another. However, you may -write an @code{include} directive within a conditional, provided you do -not attempt to terminate the conditional inside the included file. - -@node Testing Flags, , Conditional Syntax, Conditionals -@section Conditionals that Test Flags - -You can write a conditional that tests @code{make} command flags such as -@samp{-t} by using the variable @code{MAKEFLAGS} together with the -@code{findstring} function -(@pxref{Text Functions, , Functions for String Substitution and Analysis}). -This is useful when @code{touch} is not enough to make a file appear up -to date. - -The @code{findstring} function determines whether one string appears as a -substring of another. If you want to test for the @samp{-t} flag, -use @samp{t} as the first string and the value of @code{MAKEFLAGS} as -the other. - -For example, here is how to arrange to use @samp{ranlib -t} to finish -marking an archive file up to date: - -@example -archive.a: @dots{} -ifneq (,$(findstring t,$(MAKEFLAGS))) - +touch archive.a - +ranlib -t archive.a -else - ranlib archive.a -endif -@end example - -@noindent -The @samp{+} prefix marks those command lines as ``recursive'' so -that they will be executed despite use of the @samp{-t} flag. -@xref{Recursion, ,Recursive Use of @code{make}}. - -@node Functions, Running, Conditionals, Top -@chapter Functions for Transforming Text -@cindex functions - -@dfn{Functions} allow you to do text processing in the makefile to compute -the files to operate on or the commands to use. You use a function in a -@dfn{function call}, where you give the name of the function and some text -(the @dfn{arguments}) for the function to operate on. The result of the -function's processing is substituted into the makefile at the point of the -call, just as a variable might be substituted. - -@menu -* Syntax of Functions:: How to write a function call. -* Text Functions:: General-purpose text manipulation functions. -* Filename Functions:: Functions for manipulating file names. -* Foreach Function:: Repeat some text with controlled variation. -* Origin Function:: Find where a variable got its value. -* Shell Function:: Substitute the output of a shell command. -@end menu - -@node Syntax of Functions, Text Functions, , Functions -@section Function Call Syntax -@cindex @code{$}, in function call -@cindex dollar sign (@code{$}), in function call -@cindex arguments of functions -@cindex functions, syntax of - -A function call resembles a variable reference. It looks like this: - -@example -$(@var{function} @var{arguments}) -@end example - -@noindent -or like this: - -@example -$@{@var{function} @var{arguments}@} -@end example - -Here @var{function} is a function name; one of a short list of names that -are part of @code{make}. There is no provision for defining new functions. - -The @var{arguments} are the arguments of the function. They are -separated from the function name by one or more spaces or tabs, and if -there is more than one argument, then they are separated by commas. -Such whitespace and commas are not part of an argument's value. The -delimiters which you use to surround the function call, whether -parentheses or braces, can appear in an argument only in matching pairs; -the other kind of delimiters may appear singly. If the arguments -themselves contain other function calls or variable references, it is -wisest to use the same kind of delimiters for all the references; write -@w{@samp{$(subst a,b,$(x))}}, not @w{@samp{$(subst a,b,$@{x@})}}. This -is because it is clearer, and because only one type of delimiter is -matched to find the end of the reference. - -The text written for each argument is processed by substitution of -variables and function calls to produce the argument value, which -is the text on which the function acts. The substitution is done in the -order in which the arguments appear. - -Commas and unmatched parentheses or braces cannot appear in the text of an -argument as written; leading spaces cannot appear in the text of the first -argument as written. These characters can be put into the argument value -by variable substitution. First define variables @code{comma} and -@code{space} whose values are isolated comma and space characters, then -substitute these variables where such characters are wanted, like this: - -@example -@group -comma:= , -empty:= -space:= $(empty) $(empty) -foo:= a b c -bar:= $(subst $(space),$(comma),$(foo)) -# @r{bar is now `a,b,c'.} -@end group -@end example - -@noindent -Here the @code{subst} function replaces each space with a comma, through -the value of @code{foo}, and substitutes the result. - -@node Text Functions, Filename Functions, Syntax of Functions, Functions -@section Functions for String Substitution and Analysis -@cindex functions, for text - -Here are some functions that operate on strings: - -@table @code -@item $(subst @var{from},@var{to},@var{text}) -@findex subst -Performs a textual replacement on the text @var{text}: each occurrence -of @var{from} is replaced by @var{to}. The result is substituted for -the function call. For example, - -@example -$(subst ee,EE,feet on the street) -@end example - -substitutes the string @samp{fEEt on the strEEt}. - -@item $(patsubst @var{pattern},@var{replacement},@var{text}) -@findex patsubst -Finds whitespace-separated words in @var{text} that match -@var{pattern} and replaces them with @var{replacement}. Here -@var{pattern} may contain a @samp{%} which acts as a wildcard, -matching any number of any characters within a word. If -@var{replacement} also contains a @samp{%}, the @samp{%} is replaced -by the text that matched the @samp{%} in @var{pattern}.@refill - -@cindex @code{%}, quoting in @code{patsubst} -@cindex @code{%}, quoting with @code{\} (backslash) -@cindex @code{\} (backslash), to quote @code{%} -@cindex backslash (@code{\}), to quote @code{%} -@cindex quoting @code{%}, in @code{patsubst} -@samp{%} characters in @code{patsubst} function invocations can be -quoted with preceding backslashes (@samp{\}). Backslashes that would -otherwise quote @samp{%} characters can be quoted with more backslashes. -Backslashes that quote @samp{%} characters or other backslashes are -removed from the pattern before it is compared file names or has a stem -substituted into it. Backslashes that are not in danger of quoting -@samp{%} characters go unmolested. For example, the pattern -@file{the\%weird\\%pattern\\} has @samp{the%weird\} preceding the -operative @samp{%} character, and @samp{pattern\\} following it. The -final two backslashes are left alone because they cannot affect any -@samp{%} character.@refill - -Whitespace between words is folded into single space characters; -leading and trailing whitespace is discarded. - -For example, - -@example -$(patsubst %.c,%.o,x.c.c bar.c) -@end example - -@noindent -produces the value @samp{x.c.o bar.o}. - -Substitution references (@pxref{Substitution Refs, ,Substitution -References}) are a simpler way to get the effect of the @code{patsubst} -function: - -@example -$(@var{var}:@var{pattern}=@var{replacement}) -@end example - -@noindent -is equivalent to - -@example -$(patsubst @var{pattern},@var{replacement},$(@var{var})) -@end example - -The second shorthand simplifies one of the most common uses of -@code{patsubst}: replacing the suffix at the end of file names. - -@example -$(@var{var}:@var{suffix}=@var{replacement}) -@end example - -@noindent -is equivalent to - -@example -$(patsubst %@var{suffix},%@var{replacement},$(@var{var})) -@end example - -@noindent -For example, you might have a list of object files: - -@example -objects = foo.o bar.o baz.o -@end example - -@noindent -To get the list of corresponding source files, you could simply write: - -@example -$(objects:.o=.c) -@end example - -@noindent -instead of using the general form: - -@example -$(patsubst %.o,%.c,$(objects)) -@end example - -@item $(strip @var{string}) -@cindex stripping whitespace -@cindex whitespace, stripping -@cindex spaces, stripping -@findex strip -Removes leading and trailing whitespace from @var{string} and replaces -each internal sequence of one or more whitespace characters with a -single space. Thus, @samp{$(strip a b c )} results in @w{@samp{a b c}}. - -The function @code{strip} can be very useful when used in conjunction -with conditionals. When comparing something with the empty string -@samp{} using @code{ifeq} or @code{ifneq}, you usually want a string of -just whitespace to match the empty string (@pxref{Conditionals}). - -Thus, the following may fail to have the desired results: - -@example -.PHONY: all -ifneq "$(needs_made)" "" -all: $(needs_made) -else -all:;@@echo 'Nothing to make!' -endif -@end example - -@noindent -Replacing the variable reference @w{@samp{$(needs_made)}} with the -function call @w{@samp{$(strip $(needs_made))}} in the @code{ifneq} -directive would make it more robust.@refill - -@item $(findstring @var{find},@var{in}) -@findex findstring -@cindex searching for strings -@cindex finding strings -@cindex strings, searching for -Searches @var{in} for an occurrence of @var{find}. If it occurs, the -value is @var{find}; otherwise, the value is empty. You can use this -function in a conditional to test for the presence of a specific -substring in a given string. Thus, the two examples, - -@example -$(findstring a,a b c) -$(findstring a,b c) -@end example - -@noindent -produce the values @samp{a} and @samp{} (the empty string), -respectively. @xref{Testing Flags}, for a practical application of -@code{findstring}.@refill - -@need 750 -@findex filter -@cindex filtering words -@cindex words, filtering -@item $(filter @var{pattern}@dots{},@var{text}) -Removes all whitespace-separated words in @var{text} that do -@emph{not} match any of the @var{pattern} words, returning only -matching words. The patterns are written using @samp{%}, just like -the patterns used in the @code{patsubst} function above.@refill - -The @code{filter} function can be used to separate out different types -of strings (such as file names) in a variable. For example: - -@example -sources := foo.c bar.c baz.s ugh.h -foo: $(sources) - cc $(filter %.c %.s,$(sources)) -o foo -@end example - -@noindent -says that @file{foo} depends of @file{foo.c}, @file{bar.c}, -@file{baz.s} and @file{ugh.h} but only @file{foo.c}, @file{bar.c} and -@file{baz.s} should be specified in the command to the -compiler.@refill - -@item $(filter-out @var{pattern}@dots{},@var{text}) -@findex filter-out -@cindex filtering out words -@cindex words, filtering out -Removes all whitespace-separated words in @var{text} that @emph{do} -match the @var{pattern} words, returning only the words that @emph{do -not} match. This is the exact opposite of the @code{filter} -function.@refill - -For example, given: - -@example -@group -objects=main1.o foo.o main2.o bar.o -mains=main1.o main2.o -@end group -@end example - -@noindent -the following generates a list which contains all the object files not -in @samp{mains}: - -@example -$(filter-out $(mains),$(objects)) -@end example - -@need 1500 -@findex sort -@cindex sorting words -@item $(sort @var{list}) -Sorts the words of @var{list} in lexical order, removing duplicate -words. The output is a list of words separated by single spaces. -Thus, - -@example -$(sort foo bar lose) -@end example - -@noindent -returns the value @samp{bar foo lose}. - -@cindex removing duplicate words -@cindex duplicate words, removing -@cindex words, removing duplicates -Incidentally, since @code{sort} removes duplicate words, you can use -it for this purpose even if you don't care about the sort order. -@end table - -Here is a realistic example of the use of @code{subst} and -@code{patsubst}. Suppose that a makefile uses the @code{VPATH} variable -to specify a list of directories that @code{make} should search for -dependency files -(@pxref{General Search, , @code{VPATH} Search Path for All Dependencies}). -This example shows how to -tell the C compiler to search for header files in the same list of -directories.@refill - -The value of @code{VPATH} is a list of directories separated by colons, -such as @samp{src:../headers}. First, the @code{subst} function is used to -change the colons to spaces: - -@example -$(subst :, ,$(VPATH)) -@end example - -@noindent -This produces @samp{src ../headers}. Then @code{patsubst} is used to turn -each directory name into a @samp{-I} flag. These can be added to the -value of the variable @code{CFLAGS}, which is passed automatically to the C -compiler, like this: - -@example -override CFLAGS += $(patsubst %,-I%,$(subst :, ,$(VPATH))) -@end example - -@noindent -The effect is to append the text @samp{-Isrc -I../headers} to the -previously given value of @code{CFLAGS}. The @code{override} directive is -used so that the new value is assigned even if the previous value of -@code{CFLAGS} was specified with a command argument (@pxref{Override -Directive, , The @code{override} Directive}). - -@node Filename Functions, Foreach Function, Text Functions, Functions -@section Functions for File Names -@cindex functions, for file names -@cindex file name functions - -Several of the built-in expansion functions relate specifically to -taking apart file names or lists of file names. - -Each of the following functions performs a specific transformation on a -file name. The argument of the function is regarded as a series of file -names, separated by whitespace. (Leading and trailing whitespace is -ignored.) Each file name in the series is transformed in the same way and -the results are concatenated with single spaces between them. - -@table @code -@item $(dir @var{names}@dots{}) -@findex dir -@cindex directory part -@cindex file name, directory part -Extracts the directory-part of each file name in @var{names}. The -directory-part of the file name is everything up through (and -including) the last slash in it. If the file name contains no slash, -the directory part is the string @samp{./}. For example, - -@example -$(dir src/foo.c hacks) -@end example - -@noindent -produces the result @samp{src/ ./}. - -@item $(notdir @var{names}@dots{}) -@findex notdir -@cindex file name, nondirectory part -@cindex nondirectory part -Extracts all but the directory-part of each file name in @var{names}. -If the file name contains no slash, it is left unchanged. Otherwise, -everything through the last slash is removed from it. - -A file name that ends with a slash becomes an empty string. This is -unfortunate, because it means that the result does not always have the -same number of whitespace-separated file names as the argument had; -but we do not see any other valid alternative. - -For example, - -@example -$(notdir src/foo.c hacks) -@end example - -@noindent -produces the result @samp{foo.c hacks}. - -@item $(suffix @var{names}@dots{}) -@findex suffix -@cindex suffix, function to find -@cindex file name suffix -Extracts the suffix of each file name in @var{names}. If the file name -contains a period, the suffix is everything starting with the last -period. Otherwise, the suffix is the empty string. This frequently -means that the result will be empty when @var{names} is not, and if -@var{names} contains multiple file names, the result may contain fewer -file names. - -For example, - -@example -$(suffix src/foo.c hacks) -@end example - -@noindent -produces the result @samp{.c}. - -@item $(basename @var{names}@dots{}) -@findex basename -@cindex basename -@cindex file name, basename of -Extracts all but the suffix of each file name in @var{names}. If the -file name contains a period, the basename is everything starting up to -(and not including) the last period. Otherwise, the basename is the -entire file name. For example, - -@example -$(basename src/foo.c hacks) -@end example - -@noindent -produces the result @samp{src/foo hacks}. - -@c plural convention with dots (be consistent) -@item $(addsuffix @var{suffix},@var{names}@dots{}) -@findex addsuffix -@cindex suffix, adding -@cindex file name suffix, adding -The argument @var{names} is regarded as a series of names, separated -by whitespace; @var{suffix} is used as a unit. The value of -@var{suffix} is appended to the end of each individual name and the -resulting larger names are concatenated with single spaces between -them. For example, - -@example -$(addsuffix .c,foo bar) -@end example - -@noindent -produces the result @samp{foo.c bar.c}. - -@item $(addprefix @var{prefix},@var{names}@dots{}) -@findex addprefix -@cindex prefix, adding -@cindex file name prefix, adding -The argument @var{names} is regarded as a series of names, separated -by whitespace; @var{prefix} is used as a unit. The value of -@var{prefix} is prepended to the front of each individual name and the -resulting larger names are concatenated with single spaces between -them. For example, - -@example -$(addprefix src/,foo bar) -@end example - -@noindent -produces the result @samp{src/foo src/bar}. - -@item $(join @var{list1},@var{list2}) -@findex join -@cindex joining lists of words -@cindex words, joining lists -Concatenates the two arguments word by word: the two first words (one -from each argument) concatenated form the first word of the result, the -two second words form the second word of the result, and so on. So the -@var{n}th word of the result comes from the @var{n}th word of each -argument. If one argument has more words that the other, the extra -words are copied unchanged into the result. - -For example, @samp{$(join a b,.c .o)} produces @samp{a.c b.o}. - -Whitespace between the words in the lists is not preserved; it is -replaced with a single space. - -This function can merge the results of the @code{dir} and -@code{notdir} functions, to produce the original list of files which -was given to those two functions.@refill - -@item $(word @var{n},@var{text}) -@findex word -@cindex words, selecting -@cindex selecting words -Returns the @var{n}th word of @var{text}. The legitimate values of -@var{n} start from 1. If @var{n} is bigger than the number of words -in @var{text}, the value is empty. For example, - -@example -$(word 2, foo bar baz) -@end example - -@noindent -returns @samp{bar}. - -@c Following item phrased to prevent overfull hbox. --RJC 17 Jul 92 -@item $(words @var{text}) -@findex words -@cindex words, finding number -Returns the number of words in @var{text}. -Thus, the last word of @var{text} is -@w{@code{$(word $(words @var{text}),@var{text})}}.@refill - -@item $(firstword @var{names}@dots{}) -@findex firstword -@cindex words, extracting first -The argument @var{names} is regarded as a series of names, separated -by whitespace. The value is the first name in the series. The rest -of the names are ignored. - -For example, - -@example -$(firstword foo bar) -@end example - -@noindent -produces the result @samp{foo}. Although @code{$(firstword -@var{text})} is the same as @code{$(word 1,@var{text})}, the -@code{firstword} function is retained for its simplicity.@refill - -@item $(wildcard @var{pattern}) -@findex wildcard -@cindex wildcard, function -The argument @var{pattern} is a file name pattern, typically containing -wildcard characters (as in shell file name patterns). The result of -@code{wildcard} is a space-separated list of the names of existing files -that match the pattern. -@xref{Wildcards, ,Using Wildcard Characters in File Names}. -@end table - -@node Foreach Function, Origin Function, Filename Functions, Functions -@section The @code{foreach} Function -@findex foreach -@cindex words, iterating over - -The @code{foreach} function is very different from other functions. It -causes one piece of text to be used repeatedly, each time with a different -substitution performed on it. It resembles the @code{for} command in the -shell @code{sh} and the @code{foreach} command in the C-shell @code{csh}. - -The syntax of the @code{foreach} function is: - -@example -$(foreach @var{var},@var{list},@var{text}) -@end example - -@noindent -The first two arguments, @var{var} and @var{list}, are expanded before -anything else is done; note that the last argument, @var{text}, is -@strong{not} expanded at the same time. Then for each word of the expanded -value of @var{list}, the variable named by the expanded value of @var{var} -is set to that word, and @var{text} is expanded. Presumably @var{text} -contains references to that variable, so its expansion will be different -each time. - -The result is that @var{text} is expanded as many times as there are -whitespace-separated words in @var{list}. The multiple expansions of -@var{text} are concatenated, with spaces between them, to make the result -of @code{foreach}. - -This simple example sets the variable @samp{files} to the list of all files -in the directories in the list @samp{dirs}: - -@example -dirs := a b c d -files := $(foreach dir,$(dirs),$(wildcard $(dir)/*)) -@end example - -Here @var{text} is @samp{$(wildcard $(dir)/*)}. The first repetition -finds the value @samp{a} for @code{dir}, so it produces the same result -as @samp{$(wildcard a/*)}; the second repetition produces the result -of @samp{$(wildcard b/*)}; and the third, that of @samp{$(wildcard c/*)}. - -This example has the same result (except for setting @samp{dirs}) as -the following example: - -@example -files := $(wildcard a/* b/* c/* d/*) -@end example - -When @var{text} is complicated, you can improve readability by giving it -a name, with an additional variable: - -@example -find_files = $(wildcard $(dir)/*) -dirs := a b c d -files := $(foreach dir,$(dirs),$(find_files)) -@end example - -@noindent -Here we use the variable @code{find_files} this way. We use plain @samp{=} -to define a recursively-expanding variable, so that its value contains an -actual function call to be reexpanded under the control of @code{foreach}; -a simply-expanded variable would not do, since @code{wildcard} would be -called only once at the time of defining @code{find_files}. - -The @code{foreach} function has no permanent effect on the variable -@var{var}; its value and flavor after the @code{foreach} function call are -the same as they were beforehand. The other values which are taken from -@var{list} are in effect only temporarily, during the execution of -@code{foreach}. The variable @var{var} is a simply-expanded variable -during the execution of @code{foreach}. If @var{var} was undefined -before the @code{foreach} function call, it is undefined after the call. -@xref{Flavors, ,The Two Flavors of Variables}.@refill - -You must take care when using complex variable expressions that result in -variable names because many strange things are valid variable names, but -are probably not what you intended. For example, - -@smallexample -files := $(foreach Esta escrito en espanol!,b c ch,$(find_files)) -@end smallexample - -@noindent -might be useful if the value of @code{find_files} references the variable -whose name is @samp{Esta escrito en espanol!} (es un nombre bastante largo, -no?), but it is more likely to be a mistake. - -@node Origin Function, Shell Function, Foreach Function, Functions -@section The @code{origin} Function -@findex origin -@cindex variables, origin of -@cindex origin of variable - -The @code{origin} function is unlike most other functions in that it does -not operate on the values of variables; it tells you something @emph{about} -a variable. Specifically, it tells you where it came from. - -The syntax of the @code{origin} function is: - -@example -$(origin @var{variable}) -@end example - -Note that @var{variable} is the @emph{name} of a variable to inquire about; -not a @emph{reference} to that variable. Therefore you would not normally -use a @samp{$} or parentheses when writing it. (You can, however, use a -variable reference in the name if you want the name not to be a constant.) - -The result of this function is a string telling you how the variable -@var{variable} was defined: - -@table @samp -@item undefined - -if @var{variable} was never defined. - -@item default - -if @var{variable} has a default definition, as is usual with @code{CC} -and so on. @xref{Implicit Variables, ,Variables Used by Implicit Rules}. -Note that if you have redefined a default variable, the @code{origin} -function will return the origin of the later definition. - -@item environment - -if @var{variable} was defined as an environment variable and the -@samp{-e} option is @emph{not} turned on (@pxref{Options Summary, ,Summary of Options}). - -@item environment override - -if @var{variable} was defined as an environment variable and the -@w{@samp{-e}} option @emph{is} turned on (@pxref{Options Summary, -,Summary of Options}).@refill - -@item file - -if @var{variable} was defined in a makefile. - -@item command line - -if @var{variable} was defined on the command line. - -@item override - -if @var{variable} was defined with an @code{override} directive in a -makefile (@pxref{Override Directive, ,The @code{override} Directive}). - -@item automatic - -if @var{variable} is an automatic variable defined for the -execution of the commands for each rule -(@pxref{Automatic, , Automatic Variables}). -@end table - -This information is primarily useful (other than for your curiosity) to -determine if you want to believe the value of a variable. For example, -suppose you have a makefile @file{foo} that includes another makefile -@file{bar}. You want a variable @code{bletch} to be defined in @file{bar} -if you run the command @w{@samp{make -f bar}}, even if the environment contains -a definition of @code{bletch}. However, if @file{foo} defined -@code{bletch} before including @file{bar}, you do not want to override that -definition. This could be done by using an @code{override} directive in -@file{foo}, giving that definition precedence over the later definition in -@file{bar}; unfortunately, the @code{override} directive would also -override any command line definitions. So, @file{bar} could -include:@refill - -@example -@group -ifdef bletch -ifeq "$(origin bletch)" "environment" -bletch = barf, gag, etc. -endif -endif -@end group -@end example - -@noindent -If @code{bletch} has been defined from the environment, this will redefine -it. - -If you want to override a previous definition of @code{bletch} if it came -from the environment, even under @samp{-e}, you could instead write: - -@example -@group -ifneq "$(findstring environment,$(origin bletch))" "" -bletch = barf, gag, etc. -endif -@end group -@end example - -Here the redefinition takes place if @samp{$(origin bletch)} returns either -@samp{environment} or @samp{environment override}. -@xref{Text Functions, , Functions for String Substitution and Analysis}. - -@node Shell Function, , Origin Function, Functions -@section The @code{shell} Function -@findex shell -@cindex commands, expansion -@cindex backquotes -@cindex shell command, function for - -The @code{shell} function is unlike any other function except the -@code{wildcard} function -(@pxref{Wildcard Function, ,The Function @code{wildcard}}) in that it -communicates with the world outside of @code{make}. - -The @code{shell} function performs the same function that backquotes -(@samp{`}) perform in most shells: it does @dfn{command expansion}. This -means that it takes an argument that is a shell command and returns the -output of the command. The only processing @code{make} does on the result, -before substituting it into the surrounding text, is to convert newlines to -spaces.@refill - -The commands run by calls to the @code{shell} function are run when the -function calls are expanded. In most cases, this is when the makefile is -read in. The exception is that function calls in the commands of the rules -are expanded when the commands are run, and this applies to @code{shell} -function calls like all others. - -Here are some examples of the use of the @code{shell} function: - -@example -contents := $(shell cat foo) -@end example - -@noindent -sets @code{contents} to the contents of the file @file{foo}, with a space -(rather than a newline) separating each line. - -@example -files := $(shell echo *.c) -@end example - -@noindent -sets @code{files} to the expansion of @samp{*.c}. Unless @code{make} is -using a very strange shell, this has the same result as -@w{@samp{$(wildcard *.c)}}.@refill - -@node Running, Implicit Rules, Functions, Top -@chapter How to Run @code{make} - -A makefile that says how to recompile a program can be used in more -than one way. The simplest use is to recompile every file that is out -of date. Usually, makefiles are written so that if you run -@code{make} with no arguments, it does just that. - -But you might want to update only some of the files; you might want to use -a different compiler or different compiler options; you might want just to -find out which files are out of date without changing them. - -By giving arguments when you run @code{make}, you can do any of these -things and many others. - -The exit status of @code{make} is always one of three values: -@table @code -@item 0 -The exit status is zero if @code{make} is successful. -@item 2 -The exit status is two if @code{make} encounters any errors. -It will print messages describing the particular errors. -@item 1 -The exit status is one if you use the @samp{-q} flag and @code{make} -determines that some target is not already up to date. -@xref{Instead of Execution, ,Instead of Executing the Commands}. -@end table - -@menu -* Makefile Arguments:: How to specify which makefile to use. -* Goals:: How to use goal arguments to specify which - parts of the makefile to use. -* Instead of Execution:: How to use mode flags to specify what - kind of thing to do with the commands - in the makefile other than simply - execute them. -* Avoiding Compilation:: How to avoid recompiling certain files. -* Overriding:: How to override a variable to specify - an alternate compiler and other things. -* Testing:: How to proceed past some errors, to - test compilation. -* Options Summary:: Summary of Options -@end menu - -@node Makefile Arguments, Goals, , Running -@section Arguments to Specify the Makefile -@cindex @code{--file} -@cindex @code{--makefile} -@cindex @code{-f} - -The way to specify the name of the makefile is with the @samp{-f} or -@samp{--file} option (@samp{--makefile} also works). For example, -@samp{-f altmake} says to use the file @file{altmake} as the makefile. - -If you use the @samp{-f} flag several times and follow each @samp{-f} -with an argument, all the specified files are used jointly as -makefiles. - -If you do not use the @samp{-f} or @samp{--file} flag, the default is -to try @file{GNUmakefile}, @file{makefile}, and @file{Makefile}, in -that order, and use the first of these three which exists or can be made -(@pxref{Makefiles, ,Writing Makefiles}).@refill - -@node Goals, Instead of Execution, Makefile Arguments, Running -@section Arguments to Specify the Goals -@cindex goal, how to specify - -The @dfn{goals} are the targets that @code{make} should strive ultimately -to update. Other targets are updated as well if they appear as -dependencies of goals, or dependencies of dependencies of goals, etc. - -By default, the goal is the first target in the makefile (not counting -targets that start with a period). Therefore, makefiles are usually -written so that the first target is for compiling the entire program or -programs they describe. If the first rule in the makefile has several -targets, only the first target in the rule becomes the default goal, not -the whole list. - -You can specify a different goal or goals with arguments to @code{make}. -Use the name of the goal as an argument. If you specify several goals, -@code{make} processes each of them in turn, in the order you name them. - -Any target in the makefile may be specified as a goal (unless it -starts with @samp{-} or contains an @samp{=}, in which case it will be -parsed as a switch or variable definition, respectively). Even -targets not in the makefile may be specified, if @code{make} can find -implicit rules that say how to make them. - -One use of specifying a goal is if you want to compile only a part of -the program, or only one of several programs. Specify as a goal each -file that you wish to remake. For example, consider a directory containing -several programs, with a makefile that starts like this: - -@example -.PHONY: all -all: size nm ld ar as -@end example - -If you are working on the program @code{size}, you might want to say -@w{@samp{make size}} so that only the files of that program are recompiled. - -Another use of specifying a goal is to make files that are not normally -made. For example, there may be a file of debugging output, or a -version of the program that is compiled specially for testing, which has -a rule in the makefile but is not a dependency of the default goal. - -Another use of specifying a goal is to run the commands associated with -a phony target (@pxref{Phony Targets}) or empty target (@pxref{Empty -Targets, ,Empty Target Files to Record Events}). Many makefiles contain -a phony target named @file{clean} which deletes everything except source -files. Naturally, this is done only if you request it explicitly with -@w{@samp{make clean}}. Following is a list of typical phony and empty -target names. @xref{Standard Targets}, for a detailed list of all the -standard target names which GNU software packages use. - -@table @file -@item all -@cindex @code{all} @r{(standard target)} -Make all the top-level targets the makefile knows about. - -@item clean -@cindex @code{clean} @r{(standard target)} -Delete all files that are normally created by running @code{make}. - -@item mostlyclean -@cindex @code{mostlyclean} @r{(standard target)} -Like @samp{clean}, but may refrain from deleting a few files that people -normally don't want to recompile. For example, the @samp{mostlyclean} -target for GCC does not delete @file{libgcc.a}, because recompiling it -is rarely necessary and takes a lot of time. - -@item distclean -@cindex @code{distclean} @r{(standard target)} -@itemx realclean -@cindex @code{realclean} @r{(standard target)} -@itemx clobber -@cindex @code{clobber} @r{(standard target)} -Any of these targets might be defined to delete @emph{more} files than -@samp{clean} does. For example, this would delete configuration files -or links that you would normally create as preparation for compilation, -even if the makefile itself cannot create these files. - -@item install -@cindex @code{install} @r{(standard target)} -Copy the executable file into a directory that users typically search -for commands; copy any auxiliary files that the executable uses into -the directories where it will look for them. - -@item print -@cindex @code{print} @r{(standard target)} -Print listings of the source files that have changed. - -@item tar -@cindex @code{tar} @r{(standard target)} -Create a tar file of the source files. - -@item shar -@cindex @code{shar} @r{(standard target)} -Create a shell archive (shar file) of the source files. - -@item dist -@cindex @code{dist} @r{(standard target)} -Create a distribution file of the source files. This might -be a tar file, or a shar file, or a compressed version of one of the -above, or even more than one of the above. - -@item TAGS -@cindex @code{TAGS} @r{(standard target)} -Update a tags table for this program. - -@item check -@cindex @code{check} @r{(standard target)} -@itemx test -@cindex @code{test} @r{(standard target)} -Perform self tests on the program this makefile builds. -@end table - -@node Instead of Execution, Avoiding Compilation, Goals, Running -@section Instead of Executing the Commands -@cindex execution, instead of -@cindex commands, instead of executing - -The makefile tells @code{make} how to tell whether a target is up to date, -and how to update each target. But updating the targets is not always -what you want. Certain options specify other activities for @code{make}. - -@comment Extra blank lines make it print better. -@table @samp -@item -n -@itemx --just-print -@itemx --dry-run -@itemx --recon -@cindex @code{--just-print} -@cindex @code{--dry-run} -@cindex @code{--recon} -@cindex @code{-n} - -``No-op''. The activity is to print what commands would be used to make -the targets up to date, but not actually execute them. - -@item -t -@itemx --touch -@cindex @code{--touch} -@cindex touching files -@cindex target, touching -@cindex @code{-t} - -``Touch''. The activity is to mark the targets as up to date without -actually changing them. In other words, @code{make} pretends to compile -the targets but does not really change their contents. - -@item -q -@itemx --question -@cindex @code{--question} -@cindex @code{-q} -@cindex question mode - -``Question''. The activity is to find out silently whether the targets -are up to date already; but execute no commands in either case. In other -words, neither compilation nor output will occur. - -@item -W @var{file} -@itemx --what-if=@var{file} -@itemx --assume-new=@var{file} -@itemx --new-file=@var{file} -@cindex @code{--what-if} -@cindex @code{-W} -@cindex @code{--assume-new} -@cindex @code{--new-file} -@cindex what if -@cindex files, assuming new - -``What if''. Each @samp{-W} flag is followed by a file name. The given -files' modification times are recorded by @code{make} as being the present -time, although the actual modification times remain the same. -You can use the @samp{-W} flag in conjunction with the @samp{-n} flag -to see what would happen if you were to modify specific files.@refill -@end table - -With the @samp{-n} flag, @code{make} prints the commands that it would -normally execute but does not execute them. - -With the @samp{-t} flag, @code{make} ignores the commands in the rules -and uses (in effect) the command @code{touch} for each target that needs to -be remade. The @code{touch} command is also printed, unless @samp{-s} or -@code{.SILENT} is used. For speed, @code{make} does not actually invoke -the program @code{touch}. It does the work directly. - -With the @samp{-q} flag, @code{make} prints nothing and executes no -commands, but the exit status code it returns is zero if and only if the -targets to be considered are already up to date. If the exit status is -one, then some updating needs to be done. If @code{make} encounters an -error, the exit status is two, so you can distinguish an error from a -target that is not up to date. - -It is an error to use more than one of these three flags in the same -invocation of @code{make}. - -The @samp{-n}, @samp{-t}, and @samp{-q} options do not affect command -lines that begin with @samp{+} characters or contain the strings -@samp{$(MAKE)} or @samp{$@{MAKE@}}. Note that only the line containing -the @samp{+} character or the strings @samp{$(MAKE)} or @samp{$@{MAKE@}} -is run regardless of these options. Other lines in the same rule are -not run unless they too begin with @samp{+} or contain @samp{$(MAKE)} or -@samp{$@{MAKE@}} (@xref{MAKE Variable, ,How the @code{MAKE} Variable Works}.) - -The @samp{-W} flag provides two features: - -@itemize @bullet -@item -If you also use the @samp{-n} or @samp{-q} flag, you can see what -@code{make} would do if you were to modify some files. - -@item -Without the @samp{-n} or @samp{-q} flag, when @code{make} is actually -executing commands, the @samp{-W} flag can direct @code{make} to act -as if some files had been modified, without actually modifying the -files.@refill -@end itemize - -Note that the options @samp{-p} and @samp{-v} allow you to obtain other -information about @code{make} or about the makefiles in use -(@pxref{Options Summary, ,Summary of Options}).@refill - -@node Avoiding Compilation, Overriding, Instead of Execution, Running -@section Avoiding Recompilation of Some Files -@cindex @code{-o} -@cindex @code{--old-file} -@cindex @code{--assume-old} -@cindex files, assuming old -@cindex files, avoiding recompilation of -@cindex recompilation, avoiding - -Sometimes you may have changed a source file but you do not want to -recompile all the files that depend on it. For example, suppose you add a -macro or a declaration to a header file that many other files depend on. -Being conservative, @code{make} assumes that any change in the header file -requires recompilation of all dependent files, but you know that they do not -need to be recompiled and you would rather not waste the time waiting for -them to compile. - -If you anticipate the problem before changing the header file, you can -use the @samp{-t} flag. This flag tells @code{make} not to run the -commands in the rules, but rather to mark the target up to date by -changing its last-modification date. You would follow this procedure: - -@enumerate -@item -Use the command @samp{make} to recompile the source files that really -need recompilation. - -@item -Make the changes in the header files. - -@item -Use the command @samp{make -t} to mark all the object files as -up to date. The next time you run @code{make}, the changes in the -header files will not cause any recompilation. -@end enumerate - -If you have already changed the header file at a time when some files -do need recompilation, it is too late to do this. Instead, you can -use the @w{@samp{-o @var{file}}} flag, which marks a specified file as -``old'' (@pxref{Options Summary, ,Summary of Options}). This means -that the file itself will not be remade, and nothing else will be -remade on its account. Follow this procedure: - -@enumerate -@item -Recompile the source files that need compilation for reasons independent -of the particular header file, with @samp{make -o @var{headerfile}}. -If several header files are involved, use a separate @samp{-o} option -for each header file. - -@item -Touch all the object files with @samp{make -t}. -@end enumerate - -@node Overriding, Testing, Avoiding Compilation, Running -@section Overriding Variables -@cindex overriding variables with arguments -@cindex variables, overriding with arguments -@cindex command line variables -@cindex variables, command line - -An argument that contains @samp{=} specifies the value of a variable: -@samp{@var{v}=@var{x}} sets the value of the variable @var{v} to @var{x}. -If you specify a value in this way, all ordinary assignments of the same -variable in the makefile are ignored; we say they have been -@dfn{overridden} by the command line argument. - -The most common way to use this facility is to pass extra flags to -compilers. For example, in a properly written makefile, the variable -@code{CFLAGS} is included in each command that runs the C compiler, so a -file @file{foo.c} would be compiled something like this: - -@example -cc -c $(CFLAGS) foo.c -@end example - -Thus, whatever value you set for @code{CFLAGS} affects each compilation -that occurs. The makefile probably specifies the usual value for -@code{CFLAGS}, like this: - -@example -CFLAGS=-g -@end example - -Each time you run @code{make}, you can override this value if you -wish. For example, if you say @samp{make CFLAGS='-g -O'}, each C -compilation will be done with @samp{cc -c -g -O}. (This illustrates -how you can use quoting in the shell to enclose spaces and other -special characters in the value of a variable when you override it.) - -The variable @code{CFLAGS} is only one of many standard variables that -exist just so that you can change them this way. @xref{Implicit -Variables, , Variables Used by Implicit Rules}, for a complete list. - -You can also program the makefile to look at additional variables of your -own, giving the user the ability to control other aspects of how the -makefile works by changing the variables. - -When you override a variable with a command argument, you can define either -a recursively-expanded variable or a simply-expanded variable. The -examples shown above make a recursively-expanded variable; to make a -simply-expanded variable, write @samp{:=} instead of @samp{=}. But, unless -you want to include a variable reference or function call in the -@emph{value} that you specify, it makes no difference which kind of -variable you create. - -There is one way that the makefile can change a variable that you have -overridden. This is to use the @code{override} directive, which is a line -that looks like this: @samp{override @var{variable} = @var{value}} -(@pxref{Override Directive, ,The @code{override} Directive}). - -@node Testing, Options Summary, Overriding, Running -@section Testing the Compilation of a Program -@cindex testing compilation -@cindex compilation, testing - -Normally, when an error happens in executing a shell command, @code{make} -gives up immediately, returning a nonzero status. No further commands are -executed for any target. The error implies that the goal cannot be -correctly remade, and @code{make} reports this as soon as it knows. - -When you are compiling a program that you have just changed, this is not -what you want. Instead, you would rather that @code{make} try compiling -every file that can be tried, to show you as many compilation errors -as possible. - -@cindex @code{-k} -@cindex @code{--keep-going} -On these occasions, you should use the @samp{-k} or -@samp{--keep-going} flag. This tells @code{make} to continue to -consider the other dependencies of the pending targets, remaking them -if necessary, before it gives up and returns nonzero status. For -example, after an error in compiling one object file, @samp{make -k} -will continue compiling other object files even though it already -knows that linking them will be impossible. In addition to continuing -after failed shell commands, @samp{make -k} will continue as much as -possible after discovering that it does not know how to make a target -or dependency file. This will always cause an error message, but -without @samp{-k}, it is a fatal error (@pxref{Options Summary, -,Summary of Options}).@refill - -The usual behavior of @code{make} assumes that your purpose is to get the -goals up to date; once @code{make} learns that this is impossible, it might -as well report the failure immediately. The @samp{-k} flag says that the -real purpose is to test as much as possible of the changes made in the -program, perhaps to find several independent problems so that you can -correct them all before the next attempt to compile. This is why Emacs' -@kbd{M-x compile} command passes the @samp{-k} flag by default. - -@node Options Summary, , Testing, Running -@section Summary of Options -@cindex options -@cindex flags -@cindex switches - -Here is a table of all the options @code{make} understands: - -@table @samp -@item -b -@cindex @code{-b} -@itemx -m -@cindex @code{-m} -These options are ignored for compatibility with other versions of @code{make}. - -@item -C @var{dir} -@cindex @code{-C} -@itemx --directory=@var{dir} -@cindex @code{--directory} -Change to directory @var{dir} before reading the makefiles. If multiple -@samp{-C} options are specified, each is interpreted relative to the -previous one: @samp{-C / -C etc} is equivalent to @samp{-C /etc}. -This is typically used with recursive invocations of @code{make} -(@pxref{Recursion, ,Recursive Use of @code{make}}). - -@item -d -@cindex @code{-d} -@itemx --debug -@cindex @code{--debug} -@c Extra blank line here makes the table look better. - -Print debugging information in addition to normal processing. The -debugging information says which files are being considered for -remaking, which file-times are being compared and with what results, -which files actually need to be remade, which implicit rules are -considered and which are applied---everything interesting about how -@code{make} decides what to do. - -@item -e -@cindex @code{-e} -@itemx --environment-overrides -@cindex @code{--environment-overrides} -Give variables taken from the environment precedence -over variables from makefiles. -@xref{Environment, ,Variables from the Environment}. - -@item -f @var{file} -@cindex @code{-f} -@itemx --file=@var{file} -@cindex @code{--file} -@itemx --makefile=@var{file} -@cindex @code{--makefile} -Read the file named @var{file} as a makefile. -@xref{Makefiles, ,Writing Makefiles}. - -@item -h -@cindex @code{-h} -@itemx --help -@cindex @code{--help} -@c Extra blank line here makes the table look better. - -Remind you of the options that @code{make} understands and then exit. - -@item -i -@cindex @code{-i} -@itemx --ignore-errors -@cindex @code{--ignore-errors} -Ignore all errors in commands executed to remake files. -@xref{Errors, ,Errors in Commands}. - -@item -I @var{dir} -@cindex @code{-I} -@itemx --include-dir=@var{dir} -@cindex @code{--include-dir} -Specifies a directory @var{dir} to search for included makefiles. -@xref{Include, ,Including Other Makefiles}. If several @samp{-I} -options are used to specify several directories, the directories are -searched in the order specified. - -@item -j [@var{jobs}] -@cindex @code{-j} -@itemx --jobs=[@var{jobs}] -@cindex @code{--jobs} -Specifies the number of jobs (commands) to run simultaneously. With no -argument, @code{make} runs as many jobs simultaneously as possible. If -there is more than one @samp{-j} option, the last one is effective. -@xref{Parallel, ,Parallel Execution}, -for more information on how commands are run. - -@item -k -@cindex @code{-k} -@itemx --keep-going -@cindex @code{--keep-going} -Continue as much as possible after an error. While the target that -failed, and those that depend on it, cannot be remade, the other -dependencies of these targets can be processed all the same. -@xref{Testing, ,Testing the Compilation of a Program}. - -@item -l [@var{load}] -@cindex @code{-l} -@itemx --load-average[=@var{load}] -@cindex @code{--load-average} -@itemx --max-load[=@var{load}] -@cindex @code{--max-load} -Specifies that no new jobs (commands) should be started if there are -other jobs running and the load average is at least @var{load} (a -floating-point number). With no argument, removes a previous load -limit. @xref{Parallel, ,Parallel Execution}. - -@item -n -@cindex @code{-n} -@itemx --just-print -@cindex @code{--just-print} -@itemx --dry-run -@cindex @code{--dry-run} -@itemx --recon -@cindex @code{--recon} -@c Extra blank line here makes the table look better. - -Print the commands that would be executed, but do not execute them. -@xref{Instead of Execution, ,Instead of Executing the Commands}. - -@item -o @var{file} -@cindex @code{-o} -@itemx --old-file=@var{file} -@cindex @code{--old-file} -@itemx --assume-old=@var{file} -@cindex @code{--assume-old} -Do not remake the file @var{file} even if it is older than its -dependencies, and do not remake anything on account of changes in -@var{file}. Essentially the file is treated as very old and its rules -are ignored. @xref{Avoiding Compilation, ,Avoiding Recompilation of -Some Files}.@refill - -@item -p -@cindex @code{-p} -@itemx --print-data-base -@cindex @code{--print-data-base} -Print the data base (rules and variable values) that results from -reading the makefiles; then execute as usual or as otherwise -specified. This also prints the version information given by -the @samp{-v} switch (see below). To print the data base without -trying to remake any files, use @w{@samp{make -p -f /dev/null}}. - -@item -q -@cindex @code{-q} -@itemx --question -@cindex @code{--question} -``Question mode''. Do not run any commands, or print anything; just -return an exit status that is zero if the specified targets are already -up to date, one if any remaking is required, or two if an error is -encountered. @xref{Instead of Execution, ,Instead of Executing the -Commands}.@refill - -@item -r -@cindex @code{-r} -@itemx --no-builtin-rules -@cindex @code{--no-builtin-rules} -Eliminate use of the built-in implicit rules (@pxref{Implicit Rules, -,Using Implicit Rules}). You can still define your own by writing -pattern rules (@pxref{Pattern Rules, ,Defining and Redefining Pattern -Rules}). The @samp{-r} option also clears out the default list of -suffixes for suffix rules (@pxref{Suffix Rules, ,Old-Fashioned Suffix -Rules}). But you can still define your own suffixes with a rule for -@code{.SUFFIXES}, and then define your own suffix rules. - -@item -s -@cindex @code{-s} -@itemx --silent -@cindex @code{--silent} -@itemx --quiet -@cindex @code{--quiet} -@c Extra blank line here makes the table look better. - -Silent operation; do not print the commands as they are executed. -@xref{Echoing, ,Command Echoing}. - -@item -S -@cindex @code{-S} -@itemx --no-keep-going -@cindex @code{--no-keep-going} -@itemx --stop -@cindex @code{--stop} -@c Extra blank line here makes the table look better. - -Cancel the effect of the @samp{-k} option. This is never necessary -except in a recursive @code{make} where @samp{-k} might be inherited -from the top-level @code{make} via @code{MAKEFLAGS} -(@pxref{Recursion, ,Recursive Use of @code{make}}) -or if you set @samp{-k} in @code{MAKEFLAGS} in your environment.@refill - -@item -t -@cindex @code{-t} -@itemx --touch -@cindex @code{--touch} -@c Extra blank line here makes the table look better. - -Touch files (mark them up to date without really changing them) -instead of running their commands. This is used to pretend that the -commands were done, in order to fool future invocations of -@code{make}. @xref{Instead of Execution, ,Instead of Executing the Commands}. - -@item -v -@cindex @code{-v} -@itemx --version -@cindex @code{--version} -Print the version of the @code{make} program plus a copyright, a list -of authors, and a notice that there is no warranty; then exit. - -@item -w -@cindex @code{-w} -@itemx --print-directory -@cindex @code{--print-directory} -Print a message containing the working directory both before and after -executing the makefile. This may be useful for tracking down errors -from complicated nests of recursive @code{make} commands. -@xref{Recursion, ,Recursive Use of @code{make}}. (In practice, you -rarely need to specify this option since @samp{make} does it for you; -see @ref{-w Option, ,The @samp{--print-directory} Option}.) - -@itemx --no-print-directory -@cindex @code{--no-print-directory} -Disable printing of the working directory under @code{-w}. -This option is useful when @code{-w} is turned on automatically, -but you do not want to see the extra messages. -@xref{-w Option, ,The @samp{--print-directory} Option}. - -@item -W @var{file} -@cindex @code{-W} -@itemx --what-if=@var{file} -@cindex @code{--what-if} -@itemx --new-file=@var{file} -@cindex @code{--new-file} -@itemx --assume-new=@var{file} -@cindex @code{--assume-new} -Pretend that the target @var{file} has just been modified. When used -with the @samp{-n} flag, this shows you what would happen if you were -to modify that file. Without @samp{-n}, it is almost the same as -running a @code{touch} command on the given file before running -@code{make}, except that the modification time is changed only in the -imagination of @code{make}. -@xref{Instead of Execution, ,Instead of Executing the Commands}. - -@item --warn-undefined-variables -@cindex @code{--warn-undefined-variables} -@cindex variables, warning for undefined -@cindex undefined variables, warning message -Issue a warning message whenever @code{make} sees a reference to an -undefined variable. This can be helpful when you are trying to debug -makefiles which use variables in complex ways. -@end table - -@node Implicit Rules, Archives, Running, Top -@chapter Using Implicit Rules -@cindex implicit rule -@cindex rule, implicit - -Certain standard ways of remaking target files are used very often. For -example, one customary way to make an object file is from a C source file -using the C compiler, @code{cc}. - -@dfn{Implicit rules} tell @code{make} how to use customary techniques so -that you do not have to specify them in detail when you want to use -them. For example, there is an implicit rule for C compilation. File -names determine which implicit rules are run. For example, C -compilation typically takes a @file{.c} file and makes a @file{.o} file. -So @code{make} applies the implicit rule for C compilation when it sees -this combination of file name endings.@refill - -A chain of implicit rules can apply in sequence; for example, @code{make} -will remake a @file{.o} file from a @file{.y} file by way of a @file{.c} file. -@iftex -@xref{Chained Rules, ,Chains of Implicit Rules}. -@end iftex - -The built-in implicit rules use several variables in their commands so -that, by changing the values of the variables, you can change the way the -implicit rule works. For example, the variable @code{CFLAGS} controls the -flags given to the C compiler by the implicit rule for C compilation. -@iftex -@xref{Implicit Variables, ,Variables Used by Implicit Rules}. -@end iftex - -You can define your own implicit rules by writing @dfn{pattern rules}. -@iftex -@xref{Pattern Rules, ,Defining and Redefining Pattern Rules}. -@end iftex - -@dfn{Suffix rules} are a more limited way to define implicit rules. -Pattern rules are more general and clearer, but suffix rules are -retained for compatibility. -@iftex -@xref{Suffix Rules, ,Old-Fashioned Suffix Rules}. -@end iftex - -@menu -* Using Implicit:: How to use an existing implicit rule - to get the commands for updating a file. -* Catalogue of Rules:: A list of built-in implicit rules. -* Implicit Variables:: How to change what predefined rules do. -* Chained Rules:: How to use a chain of implicit rules. -* Pattern Rules:: How to define new implicit rules. -* Last Resort:: How to defining commands for rules - which cannot find any. -* Suffix Rules:: The old-fashioned style of implicit rule. -* Search Algorithm:: The precise algorithm for applying - implicit rules. -@end menu - -@node Using Implicit, Catalogue of Rules, , Implicit Rules -@section Using Implicit Rules -@cindex implicit rule, how to use -@cindex rule, implicit, how to use - -To allow @code{make} to find a customary method for updating a target file, -all you have to do is refrain from specifying commands yourself. Either -write a rule with no command lines, or don't write a rule at all. Then -@code{make} will figure out which implicit rule to use based on which -kind of source file exists or can be made. - -For example, suppose the makefile looks like this: - -@example -foo : foo.o bar.o - cc -o foo foo.o bar.o $(CFLAGS) $(LDFLAGS) -@end example - -@noindent -Because you mention @file{foo.o} but do not give a rule for it, @code{make} -will automatically look for an implicit rule that tells how to update it. -This happens whether or not the file @file{foo.o} currently exists. - -If an implicit rule is found, it can supply both commands and one or -more dependencies (the source files). You would want to write a rule -for @file{foo.o} with no command lines if you need to specify additional -dependencies, such as header files, that the implicit rule cannot -supply. - -Each implicit rule has a target pattern and dependency patterns. There may -be many implicit rules with the same target pattern. For example, numerous -rules make @samp{.o} files: one, from a @samp{.c} file with the C compiler; -another, from a @samp{.p} file with the Pascal compiler; and so on. The rule -that actually applies is the one whose dependencies exist or can be made. -So, if you have a file @file{foo.c}, @code{make} will run the C compiler; -otherwise, if you have a file @file{foo.p}, @code{make} will run the Pascal -compiler; and so on. - -Of course, when you write the makefile, you know which implicit rule you -want @code{make} to use, and you know it will choose that one because you -know which possible dependency files are supposed to exist. -@xref{Catalogue of Rules, ,Catalogue of Implicit Rules}, -for a catalogue of all the predefined implicit rules. - -Above, we said an implicit rule applies if the required dependencies ``exist -or can be made''. A file ``can be made'' if it is mentioned explicitly in -the makefile as a target or a dependency, or if an implicit rule can be -recursively found for how to make it. When an implicit dependency is the -result of another implicit rule, we say that @dfn{chaining} is occurring. -@xref{Chained Rules, ,Chains of Implicit Rules}. - -In general, @code{make} searches for an implicit rule for each target, and -for each double-colon rule, that has no commands. A file that is mentioned -only as a dependency is considered a target whose rule specifies nothing, -so implicit rule search happens for it. @xref{Search Algorithm, ,Implicit Rule Search Algorithm}, for the -details of how the search is done. - -Note that explicit dependencies do not influence implicit rule search. -For example, consider this explicit rule: - -@example -foo.o: foo.p -@end example - -@noindent -The dependency on @file{foo.p} does not necessarily mean that -@code{make} will remake @file{foo.o} according to the implicit rule to -make an object file, a @file{.o} file, from a Pascal source file, a -@file{.p} file. For example, if @file{foo.c} also exists, the implicit -rule to make an object file from a C source file is used instead, -because it appears before the Pascal rule in the list of predefined -implicit rules (@pxref{Catalogue of Rules, , Catalogue of Implicit -Rules}). - -If you do not want an implicit rule to be used for a target that has no -commands, you can give that target empty commands by writing a semicolon -(@pxref{Empty Commands, ,Defining Empty Commands}). - -@node Catalogue of Rules, Implicit Variables, Using Implicit, Implicit Rules -@section Catalogue of Implicit Rules -@cindex implicit rule, predefined -@cindex rule, implicit, predefined - -Here is a catalogue of predefined implicit rules which are always -available unless the makefile explicitly overrides or cancels them. -@xref{Canceling Rules, ,Canceling Implicit Rules}, for information on -canceling or overriding an implicit rule. The @samp{-r} or -@samp{--no-builtin-rules} option cancels all predefined rules. - -Not all of these rules will always be defined, even when the @samp{-r} -option is not given. Many of the predefined implicit rules are -implemented in @code{make} as suffix rules, so which ones will be -defined depends on the @dfn{suffix list} (the list of dependencies of -the special target @code{.SUFFIXES}). The default suffix list is: -@code{.out}, @code{.a}, @code{.ln}, @code{.o}, @code{.c}, @code{.cc}, -@code{.C}, @code{.p}, @code{.f}, @code{.F}, @code{.r}, @code{.y}, -@code{.l}, @code{.s}, @code{.S}, @code{.mod}, @code{.sym}, @code{.def}, -@code{.h}, @code{.info}, @code{.dvi}, @code{.tex}, @code{.texinfo}, -@code{.texi}, @code{.txinfo}, @code{.w}, @code{.ch} @code{.web}, -@code{.sh}, @code{.elc}, @code{.el}. All of the implicit rules -described below whose dependencies have one of these suffixes are -actually suffix rules. If you modify the suffix list, the only -predefined suffix rules in effect will be those named by one or two of -the suffixes that are on the list you specify; rules whose suffixes fail -to be on the list are disabled. @xref{Suffix Rules, ,Old-Fashioned -Suffix Rules}, for full details on suffix rules. - -@table @asis -@item Compiling C programs -@cindex C, rule to compile -@pindex cc -@pindex gcc -@pindex .o -@pindex .c -@file{@var{n}.o} is made automatically from @file{@var{n}.c} with -a command of the form @samp{$(CC) -c $(CPPFLAGS) $(CFLAGS)}.@refill - -@item Compiling C++ programs -@cindex C++, rule to compile -@pindex g++ -@pindex .C -@pindex .cc -@file{@var{n}.o} is made automatically from @file{@var{n}.cc} or -@file{@var{n}.C} with a command of the form @samp{$(CXX) -c $(CPPFLAGS) -$(CXXFLAGS)}. We encourage you to use the suffix @samp{.cc} for C++ -source files instead of @samp{.C}.@refill - -@item Compiling Pascal programs -@cindex Pascal, rule to compile -@pindex pc -@pindex .p -@file{@var{n}.o} is made automatically from @file{@var{n}.p} -with the command @samp{$(PC) -c $(PFLAGS)}.@refill - -@item Compiling Fortran and Ratfor programs -@cindex Fortran, rule to compile -@cindex Ratfor, rule to compile -@pindex f77 -@pindex .f -@pindex .r -@pindex .F -@file{@var{n}.o} is made automatically from @file{@var{n}.r}, -@file{@var{n}.F} or @file{@var{n}.f} by running the -Fortran compiler. The precise command used is as follows:@refill - -@table @samp -@item .f -@samp{$(FC) -c $(FFLAGS)}. -@item .F -@samp{$(FC) -c $(FFLAGS) $(CPPFLAGS)}. -@item .r -@samp{$(FC) -c $(FFLAGS) $(RFLAGS)}. -@end table - -@item Preprocessing Fortran and Ratfor programs -@file{@var{n}.f} is made automatically from @file{@var{n}.r} or -@file{@var{n}.F}. This rule runs just the preprocessor to convert a -Ratfor or preprocessable Fortran program into a strict Fortran -program. The precise command used is as follows:@refill - -@table @samp -@item .F -@samp{$(FC) -F $(CPPFLAGS) $(FFLAGS)}. -@item .r -@samp{$(FC) -F $(FFLAGS) $(RFLAGS)}. -@end table - -@item Compiling Modula-2 programs -@cindex Modula-2, rule to compile -@pindex m2c -@pindex .sym -@pindex .def -@pindex .mod -@file{@var{n}.sym} is made from @file{@var{n}.def} with a command -of the form @samp{$(M2C) $(M2FLAGS) $(DEFFLAGS)}. @file{@var{n}.o} -is made from @file{@var{n}.mod}; the form is: -@w{@samp{$(M2C) $(M2FLAGS) $(MODFLAGS)}}.@refill - -@need 1200 -@item Assembling and preprocessing assembler programs -@cindex assembly, rule to compile -@pindex as -@pindex .s -@file{@var{n}.o} is made automatically from @file{@var{n}.s} by -running the assembler, @code{as}. The precise command is -@samp{$(AS) $(ASFLAGS)}.@refill - -@pindex .S -@file{@var{n}.s} is made automatically from @file{@var{n}.S} by -running the C preprocessor, @code{cpp}. The precise command is -@w{@samp{$(CPP) $(CPPFLAGS)}}. - -@item Linking a single object file -@cindex linking, predefined rule for -@pindex ld -@pindex .o -@file{@var{n}} is made automatically from @file{@var{n}.o} by running -the linker (usually called @code{ld}) via the C compiler. The precise -command used is @w{@samp{$(CC) $(LDFLAGS) @var{n}.o $(LOADLIBES)}}. - -This rule does the right thing for a simple program with only one -source file. It will also do the right thing if there are multiple -object files (presumably coming from various other source files), one -of which has a name matching that of the executable file. Thus, - -@example -x: y.o z.o -@end example - -@noindent -when @file{x.c}, @file{y.c} and @file{z.c} all exist will execute: - -@example -@group -cc -c x.c -o x.o -cc -c y.c -o y.o -cc -c z.c -o z.o -cc x.o y.o z.o -o x -rm -f x.o -rm -f y.o -rm -f z.o -@end group -@end example - -@noindent -In more complicated cases, such as when there is no object file whose -name derives from the executable file name, you must write an explicit -command for linking. - -Each kind of file automatically made into @samp{.o} object files will -be automatically linked by using the compiler (@samp{$(CC)}, -@samp{$(FC)} or @samp{$(PC)}; the C compiler @samp{$(CC)} is used to -assemble @samp{.s} files) without the @samp{-c} option. This could be -done by using the @samp{.o} object files as intermediates, but it is -faster to do the compiling and linking in one step, so that's how it's -done.@refill - -@item Yacc for C programs -@pindex yacc -@cindex Yacc, rule to run -@pindex .y -@file{@var{n}.c} is made automatically from @file{@var{n}.y} by -running Yacc with the command @samp{$(YACC) $(YFLAGS)}. - -@item Lex for C programs -@pindex lex -@cindex Lex, rule to run -@pindex .l -@file{@var{n}.c} is made automatically from @file{@var{n}.l} by -by running Lex. The actual command is @samp{$(LEX) $(LFLAGS)}. - -@item Lex for Ratfor programs -@file{@var{n}.r} is made automatically from @file{@var{n}.l} by -by running Lex. The actual command is @samp{$(LEX) $(LFLAGS)}. - -The convention of using the same suffix @samp{.l} for all Lex files -regardless of whether they produce C code or Ratfor code makes it -impossible for @code{make} to determine automatically which of the two -languages you are using in any particular case. If @code{make} is -called upon to remake an object file from a @samp{.l} file, it must -guess which compiler to use. It will guess the C compiler, because -that is more common. If you are using Ratfor, make sure @code{make} -knows this by mentioning @file{@var{n}.r} in the makefile. Or, if you -are using Ratfor exclusively, with no C files, remove @samp{.c} from -the list of implicit rule suffixes with:@refill - -@example -@group -.SUFFIXES: -.SUFFIXES: .o .r .f .l @dots{} -@end group -@end example - -@item Making Lint Libraries from C, Yacc, or Lex programs -@pindex lint -@cindex @code{lint}, rule to run -@pindex .ln -@file{@var{n}.ln} is made from @file{@var{n}.c} by running @code{lint}. -The precise command is @w{@samp{$(LINT) $(LINTFLAGS) $(CPPFLAGS) -i}}. -The same command is used on the C code produced from -@file{@var{n}.y} or @file{@var{n}.l}.@refill - -@item @TeX{} and Web -@cindex @TeX{}, rule to run -@cindex Web, rule to run -@pindex tex -@pindex cweave -@pindex weave -@pindex tangle -@pindex ctangle -@pindex .dvi -@pindex .tex -@pindex .web -@pindex .w -@pindex .ch -@file{@var{n}.dvi} is made from @file{@var{n}.tex} with the command -@samp{$(TEX)}. @file{@var{n}.tex} is made from @file{@var{n}.web} with -@samp{$(WEAVE)}, or from @file{@var{n}.w} (and from @file{@var{n}.ch} if -it exists or can be made) with @samp{$(CWEAVE)}. @file{@var{n}.p} is -made from @file{@var{n}.web} with @samp{$(TANGLE)} and @file{@var{n}.c} -is made from @file{@var{n}.w} (and from @file{@var{n}.ch} if it exists -or can be made) with @samp{$(CTANGLE)}.@refill - -@item Texinfo and Info -@cindex Texinfo, rule to format -@cindex Info, rule to format -@pindex texi2dvi -@pindex makeinfo -@pindex .texinfo -@pindex .info -@pindex .texi -@pindex .txinfo -@file{@var{n}.dvi} is made from @file{@var{n}.texinfo}, -@file{@var{n}.texi}, or @file{@var{n}.txinfo}, with the command -@w{@samp{$(TEXI2DVI) $(TEXI2DVI_FLAGS)}}. @file{@var{n}.info} is made from -@file{@var{n}.texinfo}, @file{@var{n}.texi}, or @file{@var{n}.txinfo}, with -the command @w{@samp{$(MAKEINFO) $(MAKEINFO_FLAGS)}}. - -@item RCS -@cindex RCS, rule to extract from -@pindex co -@pindex ,v @r{(RCS file extension)} -Any file @file{@var{n}} is extracted if necessary from an RCS file -named either @file{@var{n},v} or @file{RCS/@var{n},v}. The precise -command used is @w{@samp{$(CO) $(COFLAGS)}}. @file{@var{n}} will not be -extracted from RCS if it already exists, even if the RCS file is -newer. The rules for RCS are terminal -(@pxref{Match-Anything Rules, ,Match-Anything Pattern Rules}), -so RCS files cannot be generated from another source; they must -actually exist.@refill - -@item SCCS -@cindex SCCS, rule to extract from -@pindex get -@pindex s. @r{(SCCS file prefix)} -Any file @file{@var{n}} is extracted if necessary from an SCCS file -named either @file{s.@var{n}} or @file{SCCS/s.@var{n}}. The precise -command used is @w{@samp{$(GET) $(GFLAGS)}}. The rules for SCCS are -terminal (@pxref{Match-Anything Rules, ,Match-Anything Pattern Rules}), -so SCCS files cannot be generated from another source; they must -actually exist.@refill - -@pindex .sh -For the benefit of SCCS, a file @file{@var{n}} is copied from -@file{@var{n}.sh} and made executable (by everyone). This is for -shell scripts that are checked into SCCS. Since RCS preserves the -execution permission of a file, you do not need to use this feature -with RCS.@refill - -We recommend that you avoid using of SCCS. RCS is widely held to be -superior, and is also free. By choosing free software in place of -comparable (or inferior) proprietary software, you support the free -software movement. -@end table - -Usually, you want to change only the variables listed in the table -above, which are documented in the following section. - -However, the commands in built-in implicit rules actually use -variables such as @code{COMPILE.c}, @code{LINK.p}, and -@code{PREPROCESS.S}, whose values contain the commands listed above. - -@code{make} follows the convention that the rule to compile a -@file{.@var{x}} source file uses the variable @code{COMPILE.@var{x}}. -Similarly, the rule to produce an executable from a @file{.@var{x}} -file uses @code{LINK.@var{x}}; and the rule to preprocess a -@file{.@var{x}} file uses @code{PREPROCESS.@var{x}}. - -@vindex OUTPUT_OPTION -Every rule that produces an object file uses the variable -@code{OUTPUT_OPTION}. @code{make} defines this variable either to -contain @samp{-o $@@}, or to be empty, depending on a compile-time -option. You need the @samp{-o} option to ensure that the output goes -into the right file when the source file is in a different directory, -as when using @code{VPATH} (@pxref{Directory Search}). However, -compilers on some systems do not accept a @samp{-o} switch for object -files. If you use such a system, and use @code{VPATH}, some -compilations will put their output in the wrong place. -A possible workaround for this problem is to give @code{OUTPUT_OPTION} -the value @w{@samp{; mv $*.o $@@}}. - -@node Implicit Variables, Chained Rules, Catalogue of Rules, Implicit Rules -@section Variables Used by Implicit Rules -@cindex flags for compilers - -The commands in built-in implicit rules make liberal use of certain -predefined variables. You can alter these variables in the makefile, -with arguments to @code{make}, or in the environment to alter how the -implicit rules work without redefining the rules themselves. - -For example, the command used to compile a C source file actually says -@samp{$(CC) -c $(CFLAGS) $(CPPFLAGS)}. The default values of the variables -used are @samp{cc} and nothing, resulting in the command @samp{cc -c}. By -redefining @samp{CC} to @samp{ncc}, you could cause @samp{ncc} to be -used for all C compilations performed by the implicit rule. By redefining -@samp{CFLAGS} to be @samp{-g}, you could pass the @samp{-g} option to -each compilation. @emph{All} implicit rules that do C compilation use -@samp{$(CC)} to get the program name for the compiler and @emph{all} -include @samp{$(CFLAGS)} among the arguments given to the compiler.@refill - -The variables used in implicit rules fall into two classes: those that are -names of programs (like @code{CC}) and those that contain arguments for the -programs (like @code{CFLAGS}). (The ``name of a program'' may also contain -some command arguments, but it must start with an actual executable program -name.) If a variable value contains more than one argument, separate them -with spaces. - -Here is a table of variables used as names of programs in built-in rules: - -@table @code -@item AR -@vindex AR -Archive-maintaining program; default @samp{ar}. -@pindex ar - -@item AS -@vindex AS -Program for doing assembly; default @samp{as}. -@pindex as - -@item CC -@vindex CC -Program for compiling C programs; default @samp{cc}. -@pindex cc - -@item CXX -@vindex CXX -Program for compiling C++ programs; default @samp{g++}. -@pindex g++ - -@item CO -@vindex CO -Program for extracting a file from RCS; default @samp{co}. -@pindex co - -@item CPP -@vindex CPP -Program for running the C preprocessor, with results to standard output; -default @samp{$(CC) -E}. - -@item FC -@vindex FC -Program for compiling or preprocessing Fortran and Ratfor programs; -default @samp{f77}. -@pindex f77 - -@item GET -@vindex GET -Program for extracting a file from SCCS; default @samp{get}. -@pindex get - -@item LEX -@vindex LEX -Program to use to turn Lex grammars into C programs or Ratfor programs; -default @samp{lex}. -@pindex lex - -@item PC -@vindex PC -Program for compiling Pascal programs; default @samp{pc}. -@pindex pc - -@item YACC -@vindex YACC -Program to use to turn Yacc grammars into C programs; default @samp{yacc}. -@pindex yacc - -@item YACCR -@vindex YACCR -Program to use to turn Yacc grammars into Ratfor -programs; default @samp{yacc -r}. - -@item MAKEINFO -@vindex MAKEINFO -Program to convert a Texinfo source file into an Info file; default -@samp{makeinfo}. -@pindex makeinfo - -@item TEX -@vindex TEX -Program to make @TeX{} @sc{dvi} files from @TeX{} source; -default @samp{tex}. -@pindex tex - -@item TEXI2DVI -@vindex TEXI2DVI -Program to make @TeX{} @sc{dvi} files from Texinfo source; -default @samp{texi2dvi}. -@pindex texi2dvi - -@item WEAVE -@vindex WEAVE -Program to translate Web into @TeX{}; default @samp{weave}. -@pindex weave - -@item CWEAVE -@vindex CWEAVE -Program to translate C Web into @TeX{}; default @samp{cweave}. -@pindex cweave - -@item TANGLE -@vindex TANGLE -Program to translate Web into Pascal; default @samp{tangle}. -@pindex tangle - -@item CTANGLE -@vindex CTANGLE -Program to translate C Web into C; default @samp{ctangle}. -@pindex ctangle - -@item RM -@vindex RM -Command to remove a file; default @samp{rm -f}. -@pindex rm -@end table - -Here is a table of variables whose values are additional arguments for the -programs above. The default values for all of these is the empty -string, unless otherwise noted. - -@table @code -@item ARFLAGS -@vindex ARFLAGS -Flags to give the archive-maintaining program; default @samp{rv}. - -@item ASFLAGS -@vindex ASFLAGS -Extra flags to give to the assembler (when explicitly -invoked on a @samp{.s} or @samp{.S} file). - -@item CFLAGS -@vindex CFLAGS -Extra flags to give to the C compiler. - -@item CXXFLAGS -@vindex CXXFLAGS -Extra flags to give to the C++ compiler. - -@item COFLAGS -@vindex COFLAGS -Extra flags to give to the RCS @code{co} program. - -@item CPPFLAGS -@vindex CPPFLAGS -Extra flags to give to the C preprocessor and programs -that use it (the C and Fortran compilers). - -@item FFLAGS -@vindex FFLAGS -Extra flags to give to the Fortran compiler. - -@item GFLAGS -@vindex GFLAGS -Extra flags to give to the SCCS @code{get} program. - -@item LDFLAGS -@vindex LDFLAGS -Extra flags to give to compilers when they are -supposed to invoke the linker, @samp{ld}. - -@item LFLAGS -@vindex LFLAGS -Extra flags to give to Lex. - -@item PFLAGS -@vindex PFLAGS -Extra flags to give to the Pascal compiler. - -@item RFLAGS -@vindex RFLAGS -Extra flags to give to the Fortran compiler for Ratfor programs. - -@item YFLAGS -@vindex YFLAGS -Extra flags to give to Yacc. -@end table - -@node Chained Rules, Pattern Rules, Implicit Variables, Implicit Rules -@section Chains of Implicit Rules - -@cindex chains of rules -@cindex rule, implicit, chains of -Sometimes a file can be made by a sequence of implicit rules. For example, -a file @file{@var{n}.o} could be made from @file{@var{n}.y} by running -first Yacc and then @code{cc}. Such a sequence is called a @dfn{chain}. - -If the file @file{@var{n}.c} exists, or is mentioned in the makefile, no -special searching is required: @code{make} finds that the object file can -be made by C compilation from @file{@var{n}.c}; later on, when considering -how to make @file{@var{n}.c}, the rule for running Yacc is -used. Ultimately both @file{@var{n}.c} and @file{@var{n}.o} are -updated.@refill - -@cindex intermediate files -@cindex files, intermediate -However, even if @file{@var{n}.c} does not exist and is not mentioned, -@code{make} knows how to envision it as the missing link between -@file{@var{n}.o} and @file{@var{n}.y}! In this case, @file{@var{n}.c} is -called an @dfn{intermediate file}. Once @code{make} has decided to use the -intermediate file, it is entered in the data base as if it had been -mentioned in the makefile, along with the implicit rule that says how to -create it.@refill - -Intermediate files are remade using their rules just like all other -files. The difference is that the intermediate file is deleted when -@code{make} is finished. Therefore, the intermediate file which did not -exist before @code{make} also does not exist after @code{make}. The -deletion is reported to you by printing a @samp{rm -f} command that -shows what @code{make} is doing. (You can list the target pattern of an -implicit rule (such as @samp{%.o}) as a dependency of the special -target @code{.PRECIOUS} to preserve intermediate files made by implicit -rules whose target patterns match that file's name; -see @ref{Interrupts}.)@refill -@cindex intermediate files, preserving -@cindex preserving intermediate files -@cindex preserving with @code{.PRECIOUS} -@cindex @code{.PRECIOUS} intermediate files - -A chain can involve more than two implicit rules. For example, it is -possible to make a file @file{foo} from @file{RCS/foo.y,v} by running RCS, -Yacc and @code{cc}. Then both @file{foo.y} and @file{foo.c} are -intermediate files that are deleted at the end.@refill - -No single implicit rule can appear more than once in a chain. This means -that @code{make} will not even consider such a ridiculous thing as making -@file{foo} from @file{foo.o.o} by running the linker twice. This -constraint has the added benefit of preventing any infinite loop in the -search for an implicit rule chain. - -There are some special implicit rules to optimize certain cases that would -otherwise be handled by rule chains. For example, making @file{foo} from -@file{foo.c} could be handled by compiling and linking with separate -chained rules, using @file{foo.o} as an intermediate file. But what -actually happens is that a special rule for this case does the compilation -and linking with a single @code{cc} command. The optimized rule is used in -preference to the step-by-step chain because it comes earlier in the -ordering of rules. - -@node Pattern Rules, Last Resort, Chained Rules, Implicit Rules -@section Defining and Redefining Pattern Rules - -You define an implicit rule by writing a @dfn{pattern rule}. A pattern -rule looks like an ordinary rule, except that its target contains the -character @samp{%} (exactly one of them). The target is considered a -pattern for matching file names; the @samp{%} can match any nonempty -substring, while other characters match only themselves. The dependencies -likewise use @samp{%} to show how their names relate to the target name. - -Thus, a pattern rule @samp{%.o : %.c} says how to make any file -@file{@var{stem}.o} from another file @file{@var{stem}.c}.@refill - -Note that expansion using @samp{%} in pattern rules occurs -@strong{after} any variable or function expansions, which take place -when the makefile is read. @xref{Using Variables, , How to Use -Variables}, and @ref{Functions, ,Functions for Transforming Text}. - -@menu -* Pattern Intro:: An introduction to pattern rules. -* Pattern Examples:: Examples of pattern rules. -* Automatic:: How to use automatic variables in the - commands of implicit rules. -* Pattern Match:: How patterns match. -* Match-Anything Rules:: Precautions you should take prior to - defining rules that can match any - target file whatever. -* Canceling Rules:: How to override or cancel built-in rules. -@end menu - -@node Pattern Intro, Pattern Examples, , Pattern Rules -@subsection Introduction to Pattern Rules -@cindex pattern rule -@cindex rule, pattern - -A pattern rule contains the character @samp{%} (exactly one of them) -in the target; otherwise, it looks exactly like an ordinary rule. The -target is a pattern for matching file names; the @samp{%} matches any -nonempty substring, while other characters match only themselves. -@cindex target pattern, implicit -@cindex @code{%}, in pattern rules - -For example, @samp{%.c} as a pattern matches any file name that ends in -@samp{.c}. @samp{s.%.c} as a pattern matches any file name that starts -with @samp{s.}, ends in @samp{.c} and is at least five characters long. -(There must be at least one character to match the @samp{%}.) The substring -that the @samp{%} matches is called the @dfn{stem}.@refill - -@samp{%} in a dependency of a pattern rule stands for the same stem -that was matched by the @samp{%} in the target. In order for -the pattern rule to apply, its target pattern must match the file name -under consideration, and its dependency patterns must name files that -exist or can be made. These files become dependencies of the target. -@cindex dependency pattern, implicit - -Thus, a rule of the form - -@example -%.o : %.c ; @var{command}@dots{} -@end example - -@noindent -specifies how to make a file @file{@var{n}.o}, with another file -@file{@var{n}.c} as its dependency, provided that @file{@var{n}.c} -exists or can be made. - -There may also be dependencies that do not use @samp{%}; such a dependency -attaches to every file made by this pattern rule. These unvarying -dependencies are useful occasionally. - -A pattern rule need not have any dependencies that contain @samp{%}, or -in fact any dependencies at all. Such a rule is effectively a general -wildcard. It provides a way to make any file that matches the target -pattern. @xref{Last Resort}. - -@c !!! The end of of this paragraph should be rewritten. --bob -Pattern rules may have more than one target. Unlike normal rules, this -does not act as many different rules with the same dependencies and -commands. If a pattern rule has multiple targets, @code{make} knows that -the rule's commands are responsible for making all of the targets. The -commands are executed only once to make all the targets. When searching -for a pattern rule to match a target, the target patterns of a rule other -than the one that matches the target in need of a rule are incidental: -@code{make} worries only about giving commands and dependencies to the file -presently in question. However, when this file's commands are run, the -other targets are marked as having been updated themselves. -@cindex multiple targets, in pattern rule -@cindex target, multiple in pattern rule - -The order in which pattern rules appear in the makefile is important -since this is the order in which they are considered. -Of equally applicable -rules, only the first one found is used. The rules you write take precedence -over those that are built in. Note however, that a rule whose -dependencies actually exist or are mentioned always takes priority over a -rule with dependencies that must be made by chaining other implicit rules. -@cindex pattern rules, order of -@cindex order of pattern rules - -@node Pattern Examples, Automatic, Pattern Intro, Pattern Rules -@subsection Pattern Rule Examples - -Here are some examples of pattern rules actually predefined in -@code{make}. First, the rule that compiles @samp{.c} files into @samp{.o} -files:@refill - -@example -%.o : %.c - $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@@ -@end example - -@noindent -defines a rule that can make any file @file{@var{x}.o} from -@file{@var{x}.c}. The command uses the automatic variables @samp{$@@} and -@samp{$<} to substitute the names of the target file and the source file -in each case where the rule applies (@pxref{Automatic, ,Automatic Variables}).@refill - -Here is a second built-in rule: - -@example -% :: RCS/%,v - $(CO) $(COFLAGS) $< -@end example - -@noindent -defines a rule that can make any file @file{@var{x}} whatsoever from a -corresponding file @file{@var{x},v} in the subdirectory @file{RCS}. Since -the target is @samp{%}, this rule will apply to any file whatever, provided -the appropriate dependency file exists. The double colon makes the rule -@dfn{terminal}, which means that its dependency may not be an intermediate -file (@pxref{Match-Anything Rules, ,Match-Anything Pattern Rules}).@refill - -@need 500 -This pattern rule has two targets: - -@example -@group -%.tab.c %.tab.h: %.y - bison -d $< -@end group -@end example - -@noindent -@c The following paragraph is rewritten to avoid overfull hboxes -This tells @code{make} that the command @samp{bison -d @var{x}.y} will -make both @file{@var{x}.tab.c} and @file{@var{x}.tab.h}. If the file -@file{foo} depends on the files @file{parse.tab.o} and @file{scan.o} -and the file @file{scan.o} depends on the file @file{parse.tab.h}, -when @file{parse.y} is changed, the command @samp{bison -d parse.y} -will be executed only once, and the dependencies of both -@file{parse.tab.o} and @file{scan.o} will be satisfied. (Presumably -the file @file{parse.tab.o} will be recompiled from @file{parse.tab.c} -and the file @file{scan.o} from @file{scan.c}, while @file{foo} is -linked from @file{parse.tab.o}, @file{scan.o}, and its other -dependencies, and it will execute happily ever after.)@refill - -@node Automatic, Pattern Match, Pattern Examples, Pattern Rules -@subsection Automatic Variables -@cindex automatic variables -@cindex variables, automatic -@cindex variables, and implicit rule - -Suppose you are writing a pattern rule to compile a @samp{.c} file into a -@samp{.o} file: how do you write the @samp{cc} command so that it operates -on the right source file name? You cannot write the name in the command, -because the name is different each time the implicit rule is applied. - -What you do is use a special feature of @code{make}, the @dfn{automatic -variables}. These variables have values computed afresh for each rule that -is executed, based on the target and dependencies of the rule. In this -example, you would use @samp{$@@} for the object file name and @samp{$<} -for the source file name. - -Here is a table of automatic variables: - -@table @code -@vindex $@@ -@vindex @@ @r{(automatic variable)} -@item $@@ -The file name of the target of the rule. If the target is an archive -member, then @samp{$@@} is the name of the archive file. In a pattern -rule that has multiple targets (@pxref{Pattern Intro, ,Introduction to -Pattern Rules}), @samp{$@@} is the name of whichever target caused the -rule's commands to be run. - -@vindex $% -@vindex % @r{(automatic variable)} -@item $% -The target member name, when the target is an archive member. -@xref{Archives}. For example, if the target is @file{foo.a(bar.o)} then -@samp{$%} is @file{bar.o} and @samp{$@@} is @file{foo.a}. @samp{$%} is -empty when the target is not an archive member. - -@vindex $< -@vindex < @r{(automatic variable)} -@item $< -The name of the first dependency. If the target got its commands from -an implicit rule, this will be the first dependency added by the -implicit rule (@pxref{Implicit Rules}). - -@vindex $? -@vindex ? @r{(automatic variable)} -@item $? -The names of all the dependencies that are newer than the target, with -spaces between them. For dependencies which are archive members, only -the member named is used (@pxref{Archives}). -@cindex dependencies, list of changed -@cindex list of changed dependencies - -@vindex $^ -@vindex ^ @r{(automatic variable)} -@item $^ -The names of all the dependencies, with spaces between them. For -dependencies which are archive members, only the member named is used -(@pxref{Archives}). A target has only one dependency on each other file -it depends on, no matter how many times each file is listed as a -dependency. So if you list a dependency more than once for a target, -the value of @code{$^} contains just one copy of the name. -@cindex dependencies, list of all -@cindex list of all dependencies - -@vindex $+ -@vindex + @r{(automatic variable)} -@item $+ -This is like @samp{$^}, but dependencies listed more than once are -duplicated in the order they were listed in the makefile. This is -primarily useful for use in linking commands where it is meaningful to -repeat library file names in a particular order. - -@vindex $* -@vindex * @r{(automatic variable)} -@item $* -The stem with which an implicit rule matches (@pxref{Pattern Match, ,How -Patterns Match}). If the target is @file{dir/a.foo.b} and the target -pattern is @file{a.%.b} then the stem is @file{dir/foo}. The stem is -useful for constructing names of related files.@refill -@cindex stem, variable for - -In a static pattern rule, the stem is part of the file name that matched -the @samp{%} in the target pattern. - -In an explicit rule, there is no stem; so @samp{$*} cannot be determined -in that way. Instead, if the target name ends with a recognized suffix -(@pxref{Suffix Rules, ,Old-Fashioned Suffix Rules}), @samp{$*} is set to -the target name minus the suffix. For example, if the target name is -@samp{foo.c}, then @samp{$*} is set to @samp{foo}, since @samp{.c} is a -suffix. GNU @code{make} does this bizarre thing only for compatibility -with other implementations of @code{make}. You should generally avoid -using @samp{$*} except in implicit rules or static pattern rules.@refill - -If the target name in an explicit rule does not end with a recognized -suffix, @samp{$*} is set to the empty string for that rule. -@end table - -@samp{$?} is useful even in explicit rules when you wish to operate on only -the dependencies that have changed. For example, suppose that an archive -named @file{lib} is supposed to contain copies of several object files. -This rule copies just the changed object files into the archive: - -@example -@group -lib: foo.o bar.o lose.o win.o - ar r lib $? -@end group -@end example - -Of the variables listed above, four have values that are single file -names, and two have values that are lists of file names. These six have -variants that get just the file's directory name or just the file name -within the directory. The variant variables' names are formed by -appending @samp{D} or @samp{F}, respectively. These variants are -semi-obsolete in GNU @code{make} since the functions @code{dir} and -@code{notdir} can be used to get a similar effect (@pxref{Filename -Functions, , Functions for File Names}). Note, however, that the -@samp{F} variants all omit the trailing slash which always appears in -the output of the @code{dir} function. Here is a table of the variants: - -@table @samp -@vindex $(@@D) -@vindex @@D @r{(automatic variable)} -@item $(@@D) -The directory part of the file name of the target, with the trailing -slash removed. If the value of @samp{$@@} is @file{dir/foo.o} then -@samp{$(@@D)} is @file{dir}. This value is @file{.} if @samp{$@@} does -not contain a slash. - -@vindex $(@@F) -@vindex @@F @r{(automatic variable)} -@item $(@@F) -The file-within-directory part of the file name of the target. If the -value of @samp{$@@} is @file{dir/foo.o} then @samp{$(@@F)} is -@file{foo.o}. @samp{$(@@F)} is equivalent to @samp{$(notdir $@@)}. - -@vindex $(*D) -@vindex *D @r{(automatic variable)} -@item $(*D) -@vindex $(*F) -@vindex *F @r{(automatic variable)} -@itemx $(*F) -The directory part and the file-within-directory -part of the stem; @file{dir} and @file{foo} in this example. - -@vindex $(%D) -@vindex %D @r{(automatic variable)} -@item $(%D) -@vindex $(%F) -@vindex %F @r{(automatic variable)} -@itemx $(%F) -The directory part and the file-within-directory part of the target -archive member name. This makes sense only for archive member targets -of the form @file{@var{archive}(@var{member})} and is useful only when -@var{member} may contain a directory name. (@xref{Archive Members, -,Archive Members as Targets}.) - -@vindex $( tar-`sed -e '/version_string/!d' \ - -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \ - -e q - version.c`.shar.Z -@end group - -@group -dist: $(SRCS) $(AUX) - echo tar-`sed \ - -e '/version_string/!d' \ - -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \ - -e q - version.c` > .fname - -rm -rf `cat .fname` - mkdir `cat .fname` - ln $(SRCS) $(AUX) `cat .fname` - -rm -rf `cat .fname` .fname - tar chZf `cat .fname`.tar.Z `cat .fname` -@end group - -@group -tar.zoo: $(SRCS) $(AUX) - -rm -rf tmp.dir - -mkdir tmp.dir - -rm tar.zoo - for X in $(SRCS) $(AUX) ; do \ - echo $$X ; \ - sed 's/$$/^M/' $$X \ - > tmp.dir/$$X ; done - cd tmp.dir ; zoo aM ../tar.zoo * - -rm -rf tmp.dir -@end group -@end example - -@node Concept Index, Name Index, Complex Makefile, Top -@unnumbered Index of Concepts - -@printindex cp - -@node Name Index, , Concept Index, Top -@unnumbered Index of Functions, Variables, & Directives - -@printindex fn - -@summarycontents -@contents -@bye diff --git a/buildtools/windows/source/make/make.toc b/buildtools/windows/source/make/make.toc deleted file mode 100644 index 311573ce690..00000000000 --- a/buildtools/windows/source/make/make.toc +++ /dev/null @@ -1,118 +0,0 @@ -\chapentry {Overview of \code {make}}{1}{1} -\secentry {How to Read This Manual}{1}{1}{1} -\secentry {Problems and Bugs}{1}{2}{2} -\chapentry {An Introduction to Makefiles}{2}{5} -\secentry {What a Rule Looks Like}{2}{1}{5} -\secentry {A Simple Makefile}{2}{2}{6} -\secentry {How \code {make} Processes a Makefile}{2}{3}{8} -\secentry {Variables Make Makefiles Simpler}{2}{4}{9} -\secentry {Letting \code {make} Deduce the Commands}{2}{5}{10} -\secentry {Another Style of Makefile}{2}{6}{11} -\secentry {Rules for Cleaning the Directory}{2}{7}{12} -\chapentry {Writing Makefiles}{3}{13} -\secentry {What Makefiles Contain}{3}{1}{13} -\secentry {What Name to Give Your Makefile}{3}{2}{14} -\secentry {Including Other Makefiles}{3}{3}{14} -\secentry {The Variable \code {MAKEFILES}}{3}{4}{16} -\secentry {How Makefiles Are Remade}{3}{5}{16} -\secentry {Overriding Part of Another Makefile}{3}{6}{18} -\chapentry {Writing Rules}{4}{19} -\secentry {Rule Syntax}{4}{1}{19} -\secentry {Using Wildcard Characters in File Names}{4}{2}{20} -\subsecentry {Wildcard Examples}{4}{2}{1}{21} -\subsecentry {Pitfalls of Using Wildcards}{4}{2}{2}{22} -\subsecentry {The Function \code {wildcard}}{4}{2}{3}{22} -\secentry {Searching Directories for Dependencies}{4}{3}{23} -\subsecentry {\code {VPATH}: Search Path for All Dependencies}{4}{3}{1}{23} -\subsecentry {The \code {vpath} Directive}{4}{3}{2}{24} -\subsecentry {Writing Shell Commands with Directory Search}{4}{3}{3}{26} -\subsecentry {Directory Search and Implicit Rules}{4}{3}{4}{27} -\subsecentry {Directory Search for Link Libraries}{4}{3}{5}{27} -\secentry {Phony Targets}{4}{4}{28} -\secentry {Rules without Commands or Dependencies}{4}{5}{30} -\secentry {Empty Target Files to Record Events}{4}{6}{30} -\secentry {Special Built-in Target Names}{4}{7}{31} -\secentry {Multiple Targets in a Rule}{4}{8}{32} -\secentry {Multiple Rules for One Target}{4}{9}{33} -\secentry {Static Pattern Rules}{4}{10}{34} -\subsecentry {Syntax of Static Pattern Rules}{4}{10}{1}{34} -\subsecentry {Static Pattern Rules versus Implicit Rules}{4}{10}{2}{36} -\secentry {Double-Colon Rules}{4}{11}{37} -\secentry {Generating Dependencies Automatically}{4}{12}{37} -\chapentry {Writing the Commands in Rules}{5}{41} -\secentry {Command Echoing}{5}{1}{41} -\secentry {Command Execution}{5}{2}{42} -\secentry {Parallel Execution}{5}{3}{42} -\secentry {Errors in Commands}{5}{4}{44} -\secentry {Interrupting or Killing \code {make}}{5}{5}{45} -\secentry {Recursive Use of \code {make}}{5}{6}{46} -\subsecentry {How the \code {MAKE} Variable Works}{5}{6}{1}{46} -\subsecentry {Communicating Variables to a Sub-\code {make}}{5}{6}{2}{47} -\subsecentry {Communicating Options to a Sub-\code {make}}{5}{6}{3}{50} -\subsecentry {The \samp {--print-directory} Option}{5}{6}{4}{52} -\secentry {Defining Canned Command Sequences}{5}{7}{52} -\secentry {Using Empty Commands}{5}{8}{54} -\chapentry {How to Use Variables}{6}{55} -\secentry {Basics of Variable References}{6}{1}{55} -\secentry {The Two Flavors of Variables}{6}{2}{56} -\secentry {Advanced Features for Reference to Variables}{6}{3}{59} -\subsecentry {Substitution References}{6}{3}{1}{59} -\subsecentry {Computed Variable Names}{6}{3}{2}{60} -\secentry {How Variables Get Their Values}{6}{4}{63} -\secentry {Setting Variables}{6}{5}{63} -\secentry {Appending More Text to Variables}{6}{6}{64} -\secentry {The \code {override} Directive}{6}{7}{66} -\secentry {Defining Variables Verbatim}{6}{8}{67} -\secentry {Variables from the Environment}{6}{9}{68} -\chapentry {Conditional Parts of Makefiles}{7}{71} -\secentry {Example of a Conditional}{7}{1}{71} -\secentry {Syntax of Conditionals}{7}{2}{72} -\secentry {Conditionals that Test Flags}{7}{3}{75} -\chapentry {Functions for Transforming Text}{8}{77} -\secentry {Function Call Syntax}{8}{1}{77} -\secentry {Functions for String Substitution and Analysis}{8}{2}{78} -\secentry {Functions for File Names}{8}{3}{81} -\secentry {The \code {foreach} Function}{8}{4}{83} -\secentry {The \code {origin} Function}{8}{5}{85} -\secentry {The \code {shell} Function}{8}{6}{87} -\chapentry {How to Run \code {make}}{9}{89} -\secentry {Arguments to Specify the Makefile}{9}{1}{89} -\secentry {Arguments to Specify the Goals}{9}{2}{90} -\secentry {Instead of Executing the Commands}{9}{3}{91} -\secentry {Avoiding Recompilation of Some Files}{9}{4}{93} -\secentry {Overriding Variables}{9}{5}{94} -\secentry {Testing the Compilation of a Program}{9}{6}{95} -\secentry {Summary of Options}{9}{7}{95} -\chapentry {Using Implicit Rules}{10}{101} -\secentry {Using Implicit Rules}{10}{1}{101} -\secentry {Catalogue of Implicit Rules}{10}{2}{103} -\secentry {Variables Used by Implicit Rules}{10}{3}{106} -\secentry {Chains of Implicit Rules}{10}{4}{108} -\secentry {Defining and Redefining Pattern Rules}{10}{5}{109} -\subsecentry {Introduction to Pattern Rules}{10}{5}{1}{110} -\subsecentry {Pattern Rule Examples}{10}{5}{2}{111} -\subsecentry {Automatic Variables}{10}{5}{3}{112} -\subsecentry {How Patterns Match}{10}{5}{4}{114} -\subsecentry {Match-Anything Pattern Rules}{10}{5}{5}{115} -\subsecentry {Canceling Implicit Rules}{10}{5}{6}{116} -\secentry {Defining Last-Resort Default Rules}{10}{6}{116} -\secentry {Old-Fashioned Suffix Rules}{10}{7}{117} -\secentry {Implicit Rule Search Algorithm}{10}{8}{119} -\chapentry {Using \code {make} to Update Archive Files}{11}{121} -\secentry {Archive Members as Targets}{11}{1}{121} -\secentry {Implicit Rule for Archive Member Targets}{11}{2}{122} -\subsecentry {Updating Archive Symbol Directories}{11}{2}{1}{123} -\secentry {Dangers When Using Archives}{11}{3}{123} -\secentry {Suffix Rules for Archive Files}{11}{4}{124} -\chapentry {Features of GNU \code {make}}{12}{125} -\chapentry {Incompatibilities and Missing Features}{13}{129} -\chapentry {Makefile Conventions}{14}{131} -\secentry {General Conventions for Makefiles}{14}{1}{131} -\secentry {Utilities in Makefiles}{14}{2}{132} -\secentry {Standard Targets for Users}{14}{3}{133} -\secentry {Variables for Specifying Commands}{14}{4}{136} -\secentry {Variables for Installation Directories}{14}{5}{138} -\chapentry {Quick Reference}{Appendix{} \char65}{143} -\chapentry {Complex Makefile Example}{Appendix{} \char66}{149} -\unnumbchapentry {Index of Concepts}{155} -\unnumbchapentry {Index of Functions, Variables, & Directives}{165} diff --git a/buildtools/windows/source/make/misc.c b/buildtools/windows/source/make/misc.c deleted file mode 100644 index f2ffc3898a8..00000000000 --- a/buildtools/windows/source/make/misc.c +++ /dev/null @@ -1,739 +0,0 @@ -/* Miscellaneous generic support functions for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "dep.h" - - -/* Compare strings *S1 and *S2. - Return negative if the first is less, positive if it is greater, - zero if they are equal. */ - -int -alpha_compare (const void *elem1, const void *elem2) -{ - char **s1 = (char **)elem1; - char **s2 = (char **)elem2; - if (**s1 != **s2) - return **s1 - **s2; - return strcmp (*s1, *s2); -} - -/* Discard each backslash-newline combination from LINE. - Backslash-backslash-newline combinations become backslash-newlines. - This is done by copying the text at LINE into itself. */ - -void -collapse_continuations (line) - char *line; -{ - register char *in, *out, *p; - register int backslash; - register unsigned int bs_write; - - in = index (line, '\n'); - if (in == 0) - return; - - out = in; - if (out > line) - while (out[-1] == '\\') - --out; - - while (*in != '\0') - { - /* BS_WRITE gets the number of quoted backslashes at - the end just before IN, and BACKSLASH gets nonzero - if the next character is quoted. */ - backslash = 0; - bs_write = 0; - for (p = in - 1; p >= line && *p == '\\'; --p) - { - if (backslash) - ++bs_write; - backslash = !backslash; - - /* It should be impossible to go back this far without exiting, - but if we do, we can't get the right answer. */ - if (in == out - 1) - abort (); - } - - /* Output the appropriate number of backslashes. */ - while (bs_write-- > 0) - *out++ = '\\'; - - /* Skip the newline. */ - ++in; - - /* If the newline is quoted, discard following whitespace - and any preceding whitespace; leave just one space. */ - if (backslash) - { - in = next_token (in); - while (out > line && isblank (out[-1])) - --out; - *out++ = ' '; - } - else - /* If the newline isn't quoted, put it in the output. */ - *out++ = '\n'; - - /* Now copy the following line to the output. - Stop when we find backslashes followed by a newline. */ - while (*in != '\0') - if (*in == '\\') - { - p = in + 1; - while (*p == '\\') - ++p; - if (*p == '\n') - { - in = p; - break; - } - while (in < p) - *out++ = *in++; - } - else - *out++ = *in++; - } - - *out = '\0'; -} - - -/* Remove comments from LINE. - This is done by copying the text at LINE onto itself. */ - -void -remove_comments (line) - char *line; -{ - char *comment; - - comment = find_char_unquote (line, "#", 0); - - if (comment != 0) - /* Cut off the line at the #. */ - *comment = '\0'; -} - -/* Print N spaces (used by DEBUGPR for target-depth). */ - -void -print_spaces (n) - register unsigned int n; -{ - while (n-- > 0) - putchar (' '); -} - - -/* Return a newly-allocated string whose contents - concatenate those of s1, s2, s3. */ - -char * -concat (s1, s2, s3) - register char *s1, *s2, *s3; -{ - register unsigned int len1, len2, len3; - register char *result; - - len1 = *s1 != '\0' ? strlen (s1) : 0; - len2 = *s2 != '\0' ? strlen (s2) : 0; - len3 = *s3 != '\0' ? strlen (s3) : 0; - - result = (char *) xmalloc (len1 + len2 + len3 + 1); - - if (*s1 != '\0') - bcopy (s1, result, len1); - if (*s2 != '\0') - bcopy (s2, result + len1, len2); - if (*s3 != '\0') - bcopy (s3, result + len1 + len2, len3); - *(result + len1 + len2 + len3) = '\0'; - - return result; -} - -/* Print a message on stdout. */ - -void -message (s1, s2, s3, s4, s5, s6) - char *s1, *s2, *s3, *s4, *s5, *s6; -{ - if (makelevel == 0) - printf ("%s: ", program); - else - printf ("%s[%u]: ", program, makelevel); - printf (s1, s2, s3, s4, s5, s6); - putchar ('\n'); - fflush (stdout); -} - -/* Print an error message and exit. */ - -/* VARARGS1 */ -void -fatal (s1, s2, s3, s4, s5, s6) - char *s1, *s2, *s3, *s4, *s5, *s6; -{ - if (makelevel == 0) - fprintf (stderr, "%s: *** ", program); - else - fprintf (stderr, "%s[%u]: *** ", program, makelevel); - fprintf (stderr, s1, s2, s3, s4, s5, s6); - fputs (". Stop.\n", stderr); - - die (2); -} - -/* Print error message. `s1' is printf control string, `s2' is arg for it. */ - -/* VARARGS1 */ - -void -error (s1, s2, s3, s4, s5, s6) - char *s1, *s2, *s3, *s4, *s5, *s6; -{ - if (makelevel == 0) - fprintf (stderr, "%s: ", program); - else - fprintf (stderr, "%s[%u]: ", program, makelevel); - fprintf (stderr, s1, s2, s3, s4, s5, s6); - putc ('\n', stderr); - fflush (stderr); -} - -void -makefile_error (file, lineno, s1, s2, s3, s4, s5, s6) - char *file; - unsigned int lineno; - char *s1, *s2, *s3, *s4, *s5, *s6; -{ - fprintf (stderr, "%s:%u: ", file, lineno); - fprintf (stderr, s1, s2, s3, s4, s5, s6); - putc ('\n', stderr); - fflush (stderr); -} - -void -makefile_fatal (file, lineno, s1, s2, s3, s4, s5, s6) - char *file; - unsigned int lineno; - char *s1, *s2, *s3, *s4, *s5, *s6; -{ - fprintf (stderr, "%s:%u: *** ", file, lineno); - fprintf (stderr, s1, s2, s3, s4, s5, s6); - fputs (". Stop.\n", stderr); - - die (2); -} - -#ifndef HAVE_STRERROR - -#undef strerror - -char * -strerror (errnum) - int errnum; -{ - extern int errno, sys_nerr; - extern char *sys_errlist[]; - static char buf[] = "Unknown error 12345678901234567890"; - - if (errno < sys_nerr) - return sys_errlist[errnum]; - - sprintf (buf, "Unknown error %d", errnum); - return buf; -} -#endif - -/* Print an error message from errno. */ - -void -perror_with_name (str, name) - char *str, *name; -{ - error ("%s%s: %s", str, name, strerror (errno)); -} - -/* Print an error message from errno and exit. */ - -void -pfatal_with_name (name) - char *name; -{ - fatal ("%s: %s", name, strerror (errno)); - - /* NOTREACHED */ -} - -/* Like malloc but get fatal error if memory is exhausted. */ - -#undef xmalloc -#undef xrealloc - -char * -xmalloc (size) - unsigned int size; -{ - char *result = (char *) malloc (size); - if (result == 0) - fatal ("virtual memory exhausted"); - return result; -} - - -char * -xrealloc (ptr, size) - char *ptr; - unsigned int size; -{ - char *result = (char *) realloc (ptr, size); - if (result == 0) - fatal ("virtual memory exhausted"); - return result; -} - -char * -savestring (str, length) - char *str; - unsigned int length; -{ - register char *out = (char *) xmalloc (length + 1); - if (length > 0) - bcopy (str, out, length); - out[length] = '\0'; - return out; -} - -/* Search string BIG (length BLEN) for an occurrence of - string SMALL (length SLEN). Return a pointer to the - beginning of the first occurrence, or return nil if none found. */ - -char * -sindex (big, blen, small, slen) - char *big; - unsigned int blen; - char *small; - unsigned int slen; -{ - register unsigned int b; - - if (blen < 1) - blen = strlen (big); - if (slen < 1) - slen = strlen (small); - - for (b = 0; b < blen; ++b) - if (big[b] == *small && !strncmp (&big[b + 1], small + 1, slen - 1)) - return (&big[b]); - - return 0; -} - -/* Limited INDEX: - Search through the string STRING, which ends at LIMIT, for the character C. - Returns a pointer to the first occurrence, or nil if none is found. - Like INDEX except that the string searched ends where specified - instead of at the first null. */ - -char * -lindex (s, limit, c) - register char *s, *limit; - int c; -{ - while (s < limit) - if (*s++ == c) - return s - 1; - - return 0; -} - -/* Return the address of the first whitespace or null in the string S. */ - -char * -end_of_token (s) - char *s; -{ - while (*s != '\0' && !isblank (*s)) - ++s; - return s; -} - -/* Return the address of the first nonwhitespace or null in the string S. */ - -char * -next_token (s) - char *s; -{ - register char *p = s; - - while (isblank (*p)) - ++p; - return p; -} - -/* Find the next token in PTR; return the address of it, and store the - length of the token into *LENGTHPTR if LENGTHPTR is not nil. */ - -char * -find_next_token (ptr, lengthptr) - char **ptr; - unsigned int *lengthptr; -{ - char *p = next_token (*ptr); - char *end; - - if (*p == '\0') - return 0; - - *ptr = end = end_of_token (p); - if (lengthptr != 0) - *lengthptr = end - p; - return p; -} - -/* Copy a chain of `struct dep', making a new chain - with the same contents as the old one. */ - -struct dep * -copy_dep_chain (d) - register struct dep *d; -{ - register struct dep *c; - struct dep *firstnew = 0; - struct dep *lastnew; - - while (d != 0) - { - c = (struct dep *) xmalloc (sizeof (struct dep)); - bcopy ((char *) d, (char *) c, sizeof (struct dep)); - if (c->name != 0) - c->name = savestring (c->name, strlen (c->name)); - c->next = 0; - if (firstnew == 0) - firstnew = lastnew = c; - else - lastnew = lastnew->next = c; - - d = d->next; - } - - return firstnew; -} - -#ifdef iAPX286 -/* The losing compiler on this machine can't handle this macro. */ - -char * -dep_name (dep) - struct dep *dep; -{ - return dep->name == 0 ? dep->file->name : dep->name; -} -#endif - -#ifdef GETLOADAVG_PRIVILEGED - -#ifdef POSIX - -/* Hopefully if a system says it's POSIX.1 and has the setuid and setgid - functions, they work as POSIX.1 says. Some systems (Alpha OSF/1 1.2, - for example) which claim to be POSIX.1 also have the BSD setreuid and - setregid functions, but they don't work as in BSD and only the POSIX.1 - way works. */ - -#undef HAVE_SETREUID -#undef HAVE_SETREGID - -#else /* Not POSIX. */ - -/* Some POSIX.1 systems have the seteuid and setegid functions. In a - POSIX-like system, they are the best thing to use. However, some - non-POSIX systems have them too but they do not work in the POSIX style - and we must use setreuid and setregid instead. */ - -#undef HAVE_SETEUID -#undef HAVE_SETEGID - -#endif /* POSIX. */ - -#ifndef HAVE_UNISTD_H -extern int getuid (), getgid (), geteuid (), getegid (); -extern int setuid (), setgid (); -#ifdef HAVE_SETEUID -extern int seteuid (); -#else -#ifdef HAVE_SETREUID -extern int setreuid (); -#endif /* Have setreuid. */ -#endif /* Have seteuid. */ -#ifdef HAVE_SETEGID -extern int setegid (); -#else -#ifdef HAVE_SETREGID -extern int setregid (); -#endif /* Have setregid. */ -#endif /* Have setegid. */ -#endif /* No . */ - -/* Keep track of the user and group IDs for user- and make- access. */ -static int user_uid = -1, user_gid = -1, make_uid = -1, make_gid = -1; -#define access_inited (user_uid != -1) -static enum { make, user } current_access; - - -/* Under -d, write a message describing the current IDs. */ - -static void -log_access (flavor) - char *flavor; -{ - if (! debug_flag) - return; - - /* All the other debugging messages go to stdout, - but we write this one to stderr because it might be - run in a child fork whose stdout is piped. */ - - fprintf (stderr, "%s access: user %d (real %d), group %d (real %d)\n", - flavor, geteuid (), getuid (), getegid (), getgid ()); - fflush (stderr); -} - - -static void -init_access () -{ - user_uid = getuid (); - user_gid = getgid (); - - make_uid = geteuid (); - make_gid = getegid (); - - /* Do these ever fail? */ - if (user_uid == -1 || user_gid == -1 || make_uid == -1 || make_gid == -1) - pfatal_with_name ("get{e}[gu]id"); - - log_access ("Initialized"); - - current_access = make; -} - -#endif /* GETLOADAVG_PRIVILEGED */ - -/* Give the process appropriate permissions for access to - user data (i.e., to stat files, or to spawn a child process). */ -void -user_access () -{ -#ifdef GETLOADAVG_PRIVILEGED - - if (!access_inited) - init_access (); - - if (current_access == user) - return; - - /* We are in "make access" mode. This means that the effective user and - group IDs are those of make (if it was installed setuid or setgid). - We now want to set the effective user and group IDs to the real IDs, - which are the IDs of the process that exec'd make. */ - -#ifdef HAVE_SETEUID - - /* Modern systems have the seteuid/setegid calls which set only the - effective IDs, which is ideal. */ - - if (seteuid (user_uid) < 0) - pfatal_with_name ("user_access: seteuid"); - -#else /* Not HAVE_SETEUID. */ - -#ifndef HAVE_SETREUID - - /* System V has only the setuid/setgid calls to set user/group IDs. - There is an effective ID, which can be set by setuid/setgid. - It can be set (unless you are root) only to either what it already is - (returned by geteuid/getegid, now in make_uid/make_gid), - the real ID (return by getuid/getgid, now in user_uid/user_gid), - or the saved set ID (what the effective ID was before this set-ID - executable (make) was exec'd). */ - - if (setuid (user_uid) < 0) - pfatal_with_name ("user_access: setuid"); - -#else /* HAVE_SETREUID. */ - - /* In 4BSD, the setreuid/setregid calls set both the real and effective IDs. - They may be set to themselves or each other. So you have two alternatives - at any one time. If you use setuid/setgid, the effective will be set to - the real, leaving only one alternative. Using setreuid/setregid, however, - you can toggle between your two alternatives by swapping the values in a - single setreuid or setregid call. */ - - if (setreuid (make_uid, user_uid) < 0) - pfatal_with_name ("user_access: setreuid"); - -#endif /* Not HAVE_SETREUID. */ -#endif /* HAVE_SETEUID. */ - -#ifdef HAVE_SETEGID - if (setegid (user_gid) < 0) - pfatal_with_name ("user_access: setegid"); -#else -#ifndef HAVE_SETREGID - if (setgid (user_gid) < 0) - pfatal_with_name ("user_access: setgid"); -#else - if (setregid (make_gid, user_gid) < 0) - pfatal_with_name ("user_access: setregid"); -#endif -#endif - - current_access = user; - - log_access ("User"); - -#endif /* GETLOADAVG_PRIVILEGED */ -} - -/* Give the process appropriate permissions for access to - make data (i.e., the load average). */ -void -make_access () -{ -#ifdef GETLOADAVG_PRIVILEGED - - if (!access_inited) - init_access (); - - if (current_access == make) - return; - - /* See comments in user_access, above. */ - -#ifdef HAVE_SETEUID - if (seteuid (make_uid) < 0) - pfatal_with_name ("make_access: seteuid"); -#else -#ifndef HAVE_SETREUID - if (setuid (make_uid) < 0) - pfatal_with_name ("make_access: setuid"); -#else - if (setreuid (user_uid, make_uid) < 0) - pfatal_with_name ("make_access: setreuid"); -#endif -#endif - -#ifdef HAVE_SETEGID - if (setegid (make_gid) < 0) - pfatal_with_name ("make_access: setegid"); -#else -#ifndef HAVE_SETREGID - if (setgid (make_gid) < 0) - pfatal_with_name ("make_access: setgid"); -#else - if (setregid (user_gid, make_gid) < 0) - pfatal_with_name ("make_access: setregid"); -#endif -#endif - - current_access = make; - - log_access ("Make"); - -#endif /* GETLOADAVG_PRIVILEGED */ -} - -/* Give the process appropriate permissions for a child process. - This is like user_access, but you can't get back to make_access. */ -void -child_access () -{ -#ifdef GETLOADAVG_PRIVILEGED - - if (!access_inited) - abort (); - - /* Set both the real and effective UID and GID to the user's. - They cannot be changed back to make's. */ - -#ifndef HAVE_SETREUID - if (setuid (user_uid) < 0) - pfatal_with_name ("child_access: setuid"); -#else - if (setreuid (user_uid, user_uid) < 0) - pfatal_with_name ("child_access: setreuid"); -#endif - -#ifndef HAVE_SETREGID - if (setgid (user_gid) < 0) - pfatal_with_name ("child_access: setgid"); -#else - if (setregid (user_gid, user_gid) < 0) - pfatal_with_name ("child_access: setregid"); -#endif - - log_access ("Child"); - -#endif /* GETLOADAVG_PRIVILEGED */ -} - -#ifdef NEED_GET_PATH_MAX -unsigned int -get_path_max () -{ - static unsigned int value; - - if (value == 0) - { - long int x = pathconf ("/", _PC_PATH_MAX); - if (x > 0) - value = x; - else - return MAXPATHLEN; - } - - return value; -} -#endif - -/* On some systems, stat can return EINTR. */ - -int -safe_stat (name, buf) - char *name; - struct stat *buf; -{ - int ret; - -#ifdef EINTR - do -#endif - ret = stat (name, buf); -#ifdef EINTR - while (ret < 0 && errno == EINTR); -#endif - - return ret; -} diff --git a/buildtools/windows/source/make/mkinstalldirs b/buildtools/windows/source/make/mkinstalldirs deleted file mode 100644 index 0801ec2c966..00000000000 --- a/buildtools/windows/source/make/mkinstalldirs +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Last modified: 1994-03-25 -# Public domain - -errstatus=0 - -for file in ${1+"$@"} ; do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d in ${1+"$@"} ; do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" || errstatus=$? - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/buildtools/windows/source/make/read.c b/buildtools/windows/source/make/read.c deleted file mode 100644 index 026c892739e..00000000000 --- a/buildtools/windows/source/make/read.c +++ /dev/null @@ -1,2069 +0,0 @@ -/* Reading and parsing of makefiles for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "dep.h" -#include "file.h" -#include "variable.h" - -/* This is POSIX.2, but most systems using -DPOSIX probably don't have it. */ -#ifdef HAVE_GLOB_H -#include -#else -#include "glob/glob.h" -#endif - -#ifndef NETSCAPE -#include -struct passwd *getpwnam (); -#endif - -static int read_makefile (); -static unsigned int readline (), do_define (); -static int conditional_line (); -static void record_files (); -static char *find_semicolon (); - - -/* A `struct linebuffer' is a structure which holds a line of text. - `readline' reads a line from a stream into a linebuffer - and works regardless of the length of the line. */ - -struct linebuffer - { - /* Note: This is the number of bytes malloc'ed for `buffer' - It does not indicate `buffer's real length. - Instead, a null char indicates end-of-string. */ - unsigned int size; - char *buffer; - }; - -#define initbuffer(lb) (lb)->buffer = (char *) xmalloc ((lb)->size = 200) -#define freebuffer(lb) free ((lb)->buffer) - - -/* A `struct conditionals' contains the information describing - all the active conditionals in a makefile. - - The global variable `conditionals' contains the conditionals - information for the current makefile. It is initialized from - the static structure `toplevel_conditionals' and is later changed - to new structures for included makefiles. */ - -struct conditionals - { - unsigned int if_cmds; /* Depth of conditional nesting. */ - unsigned int allocated; /* Elts allocated in following arrays. */ - char *ignoring; /* Are we ignoring or interepreting? */ - char *seen_else; /* Have we already seen an `else'? */ - }; - -static struct conditionals toplevel_conditionals; -static struct conditionals *conditionals = &toplevel_conditionals; - - -/* Default directories to search for include files in */ - -static char *default_include_directories[] = - { -#ifndef NETSCAPE - INCLUDEDIR, - "/usr/gnu/include", - "/usr/local/include", - "/usr/include", -#endif - 0 - }; - -/* List of directories to search for include files in */ - -static char **include_directories; - -/* Maximum length of an element of the above. */ - -static unsigned int max_incl_len; - -/* The filename and pointer to line number of the - makefile currently being read in. */ - -char *reading_filename; -unsigned int *reading_lineno_ptr; - -/* The chain of makefiles read by read_makefile. */ - -static struct dep *read_makefiles = 0; - -/* Read in all the makefiles and return the chain of their names. */ - -struct dep * -read_all_makefiles (makefiles) - char **makefiles; -{ - unsigned int num_makefiles = 0; - - if (debug_flag) - puts ("Reading makefiles..."); - - /* If there's a non-null variable MAKEFILES, its value is a list of - files to read first thing. But don't let it prevent reading the - default makefiles and don't let the default goal come from there. */ - - { - char *value; - char *name, *p; - unsigned int length; - - { - /* Turn off --warn-undefined-variables while we expand MAKEFILES. */ - int save = warn_undefined_variables_flag; - warn_undefined_variables_flag = 0; - - value = allocated_variable_expand ("$(MAKEFILES)"); - - warn_undefined_variables_flag = save; - } - - /* Set NAME to the start of next token and LENGTH to its length. - MAKEFILES is updated for finding remaining tokens. */ - p = value; - while ((name = find_next_token (&p, &length)) != 0) - { - if (*p != '\0') - *p++ = '\0'; - (void) read_makefile (name, - RM_NO_DEFAULT_GOAL | RM_INCLUDED | RM_DONTCARE); - } - - free (value); - } - - /* Read makefiles specified with -f switches. */ - - if (makefiles != 0) - while (*makefiles != 0) - { - struct dep *tail = read_makefiles; - register struct dep *d; - - if (! read_makefile (*makefiles, 0)) - perror_with_name ("", *makefiles); - - /* Find the right element of read_makefiles. */ - d = read_makefiles; - while (d->next != tail) - d = d->next; - - /* Use the storage read_makefile allocates. */ - *makefiles = dep_name (d); - ++num_makefiles; - ++makefiles; - } - - /* If there were no -f switches, try the default names. */ - - if (num_makefiles == 0) - { - static char *default_makefiles[] = - { "GNUmakefile", "makefile", "Makefile", 0 }; - register char **p = default_makefiles; - while (*p != 0 && !file_exists_p (*p)) - ++p; - - if (*p != 0) - { - if (! read_makefile (*p, 0)) - perror_with_name ("", *p); - } - else - { - /* No default makefile was found. Add the default makefiles to the - `read_makefiles' chain so they will be updated if possible. */ - struct dep *tail = read_makefiles; - for (p = default_makefiles; *p != 0; ++p) - { - struct dep *d = (struct dep *) xmalloc (sizeof (struct dep)); - d->name = 0; - d->file = enter_file (*p); - d->file->dontcare = 1; - /* Tell update_goal_chain to bail out as soon as this file is - made, and main not to die if we can't make this file. */ - d->changed = RM_DONTCARE; - if (tail == 0) - read_makefiles = d; - else - tail->next = d; - tail = d; - } - if (tail != 0) - tail->next = 0; - } - } - - return read_makefiles; -} - -/* Read file FILENAME as a makefile and add its contents to the data base. - - FLAGS contains bits as above. - - FILENAME is added to the `read_makefiles' chain. - - Returns 1 if a file was found and read, 0 if not. */ - -static int -read_makefile (filename, flags) - char *filename; - int flags; -{ - static char *collapsed = 0; - static unsigned int collapsed_length = 0; - register FILE *infile; - struct linebuffer lb; - unsigned int commands_len = 200; - char *commands = (char *) xmalloc (200); - unsigned int commands_idx = 0; - unsigned int commands_started; - register char *p; - char *p2; - int ignoring = 0, in_ignored_define = 0; - int no_targets = 0; /* Set when reading a rule without targets. */ - char *passed_filename = filename; - - struct nameseq *filenames = 0; - struct dep *deps; - unsigned int lineno = 1; - unsigned int nlines = 0; - int two_colon; - char *pattern = 0, *pattern_percent; - - int makefile_errno; - -#define record_waiting_files() \ - do \ - { \ - if (filenames != 0) \ - record_files (filenames, pattern, pattern_percent, deps, \ - commands_started, commands, commands_idx, \ - two_colon, filename, lineno, \ - !(flags & RM_NO_DEFAULT_GOAL)); \ - filenames = 0; \ - commands_idx = 0; \ - pattern = 0; \ - } while (0) - -#ifdef lint /* Suppress `used before set' messages. */ - two_colon = 0; -#endif - - if (debug_flag) - { - printf ("Reading makefile `%s'", filename); - if (flags & RM_NO_DEFAULT_GOAL) - printf (" (no default goal)"); - if (flags & RM_INCLUDED) - printf (" (search path)"); - if (flags & RM_DONTCARE) - printf (" (don't care)"); - if (flags & RM_NO_TILDE) - printf (" (no ~ expansion)"); - puts ("..."); - } - - /* First, get a stream to read. */ - - /* Expand ~ in FILENAME unless it came from `include', - in which case it was already done. */ - if (!(flags & RM_NO_TILDE) && filename[0] == '~') - { - char *expanded = tilde_expand (filename); - if (expanded != 0) - filename = expanded; - } - - infile = fopen (filename, "r"); - /* Save the error code so we print the right message later. */ - makefile_errno = errno; - - /* If the makefile wasn't found and it's either a makefile from - the `MAKEFILES' variable or an included makefile, - search the included makefile search path for this makefile. */ - - if (infile == 0 && (flags & RM_INCLUDED) && *filename != '/') - { - register unsigned int i; - for (i = 0; include_directories[i] != 0; ++i) - { - char *name = concat (include_directories[i], "/", filename); - infile = fopen (name, "r"); - if (infile == 0) - free (name); - else - { - filename = name; - break; - } - } - } - - /* Add FILENAME to the chain of read makefiles. */ - deps = (struct dep *) xmalloc (sizeof (struct dep)); - deps->next = read_makefiles; - read_makefiles = deps; - deps->name = 0; - deps->file = lookup_file (filename); - if (deps->file == 0) - { - deps->file = enter_file (savestring (filename, strlen (filename))); - if (flags & RM_DONTCARE) - deps->file->dontcare = 1; - } - if (filename != passed_filename) - free (filename); - filename = deps->file->name; - deps->changed = flags; - deps = 0; - - /* If the makefile can't be found at all, give up entirely. */ - - if (infile == 0) - { - /* If we did some searching, errno has the error from the last - attempt, rather from FILENAME itself. Restore it in case the - caller wants to use it in a message. */ - errno = makefile_errno; - return 0; - } - - reading_filename = filename; - reading_lineno_ptr = &lineno; - - /* Loop over lines in the file. - The strategy is to accumulate target names in FILENAMES, dependencies - in DEPS and commands in COMMANDS. These are used to define a rule - when the start of the next rule (or eof) is encountered. */ - - initbuffer (&lb); - - while (!feof (infile)) - { - lineno += nlines; - nlines = readline (&lb, infile, filename, lineno); - - /* Check for a shell command line first. - If it is not one, we can stop treating tab specially. */ - if (lb.buffer[0] == '\t') - { - /* This line is a probably shell command. */ - unsigned int len; - - if (no_targets) - /* Ignore the commands in a rule with no targets. */ - continue; - - /* If there is no preceding rule line, don't treat this line - as a command, even though it begins with a tab character. - SunOS 4 make appears to behave this way. */ - - if (filenames != 0) - { - if (ignoring) - /* Yep, this is a shell command, and we don't care. */ - continue; - - /* Append this command line to the line being accumulated. */ - p = lb.buffer; - if (commands_idx == 0) - commands_started = lineno; - len = strlen (p); - if (len + 1 + commands_idx > commands_len) - { - commands_len = (len + 1 + commands_idx) * 2; - commands = (char *) xrealloc (commands, commands_len); - } - bcopy (p, &commands[commands_idx], len); - commands_idx += len; - commands[commands_idx++] = '\n'; - - continue; - } - } - - /* This line is not a shell command line. Don't worry about tabs. */ - - if (collapsed_length < lb.size) - { - collapsed_length = lb.size; - if (collapsed != 0) - free (collapsed); - collapsed = (char *) xmalloc (collapsed_length); - } - strcpy (collapsed, lb.buffer); - /* Collapse continuation lines. */ - collapse_continuations (collapsed); - remove_comments (collapsed); - - /* strncmp is first to avoid dereferencing out into space. */ -#define word1eq(s, l) (!strncmp (s, p, l) \ - && (p[l] == '\0' || isblank (p[l]))) - p = collapsed; - while (isspace (*p)) - ++p; - if (*p == '\0') - /* This line is completely empty. */ - continue; - - /* We must first check for conditional and `define' directives before - ignoring anything, since they control what we will do with - following lines. */ - - if (!in_ignored_define - && (word1eq ("ifdef", 5) || word1eq ("ifndef", 6) - || word1eq ("ifeq", 4) || word1eq ("ifneq", 5) - || word1eq ("else", 4) || word1eq ("endif", 5))) - { - int i = conditional_line (p, filename, lineno); - if (i >= 0) - ignoring = i; - else - makefile_fatal (filename, lineno, - "invalid syntax in conditional"); - continue; - } - else if (word1eq ("endef", 5)) - { - if (in_ignored_define) - in_ignored_define = 0; - else - makefile_fatal (filename, lineno, "extraneous `endef'"); - continue; - } - else if (word1eq ("define", 6)) - { - if (ignoring) - in_ignored_define = 1; - else - { - p2 = next_token (p + 6); - /* Let the variable name be the whole rest of the line, - with trailing blanks stripped (comments have already been - removed), so it could be a complex variable/function - reference that might contain blanks. */ - p = index (p2, '\0'); - while (isblank (p[-1])) - --p; - lineno = do_define (p2, p - p2, o_file, - lineno, infile, filename); - } - continue; - } - else if (word1eq ("override", 8)) - { - p2 = next_token (p + 8); - if (p2 == 0) - makefile_error (filename, lineno, "empty `override' directive"); - if (!strncmp (p2, "define", 6) && (isblank (p2[6]) || p2[6] == '\0')) - { - if (ignoring) - in_ignored_define = 1; - else - { - p2 = next_token (p2 + 6); - /* Let the variable name be the whole rest of the line, - with trailing blanks stripped (comments have already been - removed), so it could be a complex variable/function - reference that might contain blanks. */ - p = index (p2, '\0'); - while (isblank (p[-1])) - --p; - lineno = do_define (p2, p - p2, o_override, - lineno, infile, filename); - } - } - else if (!ignoring - && !try_variable_definition (filename, lineno, - p2, o_override)) - makefile_error (filename, lineno, "empty `override' directive"); - - continue; - } - - if (ignoring) - /* Ignore the line. We continue here so conditionals - can appear in the middle of a rule. */ - continue; - else if (word1eq ("export", 6)) - { - struct variable *v; - p2 = next_token (p + 6); - if (*p2 == '\0') - export_all_variables = 1; - v = try_variable_definition (filename, lineno, p2, o_file); - if (v != 0) - v->export = v_export; - else - { - unsigned int len; - for (p = find_next_token (&p2, &len); p != 0; - p = find_next_token (&p2, &len)) - { - v = lookup_variable (p, len); - if (v == 0) - v = define_variable (p, len, "", o_file, 0); - v->export = v_export; - } - } - } - else if (word1eq ("unexport", 8)) - { - unsigned int len; - struct variable *v; - p2 = next_token (p + 8); - if (*p2 == '\0') - export_all_variables = 0; - for (p = find_next_token (&p2, &len); p != 0; - p = find_next_token (&p2, &len)) - { - v = lookup_variable (p, len); - if (v == 0) - v = define_variable (p, len, "", o_file, 0); - v->export = v_noexport; - } - } - else if (word1eq ("include", 7) || word1eq ("-include", 8)) - { - /* We have found an `include' line specifying a nested - makefile to be read at this point. */ - struct conditionals *save, new_conditionals; - struct nameseq *files; - /* "-include" (vs "include") says no - error if the file does not exist. */ - int noerror = p[0] == '-'; - - p = allocated_variable_expand (next_token (p + (noerror ? 9 : 8))); - if (*p == '\0') - { - makefile_error (filename, lineno, - "no file name for `%sinclude'", - noerror ? "-" : ""); - continue; - } - - /* Parse the list of file names. */ - p2 = p; - files = multi_glob (parse_file_seq (&p2, '\0', - sizeof (struct nameseq), - 1), - sizeof (struct nameseq)); - free (p); - - /* Save the state of conditionals and start - the included makefile with a clean slate. */ - save = conditionals; - bzero ((char *) &new_conditionals, sizeof new_conditionals); - conditionals = &new_conditionals; - - /* Record the rules that are waiting so they will determine - the default goal before those in the included makefile. */ - record_waiting_files (); - - /* Read each included makefile. */ - while (files != 0) - { - struct nameseq *next = files->next; - char *name = files->name; - free (files); - files = next; - - if (! read_makefile (name, (RM_INCLUDED | RM_NO_TILDE - | (noerror ? RM_DONTCARE : 0))) - && ! noerror) - makefile_error (filename, lineno, - "%s: %s", name, strerror (errno)); - } - - /* Free any space allocated by conditional_line. */ - if (conditionals->ignoring) - free (conditionals->ignoring); - if (conditionals->seen_else) - free (conditionals->seen_else); - - /* Restore state. */ - conditionals = save; - reading_filename = filename; - reading_lineno_ptr = &lineno; - } - else if (word1eq ("vpath", 5)) - { - char *pattern; - unsigned int len; - p2 = variable_expand (p + 5); - p = find_next_token (&p2, &len); - if (p != 0) - { - pattern = savestring (p, len); - p = find_next_token (&p2, &len); - /* No searchpath means remove all previous - selective VPATH's with the same pattern. */ - } - else - /* No pattern means remove all previous selective VPATH's. */ - pattern = 0; - construct_vpath_list (pattern, p); - if (pattern != 0) - free (pattern); - } -#undef word1eq - else if (try_variable_definition (filename, lineno, p, o_file)) - /* This line has been dealt with. */ - ; - else if (lb.buffer[0] == '\t') - { - p = collapsed; /* Ignore comments. */ - while (isblank (*p)) - ++p; - if (*p == '\0') - /* The line is completely blank; that is harmless. */ - continue; - /* This line starts with a tab but was not caught above - because there was no preceding target, and the line - might have been usable as a variable definition. - But now it is definitely lossage. */ - makefile_fatal (filename, lineno, - "commands commence before first target"); - } - else - { - /* This line describes some target files. */ - - char *cmdleft; - - /* Record the previous rule. */ - - record_waiting_files (); - - /* Look for a semicolon in the unexpanded line. */ - cmdleft = find_semicolon (lb.buffer); - if (cmdleft != 0) - /* Found one. Cut the line short there before expanding it. */ - *cmdleft = '\0'; - - collapse_continuations (lb.buffer); - - /* Expand variable and function references before doing anything - else so that special characters can be inside variables. */ - p = variable_expand (lb.buffer); - - if (cmdleft == 0) - /* Look for a semicolon in the expanded line. */ - cmdleft = find_semicolon (p); - - if (cmdleft != 0) - /* Cut the line short at the semicolon. */ - *cmdleft = '\0'; - - /* Remove comments from the line. */ - remove_comments (p); - - p2 = next_token (p); - if (*p2 == '\0') - { - if (cmdleft != 0) - makefile_fatal (filename, lineno, - "missing rule before commands"); - else - /* This line contained a variable reference that - expanded to nothing but whitespace. */ - continue; - } - else if (*p2 == ':') - { - /* We accept and ignore rules without targets for - compatibility with SunOS 4 make. */ - no_targets = 1; - continue; - } - - filenames = multi_glob (parse_file_seq (&p2, ':', - sizeof (struct nameseq), - 1), - sizeof (struct nameseq)); - if (*p2++ == '\0') - makefile_fatal (filename, lineno, "missing separator"); - /* Is this a one-colon or two-colon entry? */ - two_colon = *p2 == ':'; - if (two_colon) - p2++; - - /* We have some targets, so don't ignore the following commands. */ - no_targets = 0; - - /* Is this a static pattern rule: `target: %targ: %dep; ...'? */ - p = index (p2, ':'); - while (p != 0 && p[-1] == '\\') - { - register char *q = &p[-1]; - register int backslash = 0; - while (*q-- == '\\') - backslash = !backslash; - if (backslash) - p = index (p + 1, ':'); - else - break; - } -#if defined(__MSDOS__) || defined(NETSCAPE) - /* For MS-DOS and WIN32, skip a "C:\..." or a "C:/...". */ - while (p != 0 && (p[1] == '\\' || p[1] == '/') - && isalpha (p[-1]) && (p[-2] == ':' || isspace (p[-2]))) - p = index (p + 1, ':'); -#endif - if (p != 0) - { - struct nameseq *target; - target = parse_file_seq (&p2, ':', sizeof (struct nameseq), 1); - ++p2; - if (target == 0) - makefile_fatal (filename, lineno, "missing target pattern"); - else if (target->next != 0) - makefile_fatal (filename, lineno, "multiple target patterns"); - pattern = target->name; - pattern_percent = find_percent (pattern); - if (pattern_percent == 0) - makefile_fatal (filename, lineno, - "target pattern contains no `%%'"); - } - else - pattern = 0; - - /* Parse the dependencies. */ - deps = (struct dep *) - multi_glob (parse_file_seq (&p2, '\0', sizeof (struct dep), 1), - sizeof (struct dep)); - - commands_idx = 0; - if (cmdleft != 0) - { - /* Semicolon means rest of line is a command. */ - unsigned int len = strlen (cmdleft + 1); - - commands_started = lineno; - - /* Add this command line to the buffer. */ - if (len + 2 > commands_len) - { - commands_len = (len + 2) * 2; - commands = (char *) xrealloc (commands, commands_len); - } - bcopy (cmdleft + 1, commands, len); - commands_idx += len; - commands[commands_idx++] = '\n'; - } - - continue; - } - - /* We get here except in the case that we just read a rule line. - Record now the last rule we read, so following spurious - commands are properly diagnosed. */ - record_waiting_files (); - no_targets = 0; - } - - if (conditionals->if_cmds) - makefile_fatal (filename, lineno, "missing `endif'"); - - /* At eof, record the last rule. */ - record_waiting_files (); - - freebuffer (&lb); - free ((char *) commands); - fclose (infile); - - reading_filename = 0; - reading_lineno_ptr = 0; - - return 1; -} - -/* Execute a `define' directive. - The first line has already been read, and NAME is the name of - the variable to be defined. The following lines remain to be read. - LINENO, INFILE and FILENAME refer to the makefile being read. - The value returned is LINENO, updated for lines read here. */ - -static unsigned int -do_define (name, namelen, origin, lineno, infile, filename) - char *name; - unsigned int namelen; - enum variable_origin origin; - unsigned int lineno; - FILE *infile; - char *filename; -{ - struct linebuffer lb; - unsigned int nlines = 0; - unsigned int length = 100; - char *definition = (char *) xmalloc (100); - register unsigned int idx = 0; - register char *p; - - /* Expand the variable name. */ - char *var = (char *) alloca (namelen + 1); - bcopy (name, var, namelen); - var[namelen] = '\0'; - var = variable_expand (var); - - initbuffer (&lb); - while (!feof (infile)) - { - lineno += nlines; - nlines = readline (&lb, infile, filename, lineno); - - collapse_continuations (lb.buffer); - - p = next_token (lb.buffer); - if ((p[5] == '\0' || isblank (p[5])) && !strncmp (p, "endef", 5)) - { - p += 5; - remove_comments (p); - if (*next_token (p) != '\0') - makefile_error (filename, lineno, - "Extraneous text after `endef' directive"); - /* Define the variable. */ - if (idx == 0) - definition[0] = '\0'; - else - definition[idx - 1] = '\0'; - (void) define_variable (var, strlen (var), definition, origin, 1); - free (definition); - freebuffer (&lb); - return lineno; - } - else - { - unsigned int len = strlen (lb.buffer); - - /* Increase the buffer size if necessary. */ - if (idx + len + 1 > length) - { - length = (idx + len) * 2; - definition = (char *) xrealloc (definition, length + 1); - } - - bcopy (lb.buffer, &definition[idx], len); - idx += len; - /* Separate lines with a newline. */ - definition[idx++] = '\n'; - } - } - - /* No `endef'!! */ - makefile_fatal (filename, lineno, "missing `endef', unterminated `define'"); - - /* NOTREACHED */ - return 0; -} - -/* Interpret conditional commands "ifdef", "ifndef", "ifeq", - "ifneq", "else" and "endif". - LINE is the input line, with the command as its first word. - - FILENAME and LINENO are the filename and line number in the - current makefile. They are used for error messages. - - Value is -1 if the line is invalid, - 0 if following text should be interpreted, - 1 if following text should be ignored. */ - -static int -conditional_line (line, filename, lineno) - char *line; - char *filename; - unsigned int lineno; -{ - int notdef; - char *cmdname; - register unsigned int i; - - if (*line == 'i') - { - /* It's an "if..." command. */ - notdef = line[2] == 'n'; - if (notdef) - { - cmdname = line[3] == 'd' ? "ifndef" : "ifneq"; - line += cmdname[3] == 'd' ? 7 : 6; - } - else - { - cmdname = line[2] == 'd' ? "ifdef" : "ifeq"; - line += cmdname[2] == 'd' ? 6 : 5; - } - } - else - { - /* It's an "else" or "endif" command. */ - notdef = line[1] == 'n'; - cmdname = notdef ? "endif" : "else"; - line += notdef ? 5 : 4; - } - - line = next_token (line); - - if (*cmdname == 'e') - { - if (*line != '\0') - makefile_error (filename, lineno, - "Extraneous text after `%s' directive", - cmdname); - /* "Else" or "endif". */ - if (conditionals->if_cmds == 0) - makefile_fatal (filename, lineno, "extraneous `%s'", cmdname); - /* NOTDEF indicates an `endif' command. */ - if (notdef) - --conditionals->if_cmds; - else if (conditionals->seen_else[conditionals->if_cmds - 1]) - makefile_fatal (filename, lineno, "only one `else' per conditional"); - else - { - /* Toggle the state of ignorance. */ - conditionals->ignoring[conditionals->if_cmds - 1] - = !conditionals->ignoring[conditionals->if_cmds - 1]; - /* Record that we have seen an `else' in this conditional. - A second `else' will be erroneous. */ - conditionals->seen_else[conditionals->if_cmds - 1] = 1; - } - for (i = 0; i < conditionals->if_cmds; ++i) - if (conditionals->ignoring[i]) - return 1; - return 0; - } - - if (conditionals->allocated == 0) - { - conditionals->allocated = 5; - conditionals->ignoring = (char *) xmalloc (conditionals->allocated); - conditionals->seen_else = (char *) xmalloc (conditionals->allocated); - } - - ++conditionals->if_cmds; - if (conditionals->if_cmds > conditionals->allocated) - { - conditionals->allocated += 5; - conditionals->ignoring = (char *) - xrealloc (conditionals->ignoring, conditionals->allocated); - conditionals->seen_else = (char *) - xrealloc (conditionals->seen_else, conditionals->allocated); - } - - /* Record that we have seen an `if...' but no `else' so far. */ - conditionals->seen_else[conditionals->if_cmds - 1] = 0; - - /* Search through the stack to see if we're already ignoring. */ - for (i = 0; i < conditionals->if_cmds - 1; ++i) - if (conditionals->ignoring[i]) - { - /* We are already ignoring, so just push a level - to match the next "else" or "endif", and keep ignoring. - We don't want to expand variables in the condition. */ - conditionals->ignoring[conditionals->if_cmds - 1] = 1; - return 1; - } - - if (cmdname[notdef ? 3 : 2] == 'd') - { - /* "Ifdef" or "ifndef". */ - struct variable *v; - register char *p = end_of_token (line); - i = p - line; - p = next_token (p); - if (*p != '\0') - return -1; - v = lookup_variable (line, i); - conditionals->ignoring[conditionals->if_cmds - 1] - = (v != 0 && *v->value != '\0') == notdef; - } - else - { - /* "Ifeq" or "ifneq". */ - char *s1, *s2; - unsigned int len; - char termin = *line == '(' ? ',' : *line; - - if (termin != ',' && termin != '"' && termin != '\'') - return -1; - - s1 = ++line; - /* Find the end of the first string. */ - if (termin == ',') - { - register int count = 0; - for (; *line != '\0'; ++line) - if (*line == '(') - ++count; - else if (*line == ')') - --count; - else if (*line == ',' && count <= 0) - break; - } - else - while (*line != '\0' && *line != termin) - ++line; - - if (*line == '\0') - return -1; - - *line++ = '\0'; - - s2 = variable_expand (s1); - /* We must allocate a new copy of the expanded string because - variable_expand re-uses the same buffer. */ - len = strlen (s2); - s1 = (char *) alloca (len + 1); - bcopy (s2, s1, len + 1); - - if (termin != ',') - /* Find the start of the second string. */ - line = next_token (line); - - termin = termin == ',' ? ')' : *line; - if (termin != ')' && termin != '"' && termin != '\'') - return -1; - - /* Find the end of the second string. */ - if (termin == ')') - { - register int count = 0; - s2 = next_token (line); - for (line = s2; *line != '\0'; ++line) - { - if (*line == '(') - ++count; - else if (*line == ')') - if (count <= 0) - break; - else - --count; - } - } - else - { - ++line; - s2 = line; - while (*line != '\0' && *line != termin) - ++line; - } - - if (*line == '\0') - return -1; - - *line = '\0'; - line = next_token (++line); - if (*line != '\0') - makefile_error (filename, lineno, - "Extraneous text after `%s' directive", - cmdname); - - s2 = variable_expand (s2); - conditionals->ignoring[conditionals->if_cmds - 1] - = streq (s1, s2) == notdef; - } - - /* Search through the stack to see if we're ignoring. */ - for (i = 0; i < conditionals->if_cmds; ++i) - if (conditionals->ignoring[i]) - return 1; - return 0; -} - -/* Remove duplicate dependencies in CHAIN. */ - -void -uniquize_deps (chain) - struct dep *chain; -{ - register struct dep *d; - - /* Make sure that no dependencies are repeated. This does not - really matter for the purpose of updating targets, but it - might make some names be listed twice for $^ and $?. */ - - for (d = chain; d != 0; d = d->next) - { - struct dep *last, *next; - - last = d; - next = d->next; - while (next != 0) - if (streq (dep_name (d), dep_name (next))) - { - struct dep *n = next->next; - last->next = n; - if (next->name != 0 && next->name != d->name) - free (next->name); - if (next != d) - free ((char *) next); - next = n; - } - else - { - last = next; - next = next->next; - } - } -} - -/* Record a description line for files FILENAMES, - with dependencies DEPS, commands to execute described - by COMMANDS and COMMANDS_IDX, coming from FILENAME:COMMANDS_STARTED. - TWO_COLON is nonzero if a double colon was used. - If not nil, PATTERN is the `%' pattern to make this - a static pattern rule, and PATTERN_PERCENT is a pointer - to the `%' within it. - - The links of FILENAMES are freed, and so are any names in it - that are not incorporated into other data structures. */ - -static void -record_files (filenames, pattern, pattern_percent, deps, commands_started, - commands, commands_idx, two_colon, filename, lineno, set_default) - struct nameseq *filenames; - char *pattern, *pattern_percent; - struct dep *deps; - unsigned int commands_started; - char *commands; - unsigned int commands_idx; - int two_colon; - char *filename; - unsigned int lineno; - int set_default; -{ - struct nameseq *nextf; - int implicit = 0; - unsigned int max_targets, target_idx; - char **targets = 0, **target_percents = 0; - struct commands *cmds; - - if (commands_idx > 0) - { - cmds = (struct commands *) xmalloc (sizeof (struct commands)); - cmds->filename = filename; - cmds->lineno = commands_started; - cmds->commands = savestring (commands, commands_idx); - cmds->command_lines = 0; - } - else - cmds = 0; - - for (; filenames != 0; filenames = nextf) - { - register char *name = filenames->name; - register struct file *f; - register struct dep *d; - struct dep *this; - char *implicit_percent; - - nextf = filenames->next; - free ((char *) filenames); - - implicit_percent = find_percent (name); - implicit |= implicit_percent != 0; - - if (implicit && pattern != 0) - makefile_fatal (filename, lineno, - "mixed implicit and static pattern rules"); - - if (implicit && implicit_percent == 0) - makefile_fatal (filename, lineno, "mixed implicit and normal rules"); - - if (implicit) - { - if (targets == 0) - { - max_targets = 5; - targets = (char **) xmalloc (5 * sizeof (char *)); - target_percents = (char **) xmalloc (5 * sizeof (char *)); - target_idx = 0; - } - else if (target_idx == max_targets - 1) - { - max_targets += 5; - targets = (char **) xrealloc ((char *) targets, - max_targets * sizeof (char *)); - target_percents - = (char **) xrealloc ((char *) target_percents, - max_targets * sizeof (char *)); - } - targets[target_idx] = name; - target_percents[target_idx] = implicit_percent; - ++target_idx; - continue; - } - - /* If there are multiple filenames, copy the chain DEPS - for all but the last one. It is not safe for the same deps - to go in more than one place in the data base. */ - this = nextf != 0 ? copy_dep_chain (deps) : deps; - - if (pattern != 0) - /* If this is an extended static rule: - `targets: target%pattern: dep%pattern; cmds', - translate each dependency pattern into a plain filename - using the target pattern and this target's name. */ - if (!pattern_matches (pattern, pattern_percent, name)) - { - /* Give a warning if the rule is meaningless. */ - makefile_error (filename, lineno, - "target `%s' doesn't match the target pattern", - name); - this = 0; - } - else - { - /* We use patsubst_expand to do the work of translating - the target pattern, the target's name and the dependencies' - patterns into plain dependency names. */ - char *buffer = variable_expand (""); - - for (d = this; d != 0; d = d->next) - { - char *o; - char *percent = find_percent (d->name); - if (percent == 0) - continue; - o = patsubst_expand (buffer, name, pattern, d->name, - pattern_percent, percent); - free (d->name); - d->name = savestring (buffer, o - buffer); - } - } - - if (!two_colon) - { - /* Single-colon. Combine these dependencies - with others in file's existing record, if any. */ - f = enter_file (name); - - if (f->double_colon) - makefile_fatal (filename, lineno, - "target file `%s' has both : and :: entries", - f->name); - - /* If CMDS == F->CMDS, this target was listed in this rule - more than once. Just give a warning since this is harmless. */ - if (cmds != 0 && cmds == f->cmds) - makefile_error - (filename, lineno, - "target `%s' given more than once in the same rule.", - f->name); - - /* Check for two single-colon entries both with commands. - Check is_target so that we don't lose on files such as .c.o - whose commands were preinitialized. */ - else if (cmds != 0 && f->cmds != 0 && f->is_target) - { - makefile_error (cmds->filename, cmds->lineno, - "warning: overriding commands for target `%s'", - f->name); - makefile_error (f->cmds->filename, f->cmds->lineno, - "warning: ignoring old commands for target `%s'", - f->name); - } - - f->is_target = 1; - - /* Defining .DEFAULT with no deps or cmds clears it. */ - if (f == default_file && this == 0 && cmds == 0) - f->cmds = 0; - if (cmds != 0) - f->cmds = cmds; - /* Defining .SUFFIXES with no dependencies - clears out the list of suffixes. */ - if (f == suffix_file && this == 0) - { - d = f->deps; - while (d != 0) - { - struct dep *nextd = d->next; - free (d->name); - free (d); - d = nextd; - } - f->deps = 0; - } - else if (f->deps != 0) - { - /* Add the file's old deps and the new ones in THIS together. */ - - struct dep *firstdeps, *moredeps; - if (cmds != 0) - { - /* This is the rule with commands, so put its deps first. - The rationale behind this is that $< expands to the - first dep in the chain, and commands use $< expecting - to get the dep that rule specifies. */ - firstdeps = this; - moredeps = f->deps; - } - else - { - /* Append the new deps to the old ones. */ - firstdeps = f->deps; - moredeps = this; - } - - if (firstdeps == 0) - firstdeps = moredeps; - else - { - d = firstdeps; - while (d->next != 0) - d = d->next; - d->next = moredeps; - } - - f->deps = firstdeps; - } - else - f->deps = this; - - /* If this is a static pattern rule, set the file's stem to - the part of its name that matched the `%' in the pattern, - so you can use $* in the commands. */ - if (pattern != 0) - { - static char *percent = "%"; - char *buffer = variable_expand (""); - char *o = patsubst_expand (buffer, name, pattern, percent, - pattern_percent, percent); - f->stem = savestring (buffer, o - buffer); - } - } - else - { - /* Double-colon. Make a new record - even if the file already has one. */ - f = lookup_file (name); - /* Check for both : and :: rules. Check is_target so - we don't lose on default suffix rules or makefiles. */ - if (f != 0 && f->is_target && !f->double_colon) - makefile_fatal (filename, lineno, - "target file `%s' has both : and :: entries", - f->name); - f = enter_file (name); - /* If there was an existing entry and it was a double-colon - entry, enter_file will have returned a new one, making it the - prev pointer of the old one, and setting its double_colon - pointer to the first one. */ - if (f->double_colon == 0) - /* This is the first entry for this name, so we must - set its double_colon pointer to itself. */ - f->double_colon = f; - f->is_target = 1; - f->deps = this; - f->cmds = cmds; - } - - /* Free name if not needed further. */ - if (f != 0 && name != f->name - && (name < f->name || name > f->name + strlen (f->name))) - { - free (name); - name = f->name; - } - - /* See if this is first target seen whose name does - not start with a `.', unless it contains a slash. */ - if (default_goal_file == 0 && set_default - && (*name != '.' || index (name, '/') != 0)) - { - int reject = 0; - - /* If this file is a suffix, don't - let it be the default goal file. */ - - for (d = suffix_file->deps; d != 0; d = d->next) - { - register struct dep *d2; - if (*dep_name (d) != '.' && streq (name, dep_name (d))) - { - reject = 1; - break; - } - for (d2 = suffix_file->deps; d2 != 0; d2 = d2->next) - { - register unsigned int len = strlen (dep_name (d2)); - if (strncmp (name, dep_name (d2), len)) - continue; - if (streq (name + len, dep_name (d))) - { - reject = 1; - break; - } - } - if (reject) - break; - } - - if (!reject) - default_goal_file = f; - } - } - - if (implicit) - { - targets[target_idx] = 0; - target_percents[target_idx] = 0; - create_pattern_rule (targets, target_percents, two_colon, deps, cmds, 1); - free ((char *) target_percents); - } -} - -/* Search STRING for an unquoted STOPCHAR or blank (if BLANK is nonzero). - Backslashes quote STOPCHAR, blanks if BLANK is nonzero, and backslash. - Quoting backslashes are removed from STRING by compacting it into - itself. Returns a pointer to the first unquoted STOPCHAR if there is - one, or nil if there are none. */ - -char * -find_char_unquote (string, stopchars, blank) - char *string; - char *stopchars; - int blank; -{ - unsigned int string_len = strlen (string); - register char *p = string; - - while (1) - { - while (*p != '\0' && index (stopchars, *p) == 0 - && (!blank || !isblank (*p))) - ++p; - if (*p == '\0') - break; - - if (p > string && p[-1] == '\\') - { - /* Search for more backslashes. */ - register int i = -2; - while (&p[i] >= string && p[i] == '\\') - --i; - ++i; - /* The number of backslashes is now -I. - Copy P over itself to swallow half of them. */ - bcopy (&p[i / 2], &p[i], (string_len - (p - string)) - (i / 2) + 1); - p += i / 2; - if (i % 2 == 0) - /* All the backslashes quoted each other; the STOPCHAR was - unquoted. */ - return p; - - /* The STOPCHAR was quoted by a backslash. Look for another. */ - } - else - /* No backslash in sight. */ - return p; - } - - /* Never hit a STOPCHAR or blank (with BLANK nonzero). */ - return 0; -} - -/* Search PATTERN for an unquoted %. */ - -char * -find_percent (pattern) - char *pattern; -{ - return find_char_unquote (pattern, "%", 0); -} - -/* Search STRING for an unquoted ; that is not after an unquoted #. */ - -static char * -find_semicolon (string) - char *string; -{ - char *match = find_char_unquote (string, ";#", 0); - if (match != 0 && *match == '#') - /* We found a comment before a semicolon. No match. */ - match = 0; - return match; -} - -/* Parse a string into a sequence of filenames represented as a - chain of struct nameseq's in reverse order and return that chain. - - The string is passed as STRINGP, the address of a string pointer. - The string pointer is updated to point at the first character - not parsed, which either is a null char or equals STOPCHAR. - - SIZE is how big to construct chain elements. - This is useful if we want them actually to be other structures - that have room for additional info. - - If STRIP is nonzero, strip `./'s off the beginning. */ - -struct nameseq * -parse_file_seq (stringp, stopchar, size, strip) - char **stringp; - char stopchar; - unsigned int size; - int strip; -{ - register struct nameseq *new = 0; - register struct nameseq *new1; -#ifndef NO_ARCHIVES - register struct nameseq *lastnew1; -#endif - register char *p = *stringp; - char *q; - char *name; - char stopchars[2]; - stopchars[0] = stopchar; - stopchars[1] = '\0'; - - while (1) - { - /* Skip whitespace; see if any more names are left. */ - p = next_token (p); - if (*p == '\0') - break; - if (*p == stopchar) - break; - /* Yes, find end of next name. */ - q = p; - p = find_char_unquote (q, stopchars, 1); -#if defined(__MSDOS__) || defined(NETSCAPE) - /* For MS-DOS, skip a "C:\...". */ - if (stopchar == ':' && p != 0 && p - q == 1 && *p == ':' - && (p[1] == '\\' || p[1] == '/') && isalpha (p[-1])) - p = find_char_unquote (p + 1, stopchars, 1); -#endif - if (p == 0) - p = q + strlen (q); - - if (strip) - /* Skip leading `./'s. */ - while (p - q > 2 && q[0] == '.' && q[1] == '/') - { - q += 2; /* Skip "./". */ - while (q < p && *q == '/') - /* Skip following slashes: ".//foo" is "foo", not "/foo". */ - ++q; - } - - /* Extract the filename just found, and skip it. */ - - if (q == p) - /* ".///" was stripped to "". */ - name = savestring ("./", 2); - else - name = savestring (q, p - q); - - /* Add it to the front of the chain. */ - new1 = (struct nameseq *) xmalloc (size); - new1->name = name; - new1->next = new; - new = new1; - } - -#ifndef NO_ARCHIVES - - /* Look for multi-word archive references. - They are indicated by a elt ending with an unmatched `)' and - an elt further down the chain (i.e., previous in the file list) - with an unmatched `(' (e.g., "lib(mem"). */ - - new1 = new; - lastnew1 = 0; - while (new1 != 0) - if (new1->name[0] != '(' /* Don't catch "(%)" and suchlike. */ - && new1->name[strlen (new1->name) - 1] == ')' - && index (new1->name, '(') == 0) - { - /* NEW1 ends with a `)' but does not contain a `('. - Look back for an elt with an opening `(' but no closing `)'. */ - - struct nameseq *n = new1->next, *lastn = new1; - char *paren; - while (n != 0 && (paren = index (n->name, '(')) == 0) - { - lastn = n; - n = n->next; - } - if (n != 0 - /* Ignore something starting with `(', as that cannot actually - be an archive-member reference (and treating it as such - results in an empty file name, which causes much lossage). */ - && n->name[0] != '(') - { - /* N is the first element in the archive group. - Its name looks like "lib(mem" (with no closing `)'). */ - - char *libname; - - /* Copy "lib(" into LIBNAME. */ - ++paren; - libname = (char *) alloca (paren - n->name + 1); - bcopy (n->name, libname, paren - n->name); - libname[paren - n->name] = '\0'; - - if (*paren == '\0') - { - /* N was just "lib(", part of something like "lib( a b)". - Edit it out of the chain and free its storage. */ - lastn->next = n->next; - free (n->name); - free ((char *) n); - /* LASTN->next is the new stopping elt for the loop below. */ - n = lastn->next; - } - else - { - /* Replace N's name with the full archive reference. */ - name = concat (libname, paren, ")"); - free (n->name); - n->name = name; - } - - if (new1->name[1] == '\0') - { - /* NEW1 is just ")", part of something like "lib(a b )". - Omit it from the chain and free its storage. */ - if (lastnew1 == 0) - new = new1->next; - else - lastnew1->next = new1->next; - lastn = new1; - new1 = new1->next; - free (lastn->name); - free ((char *) lastn); - } - else - { - /* Replace also NEW1->name, which already has closing `)'. */ - name = concat (libname, new1->name, ""); - free (new1->name); - new1->name = name; - new1 = new1->next; - } - - /* Trace back from NEW1 (the end of the list) until N - (the beginning of the list), rewriting each name - with the full archive reference. */ - - while (new1 != n) - { - name = concat (libname, new1->name, ")"); - free (new1->name); - new1->name = name; - lastnew1 = new1; - new1 = new1->next; - } - } - else - { - /* No frobnication happening. Just step down the list. */ - lastnew1 = new1; - new1 = new1->next; - } - } - else - { - lastnew1 = new1; - new1 = new1->next; - } - -#endif - - *stringp = p; - return new; -} - -/* Read a line of text from STREAM into LINEBUFFER. - Combine continuation lines into one line. - Return the number of actual lines read (> 1 if hacked continuation lines). - */ - -static unsigned int -readline (linebuffer, stream, filename, lineno) - struct linebuffer *linebuffer; - FILE *stream; - char *filename; - unsigned int lineno; -{ - char *buffer = linebuffer->buffer; - register char *p = linebuffer->buffer; - register char *end = p + linebuffer->size; - register int len, lastlen = 0; - register char *p2; - register unsigned int nlines = 0; - register int backslash; - - *p = '\0'; - - while (fgets (p, end - p, stream) != 0) - { - len = strlen (p); - if (len == 0) - { - /* This only happens when the first thing on the line is a '\0'. - It is a pretty hopeless case, but (wonder of wonders) Athena - lossage strikes again! (xmkmf puts NULs in its makefiles.) - There is nothing really to be done; we synthesize a newline so - the following line doesn't appear to be part of this line. */ - makefile_error (filename, lineno, - "warning: NUL character seen; rest of line ignored"); - p[0] = '\n'; - len = 1; - } - - p += len; - if (p[-1] != '\n') - { - /* Probably ran out of buffer space. */ - register unsigned int p_off = p - buffer; - linebuffer->size *= 2; - buffer = (char *) xrealloc (buffer, linebuffer->size); - p = buffer + p_off; - end = buffer + linebuffer->size; - linebuffer->buffer = buffer; - *p = '\0'; - lastlen = len; - continue; - } - - ++nlines; - - if (len == 1 && p > buffer) - /* P is pointing at a newline and it's the beginning of - the buffer returned by the last fgets call. However, - it is not necessarily the beginning of a line if P is - pointing past the beginning of the holding buffer. - If the buffer was just enlarged (right before the newline), - we must account for that, so we pretend that the two lines - were one line. */ - len += lastlen; - lastlen = len; - backslash = 0; - for (p2 = p - 2; --len > 0; --p2) - { - if (*p2 == '\\') - backslash = !backslash; - else - break; - } - - if (!backslash) - { - p[-1] = '\0'; - break; - } - - if (end - p <= 1) - { - /* Enlarge the buffer. */ - register unsigned int p_off = p - buffer; - linebuffer->size *= 2; - buffer = (char *) xrealloc (buffer, linebuffer->size); - p = buffer + p_off; - end = buffer + linebuffer->size; - linebuffer->buffer = buffer; - } - } - - if (ferror (stream)) - pfatal_with_name (filename); - - return nlines; -} - -/* Construct the list of include directories - from the arguments and the default list. */ - -void -construct_include_path (arg_dirs) - char **arg_dirs; -{ - register unsigned int i; - struct stat stbuf; - - /* Table to hold the dirs. */ - - register unsigned int defsize = (sizeof (default_include_directories) - / sizeof (default_include_directories[0])); - register unsigned int max = 5; - register char **dirs = (char **) xmalloc ((5 + defsize) * sizeof (char *)); - register unsigned int idx = 0; - - /* First consider any dirs specified with -I switches. - Ignore dirs that don't exist. */ - - if (arg_dirs != 0) - while (*arg_dirs != 0) - { - char *dir = *arg_dirs++; - - if (dir[0] == '~') - { - char *expanded = tilde_expand (dir); - if (expanded != 0) - dir = expanded; - } - - if (safe_stat (dir, &stbuf) == 0 && S_ISDIR (stbuf.st_mode)) - { - if (idx == max - 1) - { - max += 5; - dirs = (char **) - xrealloc ((char *) dirs, (max + defsize) * sizeof (char *)); - } - dirs[idx++] = dir; - } - else if (dir != arg_dirs[-1]) - free (dir); - } - - /* Now add at the end the standard default dirs. */ - - for (i = 0; default_include_directories[i] != 0; ++i) - if (safe_stat (default_include_directories[i], &stbuf) == 0 - && S_ISDIR (stbuf.st_mode)) - dirs[idx++] = default_include_directories[i]; - - dirs[idx] = 0; - - /* Now compute the maximum length of any name in it. */ - - max_incl_len = 0; - for (i = 0; i < idx; ++i) - { - unsigned int len = strlen (dirs[i]); - /* If dir name is written with a trailing slash, discard it. */ - if (dirs[i][len - 1] == '/') - /* We can't just clobber a null in because it may have come from - a literal string and literal strings may not be writable. */ - dirs[i] = savestring (dirs[i], len - 1); - if (len > max_incl_len) - max_incl_len = len; - } - - include_directories = dirs; -} - -/* Expand ~ or ~USER at the beginning of NAME. - Return a newly malloc'd string or 0. */ - -char * -tilde_expand (name) - char *name; -{ -#ifndef NETSCAPE - if (name[1] == '/' || name[1] == '\0') - { - extern char *getenv (); - char *home_dir; - int is_variable; - - { - /* Turn off --warn-undefined-variables while we expand HOME. */ - int save = warn_undefined_variables_flag; - warn_undefined_variables_flag = 0; - - home_dir = allocated_variable_expand ("$(HOME)"); - - warn_undefined_variables_flag = save; - } - - is_variable = home_dir[0] != '\0'; - if (!is_variable) - { - free (home_dir); - home_dir = getenv ("HOME"); - } - if (home_dir == 0 || home_dir[0] == '\0') - { - extern char *getlogin (); - char *name = getlogin (); - home_dir = 0; - if (name != 0) - { - struct passwd *p = getpwnam (name); - if (p != 0) - home_dir = p->pw_dir; - } - } - if (home_dir != 0) - { - char *new = concat (home_dir, "", name + 1); - if (is_variable) - free (home_dir); - return new; - } - } - else - { - struct passwd *pwent; - char *userend = index (name + 1, '/'); - if (userend != 0) - *userend = '\0'; - pwent = getpwnam (name + 1); - if (pwent != 0) - { - if (userend == 0) - return savestring (pwent->pw_dir, strlen (pwent->pw_dir)); - else - return concat (pwent->pw_dir, "/", userend + 1); - } - else if (userend != 0) - *userend = '/'; - } -#endif - return 0; -} - -/* Given a chain of struct nameseq's describing a sequence of filenames, - in reverse of the intended order, return a new chain describing the - result of globbing the filenames. The new chain is in forward order. - The links of the old chain are freed or used in the new chain. - Likewise for the names in the old chain. - - SIZE is how big to construct chain elements. - This is useful if we want them actually to be other structures - that have room for additional info. */ - -struct nameseq * -multi_glob (chain, size) - struct nameseq *chain; - unsigned int size; -{ - register struct nameseq *new = 0; - register struct nameseq *old; - struct nameseq *nexto; - - for (old = chain; old != 0; old = nexto) - { - glob_t gl; -#ifndef NO_ARCHIVES - char *memname; -#endif - - nexto = old->next; - - if (old->name[0] == '~') - { - char *newname = tilde_expand (old->name); - if (newname != 0) - { - free (old->name); - old->name = newname; - } - } - -#ifndef NO_ARCHIVES - if (ar_name (old->name)) - { - /* OLD->name is an archive member reference. - Replace it with the archive file name, - and save the member name in MEMNAME. - We will glob on the archive name and then - reattach MEMNAME later. */ - char *arname; - ar_parse_name (old->name, &arname, &memname); - free (old->name); - old->name = arname; - } - else - memname = 0; -#endif - - switch (glob (old->name, GLOB_NOCHECK, NULL, &gl)) - { - case 0: /* Success. */ - { - register int i = gl.gl_pathc; - while (i-- > 0) - { -#ifndef NO_ARCHIVES - if (memname != 0) - { - /* Try to glob on MEMNAME within the archive. */ - struct nameseq *found - = ar_glob (gl.gl_pathv[i], memname, size); - if (found == 0) - { - /* No matches. Use MEMNAME as-is. */ - struct nameseq *elt - = (struct nameseq *) xmalloc (size); - unsigned int alen = strlen (gl.gl_pathv[i]); - unsigned int mlen = strlen (memname); - elt->name = (char *) xmalloc (alen + 1 + mlen + 2); - bcopy (gl.gl_pathv[i], elt->name, alen); - elt->name[alen] = '('; - bcopy (memname, &elt->name[alen + 1], mlen); - elt->name[alen + 1 + mlen] = ')'; - elt->name[alen + 1 + mlen + 1] = '\0'; - elt->next = new; - new = elt; - } - else - { - /* Find the end of the FOUND chain. */ - struct nameseq *f = found; - while (f->next != 0) - f = f->next; - - /* Attach the chain being built to the end of the FOUND - chain, and make FOUND the new NEW chain. */ - f->next = new; - new = found; - } - - free (memname); - } - else -#endif - { - struct nameseq *elt = (struct nameseq *) xmalloc (size); - elt->name = savestring (gl.gl_pathv[i], - strlen (gl.gl_pathv[i])); - elt->next = new; - new = elt; - } - } - globfree (&gl); - free (old->name); - free (old); - break; - } - - case GLOB_NOSPACE: - fatal ("virtual memory exhausted"); - break; - - default: - old->next = new; - new = old; - break; - } - } - - return new; -} diff --git a/buildtools/windows/source/make/remake.c b/buildtools/windows/source/make/remake.c deleted file mode 100644 index c80c5d59fc0..00000000000 --- a/buildtools/windows/source/make/remake.c +++ /dev/null @@ -1,1086 +0,0 @@ -/* Basic dependency engine for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "job.h" -#include "dep.h" -#include "file.h" -#include - -#ifdef HAVE_FCNTL_H -#include -#else -#include -#endif - -#if defined(NETSCAPE) -#include -#endif - -extern int try_implicit_rule (); - - -/* Incremented when a command is started (under -n, when one would be). */ -unsigned int commands_started = 0; - -static int update_file (), update_file_1 (), check_dep (), touch_file (); -static void remake_file (); -static time_t name_mtime (); -static int library_search (); -extern time_t f_mtime (); - -/* Remake all the goals in the `struct dep' chain GOALS. Return -1 if nothing - was done, 0 if all goals were updated successfully, or 1 if a goal failed. - If MAKEFILES is nonzero, these goals are makefiles, so -t, -q, and -n should - be disabled for them unless they were also command-line targets, and we - should only make one goal at a time and return as soon as one goal whose - `changed' member is nonzero is successfully made. */ - -int -update_goal_chain (goals, makefiles) - register struct dep *goals; - int makefiles; -{ - int t = touch_flag, q = question_flag, n = just_print_flag; - unsigned int j = job_slots; - int status = -1; - -#define MTIME(file) (makefiles ? file_mtime_no_search (file) \ - : file_mtime (file)) - - /* Duplicate the chain so we can remove things from it. */ - - goals = copy_dep_chain (goals); - - { - /* Clear the `changed' flag of each goal in the chain. - We will use the flag below to notice when any commands - have actually been run for a target. When no commands - have been run, we give an "up to date" diagnostic. */ - - struct dep *g; - for (g = goals; g != 0; g = g->next) - g->changed = 0; - } - - if (makefiles) - /* Only run one job at a time. */ - job_slots = 1; - - /* Update all the goals until they are all finished. */ - - while (goals != 0) - { - register struct dep *g, *lastgoal; - - /* Start jobs that are waiting for the load to go down. */ - - start_waiting_jobs (); - - /* Wait for a child to die. */ - - reap_children (1, 0); - - lastgoal = 0; - g = goals; - while (g != 0) - { - /* Iterate over all double-colon entries for this file. */ - struct file *file = g->file; - int stop, any_not_updated = 0; - for (file = g->file->double_colon ? g->file->double_colon : g->file; - file != NULL; - file = file->prev) - { - unsigned int ocommands_started; - int x; - time_t mtime = MTIME (file); - check_renamed (file); - - if (makefiles) - { - if (file->cmd_target) - { - touch_flag = t; - question_flag = q; - just_print_flag = n; - } - else - touch_flag = question_flag = just_print_flag = 0; - } - - /* Save the old value of `commands_started' so we can compare - later. It will be incremented when any commands are - actually run. */ - ocommands_started = commands_started; - - x = update_file (file, makefiles ? 1 : 0); - check_renamed (file); - - /* Set the goal's `changed' flag if any commands were started - by calling update_file above. We check this flag below to - decide when to give an "up to date" diagnostic. */ - g->changed += commands_started - ocommands_started; - - stop = 0; - if (x != 0 || file->updated) - { - /* If STATUS was not already 1, set it to 1 if - updating failed, or to 0 if updating succeeded. - Leave STATUS as it is if no updating was done. */ - - if (status < 1) - { - if (file->update_status != 0) - { - /* Updating failed, or -q triggered. - The STATUS value tells our caller which. */ - status = file->update_status; - /* If -q just triggered, stop immediately. - It doesn't matter how much more we run, - since we already know the answer to return. */ - stop = (!keep_going_flag && !question_flag - && !makefiles); - } - else if (MTIME (file) != mtime) - { - /* Updating was done. If this is a makefile and - just_print_flag or question_flag is set - (meaning -n or -q was given and this file was - specified as a command-line target), don't - change STATUS. If STATUS is changed, we will - get re-exec'd, and fall into an infinite loop. */ - if (!makefiles - || (!just_print_flag && !question_flag)) - status = 0; - if (makefiles && file->dontcare) - /* This is a default makefile. Stop remaking. */ - stop = 1; - } - } - } - - /* Keep track if any double-colon entry is not finished. - When they are all finished, the goal is finished. */ - any_not_updated |= !file->updated; - - if (stop) - break; - } - - /* Reset FILE since it is null at the end of the loop. */ - file = g->file; - - if (stop || !any_not_updated) - { - /* If we have found nothing whatever to do for the goal, - print a message saying nothing needs doing. */ - - if (!makefiles - /* If the update_status is zero, we updated successfully - or not at all. G->changed will have been set above if - any commands were actually started for this goal. */ - && file->update_status == 0 && !g->changed - /* Never give a message under -s or -q. */ - && !silent_flag && !question_flag) - { - if (file->phony || file->cmds == 0) - message ("Nothing to be done for `%s'.", - file->name); - else - message ("`%s' is up to date.", file->name); - fflush (stdout); - } - - /* This goal is finished. Remove it from the chain. */ - if (lastgoal == 0) - goals = g->next; - else - lastgoal->next = g->next; - - /* Free the storage. */ - free ((char *) g); - - g = lastgoal == 0 ? goals : lastgoal->next; - - if (stop) - break; - } - else - { - lastgoal = g; - g = g->next; - } - } - } - - if (makefiles) - { - touch_flag = t; - question_flag = q; - just_print_flag = n; - job_slots = j; - } - - return status; -} - -/* If FILE is not up to date, execute the commands for it. - Return 0 if successful, 1 if unsuccessful; - but with some flag settings, just call `exit' if unsuccessful. - - DEPTH is the depth in recursions of this function. - We increment it during the consideration of our dependencies, - then decrement it again after finding out whether this file - is out of date. - - If there are multiple double-colon entries for FILE, - each is considered in turn. */ - -static int -update_file (file, depth) - struct file *file; - unsigned int depth; -{ - register int status = 0; - register struct file *f; - - for (f = file->double_colon ? file->double_colon : file; f != 0; f = f->prev) - { - status |= update_file_1 (f, depth); - check_renamed (f); - - if (status != 0 && !keep_going_flag) - return status; - - switch (f->command_state) - { - case cs_finished: - /* The file is done being remade. */ - break; - - case cs_running: - case cs_deps_running: - /* Don't run the other :: rules for this - file until this rule is finished. */ - return 0; - - default: - assert (f->command_state == cs_running); - break; - } - } - - return status; -} - -/* Consider a single `struct file' and update it as appropriate. */ - -static int -update_file_1 (file, depth) - struct file *file; - unsigned int depth; -{ - register time_t this_mtime; - int noexist, must_make, deps_changed; - int dep_status = 0; - register struct dep *d, *lastd; - int running = 0; - - DEBUGPR ("Considering target file `%s'.\n"); - - if (file->updated) - { - if (file->update_status > 0) - { - DEBUGPR ("Recently tried and failed to update file `%s'.\n"); - return file->update_status; - } - - DEBUGPR ("File `%s' was considered already.\n"); - return 0; - } - - switch (file->command_state) - { - case cs_not_started: - case cs_deps_running: - break; - case cs_running: - DEBUGPR ("Still updating file `%s'.\n"); - return 0; - case cs_finished: - DEBUGPR ("Finished updating file `%s'.\n"); - return file->update_status; - default: - abort (); - } - - ++depth; - - /* Notice recursive update of the same file. */ - file->updating = 1; - - /* Looking at the file's modtime beforehand allows the possibility - that its name may be changed by a VPATH search, and thus it may - not need an implicit rule. If this were not done, the file - might get implicit commands that apply to its initial name, only - to have that name replaced with another found by VPATH search. */ - - this_mtime = file_mtime (file); - check_renamed (file); - noexist = this_mtime == (time_t) -1; - if (noexist) - DEBUGPR ("File `%s' does not exist.\n"); - - must_make = noexist; - - /* If file was specified as a target with no commands, - come up with some default commands. */ - - if (!file->phony && file->cmds == 0 && !file->tried_implicit) - { - if (try_implicit_rule (file, depth)) - DEBUGPR ("Found an implicit rule for `%s'.\n"); - else - DEBUGPR ("No implicit rule found for `%s'.\n"); - file->tried_implicit = 1; - } - if (file->cmds == 0 && !file->is_target - && default_file != 0 && default_file->cmds != 0) - { - DEBUGPR ("Using default commands for `%s'.\n"); - file->cmds = default_file->cmds; - } - - /* Update all non-intermediate files we depend on, if necessary, - and see whether any of them is more recent than this file. */ - - lastd = 0; - d = file->deps; - while (d != 0) - { - time_t mtime; - - check_renamed (d->file); - - mtime = file_mtime (d->file); - check_renamed (d->file); - - if (d->file->updating) - { - error ("Circular %s <- %s dependency dropped.", - file->name, d->file->name); - if (lastd == 0) - { - file->deps = d->next; - free ((char *) d); - d = file->deps; - } - else - { - lastd->next = d->next; - free ((char *) d); - d = lastd->next; - } - continue; - } - - d->file->parent = file; - dep_status |= check_dep (d->file, depth, this_mtime, &must_make); - check_renamed (d->file); - - { - register struct file *f = d->file; - if (f->double_colon) - f = f->double_colon; - do - { - running |= (f->command_state == cs_running - || f->command_state == cs_deps_running); - f = f->prev; - } - while (f != 0); - } - - if (dep_status != 0 && !keep_going_flag) - break; - - if (!running) - d->changed = file_mtime (d->file) != mtime; - - lastd = d; - d = d->next; - } - - /* Now we know whether this target needs updating. - If it does, update all the intermediate files we depend on. */ - - if (must_make) - { - for (d = file->deps; d != 0; d = d->next) - if (d->file->intermediate) - { - time_t mtime = file_mtime (d->file); - check_renamed (d->file); - d->file->parent = file; - dep_status |= update_file (d->file, depth); - check_renamed (d->file); - - { - register struct file *f = d->file; - if (f->double_colon) - f = f->double_colon; - do - { - running |= (f->command_state == cs_running - || f->command_state == cs_deps_running); - f = f->prev; - } - while (f != 0); - } - - if (dep_status != 0 && !keep_going_flag) - break; - - if (!running) - d->changed = ((file->phony && file->cmds != 0) - || file_mtime (d->file) != mtime); - } - } - - file->updating = 0; - - DEBUGPR ("Finished dependencies of target file `%s'.\n"); - - if (running) - { - set_command_state (file, cs_deps_running); - --depth; - DEBUGPR ("The dependencies of `%s' are being made.\n"); - return 0; - } - - /* If any dependency failed, give up now. */ - - if (dep_status != 0) - { - file->update_status = dep_status; - notice_finished_file (file); - - depth--; - - DEBUGPR ("Giving up on target file `%s'.\n"); - - if (depth == 0 && keep_going_flag - && !just_print_flag && !question_flag) - error ("Target `%s' not remade because of errors.", file->name); - - return dep_status; - } - - if (file->command_state == cs_deps_running) - /* The commands for some deps were running on the last iteration, but - they have finished now. Reset the command_state to not_started to - simplify later bookkeeping. It is important that we do this only - when the prior state was cs_deps_running, because that prior state - was definitely propagated to FILE's also_make's by set_command_state - (called above), but in another state an also_make may have - independently changed to finished state, and we would confuse that - file's bookkeeping (updated, but not_started is bogus state). */ - set_command_state (file, cs_not_started); - - /* Now record which dependencies are more - recent than this file, so we can define $?. */ - - deps_changed = 0; - for (d = file->deps; d != 0; d = d->next) - { - time_t d_mtime = file_mtime (d->file); - check_renamed (d->file); - -#if 1 /* %%% In version 4, remove this code completely to - implement not remaking deps if their deps are newer - than their parents. */ - if (d_mtime == (time_t) -1 && !d->file->intermediate) - /* We must remake if this dep does not - exist and is not intermediate. */ - must_make = 1; -#endif - - /* Set DEPS_CHANGED if this dep actually changed. */ - deps_changed |= d->changed; - - /* Set D->changed if either this dep actually changed, - or its dependent, FILE, is older or does not exist. */ - d->changed |= noexist || d_mtime > this_mtime; - - if (debug_flag && !noexist) - { - print_spaces (depth); - if (d_mtime == (time_t) -1) - printf ("Dependency `%s' does not exist.\n", dep_name (d)); - else - printf ("Dependency `%s' is %s than dependent `%s'.\n", - dep_name (d), d->changed ? "newer" : "older", file->name); - fflush (stdout); - } - } - - /* Here depth returns to the value it had when we were called. */ - depth--; - - if (file->double_colon && file->deps == 0) - { - must_make = 1; - DEBUGPR ("Target `%s' is double-colon and has no dependencies.\n"); - } - else if (!noexist && file->is_target && !deps_changed && file->cmds == 0) - { - must_make = 0; - DEBUGPR ("No commands for `%s' and no dependencies actually changed.\n"); - } - - if (!must_make) - { - DEBUGPR ("No need to remake target `%s'.\n"); - notice_finished_file (file); - return 0; - } - - DEBUGPR ("Must remake target `%s'.\n"); - - /* Now, take appropriate actions to remake the file. */ - remake_file (file); - - if (file->command_state != cs_finished) - { - DEBUGPR ("Commands of `%s' are being run.\n"); - return 0; - } - - switch (file->update_status) - { - case 2: - DEBUGPR ("Failed to remake target file `%s'.\n"); - break; - case 0: - DEBUGPR ("Successfully remade target file `%s'.\n"); - break; - case 1: - DEBUGPR ("Target file `%s' needs remade under -q.\n"); - break; - default: - assert (file->update_status >= 0 && file->update_status <= 2); - break; - } - - file->updated = 1; - return file->update_status; -} - -/* Set FILE's `updated' flag and re-check its mtime and the mtime's of all - files listed in its `also_make' member. Under -t, this function also - touches FILE. - - On return, FILE->update_status will no longer be -1 if it was. */ - -void -notice_finished_file (file) - register struct file *file; -{ - struct dep *d; - int ran = file->command_state == cs_running; - - file->command_state = cs_finished; - file->updated = 1; - - if (touch_flag - /* The update status will be: - -1 if this target was not remade; - 0 if 0 or more commands (+ or ${MAKE}) were run and won; - 1 if some commands were run and lost. - We touch the target if it has commands which either were not run - or won when they ran (i.e. status is 0). */ - && file->update_status == 0) - { - if (file->cmds != 0 && file->cmds->any_recurse) - { - /* If all the command lines were recursive, - we don't want to do the touching. */ - unsigned int i; - for (i = 0; i < file->cmds->ncommand_lines; ++i) - if (!(file->cmds->lines_flags[i] & COMMANDS_RECURSE)) - goto have_nonrecursing; - } - else - { - have_nonrecursing: - if (file->phony) - file->update_status = 0; - else - /* Should set file's modification date and do nothing else. */ - file->update_status = touch_file (file); - } - } - - if (ran && !file->phony) - { - struct file *f; - - if (just_print_flag || question_flag - || (file->is_target && file->cmds == 0)) - file->last_mtime = NEW_MTIME; - else - file->last_mtime = 0; - - /* Propagate the change of modification time to all the double-colon - entries for this file. */ - for (f = file->double_colon; f != 0; f = f->next) - f->last_mtime = file->last_mtime; - } - - if (ran && file->update_status != -1) - /* We actually tried to update FILE, which has - updated its also_make's as well (if it worked). - If it didn't work, it wouldn't work again for them. - So mark them as updated with the same status. */ - for (d = file->also_make; d != 0; d = d->next) - { - d->file->command_state = cs_finished; - d->file->updated = 1; - d->file->update_status = file->update_status; - - if (ran && !d->file->phony) - /* Fetch the new modification time. - We do this instead of just invalidating the cached time - so that a vpath_search can happen. Otherwise, it would - never be done because the target is already updated. */ - (void) f_mtime (d->file, 0); - } - else if (file->update_status == -1) - /* Nothing was done for FILE, but it needed nothing done. - So mark it now as "succeeded". */ - file->update_status = 0; -} - -/* Check whether another file (whose mtime is THIS_MTIME) - needs updating on account of a dependency which is file FILE. - If it does, store 1 in *MUST_MAKE_PTR. - In the process, update any non-intermediate files - that FILE depends on (including FILE itself). - Return nonzero if any updating failed. */ - -static int -check_dep (file, depth, this_mtime, must_make_ptr) - struct file *file; - unsigned int depth; - time_t this_mtime; - int *must_make_ptr; -{ - register struct dep *d; - int dep_status = 0; - - ++depth; - file->updating = 1; - - if (!file->intermediate) - /* If this is a non-intermediate file, update it and record - whether it is newer than THIS_MTIME. */ - { - time_t mtime; - dep_status = update_file (file, depth); - check_renamed (file); - mtime = file_mtime (file); - check_renamed (file); - if (mtime == (time_t) -1 || mtime > this_mtime) - *must_make_ptr = 1; - } - else - { - /* FILE is an intermediate file. - Update all non-intermediate files we depend on, if necessary, - and see whether any of them is more recent than the file - on whose behalf we are checking. */ - register struct dep *lastd; - lastd = 0; - d = file->deps; - while (d != 0) - { - if (d->file->updating) - { - error ("Circular %s <- %s dependency dropped.", - file->name, d->file->name); - if (lastd == 0) - { - file->deps = d->next; - free ((char *) d); - d = file->deps; - } - else - { - lastd->next = d->next; - free ((char *) d); - d = lastd->next; - } - continue; - } - - d->file->parent = file; - dep_status |= check_dep (d->file, depth, this_mtime, must_make_ptr); - check_renamed (d->file); - if (dep_status != 0 && !keep_going_flag) - break; - - if (d->file->command_state == cs_running - || d->file->command_state == cs_deps_running) - /* Record that some of FILE's dependencies are still being made. - This tells the upper levels to wait on processing it until - the commands are finished. */ - set_command_state (file, cs_deps_running); - - lastd = d; - d = d->next; - } - } - - file->updating = 0; - return dep_status; -} - -/* Touch FILE. Return zero if successful, one if not. */ - -#define TOUCH_ERROR(call) return (perror_with_name (call, file->name), 1) - -static int -touch_file (file) - register struct file *file; -{ - if (!silent_flag) - { - printf ("touch %s\n", file->name); - fflush (stdout); - } - -#ifndef NO_ARCHIVES - if (ar_name (file->name)) - return ar_touch (file->name); - else -#endif - { - int fd = open (file->name, O_RDWR | O_CREAT, 0666); - - if (fd < 0) - TOUCH_ERROR ("touch: open: "); - else - { - struct stat statbuf; - char buf; - int status; - -#ifdef EINTR - do -#endif - status = fstat (fd, &statbuf); -#ifdef EINTR - while (status < 0 && errno == EINTR); -#endif - if (status < 0) - TOUCH_ERROR ("touch: fstat: "); - /* Rewrite character 0 same as it already is. */ - if (read (fd, &buf, 1) < 0) - TOUCH_ERROR ("touch: read: "); - if (lseek (fd, 0L, 0) < 0L) - TOUCH_ERROR ("touch: lseek: "); - if (write (fd, &buf, 1) < 0) - TOUCH_ERROR ("touch: write: "); - /* If file length was 0, we just - changed it, so change it back. */ - if (statbuf.st_size == 0) - { - (void) close (fd); - fd = open (file->name, O_RDWR | O_TRUNC, 0666); - if (fd < 0) - TOUCH_ERROR ("touch: open: "); - } - (void) close (fd); - } - } - - return 0; -} - -/* Having checked and updated the dependencies of FILE, - do whatever is appropriate to remake FILE itself. - Return the status from executing FILE's commands. */ - -static void -remake_file (file) - struct file *file; -{ - if (file->cmds == 0) - { - if (file->phony) - /* Phony target. Pretend it succeeded. */ - file->update_status = 0; - else if (file->is_target) - /* This is a nonexistent target file we cannot make. - Pretend it was successfully remade. */ - file->update_status = 0; - else - { - /* This is a dependency file we cannot remake. Fail. */ - static const char msg_noparent[] - = "%sNo rule to make target `%s'%s"; - static const char msg_parent[] - = "%sNo rule to make target `%s', needed by `%s'%s"; - if (keep_going_flag || file->dontcare) - { - if (!file->dontcare) - { - if (file->parent == 0) - error (msg_noparent, "*** ", file->name, "."); - else - error (msg_parent, "*** ", - file->name, file->parent->name, "."); - } - file->update_status = 2; - } - else - { - if (file->parent == 0) - fatal (msg_noparent, "", file->name, ""); - else - fatal (msg_parent, "", file->name, file->parent->name, ""); - } - } - } - else - { - chop_commands (file->cmds); - - if (!touch_flag || file->cmds->any_recurse) - { - execute_file_commands (file); - return; - } - else - /* This tells notice_finished_file it is ok to touch the file. */ - file->update_status = 0; - } - - /* This does the touching under -t. */ - notice_finished_file (file); -} - -/* Return the mtime of a file, given a `struct file'. - Caches the time in the struct file to avoid excess stat calls. - - If the file is not found, and SEARCH is nonzero, VPATH searching and - replacement is done. If that fails, a library (-lLIBNAME) is tried and - the library's actual name (/lib/libLIBNAME.a, etc.) is substituted into - FILE. */ - -time_t -f_mtime (file, search) - register struct file *file; - int search; -{ - time_t mtime; - - /* File's mtime is not known; must get it from the system. */ - -#ifndef NO_ARCHIVES - if (ar_name (file->name)) - { - /* This file is an archive-member reference. */ - - char *arname, *memname; - struct file *arfile; - int arname_used = 0; - - /* Find the archive's name. */ - ar_parse_name (file->name, &arname, &memname); - - /* Find the modification time of the archive itself. - Also allow for its name to be changed via VPATH search. */ - arfile = lookup_file (arname); - if (arfile == 0) - { - arfile = enter_file (arname); - arname_used = 1; - } - mtime = f_mtime (arfile, search); - check_renamed (arfile); - if (search && strcmp (arfile->name, arname)) - { - /* The archive's name has changed. - Change the archive-member reference accordingly. */ - - unsigned int arlen, memlen; - - if (!arname_used) - { - free (arname); - arname_used = 1; - } - - arname = arfile->name; - arlen = strlen (arname); - memlen = strlen (memname); - - free (file->name); - - file->name = (char *) xmalloc (arlen + 1 + memlen + 2); - bcopy (arname, file->name, arlen); - file->name[arlen] = '('; - bcopy (memname, file->name + arlen + 1, memlen); - file->name[arlen + 1 + memlen] = ')'; - file->name[arlen + 1 + memlen + 1] = '\0'; - } - - if (!arname_used) - free (arname); - free (memname); - - if (mtime == (time_t) -1) - /* The archive doesn't exist, so it's members don't exist either. */ - return (time_t) -1; - - mtime = ar_member_date (file->name); - } - else -#endif - { - mtime = name_mtime (file->name); - - if (mtime == (time_t) -1 && search) - { - /* If name_mtime failed, search VPATH. */ - char *name = file->name; - if (vpath_search (&name, &mtime) - /* Last resort, is it a library (-lxxx)? */ - || (name[0] == '-' && name[1] == 'l' - && library_search (&name, &mtime))) - { - if (mtime != 0) - /* vpath_search and library_search store zero in MTIME - if they didn't need to do a stat call for their work. */ - file->last_mtime = mtime; - rename_file (file, name); - check_renamed (file); - return file_mtime (file); - } - } - } - - /* Store the mtime into all the entries for this file. */ - if (file->double_colon) - file = file->double_colon; - do - { - file->last_mtime = mtime; - file = file->prev; - } while (file != 0); - - return mtime; -} - - -/* Return the mtime of the file or archive-member reference NAME. */ - -static time_t -name_mtime (name) - register char *name; -{ - struct stat st; - - if (safe_stat (name, &st) < 0) - return (time_t) -1; - - return (time_t) st.st_mtime; -} - - -/* Search for a library file specified as -lLIBNAME, searching for a - suitable library file in the system library directories and the VPATH - directories. */ - -static int -library_search (lib, mtime_ptr) - char **lib; - time_t *mtime_ptr; -{ - static char *dirs[] = - { -#ifndef NETSCAPE - "/lib", - "/usr/lib", -#endif - LIBDIR, /* Defined by configuration. */ - 0 - }; - - char *libname = &(*lib)[2]; /* Name without the `-l'. */ - time_t mtime; - - /* Buffer to construct possible names in. */ - char *buf = xmalloc (sizeof (LIBDIR) + 8 + strlen (libname) + 4 + 2 + 1); - char *file, **dp; - - /* Look first for `libNAME.a' in the current directory. */ - - sprintf (buf, "lib%s.a", libname); - mtime = name_mtime (buf); - if (mtime != (time_t) -1) - { - *lib = buf; - if (mtime_ptr != 0) - *mtime_ptr = mtime; - return 1; - } - - /* Now try VPATH search on that. */ - - file = buf; - if (vpath_search (&file, mtime_ptr)) - { - free (buf); - *lib = file; - return 1; - } - - /* Now try the standard set of directories. */ - - for (dp = dirs; *dp != 0; ++dp) - { - sprintf (buf, "%s/lib%s.a", *dp, libname); - mtime = name_mtime (buf); - if (mtime != (time_t) -1) - { - *lib = buf; - if (mtime_ptr != 0) - *mtime_ptr = mtime; - return 1; - } - } - - free (buf); - return 0; -} diff --git a/buildtools/windows/source/make/remote-cstms.c b/buildtools/windows/source/make/remote-cstms.c deleted file mode 100644 index 6aa2c966a25..00000000000 --- a/buildtools/windows/source/make/remote-cstms.c +++ /dev/null @@ -1,270 +0,0 @@ -/* GNU Make remote job exportation interface to the Customs daemon. - THIS CODE IS NOT SUPPORTED BY THE GNU PROJECT. - Please do not send bug reports or questions about it to - the Make maintainers. - -Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "job.h" -#include -#include - -#define __STRICT_BSD__ /* Don't make conflicting declarations. */ -#include "customs.h" - - -char *remote_description = "Customs"; - -/* File name of the Customs `export' client command. - A full path name can be used to avoid some path-searching overhead. */ -#define EXPORT_COMMAND "/usr/local/bin/export" - -/* ExportPermit gotten by start_remote_job_p, and used by start_remote_job. */ -static ExportPermit permit; - -/* Normalized path name of the current directory. */ -static char *normalized_cwd; - -/* Return nonzero if the next job should be done remotely. */ - -int -start_remote_job_p () -{ - static int inited = 0; - int status; - - /* Allow the user to turn off job exportation - (useful while he is debugging Customs, for example). */ - if (getenv ("GNU_MAKE_NO_CUSTOMS") != 0) - return 0; - - if (!inited) - { - /* For secure Customs, make is installed setuid root and - Customs requires a privileged source port be used. */ - make_access (); - - /* Ping the daemon once to see if it is there. */ - inited = Customs_Ping () == RPC_SUCCESS ? 1 : -1; - - /* Return to normal user access. */ - user_access (); - - if (starting_directory == 0) - /* main couldn't figure it out. */ - inited = -1; - else - { - /* Normalize the current directory path name to something - that should work on all machines exported to. */ - - normalized_cwd = (char *) xmalloc (GET_PATH_MAX); - strcpy (normalized_cwd, starting_directory); - if (Customs_NormPath (normalized_cwd, GET_PATH_MAX) < 0) - /* Path normalization failure means using Customs - won't work, but it's not really an error. */ - inited = -1; - } - } - - if (inited < 0) - return 0; - - status = Customs_Host (EXPORT_SAME, &permit); - if (status != RPC_SUCCESS) - { - if (debug_flag) - printf ("Customs won't export: %s\n", Rpc_ErrorMessage (status)); - return 0; - } - - return !CUSTOMS_FAIL (&permit.addr); -} - -/* Start a remote job running the command in ARGV, with environment from - ENVP. It gets standard input from STDIN_FD. On failure, return - nonzero. On success, return zero, and set *USED_STDIN to nonzero if it - will actually use STDIN_FD, zero if not, set *ID_PTR to a unique - identification, and set *IS_REMOTE to nonzero if the job is remote, zero - if it is local (meaning *ID_PTR is a process ID). */ - -int -start_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin) - char **argv, **envp; - int stdin_fd; - int *is_remote; - int *id_ptr; - int *used_stdin; -{ - extern int vfork (), execve (); - char waybill[MAX_DATA_SIZE], msg[128]; - struct timeval timeout; - struct sockaddr_in sin; - int len; - int retsock, retport, sock; - Rpc_Stat status; - int pid; - - /* Create the return socket. */ - retsock = Rpc_UdpCreate (True, 0); - if (retsock < 0) - { - error ("exporting: Couldn't create return socket."); - return 1; - } - - /* Get the return socket's port number. */ - len = sizeof (sin); - if (getsockname (retsock, (struct sockaddr *) &sin, &len) < 0) - { - (void) close (retsock); - perror_with_name ("exporting: ", "getsockname"); - return 1; - } - retport = sin.sin_port; - - /* Create the TCP socket for talking to the remote child. */ - sock = Rpc_TcpCreate (False, 0); - - /* Create a WayBill to give to the server. */ - len = Customs_MakeWayBill (&permit, normalized_cwd, argv[0], argv, - envp, retport, waybill); - - /* Modify the waybill as if the remote child had done `child_access ()'. */ - { - WayBill *wb = (WayBill *) waybill; - wb->euid = wb->ruid; - wb->rgid = wb->rgid; - } - - /* Send the request to the server, timing out in 20 seconds. */ - timeout.tv_usec = 0; - timeout.tv_sec = 20; - sin.sin_family = AF_INET; - sin.sin_port = htons (Customs_Port ()); - sin.sin_addr = permit.addr; - status = Rpc_Call (sock, &sin, (Rpc_Proc) CUSTOMS_IMPORT, - len, (Rpc_Opaque) waybill, - sizeof(msg), (Rpc_Opaque) msg, - 1, &timeout); - if (status != RPC_SUCCESS) - { - (void) close (retsock); - (void) close (sock); - error ("exporting: %s", Rpc_ErrorMessage (status)); - return 1; - } - else if (msg[0] != 'O' || msg[1] != 'k' || msg[2] != '\0') - { - (void) close (retsock); - (void) close (sock); - error ("CUSTOMS_IMPORT: %s", msg); - return 1; - } - else if (debug_flag) - { - struct hostent *host = gethostbyaddr (&permit.addr, sizeof (permit.addr), - AF_INET); - printf ("Job exported to %s ID %u\n", - host == 0 ? inet_ntoa (permit.addr) : host->h_name, - permit.id); - } - - fflush (stdout); - fflush (stderr); - - pid = vfork (); - if (pid < 0) - { - /* The fork failed! */ - perror_with_name ("vfork", ""); - return 1; - } - else if (pid == 0) - { - /* Child side. Run `export' to handle the connection. */ - static char sock_buf[20], retsock_buf[20], id_buf[20]; - static char *new_argv[6] = - { EXPORT_COMMAND, "-id", sock_buf, retsock_buf, id_buf, 0 }; - - /* Set up the arguments. */ - (void) sprintf (sock_buf, "%d", sock); - (void) sprintf (retsock_buf, "%d", retsock); - (void) sprintf (id_buf, "%x", permit.id); - - /* Get the right stdin. */ - if (stdin_fd != 0) - (void) dup2 (stdin_fd, 0); - - /* Unblock signals in the child. */ - unblock_sigs (); - - /* Run the command. */ - exec_command (new_argv, envp); - } - - /* Parent side. Return the `export' process's ID. */ - (void) close (retsock); - (void) close (sock); - *is_remote = 0; - *id_ptr = pid; - return 0; -} - -/* Get the status of a dead remote child. Block waiting for one to die - if BLOCK is nonzero. Set *EXIT_CODE_PTR to the exit status, *SIGNAL_PTR - to the termination signal or zero if it exited normally, and *COREDUMP_PTR - nonzero if it dumped core. Return the ID of the child that died, - 0 if we would have to block and !BLOCK, or < 0 if there were none. */ - -int -remote_status (exit_code_ptr, signal_ptr, coredump_ptr, block) - int *exit_code_ptr, *signal_ptr, *coredump_ptr; - int block; -{ - return -1; -} - -/* Block asynchronous notification of remote child death. - If this notification is done by raising the child termination - signal, do not block that signal. */ -void -block_remote_children () -{ - return; -} - -/* Restore asynchronous notification of remote child death. - If this is done by raising the child termination signal, - do not unblock that signal. */ -void -unblock_remote_children () -{ - return; -} - -/* Send signal SIG to child ID. Return 0 if successful, -1 if not. */ -int -remote_kill (id, sig) - int id; - int sig; -{ - return -1; -} diff --git a/buildtools/windows/source/make/remote-stub.c b/buildtools/windows/source/make/remote-stub.c deleted file mode 100644 index 24a860b2e27..00000000000 --- a/buildtools/windows/source/make/remote-stub.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Template for the remote job exportation interface to GNU Make. -Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" - - -char *remote_description = 0; - - -/* Return nonzero if the next job should be done remotely. */ - -int -start_remote_job_p () -{ - return 0; -} - -/* Start a remote job running the command in ARGV, - with environment from ENVP. It gets standard input from STDIN_FD. On - failure, return nonzero. On success, return zero, and set *USED_STDIN - to nonzero if it will actually use STDIN_FD, zero if not, set *ID_PTR to - a unique identification, and set *IS_REMOTE to zero if the job is local, - nonzero if it is remote (meaning *ID_PTR is a process ID). */ - -int -start_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin) - char **argv, **envp; - int stdin_fd; - int *is_remote; - int *id_ptr; - int *used_stdin; -{ - return -1; -} - -/* Get the status of a dead remote child. Block waiting for one to die - if BLOCK is nonzero. Set *EXIT_CODE_PTR to the exit status, *SIGNAL_PTR - to the termination signal or zero if it exited normally, and *COREDUMP_PTR - nonzero if it dumped core. Return the ID of the child that died, - 0 if we would have to block and !BLOCK, or < 0 if there were none. */ - -int -remote_status (exit_code_ptr, signal_ptr, coredump_ptr, block) - int *exit_code_ptr, *signal_ptr, *coredump_ptr; - int block; -{ - errno = ECHILD; - return -1; -} - -/* Block asynchronous notification of remote child death. - If this notification is done by raising the child termination - signal, do not block that signal. */ -void -block_remote_children () -{ - return; -} - -/* Restore asynchronous notification of remote child death. - If this is done by raising the child termination signal, - do not unblock that signal. */ -void -unblock_remote_children () -{ - return; -} - -/* Send signal SIG to child ID. Return 0 if successful, -1 if not. */ -int -remote_kill (id, sig) - int id; - int sig; -{ - return -1; -} diff --git a/buildtools/windows/source/make/rule.c b/buildtools/windows/source/make/rule.c deleted file mode 100644 index 51103acd9fe..00000000000 --- a/buildtools/windows/source/make/rule.c +++ /dev/null @@ -1,571 +0,0 @@ -/* Pattern and suffix rule internals for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "dep.h" -#include "file.h" -#include "variable.h" -#include "rule.h" - -static void freerule (); - -/* Chain of all pattern rules. */ - -struct rule *pattern_rules; - -/* Pointer to last rule in the chain, so we can add onto the end. */ - -struct rule *last_pattern_rule; - -/* Number of rules in the chain. */ - -unsigned int num_pattern_rules; - -/* Maximum number of target patterns of any pattern rule. */ - -unsigned int max_pattern_targets; - -/* Maximum number of dependencies of any pattern rule. */ - -unsigned int max_pattern_deps; - -/* Maximum length of the name of a dependencies of any pattern rule. */ - -unsigned int max_pattern_dep_length; - -/* Pointer to structure for the file .SUFFIXES - whose dependencies are the suffixes to be searched. */ - -struct file *suffix_file; - -/* Maximum length of a suffix. */ - -unsigned int maxsuffix; - -/* Compute the maximum dependency length and maximum number of - dependencies of all implicit rules. Also sets the subdir - flag for a rule when appropriate, possibly removing the rule - completely when appropriate. */ - -void -count_implicit_rule_limits () -{ - char *name; - unsigned int namelen; - register struct rule *rule, *lastrule; - - num_pattern_rules = max_pattern_targets = max_pattern_deps = 0; - max_pattern_dep_length = 0; - - name = 0; - namelen = 0; - rule = pattern_rules; - lastrule = 0; - while (rule != 0) - { - unsigned int ndeps = 0; - register struct dep *dep; - struct rule *next = rule->next; - unsigned int ntargets; - - ++num_pattern_rules; - - ntargets = 0; - while (rule->targets[ntargets] != 0) - ++ntargets; - - if (ntargets > max_pattern_targets) - max_pattern_targets = ntargets; - - for (dep = rule->deps; dep != 0; dep = dep->next) - { - unsigned int len = strlen (dep->name); - char *p = rindex (dep->name, '/'); - char *p2 = p != 0 ? index (dep->name, '%') : 0; - - ndeps++; - - if (len > max_pattern_dep_length) - max_pattern_dep_length = len; - - if (p != 0 && p2 > p) - { - /* There is a slash before the % in the dep name. - Extract the directory name. */ - if (p == dep->name) - ++p; - if ((unsigned int)(p - dep->name) > namelen) - { - if (name != 0) - free (name); - namelen = p - dep->name; - name = (char *) xmalloc (namelen + 1); - } - bcopy (dep->name, name, p - dep->name); - name[p - dep->name] = '\0'; - - /* In the deps of an implicit rule the `changed' flag - actually indicates that the dependency is in a - nonexistent subdirectory. */ - - dep->changed = !dir_file_exists_p (name, ""); - if (dep->changed && *name == '/') - { - /* The name is absolute and the directory does not exist. - This rule can never possibly match, since this dependency - can never possibly exist. So just remove the rule from - the list. */ - freerule (rule, lastrule); - --num_pattern_rules; - goto end_main_loop; - } - } - else - /* This dependency does not reside in a subdirectory. */ - dep->changed = 0; - } - - if (ndeps > max_pattern_deps) - max_pattern_deps = ndeps; - - lastrule = rule; - end_main_loop: - rule = next; - } - - if (name != 0) - free (name); -} - -/* Create a pattern rule from a suffix rule. - TARGET is the target suffix; SOURCE is the source suffix. - CMDS are the commands. - If TARGET is nil, it means the target pattern should be `(%.o)'. - If SOURCE is nil, it means there should be no deps. */ - -static void -convert_suffix_rule (target, source, cmds) - char *target, *source; - struct commands *cmds; -{ - char *targname, *targpercent, *depname; - char **names, **percents; - struct dep *deps; - unsigned int len; - - if (target == 0) - /* Special case: TARGET being nil means we are defining a - `.X.a' suffix rule; the target pattern is always `(%.o)'. */ - { - targname = savestring ("(%.o)", 5); - targpercent = targname + 1; - } - else - { - /* Construct the target name. */ - len = strlen (target); - targname = xmalloc (1 + len + 1); - targname[0] = '%'; - bcopy (target, targname + 1, len + 1); - targpercent = targname; - } - - names = (char **) xmalloc (2 * sizeof (char *)); - percents = (char **) alloca (2 * sizeof (char *)); - names[0] = targname; - percents[0] = targpercent; - names[1] = percents[1] = 0; - - if (source == 0) - deps = 0; - else - { - /* Construct the dependency name. */ - len = strlen (source); - depname = xmalloc (1 + len + 1); - depname[0] = '%'; - bcopy (source, depname + 1, len + 1); - deps = (struct dep *) xmalloc (sizeof (struct dep)); - deps->next = 0; - deps->name = depname; - } - - create_pattern_rule (names, percents, 0, deps, cmds, 0); -} - -/* Convert old-style suffix rules to pattern rules. - All rules for the suffixes on the .SUFFIXES list - are converted and added to the chain of pattern rules. */ - -void -convert_to_pattern () -{ - register struct dep *d, *d2; - register struct file *f; - register char *rulename; - register unsigned int slen, s2len; - - /* Compute maximum length of all the suffixes. */ - - maxsuffix = 0; - for (d = suffix_file->deps; d != 0; d = d->next) - { - register unsigned int namelen = strlen (dep_name (d)); - if (namelen > maxsuffix) - maxsuffix = namelen; - } - - rulename = (char *) alloca ((maxsuffix * 2) + 1); - - for (d = suffix_file->deps; d != 0; d = d->next) - { - /* Make a rule that is just the suffix, with no deps or commands. - This rule exists solely to disqualify match-anything rules. */ - convert_suffix_rule (dep_name (d), (char *) 0, (struct commands *) 0); - - f = d->file; - if (f->cmds != 0) - /* Record a pattern for this suffix's null-suffix rule. */ - convert_suffix_rule ("", dep_name (d), f->cmds); - - /* Record a pattern for each of this suffix's two-suffix rules. */ - slen = strlen (dep_name (d)); - bcopy (dep_name (d), rulename, slen); - for (d2 = suffix_file->deps; d2 != 0; d2 = d2->next) - { - s2len = strlen (dep_name (d2)); - - if (slen == s2len && streq (dep_name (d), dep_name (d2))) - continue; - - bcopy (dep_name (d2), rulename + slen, s2len + 1); - f = lookup_file (rulename); - if (f == 0 || f->cmds == 0) - continue; - - if (s2len == 2 && rulename[slen] == '.' && rulename[slen + 1] == 'a') - /* A suffix rule `.X.a:' generates the pattern rule `(%.o): %.X'. - It also generates a normal `%.a: %.X' rule below. */ - convert_suffix_rule ((char *) 0, /* Indicates `(%.o)'. */ - dep_name (d), - f->cmds); - - /* The suffix rule `.X.Y:' is converted - to the pattern rule `%.Y: %.X'. */ - convert_suffix_rule (dep_name (d2), dep_name (d), f->cmds); - } - } -} - - -/* Install the pattern rule RULE (whose fields have been filled in) - at the end of the list (so that any rules previously defined - will take precedence). If this rule duplicates a previous one - (identical target and dependencies), the old one is replaced - if OVERRIDE is nonzero, otherwise this new one is thrown out. - When an old rule is replaced, the new one is put at the end of the - list. Return nonzero if RULE is used; zero if not. */ - -int -new_pattern_rule (rule, override) - register struct rule *rule; - int override; -{ - register struct rule *r, *lastrule; - register unsigned int i, j; - - rule->in_use = 0; - rule->terminal = 0; - - rule->next = 0; - - /* Search for an identical rule. */ - lastrule = 0; - for (r = pattern_rules; r != 0; lastrule = r, r = r->next) - for (i = 0; rule->targets[i] != 0; ++i) - { - for (j = 0; r->targets[j] != 0; ++j) - if (!streq (rule->targets[i], r->targets[j])) - break; - if (r->targets[j] == 0) - /* All the targets matched. */ - { - register struct dep *d, *d2; - for (d = rule->deps, d2 = r->deps; - d != 0 && d2 != 0; d = d->next, d2 = d2->next) - if (!streq (dep_name (d), dep_name (d2))) - break; - if (d == 0 && d2 == 0) - /* All the dependencies matched. */ - if (override) - { - /* Remove the old rule. */ - freerule (r, lastrule); - /* Install the new one. */ - if (pattern_rules == 0) - pattern_rules = rule; - else - last_pattern_rule->next = rule; - last_pattern_rule = rule; - - /* We got one. Stop looking. */ - goto matched; - } - else - { - /* The old rule stays intact. Destroy the new one. */ - freerule (rule, (struct rule *) 0); - return 0; - } - } - } - - matched:; - - if (r == 0) - { - /* There was no rule to replace. */ - if (pattern_rules == 0) - pattern_rules = rule; - else - last_pattern_rule->next = rule; - last_pattern_rule = rule; - } - - return 1; -} - - -/* Install an implicit pattern rule based on the three text strings - in the structure P points to. These strings come from one of - the arrays of default implicit pattern rules. - TERMINAL specifies what the `terminal' field of the rule should be. */ - -void -install_pattern_rule (p, terminal) - struct pspec *p; - int terminal; -{ - register struct rule *r; - char *ptr; - - r = (struct rule *) xmalloc (sizeof (struct rule)); - - r->targets = (char **) xmalloc (2 * sizeof (char *)); - r->suffixes = (char **) xmalloc (2 * sizeof (char *)); - r->lens = (unsigned int *) xmalloc (2 * sizeof (unsigned int)); - - r->targets[1] = 0; - r->suffixes[1] = 0; - r->lens[1] = 0; - - r->lens[0] = strlen (p->target); - /* These will all be string literals, but we malloc space for - them anyway because somebody might want to free them later on. */ - r->targets[0] = savestring (p->target, r->lens[0]); - r->suffixes[0] = find_percent (r->targets[0]); - if (r->suffixes[0] == 0) - /* Programmer-out-to-lunch error. */ - abort (); - else - ++r->suffixes[0]; - - ptr = p->dep; - r->deps = (struct dep *) multi_glob (parse_file_seq (&ptr, '\0', - sizeof (struct dep), 1), - sizeof (struct dep)); - - if (new_pattern_rule (r, 0)) - { - r->terminal = terminal; - r->cmds = (struct commands *) xmalloc (sizeof (struct commands)); - r->cmds->filename = 0; - r->cmds->lineno = 0; - /* These will all be string literals, but we malloc space for them - anyway because somebody might want to free them later. */ - r->cmds->commands = savestring (p->commands, strlen (p->commands)); - r->cmds->command_lines = 0; - } -} - - -/* Free all the storage used in RULE and take it out of the - pattern_rules chain. LASTRULE is the rule whose next pointer - points to RULE. */ - -static void -freerule (rule, lastrule) - register struct rule *rule, *lastrule; -{ - struct rule *next = rule->next; - register unsigned int i; - - for (i = 0; rule->targets[i] != 0; ++i) - free (rule->targets[i]); - - free ((char *) rule->targets); - free ((char *) rule->suffixes); - free ((char *) rule->lens); - - /* We can't free the storage for the commands because there - are ways that they could be in more than one place: - * If the commands came from a suffix rule, they could also be in - the `struct file's for other suffix rules or plain targets given - on the same makefile line. - * If two suffixes that together make a two-suffix rule were each - given twice in the .SUFFIXES list, and in the proper order, two - identical pattern rules would be created and the second one would - be discarded here, but both would contain the same `struct commands' - pointer from the `struct file' for the suffix rule. */ - - free ((char *) rule); - - if (pattern_rules == rule) - if (lastrule != 0) - abort (); - else - pattern_rules = next; - else if (lastrule != 0) - lastrule->next = next; - if (last_pattern_rule == rule) - last_pattern_rule = lastrule; -} - -/* Create a new pattern rule with the targets in the nil-terminated - array TARGETS. If TARGET_PERCENTS is not nil, it is an array of - pointers into the elements of TARGETS, where the `%'s are. - The new rule has dependencies DEPS and commands from COMMANDS. - It is a terminal rule if TERMINAL is nonzero. This rule overrides - identical rules with different commands if OVERRIDE is nonzero. - - The storage for TARGETS and its elements is used and must not be freed - until the rule is destroyed. The storage for TARGET_PERCENTS is not used; - it may be freed. */ - -void -create_pattern_rule (targets, target_percents, - terminal, deps, commands, override) - char **targets, **target_percents; - int terminal; - struct dep *deps; - struct commands *commands; - int override; -{ - register struct rule *r = (struct rule *) xmalloc (sizeof (struct rule)); - register unsigned int max_targets, i; - - r->cmds = commands; - r->deps = deps; - r->targets = targets; - - max_targets = 2; - r->lens = (unsigned int *) xmalloc (2 * sizeof (unsigned int)); - r->suffixes = (char **) xmalloc (2 * sizeof (char *)); - for (i = 0; targets[i] != 0; ++i) - { - if (i == max_targets - 1) - { - max_targets += 5; - r->lens = (unsigned int *) - xrealloc ((char *) r->lens, max_targets * sizeof (unsigned int)); - r->suffixes = (char **) - xrealloc ((char *) r->suffixes, max_targets * sizeof (char *)); - } - r->lens[i] = strlen (targets[i]); - r->suffixes[i] = (target_percents == 0 ? find_percent (targets[i]) - : target_percents[i]) + 1; - if (r->suffixes[i] == 0) - abort (); - } - - if (i < max_targets - 1) - { - r->lens = (unsigned int *) xrealloc ((char *) r->lens, - (i + 1) * sizeof (unsigned int)); - r->suffixes = (char **) xrealloc ((char *) r->suffixes, - (i + 1) * sizeof (char *)); - } - - if (new_pattern_rule (r, override)) - r->terminal = terminal; -} - -/* Print the data base of rules. */ - -static void /* Useful to call from gdb. */ -print_rule (r) - struct rule *r; -{ - register unsigned int i; - register struct dep *d; - - for (i = 0; r->targets[i] != 0; ++i) - { - fputs (r->targets[i], stdout); - if (r->targets[i + 1] != 0) - putchar (' '); - else - putchar (':'); - } - if (r->terminal) - putchar (':'); - - for (d = r->deps; d != 0; d = d->next) - printf (" %s", dep_name (d)); - putchar ('\n'); - - if (r->cmds != 0) - print_commands (r->cmds); -} - -void -print_rule_data_base () -{ - register unsigned int rules, terminal; - register struct rule *r; - - puts ("\n# Implicit Rules"); - - rules = terminal = 0; - for (r = pattern_rules; r != 0; r = r->next) - { - ++rules; - - putchar ('\n'); - print_rule (r); - - if (r->terminal) - ++terminal; - } - - if (rules == 0) - puts ("\n# No implicit rules."); - else - { - printf ("\n# %u implicit rules, %u", rules, terminal); -#ifndef NO_FLOAT - printf (" (%.1f%%)", (double) terminal / (double) rules * 100.0); -#endif - puts (" terminal."); - } - - if (num_pattern_rules != rules) - fatal ("BUG: num_pattern_rules wrong! %u != %u", - num_pattern_rules, rules); -} diff --git a/buildtools/windows/source/make/rule.h b/buildtools/windows/source/make/rule.h deleted file mode 100644 index 75d43d6624c..00000000000 --- a/buildtools/windows/source/make/rule.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Definitions for using pattern rules in GNU Make. -Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Structure used for pattern rules. */ - -struct rule - { - struct rule *next; - char **targets; /* Targets of the rule. */ - unsigned int *lens; /* Lengths of each target. */ - char **suffixes; /* Suffixes (after `%') of each target. */ - struct dep *deps; /* Dependencies of the rule. */ - struct commands *cmds; /* Commands to execute. */ - char terminal; /* If terminal (double-colon). */ - char in_use; /* If in use by a parent pattern_search. */ - }; - -/* For calling install_pattern_rule. */ -struct pspec - { - char *target, *dep, *commands; - }; - - -extern struct rule *pattern_rules; -extern struct rule *last_pattern_rule; -extern unsigned int num_pattern_rules; - -extern unsigned int max_pattern_deps; -extern unsigned int max_pattern_targets; -extern unsigned int max_pattern_dep_length; - -extern struct file *suffix_file; -extern unsigned int maxsuffix; - - -extern void install_pattern_rule (); -int new_pattern_rule (); diff --git a/buildtools/windows/source/make/signame.c b/buildtools/windows/source/make/signame.c deleted file mode 100644 index 96b9c3e238d..00000000000 --- a/buildtools/windows/source/make/signame.c +++ /dev/null @@ -1,304 +0,0 @@ -/* Convert between signal names and numbers. - Copyright (C) 1990, 1992, 1993, 1995 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include /* Some systems need this for . */ -#include - -/* Some systems declare `sys_siglist in ; if - configure defined SYS_SIGLIST_DECLARED, it may expect - to find the declaration there. */ -#ifdef HAVE_UNISTD_H -#include -#endif - - -/* Some systems do not define NSIG in . */ -#ifndef NSIG -#ifdef _NSIG -#define NSIG _NSIG -#else -#define NSIG 32 -#endif -#endif - -#if !__STDC__ -#define const -#endif - -#include "signame.h" - -#ifndef HAVE_SYS_SIGLIST -/* There is too much variation in Sys V signal numbers and names, so - we must initialize them at runtime. */ - -static const char undoc[] = "unknown signal"; - -const char *sys_siglist[NSIG]; - -#else /* HAVE_SYS_SIGLIST. */ - -#ifndef SYS_SIGLIST_DECLARED -extern char *sys_siglist[]; -#endif /* Not SYS_SIGLIST_DECLARED. */ - -#endif /* Not HAVE_SYS_SIGLIST. */ - -/* Table of abbreviations for signals. Note: A given number can - appear more than once with different abbreviations. */ -typedef struct - { - int number; - const char *abbrev; - } num_abbrev; -static num_abbrev sig_table[NSIG*2]; -/* Number of elements of sig_table used. */ -static int sig_table_nelts = 0; - -/* Enter signal number NUMBER into the tables with ABBREV and NAME. */ - -static void -init_sig (number, abbrev, name) - int number; - const char *abbrev; - const char *name; -{ -#ifndef HAVE_SYS_SIGLIST - sys_siglist[number] = name; -#endif - sig_table[sig_table_nelts].number = number; - sig_table[sig_table_nelts++].abbrev = abbrev; -} - -void -signame_init () -{ -#ifndef HAVE_SYS_SIGLIST - int i; - /* Initialize signal names. */ - for (i = 0; i < NSIG; i++) - sys_siglist[i] = undoc; -#endif /* !HAVE_SYS_SIGLIST */ - - /* Initialize signal names. */ -#if defined (SIGHUP) - init_sig (SIGHUP, "HUP", "Hangup"); -#endif -#if defined (SIGINT) - init_sig (SIGINT, "INT", "Interrupt"); -#endif -#if defined (SIGQUIT) - init_sig (SIGQUIT, "QUIT", "Quit"); -#endif -#if defined (SIGILL) - init_sig (SIGILL, "ILL", "Illegal Instruction"); -#endif -#if defined (SIGTRAP) - init_sig (SIGTRAP, "TRAP", "Trace/breakpoint trap"); -#endif - /* If SIGIOT == SIGABRT, we want to print it as SIGABRT because - SIGABRT is in ANSI and POSIX.1 and SIGIOT isn't. */ -#if defined (SIGABRT) - init_sig (SIGABRT, "ABRT", "Aborted"); -#endif -#if defined (SIGIOT) - init_sig (SIGIOT, "IOT", "IOT trap"); -#endif -#if defined (SIGEMT) - init_sig (SIGEMT, "EMT", "EMT trap"); -#endif -#if defined (SIGFPE) - init_sig (SIGFPE, "FPE", "Floating point exception"); -#endif -#if defined (SIGKILL) - init_sig (SIGKILL, "KILL", "Killed"); -#endif -#if defined (SIGBUS) - init_sig (SIGBUS, "BUS", "Bus error"); -#endif -#if defined (SIGSEGV) - init_sig (SIGSEGV, "SEGV", "Segmentation fault"); -#endif -#if defined (SIGSYS) - init_sig (SIGSYS, "SYS", "Bad system call"); -#endif -#if defined (SIGPIPE) - init_sig (SIGPIPE, "PIPE", "Broken pipe"); -#endif -#if defined (SIGALRM) - init_sig (SIGALRM, "ALRM", "Alarm clock"); -#endif -#if defined (SIGTERM) - init_sig (SIGTERM, "TERM", "Terminated"); -#endif -#if defined (SIGUSR1) - init_sig (SIGUSR1, "USR1", "User defined signal 1"); -#endif -#if defined (SIGUSR2) - init_sig (SIGUSR2, "USR2", "User defined signal 2"); -#endif - /* If SIGCLD == SIGCHLD, we want to print it as SIGCHLD because that - is what is in POSIX.1. */ -#if defined (SIGCHLD) - init_sig (SIGCHLD, "CHLD", "Child exited"); -#endif -#if defined (SIGCLD) - init_sig (SIGCLD, "CLD", "Child exited"); -#endif -#if defined (SIGPWR) - init_sig (SIGPWR, "PWR", "Power failure"); -#endif -#if defined (SIGTSTP) - init_sig (SIGTSTP, "TSTP", "Stopped"); -#endif -#if defined (SIGTTIN) - init_sig (SIGTTIN, "TTIN", "Stopped (tty input)"); -#endif -#if defined (SIGTTOU) - init_sig (SIGTTOU, "TTOU", "Stopped (tty output)"); -#endif -#if defined (SIGSTOP) - init_sig (SIGSTOP, "STOP", "Stopped (signal)"); -#endif -#if defined (SIGXCPU) - init_sig (SIGXCPU, "XCPU", "CPU time limit exceeded"); -#endif -#if defined (SIGXFSZ) - init_sig (SIGXFSZ, "XFSZ", "File size limit exceeded"); -#endif -#if defined (SIGVTALRM) - init_sig (SIGVTALRM, "VTALRM", "Virtual timer expired"); -#endif -#if defined (SIGPROF) - init_sig (SIGPROF, "PROF", "Profiling timer expired"); -#endif -#if defined (SIGWINCH) - /* "Window size changed" might be more accurate, but even if that - is all that it means now, perhaps in the future it will be - extended to cover other kinds of window changes. */ - init_sig (SIGWINCH, "WINCH", "Window changed"); -#endif -#if defined (SIGCONT) - init_sig (SIGCONT, "CONT", "Continued"); -#endif -#if defined (SIGURG) - init_sig (SIGURG, "URG", "Urgent I/O condition"); -#endif -#if defined (SIGIO) - /* "I/O pending" has also been suggested. A disadvantage is - that signal only happens when the process has - asked for it, not everytime I/O is pending. Another disadvantage - is the confusion from giving it a different name than under Unix. */ - init_sig (SIGIO, "IO", "I/O possible"); -#endif -#if defined (SIGWIND) - init_sig (SIGWIND, "WIND", "SIGWIND"); -#endif -#if defined (SIGPHONE) - init_sig (SIGPHONE, "PHONE", "SIGPHONE"); -#endif -#if defined (SIGPOLL) - init_sig (SIGPOLL, "POLL", "I/O possible"); -#endif -#if defined (SIGLOST) - init_sig (SIGLOST, "LOST", "Resource lost"); -#endif -#if defined (SIGDANGER) - init_sig (SIGDANGER, "DANGER", "Danger signal"); -#endif -#if defined (SIGINFO) - init_sig (SIGINFO, "INFO", "Information request"); -#endif -} - -/* Return the abbreviation for signal NUMBER. */ - -char * -sig_abbrev (number) - int number; -{ - int i; - - if (sig_table_nelts == 0) - signame_init (); - - for (i = 0; i < sig_table_nelts; i++) - if (sig_table[i].number == number) - return (char *)sig_table[i].abbrev; - return NULL; -} - -/* Return the signal number for an ABBREV, or -1 if there is no - signal by that name. */ - -int -sig_number (abbrev) - const char *abbrev; -{ - int i; - - if (sig_table_nelts == 0) - signame_init (); - - /* Skip over "SIG" if present. */ - if (abbrev[0] == 'S' && abbrev[1] == 'I' && abbrev[2] == 'G') - abbrev += 3; - - for (i = 0; i < sig_table_nelts; i++) - if (abbrev[0] == sig_table[i].abbrev[0] - && strcmp (abbrev, sig_table[i].abbrev) == 0) - return sig_table[i].number; - return -1; -} - -#ifndef HAVE_PSIGNAL -/* Print to standard error the name of SIGNAL, preceded by MESSAGE and - a colon, and followed by a newline. */ - -void -psignal (signal, message) - int signal; - const char *message; -{ - if (signal <= 0 || signal >= NSIG) - fprintf (stderr, "%s: unknown signal", message); - else - fprintf (stderr, "%s: %s\n", message, sys_siglist[signal]); -} -#endif - -#ifndef HAVE_STRSIGNAL -/* Return the string associated with the signal number. */ - -char * -strsignal (signal) - int signal; -{ - static char buf[] = "Signal 12345678901234567890"; - - if (signal > 0 || signal < NSIG) - return (char *) sys_siglist[signal]; - - sprintf (buf, "Signal %d", signal); - return buf; -} -#endif diff --git a/buildtools/windows/source/make/signame.h b/buildtools/windows/source/make/signame.h deleted file mode 100644 index 18b83cbb890..00000000000 --- a/buildtools/windows/source/make/signame.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Convert between signal names and numbers. - Copyright (C) 1990, 1992, 1993, 1995 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#if defined (__STDC__) && __STDC__ - -/* Initialize `sys_siglist'. */ -void signame_init (void); - -/* Return the abbreviation (e.g. ABRT, FPE, etc.) for signal NUMBER. - Do not return this as a const char *. The caller might want to - assign it to a char *. */ -char *sig_abbrev (int number); - -/* Return the signal number for an ABBREV, or -1 if there is no - signal by that name. */ -int sig_number (const char *abbrev); - -/* Avoid conflicts with a system header file that might define these three. */ - -#ifndef HAVE_PSIGNAL -/* Print to standard error the name of SIGNAL, preceded by MESSAGE and - a colon, and followed by a newline. */ -void psignal (int signal, const char *message); -#endif - -#ifndef HAVE_STRSIGNAL -/* Return the name of SIGNAL. */ -char *strsignal (int signal); -#endif - -#if !defined (HAVE_SYS_SIGLIST) -/* Names for signals from 0 to NSIG-1. */ -extern const char *sys_siglist[]; -#endif - -#else - -void signame_init (); -char *sig_abbrev (); -int sig_number (); -#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL) -void psignal (); -#endif -#ifndef HAVE_STRSIGNAL -char *strsignal (); -#endif -#if !defined (HAVE_SYS_SIGLIST) -extern char *sys_siglist[]; -#endif - -#endif diff --git a/buildtools/windows/source/make/texinfo.tex b/buildtools/windows/source/make/texinfo.tex deleted file mode 100644 index 554cc37c52d..00000000000 --- a/buildtools/windows/source/make/texinfo.tex +++ /dev/null @@ -1,4421 +0,0 @@ -%% TeX macros to handle texinfo files - -% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. - -%This texinfo.tex file is free software; you can redistribute it and/or -%modify it under the terms of the GNU General Public License as -%published by the Free Software Foundation; either version 2, or (at -%your option) any later version. - -%This texinfo.tex file is distributed in the hope that it will be -%useful, but WITHOUT ANY WARRANTY; without even the implied warranty -%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%General Public License for more details. - -%You should have received a copy of the GNU General Public License -%along with this texinfo.tex file; see the file COPYING. If not, write -%to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, -%USA. - - -%In other words, you are welcome to use, share and improve this program. -%You are forbidden to forbid anyone else to use, share and improve -%what you give them. Help stamp out software-hoarding! - - -% Send bug reports to bug-texinfo@prep.ai.mit.edu. -% Please include a *precise* test case in each bug report. - - -% Make it possible to create a .fmt file just by loading this file: -% if the underlying format is not loaded, start by loading it now. -% Added by gildea November 1993. -\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi - -% This automatically updates the version number based on RCS. -\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 1.1 $ -\message{Loading texinfo package [Version \texinfoversion]:} - -% If in a .fmt file, print the version number -% and turn on active characters that we couldn't do earlier because -% they might have appeared in the input file name. -\everyjob{\message{[Texinfo version \texinfoversion]}\message{} - \catcode`+=\active \catcode`\_=\active} - -% Save some parts of plain tex whose names we will redefine. - -\let\ptextilde=\~ -\let\ptexlbrace=\{ -\let\ptexrbrace=\} -\let\ptexdots=\dots -\let\ptexdot=\. -\let\ptexstar=\* -\let\ptexend=\end -\let\ptexbullet=\bullet -\let\ptexb=\b -\let\ptexc=\c -\let\ptexi=\i -\let\ptext=\t -\let\ptexl=\l -\let\ptexL=\L - -% Be sure we're in horizontal mode when doing a tie, since we make space -% equivalent to this in @example-like environments. Otherwise, a space -% at the beginning of a line will start with \penalty -- and -% since \penalty is valid in vertical mode, we'd end up putting the -% penalty on the vertical list instead of in the new paragraph. -{\catcode`@ = 11 - \gdef\tie{\leavevmode\penalty\@M\ } -} -\let\~ = \tie % And make it available as @~. - -\message{Basics,} -\chardef\other=12 - -% If this character appears in an error message or help string, it -% starts a new line in the output. -\newlinechar = `^^J - -% Set up fixed words for English. -\ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi% -\def\putwordInfo{Info}% -\ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi% -\ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi% -\ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi% -\ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi% -\ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi% -\ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi% -\ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi% -\ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi% -\ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi% - -% Ignore a token. -% -\def\gobble#1{} - -\hyphenation{ap-pen-dix} -\hyphenation{mini-buf-fer mini-buf-fers} -\hyphenation{eshell} - -% Margin to add to right of even pages, to left of odd pages. -\newdimen \bindingoffset \bindingoffset=0pt -\newdimen \normaloffset \normaloffset=\hoffset -\newdimen\pagewidth \newdimen\pageheight -\pagewidth=\hsize \pageheight=\vsize - -% Sometimes it is convenient to have everything in the transcript file -% and nothing on the terminal. We don't just call \tracingall here, -% since that produces some useless output on the terminal. -% -\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% -\def\loggingall{\tracingcommands2 \tracingstats2 - \tracingpages1 \tracingoutput1 \tracinglostchars1 - \tracingmacros2 \tracingparagraphs1 \tracingrestores1 - \showboxbreadth\maxdimen\showboxdepth\maxdimen -}% - -%---------------------Begin change----------------------- -% -%%%% For @cropmarks command. -% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986 -% -\newdimen\cornerlong \newdimen\cornerthick -\newdimen \topandbottommargin -\newdimen \outerhsize \newdimen \outervsize -\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks -\outerhsize=7in -%\outervsize=9.5in -% Alternative @smallbook page size is 9.25in -\outervsize=9.25in -\topandbottommargin=.75in -% -%---------------------End change----------------------- - -% \onepageout takes a vbox as an argument. Note that \pagecontents -% does insertions itself, but you have to call it yourself. -\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}} -\def\onepageout#1{\hoffset=\normaloffset -\ifodd\pageno \advance\hoffset by \bindingoffset -\else \advance\hoffset by -\bindingoffset\fi -{\escapechar=`\\\relax % makes sure backslash is used in output files. -\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}% -{\let\hsize=\pagewidth \makefootline}}}% -\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi} - -%%%% For @cropmarks command %%%% - -% Here is a modification of the main output routine for Near East Publications -% This provides right-angle cropmarks at all four corners. -% The contents of the page are centerlined into the cropmarks, -% and any desired binding offset is added as an \hskip on either -% site of the centerlined box. (P. A. MacKay, 12 November, 1986) -% -\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up -{\escapechar=`\\\relax % makes sure backslash is used in output files. - \shipout - \vbox to \outervsize{\hsize=\outerhsize - \vbox{\line{\ewtop\hfill\ewtop}} - \nointerlineskip - \line{\vbox{\moveleft\cornerthick\nstop} - \hfill - \vbox{\moveright\cornerthick\nstop}} - \vskip \topandbottommargin - \centerline{\ifodd\pageno\hskip\bindingoffset\fi - \vbox{ - {\let\hsize=\pagewidth \makeheadline} - \pagebody{#1} - {\let\hsize=\pagewidth \makefootline}} - \ifodd\pageno\else\hskip\bindingoffset\fi} - \vskip \topandbottommargin plus1fill minus1fill - \boxmaxdepth\cornerthick - \line{\vbox{\moveleft\cornerthick\nsbot} - \hfill - \vbox{\moveright\cornerthick\nsbot}} - \nointerlineskip - \vbox{\line{\ewbot\hfill\ewbot}} - }} - \advancepageno - \ifnum\outputpenalty>-20000 \else\dosupereject\fi} -% -% Do @cropmarks to get crop marks -\def\cropmarks{\let\onepageout=\croppageout } - -\newinsert\margin \dimen\margin=\maxdimen - -\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} -{\catcode`\@ =11 -\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi -% marginal hacks, juha@viisa.uucp (Juha Takala) -\ifvoid\margin\else % marginal info is present - \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi -\dimen@=\dp#1 \unvbox#1 -\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi -\ifr@ggedbottom \kern-\dimen@ \vfil \fi} -} - -% -% Here are the rules for the cropmarks. Note that they are -% offset so that the space between them is truly \outerhsize or \outervsize -% (P. A. MacKay, 12 November, 1986) -% -\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} -\def\nstop{\vbox - {\hrule height\cornerthick depth\cornerlong width\cornerthick}} -\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} -\def\nsbot{\vbox - {\hrule height\cornerlong depth\cornerthick width\cornerthick}} - -% Parse an argument, then pass it to #1. The argument is the rest of -% the input line (except we remove a trailing comment). #1 should be a -% macro which expects an ordinary undelimited TeX argument. -% -\def\parsearg#1{% - \let\next = #1% - \begingroup - \obeylines - \futurelet\temp\parseargx -} - -% If the next token is an obeyed space (from an @example environment or -% the like), remove it and recurse. Otherwise, we're done. -\def\parseargx{% - % \obeyedspace is defined far below, after the definition of \sepspaces. - \ifx\obeyedspace\temp - \expandafter\parseargdiscardspace - \else - \expandafter\parseargline - \fi -} - -% Remove a single space (as the delimiter token to the macro call). -{\obeyspaces % - \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} - -{\obeylines % - \gdef\parseargline#1^^M{% - \endgroup % End of the group started in \parsearg. - % - % First remove any @c comment, then any @comment. - % Result of each macro is put in \toks0. - \argremovec #1\c\relax % - \expandafter\argremovecomment \the\toks0 \comment\relax % - % - % Call the caller's macro, saved as \next in \parsearg. - \expandafter\next\expandafter{\the\toks0}% - }% -} - -% Since all \c{,omment} does is throw away the argument, we can let TeX -% do that for us. The \relax here is matched by the \relax in the call -% in \parseargline; it could be more or less anything, its purpose is -% just to delimit the argument to the \c. -\def\argremovec#1\c#2\relax{\toks0 = {#1}} -\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} - -% \argremovec{,omment} might leave us with trailing spaces, though; e.g., -% @end itemize @c foo -% will have two active spaces as part of the argument with the -% `itemize'. Here we remove all active spaces from #1, and assign the -% result to \toks0. -% -% This loses if there are any *other* active characters besides spaces -% in the argument -- _ ^ +, for example -- since they get expanded. -% Fortunately, Texinfo does not define any such commands. (If it ever -% does, the catcode of the characters in questionwill have to be changed -% here.) But this means we cannot call \removeactivespaces as part of -% \argremovec{,omment}, since @c uses \parsearg, and thus the argument -% that \parsearg gets might well have any character at all in it. -% -\def\removeactivespaces#1{% - \begingroup - \ignoreactivespaces - \edef\temp{#1}% - \global\toks0 = \expandafter{\temp}% - \endgroup -} - -% Change the active space to expand to nothing. -% -\begingroup - \obeyspaces - \gdef\ignoreactivespaces{\obeyspaces\let =\empty} -\endgroup - - -\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} - -%% These are used to keep @begin/@end levels from running away -%% Call \inENV within environments (after a \begingroup) -\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} -\def\ENVcheck{% -\ifENV\errmessage{Still within an environment. Type Return to continue.} -\endgroup\fi} % This is not perfect, but it should reduce lossage - -% @begin foo is the same as @foo, for now. -\newhelp\EMsimple{Type to continue.} - -\outer\def\begin{\parsearg\beginxxx} - -\def\beginxxx #1{% -\expandafter\ifx\csname #1\endcsname\relax -{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else -\csname #1\endcsname\fi} - -% @end foo executes the definition of \Efoo. -% -\def\end{\parsearg\endxxx} -\def\endxxx #1{% - \removeactivespaces{#1}% - \edef\endthing{\the\toks0}% - % - \expandafter\ifx\csname E\endthing\endcsname\relax - \expandafter\ifx\csname \endthing\endcsname\relax - % There's no \foo, i.e., no ``environment'' foo. - \errhelp = \EMsimple - \errmessage{Undefined command `@end \endthing'}% - \else - \unmatchedenderror\endthing - \fi - \else - % Everything's ok; the right environment has been started. - \csname E\endthing\endcsname - \fi -} - -% There is an environment #1, but it hasn't been started. Give an error. -% -\def\unmatchedenderror#1{% - \errhelp = \EMsimple - \errmessage{This `@end #1' doesn't have a matching `@#1'}% -} - -% Define the control sequence \E#1 to give an unmatched @end error. -% -\def\defineunmatchedend#1{% - \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% -} - - -% Single-spacing is done by various environments (specifically, in -% \nonfillstart and \quotations). -\newskip\singlespaceskip \singlespaceskip = 12.5pt -\def\singlespace{% - % Why was this kern here? It messes up equalizing space above and below - % environments. --karl, 6may93 - %{\advance \baselineskip by -\singlespaceskip - %\kern \baselineskip}% - \setleading \singlespaceskip -} - -%% Simple single-character @ commands - -% @@ prints an @ -% Kludge this until the fonts are right (grr). -\def\@{{\tt \char '100}} - -% This is turned off because it was never documented -% and you can use @w{...} around a quote to suppress ligatures. -%% Define @` and @' to be the same as ` and ' -%% but suppressing ligatures. -%\def\`{{`}} -%\def\'{{'}} - -% Used to generate quoted braces. - -\def\mylbrace {{\tt \char '173}} -\def\myrbrace {{\tt \char '175}} -\let\{=\mylbrace -\let\}=\myrbrace - -% @: forces normal size whitespace following. -\def\:{\spacefactor=1000 } - -% @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} - -% @. is an end-of-sentence period. -\def\.{.\spacefactor=3000 } - -% @enddots{} is an end-of-sentence ellipsis. -\gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000} - -% @! is an end-of-sentence bang. -\gdef\!{!\spacefactor=3000 } - -% @? is an end-of-sentence query. -\gdef\?{?\spacefactor=3000 } - -% @w prevents a word break. Without the \leavevmode, @w at the -% beginning of a paragraph, when TeX is still in vertical mode, would -% produce a whole line of output instead of starting the paragraph. -\def\w#1{\leavevmode\hbox{#1}} - -% @group ... @end group forces ... to be all on one page, by enclosing -% it in a TeX vbox. We use \vtop instead of \vbox to construct the box -% to keep its height that of a normal line. According to the rules for -% \topskip (p.114 of the TeXbook), the glue inserted is -% max (\topskip - \ht (first item), 0). If that height is large, -% therefore, no glue is inserted, and the space between the headline and -% the text is small, which looks bad. -% -\def\group{\begingroup - \ifnum\catcode13=\active \else - \errhelp = \groupinvalidhelp - \errmessage{@group invalid in context where filling is enabled}% - \fi - % - % The \vtop we start below produces a box with normal height and large - % depth; thus, TeX puts \baselineskip glue before it, and (when the - % next line of text is done) \lineskip glue after it. (See p.82 of - % the TeXbook.) Thus, space below is not quite equal to space - % above. But it's pretty close. - \def\Egroup{% - \egroup % End the \vtop. - \endgroup % End the \group. - }% - % - \vtop\bgroup - % We have to put a strut on the last line in case the @group is in - % the midst of an example, rather than completely enclosing it. - % Otherwise, the interline space between the last line of the group - % and the first line afterwards is too small. But we can't put the - % strut in \Egroup, since there it would be on a line by itself. - % Hence this just inserts a strut at the beginning of each line. - \everypar = {\strut}% - % - % Since we have a strut on every line, we don't need any of TeX's - % normal interline spacing. - \offinterlineskip - % - % OK, but now we have to do something about blank - % lines in the input in @example-like environments, which normally - % just turn into \lisppar, which will insert no space now that we've - % turned off the interline space. Simplest is to make them be an - % empty paragraph. - \ifx\par\lisppar - \edef\par{\leavevmode \par}% - % - % Reset ^^M's definition to new definition of \par. - \obeylines - \fi - % - % Do @comment since we are called inside an environment such as - % @example, where each end-of-line in the input causes an - % end-of-line in the output. We don't want the end-of-line after - % the `@group' to put extra space in the output. Since @group - % should appear on a line by itself (according to the Texinfo - % manual), we don't worry about eating any user text. - \comment -} -% -% TeX puts in an \escapechar (i.e., `@') at the beginning of the help -% message, so this ends up printing `@group can only ...'. -% -\newhelp\groupinvalidhelp{% -group can only be used in environments such as @example,^^J% -where each line of input produces a line of output.} - -% @need space-in-mils -% forces a page break if there is not space-in-mils remaining. - -\newdimen\mil \mil=0.001in - -\def\need{\parsearg\needx} - -% Old definition--didn't work. -%\def\needx #1{\par % -%% This method tries to make TeX break the page naturally -%% if the depth of the box does not fit. -%{\baselineskip=0pt% -%\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000 -%\prevdepth=-1000pt -%}} - -\def\needx#1{% - % Go into vertical mode, so we don't make a big box in the middle of a - % paragraph. - \par - % - % Don't add any leading before our big empty box, but allow a page - % break, since the best break might be right here. - \allowbreak - \nointerlineskip - \vtop to #1\mil{\vfil}% - % - % TeX does not even consider page breaks if a penalty added to the - % main vertical list is 10000 or more. But in order to see if the - % empty box we just added fits on the page, we must make it consider - % page breaks. On the other hand, we don't want to actually break the - % page after the empty box. So we use a penalty of 9999. - % - % There is an extremely small chance that TeX will actually break the - % page at this \penalty, if there are no other feasible breakpoints in - % sight. (If the user is using lots of big @group commands, which - % almost-but-not-quite fill up a page, TeX will have a hard time doing - % good page breaking, for example.) However, I could not construct an - % example where a page broke at this \penalty; if it happens in a real - % document, then we can reconsider our strategy. - \penalty9999 - % - % Back up by the size of the box, whether we did a page break or not. - \kern -#1\mil - % - % Do not allow a page break right after this kern. - \nobreak -} - -% @br forces paragraph break - -\let\br = \par - -% @dots{} output some dots - -\def\dots{$\ldots$} - -% @page forces the start of a new page - -\def\page{\par\vfill\supereject} - -% @exdent text.... -% outputs text on separate line in roman font, starting at standard page margin - -% This records the amount of indent in the innermost environment. -% That's how much \exdent should take out. -\newskip\exdentamount - -% This defn is used inside fill environments such as @defun. -\def\exdent{\parsearg\exdentyyy} -\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} - -% This defn is used inside nofill environments such as @example. -\def\nofillexdent{\parsearg\nofillexdentyyy} -\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount -\leftline{\hskip\leftskip{\rm#1}}}} - -%\hbox{{\rm#1}}\hfil\break}} - -% @include file insert text of that file as input. - -\def\include{\parsearg\includezzz} -%Use \input\thisfile to avoid blank after \input, which may be an active -%char (in which case the blank would become the \input argument). -%The grouping keeps the value of \thisfile correct even when @include -%is nested. -\def\includezzz #1{\begingroup -\def\thisfile{#1}\input\thisfile -\endgroup} - -\def\thisfile{} - -% @center line outputs that line, centered - -\def\center{\parsearg\centerzzz} -\def\centerzzz #1{{\advance\hsize by -\leftskip -\advance\hsize by -\rightskip -\centerline{#1}}} - -% @sp n outputs n lines of vertical space - -\def\sp{\parsearg\spxxx} -\def\spxxx #1{\par \vskip #1\baselineskip} - -% @comment ...line which is ignored... -% @c is the same as @comment -% @ignore ... @end ignore is another way to write a comment - -\def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other% -\parsearg \commentxxx} - -\def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 } - -\let\c=\comment - -% Prevent errors for section commands. -% Used in @ignore and in failing conditionals. -\def\ignoresections{% -\let\chapter=\relax -\let\unnumbered=\relax -\let\top=\relax -\let\unnumberedsec=\relax -\let\unnumberedsection=\relax -\let\unnumberedsubsec=\relax -\let\unnumberedsubsection=\relax -\let\unnumberedsubsubsec=\relax -\let\unnumberedsubsubsection=\relax -\let\section=\relax -\let\subsec=\relax -\let\subsubsec=\relax -\let\subsection=\relax -\let\subsubsection=\relax -\let\appendix=\relax -\let\appendixsec=\relax -\let\appendixsection=\relax -\let\appendixsubsec=\relax -\let\appendixsubsection=\relax -\let\appendixsubsubsec=\relax -\let\appendixsubsubsection=\relax -\let\contents=\relax -\let\smallbook=\relax -\let\titlepage=\relax -} - -% Used in nested conditionals, where we have to parse the Texinfo source -% and so want to turn off most commands, in case they are used -% incorrectly. -% -\def\ignoremorecommands{% - \let\defcv = \relax - \let\deffn = \relax - \let\deffnx = \relax - \let\defindex = \relax - \let\defivar = \relax - \let\defmac = \relax - \let\defmethod = \relax - \let\defop = \relax - \let\defopt = \relax - \let\defspec = \relax - \let\deftp = \relax - \let\deftypefn = \relax - \let\deftypefun = \relax - \let\deftypevar = \relax - \let\deftypevr = \relax - \let\defun = \relax - \let\defvar = \relax - \let\defvr = \relax - \let\ref = \relax - \let\xref = \relax - \let\printindex = \relax - \let\pxref = \relax - \let\settitle = \relax - \let\include = \relax - \let\lowersections = \relax - \let\down = \relax - \let\raisesections = \relax - \let\up = \relax - \let\set = \relax - \let\clear = \relax - \let\item = \relax - \let\message = \relax -} - -% Ignore @ignore ... @end ignore. -% -\def\ignore{\doignore{ignore}} - -% Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text. -% -\def\ifinfo{\doignore{ifinfo}} -\def\ifhtml{\doignore{ifhtml}} -\def\html{\doignore{html}} -\def\menu{\doignore{menu}} -\def\direntry{\doignore{direntry}} - -% Ignore text until a line `@end #1'. -% -\def\doignore#1{\begingroup - % Don't complain about control sequences we have declared \outer. - \ignoresections - % - % Define a command to swallow text until we reach `@end #1'. - \long\def\doignoretext##1\end #1{\enddoignore}% - % - % Make sure that spaces turn into tokens that match what \doignoretext wants. - \catcode32 = 10 - % - % And now expand that command. - \doignoretext -} - -% What we do to finish off ignored text. -% -\def\enddoignore{\endgroup\ignorespaces}% - -\newif\ifwarnedobs\warnedobsfalse -\def\obstexwarn{% - \ifwarnedobs\relax\else - % We need to warn folks that they may have trouble with TeX 3.0. - % This uses \immediate\write16 rather than \message to get newlines. - \immediate\write16{} - \immediate\write16{***WARNING*** for users of Unix TeX 3.0!} - \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} - \immediate\write16{If you are running another version of TeX, relax.} - \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} - \immediate\write16{ Then upgrade your TeX installation if you can.} - \immediate\write16{If you are stuck with version 3.0, run the} - \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} - \immediate\write16{ to use a workaround.} - \immediate\write16{} - \warnedobstrue - \fi -} - -% **In TeX 3.0, setting text in \nullfont hangs tex. For a -% workaround (which requires the file ``dummy.tfm'' to be installed), -% uncomment the following line: -%%%%%\font\nullfont=dummy\let\obstexwarn=\relax - -% Ignore text, except that we keep track of conditional commands for -% purposes of nesting, up to an `@end #1' command. -% -\def\nestedignore#1{% - \obstexwarn - % We must actually expand the ignored text to look for the @end - % command, so that nested ignore constructs work. Thus, we put the - % text into a \vbox and then do nothing with the result. To minimize - % the change of memory overflow, we follow the approach outlined on - % page 401 of the TeXbook: make the current font be a dummy font. - % - \setbox0 = \vbox\bgroup - % Don't complain about control sequences we have declared \outer. - \ignoresections - % - % Define `@end #1' to end the box, which will in turn undefine the - % @end command again. - \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% - % - % We are going to be parsing Texinfo commands. Most cause no - % trouble when they are used incorrectly, but some commands do - % complicated argument parsing or otherwise get confused, so we - % undefine them. - % - % We can't do anything about stray @-signs, unfortunately; - % they'll produce `undefined control sequence' errors. - \ignoremorecommands - % - % Set the current font to be \nullfont, a TeX primitive, and define - % all the font commands to also use \nullfont. We don't use - % dummy.tfm, as suggested in the TeXbook, because not all sites - % might have that installed. Therefore, math mode will still - % produce output, but that should be an extremely small amount of - % stuff compared to the main input. - % - \nullfont - \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont - \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont - \let\tensf = \nullfont - % Similarly for index fonts (mostly for their use in - % smallexample) - \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont - \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont - \let\indsf = \nullfont - % - % Don't complain when characters are missing from the fonts. - \tracinglostchars = 0 - % - % Don't bother to do space factor calculations. - \frenchspacing - % - % Don't report underfull hboxes. - \hbadness = 10000 - % - % Do minimal line-breaking. - \pretolerance = 10000 - % - % Do not execute instructions in @tex - \def\tex{\doignore{tex}} -} - -% @set VAR sets the variable VAR to an empty value. -% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. -% -% Since we want to separate VAR from REST-OF-LINE (which might be -% empty), we can't just use \parsearg; we have to insert a space of our -% own to delimit the rest of the line, and then take it out again if we -% didn't need it. -% -\def\set{\parsearg\setxxx} -\def\setxxx#1{\setyyy#1 \endsetyyy} -\def\setyyy#1 #2\endsetyyy{% - \def\temp{#2}% - \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty - \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. - \fi -} -% Can't use \xdef to pre-expand #2 and save some time, since \temp or -% \next or other control sequences that we've defined might get us into -% an infinite loop. Consider `@set foo @cite{bar}'. -\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} - -% @clear VAR clears (i.e., unsets) the variable VAR. -% -\def\clear{\parsearg\clearxxx} -\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} - -% @value{foo} gets the text saved in variable foo. -% -\def\value#1{\expandafter - \ifx\csname SET#1\endcsname\relax - {\{No value for ``#1''\}} - \else \csname SET#1\endcsname \fi} - -% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined -% with @set. -% -\def\ifset{\parsearg\ifsetxxx} -\def\ifsetxxx #1{% - \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifsetfail - \else - \expandafter\ifsetsucceed - \fi -} -\def\ifsetsucceed{\conditionalsucceed{ifset}} -\def\ifsetfail{\nestedignore{ifset}} -\defineunmatchedend{ifset} - -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been -% defined with @set, or has been undefined with @clear. -% -\def\ifclear{\parsearg\ifclearxxx} -\def\ifclearxxx #1{% - \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifclearsucceed - \else - \expandafter\ifclearfail - \fi -} -\def\ifclearsucceed{\conditionalsucceed{ifclear}} -\def\ifclearfail{\nestedignore{ifclear}} -\defineunmatchedend{ifclear} - -% @iftex always succeeds; we read the text following, through @end -% iftex). But `@end iftex' should be valid only after an @iftex. -% -\def\iftex{\conditionalsucceed{iftex}} -\defineunmatchedend{iftex} - -% We can't just want to start a group at @iftex (for example) and end it -% at @end iftex, since then @set commands inside the conditional have no -% effect (they'd get reverted at the end of the group). So we must -% define \Eiftex to redefine itself to be its previous value. (We can't -% just define it to fail again with an ``unmatched end'' error, since -% the @ifset might be nested.) -% -\def\conditionalsucceed#1{% - \edef\temp{% - % Remember the current value of \E#1. - \let\nece{prevE#1} = \nece{E#1}% - % - % At the `@end #1', redefine \E#1 to be its previous value. - \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% - }% - \temp -} - -% We need to expand lots of \csname's, but we don't want to expand the -% control sequences after we've constructed them. -% -\def\nece#1{\expandafter\noexpand\csname#1\endcsname} - -% @asis just yields its argument. Used with @table, for example. -% -\def\asis#1{#1} - -% @math means output in math mode. -% We don't use $'s directly in the definition of \math because control -% sequences like \math are expanded when the toc file is written. Then, -% we read the toc file back, the $'s will be normal characters (as they -% should be, according to the definition of Texinfo). So we must use a -% control sequence to switch into and out of math mode. -% -% This isn't quite enough for @math to work properly in indices, but it -% seems unlikely it will ever be needed there. -% -\let\implicitmath = $ -\def\math#1{\implicitmath #1\implicitmath} - -% @bullet and @minus need the same treatment as @math, just above. -\def\bullet{\implicitmath\ptexbullet\implicitmath} -\def\minus{\implicitmath-\implicitmath} - -\def\node{\ENVcheck\parsearg\nodezzz} -\def\nodezzz#1{\nodexxx [#1,]} -\def\nodexxx[#1,#2]{\gdef\lastnode{#1}} -\let\nwnode=\node -\let\lastnode=\relax - -\def\donoderef{\ifx\lastnode\relax\else -\expandafter\expandafter\expandafter\setref{\lastnode}\fi -\global\let\lastnode=\relax} - -\def\unnumbnoderef{\ifx\lastnode\relax\else -\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi -\global\let\lastnode=\relax} - -\def\appendixnoderef{\ifx\lastnode\relax\else -\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi -\global\let\lastnode=\relax} - -\let\refill=\relax - -% @setfilename is done at the beginning of every texinfo file. -% So open here the files we need to have open while reading the input. -% This makes it possible to make a .fmt file for texinfo. -\def\setfilename{% - \readauxfile - \opencontents - \openindices - \fixbackslash % Turn off hack to swallow `\input texinfo'. - \global\let\setfilename=\comment % Ignore extra @setfilename cmds. - \comment % Ignore the actual filename. -} - -\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} - -\def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, - node \samp{\ignorespaces#1{}}} - -\message{fonts,} - -% Font-change commands. - -% Texinfo supports the sans serif font style, which plain TeX does not. -% So we set up a \sf analogous to plain's \rm, etc. -\newfam\sffam -\def\sf{\fam=\sffam \tensf} -\let\li = \sf % Sometimes we call it \li, not \sf. - -%% Try out Computer Modern fonts at \magstephalf -\let\mainmagstep=\magstephalf - -% Set the font macro #1 to the font named #2, adding on the -% specified font prefix (normally `cm'). -\def\setfont#1#2{\font#1=\fontprefix#2} - -% Use cm as the default font prefix. -% To specify the font prefix, you must define \fontprefix -% before you read in texinfo.tex. -\ifx\fontprefix\undefined -\def\fontprefix{cm} -\fi - -\ifx\bigger\relax -\let\mainmagstep=\magstep1 -\setfont\textrm{r12} -\setfont\texttt{tt12} -\else -\setfont\textrm{r10 scaled \mainmagstep} -\setfont\texttt{tt10 scaled \mainmagstep} -\fi -% Instead of cmb10, you many want to use cmbx10. -% cmbx10 is a prettier font on its own, but cmb10 -% looks better when embedded in a line with cmr10. -\setfont\textbf{b10 scaled \mainmagstep} -\setfont\textit{ti10 scaled \mainmagstep} -\setfont\textsl{sl10 scaled \mainmagstep} -\setfont\textsf{ss10 scaled \mainmagstep} -\setfont\textsc{csc10 scaled \mainmagstep} -\font\texti=cmmi10 scaled \mainmagstep -\font\textsy=cmsy10 scaled \mainmagstep - -% A few fonts for @defun, etc. -\setfont\defbf{bx10 scaled \magstep1} %was 1314 -\setfont\deftt{tt10 scaled \magstep1} -\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} - -% Fonts for indices and small examples. -% We actually use the slanted font rather than the italic, -% because texinfo normally uses the slanted fonts for that. -% Do not make many font distinctions in general in the index, since they -% aren't very useful. -\setfont\ninett{tt9} -\setfont\indrm{r9} -\setfont\indit{sl9} -\let\indsl=\indit -\let\indtt=\ninett -\let\indsf=\indrm -\let\indbf=\indrm -\setfont\indsc{csc10 at 9pt} -\font\indi=cmmi9 -\font\indsy=cmsy9 - -% Fonts for headings -\setfont\chaprm{bx12 scaled \magstep2} -\setfont\chapit{ti12 scaled \magstep2} -\setfont\chapsl{sl12 scaled \magstep2} -\setfont\chaptt{tt12 scaled \magstep2} -\setfont\chapsf{ss12 scaled \magstep2} -\let\chapbf=\chaprm -\setfont\chapsc{csc10 scaled\magstep3} -\font\chapi=cmmi12 scaled \magstep2 -\font\chapsy=cmsy10 scaled \magstep3 - -\setfont\secrm{bx12 scaled \magstep1} -\setfont\secit{ti12 scaled \magstep1} -\setfont\secsl{sl12 scaled \magstep1} -\setfont\sectt{tt12 scaled \magstep1} -\setfont\secsf{ss12 scaled \magstep1} -\setfont\secbf{bx12 scaled \magstep1} -\setfont\secsc{csc10 scaled\magstep2} -\font\seci=cmmi12 scaled \magstep1 -\font\secsy=cmsy10 scaled \magstep2 - -% \setfont\ssecrm{bx10 scaled \magstep1} % This size an font looked bad. -% \setfont\ssecit{cmti10 scaled \magstep1} % The letters were too crowded. -% \setfont\ssecsl{sl10 scaled \magstep1} -% \setfont\ssectt{tt10 scaled \magstep1} -% \setfont\ssecsf{ss10 scaled \magstep1} - -%\setfont\ssecrm{b10 scaled 1315} % Note the use of cmb rather than cmbx. -%\setfont\ssecit{ti10 scaled 1315} % Also, the size is a little larger than -%\setfont\ssecsl{sl10 scaled 1315} % being scaled magstep1. -%\setfont\ssectt{tt10 scaled 1315} -%\setfont\ssecsf{ss10 scaled 1315} - -%\let\ssecbf=\ssecrm - -\setfont\ssecrm{bx12 scaled \magstephalf} -\setfont\ssecit{ti12 scaled \magstephalf} -\setfont\ssecsl{sl12 scaled \magstephalf} -\setfont\ssectt{tt12 scaled \magstephalf} -\setfont\ssecsf{ss12 scaled \magstephalf} -\setfont\ssecbf{bx12 scaled \magstephalf} -\setfont\ssecsc{csc10 scaled \magstep1} -\font\sseci=cmmi12 scaled \magstephalf -\font\ssecsy=cmsy10 scaled \magstep1 -% The smallcaps and symbol fonts should actually be scaled \magstep1.5, -% but that is not a standard magnification. - -% Fonts for title page: -\setfont\titlerm{bx12 scaled \magstep3} -\let\authorrm = \secrm - -% In order for the font changes to affect most math symbols and letters, -% we have to define the \textfont of the standard families. Since -% texinfo doesn't allow for producing subscripts and superscripts, we -% don't bother to reset \scriptfont and \scriptscriptfont (which would -% also require loading a lot more fonts). -% -\def\resetmathfonts{% - \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy - \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf - \textfont\ttfam = \tentt \textfont\sffam = \tensf -} - - -% The font-changing commands redefine the meanings of \tenSTYLE, instead -% of just \STYLE. We do this so that font changes will continue to work -% in math mode, where it is the current \fam that is relevant in most -% cases, not the current. Plain TeX does, for example, -% \def\bf{\fam=\bffam \tenbf} By redefining \tenbf, we obviate the need -% to redefine \bf itself. -\def\textfonts{% - \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl - \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc - \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy - \resetmathfonts} -\def\chapfonts{% - \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl - \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc - \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy - \resetmathfonts} -\def\secfonts{% - \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl - \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc - \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy - \resetmathfonts} -\def\subsecfonts{% - \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl - \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc - \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy - \resetmathfonts} -\def\indexfonts{% - \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl - \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc - \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy - \resetmathfonts} - -% Set up the default fonts, so we can use them for creating boxes. -% -\textfonts - -% Count depth in font-changes, for error checks -\newcount\fontdepth \fontdepth=0 - -% Fonts for short table of contents. -\setfont\shortcontrm{r12} -\setfont\shortcontbf{bx12} -\setfont\shortcontsl{sl12} - -%% Add scribe-like font environments, plus @l for inline lisp (usually sans -%% serif) and @ii for TeX italic - -% \smartitalic{ARG} outputs arg in italics, followed by an italic correction -% unless the following character is such as not to need one. -\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} -\def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx} - -\let\i=\smartitalic -\let\var=\smartitalic -\let\dfn=\smartitalic -\let\emph=\smartitalic -\let\cite=\smartitalic - -\def\b#1{{\bf #1}} -\let\strong=\b - -% We can't just use \exhyphenpenalty, because that only has effect at -% the end of a paragraph. Restore normal hyphenation at the end of the -% group within which \nohyphenation is presumably called. -% -\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} -\def\restorehyphenation{\hyphenchar\font = `- } - -\def\t#1{% - {\tt \nohyphenation \rawbackslash \frenchspacing #1}% - \null -} -\let\ttfont = \t -%\def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null} -\def\samp #1{`\tclose{#1}'\null} -\def\key #1{{\tt \nohyphenation \uppercase{#1}}\null} -\def\ctrl #1{{\tt \rawbackslash \hat}#1} - -\let\file=\samp - -% @code is a modification of @t, -% which makes spaces the same size as normal in the surrounding text. -\def\tclose#1{% - {% - % Change normal interword space to be same as for the current font. - \spaceskip = \fontdimen2\font - % - % Switch to typewriter. - \tt - % - % But `\ ' produces the large typewriter interword space. - \def\ {{\spaceskip = 0pt{} }}% - % - % Turn off hyphenation. - \nohyphenation - % - \rawbackslash - \frenchspacing - #1% - }% - \null -} - -% We *must* turn on hyphenation at `-' and `_' in \code. -% Otherwise, it is too hard to avoid overful hboxes -% in the Emacs manual, the Library manual, etc. - -% Unfortunately, TeX uses one parameter (\hyphenchar) to control -% both hyphenation at - and hyphenation within words. -% We must therefore turn them both off (\tclose does that) -% and arrange explicitly to hyphenate an a dash. -% -- rms. -{ -\catcode`\-=\active -\catcode`\_=\active -\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} -% The following is used by \doprintindex to insure that long function names -% wrap around. It is necessary for - and _ to be active before the index is -% read from the file, as \entry parses the arguments long before \code is -% ever called. -- mycroft -\global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder} -} -\def\realdash{-} -\def\realunder{_} -\def\codedash{-\discretionary{}{}{}} -\def\codeunder{\normalunderscore\discretionary{}{}{}} -\def\codex #1{\tclose{#1}\endgroup} - -%\let\exp=\tclose %Was temporary - -% @kbd is like @code, except that if the argument is just one @key command, -% then @kbd has no effect. - -\def\xkey{\key} -\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -\ifx\one\xkey\ifx\threex\three \key{#2}% -\else\tclose{\look}\fi -\else\tclose{\look}\fi} - -% Typeset a dimension, e.g., `in' or `pt'. The only reason for the -% argument is to make the input look right: @dmn{pt} instead of -% @dmn{}pt. -% -\def\dmn#1{\thinspace #1} - -\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} - -\def\l#1{{\li #1}\null} % - -\def\r#1{{\rm #1}} % roman font -% Use of \lowercase was suggested. -\def\sc#1{{\smallcaps#1}} % smallcaps font -\def\ii#1{{\it #1}} % italic font - -\message{page headings,} - -\newskip\titlepagetopglue \titlepagetopglue = 1.5in -\newskip\titlepagebottomglue \titlepagebottomglue = 2pc - -% First the title page. Must do @settitle before @titlepage. -\def\titlefont#1{{\titlerm #1}} - -\newif\ifseenauthor -\newif\iffinishedtitlepage - -\def\shorttitlepage{\parsearg\shorttitlepagezzz} -\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} - -\def\titlepage{\begingroup \parindent=0pt \textfonts - \let\subtitlerm=\tenrm -% I deinstalled the following change because \cmr12 is undefined. -% This change was not in the ChangeLog anyway. --rms. -% \let\subtitlerm=\cmr12 - \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% - % - \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% - % - % Leave some space at the very top of the page. - \vglue\titlepagetopglue - % - % Now you can print the title using @title. - \def\title{\parsearg\titlezzz}% - \def\titlezzz##1{\leftline{\titlefont{##1}} - % print a rule at the page bottom also. - \finishedtitlepagefalse - \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% - % No rule at page bottom unless we print one at the top with @title. - \finishedtitlepagetrue - % - % Now you can put text using @subtitle. - \def\subtitle{\parsearg\subtitlezzz}% - \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% - % - % @author should come last, but may come many times. - \def\author{\parsearg\authorzzz}% - \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi - {\authorfont \leftline{##1}}}% - % - % Most title ``pages'' are actually two pages long, with space - % at the top of the second. We don't want the ragged left on the second. - \let\oldpage = \page - \def\page{% - \iffinishedtitlepage\else - \finishtitlepage - \fi - \oldpage - \let\page = \oldpage - \hbox{}}% -% \def\page{\oldpage \hbox{}} -} - -\def\Etitlepage{% - \iffinishedtitlepage\else - \finishtitlepage - \fi - % It is important to do the page break before ending the group, - % because the headline and footline are only empty inside the group. - % If we use the new definition of \page, we always get a blank page - % after the title page, which we certainly don't want. - \oldpage - \endgroup - \HEADINGSon -} - -\def\finishtitlepage{% - \vskip4pt \hrule height 2pt width \hsize - \vskip\titlepagebottomglue - \finishedtitlepagetrue -} - -%%% Set up page headings and footings. - -\let\thispage=\folio - -\newtoks \evenheadline % Token sequence for heading line of even pages -\newtoks \oddheadline % Token sequence for heading line of odd pages -\newtoks \evenfootline % Token sequence for footing line of even pages -\newtoks \oddfootline % Token sequence for footing line of odd pages - -% Now make Tex use those variables -\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline - \else \the\evenheadline \fi}} -\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline - \else \the\evenfootline \fi}\HEADINGShook} -\let\HEADINGShook=\relax - -% Commands to set those variables. -% For example, this is what @headings on does -% @evenheading @thistitle|@thispage|@thischapter -% @oddheading @thischapter|@thispage|@thistitle -% @evenfooting @thisfile|| -% @oddfooting ||@thisfile - -\def\evenheading{\parsearg\evenheadingxxx} -\def\oddheading{\parsearg\oddheadingxxx} -\def\everyheading{\parsearg\everyheadingxxx} - -\def\evenfooting{\parsearg\evenfootingxxx} -\def\oddfooting{\parsearg\oddfootingxxx} -\def\everyfooting{\parsearg\everyfootingxxx} - -{\catcode`\@=0 % - -\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} -\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% -\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} -\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% -\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish} -\gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{% -\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}} -\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} -\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% -\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} -\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% -\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish} -\gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{% -\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}} -\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} -% -}% unbind the catcode of @. - -% @headings double turns headings on for double-sided printing. -% @headings single turns headings on for single-sided printing. -% @headings off turns them off. -% @headings on same as @headings double, retained for compatibility. -% @headings after turns on double-sided headings after this page. -% @headings doubleafter turns on double-sided headings after this page. -% @headings singleafter turns on single-sided headings after this page. -% By default, they are off. - -\def\headings #1 {\csname HEADINGS#1\endcsname} - -\def\HEADINGSoff{ -\global\evenheadline={\hfil} \global\evenfootline={\hfil} -\global\oddheadline={\hfil} \global\oddfootline={\hfil}} -\HEADINGSoff -% When we turn headings on, set the page number to 1. -% For double-sided printing, put current file name in lower left corner, -% chapter name on inside top of right hand pages, document -% title on inside top of left hand pages, and page numbers on outside top -% edge of all pages. -\def\HEADINGSdouble{ -%\pagealignmacro -\global\pageno=1 -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -} -% For single-sided printing, chapter title goes across top left of page, -% page number on top right. -\def\HEADINGSsingle{ -%\pagealignmacro -\global\pageno=1 -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -} -\def\HEADINGSon{\HEADINGSdouble} - -\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} -\let\HEADINGSdoubleafter=\HEADINGSafter -\def\HEADINGSdoublex{% -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -} - -\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} -\def\HEADINGSsinglex{% -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -} - -% Subroutines used in generating headings -% Produces Day Month Year style of output. -\def\today{\number\day\space -\ifcase\month\or -January\or February\or March\or April\or May\or June\or -July\or August\or September\or October\or November\or December\fi -\space\number\year} - -% Use this if you want the Month Day, Year style of output. -%\def\today{\ifcase\month\or -%January\or February\or March\or April\or May\or June\or -%July\or August\or September\or October\or November\or December\fi -%\space\number\day, \number\year} - -% @settitle line... specifies the title of the document, for headings -% It generates no output of its own - -\def\thistitle{No Title} -\def\settitle{\parsearg\settitlezzz} -\def\settitlezzz #1{\gdef\thistitle{#1}} - -\message{tables,} - -% @tabs -- simple alignment - -% These don't work. For one thing, \+ is defined as outer. -% So these macros cannot even be defined. - -%\def\tabs{\parsearg\tabszzz} -%\def\tabszzz #1{\settabs\+#1\cr} -%\def\tabline{\parsearg\tablinezzz} -%\def\tablinezzz #1{\+#1\cr} -%\def\&{&} - -% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). - -% default indentation of table text -\newdimen\tableindent \tableindent=.8in -% default indentation of @itemize and @enumerate text -\newdimen\itemindent \itemindent=.3in -% margin between end of table item and start of table text. -\newdimen\itemmargin \itemmargin=.1in - -% used internally for \itemindent minus \itemmargin -\newdimen\itemmax - -% Note @table, @vtable, and @vtable define @item, @itemx, etc., with -% these defs. -% They also define \itemindex -% to index the item name in whatever manner is desired (perhaps none). - -\newif\ifitemxneedsnegativevskip - -\def\itemxpar{\par\ifitemxneedsnegativevskip\vskip-\parskip\nobreak\fi} - -\def\internalBitem{\smallbreak \parsearg\itemzzz} -\def\internalBitemx{\itemxpar \parsearg\itemzzz} - -\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} -\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} - -\def\internalBkitem{\smallbreak \parsearg\kitemzzz} -\def\internalBkitemx{\itemxpar \parsearg\kitemzzz} - -\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% - \itemzzz {#1}} - -\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% - \itemzzz {#1}} - -\def\itemzzz #1{\begingroup % - \advance\hsize by -\rightskip - \advance\hsize by -\tableindent - \setbox0=\hbox{\itemfont{#1}}% - \itemindex{#1}% - \nobreak % This prevents a break before @itemx. - % - % Be sure we are not still in the middle of a paragraph. - %{\parskip = 0in - %\par - %}% - % - % If the item text does not fit in the space we have, put it on a line - % by itself, and do not allow a page break either before or after that - % line. We do not start a paragraph here because then if the next - % command is, e.g., @kindex, the whatsit would get put into the - % horizontal list on a line by itself, resulting in extra blank space. - \ifdim \wd0>\itemmax - % - % Make this a paragraph so we get the \parskip glue and wrapping, - % but leave it ragged-right. - \begingroup - \advance\leftskip by-\tableindent - \advance\hsize by\tableindent - \advance\rightskip by0pt plus1fil - \leavevmode\unhbox0\par - \endgroup - % - % We're going to be starting a paragraph, but we don't want the - % \parskip glue -- logically it's part of the @item we just started. - \nobreak \vskip-\parskip - % - % Stop a page break at the \parskip glue coming up. Unfortunately - % we can't prevent a possible page break at the following - % \baselineskip glue. - \nobreak - \endgroup - \itemxneedsnegativevskipfalse - \else - % The item text fits into the space. Start a paragraph, so that the - % following text (if any) will end up on the same line. Since that - % text will be indented by \tableindent, we make the item text be in - % a zero-width box. - \noindent - \rlap{\hskip -\tableindent\box0}\ignorespaces% - \endgroup% - \itemxneedsnegativevskiptrue% - \fi -} - -\def\item{\errmessage{@item while not in a table}} -\def\itemx{\errmessage{@itemx while not in a table}} -\def\kitem{\errmessage{@kitem while not in a table}} -\def\kitemx{\errmessage{@kitemx while not in a table}} -\def\xitem{\errmessage{@xitem while not in a table}} -\def\xitemx{\errmessage{@xitemx while not in a table}} - -%% Contains a kludge to get @end[description] to work -\def\description{\tablez{\dontindex}{1}{}{}{}{}} - -\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} -{\obeylines\obeyspaces% -\gdef\tablex #1^^M{% -\tabley\dontindex#1 \endtabley}} - -\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} -{\obeylines\obeyspaces% -\gdef\ftablex #1^^M{% -\tabley\fnitemindex#1 \endtabley -\def\Eftable{\endgraf\afterenvbreak\endgroup}% -\let\Etable=\relax}} - -\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} -{\obeylines\obeyspaces% -\gdef\vtablex #1^^M{% -\tabley\vritemindex#1 \endtabley -\def\Evtable{\endgraf\afterenvbreak\endgroup}% -\let\Etable=\relax}} - -\def\dontindex #1{} -\def\fnitemindex #1{\doind {fn}{\code{#1}}}% -\def\vritemindex #1{\doind {vr}{\code{#1}}}% - -{\obeyspaces % -\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% -\tablez{#1}{#2}{#3}{#4}{#5}{#6}}} - -\def\tablez #1#2#3#4#5#6{% -\aboveenvbreak % -\begingroup % -\def\Edescription{\Etable}% Neccessary kludge. -\let\itemindex=#1% -\ifnum 0#3>0 \advance \leftskip by #3\mil \fi % -\ifnum 0#4>0 \tableindent=#4\mil \fi % -\ifnum 0#5>0 \advance \rightskip by #5\mil \fi % -\def\itemfont{#2}% -\itemmax=\tableindent % -\advance \itemmax by -\itemmargin % -\advance \leftskip by \tableindent % -\exdentamount=\tableindent -\parindent = 0pt -\parskip = \smallskipamount -\ifdim \parskip=0pt \parskip=2pt \fi% -\def\Etable{\endgraf\afterenvbreak\endgroup}% -\let\item = \internalBitem % -\let\itemx = \internalBitemx % -\let\kitem = \internalBkitem % -\let\kitemx = \internalBkitemx % -\let\xitem = \internalBxitem % -\let\xitemx = \internalBxitemx % -} - -% This is the counter used by @enumerate, which is really @itemize - -\newcount \itemno - -\def\itemize{\parsearg\itemizezzz} - -\def\itemizezzz #1{% - \begingroup % ended by the @end itemsize - \itemizey {#1}{\Eitemize} -} - -\def\itemizey #1#2{% -\aboveenvbreak % -\itemmax=\itemindent % -\advance \itemmax by -\itemmargin % -\advance \leftskip by \itemindent % -\exdentamount=\itemindent -\parindent = 0pt % -\parskip = \smallskipamount % -\ifdim \parskip=0pt \parskip=2pt \fi% -\def#2{\endgraf\afterenvbreak\endgroup}% -\def\itemcontents{#1}% -\let\item=\itemizeitem} - -% Set sfcode to normal for the chars that usually have another value. -% These are `.?!:;,' -\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 - \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } - -% \splitoff TOKENS\endmark defines \first to be the first token in -% TOKENS, and \rest to be the remainder. -% -\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% - -% Allow an optional argument of an uppercase letter, lowercase letter, -% or number, to specify the first label in the enumerated list. No -% argument is the same as `1'. -% -\def\enumerate{\parsearg\enumeratezzz} -\def\enumeratezzz #1{\enumeratey #1 \endenumeratey} -\def\enumeratey #1 #2\endenumeratey{% - \begingroup % ended by the @end enumerate - % - % If we were given no argument, pretend we were given `1'. - \def\thearg{#1}% - \ifx\thearg\empty \def\thearg{1}\fi - % - % Detect if the argument is a single token. If so, it might be a - % letter. Otherwise, the only valid thing it can be is a number. - % (We will always have one token, because of the test we just made. - % This is a good thing, since \splitoff doesn't work given nothing at - % all -- the first parameter is undelimited.) - \expandafter\splitoff\thearg\endmark - \ifx\rest\empty - % Only one token in the argument. It could still be anything. - % A ``lowercase letter'' is one whose \lccode is nonzero. - % An ``uppercase letter'' is one whose \lccode is both nonzero, and - % not equal to itself. - % Otherwise, we assume it's a number. - % - % We need the \relax at the end of the \ifnum lines to stop TeX from - % continuing to look for a . - % - \ifnum\lccode\expandafter`\thearg=0\relax - \numericenumerate % a number (we hope) - \else - % It's a letter. - \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax - \lowercaseenumerate % lowercase letter - \else - \uppercaseenumerate % uppercase letter - \fi - \fi - \else - % Multiple tokens in the argument. We hope it's a number. - \numericenumerate - \fi -} - -% An @enumerate whose labels are integers. The starting integer is -% given in \thearg. -% -\def\numericenumerate{% - \itemno = \thearg - \startenumeration{\the\itemno}% -} - -% The starting (lowercase) letter is in \thearg. -\def\lowercaseenumerate{% - \itemno = \expandafter`\thearg - \startenumeration{% - % Be sure we're not beyond the end of the alphabet. - \ifnum\itemno=0 - \errmessage{No more lowercase letters in @enumerate; get a bigger - alphabet}% - \fi - \char\lccode\itemno - }% -} - -% The starting (uppercase) letter is in \thearg. -\def\uppercaseenumerate{% - \itemno = \expandafter`\thearg - \startenumeration{% - % Be sure we're not beyond the end of the alphabet. - \ifnum\itemno=0 - \errmessage{No more uppercase letters in @enumerate; get a bigger - alphabet} - \fi - \char\uccode\itemno - }% -} - -% Call itemizey, adding a period to the first argument and supplying the -% common last two arguments. Also subtract one from the initial value in -% \itemno, since @item increments \itemno. -% -\def\startenumeration#1{% - \advance\itemno by -1 - \itemizey{#1.}\Eenumerate\flushcr -} - -% @alphaenumerate and @capsenumerate are abbreviations for giving an arg -% to @enumerate. -% -\def\alphaenumerate{\enumerate{a}} -\def\capsenumerate{\enumerate{A}} -\def\Ealphaenumerate{\Eenumerate} -\def\Ecapsenumerate{\Eenumerate} - -% Definition of @item while inside @itemize. - -\def\itemizeitem{% -\advance\itemno by 1 -{\let\par=\endgraf \smallbreak}% -\ifhmode \errmessage{\in hmode at itemizeitem}\fi -{\parskip=0in \hskip 0pt -\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% -\vadjust{\penalty 1200}}% -\flushcr} - -% @multitable macros -% Amy Hendrickson, 8/18/94 -% -% @multitable ... @endmultitable will make as many columns as desired. -% Contents of each column will wrap at width given in preamble. Width -% can be specified either with sample text given in a template line, -% or in percent of \hsize, the current width of text on page. - -% Table can continue over pages but will only break between lines. - -% To make preamble: -% -% Either define widths of columns in terms of percent of \hsize: -% @multitable @percentofhsize .2 .3 .5 -% @item ... -% -% Numbers following @percentofhsize are the percent of the total -% current hsize to be used for each column. You may use as many -% columns as desired. - -% Or use a template: -% @multitable {Column 1 template} {Column 2 template} {Column 3 template} -% @item ... -% using the widest term desired in each column. - - -% Each new table line starts with @item, each subsequent new column -% starts with @tab. Empty columns may be produced by supplying @tab's -% with nothing between them for as many times as empty columns are needed, -% ie, @tab@tab@tab will produce two empty columns. - -% @item, @tab, @multicolumn or @endmulticolumn do not need to be on their -% own lines, but it will not hurt if they are. - -% Sample multitable: - -% @multitable {Column 1 template} {Column 2 template} {Column 3 template} -% @item first col stuff @tab second col stuff @tab third col -% @item -% first col stuff -% @tab -% second col stuff -% @tab -% third col -% @item first col stuff @tab second col stuff -% @tab Many paragraphs of text may be used in any column. -% -% They will wrap at the width determined by the template. -% @item@tab@tab This will be in third column. -% @endmultitable - -% Default dimensions may be reset by user. -% @intableparskip will set vertical space between paragraphs in table. -% @intableparindent will set paragraph indent in table. -% @spacebetweencols will set horizontal space to be left between columns. -% @spacebetweenlines will set vertical space to be left between lines. - -%%%% -% Dimensions - -\newdimen\intableparskip -\newdimen\intableparindent -\newdimen\spacebetweencols -\newdimen\spacebetweenlines -\intableparskip=0pt -\intableparindent=6pt -\spacebetweencols=12pt -\spacebetweenlines=12pt - -%%%% -% Macros used to set up halign preamble: -\let\endsetuptable\relax -\def\xendsetuptable{\endsetuptable} -\let\percentofhsize\relax -\def\xpercentofhsize{\percentofhsize} -\newif\ifsetpercent - -\newcount\colcount -\def\setuptable#1{\def\firstarg{#1}% -\ifx\firstarg\xendsetuptable\let\go\relax% -\else - \ifx\firstarg\xpercentofhsize\global\setpercenttrue% - \else - \ifsetpercent - \if#1.\else% - \global\advance\colcount by1 % - \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% - \fi - \else - \global\advance\colcount by1 - \setbox0=\hbox{#1}% - \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% - \fi% - \fi% - \let\go\setuptable% -\fi\go} -%%%% -% multitable syntax -\def\tab{&} - -%%%% -% @multitable ... @endmultitable definitions: - -\def\multitable#1\item{\bgroup -\let\item\cr -\tolerance=9500 -\hbadness=9500 -\parskip=\intableparskip -\parindent=\intableparindent -\overfullrule=0pt -\global\colcount=0\relax% -\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% - % To parse everything between @multitable and @item : -\def\one{#1}\expandafter\setuptable\one\endsetuptable - % Need to reset this to 0 after \setuptable. -\global\colcount=0\relax% - % - % This preamble sets up a generic column definition, which will - % be used as many times as user calls for columns. - % \vtop will set a single line and will also let text wrap and - % continue for many paragraphs if desired. -\halign\bgroup&\global\advance\colcount by 1\relax% -\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname - % In order to keep entries from bumping into each other - % we will add a \leftskip of \spacebetweencols to all columns after - % the first one. - % If a template has been used, we will add \spacebetweencols - % to the width of each template entry. - % If user has set preamble in terms of percent of \hsize - % we will use that dimension as the width of the column, and - % the \leftskip will keep entries from bumping into each other. - % Table will start at left margin and final column will justify at - % right margin. -\ifnum\colcount=1 -\else - \ifsetpercent - \else - % If user has set preamble in terms of percent of \hsize - % we will advance \hsize by \spacebetweencols - \advance\hsize by \spacebetweencols - \fi - % In either case we will make \leftskip=\spacebetweencols: -\leftskip=\spacebetweencols -\fi -\noindent##}\cr% - % \everycr will reset column counter, \colcount, at the end of - % each line. Every column entry will cause \colcount to advance by one. - % The table preamble - % looks at the current \colcount to find the correct column width. -\global\everycr{\noalign{\nointerlineskip\vskip\spacebetweenlines -\filbreak%% keeps underfull box messages off when table breaks over pages. -\global\colcount=0\relax}}} - -\message{indexing,} -% Index generation facilities - -% Define \newwrite to be identical to plain tex's \newwrite -% except not \outer, so it can be used within \newindex. -{\catcode`\@=11 -\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} - -% \newindex {foo} defines an index named foo. -% It automatically defines \fooindex such that -% \fooindex ...rest of line... puts an entry in the index foo. -% It also defines \fooindfile to be the number of the output channel for -% the file that accumulates this index. The file's extension is foo. -% The name of an index should be no more than 2 characters long -% for the sake of vms. - -\def\newindex #1{ -\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file -\openout \csname#1indfile\endcsname \jobname.#1 % Open the file -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\doindex {#1}} -} - -% @defindex foo == \newindex{foo} - -\def\defindex{\parsearg\newindex} - -% Define @defcodeindex, like @defindex except put all entries in @code. - -\def\newcodeindex #1{ -\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file -\openout \csname#1indfile\endcsname \jobname.#1 % Open the file -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\docodeindex {#1}} -} - -\def\defcodeindex{\parsearg\newcodeindex} - -% @synindex foo bar makes index foo feed into index bar. -% Do this instead of @defindex foo if you don't want it as a separate index. -\def\synindex #1 #2 {% -\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname -\expandafter\let\csname#1indfile\endcsname=\synindexfoo -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\doindex {#2}}% -} - -% @syncodeindex foo bar similar, but put all entries made for index foo -% inside @code. -\def\syncodeindex #1 #2 {% -\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname -\expandafter\let\csname#1indfile\endcsname=\synindexfoo -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex -\noexpand\docodeindex {#2}}% -} - -% Define \doindex, the driver for all \fooindex macros. -% Argument #1 is generated by the calling \fooindex macro, -% and it is "foo", the name of the index. - -% \doindex just uses \parsearg; it calls \doind for the actual work. -% This is because \doind is more useful to call from other macros. - -% There is also \dosubind {index}{topic}{subtopic} -% which makes an entry in a two-level index such as the operation index. - -\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} -\def\singleindexer #1{\doind{\indexname}{#1}} - -% like the previous two, but they put @code around the argument. -\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} -\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} - -\def\indexdummies{% -% Take care of the plain tex accent commands. -\def\"{\realbackslash "}% -\def\`{\realbackslash `}% -\def\'{\realbackslash '}% -\def\^{\realbackslash ^}% -\def\~{\realbackslash ~}% -\def\={\realbackslash =}% -\def\b{\realbackslash b}% -\def\c{\realbackslash c}% -\def\d{\realbackslash d}% -\def\u{\realbackslash u}% -\def\v{\realbackslash v}% -\def\H{\realbackslash H}% -% Take care of the plain tex special European modified letters. -\def\oe{\realbackslash oe}% -\def\ae{\realbackslash ae}% -\def\aa{\realbackslash aa}% -\def\OE{\realbackslash OE}% -\def\AE{\realbackslash AE}% -\def\AA{\realbackslash AA}% -\def\o{\realbackslash o}% -\def\O{\realbackslash O}% -\def\l{\realbackslash l}% -\def\L{\realbackslash L}% -\def\ss{\realbackslash ss}% -% Take care of texinfo commands likely to appear in an index entry. -\def\_{{\realbackslash _}}% -\def\w{\realbackslash w }% -\def\bf{\realbackslash bf }% -\def\rm{\realbackslash rm }% -\def\sl{\realbackslash sl }% -\def\sf{\realbackslash sf}% -\def\tt{\realbackslash tt}% -\def\gtr{\realbackslash gtr}% -\def\less{\realbackslash less}% -\def\hat{\realbackslash hat}% -\def\char{\realbackslash char}% -\def\TeX{\realbackslash TeX}% -\def\dots{\realbackslash dots }% -\def\copyright{\realbackslash copyright }% -\def\tclose##1{\realbackslash tclose {##1}}% -\def\code##1{\realbackslash code {##1}}% -\def\samp##1{\realbackslash samp {##1}}% -\def\t##1{\realbackslash r {##1}}% -\def\r##1{\realbackslash r {##1}}% -\def\i##1{\realbackslash i {##1}}% -\def\b##1{\realbackslash b {##1}}% -\def\cite##1{\realbackslash cite {##1}}% -\def\key##1{\realbackslash key {##1}}% -\def\file##1{\realbackslash file {##1}}% -\def\var##1{\realbackslash var {##1}}% -\def\kbd##1{\realbackslash kbd {##1}}% -\def\dfn##1{\realbackslash dfn {##1}}% -\def\emph##1{\realbackslash emph {##1}}% -} - -% \indexnofonts no-ops all font-change commands. -% This is used when outputting the strings to sort the index by. -\def\indexdummyfont#1{#1} -\def\indexdummytex{TeX} -\def\indexdummydots{...} - -\def\indexnofonts{% -% Just ignore accents. -\let\"=\indexdummyfont -\let\`=\indexdummyfont -\let\'=\indexdummyfont -\let\^=\indexdummyfont -\let\~=\indexdummyfont -\let\==\indexdummyfont -\let\b=\indexdummyfont -\let\c=\indexdummyfont -\let\d=\indexdummyfont -\let\u=\indexdummyfont -\let\v=\indexdummyfont -\let\H=\indexdummyfont -% Take care of the plain tex special European modified letters. -\def\oe{oe}% -\def\ae{ae}% -\def\aa{aa}% -\def\OE{OE}% -\def\AE{AE}% -\def\AA{AA}% -\def\o{o}% -\def\O{O}% -\def\l{l}% -\def\L{L}% -\def\ss{ss}% -\let\w=\indexdummyfont -\let\t=\indexdummyfont -\let\r=\indexdummyfont -\let\i=\indexdummyfont -\let\b=\indexdummyfont -\let\emph=\indexdummyfont -\let\strong=\indexdummyfont -\let\cite=\indexdummyfont -\let\sc=\indexdummyfont -%Don't no-op \tt, since it isn't a user-level command -% and is used in the definitions of the active chars like <, >, |... -%\let\tt=\indexdummyfont -\let\tclose=\indexdummyfont -\let\code=\indexdummyfont -\let\file=\indexdummyfont -\let\samp=\indexdummyfont -\let\kbd=\indexdummyfont -\let\key=\indexdummyfont -\let\var=\indexdummyfont -\let\TeX=\indexdummytex -\let\dots=\indexdummydots -} - -% To define \realbackslash, we must make \ not be an escape. -% We must first make another character (@) an escape -% so we do not become unable to do a definition. - -{\catcode`\@=0 \catcode`\\=\other -@gdef@realbackslash{\}} - -\let\indexbackslash=0 %overridden during \printindex. - -\let\SETmarginindex=\relax %initialize! -% workhorse for all \fooindexes -% #1 is name of index, #2 is stuff to put there -\def\doind #1#2{% -% Put the index entry in the margin if desired. -\ifx\SETmarginindex\relax\else% -\insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% -\fi% -{\count10=\lastpenalty % -{\indexdummies % Must do this here, since \bf, etc expand at this stage -\escapechar=`\\% -{\let\folio=0% Expand all macros now EXCEPT \folio -\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now -% so it will be output as is; and it will print as backslash in the indx. -% -% Now process the index-string once, with all font commands turned off, -% to get the string to sort the index by. -{\indexnofonts -\xdef\temp1{#2}% -}% -% Now produce the complete index entry. We process the index-string again, -% this time with font commands expanded, to get what to print in the index. -\edef\temp{% -\write \csname#1indfile\endcsname{% -\realbackslash entry {\temp1}{\folio}{#2}}}% -\temp }% -}\penalty\count10}} - -\def\dosubind #1#2#3{% -{\count10=\lastpenalty % -{\indexdummies % Must do this here, since \bf, etc expand at this stage -\escapechar=`\\% -{\let\folio=0% -\def\rawbackslashxx{\indexbackslash}% -% -% Now process the index-string once, with all font commands turned off, -% to get the string to sort the index by. -{\indexnofonts -\xdef\temp1{#2 #3}% -}% -% Now produce the complete index entry. We process the index-string again, -% this time with font commands expanded, to get what to print in the index. -\edef\temp{% -\write \csname#1indfile\endcsname{% -\realbackslash entry {\temp1}{\folio}{#2}{#3}}}% -\temp }% -}\penalty\count10}} - -% The index entry written in the file actually looks like -% \entry {sortstring}{page}{topic} -% or -% \entry {sortstring}{page}{topic}{subtopic} -% The texindex program reads in these files and writes files -% containing these kinds of lines: -% \initial {c} -% before the first topic whose initial is c -% \entry {topic}{pagelist} -% for a topic that is used without subtopics -% \primary {topic} -% for the beginning of a topic that is used with subtopics -% \secondary {subtopic}{pagelist} -% for each subtopic. - -% Define the user-accessible indexing commands -% @findex, @vindex, @kindex, @cindex. - -\def\findex {\fnindex} -\def\kindex {\kyindex} -\def\cindex {\cpindex} -\def\vindex {\vrindex} -\def\tindex {\tpindex} -\def\pindex {\pgindex} - -\def\cindexsub {\begingroup\obeylines\cindexsub} -{\obeylines % -\gdef\cindexsub "#1" #2^^M{\endgroup % -\dosubind{cp}{#2}{#1}}} - -% Define the macros used in formatting output of the sorted index material. - -% This is what you call to cause a particular index to get printed. -% Write -% @unnumbered Function Index -% @printindex fn - -\def\printindex{\parsearg\doprintindex} - -\def\doprintindex#1{% - \tex - \dobreak \chapheadingskip {10000} - \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other - \catcode`\$=\other - \catcode`\~=\other - \indexbreaks - % - % The following don't help, since the chars were translated - % when the raw index was written, and their fonts were discarded - % due to \indexnofonts. - %\catcode`\"=\active - %\catcode`\^=\active - %\catcode`\_=\active - %\catcode`\|=\active - %\catcode`\<=\active - %\catcode`\>=\active - % % - \def\indexbackslash{\rawbackslashxx} - \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt - \begindoublecolumns - % - % See if the index file exists and is nonempty. - \openin 1 \jobname.#1s - \ifeof 1 - % \enddoublecolumns gets confused if there is no text in the index, - % and it loses the chapter title and the aux file entries for the - % index. The easiest way to prevent this problem is to make sure - % there is some text. - (Index is nonexistent) - \else - % - % If the index file exists but is empty, then \openin leaves \ifeof - % false. We have to make TeX try to read something from the file, so - % it can discover if there is anything in it. - \read 1 to \temp - \ifeof 1 - (Index is empty) - \else - \input \jobname.#1s - \fi - \fi - \closein 1 - \enddoublecolumns - \Etex -} - -% These macros are used by the sorted index file itself. -% Change them to control the appearance of the index. - -% Same as \bigskipamount except no shrink. -% \balancecolumns gets confused if there is any shrink. -\newskip\initialskipamount \initialskipamount 12pt plus4pt - -\def\initial #1{% -{\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt -\ifdim\lastskip<\initialskipamount -\removelastskip \penalty-200 \vskip \initialskipamount\fi -\line{\secbf#1\hfill}\kern 2pt\penalty10000}} - -% This typesets a paragraph consisting of #1, dot leaders, and then #2 -% flush to the right margin. It is used for index and table of contents -% entries. The paragraph is indented by \leftskip. -% -\def\entry #1#2{\begingroup - % - % Start a new paragraph if necessary, so our assignments below can't - % affect previous text. - \par - % - % Do not fill out the last line with white space. - \parfillskip = 0in - % - % No extra space above this paragraph. - \parskip = 0in - % - % Do not prefer a separate line ending with a hyphen to fewer lines. - \finalhyphendemerits = 0 - % - % \hangindent is only relevant when the entry text and page number - % don't both fit on one line. In that case, bob suggests starting the - % dots pretty far over on the line. Unfortunately, a large - % indentation looks wrong when the entry text itself is broken across - % lines. So we use a small indentation and put up with long leaders. - % - % \hangafter is reset to 1 (which is the value we want) at the start - % of each paragraph, so we need not do anything with that. - \hangindent=2em - % - % When the entry text needs to be broken, just fill out the first line - % with blank space. - \rightskip = 0pt plus1fil - % - % Start a ``paragraph'' for the index entry so the line breaking - % parameters we've set above will have an effect. - \noindent - % - % Insert the text of the index entry. TeX will do line-breaking on it. - #1% - % The following is kluged to not output a line of dots in the index if - % there are no page numbers. The next person who breaks this will be - % cursed by a Unix daemon. - \def\tempa{{\rm }}% - \def\tempb{#2}% - \edef\tempc{\tempa}% - \edef\tempd{\tempb}% - \ifx\tempc\tempd\ \else% - % - % If we must, put the page number on a line of its own, and fill out - % this line with blank space. (The \hfil is overwhelmed with the - % fill leaders glue in \indexdotfill if the page number does fit.) - \hfil\penalty50 - \null\nobreak\indexdotfill % Have leaders before the page number. - % - % The `\ ' here is removed by the implicit \unskip that TeX does as - % part of (the primitive) \par. Without it, a spurious underfull - % \hbox ensues. - \ #2% The page number ends the paragraph. - \fi% - \par -\endgroup} - -% Like \dotfill except takes at least 1 em. -\def\indexdotfill{\cleaders - \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} - -\def\primary #1{\line{#1\hfil}} - -\newskip\secondaryindent \secondaryindent=0.5cm - -\def\secondary #1#2{ -{\parfillskip=0in \parskip=0in -\hangindent =1in \hangafter=1 -\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par -}} - -%% Define two-column mode, which is used in indexes. -%% Adapted from the TeXbook, page 416. -\catcode `\@=11 - -\newbox\partialpage - -\newdimen\doublecolumnhsize - -\def\begindoublecolumns{\begingroup - % Grab any single-column material above us. - \output = {\global\setbox\partialpage - =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}% - \eject - % - % Now switch to the double-column output routine. - \output={\doublecolumnout}% - % - % Change the page size parameters. We could do this once outside this - % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 - % format, but then we repeat the same computation. Repeating a couple - % of assignments once per index is clearly meaningless for the - % execution time, so we may as well do it once. - % - % First we halve the line length, less a little for the gutter between - % the columns. We compute the gutter based on the line length, so it - % changes automatically with the paper format. The magic constant - % below is chosen so that the gutter has the same value (well, +- < - % 1pt) as it did when we hard-coded it. - % - % We put the result in a separate register, \doublecolumhsize, so we - % can restore it in \pagesofar, after \hsize itself has (potentially) - % been clobbered. - % - \doublecolumnhsize = \hsize - \advance\doublecolumnhsize by -.04154\hsize - \divide\doublecolumnhsize by 2 - \hsize = \doublecolumnhsize - % - % Double the \vsize as well. (We don't need a separate register here, - % since nobody clobbers \vsize.) - \vsize = 2\vsize - \doublecolumnpagegoal -} - -\def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage} - -\def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth - \global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage - \global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1} - \global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3} - \ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi - \ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi -} -\def\doublecolumnpagegoal{% - \dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@ -} -\def\pagesofar{\unvbox\partialpage % - \hsize=\doublecolumnhsize % have to restore this since output routine - \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}} -\def\doublecolumnout{% - \setbox5=\copy255 - {\vbadness=10000 \doublecolumnsplit} - \ifvbox255 - \setbox0=\vtop to\dimen@{\unvbox0} - \setbox2=\vtop to\dimen@{\unvbox2} - \onepageout\pagesofar \unvbox255 \penalty\outputpenalty - \else - \setbox0=\vbox{\unvbox5} - \ifvbox0 - \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip - \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth - {\vbadness=10000 - \loop \global\setbox5=\copy0 - \setbox1=\vsplit5 to\dimen@ - \setbox3=\vsplit5 to\dimen@ - \ifvbox5 \global\advance\dimen@ by1pt \repeat - \setbox0=\vbox to\dimen@{\unvbox1} - \setbox2=\vbox to\dimen@{\unvbox3} - \global\setbox\partialpage=\vbox{\pagesofar} - \doublecolumnpagegoal - } - \fi - \fi -} - -\catcode `\@=\other -\message{sectioning,} -% Define chapters, sections, etc. - -\newcount \chapno -\newcount \secno \secno=0 -\newcount \subsecno \subsecno=0 -\newcount \subsubsecno \subsubsecno=0 - -% This counter is funny since it counts through charcodes of letters A, B, ... -\newcount \appendixno \appendixno = `\@ -\def\appendixletter{\char\the\appendixno} - -\newwrite \contentsfile -% This is called from \setfilename. -\def\opencontents{\openout \contentsfile = \jobname.toc} - -% Each @chapter defines this as the name of the chapter. -% page headings and footings can use it. @section does likewise - -\def\thischapter{} \def\thissection{} -\def\seccheck#1{\if \pageno<0 % -\errmessage{@#1 not allowed after generating table of contents}\fi -% -} - -\def\chapternofonts{% -\let\rawbackslash=\relax% -\let\frenchspacing=\relax% -\def\result{\realbackslash result} -\def\equiv{\realbackslash equiv} -\def\expansion{\realbackslash expansion} -\def\print{\realbackslash print} -\def\TeX{\realbackslash TeX} -\def\dots{\realbackslash dots} -\def\copyright{\realbackslash copyright} -\def\tt{\realbackslash tt} -\def\bf{\realbackslash bf } -\def\w{\realbackslash w} -\def\less{\realbackslash less} -\def\gtr{\realbackslash gtr} -\def\hat{\realbackslash hat} -\def\char{\realbackslash char} -\def\tclose##1{\realbackslash tclose {##1}} -\def\code##1{\realbackslash code {##1}} -\def\samp##1{\realbackslash samp {##1}} -\def\r##1{\realbackslash r {##1}} -\def\b##1{\realbackslash b {##1}} -\def\key##1{\realbackslash key {##1}} -\def\file##1{\realbackslash file {##1}} -\def\kbd##1{\realbackslash kbd {##1}} -% These are redefined because @smartitalic wouldn't work inside xdef. -\def\i##1{\realbackslash i {##1}} -\def\cite##1{\realbackslash cite {##1}} -\def\var##1{\realbackslash var {##1}} -\def\emph##1{\realbackslash emph {##1}} -\def\dfn##1{\realbackslash dfn {##1}} -} - -\newcount\absseclevel % used to calculate proper heading level -\newcount\secbase\secbase=0 % @raise/lowersections modify this count - -% @raisesections: treat @section as chapter, @subsection as section, etc. -\def\raisesections{\global\advance\secbase by -1} -\let\up=\raisesections % original BFox name - -% @lowersections: treat @chapter as section, @section as subsection, etc. -\def\lowersections{\global\advance\secbase by 1} -\let\down=\lowersections % original BFox name - -% Choose a numbered-heading macro -% #1 is heading level if unmodified by @raisesections or @lowersections -% #2 is text for heading -\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 -\ifcase\absseclevel - \chapterzzz{#2} -\or - \seczzz{#2} -\or - \numberedsubseczzz{#2} -\or - \numberedsubsubseczzz{#2} -\else - \ifnum \absseclevel<0 - \chapterzzz{#2} - \else - \numberedsubsubseczzz{#2} - \fi -\fi -} - -% like \numhead, but chooses appendix heading levels -\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 -\ifcase\absseclevel - \appendixzzz{#2} -\or - \appendixsectionzzz{#2} -\or - \appendixsubseczzz{#2} -\or - \appendixsubsubseczzz{#2} -\else - \ifnum \absseclevel<0 - \appendixzzz{#2} - \else - \appendixsubsubseczzz{#2} - \fi -\fi -} - -% like \numhead, but chooses numberless heading levels -\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 -\ifcase\absseclevel - \unnumberedzzz{#2} -\or - \unnumberedseczzz{#2} -\or - \unnumberedsubseczzz{#2} -\or - \unnumberedsubsubseczzz{#2} -\else - \ifnum \absseclevel<0 - \unnumberedzzz{#2} - \else - \unnumberedsubsubseczzz{#2} - \fi -\fi -} - - -\def\thischaptername{No Chapter Title} -\outer\def\chapter{\parsearg\chapteryyy} -\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz -\def\chapterzzz #1{\seccheck{chapter}% -\secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}% -\chapmacro {#1}{\the\chapno}% -\gdef\thissection{#1}% -\gdef\thischaptername{#1}% -% We don't substitute the actual chapter name into \thischapter -% because we don't want its macros evaluated now. -\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% -{\chapternofonts% -\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % -\global\let\section = \numberedsec -\global\let\subsection = \numberedsubsec -\global\let\subsubsection = \numberedsubsubsec -}} - -\outer\def\appendix{\parsearg\appendixyyy} -\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz -\def\appendixzzz #1{\seccheck{appendix}% -\secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \appendixno by 1 \message{Appendix \appendixletter}% -\chapmacro {#1}{\putwordAppendix{} \appendixletter}% -\gdef\thissection{#1}% -\gdef\thischaptername{#1}% -\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% -{\chapternofonts% -\edef\temp{{\realbackslash chapentry - {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % -\global\let\section = \appendixsec -\global\let\subsection = \appendixsubsec -\global\let\subsubsection = \appendixsubsubsec -}} - -\outer\def\top{\parsearg\unnumberedyyy} -\outer\def\unnumbered{\parsearg\unnumberedyyy} -\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz -\def\unnumberedzzz #1{\seccheck{unnumbered}% -\secno=0 \subsecno=0 \subsubsecno=0 -% -% This used to be simply \message{#1}, but TeX fully expands the -% argument to \message. Therefore, if #1 contained @-commands, TeX -% expanded them. For example, in `@unnumbered The @cite{Book}', TeX -% expanded @cite (which turns out to cause errors because \cite is meant -% to be executed, not expanded). -% -% Anyway, we don't want the fully-expanded definition of @cite to appear -% as a result of the \message, we just want `@cite' itself. We use -% \the to achieve this: TeX expands \the only once, -% simply yielding the contents of the . -\toks0 = {#1}\message{(\the\toks0)}% -% -\unnumbchapmacro {#1}% -\gdef\thischapter{#1}\gdef\thissection{#1}% -{\chapternofonts% -\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % -\global\let\section = \unnumberedsec -\global\let\subsection = \unnumberedsubsec -\global\let\subsubsection = \unnumberedsubsubsec -}} - -\outer\def\numberedsec{\parsearg\secyyy} -\def\secyyy #1{\numhead1{#1}} % normally calls seczzz -\def\seczzz #1{\seccheck{section}% -\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % -\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% -{\chapternofonts% -\edef\temp{{\realbackslash secentry % -{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % -\penalty 10000 % -}} - -\outer\def\appenixsection{\parsearg\appendixsecyyy} -\outer\def\appendixsec{\parsearg\appendixsecyyy} -\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz -\def\appendixsectionzzz #1{\seccheck{appendixsection}% -\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % -\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% -{\chapternofonts% -\edef\temp{{\realbackslash secentry % -{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % -\penalty 10000 % -}} - -\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} -\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz -\def\unnumberedseczzz #1{\seccheck{unnumberedsec}% -\plainsecheading {#1}\gdef\thissection{#1}% -{\chapternofonts% -\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % -\penalty 10000 % -}} - -\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} -\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz -\def\numberedsubseczzz #1{\seccheck{subsection}% -\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % -\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% -{\chapternofonts% -\edef\temp{{\realbackslash subsecentry % -{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % -\penalty 10000 % -}} - -\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} -\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz -\def\appendixsubseczzz #1{\seccheck{appendixsubsec}% -\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % -\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% -{\chapternofonts% -\edef\temp{{\realbackslash subsecentry % -{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % -\penalty 10000 % -}} - -\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} -\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz -\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% -\plainsecheading {#1}\gdef\thissection{#1}% -{\chapternofonts% -\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % -\penalty 10000 % -}} - -\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} -\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz -\def\numberedsubsubseczzz #1{\seccheck{subsubsection}% -\gdef\thissection{#1}\global\advance \subsubsecno by 1 % -\subsubsecheading {#1} - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -{\chapternofonts% -\edef\temp{{\realbackslash subsubsecentry % - {#1} - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} - {\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\donoderef % -\penalty 10000 % -}} - -\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} -\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz -\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}% -\gdef\thissection{#1}\global\advance \subsubsecno by 1 % -\subsubsecheading {#1} - {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -{\chapternofonts% -\edef\temp{{\realbackslash subsubsecentry{#1}% - {\appendixletter} - {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\appendixnoderef % -\penalty 10000 % -}} - -\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} -\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz -\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% -\plainsecheading {#1}\gdef\thissection{#1}% -{\chapternofonts% -\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}% -\escapechar=`\\% -\write \contentsfile \temp % -\unnumbnoderef % -\penalty 10000 % -}} - -% These are variants which are not "outer", so they can appear in @ifinfo. -% Actually, they should now be obsolete; ordinary section commands should work. -\def\infotop{\parsearg\unnumberedzzz} -\def\infounnumbered{\parsearg\unnumberedzzz} -\def\infounnumberedsec{\parsearg\unnumberedseczzz} -\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} -\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} - -\def\infoappendix{\parsearg\appendixzzz} -\def\infoappendixsec{\parsearg\appendixseczzz} -\def\infoappendixsubsec{\parsearg\appendixsubseczzz} -\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} - -\def\infochapter{\parsearg\chapterzzz} -\def\infosection{\parsearg\sectionzzz} -\def\infosubsection{\parsearg\subsectionzzz} -\def\infosubsubsection{\parsearg\subsubsectionzzz} - -% These macros control what the section commands do, according -% to what kind of chapter we are in (ordinary, appendix, or unnumbered). -% Define them by default for a numbered chapter. -\global\let\section = \numberedsec -\global\let\subsection = \numberedsubsec -\global\let\subsubsection = \numberedsubsubsec - -% Define @majorheading, @heading and @subheading - -% NOTE on use of \vbox for chapter headings, section headings, and -% such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. -% 3) Likewise, headings look best if no \parindent is used, and -% if justification is not attempted. Hence \raggedright. - - -\def\majorheading{\parsearg\majorheadingzzz} -\def\majorheadingzzz #1{% -{\advance\chapheadingskip by 10pt \chapbreak }% -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} - -\def\chapheading{\parsearg\chapheadingzzz} -\def\chapheadingzzz #1{\chapbreak % -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} - -\def\heading{\parsearg\secheadingi} - -\def\subheading{\parsearg\subsecheadingi} - -\def\subsubheading{\parsearg\subsubsecheadingi} - -% These macros generate a chapter, section, etc. heading only -% (including whitespace, linebreaking, etc. around it), -% given all the information in convenient, parsed form. - -%%% Args are the skip and penalty (usually negative) -\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} - -\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} - -%%% Define plain chapter starts, and page on/off switching for it -% Parameter controlling skip before chapter headings (if needed) - -\newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt - -\def\chapbreak{\dobreak \chapheadingskip {-4000}} -\def\chappager{\par\vfill\supereject} -\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} - -\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} - -\def\CHAPPAGoff{ -\global\let\pchapsepmacro=\chapbreak -\global\let\pagealignmacro=\chappager} - -\def\CHAPPAGon{ -\global\let\pchapsepmacro=\chappager -\global\let\pagealignmacro=\chappager -\global\def\HEADINGSon{\HEADINGSsingle}} - -\def\CHAPPAGodd{ -\global\let\pchapsepmacro=\chapoddpage -\global\let\pagealignmacro=\chapoddpage -\global\def\HEADINGSon{\HEADINGSdouble}} - -\CHAPPAGon - -\def\CHAPFplain{ -\global\let\chapmacro=\chfplain -\global\let\unnumbchapmacro=\unnchfplain} - -\def\chfplain #1#2{% - \pchapsepmacro - {% - \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #2\enspace #1}% - }% - \bigskip - \penalty5000 -} - -\def\unnchfplain #1{% -\pchapsepmacro % -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 10000 % -} -\CHAPFplain % The default - -\def\unnchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 10000 % -} - -\def\chfopen #1#2{\chapoddpage {\chapfonts -\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% -\par\penalty 5000 % -} - -\def\CHAPFopen{ -\global\let\chapmacro=\chfopen -\global\let\unnumbchapmacro=\unnchfopen} - -% Parameter controlling skip before section headings. - -\newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt -\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} - -\newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt -\def\secheadingbreak{\dobreak \secheadingskip {-1000}} - -% @paragraphindent is defined for the Info formatting commands only. -\let\paragraphindent=\comment - -% Section fonts are the base font at magstep2, which produces -% a size a bit more than 14 points in the default situation. - -\def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}} -\def\plainsecheading #1{\secheadingi {#1}} -\def\secheadingi #1{{\advance \secheadingskip by \parskip % -\secheadingbreak}% -{\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% -\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } - - -% Subsection fonts are the base font at magstep1, -% which produces a size of 12 points. - -\def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}} -\def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip % -\subsecheadingbreak}% -{\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% -\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } - -\def\subsubsecfonts{\subsecfonts} % Maybe this should change: - % Perhaps make sssec fonts scaled - % magstep half -\def\subsubsecheading #1#2#3#4#5{\subsubsecheadingi {#2.#3.#4.#5\enspace #1}} -\def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip % -\subsecheadingbreak}% -{\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% -\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000} - - -\message{toc printing,} - -% Finish up the main text and prepare to read what we've written -% to \contentsfile. - -\newskip\contentsrightmargin \contentsrightmargin=1in -\def\startcontents#1{% - \pagealignmacro - \immediate\closeout \contentsfile - \ifnum \pageno>0 - \pageno = -1 % Request roman numbered pages. - \fi - % Don't need to put `Contents' or `Short Contents' in the headline. - % It is abundantly clear what they are. - \unnumbchapmacro{#1}\def\thischapter{}% - \begingroup % Set up to handle contents files properly. - \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 - \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi - \raggedbottom % Worry more about breakpoints than the bottom. - \advance\hsize by -\contentsrightmargin % Don't use the full line length. -} - - -% Normal (long) toc. -\outer\def\contents{% - \startcontents{\putwordTableofContents}% - \input \jobname.toc - \endgroup - \vfill \eject -} - -% And just the chapters. -\outer\def\summarycontents{% - \startcontents{\putwordShortContents}% - % - \let\chapentry = \shortchapentry - \let\unnumbchapentry = \shortunnumberedentry - % We want a true roman here for the page numbers. - \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl - \rm - \advance\baselineskip by 1pt % Open it up a little. - \def\secentry ##1##2##3##4{} - \def\unnumbsecentry ##1##2{} - \def\subsecentry ##1##2##3##4##5{} - \def\unnumbsubsecentry ##1##2{} - \def\subsubsecentry ##1##2##3##4##5##6{} - \def\unnumbsubsubsecentry ##1##2{} - \input \jobname.toc - \endgroup - \vfill \eject -} -\let\shortcontents = \summarycontents - -% These macros generate individual entries in the table of contents. -% The first argument is the chapter or section name. -% The last argument is the page number. -% The arguments in between are the chapter number, section number, ... - -% Chapter-level things, for both the long and short contents. -\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} - -% See comments in \dochapentry re vbox and related settings -\def\shortchapentry#1#2#3{% - \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}% -} - -% Typeset the label for a chapter or appendix for the short contents. -% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. -% We could simplify the code here by writing out an \appendixentry -% command in the toc file for appendices, instead of using \chapentry -% for both, but it doesn't seem worth it. -\setbox0 = \hbox{\shortcontrm \putwordAppendix } -\newdimen\shortappendixwidth \shortappendixwidth = \wd0 - -\def\shortchaplabel#1{% - % We typeset #1 in a box of constant width, regardless of the text of - % #1, so the chapter titles will come out aligned. - \setbox0 = \hbox{#1}% - \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi - % - % This space should be plenty, since a single number is .5em, and the - % widest letter (M) is 1em, at least in the Computer Modern fonts. - % (This space doesn't include the extra space that gets added after - % the label; that gets put in in \shortchapentry above.) - \advance\dimen0 by 1.1em - \hbox to \dimen0{#1\hfil}% -} - -\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} -\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}} - -% Sections. -\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} -\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} - -% Subsections. -\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} -\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} - -% And subsubsections. -\def\subsubsecentry#1#2#3#4#5#6{% - \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} -\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} - - -% This parameter controls the indentation of the various levels. -\newdimen\tocindent \tocindent = 3pc - -% Now for the actual typesetting. In all these, #1 is the text and #2 is the -% page number. -% -% If the toc has to be broken over pages, we would want to be at chapters -% if at all possible; hence the \penalty. -\def\dochapentry#1#2{% - \penalty-300 \vskip\baselineskip - \begingroup - \chapentryfonts - \tocentry{#1}{\dopageno{#2}}% - \endgroup - \nobreak\vskip .25\baselineskip -} - -\def\dosecentry#1#2{\begingroup - \secentryfonts \leftskip=\tocindent - \tocentry{#1}{\dopageno{#2}}% -\endgroup} - -\def\dosubsecentry#1#2{\begingroup - \subsecentryfonts \leftskip=2\tocindent - \tocentry{#1}{\dopageno{#2}}% -\endgroup} - -\def\dosubsubsecentry#1#2{\begingroup - \subsubsecentryfonts \leftskip=3\tocindent - \tocentry{#1}{\dopageno{#2}}% -\endgroup} - -% Final typesetting of a toc entry; we use the same \entry macro as for -% the index entries, but we want to suppress hyphenation here. (We -% can't do that in the \entry macro, since index entries might consist -% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) -% -\def\tocentry#1#2{\begingroup - \hyphenpenalty = 10000 - \entry{#1}{#2}% -\endgroup} - -% Space between chapter (or whatever) number and the title. -\def\labelspace{\hskip1em \relax} - -\def\dopageno#1{{\rm #1}} -\def\doshortpageno#1{{\rm #1}} - -\def\chapentryfonts{\secfonts \rm} -\def\secentryfonts{\textfonts} -\let\subsecentryfonts = \textfonts -\let\subsubsecentryfonts = \textfonts - - -\message{environments,} - -% Since these characters are used in examples, it should be an even number of -% \tt widths. Each \tt character is 1en, so two makes it 1em. -% Furthermore, these definitions must come after we define our fonts. -\newbox\dblarrowbox \newbox\longdblarrowbox -\newbox\pushcharbox \newbox\bullbox -\newbox\equivbox \newbox\errorbox - -\let\ptexequiv = \equiv - -%{\tentt -%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} -%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} -%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} -%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} -% Adapted from the manmac format (p.420 of TeXbook) -%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex -% depth .1ex\hfil} -%} - -\def\point{$\star$} - -\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} -\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} - -\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -% Adapted from the TeXbook's \boxit. -{\tentt \global\dimen0 = 3em}% Width of the box. -\dimen2 = .55pt % Thickness of rules -% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} - -\global\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. - \vbox{ - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} - -% The @error{} command. -\def\error{\leavevmode\lower.7ex\copy\errorbox} - -% @tex ... @end tex escapes into raw Tex temporarily. -% One exception: @ is still an escape character, so that @end tex works. -% But \@ or @@ will get a plain tex @ character. - -\def\tex{\begingroup -\catcode `\\=0 \catcode `\{=1 \catcode `\}=2 -\catcode `\$=3 \catcode `\&=4 \catcode `\#=6 -\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie -\catcode `\%=14 -\catcode 43=12 -\catcode`\"=12 -\catcode`\==12 -\catcode`\|=12 -\catcode`\<=12 -\catcode`\>=12 -\escapechar=`\\ -% -\let\~=\ptextilde -\let\{=\ptexlbrace -\let\}=\ptexrbrace -\let\.=\ptexdot -\let\*=\ptexstar -\let\dots=\ptexdots -\def\@{@}% -\let\bullet=\ptexbullet -\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl -\let\L=\ptexL -% -\let\Etex=\endgroup} - -% Define @lisp ... @endlisp. -% @lisp does a \begingroup so it can rebind things, -% including the definition of @endlisp (which normally is erroneous). - -% Amount to narrow the margins by for @lisp. -\newskip\lispnarrowing \lispnarrowing=0.4in - -% This is the definition that ^^M gets inside @lisp, @example, and other -% such environments. \null is better than a space, since it doesn't -% have any width. -\def\lisppar{\null\endgraf} - -% Make each space character in the input produce a normal interword -% space in the output. Don't allow a line break at this space, as this -% is used only in environments like @example, where each line of input -% should produce a line of output anyway. -% -{\obeyspaces % -\gdef\sepspaces{\obeyspaces\let =\tie}} - -% Define \obeyedspace to be our active space, whatever it is. This is -% for use in \parsearg. -{\sepspaces% -\global\let\obeyedspace= } - -% This space is always present above and below environments. -\newskip\envskipamount \envskipamount = 0pt - -% Make spacing and below environment symmetrical. We use \parskip here -% to help in doing that, since in @example-like environments \parskip -% is reset to zero; thus the \afterenvbreak inserts no space -- but the -% start of the next paragraph will insert \parskip -% -\def\aboveenvbreak{{\advance\envskipamount by \parskip -\endgraf \ifdim\lastskip<\envskipamount -\removelastskip \penalty-50 \vskip\envskipamount \fi}} - -\let\afterenvbreak = \aboveenvbreak - -% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. -\let\nonarrowing=\relax - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% \cartouche: draw rectangle w/rounded corners around argument -\font\circle=lcircle10 -\newdimen\circthick -\newdimen\cartouter\newdimen\cartinner -\newskip\normbskip\newskip\normpskip\newskip\normlskip -\circthick=\fontdimen8\circle -% -\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth -\def\ctr{{\hskip 6pt\circle\char'010}} -\def\cbl{{\circle\char'012\hskip -6pt}} -\def\cbr{{\hskip 6pt\circle\char'011}} -\def\carttop{\hbox to \cartouter{\hskip\lskip - \ctl\leaders\hrule height\circthick\hfil\ctr - \hskip\rskip}} -\def\cartbot{\hbox to \cartouter{\hskip\lskip - \cbl\leaders\hrule height\circthick\hfil\cbr - \hskip\rskip}} -% -\newskip\lskip\newskip\rskip - -\long\def\cartouche{% -\begingroup - \lskip=\leftskip \rskip=\rightskip - \leftskip=0pt\rightskip=0pt %we want these *outside*. - \cartinner=\hsize \advance\cartinner by-\lskip - \advance\cartinner by-\rskip - \cartouter=\hsize - \advance\cartouter by 18pt % allow for 3pt kerns on either -% side, and for 6pt waste from -% each corner char - \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip - % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing=\comment - \vbox\bgroup - \baselineskip=0pt\parskip=0pt\lineskip=0pt - \carttop - \hbox\bgroup - \hskip\lskip - \vrule\kern3pt - \vbox\bgroup - \hsize=\cartinner - \kern3pt - \begingroup - \baselineskip=\normbskip - \lineskip=\normlskip - \parskip=\normpskip - \vskip -\parskip -\def\Ecartouche{% - \endgroup - \kern3pt - \egroup - \kern3pt\vrule - \hskip\rskip - \egroup - \cartbot - \egroup -\endgroup -}} - - -% This macro is called at the beginning of all the @example variants, -% inside a group. -\def\nonfillstart{% - \aboveenvbreak - \inENV % This group ends at the end of the body - \hfuzz = 12pt % Don't be fussy - \sepspaces % Make spaces be word-separators rather than space tokens. - \singlespace - \let\par = \lisppar % don't ignore blank lines - \obeylines % each line of input is a line of output - \parskip = 0pt - \parindent = 0pt - \emergencystretch = 0pt % don't try to avoid overfull boxes - % @cartouche defines \nonarrowing to inhibit narrowing - % at next level down. - \ifx\nonarrowing\relax - \advance \leftskip by \lispnarrowing - \exdentamount=\lispnarrowing - \let\exdent=\nofillexdent - \let\nonarrowing=\relax - \fi -} - -% To ending an @example-like environment, we first end the paragraph -% (via \afterenvbreak's vertical glue), and then the group. That way we -% keep the zero \parskip that the environments set -- \parskip glue -% will be inserted at the beginning of the next paragraph in the -% document, after the environment. -% -\def\nonfillfinish{\afterenvbreak\endgroup}% - -% This macro is -\def\lisp{\begingroup - \nonfillstart - \let\Elisp = \nonfillfinish - \tt - \rawbackslash % have \ input char produce \ char from current font - \gobble -} - -% Define the \E... control sequence only if we are inside the -% environment, so the error checking in \end will work. -% -% We must call \lisp last in the definition, since it reads the -% return following the @example (or whatever) command. -% -\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} -\def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp} -\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp} - -% @smallexample and @smalllisp. This is not used unless the @smallbook -% command is given. Originally contributed by Pavel@xerox. -% -\def\smalllispx{\begingroup - \nonfillstart - \let\Esmalllisp = \nonfillfinish - \let\Esmallexample = \nonfillfinish - % - % Smaller interline space and fonts for small examples. - \setleading{10pt}% - \indexfonts \tt - \rawbackslash % make \ output the \ character from the current font (tt) - \gobble -} - -% This is @display; same as @lisp except use roman font. -% -\def\display{\begingroup - \nonfillstart - \let\Edisplay = \nonfillfinish - \gobble -} - -% This is @format; same as @display except don't narrow margins. -% -\def\format{\begingroup - \let\nonarrowing = t - \nonfillstart - \let\Eformat = \nonfillfinish - \gobble -} - -% @flushleft (same as @format) and @flushright. -% -\def\flushleft{\begingroup - \let\nonarrowing = t - \nonfillstart - \let\Eflushleft = \nonfillfinish - \gobble -} -\def\flushright{\begingroup - \let\nonarrowing = t - \nonfillstart - \let\Eflushright = \nonfillfinish - \advance\leftskip by 0pt plus 1fill - \gobble} - -% @quotation does normal linebreaking (hence we can't use \nonfillstart) -% and narrows the margins. -% -\def\quotation{% - \begingroup\inENV %This group ends at the end of the @quotation body - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \singlespace - \parindent=0pt - % We have retained a nonzero parskip for the environment, since we're - % doing normal filling. So to avoid extra space below the environment... - \def\Equotation{\parskip = 0pt \nonfillfinish}% - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. - \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing - \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing - \let\nonarrowing = \relax - \fi -} - -\message{defuns,} -% Define formatter for defuns -% First, allow user to change definition object font (\df) internally -\def\setdeffont #1 {\csname DEF#1\endcsname} - -\newskip\defbodyindent \defbodyindent=.4in -\newskip\defargsindent \defargsindent=50pt -\newskip\deftypemargin \deftypemargin=12pt -\newskip\deflastargmargin \deflastargmargin=18pt - -\newcount\parencount -% define \functionparens, which makes ( and ) and & do special things. -% \functionparens affects the group it is contained in. -\def\activeparens{% -\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active -\catcode`\[=\active \catcode`\]=\active} - -% Make control sequences which act like normal parenthesis chars. -\let\lparen = ( \let\rparen = ) - -{\activeparens % Now, smart parens don't turn on until &foo (see \amprm) - -% Be sure that we always have a definition for `(', etc. For example, -% if the fn name has parens in it, \boldbrax will not be in effect yet, -% so TeX would otherwise complain about undefined control sequence. -\global\let(=\lparen \global\let)=\rparen -\global\let[=\lbrack \global\let]=\rbrack - -\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } -\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} -% This is used to turn on special parens -% but make & act ordinary (given that it's active). -\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} - -% Definitions of (, ) and & used in args for functions. -% This is the definition of ( outside of all parentheses. -\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested % -\global\advance\parencount by 1 } -% -% This is the definition of ( when already inside a level of parens. -\gdef\opnested{\char`\(\global\advance\parencount by 1 } -% -\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. -% also in that case restore the outer-level definition of (. -\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi -\global\advance \parencount by -1 } -% If we encounter &foo, then turn on ()-hacking afterwards -\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } -% -\gdef\normalparens{\boldbrax\let&=\ampnr} -} % End of definition inside \activeparens -%% These parens (in \boldbrax) actually are a little bolder than the -%% contained text. This is especially needed for [ and ] -\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&} -\def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} - -% First, defname, which formats the header line itself. -% #1 should be the function name. -% #2 should be the type of definition, such as "Function". - -\def\defname #1#2{% -% Get the values of \leftskip and \rightskip as they were -% outside the @def... -\dimen2=\leftskip -\advance\dimen2 by -\defbodyindent -\dimen3=\rightskip -\advance\dimen3 by -\defbodyindent -\noindent % -\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% -\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line -\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations -\parshape 2 0in \dimen0 \defargsindent \dimen1 % -% Now output arg 2 ("Function" or some such) -% ending at \deftypemargin from the right margin, -% but stuck inside a box of width 0 so it does not interfere with linebreaking -{% Adjust \hsize to exclude the ambient margins, -% so that \rightline will obey them. -\advance \hsize by -\dimen2 \advance \hsize by -\dimen3 -\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}% -% Make all lines underfull and no complaints: -\tolerance=10000 \hbadness=10000 -\advance\leftskip by -\defbodyindent -\exdentamount=\defbodyindent -{\df #1}\enskip % Generate function name -} - -% Actually process the body of a definition -% #1 should be the terminating control sequence, such as \Edefun. -% #2 should be the "another name" control sequence, such as \defunx. -% #3 should be the control sequence that actually processes the header, -% such as \defunheader. - -\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2{\begingroup\obeylines\activeparens\spacesplit#3}% -\parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup % -\catcode 61=\active % 61 is `=' -\obeylines\activeparens\spacesplit#3} - -\def\defmethparsebody #1#2#3#4 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% -\parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\activeparens\spacesplit{#3{#4}}} - -\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2##1 ##2 {\def#4{##1}% -\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% -\parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\activeparens\spacesplit{#3{#5}}} - -% These parsing functions are similar to the preceding ones -% except that they do not make parens into active characters. -% These are used for "variables" since they have no arguments. - -\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2{\begingroup\obeylines\spacesplit#3}% -\parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup % -\catcode 61=\active % -\obeylines\spacesplit#3} - -% This is used for \def{tp,vr}parsebody. It could probably be used for -% some of the others, too, with some judicious conditionals. -% -\def\parsebodycommon#1#2#3{% - \begingroup\inENV % - \medbreak % - % Define the end token that this defining construct specifies - % so that it will exit this group. - \def#1{\endgraf\endgroup\medbreak}% - \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% - \parindent=0in - \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent - \exdentamount=\defbodyindent - \begingroup\obeylines -} - -\def\defvrparsebody#1#2#3#4 {% - \parsebodycommon{#1}{#2}{#3}% - \spacesplit{#3{#4}}% -} - -% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the -% type is just `struct', because we lose the braces in `{struct -% termios}' when \spacesplit reads its undelimited argument. Sigh. -% \let\deftpparsebody=\defvrparsebody -% -% So, to get around this, we put \empty in with the type name. That -% way, TeX won't find exactly `{...}' as an undelimited argument, and -% won't strip off the braces. -% -\def\deftpparsebody #1#2#3#4 {% - \parsebodycommon{#1}{#2}{#3}% - \spacesplit{\parsetpheaderline{#3{#4}}}\empty -} - -% Fine, but then we have to eventually remove the \empty *and* the -% braces (if any). That's what this does, putting the result in \tptemp. -% -\def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}% - -% After \spacesplit has done its work, this is called -- #1 is the final -% thing to call, #2 the type name (which starts with \empty), and #3 -% (which might be empty) the arguments. -% -\def\parsetpheaderline#1#2#3{% - \removeemptybraces#2\relax - #1{\tptemp}{#3}% -}% - -\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2##1 ##2 {\def#4{##1}% -\begingroup\obeylines\spacesplit{#3{##2}}}% -\parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\spacesplit{#3{#5}}} - -% Split up #2 at the first space token. -% call #1 with two arguments: -% the first is all of #2 before the space token, -% the second is all of #2 after that space token. -% If #2 contains no space token, all of it is passed as the first arg -% and the second is passed as empty. - -{\obeylines -\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% -\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% -\ifx\relax #3% -#1{#2}{}\else #1{#2}{#3#4}\fi}} - -% So much for the things common to all kinds of definitions. - -% Define @defun. - -% First, define the processing that is wanted for arguments of \defun -% Use this to expand the args and terminate the paragraph they make up - -\def\defunargs #1{\functionparens \sl -% Expand, preventing hyphenation at `-' chars. -% Note that groups don't affect changes in \hyphenchar. -\hyphenchar\tensl=0 -#1% -\hyphenchar\tensl=45 -\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi% -\interlinepenalty=10000 -\advance\rightskip by 0pt plus 1fil -\endgraf\penalty 10000\vskip -\parskip\penalty 10000% -} - -\def\deftypefunargs #1{% -% Expand, preventing hyphenation at `-' chars. -% Note that groups don't affect changes in \hyphenchar. -% Use \boldbraxnoamp, not \functionparens, so that & is not special. -\boldbraxnoamp -\tclose{#1}% avoid \code because of side effects on active chars -\interlinepenalty=10000 -\advance\rightskip by 0pt plus 1fil -\endgraf\penalty 10000\vskip -\parskip\penalty 10000% -} - -% Do complete processing of one @defun or @defunx line already parsed. - -% @deffn Command forward-char nchars - -\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} - -\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% -\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -} - -% @defun == @deffn Function - -\def\defun{\defparsebody\Edefun\defunx\defunheader} - -\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{Function}% -\defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -} - -% @deftypefun int foobar (int @var{foo}, float @var{bar}) - -\def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} - -% #1 is the data type. #2 is the name and args. -\def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} -% #1 is the data type, #2 the name, #3 the args. -\def\deftypefunheaderx #1#2 #3\relax{% -\doind {fn}{\code{#2}}% Make entry in function index -\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}% -\deftypefunargs {#3}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -} - -% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) - -\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} - -% \defheaderxcond#1\relax$$$ -% puts #1 in @code, followed by a space, but does nothing if #1 is null. -\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} - -% #1 is the classification. #2 is the data type. #3 is the name and args. -\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} -% #1 is the classification, #2 the data type, #3 the name, #4 the args. -\def\deftypefnheaderx #1#2#3 #4\relax{% -\doind {fn}{\code{#3}}% Make entry in function index -\begingroup -\normalparens % notably, turn off `&' magic, which prevents -% at least some C++ text from working -\defname {\defheaderxcond#2\relax$$$#3}{#1}% -\deftypefunargs {#4}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -} - -% @defmac == @deffn Macro - -\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} - -\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{Macro}% -\defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -} - -% @defspec == @deffn Special Form - -\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} - -\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{Special Form}% -\defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody -} - -% This definition is run if you use @defunx -% anywhere other than immediately after a @defun or @defunx. - -\def\deffnx #1 {\errmessage{@deffnx in invalid context}} -\def\defunx #1 {\errmessage{@defunx in invalid context}} -\def\defmacx #1 {\errmessage{@defmacx in invalid context}} -\def\defspecx #1 {\errmessage{@defspecx in invalid context}} -\def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} -\def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} - -% @defmethod, and so on - -% @defop {Funny Method} foo-class frobnicate argument - -\def\defop #1 {\def\defoptype{#1}% -\defopparsebody\Edefop\defopx\defopheader\defoptype} - -\def\defopheader #1#2#3{% -\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index -\begingroup\defname {#2}{\defoptype{} on #1}% -\defunargs {#3}\endgroup % -} - -% @defmethod == @defop Method - -\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} - -\def\defmethodheader #1#2#3{% -\dosubind {fn}{\code{#2}}{on #1}% entry in function index -\begingroup\defname {#2}{Method on #1}% -\defunargs {#3}\endgroup % -} - -% @defcv {Class Option} foo-class foo-flag - -\def\defcv #1 {\def\defcvtype{#1}% -\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} - -\def\defcvarheader #1#2#3{% -\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index -\begingroup\defname {#2}{\defcvtype{} of #1}% -\defvarargs {#3}\endgroup % -} - -% @defivar == @defcv {Instance Variable} - -\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} - -\def\defivarheader #1#2#3{% -\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index -\begingroup\defname {#2}{Instance Variable of #1}% -\defvarargs {#3}\endgroup % -} - -% These definitions are run if you use @defmethodx, etc., -% anywhere other than immediately after a @defmethod, etc. - -\def\defopx #1 {\errmessage{@defopx in invalid context}} -\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}} -\def\defcvx #1 {\errmessage{@defcvx in invalid context}} -\def\defivarx #1 {\errmessage{@defivarx in invalid context}} - -% Now @defvar - -% First, define the processing that is wanted for arguments of @defvar. -% This is actually simple: just print them in roman. -% This must expand the args and terminate the paragraph they make up -\def\defvarargs #1{\normalparens #1% -\interlinepenalty=10000 -\endgraf\penalty 10000\vskip -\parskip\penalty 10000} - -% @defvr Counter foo-count - -\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} - -\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% -\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} - -% @defvar == @defvr Variable - -\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} - -\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index -\begingroup\defname {#1}{Variable}% -\defvarargs {#2}\endgroup % -} - -% @defopt == @defvr {User Option} - -\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} - -\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index -\begingroup\defname {#1}{User Option}% -\defvarargs {#2}\endgroup % -} - -% @deftypevar int foobar - -\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} - -% #1 is the data type. #2 is the name. -\def\deftypevarheader #1#2{% -\doind {vr}{\code{#2}}% Make entry in variables index -\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}% -\interlinepenalty=10000 -\endgraf\penalty 10000\vskip -\parskip\penalty 10000 -\endgroup} - -% @deftypevr {Global Flag} int enable - -\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} - -\def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}% -\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} -\interlinepenalty=10000 -\endgraf\penalty 10000\vskip -\parskip\penalty 10000 -\endgroup} - -% This definition is run if you use @defvarx -% anywhere other than immediately after a @defvar or @defvarx. - -\def\defvrx #1 {\errmessage{@defvrx in invalid context}} -\def\defvarx #1 {\errmessage{@defvarx in invalid context}} -\def\defoptx #1 {\errmessage{@defoptx in invalid context}} -\def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}} -\def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}} - -% Now define @deftp -% Args are printed in bold, a slight difference from @defvar. - -\def\deftpargs #1{\bf \defvarargs{#1}} - -% @deftp Class window height width ... - -\def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} - -\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% -\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} - -% This definition is run if you use @deftpx, etc -% anywhere other than immediately after a @deftp, etc. - -\def\deftpx #1 {\errmessage{@deftpx in invalid context}} - -\message{cross reference,} -% Define cross-reference macros -\newwrite \auxfile - -\newif\ifhavexrefs % True if xref values are known. -\newif\ifwarnedxrefs % True if we warned once that they aren't known. - -% \setref{foo} defines a cross-reference point named foo. - -\def\setref#1{% -\dosetq{#1-title}{Ytitle}% -\dosetq{#1-pg}{Ypagenumber}% -\dosetq{#1-snt}{Ysectionnumberandtype}} - -\def\unnumbsetref#1{% -\dosetq{#1-title}{Ytitle}% -\dosetq{#1-pg}{Ypagenumber}% -\dosetq{#1-snt}{Ynothing}} - -\def\appendixsetref#1{% -\dosetq{#1-title}{Ytitle}% -\dosetq{#1-pg}{Ypagenumber}% -\dosetq{#1-snt}{Yappendixletterandtype}} - -% \xref, \pxref, and \ref generate cross-references to specified points. -% For \xrefX, #1 is the node name, #2 the name of the Info -% cross-reference, #3 the printed node name, #4 the name of the Info -% file, #5 the name of the printed manual. All but the node name can be -% omitted. -% -\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} -\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} -\def\ref#1{\xrefX[#1,,,,,,,]} -\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup - \def\printedmanual{\ignorespaces #5}% - \def\printednodename{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual}% - \setbox0=\hbox{\printednodename}% - \ifdim \wd0 = 0pt - % No printed node name was explicitly given. - \ifx\SETxref-automatic-section-title\relax % - % Use the actual chapter/section title appear inside - % the square brackets. Use the real section title if we have it. - \ifdim \wd1>0pt% - % It is in another manual, so we don't have it. - \def\printednodename{\ignorespaces #1}% - \else - \ifhavexrefs - % We know the real title if we have the xref values. - \def\printednodename{\refx{#1-title}}% - \else - % Otherwise just copy the Info node name. - \def\printednodename{\ignorespaces #1}% - \fi% - \fi - \def\printednodename{#1-title}% - \else - % Use the node name inside the square brackets. - \def\printednodename{\ignorespaces #1}% - \fi - \fi - % - % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not - % insert empty discretionaries after hyphens, which means that it will - % not find a line break at a hyphen in a node names. Since some manuals - % are best written with fairly long node names, containing hyphens, this - % is a loss. Therefore, we give the text of the node name again, so it - % is as if TeX is seeing it for the first time. - \ifdim \wd1 > 0pt - \putwordsection{} ``\printednodename'' in \cite{\printedmanual}% - \else - % _ (for example) has to be the character _ for the purposes of the - % control sequence corresponding to the node, but it has to expand - % into the usual \leavevmode...\vrule stuff for purposes of - % printing. So we \turnoffactive for the \refx-snt, back on for the - % printing, back off for the \refx-pg. - {\turnoffactive \refx{#1-snt}{}}% - \space [\printednodename],\space - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% - \fi -\endgroup} - -% \dosetq is the interface for calls from other macros - -% Use \turnoffactive so that punctuation chars such as underscore -% work in node names. -\def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat% -\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% -\next}} - -% \internalsetq {foo}{page} expands into -% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} -% When the aux file is read, ' is the escape character - -\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} - -% Things to be expanded by \internalsetq - -\def\Ypagenumber{\folio} - -\def\Ytitle{\thissection} - -\def\Ynothing{} - -\def\Ysectionnumberandtype{% -\ifnum\secno=0 \putwordChapter\xreftie\the\chapno % -\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % -\else \ifnum \subsubsecno=0 % -\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % -\else % -\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % -\fi \fi \fi } - -\def\Yappendixletterandtype{% -\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% -\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % -\else \ifnum \subsubsecno=0 % -\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % -\else % -\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % -\fi \fi \fi } - -\gdef\xreftie{'tie} - -% Use TeX 3.0's \inputlineno to get the line number, for better error -% messages, but if we're using an old version of TeX, don't do anything. -% -\ifx\inputlineno\thisisundefined - \let\linenumber = \empty % Non-3.0. -\else - \def\linenumber{\the\inputlineno:\space} -\fi - -% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. -% If its value is nonempty, SUFFIX is output afterward. - -\def\refx#1#2{% - \expandafter\ifx\csname X#1\endcsname\relax - % If not defined, say something at least. - $\langle$un\-de\-fined$\rangle$% - \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% - \else - \ifwarnedxrefs\else - \global\warnedxrefstrue - \message{Cross reference values unknown; you must run TeX again.}% - \fi - \fi - \else - % It's defined, so just use it. - \csname X#1\endcsname - \fi - #2% Output the suffix in any case. -} - -% Read the last existing aux file, if any. No error if none exists. - -% This is the macro invoked by entries in the aux file. -\def\xrdef #1#2{ -{\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}} - -\def\readauxfile{% -\begingroup -\catcode `\^^@=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\^^C=\other -\catcode `\^^D=\other -\catcode `\^^E=\other -\catcode `\^^F=\other -\catcode `\^^G=\other -\catcode `\^^H=\other -\catcode `\ =\other -\catcode `\^^L=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode 26=\other -\catcode `\^^[=\other -\catcode `\^^\=\other -\catcode `\^^]=\other -\catcode `\^^^=\other -\catcode `\^^_=\other -\catcode `\@=\other -\catcode `\^=\other -\catcode `\~=\other -\catcode `\[=\other -\catcode `\]=\other -\catcode`\"=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode `\$=\other -\catcode `\#=\other -\catcode `\&=\other -% `\+ does not work, so use 43. -\catcode 43=\other -% Make the characters 128-255 be printing characters -{% - \count 1=128 - \def\loop{% - \catcode\count 1=\other - \advance\count 1 by 1 - \ifnum \count 1<256 \loop \fi - }% -}% -% the aux file uses ' as the escape. -% Turn off \ as an escape so we do not lose on -% entries which were dumped with control sequences in their names. -% For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ -% Reference to such entries still does not work the way one would wish, -% but at least they do not bomb out when the aux file is read in. -\catcode `\{=1 \catcode `\}=2 -\catcode `\%=\other -\catcode `\'=0 -\catcode`\^=7 % to make ^^e4 etc usable in xref tags -\catcode `\\=\other -\openin 1 \jobname.aux -\ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue -\global\warnedobstrue -\fi -% Open the new aux file. Tex will close it automatically at exit. -\openout \auxfile=\jobname.aux -\endgroup} - - -% Footnotes. - -\newcount \footnoteno - -% The trailing space in the following definition for supereject is -% vital for proper filling; pages come out unaligned when you do a -% pagealignmacro call if that space before the closing brace is -% removed. -\def\supereject{\par\penalty -20000\footnoteno =0 } - -% @footnotestyle is meaningful for info output only.. -\let\footnotestyle=\comment - -\let\ptexfootnote=\footnote - -{\catcode `\@=11 -% -% Auto-number footnotes. Otherwise like plain. -\gdef\footnote{% - \global\advance\footnoteno by \@ne - \edef\thisfootno{$^{\the\footnoteno}$}% - % - % In case the footnote comes at the end of a sentence, preserve the - % extra spacing after we do the footnote number. - \let\@sf\empty - \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi - % - % Remove inadvertent blank space before typesetting the footnote number. - \unskip - \thisfootno\@sf - \footnotezzz -}% - -% Don't bother with the trickery in plain.tex to not require the -% footnote text as a parameter. Our footnotes don't need to be so general. -% -\long\gdef\footnotezzz#1{\insert\footins{% - % We want to typeset this text as a normal paragraph, even if the - % footnote reference occurs in (for example) a display environment. - % So reset some parameters. - \interlinepenalty\interfootnotelinepenalty - \splittopskip\ht\strutbox % top baseline for broken footnotes - \splitmaxdepth\dp\strutbox - \floatingpenalty\@MM - \leftskip\z@skip - \rightskip\z@skip - \spaceskip\z@skip - \xspaceskip\z@skip - \parindent\defaultparindent - % - % Hang the footnote text off the number. - \hang - \textindent{\thisfootno}% - % - % Don't crash into the line above the footnote text. Since this - % expands into a box, it must come within the paragraph, lest it - % provide a place where TeX can split the footnote. - \footstrut - #1\strut}% -} - -}%end \catcode `\@=11 - -% Set the baselineskip to #1, and the lineskip and strut size -% correspondingly. There is no deep meaning behind these magic numbers -% used as factors; they just match (closely enough) what Knuth defined. -% -\def\lineskipfactor{.08333} -\def\strutheightpercent{.70833} -\def\strutdepthpercent {.29167} -% -\def\setleading#1{% - \normalbaselineskip = #1\relax - \normallineskip = \lineskipfactor\normalbaselineskip - \normalbaselines - \setbox\strutbox =\hbox{% - \vrule width0pt height\strutheightpercent\baselineskip - depth \strutdepthpercent \baselineskip - }% -} - -% @| inserts a changebar to the left of the current line. It should -% surround any changed text. This approach does *not* work if the -% change spans more than two lines of output. To handle that, we would -% have adopt a much more difficult approach (putting marks into the main -% vertical list for the beginning and end of each change). -% -\def\|{% - % \vadjust can only be used in horizontal mode. - \leavevmode - % - % Append this vertical mode material after the current line in the output. - \vadjust{% - % We want to insert a rule with the height and depth of the current - % leading; that is exactly what \strutbox is supposed to record. - \vskip-\baselineskip - % - % \vadjust-items are inserted at the left edge of the type. So - % the \llap here moves out into the left-hand margin. - \llap{% - % - % For a thicker or thinner bar, change the `1pt'. - \vrule height\baselineskip width1pt - % - % This is the space between the bar and the text. - \hskip 12pt - }% - }% -} - -% For a final copy, take out the rectangles -% that mark overfull boxes (in case you have decided -% that the text looks ok even though it passes the margin). -% -\def\finalout{\overfullrule=0pt} - - -% End of control word definitions. - -\message{and turning on texinfo input format.} - -\def\openindices{% - \newindex{cp}% - \newcodeindex{fn}% - \newcodeindex{vr}% - \newcodeindex{tp}% - \newcodeindex{ky}% - \newcodeindex{pg}% -} - -% Set some numeric style parameters, for 8.5 x 11 format. - -%\hsize = 6.5in -\newdimen\defaultparindent \defaultparindent = 15pt -\parindent = \defaultparindent -\parskip 18pt plus 1pt -\setleading{15pt} -\advance\topskip by 1.2cm - -% Prevent underfull vbox error messages. -\vbadness=10000 - -% Following George Bush, just get rid of widows and orphans. -\widowpenalty=10000 -\clubpenalty=10000 - -% Use TeX 3.0's \emergencystretch to help line breaking, but if we're -% using an old version of TeX, don't do anything. We want the amount of -% stretch added to depend on the line length, hence the dependence on -% \hsize. This makes it come to about 9pt for the 8.5x11 format. -% -\ifx\emergencystretch\thisisundefined - % Allow us to assign to \emergencystretch anyway. - \def\emergencystretch{\dimen0}% -\else - \emergencystretch = \hsize - \divide\emergencystretch by 45 -\fi - -% Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) -\def\smallbook{ - -% These values for secheadingskip and subsecheadingskip are -% experiments. RJC 7 Aug 1992 -\global\secheadingskip = 17pt plus 6pt minus 3pt -\global\subsecheadingskip = 14pt plus 6pt minus 3pt - -\global\lispnarrowing = 0.3in -\setleading{12pt} -\advance\topskip by -1cm -\global\parskip 3pt plus 1pt -\global\hsize = 5in -\global\vsize=7.5in -\global\tolerance=700 -\global\hfuzz=1pt -\global\contentsrightmargin=0pt -\global\deftypemargin=0pt -\global\defbodyindent=.5cm - -\global\pagewidth=\hsize -\global\pageheight=\vsize - -\global\let\smalllisp=\smalllispx -\global\let\smallexample=\smalllispx -\global\def\Esmallexample{\Esmalllisp} -} - -% Use @afourpaper to print on European A4 paper. -\def\afourpaper{ -\global\tolerance=700 -\global\hfuzz=1pt -\setleading{12pt} -\global\parskip 15pt plus 1pt - -\global\vsize= 53\baselineskip -\advance\vsize by \topskip -%\global\hsize= 5.85in % A4 wide 10pt -\global\hsize= 6.5in -\global\outerhsize=\hsize -\global\advance\outerhsize by 0.5in -\global\outervsize=\vsize -\global\advance\outervsize by 0.6in - -\global\pagewidth=\hsize -\global\pageheight=\vsize -} - -% Allow control of the text dimensions. Parameters in order: textheight; -% textwidth; \voffset; \hoffset (!); binding offset. All require a dimension; -% header is additional; added length extends the bottom of the page. - -\def\changepagesizes#1#2#3#4#5{ - \global\vsize= #1 - \advance\vsize by \topskip - \global\voffset= #3 - \global\hsize= #2 - \global\outerhsize=\hsize - \global\advance\outerhsize by 0.5in - \global\outervsize=\vsize - \global\advance\outervsize by 0.6in - \global\pagewidth=\hsize - \global\pageheight=\vsize - \global\normaloffset= #4 - \global\bindingoffset= #5} - -% This layout is compatible with Latex on A4 paper. - -\def\afourlatex{\changepagesizes{22cm}{15cm}{7mm}{4.6mm}{5mm}} - -% Use @afourwide to print on European A4 paper in wide format. -\def\afourwide{\afourpaper -\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}} - -% Define macros to output various characters with catcode for normal text. -\catcode`\"=\other -\catcode`\~=\other -\catcode`\^=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode`\+=\other -\def\normaldoublequote{"} -\def\normaltilde{~} -\def\normalcaret{^} -\def\normalunderscore{_} -\def\normalverticalbar{|} -\def\normalless{<} -\def\normalgreater{>} -\def\normalplus{+} - -% This macro is used to make a character print one way in ttfont -% where it can probably just be output, and another way in other fonts, -% where something hairier probably needs to be done. -% -% #1 is what to print if we are indeed using \tt; #2 is what to print -% otherwise. Since all the Computer Modern typewriter fonts have zero -% interword stretch (and shrink), and it is reasonable to expect all -% typewriter fonts to have this, we can check that font parameter. -% -\def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi} - -% Turn off all special characters except @ -% (and those which the user can use as if they were ordinary). -% Most of these we simply print from the \tt font, but for some, we can -% use math or other variants that look better in normal text. - -\catcode`\"=\active -\def\activedoublequote{{\tt \char '042}} -\let"=\activedoublequote -\catcode`\~=\active -\def~{{\tt \char '176}} -\chardef\hat=`\^ -\catcode`\^=\active -\def\auxhat{\def^{'hat}} -\def^{{\tt \hat}} - -\catcode`\_=\active -\def_{\ifusingtt\normalunderscore\_} -% Subroutine for the previous macro. -\def\_{\lvvmode \kern.06em \vbox{\hrule width.3em height.1ex}} - -% \lvvmode is equivalent in function to \leavevmode. -% Using \leavevmode runs into trouble when written out to -% an index file due to the expansion of \leavevmode into ``\unhbox -% \voidb@x'' ---which looks to TeX like ``\unhbox \voidb\x'' due to our -% magic tricks with @. -\def\lvvmode{\vbox to 0pt{}} - -\catcode`\|=\active -\def|{{\tt \char '174}} -\chardef \less=`\< -\catcode`\<=\active -\def<{{\tt \less}} -\chardef \gtr=`\> -\catcode`\>=\active -\def>{{\tt \gtr}} -\catcode`\+=\active -\def+{{\tt \char 43}} -%\catcode 27=\active -%\def^^[{$\diamondsuit$} - -% Set up an active definition for =, but don't enable it most of the time. -{\catcode`\==\active -\global\def={{\tt \char 61}}} - -\catcode`+=\active -\catcode`\_=\active - -% If a .fmt file is being used, characters that might appear in a file -% name cannot be active until we have parsed the command line. -% So turn them off again, and have \everyjob (or @setfilename) turn them on. -% \otherifyactive is called near the end of this file. -\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} - -\catcode`\@=0 - -% \rawbackslashxx output one backslash character in current font -\global\chardef\rawbackslashxx=`\\ -%{\catcode`\\=\other -%@gdef@rawbackslashxx{\}} - -% \rawbackslash redefines \ as input to do \rawbackslashxx. -{\catcode`\\=\active -@gdef@rawbackslash{@let\=@rawbackslashxx }} - -% \normalbackslash outputs one backslash in fixed width font. -\def\normalbackslash{{\tt\rawbackslashxx}} - -% Say @foo, not \foo, in error messages. -\escapechar=`\@ - -% \catcode 17=0 % Define control-q -\catcode`\\=\active - -% Used sometimes to turn off (effectively) the active characters -% even after parsing them. -@def@turnoffactive{@let"=@normaldoublequote -@let\=@realbackslash -@let~=@normaltilde -@let^=@normalcaret -@let_=@normalunderscore -@let|=@normalverticalbar -@let<=@normalless -@let>=@normalgreater -@let+=@normalplus} - -@def@normalturnoffactive{@let"=@normaldoublequote -@let\=@normalbackslash -@let~=@normaltilde -@let^=@normalcaret -@let_=@normalunderscore -@let|=@normalverticalbar -@let<=@normalless -@let>=@normalgreater -@let+=@normalplus} - -% Make _ and + \other characters, temporarily. -% This is canceled by @fixbackslash. -@otherifyactive - -% If a .fmt file is being used, we don't want the `\input texinfo' to show up. -% That is what \eatinput is for; after that, the `\' should revert to printing -% a backslash. -% -@gdef@eatinput input texinfo{@fixbackslash} -@global@let\ = @eatinput - -% On the other hand, perhaps the file did not have a `\input texinfo'. Then -% the first `\{ in the file would cause an error. This macro tries to fix -% that, assuming it is called before the first `\' could plausibly occur. -% Also back turn on active characters that might appear in the input -% file name, in case not using a pre-dumped format. -% -@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi - @catcode`+=@active @catcode`@_=@active} - -%% These look ok in all fonts, so just make them not special. The @rm below -%% makes sure that the current font starts out as the newly loaded cmr10 -@catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other - -@textfonts -@rm - -@c Local variables: -@c page-delimiter: "^\\\\message" -@c End: diff --git a/buildtools/windows/source/make/variable.c b/buildtools/windows/source/make/variable.c deleted file mode 100644 index 319826f215b..00000000000 --- a/buildtools/windows/source/make/variable.c +++ /dev/null @@ -1,822 +0,0 @@ -/* Internals of variables for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "commands.h" -#include "variable.h" -#include "dep.h" -#include "file.h" - -/* Hash table of all global variable definitions. */ - -#ifndef VARIABLE_BUCKETS -#define VARIABLE_BUCKETS 523 -#endif -#ifndef PERFILE_VARIABLE_BUCKETS -#define PERFILE_VARIABLE_BUCKETS 23 -#endif -#ifndef SMALL_SCOPE_VARIABLE_BUCKETS -#define SMALL_SCOPE_VARIABLE_BUCKETS 13 -#endif -static struct variable *variable_table[VARIABLE_BUCKETS]; -static struct variable_set global_variable_set - = { variable_table, VARIABLE_BUCKETS }; -static struct variable_set_list global_setlist - = { 0, &global_variable_set }; -struct variable_set_list *current_variable_set_list = &global_setlist; - -/* Implement variables. */ - -/* Define variable named NAME with value VALUE in SET. VALUE is copied. - LENGTH is the length of NAME, which does not need to be null-terminated. - ORIGIN specifies the origin of the variable (makefile, command line - or environment). - If RECURSIVE is nonzero a flag is set in the variable saying - that it should be recursively re-expanded. */ - -static struct variable * -define_variable_in_set (name, length, value, origin, recursive, set) - char *name; - unsigned int length; - char *value; - enum variable_origin origin; - int recursive; - struct variable_set *set; -{ - register unsigned int i; - register unsigned int hashval; - register struct variable *v; - - hashval = 0; - for (i = 0; i < length; ++i) - HASH (hashval, name[i]); - hashval %= set->buckets; - - for (v = set->table[hashval]; v != 0; v = v->next) - if (*v->name == *name - && !strncmp (v->name + 1, name + 1, length - 1) - && v->name[length] == '\0') - break; - - if (env_overrides && origin == o_env) - origin = o_env_override; - - if (v != 0) - { - if (env_overrides && v->origin == o_env) - /* V came from in the environment. Since it was defined - before the switches were parsed, it wasn't affected by -e. */ - v->origin = o_env_override; - - /* A variable of this name is already defined. - If the old definition is from a stronger source - than this one, don't redefine it. */ - if ((int) origin >= (int) v->origin) - { - if (v->value != 0) - free (v->value); - v->value = savestring (value, strlen (value)); - v->origin = origin; - v->recursive = recursive; - } - return v; - } - - /* Create a new variable definition and add it to the hash table. */ - - v = (struct variable *) xmalloc (sizeof (struct variable)); - v->name = savestring (name, length); - v->value = savestring (value, strlen (value)); - v->origin = origin; - v->recursive = recursive; - v->expanding = 0; - v->export = v_default; - v->next = set->table[hashval]; - set->table[hashval] = v; - return v; -} - -/* Define a variable in the current variable set. */ - -struct variable * -define_variable (name, length, value, origin, recursive) - char *name; - unsigned int length; - char *value; - enum variable_origin origin; - int recursive; -{ - return define_variable_in_set (name, length, value, origin, recursive, - current_variable_set_list->set); -} - -/* Define a variable in FILE's variable set. */ - -struct variable * -define_variable_for_file (name, length, value, origin, recursive, file) - char *name; - unsigned int length; - char *value; - enum variable_origin origin; - int recursive; - struct file *file; -{ - return define_variable_in_set (name, length, value, origin, recursive, - file->variables->set); -} - -/* Lookup a variable whose name is a string starting at NAME - and with LENGTH chars. NAME need not be null-terminated. - Returns address of the `struct variable' containing all info - on the variable, or nil if no such variable is defined. */ - -struct variable * -lookup_variable (name, length) - char *name; - unsigned int length; -{ - register struct variable_set_list *setlist; - - register unsigned int i; - register unsigned int rawhash = 0; - - for (i = 0; i < length; ++i) - HASH (rawhash, name[i]); - - for (setlist = current_variable_set_list; - setlist != 0; setlist = setlist->next) - { - register struct variable_set *set = setlist->set; - register unsigned int hashval = rawhash % set->buckets; - register struct variable *v; - - for (v = set->table[hashval]; v != 0; v = v->next) - if (*v->name == *name - && !strncmp (v->name + 1, name + 1, length - 1) - && v->name[length] == 0) - return v; - } - - return 0; -} - -/* Initialize FILE's variable set list. If FILE already has a variable set - list, the topmost variable set is left intact, but the the rest of the - chain is replaced with FILE->parent's setlist. */ - -void -initialize_file_variables (file) - struct file *file; -{ - register struct variable_set_list *l = file->variables; - if (l == 0) - { - l = (struct variable_set_list *) - xmalloc (sizeof (struct variable_set_list)); - l->set = (struct variable_set *) xmalloc (sizeof (struct variable_set)); - l->set->buckets = PERFILE_VARIABLE_BUCKETS; - l->set->table = (struct variable **) - xmalloc (l->set->buckets * sizeof (struct variable *)); - bzero ((char *) l->set->table, - l->set->buckets * sizeof (struct variable *)); - file->variables = l; - } - - if (file->parent == 0) - l->next = &global_setlist; - else - { - if (file->parent->variables == 0) - initialize_file_variables (file->parent); - l->next = file->parent->variables; - } -} - -/* Pop the top set off the current variable set list, - and free all its storage. */ - -void -pop_variable_scope () -{ - register struct variable_set_list *setlist = current_variable_set_list; - register struct variable_set *set = setlist->set; - register unsigned int i; - - current_variable_set_list = setlist->next; - free ((char *) setlist); - - for (i = 0; i < set->buckets; ++i) - { - register struct variable *next = set->table[i]; - while (next != 0) - { - register struct variable *v = next; - next = v->next; - - free (v->name); - free ((char *) v); - } - } - free ((char *) set->table); - free ((char *) set); -} - -/* Create a new variable set and push it on the current setlist. */ - -void -push_new_variable_scope () -{ - register struct variable_set_list *setlist; - register struct variable_set *set; - - set = (struct variable_set *) xmalloc (sizeof (struct variable_set)); - set->buckets = SMALL_SCOPE_VARIABLE_BUCKETS; - set->table = (struct variable **) - xmalloc (set->buckets * sizeof (struct variable *)); - bzero ((char *) set->table, set->buckets * sizeof (struct variable *)); - - setlist = (struct variable_set_list *) - xmalloc (sizeof (struct variable_set_list)); - setlist->set = set; - setlist->next = current_variable_set_list; - current_variable_set_list = setlist; -} - -/* Merge SET1 into SET0, freeing unused storage in SET1. */ - -static void -merge_variable_sets (set0, set1) - struct variable_set *set0, *set1; -{ - register unsigned int bucket1; - - for (bucket1 = 0; bucket1 < set1->buckets; ++bucket1) - { - register struct variable *v1 = set1->table[bucket1]; - while (v1 != 0) - { - struct variable *next = v1->next; - unsigned int bucket0; - register struct variable *v0; - - if (set1->buckets >= set0->buckets) - bucket0 = bucket1; - else - { - register char *n; - bucket0 = 0; - for (n = v1->name; *n != '\0'; ++n) - HASH (bucket0, *n); - } - bucket0 %= set0->buckets; - - for (v0 = set0->table[bucket0]; v0 != 0; v0 = v0->next) - if (streq (v0->name, v1->name)) - break; - - if (v0 == 0) - { - /* There is no variable in SET0 with the same name. */ - v1->next = set0->table[bucket0]; - set0->table[bucket0] = v1; - } - else - { - /* The same variable exists in both sets. - SET0 takes precedence. */ - free (v1->value); - free ((char *) v1); - } - - v1 = next; - } - } -} - -/* Merge SETLIST1 into SETLIST0, freeing unused storage in SETLIST1. */ - -void -merge_variable_set_lists (setlist0, setlist1) - struct variable_set_list **setlist0, *setlist1; -{ - register struct variable_set_list *list0 = *setlist0; - struct variable_set_list *last0 = 0; - - while (setlist1 != 0 && list0 != 0) - { - struct variable_set_list *next = setlist1; - setlist1 = setlist1->next; - - merge_variable_sets (list0->set, next->set); - - free ((char *) next); - - last0 = list0; - list0 = list0->next; - } - - if (setlist1 != 0) - { - if (last0 == 0) - *setlist0 = setlist1; - else - last0->next = setlist1; - } -} - -/* Define the automatic variables, and record the addresses - of their structures so we can change their values quickly. */ - -void -define_automatic_variables () -{ - extern char default_shell[]; - register struct variable *v; - char buf[200]; - - sprintf (buf, "%u", makelevel); - (void) define_variable ("MAKELEVEL", 9, buf, o_env, 0); - - sprintf (buf, "%s%s%s", - version_string, - (remote_description == 0 || remote_description[0] == '\0') - ? "" : "-", - (remote_description == 0 || remote_description[0] == '\0') - ? "" : remote_description); - (void) define_variable ("MAKE_VERSION", 12, buf, o_default, 0); - - - /* This won't override any definition, but it - will provide one if there isn't one there. */ - v = define_variable ("SHELL", 5, default_shell, o_default, 0); - v->export = v_export; /* Always export SHELL. */ - - /* Don't let SHELL come from the environment. */ - if (*v->value == '\0' || v->origin == o_env || v->origin == o_env_override) - { - free (v->value); - v->origin = o_file; - v->value = savestring (default_shell, strlen (default_shell)); - } - - /* Make sure MAKEFILES gets exported if it is set. */ - v = define_variable ("MAKEFILES", 9, "", o_default, 0); - v->export = v_ifset; - - /* Define the magic D and F variables in terms of - the automatic variables they are variations of. */ - - define_variable ("@D", 2, "$(patsubst %/,%,$(dir $@))", o_automatic, 1); - define_variable ("%D", 2, "$(patsubst %/,%,$(dir $%))", o_automatic, 1); - define_variable ("*D", 2, "$(patsubst %/,%,$(dir $*))", o_automatic, 1); - define_variable ("variables; - - /* Find the lowest number of buckets in any set in the list. */ - s = set_list; - buckets = s->set->buckets; - for (s = s->next; s != 0; s = s->next) - if (s->set->buckets < buckets) - buckets = s->set->buckets; - - /* Find the hash value of the bucket `MAKELEVEL' will fall into. */ - { - char *p = "MAKELEVEL"; - mklev_hash = 0; - while (*p != '\0') - HASH (mklev_hash, *p++); - } - - /* Temporarily allocate a table with that many buckets. */ - table = (struct variable_bucket **) - alloca (buckets * sizeof (struct variable_bucket *)); - bzero ((char *) table, buckets * sizeof (struct variable_bucket *)); - - /* Run through all the variable sets in the list, - accumulating variables in TABLE. */ - nvariables = 0; - for (s = set_list; s != 0; s = s->next) - { - register struct variable_set *set = s->set; - for (i = 0; i < set->buckets; ++i) - { - register struct variable *v; - for (v = set->table[i]; v != 0; v = v->next) - { - unsigned int j = i % buckets; - register struct variable_bucket *ov; - register char *p = v->name; - - if (i == mklev_hash % set->buckets - && streq (v->name, "MAKELEVEL")) - /* Don't include MAKELEVEL because it will be - added specially at the end. */ - continue; - - switch (v->export) - { - case v_default: - if (v->origin == o_default || v->origin == o_automatic) - /* Only export default variables by explicit request. */ - continue; - - if (! export_all_variables - && v->origin != o_command - && v->origin != o_env && v->origin != o_env_override) - continue; - - if (*p != '_' && (*p < 'A' || *p > 'Z') - && (*p < 'a' || *p > 'z')) - continue; - for (++p; *p != '\0'; ++p) - if (*p != '_' && (*p < 'a' || *p > 'z') - && (*p < 'A' || *p > 'Z') && (*p < '0' || *p > '9')) - break; - if (*p != '\0') - continue; - - case v_export: - break; - - case v_noexport: - continue; - - case v_ifset: - if (v->origin == o_default) - continue; - break; - } - - for (ov = table[j]; ov != 0; ov = ov->next) - if (streq (v->name, ov->variable->name)) - break; - if (ov == 0) - { - register struct variable_bucket *entry; - entry = (struct variable_bucket *) - alloca (sizeof (struct variable_bucket)); - entry->next = table[j]; - entry->variable = v; - table[j] = entry; - ++nvariables; - } - } - } - } - - result = (char **) xmalloc ((nvariables + 2) * sizeof (char *)); - nvariables = 0; - for (i = 0; i < buckets; ++i) - { - register struct variable_bucket *b; - for (b = table[i]; b != 0; b = b->next) - { - register struct variable *v = b->variable; - /* If V is recursively expanded and didn't come from the environment, - expand its value. If it came from the environment, it should - go back into the environment unchanged. */ - if (v->recursive - && v->origin != o_env && v->origin != o_env_override) - { - char *value = recursively_expand (v); - result[nvariables++] = concat (v->name, "=", value); - free (value); - } - else - result[nvariables++] = concat (v->name, "=", v->value); - } - } - result[nvariables] = (char *) xmalloc (100); - (void) sprintf (result[nvariables], "MAKELEVEL=%u", makelevel + 1); - result[++nvariables] = 0; - - return result; -} - -/* Try to interpret LINE (a null-terminated string) as a variable definition. - - ORIGIN may be o_file, o_override, o_env, o_env_override, - or o_command specifying that the variable definition comes - from a makefile, an override directive, the environment with - or without the -e switch, or the command line. - - A variable definition has the form "name = value" or "name := value". - Any whitespace around the "=" or ":=" is removed. The first form - defines a variable that is recursively re-evaluated. The second form - defines a variable whose value is variable-expanded at the time of - definition and then is evaluated only once at the time of expansion. - - If a variable was defined, a pointer to its `struct variable' is returned. - If not, NULL is returned. */ - -struct variable * -try_variable_definition (filename, lineno, line, origin) - char *filename; - unsigned int lineno; - char *line; - enum variable_origin origin; -{ - register int c; - register char *p = line; - register char *beg; - register char *end; - enum { bogus, simple, recursive, append } flavor = bogus; - char *name, *expanded_name, *value; - struct variable *v; - - while (1) - { - c = *p++; - if (c == '\0' || c == '#') - return 0; - if (c == '=') - { - end = p - 1; - flavor = recursive; - break; - } - else if (c == ':') - if (*p == '=') - { - end = p++ - 1; - flavor = simple; - break; - } - else - /* A colon other than := is a rule line, not a variable defn. */ - return 0; - else if (c == '+' && *p == '=') - { - end = p++ - 1; - flavor = append; - break; - } - } - - beg = next_token (line); - while (end > beg && isblank (end[-1])) - --end; - p = next_token (p); - - /* Expand the name, so "$(foo)bar = baz" works. */ - name = (char *) alloca (end - beg + 1); - bcopy (beg, name, end - beg); - name[end - beg] = '\0'; - expanded_name = allocated_variable_expand (name); - - if (expanded_name[0] == '\0') - { - if (filename == 0) - fatal ("empty variable name"); - else - makefile_fatal (filename, lineno, "empty variable name"); - } - - /* Calculate the variable's new value in VALUE. */ - - switch (flavor) - { - case bogus: - /* Should not be possible. */ - abort (); - return 0; - case simple: - /* A simple variable definition "var := value". Expand the value. */ - value = variable_expand (p); - break; - case recursive: - /* A recursive variable definition "var = value". - The value is used verbatim. */ - value = p; - break; - case append: - /* An appending variable definition "var += value". - Extract the old value and append the new one. */ - v = lookup_variable (expanded_name, strlen (expanded_name)); - if (v == 0) - { - /* There was no old value. - This becomes a normal recursive definition. */ - value = p; - flavor = recursive; - } - else - { - /* Paste the old and new values together in VALUE. */ - - unsigned int oldlen, newlen; - - if (v->recursive) - /* The previous definition of the variable was recursive. - The new value comes from the unexpanded old and new values. */ - flavor = recursive; - else - /* The previous definition of the variable was simple. - The new value comes from the old value, which was expanded - when it was set; and from the expanded new value. */ - p = variable_expand (p); - - oldlen = strlen (v->value); - newlen = strlen (p); - value = (char *) alloca (oldlen + 1 + newlen + 1); - bcopy (v->value, value, oldlen); - value[oldlen] = ' '; - bcopy (p, &value[oldlen + 1], newlen + 1); - } - } - - v = define_variable (expanded_name, strlen (expanded_name), - value, origin, flavor == recursive); - - free (expanded_name); - - return v; -} - -/* Print information for variable V, prefixing it with PREFIX. */ - -static void -print_variable (v, prefix) - register struct variable *v; - char *prefix; -{ - char *origin; - - switch (v->origin) - { - case o_default: - origin = "default"; - break; - case o_env: - origin = "environment"; - break; - case o_file: - origin = "makefile"; - break; - case o_env_override: - origin = "environment under -e"; - break; - case o_command: - origin = "command line"; - break; - case o_override: - origin = "`override' directive"; - break; - case o_automatic: - origin = "automatic"; - break; - case o_invalid: - default: - abort (); - break; - } - printf ("# %s\n", origin); - - fputs (prefix, stdout); - - /* Is this a `define'? */ - if (v->recursive && index (v->value, '\n') != 0) - printf ("define %s\n%s\nendef\n", v->name, v->value); - else - { - register char *p; - - printf ("%s %s= ", v->name, v->recursive ? "" : ":"); - - /* Check if the value is just whitespace. */ - p = next_token (v->value); - if (p != v->value && *p == '\0') - /* All whitespace. */ - printf ("$(subst ,,%s)", v->value); - else if (v->recursive) - fputs (v->value, stdout); - else - /* Double up dollar signs. */ - for (p = v->value; *p != '\0'; ++p) - { - if (*p == '$') - putchar ('$'); - putchar (*p); - } - putchar ('\n'); - } -} - - -/* Print all the variables in SET. PREFIX is printed before - the actual variable definitions (everything else is comments). */ - -static void -print_variable_set (set, prefix) - register struct variable_set *set; - char *prefix; -{ - register unsigned int i, nvariables, per_bucket; - register struct variable *v; - - per_bucket = nvariables = 0; - for (i = 0; i < set->buckets; ++i) - { - register unsigned int this_bucket = 0; - - for (v = set->table[i]; v != 0; v = v->next) - { - ++this_bucket; - print_variable (v, prefix); - } - - nvariables += this_bucket; - if (this_bucket > per_bucket) - per_bucket = this_bucket; - } - - if (nvariables == 0) - puts ("# No variables."); - else - { - printf ("# %u variables in %u hash buckets.\n", - nvariables, set->buckets); -#ifndef NO_FLOAT - printf ("# average of %.1f variables per bucket, \ -max %u in one bucket.\n", - (double) nvariables / (double) set->buckets, - per_bucket); -#endif - } -} - - -/* Print the data base of variables. */ - -void -print_variable_data_base () -{ - puts ("\n# Variables\n"); - - print_variable_set (&global_variable_set, ""); -} - - -/* Print all the local variables of FILE. */ - -void -print_file_variables (file) - struct file *file; -{ - if (file->variables != 0) - print_variable_set (file->variables->set, "# "); -} diff --git a/buildtools/windows/source/make/variable.h b/buildtools/windows/source/make/variable.h deleted file mode 100644 index 80961790703..00000000000 --- a/buildtools/windows/source/make/variable.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Definitions for using variables in GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Codes in a variable definition saying where the definition came from. - Increasing numeric values signify less-overridable definitions. */ -enum variable_origin - { - o_default, /* Variable from the default set. */ - o_env, /* Variable from environment. */ - o_file, /* Variable given in a makefile. */ - o_env_override, /* Variable from environment, if -e. */ - o_command, /* Variable given by user. */ - o_override, /* Variable from an `override' directive. */ - o_automatic, /* Automatic variable -- cannot be set. */ - o_invalid /* Core dump time. */ - }; - -/* Structure that represents one variable definition. - Each bucket of the hash table is a chain of these, - chained through `next'. */ - -struct variable - { - struct variable *next; /* Link in the chain. */ - char *name; /* Variable name. */ - char *value; /* Variable value. */ - enum variable_origin - origin ENUM_BITFIELD (3); /* Variable origin. */ - unsigned int recursive:1; /* Gets recursively re-evaluated. */ - unsigned int expanding:1; /* Nonzero if currently being expanded. */ - enum - { - v_export, /* Export this variable. */ - v_noexport, /* Don't export this variable. */ - v_ifset, /* Export it if it has a non-default value. */ - v_default /* Decide in target_environment. */ - } export ENUM_BITFIELD (2); - }; - -/* Structure that represents a variable set. */ - -struct variable_set - { - struct variable **table; /* Hash table of variables. */ - unsigned int buckets; /* Number of hash buckets in `table'. */ - }; - -/* Structure that represents a list of variable sets. */ - -struct variable_set_list - { - struct variable_set_list *next; /* Link in the chain. */ - struct variable_set *set; /* Variable set. */ - }; - -extern struct variable_set_list *current_variable_set_list; - - -extern void push_new_variable_scope (), pop_variable_scope (); - -extern int handle_function (); - -extern char *variable_buffer_output (); -extern char *variable_expand (), *variable_expand_for_file (); -extern char *allocated_variable_expand_for_file (); -#define allocated_variable_expand(line) \ - allocated_variable_expand_for_file (line, (struct file *) 0) -extern char *expand_argument (); - -extern void define_automatic_variables (); -extern void initialize_file_variables (); -extern void print_file_variables (); - -extern void merge_variable_set_lists (); - -extern struct variable *try_variable_definition (); - -extern struct variable *lookup_variable (), *define_variable (); -extern struct variable *define_variable_for_file (); - -extern int pattern_matches (); -extern char *subst_expand (), *patsubst_expand (), *recursively_expand (); - -extern char **target_environment (); -extern int export_all_variables; diff --git a/buildtools/windows/source/make/version.c b/buildtools/windows/source/make/version.c deleted file mode 100644 index 4818dd6b1d3..00000000000 --- a/buildtools/windows/source/make/version.c +++ /dev/null @@ -1,7 +0,0 @@ -char *version_string = "3.74"; - -/* - Local variables: - version-control: never - End: - */ diff --git a/buildtools/windows/source/make/vpath.c b/buildtools/windows/source/make/vpath.c deleted file mode 100644 index 480fcad744d..00000000000 --- a/buildtools/windows/source/make/vpath.c +++ /dev/null @@ -1,487 +0,0 @@ -/* Implementation of pattern-matching file search paths for GNU Make. -Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -This file is part of GNU Make. - -GNU Make is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Make is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Make; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include "make.h" -#include "file.h" -#include "variable.h" - - -/* Structure used to represent a selective VPATH searchpath. */ - -struct vpath - { - struct vpath *next; /* Pointer to next struct in the linked list. */ - char *pattern; /* The pattern to match. */ - char *percent; /* Pointer into `pattern' where the `%' is. */ - unsigned int patlen;/* Length of the pattern. */ - char **searchpath; /* Null-terminated list of directories. */ - unsigned int maxlen;/* Maximum length of any entry in the list. */ - }; - -/* Linked-list of all selective VPATHs. */ - -static struct vpath *vpaths; - -/* Structure for the general VPATH given in the variable. */ - -static struct vpath *general_vpath; - -static int selective_vpath_search (); - -/* Reverse the chain of selective VPATH lists so they - will be searched in the order given in the makefiles - and construct the list from the VPATH variable. */ - -void -build_vpath_lists () -{ - register struct vpath *new = 0; - register struct vpath *old, *nexto; - register char *p; - - /* Reverse the chain. */ - for (old = vpaths; old != 0; old = nexto) - { - nexto = old->next; - old->next = new; - new = old; - } - - vpaths = new; - - /* If there is a VPATH variable with a nonnull value, construct the - general VPATH list from it. We use variable_expand rather than just - calling lookup_variable so that it will be recursively expanded. */ - - { - /* Turn off --warn-undefined-variables while we expand SHELL and IFS. */ - int save = warn_undefined_variables_flag; - warn_undefined_variables_flag = 0; - - p = variable_expand ("$(strip $(VPATH))"); - - warn_undefined_variables_flag = save; - } - - if (*p != '\0') - { - /* Save the list of vpaths. */ - struct vpath *save_vpaths = vpaths; - - /* Empty `vpaths' so the new one will have no next, and `vpaths' - will still be nil if P contains no existing directories. */ - vpaths = 0; - - /* Parse P. */ - construct_vpath_list ("%", p); - - /* Store the created path as the general path, - and restore the old list of vpaths. */ - general_vpath = vpaths; - vpaths = save_vpaths; - } -} - -/* Construct the VPATH listing for the pattern and searchpath given. - - This function is called to generate selective VPATH lists and also for - the general VPATH list (which is in fact just a selective VPATH that - is applied to everything). The returned pointer is either put in the - linked list of all selective VPATH lists or in the GENERAL_VPATH - variable. - - If SEARCHPATH is nil, remove all previous listings with the same - pattern. If PATTERN is nil, remove all VPATH listings. - Existing and readable directories that are not "." given in the - searchpath separated by colons are loaded into the directory hash - table if they are not there already and put in the VPATH searchpath - for the given pattern with trailing slashes stripped off if present - (and if the directory is not the root, "/"). - The length of the longest entry in the list is put in the structure as well. - The new entry will be at the head of the VPATHS chain. */ - -void -construct_vpath_list (pattern, dirpath) - char *pattern, *dirpath; -{ - register unsigned int elem; - register char *p; - register char **vpath; - register unsigned int maxvpath; - unsigned int maxelem; - char *percent; - - if (pattern != 0) - { - pattern = savestring (pattern, strlen (pattern)); - percent = find_percent (pattern); - } - - if (dirpath == 0) - { - /* Remove matching listings. */ - register struct vpath *path, *lastpath; - - lastpath = 0; - path = vpaths; - while (path != 0) - { - struct vpath *next = path->next; - - if (pattern == 0 - || (((percent == 0 && path->percent == 0) - || (percent - pattern == path->percent - path->pattern)) - && streq (pattern, path->pattern))) - { - /* Remove it from the linked list. */ - if (lastpath == 0) - vpaths = path->next; - else - lastpath->next = next; - - /* Free its unused storage. */ - free (path->pattern); - free ((char *) path->searchpath); - free ((char *) path); - } - else - lastpath = path; - - path = next; - } - - if (pattern != 0) - free (pattern); - return; - } - - /* Figure out the maximum number of VPATH entries and - put it in MAXELEM. We start with 2, one before the - first colon and one nil, the list terminator and - increment our estimated number for each colon or blank we find. */ - maxelem = 2; - p = dirpath; - while (*p != '\0') - if (*p++ == PATH_SEPARATOR_CHAR || isblank (*p)) - ++maxelem; - - vpath = (char **) xmalloc (maxelem * sizeof (char *)); - maxvpath = 0; - - /* Skip over any initial colons and blanks. */ - p = dirpath; - while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) - ++p; - - elem = 0; - while (*p != '\0') - { - char *v; - unsigned int len; - - /* Find the end of this entry. */ - v = p; - while (*p != '\0' && *p != PATH_SEPARATOR_CHAR && !isblank (*p)) - ++p; - - len = p - v; - /* Make sure there's no trailing slash, - but still allow "/" as a directory. */ - if (len > 1 && p[-1] == '/') - --len; - - if (len > 1 || *v != '.') - { - v = savestring (v, len); - - /* Verify that the directory actually exists. */ - - if (dir_file_exists_p (v, "")) - { - /* It does. Put it in the list. */ - vpath[elem++] = dir_name (v); - free (v); - if (len > maxvpath) - maxvpath = len; - } - else - /* The directory does not exist. Omit from the list. */ - free (v); - } - - /* Skip over colons and blanks between entries. */ - while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) - ++p; - } - - if (elem > 0) - { - struct vpath *path; - /* ELEM is now incremented one element past the last - entry, to where the nil-pointer terminator goes. - Usually this is maxelem - 1. If not, shrink down. */ - if (elem < (maxelem - 1)) - vpath = (char **) xrealloc ((char *) vpath, - (elem + 1) * sizeof (char *)); - - /* Put the nil-pointer terminator on the end of the VPATH list. */ - vpath[elem] = 0; - - /* Construct the vpath structure and put it into the linked list. */ - path = (struct vpath *) xmalloc (sizeof (struct vpath)); - path->searchpath = vpath; - path->maxlen = maxvpath; - path->next = vpaths; - vpaths = path; - - /* Set up the members. */ - path->pattern = pattern; - path->percent = percent; - path->patlen = strlen (pattern); - } - else - { - /* There were no entries, so free whatever space we allocated. */ - free ((char *) vpath); - if (pattern != 0) - free (pattern); - } -} - -/* Search the VPATH list whose pattern matches *FILE for a directory - where the name pointed to by FILE exists. If it is found, we set *FILE to - the newly malloc'd name of the existing file, *MTIME_PTR (if MTIME_PTR is - not NULL) to its modtime (or zero if no stat call was done), and return 1. - Otherwise we return 0. */ - -int -vpath_search (file, mtime_ptr) - char **file; - time_t *mtime_ptr; -{ - register struct vpath *v; - - /* If there are no VPATH entries or FILENAME starts at the root, - there is nothing we can do. */ - - if (**file == '/' || (vpaths == 0 && general_vpath == 0)) - return 0; - - for (v = vpaths; v != 0; v = v->next) - if (pattern_matches (v->pattern, v->percent, *file)) - if (selective_vpath_search (v, file, mtime_ptr)) - return 1; - - if (general_vpath != 0 - && selective_vpath_search (general_vpath, file, mtime_ptr)) - return 1; - - return 0; -} - - -/* Search the given VPATH list for a directory where the name pointed - to by FILE exists. If it is found, we set *FILE to the newly malloc'd - name of the existing file, *MTIME_PTR (if MTIME_PTR is not NULL) to - its modtime (or zero if no stat call was done), and we return 1. - Otherwise we return 0. */ - -static int -selective_vpath_search (path, file, mtime_ptr) - struct vpath *path; - char **file; - time_t *mtime_ptr; -{ - int not_target; - char *name, *n; - char *filename; - register char **vpath = path->searchpath; - unsigned int maxvpath = path->maxlen; - register unsigned int i; - unsigned int flen, vlen, name_dplen; - int exists = 0; - - /* Find out if *FILE is a target. - If and only if it is NOT a target, we will accept prospective - files that don't exist but are mentioned in a makefile. */ - { - struct file *f = lookup_file (*file); - not_target = f == 0 || !f->is_target; - } - - flen = strlen (*file); - - /* Split *FILE into a directory prefix and a name-within-directory. - NAME_DPLEN gets the length of the prefix; FILENAME gets the - pointer to the name-within-directory and FLEN is its length. */ - - n = rindex (*file, '/'); - name_dplen = n != 0 ? n - *file : 0; - filename = name_dplen > 0 ? n + 1 : *file; - if (name_dplen > 0) - flen -= name_dplen + 1; - - /* Allocate enough space for the biggest VPATH entry, - a slash, the directory prefix that came with *FILE, - another slash (although this one may not always be - necessary), the filename, and a null terminator. */ - name = (char *) alloca (maxvpath + 1 + name_dplen + 1 + flen + 1); - - /* Try each VPATH entry. */ - for (i = 0; vpath[i] != 0; ++i) - { - int exists_in_cache = 0; - - n = name; - - /* Put the next VPATH entry into NAME at N and increment N past it. */ - vlen = strlen (vpath[i]); - bcopy (vpath[i], n, vlen); - n += vlen; - - /* Add the directory prefix already in *FILE. */ - if (name_dplen > 0) - { - *n++ = '/'; - bcopy (*file, n, name_dplen); - n += name_dplen; - } - - /* Now add the name-within-directory at the end of NAME. */ - if (n != name && n[-1] != '/') - { - *n = '/'; - bcopy (filename, n + 1, flen + 1); - } - else - bcopy (filename, n, flen + 1); - - /* Check if the file is mentioned in a makefile. If *FILE is not - a target, that is enough for us to decide this file exists. - If *FILE is a target, then the file must be mentioned in the - makefile also as a target to be chosen. - - The restriction that *FILE must not be a target for a - makefile-mentioned file to be chosen was added by an - inadequately commented change in July 1990; I am not sure off - hand what problem it fixes. - - In December 1993 I loosened of this restriction to allow a file - to be chosen if it is mentioned as a target in a makefile. This - seem logical. */ - { - struct file *f = lookup_file (name); - if (f != 0) - exists = not_target || f->is_target; - } - - if (!exists) - { - /* That file wasn't mentioned in the makefile. - See if it actually exists. */ - - /* Clobber a null into the name at the last slash. - Now NAME is the name of the directory to look in. */ - *n = '\0'; - - /* We know the directory is in the hash table now because either - construct_vpath_list or the code just above put it there. - Does the file we seek exist in it? */ - exists_in_cache = exists = dir_file_exists_p (name, filename); - } - - if (exists) - { - /* The file is in the directory cache. - Now check that it actually exists in the filesystem. - The cache may be out of date. When vpath thinks a file - exists, but stat fails for it, confusion results in the - higher levels. */ - - struct stat st; - - /* Put the slash back in NAME. */ - *n = '/'; - - if (!exists_in_cache /* Makefile-mentioned file need not exist. */ - || safe_stat (name, &st) == 0) /* Does it really exist? */ - { - /* We have found a file. - Store the name we found into *FILE for the caller. */ - - *file = savestring (name, (n + 1 - name) + flen); - - if (mtime_ptr != 0) - /* Store the modtime into *MTIME_PTR for the caller. - If we have had no need to stat the file here, - we record a zero modtime to indicate this. */ - *mtime_ptr = exists_in_cache ? st.st_mtime : (time_t) 0; - - return 1; - } - else - exists = 0; - } - } - - return 0; -} - -/* Print the data base of VPATH search paths. */ - -void -print_vpath_data_base () -{ - register unsigned int nvpaths; - register struct vpath *v; - - puts ("\n# VPATH Search Paths\n"); - - nvpaths = 0; - for (v = vpaths; v != 0; v = v->next) - { - register unsigned int i; - - ++nvpaths; - - printf ("vpath %s ", v->pattern); - - for (i = 0; v->searchpath[i] != 0; ++i) - printf ("%s%c", v->searchpath[i], - v->searchpath[i + 1] == 0 ? '\n' : PATH_SEPARATOR_CHAR); - } - - if (vpaths == 0) - puts ("# No `vpath' search paths."); - else - printf ("\n# %u `vpath' search paths.\n", nvpaths); - - if (general_vpath == 0) - puts ("\n# No general (`VPATH' variable) search path."); - else - { - register char **path = general_vpath->searchpath; - register unsigned int i; - - fputs ("\n# General (`VPATH' variable) search path:\n# ", stdout); - - for (i = 0; path[i] != 0; ++i) - printf ("%s%c", path[i], - path[i + 1] == 0 ? '\n' : PATH_SEPARATOR_CHAR); - } -} diff --git a/buildtools/windows/source/make/windir.h b/buildtools/windows/source/make/windir.h deleted file mode 100644 index 0ea444e1e0a..00000000000 --- a/buildtools/windows/source/make/windir.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef WINDIR_H -#define WINDIR_H - -#include -#include - -struct dirent { - char *d_name; -}; -typedef struct { - HANDLE dp; - WIN32_FIND_DATA fdata; - struct dirent de; -} dir_s; -typedef dir_s DIR; - -DIR *opendir(char *); -struct dirent *readdir(DIR *); -void closedir(DIR *); - -#endif diff --git a/buildtools/windows/source/shmsdos/README b/buildtools/windows/source/shmsdos/README deleted file mode 100644 index 7acdac02ac0..00000000000 --- a/buildtools/windows/source/shmsdos/README +++ /dev/null @@ -1,27 +0,0 @@ -This directory contains the source files for shmsdos.exe and -nsinstall.exe, which are used in conjunction with gmake.exe -to build some components of the Mozilla client on Win32. - -The tool shmsdos.exe is a very lightweight shell. It is -the default shell for our gmake.exe. shmsdos.exe implements -several common Unix utilities as built-in commands, such as -mv, cp, rm, echo, mkdir, etc. It only implements very -limited shell features. It can do if-then-else and for loops, -but it can't do variables, pipes, standard I/O redicrection, etc. - -It is possible to use a real Bourne shell with our gmake.exe -by defining the SHELL variable in your makefiles. Our gmake.exe -works with the Korn shell (sh.exe) of MKS Toolkit. If you go -this route, you will also need nsinstall.exe. (nsinstall is -a built-in command for shmsdos.exe.) - -To build shmsdos.exe, you need Microsoft Visual C++ and nmake. -Just issue the command: - nmake /f shmsdos.mak -The output is Release\shmsdos.exe. Copy it to a directory on -your Path. - -To build nsinstall.exe, issue the command: - nmake /f nsinstall.mak -The output is Release\nsinstall.exe. Copy it to a directory -on your Path. diff --git a/buildtools/windows/source/shmsdos/nsinstall.c b/buildtools/windows/source/shmsdos/nsinstall.c deleted file mode 100644 index 2a0a11d4bb8..00000000000 --- a/buildtools/windows/source/shmsdos/nsinstall.c +++ /dev/null @@ -1,697 +0,0 @@ -/* - * The nsinstall command for Win32 - * - * Our gmake makefiles use the nsinstall command to create the - * object directories or installing headers and libs to ns/dist. - * The shmsdos shell has nsinstall as a built-in command. However, - * if we use another shell like MKS toolkit's sh, we need to have - * the nsinstall command separately. - * - * This file was generated by just taking the part of shmsdos.c - * needed by nsinstall and deleting the recursive directory copy code. - * - * To build, say - * nmake /f nsinstall.mak - */ - -#include -#include -#include -#include -#include -#pragma hdrstop - -/* - * sh_FileFcn -- - * - * A function that operates on a file. The pathname is either - * absolute or relative to the current directory, and contains - * no wildcard characters such as * and ?. Additional arguments - * can be passed to the function via the arg pointer. - */ - -typedef BOOL (*sh_FileFcn)( - char *pathName, - WIN32_FIND_DATA *fileData, - void *arg); - -static int shellCp (char **pArgv); -static int shellNsinstall (char **pArgv); -static int shellMkdir (char **pArgv); -static BOOL sh_EnumerateFiles(const char *pattern, const char *where, - sh_FileFcn fileFcn, void *arg, int *nFiles); -static const char *sh_GetLastErrorMessage(void); -static BOOL sh_DoCopy(char *srcFileName, DWORD srcFileAttributes, - char *dstFileName, DWORD dstFileAttributes, - int force, int recursive); - -/* changes all forward slashes in token to back slashes */ -void changeForwardSlashesTpBackSlashes ( char *arg ) -{ - if ( arg == NULL ) - return; - - while ( *arg ) { - if ( *arg == '/' ) - *arg = '\\'; - arg++; - } -} - -int main(int argc, char *argv[ ]) -{ - return shellNsinstall ( argv + 1 ); -} - -static int -shellNsinstall (char **pArgv) -{ - int retVal = 0; /* exit status */ - int dirOnly = 0; /* 1 if and only if -D is specified */ - char **pSrc; - char **pDst; - - /* - * Process the command-line options. We ignore the - * options except for -D. Some options, such as -m, - * are followed by an argument. We need to skip the - * argument too. - */ - while ( *pArgv && **pArgv == '-' ) { - char c = (*pArgv)[1]; /* The char after '-' */ - - if ( c == 'D' ) { - dirOnly = 1; - } else if ( c == 'm' ) { - pArgv++; /* skip the next argument */ - } - pArgv++; - } - - if ( !dirOnly ) { - /* There are files to install. Get source files */ - if ( *pArgv ) { - pSrc = pArgv++; - } else { - fprintf( stderr, "nsinstall: not enough arguments\n"); - return 3; - } - } - - /* Get to last token to find destination directory */ - if ( *pArgv ) { - pDst = pArgv++; - if ( dirOnly && *pArgv ) { - fprintf( stderr, "nsinstall: too many arguments with -D\n"); - return 3; - } - } else { - fprintf( stderr, "nsinstall: not enough arguments\n"); - return 3; - } - while ( *pArgv ) - pDst = pArgv++; - - retVal = shellMkdir ( pDst ); - if ( retVal ) - return retVal; - if ( !dirOnly ) - retVal = shellCp ( pSrc ); - return retVal; -} - -static int -shellMkdir (char **pArgv) -{ - int retVal = 0; /* assume valid return */ - char *arg; - char *pArg; - char path[_MAX_PATH]; - char tmpPath[_MAX_PATH]; - char *pTmpPath = tmpPath; - - /* All the options are simply ignored in this implementation */ - while ( *pArgv && **pArgv == '-' ) { - if ( (*pArgv)[1] == 'm' ) { - pArgv++; /* skip the next argument (mode) */ - } - pArgv++; - } - - while ( *pArgv ) { - arg = *pArgv; - changeForwardSlashesTpBackSlashes ( arg ); - pArg = arg; - pTmpPath = tmpPath; - while ( 1 ) { - /* create part of path */ - while ( *pArg ) { - *pTmpPath++ = *pArg++; - if ( *pArg == '\\' ) - break; - } - *pTmpPath = '\0'; - - /* check if directory alreay exists */ - _getcwd ( path, sizeof (path) ); - if ( _chdir ( tmpPath ) != -1 ) { - _chdir ( path ); - } else { - if ( _mkdir ( tmpPath ) == -1 ) { -// while ( waitForDebug ); - printf ( "%s: ", tmpPath ); - perror ( "Could not create the directory" ); - retVal = 3; - break; - } - } - if ( *pArg == '\0' ) /* complete path? */ - break; - /* loop for next directory */ - } - - pArgv++; - } - return retVal; -} - -static const char * -sh_GetLastErrorMessage() -{ - static char buf[128]; - - FormatMessage( - FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* default language */ - buf, - sizeof(buf), - NULL - ); - return buf; -} - -/* - * struct sh_FileData -- - * - * A pointer to the sh_FileData structure is passed into sh_RecordFileData, - * which will fill in the fields. - */ - -struct sh_FileData { - char pathName[_MAX_PATH]; - DWORD dwFileAttributes; -}; - -/* - * sh_RecordFileData -- - * - * Record the pathname and attributes of the file in - * the sh_FileData structure pointed to by arg. - * - * Always return TRUE (successful completion). - * - * This function is intended to be passed into sh_EnumerateFiles - * to see if a certain pattern expands to exactly one file/directory, - * and if so, record its pathname and attributes. - */ - -static BOOL -sh_RecordFileData(char *pathName, WIN32_FIND_DATA *findData, void *arg) -{ - struct sh_FileData *fData = (struct sh_FileData *) arg; - - strcpy(fData->pathName, pathName); - fData->dwFileAttributes = findData->dwFileAttributes; - return TRUE; -} - -static BOOL -sh_DoCopy(char *srcFileName, - DWORD srcFileAttributes, - char *dstFileName, - DWORD dstFileAttributes, - int force, - int recursive -) -{ - if (dstFileAttributes != 0xFFFFFFFF) { - if ((dstFileAttributes & FILE_ATTRIBUTE_READONLY) && force) { - dstFileAttributes &= ~FILE_ATTRIBUTE_READONLY; - SetFileAttributes(dstFileName, dstFileAttributes); - } - } - - if (srcFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - fprintf(stderr, "nsinstall: %s is a directory\n", - srcFileName); - return FALSE; - } else { - if (!CopyFile(srcFileName, dstFileName, FALSE)) { - fprintf(stderr, "nsinstall: cannot copy %s to %s: %s\n", - srcFileName, dstFileName, sh_GetLastErrorMessage()); - return FALSE; - } - } - return TRUE; -} - -/* - * struct sh_CpCmdArg -- - * - * A pointer to the sh_CpCmdArg structure is passed into sh_CpFileCmd. - * The sh_CpCmdArg contains information about the cp command, and - * provide a buffer for constructing the destination file name. - */ - -struct sh_CpCmdArg { - int force; /* -f option, ok to overwrite an existing - * read-only destination file */ - int recursive; /* -r or -R option, recursively copy - * directories. Note: this field is not used - * by nsinstall and should always be 0. */ - char *dstFileName; /* a buffer for constructing the destination - * file name */ - char *dstFileNameMarker; /* points to where in the dstFileName buffer - * we should write the file component of the - * destination file */ -}; - -/* - * sh_CpFileCmd -- - * - * Copy a file to the destination directory - * - * This function is intended to be passed into sh_EnumerateFiles to - * copy all the files specified by the pattern to the destination - * directory. - * - * Return TRUE if the file is successfully copied, and FALSE otherwise. - */ - -static BOOL -sh_CpFileCmd(char *pathName, WIN32_FIND_DATA *findData, void *cpArg) -{ - BOOL retVal = TRUE; - struct sh_CpCmdArg *arg = (struct sh_CpCmdArg *) cpArg; - - strcpy(arg->dstFileNameMarker, findData->cFileName); - return sh_DoCopy(pathName, findData->dwFileAttributes, - arg->dstFileName, GetFileAttributes(arg->dstFileName), - arg->force, arg->recursive); -} - -static int -shellCp (char **pArgv) -{ - int retVal = 0; - char **pSrc; - char **pDst; - struct sh_CpCmdArg arg; - struct sh_FileData dstData; - int dstIsDir = 0; - int n; - - arg.force = 0; - arg.recursive = 0; - arg.dstFileName = dstData.pathName; - arg.dstFileNameMarker = 0; - - while (*pArgv && **pArgv == '-') { - char *p = *pArgv; - - while (*(++p)) { - if (*p == 'f') { - arg.force = 1; - } - } - pArgv++; - } - - /* the first source file */ - if (*pArgv) { - pSrc = pArgv++; - } else { - fprintf(stderr, "nsinstall: not enough arguments\n"); - return 3; - } - - /* get to the last token to find destination */ - if (*pArgv) { - pDst = pArgv++; - } else { - fprintf(stderr, "nsinstall: not enough arguments\n"); - return 3; - } - while (*pArgv) { - pDst = pArgv++; - } - - /* - * The destination pattern must unambiguously expand to exactly - * one file or directory. - */ - - changeForwardSlashesTpBackSlashes(*pDst); - sh_EnumerateFiles(*pDst, *pDst, sh_RecordFileData, &dstData, &n); - assert(n >= 0); - if (n == 1) { - /* - * Is the destination a file or directory? - */ - - if (dstData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - dstIsDir = 1; - } - } else if (n > 1) { - fprintf(stderr, "nsinstall: %s: ambiguous destination file " - "or directory\n", *pDst); - return 3; - } else { - /* - * n == 0, meaning that destination file or directory does - * not exist. In this case the destination file directory - * name must be fully specified. - */ - - char *p; - - for (p = *pDst; *p; p++) { - if (*p == '*' || *p == '?') { - fprintf(stderr, "nsinstall: %s: No such file or directory\n", - *pDst); - return 3; - } - } - - /* - * Do not include the trailing \, if any, unless it is a root - * directory (\ or X:\). - */ - - if (p > *pDst && p[-1] == '\\' && p != *pDst + 1 && p[-2] != ':') { - p[-1] = '\0'; - } - strcpy(dstData.pathName, *pDst); - dstData.dwFileAttributes = 0xFFFFFFFF; - } - - /* - * If there are two or more source files, the destination has - * to be a directory. - */ - - if (pDst - pSrc > 1 && !dstIsDir) { - fprintf(stderr, "nsinstall: cannot copy more than" - " one file to the same destination file\n"); - return 3; - } - - if (dstIsDir) { - arg.dstFileNameMarker = arg.dstFileName + strlen(arg.dstFileName); - - /* - * Now arg.dstFileNameMarker is pointing to the null byte at the - * end of string. We want to make sure that there is a \ at the - * end of string, and arg.dstFileNameMarker should point right - * after that \. - */ - - if (arg.dstFileNameMarker[-1] != '\\') { - *(arg.dstFileNameMarker++) = '\\'; - } - } - - if (!dstIsDir) { - struct sh_FileData srcData; - - assert(pDst - pSrc == 1); - changeForwardSlashesTpBackSlashes(*pSrc); - sh_EnumerateFiles(*pSrc, *pSrc, sh_RecordFileData, &srcData, &n); - if (n == 0) { - fprintf(stderr, "nsinstall: %s: No such file or directory\n", - *pSrc); - retVal = 3; - } else if (n > 1) { - fprintf(stderr, "nsinstall: cannot copy more than one file or " - "directory to the same destination\n"); - retVal = 3; - } else { - assert(n == 1); - if (sh_DoCopy(srcData.pathName, srcData.dwFileAttributes, - dstData.pathName, dstData.dwFileAttributes, - arg.force, arg.recursive) == FALSE) { - retVal = 3; - } - } - return retVal; - } - - for ( ; *pSrc != *pDst; pSrc++) { - BOOL rv; - - changeForwardSlashesTpBackSlashes(*pSrc); - rv = sh_EnumerateFiles(*pSrc, *pSrc, sh_CpFileCmd, &arg, &n); - if (rv == FALSE) { - retVal = 3; - } else { - if (n == 0) { - fprintf(stderr, "nsinstall: %s: No such file or directory\n", - *pSrc); - retVal = 3; - } - } - } - - return retVal; -} - -/* - * sh_EnumerateFiles -- - * - * Enumerate all the files in the specified pattern, which is a pathname - * containing possibly wildcard characters such as * and ?. fileFcn - * is called on each file, passing the expanded file name, a pointer - * to the file's WIN32_FILE_DATA, and the arg pointer. - * - * It is assumed that there are no wildcard characters before the - * character pointed to by 'where'. - * - * On return, *nFiles stores the number of files enumerated. *nFiles is - * set to this number whether sh_EnumerateFiles or 'fileFcn' succeeds - * or not. - * - * Return TRUE if the files are successfully enumerated and all - * 'fileFcn' invocations succeeded. Return FALSE if something went - * wrong. - */ - -static BOOL sh_EnumerateFiles( - const char *pattern, - const char *where, - sh_FileFcn fileFcn, - void *arg, - int *nFiles - ) -{ - WIN32_FIND_DATA fileData; - HANDLE hSearch; - const char *src; - char *dst; - char fileName[_MAX_PATH]; - char *fileNameMarker = fileName; - char *oldFileNameMarker; - BOOL hasWildcard = FALSE; - BOOL retVal = TRUE; - BOOL patternEndsInDotStar = FALSE; - BOOL patternEndsInDot = FALSE; /* a special case of - * patternEndsInDotStar */ - int numDotsInPattern; - int len; - - /* - * Windows expands patterns ending in ".", ".*", ".**", etc. - * differently from the glob expansion on Unix. For example, - * both "foo." and "foo.*" match "foo", and "*.*" matches - * everything, including filenames with no dots. So we need - * to throw away extra files returned by the FindNextFile() - * function. We require that a matched filename have at least - * the number of dots in the pattern. - */ - len = strlen(pattern); - if (len >= 2) { - /* Start from the end of pattern and go backward */ - const char *p = &pattern[len - 1]; - - /* We can have zero or more *'s */ - while (p >= pattern && *p == '*') { - p--; - } - if (p >= pattern && *p == '.') { - patternEndsInDotStar = TRUE; - if (p == &pattern[len - 1]) { - patternEndsInDot = TRUE; - } - p--; - numDotsInPattern = 1; - while (p >= pattern && *p != '\\') { - if (*p == '.') { - numDotsInPattern++; - } - p--; - } - } - } - - *nFiles = 0; - - /* - * Copy pattern to fileName, but only up to and not including - * the first \ after the first wildcard letter. - * - * Make fileNameMarker point to one of the following: - * - the start of fileName, if fileName does not contain any \. - * - right after the \ before the first wildcard letter, if there is - * a wildcard character. - * - right after the last \, if there is no wildcard character. - */ - - dst = fileName; - src = pattern; - while (src < where) { - if (*src == '\\') { - oldFileNameMarker = fileNameMarker; - fileNameMarker = dst + 1; - } - *(dst++) = *(src++); - } - - while (*src && *src != '*' && *src != '?') { - if (*src == '\\') { - oldFileNameMarker = fileNameMarker; - fileNameMarker = dst + 1; - } - *(dst++) = *(src++); - } - - if (*src) { - /* - * Must have seen the first wildcard letter - */ - - hasWildcard = TRUE; - while (*src && *src != '\\') { - *(dst++) = *(src++); - } - } - - /* Now src points to either null or \ */ - - assert(*src == '\0' || *src == '\\'); - assert(hasWildcard || *src == '\0'); - *dst = '\0'; - - /* - * If the pattern does not contain any wildcard characters, then - * we don't need to go the FindFirstFile route. - */ - - if (!hasWildcard) { - /* - * See if it is the root directory, \, or X:\. - */ - - assert(!strcmp(fileName, pattern)); - assert(strlen(fileName) >= 1); - if (dst[-1] == '\\' && (dst == fileName + 1 || dst[-2] == ':')) { - fileData.cFileName[0] = '\0'; - } else { - /* - * Do not include the trailing \, if any - */ - - if (dst[-1] == '\\') { - assert(*fileNameMarker == '\0'); - dst[-1] = '\0'; - fileNameMarker = oldFileNameMarker; - } - strcpy(fileData.cFileName, fileNameMarker); - } - fileData.dwFileAttributes = GetFileAttributes(fileName); - if (fileData.dwFileAttributes == 0xFFFFFFFF) { - return TRUE; - } - *nFiles = 1; - return (*fileFcn)(fileName, &fileData, arg); - } - - hSearch = FindFirstFile(fileName, &fileData); - if (hSearch == INVALID_HANDLE_VALUE) { - return retVal; - } - - do { - if (!strcmp(fileData.cFileName, ".") - || !strcmp(fileData.cFileName, "..")) { - /* - * Skip over . and .. - */ - - continue; - } - - if (patternEndsInDotStar) { - int nDots = 0; - char *p = fileData.cFileName; - while (*p) { - if (*p == '.') { - nDots++; - } - p++; - } - /* Now p points to the null byte at the end of file name */ - if (patternEndsInDot && (p == fileData.cFileName - || p[-1] != '.')) { - /* - * File name does not end in dot. Skip this file. - * Note: windows file name probably cannot end in dot, - * but we do this check anyway. - */ - continue; - } - if (nDots < numDotsInPattern) { - /* - * Not enough dots in file name. Must be an extra - * file in matching .* pattern. Skip this file. - */ - continue; - } - } - - strcpy(fileNameMarker, fileData.cFileName); - if (*src && *(src + 1)) { - /* - * More to go. Recurse. - */ - - int n; - - assert(*src == '\\'); - where = fileName + strlen(fileName); - strcat(fileName, src); - sh_EnumerateFiles(fileName, where, fileFcn, arg, &n); - *nFiles += n; - } else { - assert(strchr(fileName, '*') == NULL); - assert(strchr(fileName, '?') == NULL); - (*nFiles)++; - if ((*fileFcn)(fileName, &fileData, arg) == FALSE) { - retVal = FALSE; - } - } - } while (FindNextFile(hSearch, &fileData)); - - FindClose(hSearch); - return retVal; -} diff --git a/buildtools/windows/source/shmsdos/nsinstall.mak b/buildtools/windows/source/shmsdos/nsinstall.mak deleted file mode 100644 index b9ff221496a..00000000000 --- a/buildtools/windows/source/shmsdos/nsinstall.mak +++ /dev/null @@ -1,141 +0,0 @@ -# NMAKE file for building nsinstall.exe. -# -# This file is edited from an NMAKE file generated by -# Microsoft Developer Studio, Format Version 4.20 -# -# To build, say -# nmake /f nsinstall.mak CFG=Release -# or -# nmake /f nsinstall.mak CFG=Debug -# If CFG is omitted, a release build is assumed. - -!IF "$(CFG)" == "" -CFG=Release -!MESSAGE No configuration specified. Defaulting Release. -!ENDIF - -!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "nsinstall.mak" CFG="Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Release" (based on "Win32 Console Application") -!MESSAGE "Debug" (based on "Win32 Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Release" - -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\nsinstall.exe" - -CLEAN : - -@erase "$(INTDIR)\nsinstall.obj" - -@erase "$(OUTDIR)\nsinstall.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/nsinstall.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)/nsinstall.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/nsinstall.pdb"\ - /out:"$(OUTDIR)/nsinstall.exe" -LINK32_OBJS= \ - "$(INTDIR)\nsinstall.obj" - -"$(OUTDIR)\nsinstall.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\nsinstall.exe" - -CLEAN : - -@erase "$(INTDIR)\nsinstall.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\nsinstall.exe" - -@erase "$(OUTDIR)\nsinstall.ilk" - -@erase "$(OUTDIR)\nsinstall.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MD /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "DEBUG"\ - /D "_CONSOLE" /Fp"$(INTDIR)/nsinstall.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)/nsinstall.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/nsinstall.pdb" /debug\ - /out:"$(OUTDIR)/nsinstall.exe" -LINK32_OBJS= \ - "$(INTDIR)\nsinstall.obj" - -"$(OUTDIR)\nsinstall.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -################################################################################ -# Begin Source File - -SOURCE=.\nsinstall.c -DEP_CPP_SHMSD=\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\nsinstall.obj" : $(SOURCE) $(DEP_CPP_SHMSD) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/buildtools/windows/source/shmsdos/shmsdos.c b/buildtools/windows/source/shmsdos/shmsdos.c deleted file mode 100644 index f8274fd74ed..00000000000 --- a/buildtools/windows/source/shmsdos/shmsdos.c +++ /dev/null @@ -1,2573 +0,0 @@ -/*********************************************************** - * shmsdos - unix shell for msdos - **********************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#pragma hdrstop - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE !FALSE -#endif - -#define index(s, c) strchr((s), (c)) -#define streq(a, b) (strcmp ((a), (b)) == 0) - -#define SH_CMD_CD 0 -#define SH_CMD_EVAL 1 -#define SH_CMD_EXEC 2 -#define SH_CMD_EXIT 3 -#define SH_CMD_LOGIN 4 -#define SH_CMD_LOGOUT 5 -#define SH_CMD_SET 6 -#define SH_CMD_UMASK 7 -#define SH_CMD_WAIT 8 -#define SH_CMD_WHILE 9 -#define SH_CMD_FOR 10 -#define SH_CMD_CASE 11 -#define SH_CMD_IF 12 -#define SH_CMD_COLON 13 -#define SH_CMD_PERIOD 14 -#define SH_CMD_BREAK 15 -#define SH_CMD_CONTINUE 16 -#define SH_CMD_EXPORT 17 -#define SH_CMD_READ 18 -#define SH_CMD_READONLY 19 -#define SH_CMD_SHIFT 20 -#define SH_CMD_TIMES 21 -#define SH_CMD_TRAP 22 -#define SH_CMD_SWITCH 23 -#define SH_CMD_MKDIR 24 -#define SH_CMD_ECHO 25 -#define SH_CMD_CP 26 -#define SH_CMD_RM 27 -#define SH_CMD_TOUCH 28 -#define SH_CMD_NSINSTALL 29 -#define SH_CMD_TEST 30 -#define SH_CMD_CAT 31 -#define SH_CMD_TRUE 32 -#define SH_CMD_MV 33 - -#define COND_WHILE 0 -#define COND_FOR 1 -#define COND_CASE 2 -#define COND_IF 3 -#define COND_BREAK 4 -#define COND_CONTINUE 5 -#define COND_SHIFT 6 -#define COND_TIMES 7 -#define COND_SWITCH 8 -#define COND_FI 9 -#define COND_THEN 10 -#define COND_ELSE 11 -#define COND_DONE 12 -#define COND_DO 13 - -/* - * sh_FileFcn -- - * - * A function that operates on a file. The pathname is either - * absolute or relative to the current directory, and contains - * no wildcard characters such as * and ?. Additional arguments - * can be passed to the function via the arg pointer. - */ - -typedef BOOL (*sh_FileFcn)( - char *pathName, - WIN32_FIND_DATA *fileData, - void *arg); - -//static char sh_chars[] = "#;\"*?[]&|<>(){}$`^"; -static char sh_chars[] = ";"; -static char *conditional_cmds[] = { "while", "for", - "case", "if", "break", "continue", - "shift", "times", "switch", "fi", "then", "else", "done", "do", 0 }; - -static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login", - "logout", "set", "umask", "wait", "while", "for", - "case", "if", ":", ".", "break", "continue", - "export", "read", "readonly", "shift", "times", - "trap", "switch", "mkdir", "echo", "cp", "rm", - "touch", "nsinstall", "test", "cat", "true", "mv", 0 }; - -static char ** getNextCommandArgv (char **line, char * pMacro, char * pSubstitution); -static int doBuiltinShellCommand (char *argv[ ], char **envp); -static char ** getlistOfOptions (char **pArgv, char * pOptions); -static int parseShellLine ( char** pointerIntoLine, char *argv[ ], char *envp[ ], - char * pMacro, char * pSubstitution ); -static void freeArgv ( char *argv[ ] ); -static int shellCp (char **pArgv); -static int shellEcho (char **pArgv); -static int shellRm (char **pArgv); -static int shellNsinstall (char **pArgv); -static int shellMkdir (char **pArgv); -static int shellTest (char **pArgv); -static int shellCat (char **pArgv); -static int shellMv (char **pArgv); -static BOOL sh_EnumerateFiles(const char *pattern, const char *where, - sh_FileFcn fileFcn, void *arg, int *nFiles); -static const char *sh_GetLastErrorMessage(void); -static BOOL sh_DoCopy(char *srcFileName, DWORD srcFileAttributes, - char *dstFileName, DWORD dstFileAttributes, - int force, int recursive); - -static int waitForDebug = 1; - -char * next_token( char *p) -{ - while ( *p == ' ' || *p == '\t' ) - ++p; - return p; -} - -static char* convertArgvIntoCommandLine( int argc, char *argv[ ] ) -{ - char *pLine; - char *p; - int argi; - int totalLength = 0; - - /* get total # of characters in command line */ - argi = 2; - while ( argi < argc ) { - if ( argv[argi] ) - totalLength += strlen ( argv[argi] ) + 1; - argi++; - } - - /* allocate memory for the command line */ - pLine = (char *) malloc (totalLength * sizeof (char *)); - if ( pLine == NULL ) { - printf ("Not enough memory in SHMSDOS\n"); - exit(1); - } - /* compress all tokens into single command line */ - argi = 2; - p = pLine; - while ( argi < argc ) { - char *pArgv = argv[argi]; - while ( *pArgv ) - *p++ = *pArgv++; - argi++; - *p++ = ' '; - } - - /* remove trailing blanks */ - while ( (p > pLine) && (*(p-1) == ' ' ) ) - *(--p) = '\0'; - - return pLine; -} - -main( int argc, char *argv[ ], char *envp[ ] ) -{ - int status; - char* pointerIntoLine; - char **newArgv; - - char * pLine = convertArgvIntoCommandLine( argc, argv ); - pointerIntoLine = pLine; - - while ( TRUE ) { - newArgv = getNextCommandArgv ( &pointerIntoLine, NULL, NULL ); - if ( newArgv == 0 ) - break; - - status = parseShellLine ( &pointerIntoLine, newArgv, envp, NULL, NULL ); - freeArgv ( newArgv ); - if ( status != 0 ) - break; - } - - /* process each shell command */ - free ( pLine ); - return status; -} - - /* process each shell command */ -int getConditionalCommand ( char * shellName ) -{ - int shellCommand = -1; - int j; - - /* search for shell name */ - for (j = 0; conditional_cmds[j] != 0; ++j) { - if ( streq (conditional_cmds[j], shellName) ) { - shellCommand = j; - break; - } - } - return shellCommand; -} - -/* - if list then list [ elif list then list ] ... [ else list ] fi - The list following if is executed and, if it returns a zero exit - status, the list following the first then is executed. Otherwise, - the list following elif is executed and, if its value is zero, the - list following the next then is executed. Failing that, the else - list is executed. If no else list or then list is executed, then - the if command returns a zero exit status. - */ -int parseIfCommand ( char** pointerIntoLine, char *argv[ ], char *envp[ ], - char * pMacro, char * pSubstitution ) -{ - int ifTestedTrue; - int status = 0; - int shellCommand; - char **pArgv; - - /* check test condition */ -// while ( waitForDebug ); - ifTestedTrue = doBuiltinShellCommand ( argv, envp ); - if ( (ifTestedTrue != 0) && (ifTestedTrue != 1) ) { - printf ( "Error executing command %s while processing 'if'\n", argv[0] ); - return ifTestedTrue; - } - ifTestedTrue = !ifTestedTrue; - - while ( TRUE ) { - - char **newArgv = getNextCommandArgv ( pointerIntoLine, pMacro, pSubstitution ); - if ( newArgv == 0 ) { - status = -1; - break; - } - pArgv = newArgv; - - /* get next shell command */ - shellCommand = getConditionalCommand ( newArgv[0] ); - if ( shellCommand == COND_FI ) { - status = 0; - freeArgv ( newArgv ); - break; - } else if ( shellCommand == COND_THEN ) { - pArgv++; - } else if ( shellCommand == COND_ELSE ) { - pArgv++; - ifTestedTrue = !ifTestedTrue; - } - if ( ifTestedTrue ) - status = parseShellLine ( pointerIntoLine, pArgv, envp, pMacro, pSubstitution ); - else - status = 0; - freeArgv ( newArgv ); - if ( status != 0 ) - break; - } - - return status; -} -/* - for name [ in word ... ] do list done - Each time a for command is executed, name is set to the next word - taken from the in word list. If in word ... is omitted, then the - for command executes the do list once for each positional parameter - that is set (see Parameter Substitution below). Execution ends when - there are no more words in the list. - */ -int parseForCommand ( char** pointerIntoLine, char *argv[ ], char *envp[ ] ) -{ - int status = 0; - int shellCommand; - char **pArgv = argv; - char * pMacro; - char ** pWord; - char* doPointerIntoLine; - - // get name of macro - pMacro = *pArgv++; - - if ( strcmp ( "in" , *pArgv ) != 0 ) { - exit (1); - } - pArgv++; - pWord = pArgv; - - - - /* check test condition */ -// while ( waitForDebug ); - doPointerIntoLine = *pointerIntoLine; - while ( *pWord ) { - - while ( TRUE ) { - char **newArgv = getNextCommandArgv ( pointerIntoLine, pMacro, *pWord ); - if ( newArgv == 0 ) { - status = -1; - break; - } - pArgv = newArgv; - - shellCommand = getConditionalCommand ( *pArgv ); - if ( shellCommand == COND_DO ) { - pArgv++; - } - - /* get next shell command */ - if ( shellCommand == COND_DONE ) { - status = 0; - freeArgv ( newArgv ); - break; - } - status = parseShellLine ( pointerIntoLine, pArgv, envp, pMacro, *pWord ); - freeArgv ( newArgv ); - if ( status != 0 ) - break; - } - pWord++; - if ( status != 0 ) - break; - - /* if another word exists in list, then repeat */ - if ( *pWord ) - *pointerIntoLine = doPointerIntoLine; - } - - return status; -} -/* process each shell command */ -int parseShellLine ( char** pointerIntoLine, char *argv[ ], char *envp[ ], - char * pMacro, char * pSubstitution ) -{ - int shellCommand; - char **pArgv; - int status; - - /* search for shell name */ - shellCommand = getConditionalCommand ( argv[0] ); - - /* process shell command */ - - if ( shellCommand == -1 ) { - status = doBuiltinShellCommand ( argv, envp ); - } else { - pArgv = &argv[1]; - switch ( shellCommand ) { - case COND_IF: - status = parseIfCommand ( pointerIntoLine, pArgv, envp, pMacro, pSubstitution ); - break; - case COND_FOR: - status = parseForCommand ( pointerIntoLine, pArgv, envp ); - break; - default: - printf ( "Unexpected conditional command: -%s-\n", argv[0] ); - status = -1; - break; - } - } - return status; -} - -/* Figure out the argument list necessary to run LINE as a command. Try to - avoid using a shell. This routine handles only ' quoting, and " quoting - when no backslash, $ or ` characters are seen in the quotes. Starting - quotes may be escaped with a backslash. If any of the characters in - sh_chars[] is seen, or any of the builtin commands listed in sh_cmds[] - is the first word of a line, the shell is used. - - SHELL is the shell to use, or nil to use the default shell. - IFS is the value of $IFS, or nil (meaning the default). */ - -static char ** -getNextCommandArgv (char **pLine, char * pMacro, char * pSubstitution ) -{ - register int i; - register int lineLength; - register char *pp; - register char *p; - register char *ap; - char *line = *pLine; - char *end; - int instring, word_has_equals, seen_nonequals; - char **new_argv = 0; - int foundStartOfLine; - int iSubstitutionLen; - - /* Make sure not to bother processing an empty line. */ - foundStartOfLine = FALSE; - while ( !foundStartOfLine ) { - switch ( *line ) { - case ';': - case '\t': - case ' ': - ++line; - break; - - case '\\': - if ( *(line+1) == 't') { - line += 2; - break; - } - - default: - foundStartOfLine = TRUE; - break; - } - } - - if (*line == '\0') - return 0; - - /* get maximum length of length with arguments substituted */ - i = strlen (line) + 1; - lineLength = i; - - - /* More than 1 arg per character is impossible. */ - new_argv = (char **) malloc (i * sizeof (char *)); - if ( new_argv == NULL ) { - printf ("Not enough memory in SHMSDOS\n"); - exit(1); - } - - /* increase size of parameters by macro substitution */ - pp = line; - if ( pSubstitution ) { - iSubstitutionLen = strlen ( pSubstitution ) - strlen ( pMacro ) - 1; - while ( *pp ) { - if ( *pp++ == '$' ) - lineLength += iSubstitutionLen; - } - } - - /* All the args can fit in a buffer as big as LINE is. */ - ap = new_argv[0] = (char *) malloc (lineLength); - if ( ap == NULL ) { - printf ("Not enough memory in SHMSDOS\n"); - exit(1); - } - end = ap + lineLength; - - /* I is how many complete arguments have been found. */ - i = 0; - instring = word_has_equals = seen_nonequals = 0; - for (p = line; *p != '\0'; ++p) - { - if (ap > end) - { - fprintf(stderr, "Internal error: stepping past the end of buffer, " - "at %s, line %d\n", __FILE__, __LINE__); - abort (); - } - - if (instring) - { - string_char: - /* Inside a string, just copy any char except a closing quote - or a backslash-newline combination. */ - if (*p == instring) - instring = 0; - else if (*p == '\\' && p[1] == '\n') - goto swallow_escaped_newline; - /* Backslash, $, and ` are special inside double quotes. - If we see any of those, punt. */ - else if (instring == '"' && *p == '\\' - && strchr("\\$`\"", p[1]) != NULL) - /* The backslash can be used to escape another special - character inside double quotes. */ - *ap++ = *++p; - else if (instring == '"' && *p == '$') - goto macroSubstitution; - else - *ap++ = *p; - } - else if (index (sh_chars, *p) != 0) - /* Not inside a string, but it's a special char. */ - goto slow; - else - /* Not a special char. */ - switch (*p) - { - case '=': - /* Equals is a special character in leading words before the - first word with no equals sign in it. This is not the case - with sh -k, but we never get here when using nonstandard - shell flags. */ - if (! seen_nonequals) - goto slow; - word_has_equals = 1; - *ap++ = '='; - break; - - case '\\': - /* Backslash-newline combinations are eaten. */ - if (p[1] == '\n') - { - swallow_escaped_newline: - - /* Eat the backslash, the newline, and following whitespace, - replacing it all with a single space. */ - p += 2; - - /* If there is a tab after a backslash-newline, - remove it from the source line which will be echoed, - since it was most likely used to line - up the continued line with the previous one. */ - if (*p == '\t') - strcpy (p, p + 1); - - if (instring) - goto string_char; - else - { - if (ap != new_argv[i]) - /* Treat this as a space, ending the arg. - But if it's at the beginning of the arg, it should - just get eaten, rather than becoming an empty arg. */ - goto end_of_arg; - else - p = next_token (p) - 1; - } - } - else if (p[1] != '\0') - /* Copy and skip the following char. */ - *ap++ = *++p; -// *ap++ = *p; - break; - - case '\'': - case '"': - instring = *p; - break; - - case '\n': - /* Newlines are not special. */ - *ap++ = '\n'; - break; - - case '$': -macroSubstitution: - if ( pMacro ) { - int len = strlen ( pMacro ); - if ( strncmp ( pMacro, p+1, len ) == 0 ) { - p += len; - strcpy ( ap, pSubstitution ); - ap += strlen ( pSubstitution ); - break; - } - } - - /* Newlines are not special. */ - *ap++ = *p; - break; - - case ' ': - case '\t': - end_of_arg: - /* We have the end of an argument. - Terminate the text of the argument. */ - *ap++ = '\0'; - new_argv[++i] = ap; - - /* Update SEEN_NONEQUALS, which tells us if every word - heretofore has contained an `='. */ - seen_nonequals |= ! word_has_equals; - if (word_has_equals && ! seen_nonequals) - /* An `=' in a word before the first - word without one is magical. */ - goto slow; - word_has_equals = 0; /* Prepare for the next word. */ - - /* Ignore multiple whitespace chars. */ - p = next_token (p); - /* Next iteration should examine the first nonwhite char. */ - --p; - break; - - default: - *ap++ = *p; - break; - } - } - - /* Terminate the last argument and the argument list. */ - -slow:; - *ap = '\0'; - if (new_argv[i][0] != '\0') - ++i; - new_argv[i] = 0; - - *pLine = p; /* return pointer into line */ - return new_argv; - -} - -static void -freeArgv ( char *argv[ ] ) -{ - free (argv[0]); - free (argv); -} - -/* changes all forward slashes in token to back slashes */ -void changeForwardSlashesTpBackSlashes ( char *arg ) -{ - if ( arg == NULL ) - return; - - /* get options for command */ - while ( *arg ) { - if ( *arg == '/' ) - *arg = '\\'; - arg++; - } -} - -/* - * The various spawn functions in Microsoft's runtime library - * may fail if the Path environment variable contains nonexistent - * directories. The spawn functions expect to get ENOENT in - * this situation, but on some Compaq PCs I've seen EACCES - * ("Permission denied") being returned. So I wrote our own - * process-spawning function ns_spawn(). My code is inspired - * by Microsoft's implementation of spawnvpe(). - */ - -/* - * Assemble the command line by concatenating the argv array. - * On success, this function returns 0 and the resulting command - * line is returned in *cmdLine. On failure, it returns -1. - */ -static int assembleCmdLine(char **argv, char **cmdLine) -{ - char **arg; - char *p, *q; - int cmdLineSize; - int numBackslashes; - int i; - int argNeedQuotes; - - /* - * Find out how large the command line buffer should be. - */ - cmdLineSize = 0; - for (arg = argv; *arg; arg++) { - /* - * \ and " need to be escaped by a \. In the worst case, - * every character is a \ or ", so the string of length - * may double. If we quote an argument, that needs two ". - * Finally, we need a space between arguments, and - * a null byte at the end of command line. - */ - cmdLineSize += 2 * strlen(*arg) /* \ and " need to be escaped */ - + 2 /* we quote every argument */ - + 1; /* space in between, or final null */ - } - p = *cmdLine = malloc(cmdLineSize); - if (p == NULL) { - return -1; - } - - for (arg = argv; *arg; arg++) { - /* Add a space to separates the arguments */ - if (arg != argv) { - *p++ = ' '; - } - q = *arg; - numBackslashes = 0; - argNeedQuotes = 0; - - /* If the argument contains white space, it needs to be quoted. */ - if (strpbrk(*arg, " \f\n\r\t\v")) { - argNeedQuotes = 1; - } - - if (argNeedQuotes) { - *p++ = '"'; - } - while (*q) { - if (*q == '\\') { - numBackslashes++; - q++; - } else if (*q == '"') { - if (numBackslashes) { - /* - * Double the backslashes since they are followed - * by a quote - */ - for (i = 0; i < 2 * numBackslashes; i++) { - *p++ = '\\'; - } - numBackslashes = 0; - } - /* To escape the quote */ - *p++ = '\\'; - *p++ = *q++; - } else { - if (numBackslashes) { - /* - * Backslashes are not followed by a quote, so - * don't need to double the backslashes. - */ - for (i = 0; i < numBackslashes; i++) { - *p++ = '\\'; - } - numBackslashes = 0; - } - *p++ = *q++; - } - } - - /* Now we are at the end of this argument */ - if (numBackslashes) { - /* - * Double the backslashes if we have a quote string - * delimiter at the end. - */ - if (argNeedQuotes) { - numBackslashes *= 2; - } - for (i = 0; i < numBackslashes; i++) { - *p++ = '\\'; - } - } - if (argNeedQuotes) { - *p++ = '"'; - } - } - - *p = '\0'; - return 0; -} - -/* - * Assemble the environment block by concatenating the envp array - * (preserving the terminating null byte in each array element) - * and adding a null byte at the end. - * - * Returns 0 on success. The resulting environment block is returned - * in *envBlock. Note that if envp is NULL, a NULL pointer is returned - * in *envBlock. Returns -1 on failure. - */ -static int assembleEnvBlock(char **envp, char **envBlock) -{ - char *p; - char *q; - char **env; - char *curEnv; - char *cwdStart, *cwdEnd; - int envBlockSize; - - if (envp == NULL) { - *envBlock = NULL; - return 0; - } - - curEnv = GetEnvironmentStrings(); - - cwdStart = curEnv; - while (*cwdStart) { - if (cwdStart[0] == '=' && cwdStart[1] != '\0' - && cwdStart[2] == ':' && cwdStart[3] == '=') { - break; - } - cwdStart += strlen(cwdStart) + 1; - } - cwdEnd = cwdStart; - if (*cwdEnd) { - cwdEnd += strlen(cwdEnd) + 1; - while (*cwdEnd) { - if (cwdEnd[0] != '=' || cwdEnd[1] == '\0' - || cwdEnd[2] != ':' || cwdEnd[3] != '=') { - break; - } - cwdEnd += strlen(cwdEnd) + 1; - } - } - envBlockSize = cwdEnd - cwdStart; - - for (env = envp; *env; env++) { - envBlockSize += strlen(*env) + 1; - } - envBlockSize++; - - p = *envBlock = malloc(envBlockSize); - if (p == NULL) { - FreeEnvironmentStrings(curEnv); - return -1; - } - - q = cwdStart; - while (q < cwdEnd) { - *p++ = *q++; - } - FreeEnvironmentStrings(curEnv); - - for (env = envp; *env; env++) { - q = *env; - while (*q) { - *p++ = *q++; - } - *p++ = '\0'; - } - *p = '\0'; - return 0; -} - -/* - * For qsort. We sort (case-insensitive) the environment strings - * before generating the environment block. - */ -static int compare(const void *arg1, const void *arg2) -{ - return _stricmp(* (char**)arg1, * (char**)arg2); -} - -/* - * Spawn a new process with arguments argv and environment envp, - * wait until it terminates, and return its exit code in *exitCode. - * Return 0 on success. Return -1 on error. Call GetLastError() - * (note: not errno) to get the error code. - */ -static int ns_spawn(char **argv, char **envp, int *exitCode) -{ - char *cmdLine; - char *envBlock; - char **newEnvp; - BOOL rv; - STARTUPINFO si; - PROCESS_INFORMATION pi; - - changeForwardSlashesTpBackSlashes(argv[0]); - if (assembleCmdLine(argv, &cmdLine) == -1) { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return -1; - } - - if (envp == NULL) { - newEnvp = NULL; - } else { - int i; - int numEnv = 0; - while (envp[numEnv]) { - numEnv++; - } - newEnvp = (char **) malloc((numEnv+1) * sizeof(char *)); - for (i = 0; i <= numEnv; i++) { - newEnvp[i] = envp[i]; - } - qsort((void *) newEnvp, (size_t) numEnv, sizeof(char *), compare); - } - if (assembleEnvBlock(newEnvp, &envBlock) == -1) { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - free(cmdLine); - return -1; - } - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - - rv = CreateProcess( - NULL, - cmdLine, - NULL, - NULL, - TRUE, - 0, - envBlock, - NULL, - &si, - &pi); - free(cmdLine); - free(envBlock); - if (!rv) { - return -1; - } - CloseHandle(pi.hThread); - WaitForSingleObject(pi.hProcess, INFINITE); - if (exitCode) { - GetExitCodeProcess(pi.hProcess, exitCode); - } - CloseHandle(pi.hProcess); - return 0; -} - -static int -doBuiltinShellCommand (char *argv[ ], char **envp) -{ - int retVal = 0; /* assume valid return */ - char path[_MAX_PATH]; - char **pArgv; - char *arg1; -// char options[1024]; -// char *pOptions; - int j; - int fileHandle; - char * shellName = *argv; - int shellCommand = - 1; - - /* search for shell name */ - for (j = 0; sh_cmds[j] != 0; ++j) { - if ( streq (sh_cmds[j], shellName) ) { - shellCommand = j; - break; - } - } - - pArgv = &argv[1]; - switch ( shellCommand ) { - case SH_CMD_CD: - while ( **pArgv == '-' ) - pArgv++; - arg1 = *pArgv; - changeForwardSlashesTpBackSlashes ( arg1 ); - _getcwd ( path, sizeof (path) ); - if ( _chdir ( arg1 ) == -1 ) { - perror ( "Path not found" ); - retVal = 2; - break; - } - _getcwd ( path, sizeof (path) ); - break; - - case SH_CMD_NSINSTALL: -// while ( waitForDebug ); - retVal = shellNsinstall ( pArgv ); - break; - - - case SH_CMD_MKDIR: - retVal = shellMkdir ( pArgv ); - break; - - case SH_CMD_CP: - retVal = shellCp ( pArgv ); - break; - - case SH_CMD_ECHO: - retVal = shellEcho ( pArgv ); - break; - - case SH_CMD_RM: - retVal = shellRm ( pArgv ); - break; - - case SH_CMD_TOUCH: - while ( **pArgv == '-' ) - pArgv++; - arg1 = *pArgv; - changeForwardSlashesTpBackSlashes ( arg1 ); - fileHandle = _open( arg1, _O_CREAT ); - if( fileHandle == -1 ) { - perror( "Open failed on input file" ); - retVal = 5; - } else { - _close( fileHandle ); - } - break; - - /* - * set [ --aefhkntuvx [ arg ... ] ] - * -a Mark variables which are modified or created for export. - * -e Exit immediately if a command exits with a non-zero exit - * status. - * -f Disable file name generation - * -h Locate and remember function commands as functions are defined - * (function commands are normally located when the function is - * executed). - * -k All keyword arguments are placed in the environment for a - * command, not just those that precede the command name. - * -n Read commands but do not execute them. - * -t Exit after reading and executing one command. - * -u Treat unset variables as an error when substituting. - * -v Print shell input lines as they are read. - * -x Print commands and their arguments as they are executed. - * -- Do not change any of the flags; useful in setting $1 to -. - * Using + rather than - causes these flags to be turned off. These - * flags can also be used upon invocation of the shell. The current - * set of flags may be found in $-. The remaining arguments are - * positional parameters and are assigned, in order, to $1, $2, .... - * If no arguments are given the values of all names are printed. - */ - - case SH_CMD_SET: - arg1 = *pArgv++; - //printf ( "set %s\n", arg1 ); - break; - - case SH_CMD_TEST: - retVal = shellTest ( pArgv ); - break; - - case SH_CMD_CAT: - retVal = shellCat ( pArgv ); - break; - - case SH_CMD_TRUE: - break; - - case SH_CMD_MV: - retVal = shellMv ( pArgv ); - break; - - default: -// retVal = spawnvp (P_WAIT, argv[0], argv ); - if ( ns_spawn (argv, envp, &retVal) == -1 ) { - fprintf (stderr, "SHMSDOS: %s: %s\n", argv[0], - sh_GetLastErrorMessage ()); - retVal = -1; - } - break; - } - return retVal; -} - -static char ** -getlistOfOptions (char **pArgv, char * pOptions) -{ - char *pArg; - while ( *pArgv && (**pArgv == '-') ) { - pArg = *pArgv; - pArg++; /* skip over '-' */ - while ( *pArg ) - *pOptions++ = *pArg++; - pArgv++; - } - *pOptions = '\0'; - return pArgv; -} - -static int -shellNsinstall (char **pArgv) -{ - int retVal = 0; /* exit status */ - int dirOnly = 0; /* 1 if and only if -D is specified */ - char **pSrc; - char **pDst; - - /* - * Process the command-line options. We ignore the - * options except for -D. Some options, such as -m, - * are followed by an argument. We need to skip the - * argument too. - */ - while ( *pArgv && **pArgv == '-' ) { - char c = (*pArgv)[1]; /* The char after '-' */ - - if ( c == 'D' ) { - dirOnly = 1; - } else if ( c == 'm' ) { - pArgv++; /* skip the next argument */ - } - pArgv++; - } - - if ( !dirOnly ) { - /* There are files to install. Get source files */ - if ( *pArgv ) { - pSrc = pArgv++; - } else { - fprintf( stderr, "SHMSDOS: nsinstall: not enough arguments\n"); - return 3; - } - } - - /* Get to last token to find destination directory */ - if ( *pArgv ) { - pDst = pArgv++; - if ( dirOnly && *pArgv ) { - fprintf( stderr, "SHMSDOS: nsinstall: too many arguments with -D\n"); - return 3; - } - } else { - fprintf( stderr, "SHMSDOS: nsinstall: not enough arguments\n"); - return 3; - } - while ( *pArgv ) - pDst = pArgv++; - - retVal = shellMkdir ( pDst ); - if ( retVal ) - return retVal; - if ( !dirOnly ) - retVal = shellCp ( pSrc ); - return retVal; -} - -static int -shellMkdir (char **pArgv) -{ - int retVal = 0; /* assume valid return */ - char *arg; - char *pArg; - char path[_MAX_PATH]; - char tmpPath[_MAX_PATH]; - char *pTmpPath = tmpPath; - - /* All the options are simply ignored in this implementation */ - while ( *pArgv && **pArgv == '-' ) { - if ( (*pArgv)[1] == 'm' ) { - pArgv++; /* skip the next argument (mode) */ - } - pArgv++; - } - - while ( *pArgv ) { - arg = *pArgv; - changeForwardSlashesTpBackSlashes ( arg ); - pArg = arg; - pTmpPath = tmpPath; - while ( 1 ) { - /* create part of path */ - while ( *pArg ) { - *pTmpPath++ = *pArg++; - if ( *pArg == '\\' ) - break; - } - *pTmpPath = '\0'; - - /* check if directory alreay exists */ - _getcwd ( path, sizeof (path) ); - if ( _chdir ( tmpPath ) != -1 ) { - _chdir ( path ); - } else { - if ( _mkdir ( tmpPath ) == -1 ) { -// while ( waitForDebug ); - printf ( "%s: ", tmpPath ); - perror ( "Could not create the directory" ); - retVal = 3; - break; - } - } - if ( *pArg == '\0' ) /* complete path? */ - break; - /* loop for next directory */ - } - - pArgv++; - } - return retVal; -} - -static const char * -sh_GetLastErrorMessage() -{ - static char buf[128]; - - FormatMessage( - FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* default language */ - buf, - sizeof(buf), - NULL - ); - return buf; -} - -/* - * struct sh_FileData -- - * - * A pointer to the sh_FileData structure is passed into sh_RecordFileData, - * which will fill in the fields. - */ - -struct sh_FileData { - char pathName[_MAX_PATH]; - DWORD dwFileAttributes; -}; - -/* - * sh_RecordFileData -- - * - * Record the pathname and attributes of the file in - * the sh_FileData structure pointed to by arg. - * - * Always return TRUE (successful completion). - * - * This function is intended to be passed into sh_EnumerateFiles - * to see if a certain pattern expands to exactly one file/directory, - * and if so, record its pathname and attributes. - */ - -static BOOL -sh_RecordFileData(char *pathName, WIN32_FIND_DATA *findData, void *arg) -{ - struct sh_FileData *fData = (struct sh_FileData *) arg; - - strcpy(fData->pathName, pathName); - fData->dwFileAttributes = findData->dwFileAttributes; - return TRUE; -} - -/* - * CopyDirRecursive -- - * - * First create a new directory, then recursively copy - * the contents of the specified directory to the new directory. - * - * This routine is called only by CopyDir and by itself - * (recursion). - */ - -static int -CopyDirRecursive(char *srcDir, char *dstDir, int force) -{ - DWORD dwFileAttributes; - WIN32_FIND_DATA fileData; - HANDLE hSearch; - char *srcDirMarker; - char *dstDirMarker; - int retVal = 0; /* The return value of this routine. 0 means success. - * Nonzero means failure. */ - - dwFileAttributes = GetFileAttributes(dstDir); - if (dwFileAttributes == 0xFFFFFFFF) { - if (_mkdir(dstDir) == -1) { - fprintf(stderr, "SHMSDOS: cp: cannot create directory %s: %s\n", - dstDir, strerror(errno)); - return 8; - } - } else { - if (!(dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - fprintf(stderr, "SHMSDOS: cp: target %s is an existing file\n", - dstDir); - return 8; - } - if (force && (dwFileAttributes & FILE_ATTRIBUTE_READONLY)) { - dwFileAttributes &= ~FILE_ATTRIBUTE_READONLY; - SetFileAttributes(dstDir, dwFileAttributes); - } - } - - dstDirMarker = dstDir + strlen(dstDir); - *(dstDirMarker++) = '\\'; - - srcDirMarker = srcDir + strlen(srcDir); - *(srcDirMarker++) = '\\'; - strcpy(srcDirMarker, "*"); - hSearch = FindFirstFile(srcDir, &fileData); - if (hSearch == INVALID_HANDLE_VALUE) { - /* Directory is empty. We are done. */ - - return 0; - } - - do { - if (!strcmp(fileData.cFileName, ".") - || !strcmp(fileData.cFileName, "..")) { - /* - * Skip over . and .. - */ - - continue; - } - - strcpy(srcDirMarker, fileData.cFileName); - strcpy(dstDirMarker, fileData.cFileName); - if (sh_DoCopy(srcDir, fileData.dwFileAttributes, - dstDir, GetFileAttributes(dstDir), - force, TRUE) == FALSE) { - retVal = 5; - } - } while (FindNextFile(hSearch, &fileData)); - FindClose(hSearch); - return retVal; -} - -static BOOL -sh_DoCopy(char *srcFileName, - DWORD srcFileAttributes, - char *dstFileName, - DWORD dstFileAttributes, - int force, - int recursive -) -{ - if (dstFileAttributes != 0xFFFFFFFF) { - if ((dstFileAttributes & FILE_ATTRIBUTE_READONLY) && force) { - dstFileAttributes &= ~FILE_ATTRIBUTE_READONLY; - SetFileAttributes(dstFileName, dstFileAttributes); - } - } - - if (srcFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - if (!recursive) { - fprintf(stderr, "SHMSDOS: cp: %s is a directory\n", - srcFileName); - return FALSE; - } else if (CopyDirRecursive(srcFileName, dstFileName, force) != 0) { - return FALSE; - } - } else { - if (!CopyFile(srcFileName, dstFileName, FALSE)) { - fprintf(stderr, "SHMSDOS: cp: cannot copy %s to %s: %s\n", - srcFileName, dstFileName, sh_GetLastErrorMessage()); - return FALSE; - } - } - return TRUE; -} - -/* - * struct sh_CpCmdArg -- - * - * A pointer to the sh_CpCmdArg structure is passed into sh_CpFileCmd. - * The sh_CpCmdArg contains information about the cp command, and - * provide a buffer for constructing the destination file name. - */ - -struct sh_CpCmdArg { - int force; /* -f option, ok to overwrite an existing - * read-only destination file */ - int recursive; /* -r or -R option, recursively copy - * directories. */ - char *dstFileName; /* a buffer for constructing the destination - * file name */ - char *dstFileNameMarker; /* points to where in the dstFileName buffer - * we should write the file component of the - * destination file */ -}; - -/* - * sh_CpFileCmd -- - * - * Copy a file to the destination directory - * - * This function is intended to be passed into sh_EnumerateFiles to - * copy all the files specified by the pattern to the destination - * directory. - * - * Return TRUE if the file is successfully copied, and FALSE otherwise. - */ - -static BOOL -sh_CpFileCmd(char *pathName, WIN32_FIND_DATA *findData, void *cpArg) -{ - BOOL retVal = TRUE; - struct sh_CpCmdArg *arg = (struct sh_CpCmdArg *) cpArg; - - strcpy(arg->dstFileNameMarker, findData->cFileName); - return sh_DoCopy(pathName, findData->dwFileAttributes, - arg->dstFileName, GetFileAttributes(arg->dstFileName), - arg->force, arg->recursive); -} - -static int -shellCp (char **pArgv) -{ - int retVal = 0; - char **pSrc; - char **pDst; - struct sh_CpCmdArg arg; - struct sh_FileData dstData; - int dstIsDir = 0; - int n; - - arg.force = 0; - arg.recursive = 0; - arg.dstFileName = dstData.pathName; - arg.dstFileNameMarker = 0; - - while (*pArgv && **pArgv == '-') { - char *p = *pArgv; - - while (*(++p)) { - if (*p == 'f') { - arg.force = 1; - } else if (*p == 'r' || *p == 'R') { - arg.recursive = 1; - } - } - pArgv++; - } - - /* the first source file */ - if (*pArgv) { - pSrc = pArgv++; - } else { - fprintf(stderr, "SHMSDOS: cp: not enough arguments\n"); - return 3; - } - - /* get to the last token to find destination */ - if (*pArgv) { - pDst = pArgv++; - } else { - fprintf(stderr, "SHMSDOS: cp: not enough arguments\n"); - return 3; - } - while (*pArgv) { - pDst = pArgv++; - } - - /* - * The destination pattern must unambiguously expand to exactly - * one file or directory. - */ - - changeForwardSlashesTpBackSlashes(*pDst); - sh_EnumerateFiles(*pDst, *pDst, sh_RecordFileData, &dstData, &n); - assert(n >= 0); - if (n == 1) { - /* - * Is the destination a file or directory? - */ - - if (dstData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - dstIsDir = 1; - } - } else if (n > 1) { - fprintf(stderr, "SHMSDOS: cp: %s: ambiguous destination file " - "or directory\n", *pDst); - return 3; - } else { - /* - * n == 0, meaning that destination file or directory does - * not exist. In this case the destination file directory - * name must be fully specified. - */ - - char *p; - - for (p = *pDst; *p; p++) { - if (*p == '*' || *p == '?') { - fprintf(stderr, "SHMSDOS: cp: %s: No such file or directory\n", - *pDst); - return 3; - } - } - - /* - * Do not include the trailing \, if any, unless it is a root - * directory (\ or X:\). - */ - - if (p > *pDst && p[-1] == '\\' && p != *pDst + 1 && p[-2] != ':') { - p[-1] = '\0'; - } - strcpy(dstData.pathName, *pDst); - dstData.dwFileAttributes = 0xFFFFFFFF; - } - - /* - * If there are two or more source files, the destination has - * to be a directory. - */ - - if (pDst - pSrc > 1 && !dstIsDir) { - fprintf(stderr, "SHMSDOS: cp: cannot copy more than" - " one file to the same destination file\n"); - return 3; - } - - if (dstIsDir) { - arg.dstFileNameMarker = arg.dstFileName + strlen(arg.dstFileName); - - /* - * Now arg.dstFileNameMarker is pointing to the null byte at the - * end of string. We want to make sure that there is a \ at the - * end of string, and arg.dstFileNameMarker should point right - * after that \. - */ - - if (arg.dstFileNameMarker[-1] != '\\') { - *(arg.dstFileNameMarker++) = '\\'; - } - } - - if (!dstIsDir) { - struct sh_FileData srcData; - - assert(pDst - pSrc == 1); - changeForwardSlashesTpBackSlashes(*pSrc); - sh_EnumerateFiles(*pSrc, *pSrc, sh_RecordFileData, &srcData, &n); - if (n == 0) { - fprintf(stderr, "SHMSDOS: cp: %s: No such file or directory\n", - *pSrc); - retVal = 3; - } else if (n > 1) { - fprintf(stderr, "SHMSDOS: cp: cannot copy more than one file or " - "directory to the same destination\n"); - retVal = 3; - } else { - assert(n == 1); - if (sh_DoCopy(srcData.pathName, srcData.dwFileAttributes, - dstData.pathName, dstData.dwFileAttributes, - arg.force, arg.recursive) == FALSE) { - retVal = 3; - } - } - return retVal; - } - - for ( ; *pSrc != *pDst; pSrc++) { - BOOL rv; - - changeForwardSlashesTpBackSlashes(*pSrc); - rv = sh_EnumerateFiles(*pSrc, *pSrc, sh_CpFileCmd, &arg, &n); - if (rv == FALSE) { - retVal = 3; - } else { - if (n == 0) { - fprintf(stderr, "SHMSDOS: cp: %s: No such file or directory\n", - *pSrc); - retVal = 3; - } - } - } - - return retVal; -} - -static int -shellEcho(char **pArgv) -{ - int retVal = 0; - FILE *file = stdout; - char *fileName = NULL; - int redirectOutput = 0; - char **argv; - char *arrow = NULL; - int skipTwoArgs = 0; - int firstArg; - const char *mode = "w"; - - if (*pArgv == NULL) { - return 0; - } - - /* - * See if output is redirected to a file - */ - - for (argv = pArgv; *argv; argv++) { - char *p = *argv; - - if (*p == '>') { - if (redirectOutput) { - fprintf(stderr, "SHMSDOS: echo: ambiguous output " - "redirection\n"); - retVal = 8; - goto done; - } - arrow = p; - if (*(p + 1) == '>') { - /* - * append to redirected output file - */ - - mode = "a"; - p++; - } - if (*(p + 1) == '\0') { - /* - * The output file name is the next argument. - * So when we print the arguments later, we have - * one more argument to skip (in addition to the - * arrow ">"). - */ - - fileName = *(argv + 1); - skipTwoArgs = 2; - } else { - fileName = p + 1; - } - if (fileName == NULL || *fileName == '\0') { - fprintf(stderr, "SHMSDOS: echo: missing output file\n"); - assert(file == stdout); - return 8; - } - file = fopen(fileName, mode); - if (file == NULL) { - fprintf(stderr, "SHMSDOS: echo: cannot open output file %s: %s\n", - fileName, strerror(errno)); - assert(file == stdout); - return 8; - } - redirectOutput = 1; - } - } - - argv = pArgv; - firstArg = 1; - while (*argv) { - if (*argv != arrow) { - if (firstArg) { - firstArg = 0; - } else { - fprintf(file, " "); - } - fprintf(file, *argv); - } else if (skipTwoArgs) { - argv++; - } - argv++; - } - fprintf(file, "\n"); - -done: - if (file != stdout) { - fclose(file); - } - return retVal; -} - -/* - **************************************************************** - * - * The following routines implement the 'rm' command. - * - **************************************************************** - */ - -/* - * RemoveDirRecursive -- - * - * First recursively remove the contents of the specified - * directory, then remove the directory itself. - * It is assumed that dirName is just the name of the - * directory itself, i.e., it is not a full or relative - * pathname. - * - * This routine is called only by RemoveDir and by itself - * (recursion). - */ - -static int -RemoveDirRecursive(const char *dirName, int forceRm) -{ - WIN32_FIND_DATA fileData; - HANDLE hSearch; - BOOL rv; - int retVal = 0; /* The return value of this routine. 0 means success. - * Nonzero means failure. */ - - _chdir(dirName); - - hSearch = FindFirstFile("*", &fileData); - if (hSearch == INVALID_HANDLE_VALUE) { - /* Good, it's already empty */ - goto done; - } - - do { - /* - * Skip over . and .. - */ - - if (strcmp(fileData.cFileName, ".") - && strcmp(fileData.cFileName, "..")) { - if (fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - if (RemoveDirRecursive(fileData.cFileName, forceRm) != 0) { - retVal = 5; - } - } else { - if (fileData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) { - if (forceRm) { - /* - * Change mode to writable, in preparation for - * removal. - */ - - _chmod(fileData.cFileName, _S_IWRITE); - } else { - fprintf(stderr, "SHMSDOS: rm: file %s is read-only\n", - fileData.cFileName); - retVal = 5; - } - } - if (!DeleteFile(fileData.cFileName)) { - fprintf(stderr, "SHMSDOS: rm: cannot delete file %s: %s\n", - fileData.cFileName, sh_GetLastErrorMessage()); - retVal = 5; - } - } - } - rv = FindNextFile(hSearch, &fileData); - } while (rv); - FindClose(hSearch); - - _chdir(".."); -done: - if (!RemoveDirectory(dirName) ) { - fprintf(stderr, "SHMSDOS: rm: cannot remove directory %s: %s\n", - dirName, sh_GetLastErrorMessage()); - retVal = 5; - } - return retVal; -} - -/* - * RemoveDir -- - * Remove the contents of a directory and the directory itself. - * This routine is called only by shellRm. - */ - -static int -RemoveDir(const char *dirName, int forceRm) -{ - char cwd[_MAX_PATH]; - char *cPtr; - int retVal; - - /* - * Before we call RemoveDirRecursive, which actually deletes things, - * we want to find the directory name proper, not including the - * path. - */ - - cPtr = strrchr(dirName, '\\'); - if (cPtr != NULL && *(cPtr + 1) != '\0') { - _getcwd(cwd, sizeof(cwd)); - *cPtr = '\0'; - _chdir(dirName); - retVal = RemoveDirRecursive(cPtr + 1, forceRm); - _chdir(cwd); - } else { - retVal = RemoveDirRecursive(dirName, forceRm); - } - return retVal; -} - -/* - * struct sh_RmCmdArg -- - * - * A pointer to the sh_RmCmdArg structure is passed into sh_RmFileCmd. - */ - -struct sh_RmCmdArg { - int force; /* -f option, ok to remove read-only files and - * directories */ - int recursive; /* -r or -R option, recursively remove directories */ -}; - -/* - * sh_RmFileCmd -- - * - * Remove the file or directory. Return TRUE if the file or directory - * is successfully removed, FALSE otherwise. - */ - -static BOOL -sh_RmFileCmd(char *pathName, WIN32_FIND_DATA *fileData, void *rmArg) -{ - BOOL rv = TRUE; - struct sh_RmCmdArg *arg = (struct sh_RmCmdArg *) rmArg; - - if (fileData->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - if (arg->recursive) { - if (RemoveDir(pathName, arg->force) != 0) { - rv = FALSE; - } - } else { - fprintf(stderr, "SHMSDOS: rm: %s is a directory\n", - fileData->cFileName); - rv = FALSE; - } - } else { - if (fileData->dwFileAttributes & FILE_ATTRIBUTE_READONLY) { - if (arg->force) { - /* - * Change mode to writable, in preparation for - * removal. - */ - - _chmod(pathName, _S_IWRITE); - } else { - fprintf(stderr, - "SHMSDOS: rm: file %s is read-only\n", - pathName); - rv = FALSE; - } - } - if (!DeleteFile(pathName)) { - fprintf(stderr, - "SHMSDOS: rm: cannot delete file %s: %s\n", - pathName, sh_GetLastErrorMessage()); - rv = FALSE; - } - } - return rv; -} - -/* - * sh_EnumerateFiles -- - * - * Enumerate all the files in the specified pattern, which is a pathname - * containing possibly wildcard characters such as * and ?. fileFcn - * is called on each file, passing the expanded file name, a pointer - * to the file's WIN32_FILE_DATA, and the arg pointer. - * - * It is assumed that there are no wildcard characters before the - * character pointed to by 'where'. - * - * On return, *nFiles stores the number of files enumerated. *nFiles is - * set to this number whether sh_EnumerateFiles or 'fileFcn' succeeds - * or not. - * - * Return TRUE if the files are successfully enumerated and all - * 'fileFcn' invocations succeeded. Return FALSE if something went - * wrong. - */ - -static BOOL sh_EnumerateFiles( - const char *pattern, - const char *where, - sh_FileFcn fileFcn, - void *arg, - int *nFiles - ) -{ - WIN32_FIND_DATA fileData; - HANDLE hSearch; - const char *src; - char *dst; - char fileName[_MAX_PATH]; - char *fileNameMarker = fileName; - char *oldFileNameMarker; - BOOL hasWildcard = FALSE; - BOOL retVal = TRUE; - BOOL patternEndsInDotStar = FALSE; - BOOL patternEndsInDot = FALSE; /* a special case of - * patternEndsInDotStar */ - int numDotsInPattern; - int len; - - /* - * Windows expands patterns ending in ".", ".*", ".**", etc. - * differently from the glob expansion on Unix. For example, - * both "foo." and "foo.*" match "foo", and "*.*" matches - * everything, including filenames with no dots. So we need - * to throw away extra files returned by the FindNextFile() - * function. We require that a matched filename have at least - * the number of dots in the pattern. - */ - len = strlen(pattern); - if (len >= 2) { - /* Start from the end of pattern and go backward */ - const char *p = &pattern[len - 1]; - - /* We can have zero or more *'s */ - while (p >= pattern && *p == '*') { - p--; - } - if (p >= pattern && *p == '.') { - patternEndsInDotStar = TRUE; - if (p == &pattern[len - 1]) { - patternEndsInDot = TRUE; - } - p--; - numDotsInPattern = 1; - while (p >= pattern && *p != '\\') { - if (*p == '.') { - numDotsInPattern++; - } - p--; - } - } - } - - *nFiles = 0; - - /* - * Copy pattern to fileName, but only up to and not including - * the first \ after the first wildcard letter. - * - * Make fileNameMarker point to one of the following: - * - the start of fileName, if fileName does not contain any \. - * - right after the \ before the first wildcard letter, if there is - * a wildcard character. - * - right after the last \, if there is no wildcard character. - */ - - dst = fileName; - src = pattern; - while (src < where) { - if (*src == '\\') { - oldFileNameMarker = fileNameMarker; - fileNameMarker = dst + 1; - } - *(dst++) = *(src++); - } - - while (*src && *src != '*' && *src != '?') { - if (*src == '\\') { - oldFileNameMarker = fileNameMarker; - fileNameMarker = dst + 1; - } - *(dst++) = *(src++); - } - - if (*src) { - /* - * Must have seen the first wildcard letter - */ - - hasWildcard = TRUE; - while (*src && *src != '\\') { - *(dst++) = *(src++); - } - } - - /* Now src points to either null or \ */ - - assert(*src == '\0' || *src == '\\'); - assert(hasWildcard || *src == '\0'); - *dst = '\0'; - - /* - * If the pattern does not contain any wildcard characters, then - * we don't need to go the FindFirstFile route. - */ - - if (!hasWildcard) { - /* - * See if it is the root directory, \, or X:\. - */ - - assert(!strcmp(fileName, pattern)); - assert(strlen(fileName) >= 1); - if (dst[-1] == '\\' && (dst == fileName + 1 || dst[-2] == ':')) { - fileData.cFileName[0] = '\0'; - } else { - /* - * Do not include the trailing \, if any - */ - - if (dst[-1] == '\\') { - assert(*fileNameMarker == '\0'); - dst[-1] = '\0'; - fileNameMarker = oldFileNameMarker; - } - strcpy(fileData.cFileName, fileNameMarker); - } - fileData.dwFileAttributes = GetFileAttributes(fileName); - if (fileData.dwFileAttributes == 0xFFFFFFFF) { - return TRUE; - } - *nFiles = 1; - return (*fileFcn)(fileName, &fileData, arg); - } - - hSearch = FindFirstFile(fileName, &fileData); - if (hSearch == INVALID_HANDLE_VALUE) { - return retVal; - } - - do { - if (!strcmp(fileData.cFileName, ".") - || !strcmp(fileData.cFileName, "..")) { - /* - * Skip over . and .. - */ - - continue; - } - - if (patternEndsInDotStar) { - int nDots = 0; - char *p = fileData.cFileName; - while (*p) { - if (*p == '.') { - nDots++; - } - p++; - } - /* Now p points to the null byte at the end of file name */ - if (patternEndsInDot && (p == fileData.cFileName - || p[-1] != '.')) { - /* - * File name does not end in dot. Skip this file. - * Note: windows file name probably cannot end in dot, - * but we do this check anyway. - */ - continue; - } - if (nDots < numDotsInPattern) { - /* - * Not enough dots in file name. Must be an extra - * file in matching .* pattern. Skip this file. - */ - continue; - } - } - - strcpy(fileNameMarker, fileData.cFileName); - if (*src && *(src + 1)) { - /* - * More to go. Recurse. - */ - - int n; - - assert(*src == '\\'); - where = fileName + strlen(fileName); - strcat(fileName, src); - sh_EnumerateFiles(fileName, where, fileFcn, arg, &n); - *nFiles += n; - } else { - assert(strchr(fileName, '*') == NULL); - assert(strchr(fileName, '?') == NULL); - (*nFiles)++; - if ((*fileFcn)(fileName, &fileData, arg) == FALSE) { - retVal = FALSE; - } - } - } while (FindNextFile(hSearch, &fileData)); - - FindClose(hSearch); - return retVal; -} - - -/* - * shellRm -- - * - * Implement the Unix 'rm' command. - * - * We require that the option flags of 'rm', if any, - * be the first arguments and precede all the other - * arguments. Right now the -f, -r, and -R flags are - * recognized. We change / to \ in file pathname arguments. - */ - -static int -shellRm (char **pArgv) -{ - int retVal = 0; /* The return value of this function. 0 means - * success. Nonzero means failure. */ - struct sh_RmCmdArg arg; - - arg.force = 0; - arg.recursive = 0; - - /* Convert option flags */ - while (*pArgv && (**pArgv == '-')) { - char *p = *pArgv; - p++; - while (*p) { - if (!arg.recursive && (*p == 'r' || *p == 'R')) { - arg.recursive = 1; - } - if (!arg.force && *p == 'f') { - arg.force = 1; - } - p++; - } - pArgv++; - } - - /* - * If -f is not specified and there are no paths specified, - * we complain. - */ - - if (!arg.force && !*pArgv) { - fprintf(stderr, "SHMSDOS: usage: rm [-fRr] file ...\n"); - retVal = 5; - } - - /* Delete each file/directory */ - for ( ; *pArgv; pArgv++) { - int n; - BOOL rv; - - changeForwardSlashesTpBackSlashes(*pArgv); - rv = sh_EnumerateFiles(*pArgv, *pArgv, sh_RmFileCmd, &arg, &n); - if (rv == FALSE) { - retVal = 5; - } else { - if (n == 0 && !arg.force) { - fprintf(stderr, "SHMSDOS: rm: %s: No such file or directory\n", - *pArgv); - retVal = 5; - } - } - } - return retVal; -} - -static int -shellTest (char **pArgv) -{ - int retVal = 0; /* assume valid return */ - char * arg1 = NULL; - char * arg2 = NULL; - char * arg3 = NULL; - struct _stat buf; - int result; - int true = 0; - int false = 1; - unsigned short fileStatus; - - if ( strcmp ( *pArgv, "!" ) == 0 ) { - pArgv++; - true = !true; - false = !false; - } - arg1 = *pArgv++; - - if ( *arg1 == '-' ) { - arg2 = *pArgv++; - - // process string tests - switch ( *(arg1+1) ) { - case 'z': - return (!arg2 || strlen ( arg2 ) == 0) ? true : false; // return zero if length of string is zero - case 'n': - return (arg2 && strlen ( arg2 ) != 0) ? true : false; // return zero if length of string is nonzero - } - - // process file tests - if ( !arg2 ) - return false; - changeForwardSlashesTpBackSlashes ( arg2 ); - - /* Check if statistics are valid: */ - result = _stat( arg2, &buf ); - if( result != 0 ) - return false; // file or directory does not exist - - fileStatus = buf.st_mode; - if ( (*(arg1+1) != 'd') && (*(arg1+1) != 'r') - && (*(arg1+1) != 'f') ) - printf ("!!!!!! never been tested: test -%c\n", *(arg1+1) ); - - switch ( *(arg1+1) ) { - case 'c': // character special file? - if ( fileStatus & _S_IFCHR ) - return true; // return directory found - return false; // return directory not found - case 'd': // directory? - if ( fileStatus & _S_IFDIR ) - return true; // return directory found - return false; // return directory not found - case 'f': // regular file? - if ( fileStatus & _S_IFREG ) - return true; // return regular file found - return false; // return regular file not found - case 'g': // set group ID bit set? - return false; // return not set - case 'h': // symbolic link? - case 'l': // symbolic link? - case 'L': // symbolic link? - return false; // return symbolic link not found - case 'k': // sticky bit set? - return false; // return not set - case 'p': // named pipe? - if ( fileStatus & _S_IFIFO ) - return true; // return named pipe found - return false; // return named pipe not found - case 'r': // readable file? - if ( fileStatus & _S_IREAD ) - return true; // return read permission found - return false; // return read permission not found - case 's': // size greater than zero? - if ( buf.st_size > 0 ) - return true; // return file has greater than zero size - return false; // return file size is zero - case 't': // set for terminal device? - return -1; // return not implemented - case 'u': // set user ID bit set? - return false; // return not set - case 'w': // writeable file? - if ( fileStatus & _S_IWRITE ) - return true; // return write permission found - return false; // return write permission not found - case 'x': // executable file? - if ( fileStatus & _S_IEXEC ) - return true; // return execute permission found - return false; // return execute permission not found - default: - return -1; // not implemented - } - } else { // string compares - printf ("!!!!!! never been tested: test %s\n", arg1 ); - if ( *pArgv ) - arg2 = *pArgv++; - if ( *pArgv ) - arg3 = *pArgv++; - - // check if strings compare s1 = s2 or not compare s1 != s2 - if ( arg2 && arg3 ) { - if ( strcmp ( arg2, "=" ) == 0 ) - return strcmp ( arg1, arg3 ) ? false : true; - if ( strcmp ( arg2, "!=" ) == 0 ) - return strcmp ( arg1, arg3 ) ? true : false; - if ( strcmp ( arg2, "-eq" ) == 0 ) - return ( atol(arg1) == atol(arg3) ) ? true : false; - if ( strcmp ( arg2, "-ne" ) == 0 ) - return ( atol(arg1) != atol(arg3) ) ? true : false; - if ( strcmp ( arg2, "-gt" ) == 0 ) - return ( atol(arg1) > atol(arg3) ) ? true : false; - if ( strcmp ( arg2, "-ge" ) == 0 ) - return ( atol(arg1) >= atol(arg3) ) ? true : false; - if ( strcmp ( arg2, "-lt" ) == 0 ) - return ( atol(arg1) < atol(arg3) ) ? true : false; - if ( strcmp ( arg2, "-le" ) == 0 ) - return ( atol(arg1) <= atol(arg3) ) ? true : false; - } - // check for empty string - if ( (arg2 == NULL ) && ( arg3 == NULL) ) - return (strlen(arg1) > 0 ) ? true : false; - } - - return -1; // not implemented -} - -#define COPY_BUFFER_SIZE 4096 - -static int -shellCat (char **pArgv) -{ - int retVal = 0; /* assume valid return */ - char **pSrc; - char **pDst; - - int sfd, dfd, len; - struct _stat fi; - char copy_buffer[COPY_BUFFER_SIZE]; - unsigned long read_len; - - while ( **pArgv == '-' ) - pArgv++; - - /* get source files */ - pSrc = pArgv++; - - /* get to last token to find destination */ - pDst = pArgv++; - while ( *pArgv ) - pDst = pArgv++; - - if( (dfd = _open(*pDst, O_RDWR | O_CREAT | O_BINARY, 0666)) == -1) { - perror ( "Could not open the destination file "); - fprintf(stdout, "Destination file %s\n", *pDst); - retVal = (4); - } - - while ( *pSrc != *pDst ) { - - if (!(strcmp(*pSrc, ">"))) { - *pSrc++; - continue; - } - if (!strcmp(*pSrc, *pDst)) { - *pSrc++; - continue; - } - if( (sfd = _open(*pSrc, O_RDONLY | O_BINARY, 0666)) == -1) { - perror ( "Could not open the source file" ); - fprintf(stdout, "Source file %s\n", *pSrc); - retVal = (4); - return retVal; - } - - _stat(*pSrc, &fi); - if(!(_S_IFREG & fi.st_mode)) { - perror ( "Could not stat the source file" ); - fprintf(stdout, "Source file %s\n", *pSrc); - retVal = (4); - return retVal; - } - len = fi.st_size; - - while(len) { - unsigned long result; - read_len = len>COPY_BUFFER_SIZE?COPY_BUFFER_SIZE:len; - - if ( (read_len = _read(sfd, copy_buffer, read_len)) == -1) { - perror ( "Could not read the source file" ); - fprintf(stdout, "Source file %s\n", *pSrc); - retVal = (4); - return retVal; - } - - if ( (result = (unsigned long)_write(dfd, copy_buffer, read_len)) != read_len) { - perror ( "Could not write to the destination file" ); - fprintf(stdout, "Destination file %s\n", *pDst); - retVal = (4); - return retVal; - } - - len -= read_len; - } - close(sfd); - *pSrc++; - } - close(dfd); - - return retVal; -} - -/* - * struct sh_MvCmdArg -- - * - * A pointer to the sh_MvCmdArg structure is passed into sh_MvFileCmd. - * The sh_MvCmdArg contains information about the mv command, and - * provide a buffer for constructing the destination file name. - */ - -struct sh_MvCmdArg { - int force; /* -f option, ok to overwrite an existing - * read-only destination file */ - char *dstFileName; /* a buffer for constructing the destination - * file name */ - char *dstFileNameMarker; /* points to where in the dstFileName buffer - * we should write the file component of the - * destination file */ -}; - -static BOOL -sh_DoMove(const char *srcFileName, - DWORD srcFileAttributes, - const char *dstFileName, - DWORD dstFileAttributes, - int force -) -{ - if (dstFileAttributes != 0xFFFFFFFF) { - /* - * The destination exists. - * - If the destination is a file, then the source must be a file. - * - If the destination is a directory, then it must be empty, - * and the source must be a directory. - * This is really an arbitrary choice. You may have other - * preference of the behavior. - * - * Because we need to remove the existing destination file - * or directory, we also require that either it is writable - * or 'force' is TRUE. - */ - - int srcIsDir = srcFileAttributes & FILE_ATTRIBUTE_DIRECTORY; - int dstIsDir = dstFileAttributes & FILE_ATTRIBUTE_DIRECTORY; - BOOL rv; - - if (!dstIsDir && srcIsDir) { - fprintf(stderr, "SHMSDOS: mv: cannot rename %s (a directory) " - "to %s (a file)\n", srcFileName, dstFileName); - return FALSE; - } - if (dstIsDir && !srcIsDir) { - fprintf(stderr, "SHMSDOS: mv: cannot rename %s (a file) " - "to %s (a directory)\n", srcFileName, dstFileName); - return FALSE; - } - if ((dstFileAttributes & FILE_ATTRIBUTE_READONLY) && force) { - dstFileAttributes &= ~FILE_ATTRIBUTE_READONLY; - SetFileAttributes(dstFileName, dstFileAttributes); - } - if (dstIsDir) { - rv = RemoveDirectory(dstFileName); - } else { - rv = DeleteFile(dstFileName); - } - if (rv == FALSE) { - fprintf(stderr, "SHMSDOS: mv: cannot overwrite %s: %s\n", - dstFileName, sh_GetLastErrorMessage()); - return FALSE; - } - } - - if (MoveFile(srcFileName, dstFileName) == FALSE) { - fprintf(stderr, "SHMSDOS: mv: cannot move %s to %s: %s\n", - srcFileName, dstFileName, sh_GetLastErrorMessage()); - return FALSE; - } - return TRUE; -} - -/* - * sh_MvFileCmd -- - * - * Move a file to the destination directory - * - * This function is intended to be passed into sh_EnumerateFiles to - * move all the files specified by the pattern to the destination - * directory. - * - * Return TRUE if the file is successfully moved, and FALSE otherwise. - */ - -static BOOL -sh_MvFileCmd(char *pathName, WIN32_FIND_DATA *findData, void *mvArg) -{ - struct sh_MvCmdArg *arg = (struct sh_MvCmdArg *) mvArg; - DWORD dwFileAttributes; - - strcpy(arg->dstFileNameMarker, findData->cFileName); - dwFileAttributes = GetFileAttributes(arg->dstFileName); - return sh_DoMove(pathName, findData->dwFileAttributes, - arg->dstFileName, dwFileAttributes, arg->force); -} - -static int -shellMv (char **pArgv) -{ - int retVal = 0; - char **pSrc; - char **pDst; - struct sh_MvCmdArg arg; - struct sh_FileData dstData; - int dstIsDir = 0; - int n; - - arg.force = 0; - arg.dstFileName = dstData.pathName; - arg.dstFileNameMarker = 0; - - while (*pArgv && **pArgv == '-') { - char *p = *pArgv; - - while (*(++p)) { - if (*p == 'f') { - arg.force = 1; - } - } - pArgv++; - } - - /* the first source file */ - if (*pArgv) { - pSrc = pArgv++; - } else { - fprintf(stderr, "SHMSDOS: mv: not enough arguments\n"); - return 3; - } - - /* get to the last token to find destination */ - if (*pArgv) { - pDst = pArgv++; - } else { - fprintf(stderr, "SHMSDOS: mv: not enough arguments\n"); - return 3; - } - while (*pArgv) { - pDst = pArgv++; - } - - /* - * The destination pattern must unambiguously expand to exactly - * one file or directory. - */ - - changeForwardSlashesTpBackSlashes(*pDst); - sh_EnumerateFiles(*pDst, *pDst, sh_RecordFileData, &dstData, &n); - assert(n >= 0); - if (n == 1) { - /* - * Is the destination a file or directory? - */ - - if (dstData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - dstIsDir = 1; - } - } else if (n > 1) { - fprintf(stderr, "SHMSDOS: mv: %s: ambiguous destination file " - "or directory\n", *pDst); - return 3; - } else { - /* - * n == 0, meaning that destination file or directory does - * not exist. In this case the destination file directory - * name must be fully specified. - */ - - char *p; - - for (p = *pDst; *p; p++) { - if (*p == '*' || *p == '?') { - fprintf(stderr, "SHMSDOS: mv: %s: No such file or directory\n", - *pDst); - return 3; - } - } - - /* - * Do not include the trailing \, if any, unless it is a root - * directory (\ or X:\). - */ - - if (p > *pDst && p[-1] == '\\' && p != *pDst + 1 && p[-2] != ':') { - p[-1] = '\0'; - } - strcpy(dstData.pathName, *pDst); - dstData.dwFileAttributes = 0xFFFFFFFF; - } - - /* - * If there are two or more source files, the destination has - * to be a directory. - */ - - if (pDst - pSrc > 1 && !dstIsDir) { - fprintf(stderr, "SHMSDOS: mv: cannot move more than" - " one file to the same destination file\n"); - return 3; - } - - if (dstIsDir) { - arg.dstFileNameMarker = arg.dstFileName + strlen(arg.dstFileName); - - /* - * Now arg.dstFileNameMarker is pointing to the null byte at the - * end of string. We want to make sure that there is a \ at the - * end of string, and arg.dstFileNameMarker should point right - * after that \. - */ - - if (arg.dstFileNameMarker[-1] != '\\') { - *(arg.dstFileNameMarker++) = '\\'; - } - } - - if (!dstIsDir) { - struct sh_FileData srcData; - - assert(pDst - pSrc == 1); - changeForwardSlashesTpBackSlashes(*pSrc); - sh_EnumerateFiles(*pSrc, *pSrc, sh_RecordFileData, &srcData, &n); - if (n == 0) { - fprintf(stderr, "SHMSDOS: mv: %s: No such file or directory\n", - *pSrc); - retVal = 3; - } else if (n > 1) { - fprintf(stderr, "SHMSDOS: mv: cannot move more than one file or " - "directory to the same destination\n"); - retVal = 3; - } else { - assert(n == 1); - if (sh_DoMove(srcData.pathName, srcData.dwFileAttributes, - dstData.pathName, dstData.dwFileAttributes, - arg.force) == FALSE) { - retVal = 3; - } - } - return retVal; - } - - for ( ; *pSrc != *pDst; pSrc++) { - BOOL rv; - - changeForwardSlashesTpBackSlashes(*pSrc); - rv = sh_EnumerateFiles(*pSrc, *pSrc, sh_MvFileCmd, &arg, &n); - if (rv == FALSE) { - retVal = 3; - } else { - if (n == 0) { - fprintf(stderr, "SHMSDOS: mv: %s: No such file or directory\n", - *pSrc); - retVal = 3; - } - } - } - - return retVal; -} diff --git a/buildtools/windows/source/shmsdos/shmsdos.mak b/buildtools/windows/source/shmsdos/shmsdos.mak deleted file mode 100644 index d884e5ed85f..00000000000 --- a/buildtools/windows/source/shmsdos/shmsdos.mak +++ /dev/null @@ -1,141 +0,0 @@ -# NMAKE file for building shmsdos.exe. -# -# This file is edited from an NMAKE file generated by -# Microsoft Developer Studio, Format Version 4.20 -# -# To build, say -# nmake /f shmsdos.mak CFG=Release -# or -# nmake /f shmsdos.mak CFG=Debug -# If CFG is omitted, a release build is assumed. - -!IF "$(CFG)" == "" -CFG=Release -!MESSAGE No configuration specified. Defaulting Release. -!ENDIF - -!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "shmsdos.mak" CFG="Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Release" (based on "Win32 Console Application") -!MESSAGE "Debug" (based on "Win32 Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Release" - -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\shmsdos.exe" - -CLEAN : - -@erase "$(INTDIR)\shmsdos.obj" - -@erase "$(OUTDIR)\shmsdos.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/shmsdos.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)/shmsdos.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/shmsdos.pdb"\ - /out:"$(OUTDIR)/shmsdos.exe" -LINK32_OBJS= \ - "$(INTDIR)\shmsdos.obj" - -"$(OUTDIR)\shmsdos.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\shmsdos.exe" - -CLEAN : - -@erase "$(INTDIR)\shmsdos.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\shmsdos.exe" - -@erase "$(OUTDIR)\shmsdos.ilk" - -@erase "$(OUTDIR)\shmsdos.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MD /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "DEBUG"\ - /D "_CONSOLE" /Fp"$(INTDIR)/shmsdos.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)/shmsdos.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/shmsdos.pdb" /debug\ - /out:"$(OUTDIR)/shmsdos.exe" -LINK32_OBJS= \ - "$(INTDIR)\shmsdos.obj" - -"$(OUTDIR)\shmsdos.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -################################################################################ -# Begin Source File - -SOURCE=.\shmsdos.c -DEP_CPP_SHMSD=\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\shmsdos.obj" : $(SOURCE) $(DEP_CPP_SHMSD) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/buildtools/windows/source/uname/README b/buildtools/windows/source/uname/README deleted file mode 100644 index feb43969c8c..00000000000 --- a/buildtools/windows/source/uname/README +++ /dev/null @@ -1,9 +0,0 @@ -This directory contains the source for uname.exe on Win32. -This version of uname.exe returns the string "WINNT" when -you say 'uname -s' on Windows NT. - -To build it, you need Microsoft Visual C++ and nmake. -Issue the command: - nmake /f uname.mak -The output is Release\uname.exe. Copy it to a directory -on your Path. \ No newline at end of file diff --git a/buildtools/windows/source/uname/uname.c b/buildtools/windows/source/uname/uname.c deleted file mode 100644 index eb26c2ac474..00000000000 --- a/buildtools/windows/source/uname/uname.c +++ /dev/null @@ -1,155 +0,0 @@ -/*********************************************************** - * uname - returns name of OS - **********************************************************/ -#include -#include -#include - -#define index(s, c) strchr((s), (c)) -#define streq(a, b) (strcmp ((a), (b)) == 0) - -static char ** getlistOfOptions (char **pArgv, char * pOptions); -static void getUnameOption ( char option ); - -/*********************************************************************** - * -a Print all information. - * - * -m Print the machine hardware name. - * - * -n Print the nodename (the nodename is the name by which - * the system is known to a communications network). - * - * -p Print the current host's processor type. - * - * -r Print the operating system release. - * - * -s Print the name of the operating system. This is the - * default. - * - * -v Print the operating system version. - * - * -S systemname - * The nodename may be changed by specifying a system name - * argument. The system name argument is restricted to - * SYS_NMLN characters. SYS_NMLN is an implementation - * specific value defined in . Only the - * super-user is allowed this capability. - ***********************************************************************/ - -main( int argc, char *argv[ ], char *envp[ ] ) -{ - char options[1024]; - char *pOptions; - char **pArgv; - char c; - - pArgv = &argv[1]; - pArgv = getlistOfOptions (pArgv, options); - - /* if no options specified, then return operating system */ - pOptions = options; - if ( *pOptions == '\0' ) { - options[0] = 's'; - options[1] = '\0'; - } - while (c = *pOptions++ ) { - if ( c == 'a' ) { - getUnameOption ( 's' ); - printf (" " ); - getUnameOption ( 'n' ); - printf (" " ); - getUnameOption ( 'r' ); - printf (" " ); - getUnameOption ( 'v' ); - printf (" " ); - getUnameOption ( 'm' ); - printf (" " ); - getUnameOption ( 'p' ); - } else - getUnameOption ( c ); - } - return 0; -} - -static char ** -getlistOfOptions (char **pArgv, char * pOptions) -{ - char *pArg; - while ( *pArgv && (**pArgv == '-') ) { - pArg = *pArgv; - pArg++; /* skip over '-' */ - while ( *pArg ) - *pOptions++ = *pArg++; - pArgv++; - } - *pOptions = '\0'; - return pArgv; -} -void getUnameOption ( char option ) -{ - char computerName[128]; - SYSTEM_INFO systemInfo; - OSVERSIONINFO versionInfo; - DWORD computerNameLength = sizeof(computerName); - - GetSystemInfo( &systemInfo); - GetComputerName( (LPTSTR)&computerName, &computerNameLength ); - versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx( &versionInfo ); - - switch ( option ) { - case 'a': - printf ( getenv ("OS") ); - break; - case 'm': - printf ( "xx" ); - break; - case 'n': - printf ( computerName ); - break; - case 'p': - switch ( systemInfo.wProcessorArchitecture ) { - case PROCESSOR_ARCHITECTURE_INTEL: - printf("I386"); - break; - case PROCESSOR_ARCHITECTURE_MIPS: - printf("MIPS"); - break; - case PROCESSOR_ARCHITECTURE_ALPHA: - printf("ALPHA"); - break; - case PROCESSOR_ARCHITECTURE_PPC: - printf("PPC"); - break; - default: - printf("UNKNOWN_PROCESSOR"); - break; - } - break; - case 'r': - printf ("%d.%d", versionInfo.dwMajorVersion, versionInfo.dwMinorVersion ); - break; - case 's': - switch ( versionInfo.dwPlatformId ) { - case VER_PLATFORM_WIN32s: - printf("WIN32S"); - break; - case VER_PLATFORM_WIN32_WINDOWS: - printf("WIN95"); - break; - case VER_PLATFORM_WIN32_NT: - printf("WINNT"); - break; - default: - printf("UNKNOWN_OS"); - break; - } - break; - case 'v': - printf ("%d", versionInfo.dwBuildNumber ); - break; - default: - printf ( "uname -%c is unimplemented", option ); - break; - } -} diff --git a/buildtools/windows/source/uname/uname.mak b/buildtools/windows/source/uname/uname.mak deleted file mode 100644 index f92fd4e294c..00000000000 --- a/buildtools/windows/source/uname/uname.mak +++ /dev/null @@ -1,141 +0,0 @@ -# NMAKE file for building uname.exe. -# -# This file is edited from an NMAKE file generated by -# Microsoft Developer Studio, Format Version 4.20 -# -# To build, say -# nmake /f uname.mak CFG=Release -# or -# nmake /f uname.mak CFG=Debug -# If CFG is omitted, a release build is assumed. - -!IF "$(CFG)" == "" -CFG=Release -!MESSAGE No configuration specified. Defaulting Release. -!ENDIF - -!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "uname.mak" CFG="Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Release" (based on "Win32 Console Application") -!MESSAGE "Debug" (based on "Win32 Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Release" - -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\uname.exe" - -CLEAN : - -@erase "$(INTDIR)\uname.obj" - -@erase "$(OUTDIR)\uname.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/uname.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)/uname.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/uname.pdb"\ - /out:"$(OUTDIR)/uname.exe" -LINK32_OBJS= \ - "$(INTDIR)\uname.obj" - -"$(OUTDIR)\uname.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\uname.exe" - -CLEAN : - -@erase "$(INTDIR)\uname.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\uname.exe" - -@erase "$(OUTDIR)\uname.ilk" - -@erase "$(OUTDIR)\uname.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MD /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "DEBUG"\ - /D "_CONSOLE" /Fp"$(INTDIR)/uname.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)/uname.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/uname.pdb" /debug\ - /out:"$(OUTDIR)/uname.exe" -LINK32_OBJS= \ - "$(INTDIR)\uname.obj" - -"$(OUTDIR)\uname.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -################################################################################ -# Begin Source File - -SOURCE=.\uname.c -DEP_CPP_SHMSD=\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\uname.obj" : $(SOURCE) $(DEP_CPP_SHMSD) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/l10nkits/client/windows/docs/installer/IS1.JPG b/l10nkits/client/windows/docs/installer/IS1.JPG deleted file mode 100644 index 5ca5152c740..00000000000 Binary files a/l10nkits/client/windows/docs/installer/IS1.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/installer/L10NTREE.JPG b/l10nkits/client/windows/docs/installer/L10NTREE.JPG deleted file mode 100644 index 9ab09c8beb4..00000000000 Binary files a/l10nkits/client/windows/docs/installer/L10NTREE.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/installer/SPLASH.JPG b/l10nkits/client/windows/docs/installer/SPLASH.JPG deleted file mode 100644 index 642509db347..00000000000 Binary files a/l10nkits/client/windows/docs/installer/SPLASH.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/installer/branding.html b/l10nkits/client/windows/docs/installer/branding.html deleted file mode 100644 index a19cfc0cb08..00000000000 --- a/l10nkits/client/windows/docs/installer/branding.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Product Branding Issues - - - -

-Product Branding Instructions

-Under the terms of the Unlimited Localization Program, you must remove -or replace all trademarked Netscape terms, brand names, icons, images, -etc.  These trademarks are listed on the page found at the following -URL: - -

http://home.netscape.com/misc/trademarks.html#trademarks - -

Please refer to that page for details.  You may not release a localized -version of the Netscape Communicator with these trademarks left in the -product. -
  -

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -

-1998, Copyright Netscape Communications -Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/gettingStarted.html b/l10nkits/client/windows/docs/installer/gettingStarted.html deleted file mode 100644 index 1159a619a01..00000000000 --- a/l10nkits/client/windows/docs/installer/gettingStarted.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - Getting Started - - - -

-2. Getting Started

-Before you can begin using the Windows Installer Localization Kit, you -must install it and setup your working directories. This is a simple matter -of unzipping the compressed kit file(s) into the proper directories. Your -system must also meet certain requirements to run the tools needed to perform -the localization steps described below. - -

-


-

-System Requirements

-There few system requirements for the kit in the strictest sense; however, -your choice of tools will have their own set of requirements.  The -most likely minimum configuration will be as follows: -
    -
  • -100% IBM compatible PC
  • - -
  • -Pentium® processor
  • - -
  • -Microsoft® Windows NT 3.51 or 4.0 (localized -versions will help testing but aren't required)
  • - -
  • -16 MB RAM
  • - -
  • -30 MB available hard disk space
  • - -
  • -InstallShield International version 3.0 or other install builder software
  • - -
  • -A visual resource editor, such as those provided with Microsoft® -Visual C++, Borland® C++, etc.
  • - -
  • -An active Internet connection and the ability to ftp (send and receive) -large files
  • - -
  • -A Web browser (say, for example, Netscape Communicator ;-)
  • -
- -

- -

- -

-Installing the Kit

-It is recommended that you install the Windows Installer Localization Kit -into the same directory as your other Netscape/Mozilla localization kits: -in other words, install this kit into your kitRoot directory.  -Place this localization kit's .ZIP file in that directory and UNZIP it -with the -d parameter: - -

PKUNZIP -d filename -

    Example:  PKUNZIP -d instkit
- -
-

-Configuring Your Tools

-Please refer to your Installshield or other install builder tool's documentation -for set up and usage instructions. -
  -
- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
- -
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/isocodes.htm b/l10nkits/client/windows/docs/installer/isocodes.htm deleted file mode 100644 index c33c7d170f9..00000000000 --- a/l10nkits/client/windows/docs/installer/isocodes.htm +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - ISO Locale codes - - - -
-

-ISO Language and Country Codes

-2 letter language codes are derived from the ISO 639 standard; country -codes are from ISO 3166. Here are the codes for the locales currently supported -by the L10n kits. If an entry also includes the country code then you must -use that as well when creating the locale directory or naming a file. -

-ISO Language and Country Codes table

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Language NameLanguage CodeCountry Code
-
Chinese (Traditional)
-
-
zh
-
-
CN
-
-
Chinese (Simplified)
-
-
zh
-
-
TW
-
-
Danish
-
-
da
-
-
DK
-
-
Dutch
-
-
nl
-
-
NL
-
-
French
-
-
fr
-
-
FR
-
-
German
-
-
de
-
-
DE
-
-
Italian
-
-
it
-
-
IT
-
-
Japanese
-
-
ja
-
-
JP
-
-
Korean
-
-
ko
-
-
KR
-
-
Portuguese
-
-
pt
-
-
BR
-
-
Spanish
-
-
es
-
-
ES
-
-
Swedish
-
-
sv
-
-
SE
-
- -

-1997, Copyright Netscape Communications -Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/kitOverview.html b/l10nkits/client/windows/docs/installer/kitOverview.html deleted file mode 100644 index 45f1f0c67dd..00000000000 --- a/l10nkits/client/windows/docs/installer/kitOverview.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - Kit Overview - - - -

-Kit Overview

-This kit is primarily intended for knowledgeable developers who are familiar -with the localization process, with InstallShield or other installation -programs, and with Windows resource editors.  There are two basic -approaches you can take to create an installer for your localized Communicator, -Navigator or Mozilla derivative product: -
    -
  1. -Use an existing Communicator or Navigator Export product installer as a -base and add your localized files, or
  2. - -
  3. -Create your own install program and use the registry setting information -provided by the kit.
  4. -
- -
    -

    -Overview of Method 1.

    -For this method you will need the following components: -
      -
      -
    • -Your own copy of InstallShield version 3 International
    • - -
    • -The appropriate version of a Netscape Communicator or Navigator installer.
    • - -
    • -This localization kit.
    • - -
    • -A text editor.
    • - -
    • -A resource editor (e.g., MSDEV)
    • -
    - - -

    You will start with an Export version of a Netscape Communicator or -Navigator installer.  Then, you will extract the localizable components -and modify them as desired.  You will localize a number of strings -contained in .INI files using a text editor. You will use a resource editor -or the Netscape Translation Tools to localize STRINGTABLE and DIALOG resource -types contained in two .DLLs. Once the localizable components of the installer -are finished, you will reassemble the installer using the InstallShield -EXE BUILDER tool, including your localized Communicator, Navigator or Mozilla -derivative product.  This process is detailed in the next section.

- -
    -

    -Overview of Method 2.

    -For this method you will need the following components: -
      -
      -
    • -Your own copy of any install builder software
    • - -
    • -This localization kit
    • -
    - - -

    You will create your own installation program in whatever fashion you -wish.  In order for your localized product to function properly, your -installer will need to implement certain Windows -registry settings.

-  -
- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
-  -
 1998, Copyright Netscape Communications Corp. -All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/kitStruct.html b/l10nkits/client/windows/docs/installer/kitStruct.html deleted file mode 100644 index 9c7222da826..00000000000 --- a/l10nkits/client/windows/docs/installer/kitStruct.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Kit Structure - - - -

-Kit Structure and Organization

-When you install this localization kit you will find a number of new directories -on your hard disk. Each directory is named so as to be fairly self-explanatory, -but the following diagram and description may help avoid any confusion -you may have about what's what. -

-

- -

-Description of Kit Directories

- -
    -
  • -The kitRoot directory is wherever you install the Netscape -Localization Kits.
  • - -
  • -The l10nkits directory contains the tools (if any) and -documentation you need to complete your work.
  • - -
  • -Since this kit concerns the Windows client product (as opposed to our server -products) all the relevant documentation and tools are found under the -client\windows directory.
  • - -
  • -The docs directory contains documentation on the kit, including -the file you are reading now.
  • -
-  -
- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/localizeAim.html b/l10nkits/client/windows/docs/installer/localizeAim.html deleted file mode 100644 index 57882525f20..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeAim.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Localize AIM.INI - - - -

-Localization notes for AIM.INI

- -General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
  • -Change Netscape trademarks to your own product name(s).
  • -
- -Specific Notes: -

-File Copy String=Copying Netscape AOL Instant Messenger Service files... - -

-Installation String=Installing Netscape AOL Instant Messenger Service files... - -

-Configuration String=Configuring Netscape AOL Instant Messenger Service... - -

-

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -

- -

1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/localizeCD.html b/l10nkits/client/windows/docs/installer/localizeCD.html deleted file mode 100644 index 5c7e5d6dd42..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeCD.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - Localize CD.INI - - - -

-Localization notes for CD.INI

-General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
  • -Update the product version number as appropriate.
  • - -
  • -Modify the locale code according to the ISO 639 and ISO 3166 standards. -(See the Reference section for details).
  • - -
  • -You may need to move the placement of "%s" variables in your translation.
  • - -
  • -Do not exceed the length of US string for Deinstall Dialog Wait Message.
  • - -
  • -Change Netscape trademarks to your own product name(s).
  • -
-Specific Notes: - -

Product Setup Title1= Deinstaller - -

Product Version=4.03 (en) - -

Deinstall Dialog Message=Are you sure you want to deinstall Netscape -Communicator 4.03 ? - -

Deinstall Dialog Wait Message=Parsing Netscape Communicator -4.03  deinstall log file %s (this will take several minutes)... - -

  -

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  -
  - - diff --git a/l10nkits/client/windows/docs/installer/localizeCosmo.html b/l10nkits/client/windows/docs/installer/localizeCosmo.html deleted file mode 100644 index 1d23dc46a5a..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeCosmo.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - Localize COSMO.INI - - - -

-Localization notes for COSMO.INI

-General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
  • -Update the product version number as appropriate.
  • - -
  • -Modify the locale code according to the ISO 639 and ISO 3166 standards. -(See the Reference section for details).
  • -
-Specific Notes: -
  -
Installation String=Installing Cosmo Player files... - -

Configuration String=Configuring Cosmo Player... - -

File Copy String=Copying Cosmo Player files...  - -

Description=VRML 2.0 support  - -

[Registry Entries-Reg2] -
HKEY Value=4.03 (en) - -

[Registry Entries-Reg3] -
HKEY Key Path=Software\Netscape\Cosmo\4.03 (en) - -

[Registry Entries-Reg4] -
HKEY Key Path=Software\Netscape\Cosmo\4.03 (en)\Main -
  -

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  -
  - - diff --git a/l10nkits/client/windows/docs/installer/localizeIsuser.html b/l10nkits/client/windows/docs/installer/localizeIsuser.html deleted file mode 100644 index ae583f05177..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeIsuser.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - Localize _ISUSER.DLL - - - -

-Localization notes for _ISUSER.DLL

-All dialogs in this .DLL can be localized. -
  -
- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/localizeMmedia.html b/l10nkits/client/windows/docs/installer/localizeMmedia.html deleted file mode 100644 index c8390b57676..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeMmedia.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - Localize MMEDIA.INI - - - -

-Localization notes for MMEDIA.INI

-General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
-Specific Notes: - -

Installation String=Installing Audio/Video Playback files... - -

Configuration String=Configuring Audio/Video Playback... - -

File Copy String=Copying Audio/Video Playback files... - -

Description=Support for multi-media web pages -

-

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -

-

1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/localizeMplay.html b/l10nkits/client/windows/docs/installer/localizeMplay.html deleted file mode 100644 index 998b6091787..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeMplay.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Localizing MPLAY32.INI - - - -

-Localization notes for MPLAY32.INI

-General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
  • -Update the product version number as appropriate.
  • - -
  • -Modify the locale code according to the ISO 639 and ISO 3166 standards. -(See the Reference section for details).
  • - -
  • -Change Netscape trademarks to your own product name(s).
  • -
-Specific Notes: - -

Installation String=Installing Netscape Media Player files... - -

Configuration String=Configuring Netscape Media Player... - -

File Copy String=Copying Netscape Media Player files... - -

Description=Streaming audio support - -

[Default Folder-Icon2] -
ProgramFolder=[Default Folder]\Utilities - -

[Registry Entries-Reg2] -
HKEY Value=4.03 (en) - -

[Registry Entries-Reg3] -
HKEY Key Path=Software\Netscape\Media Player\4.03 (en) - -

[Registry Entries-Reg4] -
HKEY Key Path=Software\Netscape\Media Player\4.03 (en)\Main - -

[Registry Entries-Reg5] -
HKEY Key Path=Software\Netscape\Media Player\4.03 (en)\Main -
  -

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
-1998, Copyright Netscape Communications -Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/localizeNav40.html b/l10nkits/client/windows/docs/installer/localizeNav40.html deleted file mode 100644 index 956cd78205b..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeNav40.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Localize NAV40.INI - - - -

-Localization notes for NAV40.INI

-General Notes: -
    -
  • -Do not exceed the length of English string if possible.
  • - -
  • -Modify the locale code according to the ISO 639 and ISO 3166 standards. -(See the Reference section for details).
  • - -
  • -The "Utilities" folder name may be localized.
  • - -
  • -"Item name" is the name that will appear under the associated icon; these -may be localized.
  • - -
  • -You may need to move the placement of "%s" variables in your translation.
  • - -
  • -Change Netscape trademarks to your own product name(s).
  • -
-Specific Notes: - -

Installation String=Installing Netscape Communicator 4.03 files... - -

Configuration String=Configuring Netscape Communicator 4.03... - -

File Copy String=Copying Netscape Communicator 4.03 files... - -

Description=Contains Collabra, Composer, Messenger, and Navigator. - -

Warn Previous Version Message=Setup has detected a previous installation -of %s. If you installed plugins or helper applications with a previous -installation, you will need to reinstall them to this version of Communicator. - -

[Navigator 1] -
Message=Setup has detected that an instance of Navigator is currently -running. Please quit Navigator before running Setup. - -

[Navigator 2] -
Message=Setup has detected that an instance of Navigator is currently -running. Please quit Navigator before running Setup. - -

[Navigator 3] -
Message=Setup has detected that an instance of Navigator is currently -running. Please quit Navigator before running Setup. - -

[NSMail Notifier] -
Message=Installation cannot continue because the Mail Notification -program is currently running. Use your right mouse button to click the -Mail icon next to the task bar clock and select 'Exit' to disable Mail -Notification, then run the installer again. - -

[Navigator 4.05 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.05 (en)\Main - -

[Navigator 4.04 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.04 (en)\Main - -

[Navigator 4.03 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.03 (en)\Main - -

[Navigator 4.02 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.02 (en)\Main - -

[Navigator 4.01 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.01 (en)\Main - -

[Navigator 4.0 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.0 (en)\Main - -

[Navigator 4.0b6 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.0b6 (en)\Main - -

[Navigator 4.0b5 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.0b5 (en)\Main - -

[Navigator 4.0b4 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.0b4 (en)\Main - -

[Navigator 4.0b3 32] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.0b3 [en]\Main - -

[Default Folder-Icon11] -
ItemName=User Profile Manager - -

[Default Folder-Icon12] -
ProgramFolder=[Default Folder]\Utilities -
ItemName=User Profile Manager - -

[Default Folder-Icon13] -
ItemName=Netscape Mail Notification - -

[Default Folder-Icon14] -
ProgramFolder=[Default Folder]\Utilities -
ItemName=Netscape Mail Notification - -

[Registry Entries-R14] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.03 (en) - -

[Registry Entries-R15] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.03 (en)\Main - -

[Registry Entries-R16] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.03 (en)\Main - -

[Registry Entries-R17] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.03 (en)\Main - -

[Registry Entries-R18] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.03 (en)\Main - -

[Registry Entries-R19] -
HKEY Key Path=Software\Netscape\Netscape Navigator\4.03 (en)\Main - -

[Registry Entries-R37] -
HKEY Value=4.03 (en) - -

[Registry Entries-R38] -
HKEY Key Path=Software\Netscape\Netcaster\4.03 (en)\Main - -

[Registry Entries-R39] -
HKEY Key Path=Software\Netscape\Netcaster\4.03 (en)\Main -

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/localizeNetcast.html b/l10nkits/client/windows/docs/installer/localizeNetcast.html deleted file mode 100644 index 5f84f8f84b8..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeNetcast.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Localize NETCAST.INI - - - -

-Localization notes for NETCAST.INI

- -General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
  • -Change Netscape trademarks to your own product name(s).
  • -
- -Specific Notes: -

-Installation String=Installing Netscape Netcaster files... -

-Configuration String=Configuring Netscape Netcaster... -

-File Copy String=Copying Netscape Netcaster files... - -

-

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -

- -

1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/localizeNsconf.html b/l10nkits/client/windows/docs/installer/localizeNsconf.html deleted file mode 100644 index 5ef304d097c..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeNsconf.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - Localizing NSCONF.INI - - - -

-Localization notes for NSCONF.INI

-General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
  • -Update the product version number as appropriate.
  • - -
  • -Modify the locale code according to the ISO 639 and ISO 3166 standards. -(See the Reference section for details).
  • - -
  • -Change Netscape trademarks to your own product name(s).
  • -
-Specific Notes: - -

Installation String=Installing Netscape Conference files... - -

Configuration String=Configuring Netscape Conference... - -

File Copy String=Copying Netscape Conference files... - -

Description=Real-time collaboration and audio conferencing - -

[Registry Entries-Reg17] -
HKEY Value=4.03 (en) - -

[Registry Entries-Reg18] -
HKEY Key Path=Software\Netscape\Conference\4.03 (en) - -

[Registry Entries-Reg19] -
HKEY Key Path=Software\Netscape\Conference\4.03 (en)\Main - -

[Registry Entries-Reg20] -
HKEY Key Path=Software\Netscape\Conference\4.03 (en)\Main
-
-

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/localizeRsutil.html b/l10nkits/client/windows/docs/installer/localizeRsutil.html deleted file mode 100644 index 0fdff957a81..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeRsutil.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - Localize RSUTIL.DLL - - - -

-Localization notes for RSUTIL.DLL

-STRINGTABLES - -

Do not translate the following strings: - -

STRING ID: -
-
17 18 19  -
20 21 22 23 24 25 26 27 28 29  -
30 31 32 33 34 35 36 37 38 39  -
40 41 42 43 44 45 46 47 48 49  -
50 51 52 53 54 55 56 57 58 59  -
60 61 62 63 64 65 66 67 68 69  -
70 71 72 73 74 75 76 77 78 79  -
80 81 82 83 85 86 88  -
90 91 92 95 97 98 99 -
100 101 102 103 104 105 106 107 108 109 -
110 111 112 113 114 -
122 123 126 127 129 -
132 133 134 135 136 137 138 139 -
140 145 149 -
151 153 154 155 156 157 158 159 -
162 163 164 165 166 167 169  -
170 171 172 173 174 175 176 177 178 179 -
180 181 182 183 184 185 187 188 -
190 192 193 194 195 196 197 198 199 -
200 201 202 203 204 205 206 207 208 209 -
210 211 212 213 214 215 216 217 218 219 -
220 221 222 226 227 228 229  -
230 232 233 234 235 236 237 238 239 -
240 241 242 243 244 245 246 247 248 249 -
250 251 252 253 254 255 256 257  -
260 261 263 264 265 266 267 269 -
270 271 272 273 274 275 276 277 278 279 -
280 281 282 283 -
  -
-


-
ICONS -
Replace any trademarked icons, as described in the universal localization -program license agreement, with your own icons. -
  -
- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/localizeSetup.html b/l10nkits/client/windows/docs/installer/localizeSetup.html deleted file mode 100644 index cc2ca881bb6..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeSetup.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - Localize SETUP.INI - - - -

-Localization notes for SETUP.INI

-General Notes: -
    -
  • -Only translate the strings which are shown in bold type face below.
  • - -
  • -The "StartCopy Dialog Message" should be less than 256 bytes long.
  • - -
  • -For the "Multiple Components" section, both the key and the value may be -localized (optional).
  • - -
  • -If the key "Multimedia Support" is localized then next section name should -be identical to the localized key.
  • - -
  • -Change Netscape trademarks to your own product name(s).
  • - -
  • -Update the version number as appropriate.
  • - -
  • -Modify the locale code according to the ISO 639 and ISO 3166 standards. -(See the Reference section for details).
  • -
-Specific Notes: - -

Product Setup Title1= Setup - -

Product Version=4.03 (en) - -

Deinstall Version=4.03 (en) - -

License Dialog Title=Software License Agreement - -

License Dialog Message=Please read the following license agreement. -Use the scroll bar to view the rest of this agreement. - -

License Dialog Question=Do you accept all the terms of the preceding -license agreement? If so, click on the Yes button. If you select No, Setup -will close. - -

License Icon Description=License Agreement - -

Welcome Dialog Title=Netscape Communicator 4.03 Setup - -

Welcome Dialog Message=Welcome to Netscape Communicator 4.03 Setup. - -

SetupType Dialog Title=Setup Type - -

SetupType Dialog Message=Select the type of setup you prefer. - -

Insufficient Space Dialog Title=Insufficient Space - -

Insufficient Space Dialog Message=The path below contains insufficient -space. - -

Path Dialog Title=Choose Destination Location - -

Path Dialog Message=Please enter the location where you would like -to install Netscape Communicator 4.03 -
components. You may type a new directory name or click the Browse -button to find a new location. - -

Options Dialog Title=Netscape Communicator 4.03 Options - -

Options Dialog Message=Check the components you would like to install. - -

Associations Dialog Title=Setup Associations - -

Associations Dialog Message=Check the extensions you would like Communicator -to set up. These extensions will be associated with Communicator components. - -

Select Folder Dialog Title=Select Program Folder - -

StartCopy Dialog Title=Start Copying Files - -

StartCopy Dialog Message=Setup has enough information to start copying -the program files. If you want to review or change settings, click Back. -If you are satisfied with the current settings, click Install to begin -copying files. - -

Readme Dialog Prompt=Would you like to view the README file now? - -

Finish Dialog Prompt=Setup is complete. You may run Netscape Communicator -4.03 by double-clicking on one of the icons in the folder. - -

Reboot Dialog Title=Restarting Windows - -

Reboot Dialog Message=Setup has finished copying files to your computer. -Before you can use the program, you must restart Windows or your computer. - -

Exit Dialog Message=Are you sure you want to exit setup? - -

Error Resource Message1=Could not load Resource: %s -
Error Resource Message2=Attempted to fix the problem. Please restart -the setup application. -
Error Resource Message3=Could not get module handle of rsutil.dll. -System memory could be corrupted. Please reboot and try again. - -

[Multiple Components] -
Multimedia Support=Extension modules for Netscape Communicator -4.03 - -

[Multimedia Support] -
Default Path= -
  -

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/localizeURL.html b/l10nkits/client/windows/docs/installer/localizeURL.html deleted file mode 100644 index 57718bc00fd..00000000000 --- a/l10nkits/client/windows/docs/installer/localizeURL.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - Localizing URLs - - - -

-Localizing URLs

-Many resources of all types in the Communicator contain Internet addresses -in the form of URLs (Universal Resource Locators). Most of these point -to locations within the Netscape domain; as part of the Unlimited Localization -Program, you can leave these as they are, or you may change them as you -desire. -

-Internal URLs

-There are a number of internal URLs that should not -be changed.  These are the strings that look like about:[some -value].  These point to internally contained resources, such as -the main About Communicator page.  If you localize these strings you -will not be able to load these pages.  The main examples you might -find are: -
    -
  • -about:
  • - -
  • -about:plugins
  • - -
  • -about:fonts
  • -
-For more examples and information on these internal URLs go here. -
  -
  -
- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
-1998, Copyright Netscape Communications -Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/localize_these_files.html b/l10nkits/client/windows/docs/installer/localize_these_files.html deleted file mode 100644 index 17950feab44..00000000000 --- a/l10nkits/client/windows/docs/installer/localize_these_files.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - Localize these Files - - - -

-Localize These Files

-This section tells you exactly what files need to be localized. The following -tables contain two columns: -
    -
  • -The file to be localized column gives the specific file name. The path -name temp refers to wherever you have copied the uncompressed installer -files in Step 2 of the Localization -Checklist. If the file or resource name is a hypertext link, further -information can be found by following that link.
  • - -
  • -The purpose column describes the basic purpose of this file.
  • -
-Table 1. Binary files to be localized - - - - - - - - - - - - - - - - - - -
File to be localized Purpose
rsutil.dllInstaller STRINGTABLE and ICON resources. 
_isuser.dllInstaller DIALOG resources.
- -

-Table 2. .INI files to be localized - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
File to be localizedPurpose
aim.iniAOL Instant Messgenger initialization file.*
cd.iniDeinstaller initialization file.
cosmo.iniCosmo player initialization file.*
mmedia.iniMultimedia initialization file.*
mplay32.iniMedia Player initialization file.*
nav40.iniMain product initialization file.
netcast.iniNetcaster initialization file.
nsconf.iniNetscape Conference initialization file.*
setup.iniMain setup initialization file.
-

-* These files come with the Complete installer version. -

-

- - - -
-
[CONTENTS]
-
- -

-

1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/nomenclature.html b/l10nkits/client/windows/docs/installer/nomenclature.html deleted file mode 100644 index 7b3bff64402..00000000000 --- a/l10nkits/client/windows/docs/installer/nomenclature.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - Conventions - - - -

-Nomenclature and Typographical Conventions

-Typographical Conventions -
Words in italics typeface represent a variable term or phrase, -meant to be replaced by another value at "runtime."  Example: -
    locale -- replaced by a 2- or 4 letter locale code; e.g. zhtw
-Words in bold typeface, using a proportional font, represent a literal -value in a string that might also contain a variable word or phrase. Example: -
    4.03 [locale] -- 4.03 [ ] are literal values, -while locale is a variable. -
       
    -
-Words in a fixed width font represent file or directory names, -or DOS or Windows commands to be typed as they appear.  Sometimes, -part or all of the path will be in bold, for emphasis. -Examples: -
    Change to the kitRoot\l10nkits\client\windows\tools -directory -
    Execute RTRNKIT
-Nomenclature -
Throughout this document, certain terms and phrases will be used repeatedly: - -

Table 1. Nomenclature and Typographical Conventions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
kitRoot directory indicates the starting or topmost directory of the Windows Front End -Localization Kit.
platformeither 16 or 32 bit, depending on the version you are working on.
localein general, this refers to the language into which you are localizing -the product. The list of valid locale names is defined in the ISO -Language and Country Codes Table.
localization databasea database generated by a leveraging tool from a set of matched binary -resource files. 
localization notesany special instructions, including the "translate/don't translate" -flag, associated with a given resource.  Localization notes are contained -in the localization database for each resource module.
leverageThe process of merging previous localized versions of a file into a -current version. 
forbidden resourceA resource that cannot be changed from the original value without (negatively) -impacting the functionality of the product. These are identified in the -localization databases.
-  -
  -

- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/projectOverview.html b/l10nkits/client/windows/docs/installer/projectOverview.html deleted file mode 100644 index 642b5087fd4..00000000000 --- a/l10nkits/client/windows/docs/installer/projectOverview.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - Project Overview - - - -

-1. Project Overview

- -
Welcome to the Communicator/Navigator -Installer Localization Kit!
- - -

Under the universal localization program, you are free to create an -installer for a localized Communicator, Navigator or Mozilla derivative -product in any way you choose. This localization kit will assist you in -creating a your installer for the 32-bit Windows platform. As long as you -follow the terms of the universal localization program license agreement, -you are free to do what you want with the resulting localized product and -installer. - -

The Netscape Communicator and Netscape Navigator 4.x installation programs -were created with InstallShield® version -3.  Because this is the proprietary product of InstallShield Corporation, -Netscape cannot redistribute the complete source for these installers.  -You may, however, modify an existing Communicator or Navigator installer, -or if you choose, you may build your own installer "from scratch". - -

Note: because of the U.S. Government's restrictions on the export -of strong cryptography, you may only distribute the "export" version -of the Netscape binaries.  Please keep this in mind as you work with -the localization kit instructions. -
  -

- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
-  -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/reference.html b/l10nkits/client/windows/docs/installer/reference.html deleted file mode 100644 index b424d42abe8..00000000000 --- a/l10nkits/client/windows/docs/installer/reference.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Reference - - - -

-Reference

-This section summarizes the references used throughout this document.  -In addition, other miscellaneous references may be found here. - -

Table 5. Reference Links - - - - - - - - - - - - - - - - -
Locale Table (local)Locale -Table (remote)Windows Registry Settings Reference
Communicator International -Features
- - -

  -

- - - -
-
[CONTENTS]
-
- -
 
- -
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/registrySettings.html b/l10nkits/client/windows/docs/installer/registrySettings.html deleted file mode 100644 index 7dd697b6524..00000000000 --- a/l10nkits/client/windows/docs/installer/registrySettings.html +++ /dev/null @@ -1,612 +0,0 @@ - - - - - - Windows Registry Settings - - - -

-Windows Registry Settings

-This document is provided as a reference to the Windows registry settings -implemented by Communicator and Navigator.  You may use this as a -guide to the registry settings you must implement if you create your own -installation program (as opposed to localizing an existing Netscape installer). - -

Note that in the Netscape installers, these settings are implemented -only within .INI files.  This simplifies modifying and localizing -the installer. It is recommended that your installer do the same. - -

You may observe the registry changes made by any product with tools -such as Regmon. This -may be a useful addition to your toolset. - -

These notes are applicable to Netscape Communicator version 4.03. -
  - - - - -
MPLAY32.INI  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Media Player  -
Name : CurrentVersion  -
Value: 4.03 (en)  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Media Player\4.03 (en)  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Media Player\4.03 (en)\Main  -
Name : Install Directory  -
Value: [Default Path]\MPlayer  -
Type : REGDB_STRING  - -

Name : Program Folder  -
Value: [Program Folder]  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\.LAM  -
Name : (Default)  -
Value: LAMDocument  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\LAMDocument\shell\open\command  -
Name : (Default)  -
Value: [WINSYSDIR]\mplay32.exe %1  -
Type : REGDB_STRING  - -

Name : (Default)  -
Value: [WINDIR]\mplayer.exe %1  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\LAMDocument\DefaultIcon  -
Name : (Default)  -
Value: [Default Path]\MPlayer\npcfg32.exe ,0  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MCI32  -
Name : LiveAudioFile  -
Value: mcilma32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MCI  -
Name : LiveAudioFile  -
Value: mcilma.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MCI32  -
Name : LiveAudioMetafile  -
Value: mcilau32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\drivers.desc  -
Name : mcilau32.dll  -
Value: (MCI) Netscape Media Player  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MCI  -
Name : LiveAudioMetafile  -
Value: mcilau.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MCI -Extensions  -
Name : LAM  -
Value: LiveAudioMetafile  -
Type : REGDB_STRING  - -

Name : LMA  -
Value: LiveAudioFile  -
Type : REGDB_STRING  - -

Name : LA  -
Value: LiveAudioFile  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\drivers.desc  -
Name : mcilma32.dll  -
Value: (MCI) Netscape Packetized Audio  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Drivers32  -
Name : MSACM.NSPAC  -
Value: NSPAC32.ACM  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\drivers.desc  -
Name : NSPAC32.ACM  -
Value: elemedia(TM) AX24000P Music Codec  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Drivers32  -
Name : MSACM.voxacm118  -
Value: vdk32118.acm  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\drivers.desc  -
Name : vdk32118.acm  -
Value: Voxware 32bit Codec  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Drivers32  -
Name : MSACM.NSX83  -
Value: NSX83P32.ACM  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\drivers.desc  -
Name : NSX83P32.ACM  -
Value: elemedia(TM) SX8300 Speech Codec  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Drivers32  -
Name : MSACM.NSMLAW  -
Value: NSMLAW32.DLL  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\drivers.desc  -
Name : NSMLAW32.DLL  -
Value: Netscape G.711 Decoder  -
Type : REGDB_STRING  -
-


-
NAV40.INI  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App -Paths\Netscape.exe  -
Name : (Default)  -
Value: [Default Path]\Program\Netscape.exe  -
Type : REGDB_STRING  - -

Name : Path  -
Value: [Default Path]\Program  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{7865A9A1-33A8-11d0-BED9-00A02468FAB6}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\brpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{543EC0D0-6AB7-11d0-BF56-00A02468FAB6}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\brpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{543EC0D1-6AB7-11d0-BF56-00A02468FAB6}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\brpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{2D0A7D70-748C-11d0-9705-00805F8AA8B8}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\edpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{E8D6B4F0-8B58-11d0-9B63-00805F8ADDDE}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\mnpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{DDF4AB60-8B84-11d0-9B63-00805F8ADDDE}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\mnpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{CC3E2871-43CA-11d0-B6D8-00805F8ADDDE}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\mnpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{CC3E2872-43CA-11d0-B6D8-00805F8ADDDE}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\mnpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netscape Navigator  -
Name : CurrentVersion  -
Value: 4.03 (en)  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netscape Navigator\Users  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netscape Navigator\4.03 -(en)  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netscape Navigator\4.03 -(en)\Main  -
Name : Install Directory  -
Value: [Default Path]  -
Type : REGDB_STRING  - -

Name : Java Directory  -
Value: [Default Path]\Program\Java  -
Type : REGDB_STRING  - -

Name : NetHelp Directory  -
Value: [Default Path]\Program\NetHelp  -
Type : REGDB_STRING  - -

Name : Plugins Directory  -
Value: [Default Path]\Program\Plugins  -
Type : REGDB_STRING  - -

Name : Program Folder  -
Value: [Program Folder]  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CURRENT_USER\Software\Netscape  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Main  -
Name : Install Directory  -
Value: [Default Path]  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\CLSID  -
Name : (Default)  -
Value: {61D8DE20-CA9A-11CE-9EA5-0080C82BE3B6}  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\Insertable  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\protocol\StdFileEditing\server  -
Name : (Default)  -
Value: [Default Path]\Program\Netscape.exe  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\protocol\StdFileEditing\verb\0  -
Name : (Default)  -
Value: &Edit  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\open\command  -
Name : (Default)  -
Value: [Default Path]\Program\Netscape.exe "%1"  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\print\command  -
Name : (Default)  -
Value: [Default Path]\Program\Netscape.exe /print("%1")  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\print\ddeexec  -
Name : (Default)  -
Value: [print("%1")]  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\PrintTo\command  -
Name : (Default)  -
Value: [Default Path]\Program\Netscape.exe /printto("%1","%2","%3","%4")  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\PrintTo\ddeexec  -
Name : (Default)  -
Value: [("%1","%2","%3","%4")]  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\open\ddeexec  -
Name : (Default)  -
Value: "%1"  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\open\ddeexec\Application  -
Name : (Default)  -
Value: NSShell  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\open\ddeexec\Topic  -
Name : (Default)  -
Value: WWW_OpenURL  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\Edit\command  -
Name : (Default)  -
Value: [Default Path]\Program\Netscape.exe -edit "%1"  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\Edit\ddeexec  -
Name : (Default)  -
Value: [edit("%1")]  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netcaster  -
Name : CurrentVersion  -
Value: 4.03 (en)  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netcaster\4.03 (en)\Main  -
Name : Install Directory  -
Value: [Shell Path]\Netcast  -
Type : REGDB_STRING  - -

Name : Program Folder  -
Value: [Program Folder]  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{C98D0190-7D81-11d0-BF8D-00A02468FAB6}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\brpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{37B601C0-8AC8-11d0-83AF-00805F8A274D}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\brpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\CLSID\{913A4A20-8EBF-11d0-BFAB-00A02468FAB6}\InprocServer32  -
Name : (Default)  -
Value: [Default Path]\Program\brpref32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\print\ddeexec\Application  -
Name : (Default)  -
Value: NSShell  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\PrintTo\ddeexec\Application  -
Name : (Default)  -
Value: NSShell  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup\shell\Edit\ddeexec\Application  -
Name : (Default)  -
Value: NSShell  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\NetscapeMarkup  -
Name : (Default)  -
Value: Hypertext Markup Language  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\telnet  -
Name : (Default)  -
Value: URL:Telnet Protocol  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CLASSES_ROOT\telnet\shell\open\command  -
Name : (Default)  -
Value: telnet %1  -
Type : REGDB_STRING  -
-


-
NETCAST.INI  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netcaster  -
Name : CurrentVersion  -
Value: 1.0 (en)  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netcaster\1.0 (en)  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Netcaster\1.0 (en)\Main  -
Name : Install Directory  -
Value: [Default Path]  -
Type : REGDB_STRING  - -

Name : Program Folder  -
Value: [Program Folder]  -
Type : REGDB_STRING  -
-


-
NSCONF.INI  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Conference  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Conference\CurrentVersion  -
Name : Description  -
Value: Conference  -
Type : REGDB_STRING  - -

Name : InstallDate  -
Value: [TIME]  -
Type : REGDB_NUMBER  - -

Name : Installed  -
Value: 1  -
Type : REGDB_NUMBER  - -

Name : PathName  -
Value: [Default Path]  -
Type : REGDB_STRING  - -

Name : SoftwareType  -
Value: application  -
Type : REGDB_STRING  - -

Name : VersionBuild  -
Value: 1213  -
Type : REGDB_NUMBER  - -

Name : VersionMajor  -
Value: 1  -
Type : REGDB_NUMBER  - -

Name : VersionMinor  -
Value: 0  -
Type : REGDB_NUMBER  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Drivers32  -
Name : MSACM.VOXACM118  -
Value: vdk32118.acm  -
Type : REGDB_STRING  - -

Name : MSACM.NSX83  -
Value: nsx83p32.acm  -
Type : REGDB_STRING  - -

Name : MSACM.NSX723  -
Value: sx5363s.acm  -
Type : REGDB_STRING  - -

Name : MSACM.NSMLAW  -
Value: nsmlaw32.dll  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_CURRENT_USER\Software\Netscape  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_CLASSES_ROOT\nscfile\shell\open\command  -
Name : (Default)  -
Value: [Default Path]\NSConf32.exe -f "%1"  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Conference  -
Name : CurrentVersion  -
Value: 4.03 (en)  -
Type : REGDB_STRING  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Conference\4.03 (en)  -
Name : (Default)  -
Value:  -
Type :  -
  - -

Key  : HKEY_LOCAL_MACHINE\Software\Netscape\Conference\4.03 (en)\Main  -
Name : Install Directory  -
Value: [Default Path]  -
Type : REGDB_STRING  - -

Name : Program Folder  -
Value: [Program Folder]  -
Type : REGDB_STRING  -
 

-  -
  -

- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/reportingBugs.html b/l10nkits/client/windows/docs/installer/reportingBugs.html deleted file mode 100644 index efa1cb5a045..00000000000 --- a/l10nkits/client/windows/docs/installer/reportingBugs.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - Reporting Bugs - - - -

-Reporting Bugs

-Any bugs in the localization kits you find should be reported to mozilla.org -as soon as possible. When you report a bug, try to be as specific as you -can about the exact steps needed to reproduce the bug.  Provide a -complete description of the problem versus the expected results.  -You should let us know if the problem is 100% reproducible (it happens -every time), or if it is intermittant.  If you think that your operating -environment may play some factor, let us know the details of that.  -Finally, before reporting any bug, you should make sure that the problem -doesn't also happen in the US English product (if it does, we still want -to know, but it may not be possible to fix it through the localization -kits or tools as they are now). - -

To report a bug, post a message to the following mozilla.org newsgroup: -
  -

news://news.mozilla.org/netscape.public.mozilla.general
- - -

Be sure to include the information described above. -
  -

- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/returnKit.html b/l10nkits/client/windows/docs/installer/returnKit.html deleted file mode 100644 index 57a3ad67937..00000000000 --- a/l10nkits/client/windows/docs/installer/returnKit.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Returning the Kit - - - -

-5. Publishing the Finished Kit

-Once you are satisfied with the quality of your localization efforts, you -are required by the terms of the universal localization program license -agreement to make your localized product publicly available. The exact -details of how you do this is up to you, the most commonly acceptable method -is to post your localized product to a publicly accessible ftp site. - -

You should post just the localized versions of the files mentioned in -the Localize These Files section of this document. For ease of transfer, -you may create a compressed archive in the .ZIP file format that contains -the localized files. Create one .ZIP file for each language/platform you -do. If you are publishing more than one language or platform, you may combine -multiple .ZIP files into one master .ZIP file if this makes your life easier. - -

If your localized product includes your own trademarks, you should identify -these and any restrictions you are placing on their use. You must also -include a copy of the End User License Agreement (EULA), as well as a notice -stating that Netscape Communications is not required to support your product, -and that you are the Licensor referred to in the EULA. Please refer to -the Universal Localization Agreement for the exact legal requirements. - -

Once your localized product is publicly available, you may inform the -world in any manner you choose, but we encourage you to also post the download -location to the mozilla.org Announcements newsgroup (netscape.public.mozilla.announce). -

 
-Congratulations! You are done!
-  -
- - - - - -
-
[BACK]
-
-
[CONTENTS]
-
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/installer/splash.html b/l10nkits/client/windows/docs/installer/splash.html deleted file mode 100644 index d7aac2266e1..00000000000 --- a/l10nkits/client/windows/docs/installer/splash.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - Title Page - - - -
-

-NETSCAPE COMMUNICATOR

- -
- -
-

-Localization Kit

- -
-

-for Microsoft® Windows (32-bit version)

- -
-

-Revision 1.1

- -
Copyright © 1994-1998 Netscape® Communications Corporation, -All rights reserved.
-  -
  -
- - - - - -
-
[NEXT]
-
-
[CONTENTS]
-
- -
 
- - - diff --git a/l10nkits/client/windows/docs/installer/testKit.html b/l10nkits/client/windows/docs/installer/testKit.html deleted file mode 100644 index 5de12261ca9..00000000000 --- a/l10nkits/client/windows/docs/installer/testKit.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - Testing the Localized Resources - - - -

-4. Ensuring Quality

-The quality of your localized version will have a large impact on its acceptance -in the marketplace.  You can greatly enhance your chances of producing -a quality product by using experienced and skilled localizers, and by performing -post-translation testing. - -

When performing the actual translation, you should be sensitive to a -number of issues: -

    -
  • -Completeness: you should aim for as thorough a translation as possible.  -Try not to leave portions of the product untranslated. However, be aware -that some terms may best be left in English, depending on local conventions.
  • - -
  • -Suitability: all translations should be suitable and appropriate for product, -the language, the market and the customers you intend to reach.  This -includes using the proper technical terminology for a give platform or -computer operation, as well as using language that is readily understood -by the average user of the product in a given language.  You should, -where possible, try to use terminology which is similar to other products -available on the same platform (without violating copyrights or trademarks, -of course).
  • - -
  • -Accuracy: you should be sure your translation conveys the same meaning -and intention as the original English.
  • - -
  • -Grammar and spelling: you should be sure your translation is grammatically -accurate and free from spelling errors.
  • -
-Keep in mind that engineers do not necessarily make the best localizers! - -

Once localization is complete, there are two basic types of post-translation -testing that should be done: -
  - - - - - - - - - - - - -
Linguistic ReviewChecking all translations for accuracy and appropriateness in the actual -context in which they appear.
Functional TestingEnsuring the product still functions as designed (or at least as well -as the US English product).
-  -
For the linguistic review, you should have an independent reviewer -(i.e. not the person who implemented the translations) check every string -for the items listed above.  In some cases, it may be enough to review -the running product itself; however, it is also valuable to print out your -translations and review them externally from the product. - -

For the functional testing, your best resource are the directions contained -in the localization notes and this document. You should review the completed -product's localization notes with this document in hand, double checking -that you have followed all the instructions contained here. - -

Consider the following general guidelines when testing: -

    -
  • -It is helpful to have a second copy of the product running with the English -version so you can compare them side by side (a second computer might be -helpful or required for this).
  • - -
  • -Walk through every menu in each module you have localized looking for translation -accuracy, pick letter conflicts and other problems.
  • - -
  • -Bring up as many dialogs as you can, looking for translation accuracy, -pick letter conflicts, truncated strings and functionality issues.
  • - -
  • -Exercise the installer in as many ways as possible:
  • - -
      -
    • -Select every installer option
    • - -
    • -Be sure to test the deinstaller
    • - -
    • -Look at the icons and folder names created
    • - -
    • -Use accented or multibyte file and directory names
    • - -
    • -Install to non-existant and read-only directories
    • - -
    • -Install to drives with insufficient disk space
    • - -
    • -etc.
    • -
    - -
  • -If functional problems are found, you should compare the same steps you -took in the localized product to the English product: if the two products -fail in the same way, it is a "core" bug, which can only be fixed by changing -the core product's executable. If the localized product fails while the -English product does not, then it is probably a translation-related bug; -these can be fixed by altering the way you localize the product (perhaps -by not translating a particular item, or by translating it differently).
  • -
-The following section tells you how to report bugs in the localization -kit itself, or in the core product. -
  -
- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
- -
 
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
-  - - diff --git a/l10nkits/client/windows/docs/installer/toc.html b/l10nkits/client/windows/docs/installer/toc.html deleted file mode 100644 index 5503e91c44a..00000000000 --- a/l10nkits/client/windows/docs/installer/toc.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - Table of Contents - - - -

-Table of Contents

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
i. Title Page  -
 
1. Project Overview  - -
2. Getting Started  -
3. Using the Kit  -
4. Ensuring Quality  -
5. Publishing the Finished Kit  -
 
6. References 
-  - - diff --git a/l10nkits/client/windows/docs/installer/usingKit.html b/l10nkits/client/windows/docs/installer/usingKit.html deleted file mode 100644 index f8d625beab9..00000000000 --- a/l10nkits/client/windows/docs/installer/usingKit.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - Using the Kit - - -  - - - - -
-
WARNING! Protect yourself from data loss -by making regular backups of your work.
-
- -

-3. Using the Kit

-Once your copy of the Windows Installer Localization Kit is correctly installed, -you may begin your localization work by following the instructions in the -remainder of this document. The next section discusses the contents of -the localization notes provided with this kit. It is important that you -work properly with the instructions contained in these files or the localized -product you create may not function. -

-Understanding the Localization Notes

-Each localized module to be installed has an associated initialization -(.INI) file. The localization notes for these files, and for the localizable -dynamic link libraries used by the InstallShield installer, are provided -as HTML documentation. (There are no localization databases in this kit). -Additionally, a section detailing the required Windows registry settings -is also provided in HTML format. - -

The next section presents the basic localization process as a checklist. -

-
- -

-Localization Checklist

-This checklist applies to the "modifying -an existing Communicator installer" method. If you are creating -your own installer, you will need to adapt this checklist accordingly. -A reference is provided to help you implement the correct Windows -registry settings. - -

1. Download an existing installer -
You will need a matching installer for the product you are localizing. -In other words, if you are localizing Netscape Communicator version 4.03, -you need an installer for the Export version of Netscape Communicator 4.03. -If you are localizing Mozilla Navigator version 5.0, you need an installer -for the Export version (if any) of Mozilla Navigator version 5.0. Latest -versions of Netscape products can be downloaded from the Netscape -homepage. Older versions of Netscape installers, matching the versions -used to generate the localization kits, can be found on the mozilla.org -ftp site. - -

Current Netscape installers come in two forms: base and complete. Complete -installers include plugins and other components besides the basic Communicator -software. You may use either installer as the foundation for your work, -but note that there may not be localization kits for the additional components. -Even if you choose to distribute the English version of these components, -however, you must modify the associated initialization files, listed in -the Localize These Files -page in order for the additional components to be installed properly. - -

2. Uncompress the Installer files -

    -
  • -Run the installer you downloaded in step 1. This will bring up the following -dialog (or something very similar):
  • - -
    -
  • -Click yes. InstallShield will extract all the installation files to your -temporary directory. (Usually, this will be C:\temp or something similar). -Once this process is complete, the blue InstallShield background will display.
  • - -
  • -Without exiting the installer, locate the unpacked installer files in your -temp directory and copy them to a new directory. Call this directory "install" -(or something similar).
  • - -
  • -Exit the installer.
  • -
-3. Uncompress the Deinstaller files -
    -
  • -Change directories to your "install" directory. Locate the file cd32*.exe -(where * equals the version number you are working on. For example, version -4.03 would be represented as cd32403.exe).
  • - -
  • -Execute cd32*.exe. This will bring up a dialog similar to the one shown -is step 2. Click yes and wait until InstallShield has finished unpacking -the deinstaller files (the blue InstallShield background will display).
  • - -
  • -Without exiting the installer, locate the unpacked deinstaller files in -your temp directory and copy them to a new directory. Call this directory -"deinstall" (or something similar).
  • - -
  • -Exit the installer.
  • -
-4. Extract localizable installer .DLLs -
Change directories to your "install" directory. Use the InstallShield -tool ICOMP.EXE to extract RSUTIL.DLL and _ISUSER.DLL from _SETUP.LIB: -
    Example: icomp _setup.lib -d
-4. Localize files -
Consult the Localize These -Files page to learn which files contain localizable resources. - -

For each file to be localized, locate the associated Localization Notes -for that file and follow them carefully. - -

5. Replace original product files contained in nav40.z with localized -product files -
Use the ICOMP tool to replace the original (English language) Communicator -or Navigator files with the ones you have localized using the Windows Front -End Localization Kit. -

    -
  • -Make sure your localized product directory structure matches the structure -inside the compressed file nav40.z. (If necessary, uncompress nav40.z (including -subdirectories), and replace all the localizable files (as identified by -the Windows Front End Localization Kit) with your localized versions).
  • - -
  • -Update nav40.z with your localized files:
  • - -
      Example: icomp \kitRoot\products\client\windows\platform\locale\*.* -nav40.z -i
    -
-6. Rebuild the self-extracting deinstaller program -
Use the InstallShield tool EXE Builder to reassemble the self-extracting -deinstaller archive. -
    -
  • -Specify your "deinstall" directory as the source directory.
  • - -
  • -Set compression on.
  • - -
  • -Specify Setup.exe as the command line program to run when self-extraction -is complete. (No optional parameters are required.)
  • - -
  • -Specify your "install" directory as the target directory.
  • - -
  • -Enter the name of your localized product as the application name.
  • - -
  • -Do not specify a password.
  • - -
  • -Once creation of your localized self-extracting deinstaller is complete, -locate the file Setupex.exe in your "install" directory and rename it to -match the original name of the deinstaller self-extracting program (e.g., -cd32403.exe).
  • -
-7. Rebuild the self-extracting installer program -
Use the InstallShield tool EXE Builder to reassemble the self-extracting -installer archive. -
    -
  • -Specify your "install" directory as the source directory.
  • - -
  • -Set compression on.
  • - -
  • -Specify Setup.exe as the command line program to run when self-extraction -is complete. (No optional parameters are required.)
  • - -
  • -Specify any directory you want as the target directory.
  • - -
  • -Enter the name of your localized product as the application name.
  • - -
  • -Do not specify a password.
  • - -
  • -Once creation of your localized self-extracting installer is complete, -locate the file Setupex.exe in your target directory and rename it to something -meaningful.
  • -
-8. Complete post-translation processing -
After translation is complete, you need to test your work and deal -with any problems: -
    -
  • -Test the localized installer.
  • - -
  • -Fix translation bugs using your localization tools or a resource editor.
  • - -
  • -Fix dialog size bugs using your localization tools or a resource editor.
  • - -
  • -Report core bugs to Netscape.
  • -
-9. Publish your localized product to the Internet -
As the terms of the universal localization program license agreement -state, your localized product - -

"must be made publicly available in executable code form, -
free of charge, for electronic delivery via a mechanism -
generally accepted in the software development -
community." - -

In plain English, this means you should post your localized product -on a publicly accessible http: or ftp: server. You may also want to send -an announcement of your product's availability to mozilla.org (though you -are not required to do so). - -

-


-

-Product Branding Issues

-If you are using this kit under the auspices of the universal localization -program, you must remove or replace Netscape trademarked strings, images -and icons in your localized version. Click here -for instructions. - -

-


-

-How to Localize Different Resource Types

-This section provides you with general information about localizing the -various resource types and files found with this kit. -

-Localizing .INI Files

- -
    Most of the work for the Windows installers is localizing initialization -(.INI) files. You may use the text editor of your choice to do this work. -Be sure the localized files are saved as plain text only. -

    -Localization Notes

    -Individual localization notes for the installer .INI files are contained -in the individual HTML documents linked from the Localize -These Files page.
- -

-Localizing URLs

- -
    You will not likely encounter any URLs (Universal Resource Locators) -in the installers, but if you do, how they are localized depends on whether -you are creating a branded Netscape version or not. The rules for how to -handle URLs are found here.
- -

-Localizing String Tables

- -
    Use the resource editor of your choice to localize STRINGTABLE resources. -These are the most sensitive, potentially problematic resource type you -will be working with. Therefore, you must pay close attention to the instructions -provided in the localization notes. -

    -Localization Notes

    -Individual localization notes for the installer resource .DLLs are contained -in the individual HTML documents linked from the Localize -These Files page. This section gives you some additional general guidelines -to follow when localizing the installer binary files. -
      -
    • -Some strings may contain C++ print format strings, such as %s, %ld, %lu, -etc. Do not modify these while translating the rest of the string.
    • - -
    • -Some strings may contain new line characters: \n. In general, you should -try leave these as you find them.
    • -
    -
- -

-Localizing Menus

- -
    There are no menu resources in the Windows installer
- -

-Localizing Dialogs

- -
    Use the resource editor of your choice to localize and resize DIALOG -resources. Dialog translation is usually not as tricky as localizing string -tables; however, you should take care to assign unique pickletters to dialog -controls. -

    -Localization Notes

    -
- -
    Individual localization notes for the installer resource .DLLs are -contained in the individual HTML documents linked from the Localize -These Files page.
-  -
- - - - - - - -
-
[BACK]
-
-
[NEXT]
-
-
[CONTENTS]
-
- -
1998, Copyright Netscape -Communications Corp. All Rights Reserved
- - - diff --git a/l10nkits/client/windows/docs/nav40/SPLASH.JPG b/l10nkits/client/windows/docs/nav40/SPLASH.JPG deleted file mode 100644 index 37d129cb7e4..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/SPLASH.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/allxpstr.h b/l10nkits/client/windows/docs/nav40/allxpstr.h deleted file mode 100644 index 2753cf49937..00000000000 --- a/l10nkits/client/windows/docs/nav40/allxpstr.h +++ /dev/null @@ -1,7878 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -#if defined(FEATURE_CUSTOM_BRAND) -#include "xp_brand.h" -#else -#define MOZ_NAME_PRODUCT "Mozilla" -#define MOZ_NAME_BRAND "Mozilla" -#define MOZ_NAME_FULL "Mozilla Navigator" -#define MOZ_NAME_COMPANY "Netscape Communications Corp" -#endif /* FEATURE_CUSTOM_BRAND */ - - -/* -** Cross platform error codes. These are system errors, library errors, -** etc. The ranges of error messages are displayed in the following table: -** -** actual 7000 added category -** low high low high -** -12288 -12276 -5288 -5276 sslerr (Mac, Unix) -** -8192 -8171 -1192 -1171 secerr (Mac, Unix) -** -7000 -5700 0 1300 Win, Mac FE -** -4978 -4978 2022 2022 Mac FE -** -436 -204 6564 6796 merrors -** 0 160 7000 7160 xp_error (Mac, Unix) -** 1000 1048 8000 8048 Unix FE -** 10000 11004 17000 18004 xp_error (Win) -** 14000 14020 21000 21020 Mac FE -** 15000 25000 22000 32000 xp_msg (Win, Mac, Unix) -** 25769 27500 32769 34500 Win FE -** 50000 58000 57000 65000 secerr, sslerr (Win) -** -** Newbie NOTE: allxpstr.c and allxpstr.rc are exactly the same file. -** Edit only one and cvs update the other one. rc is for windows build. -** -*/ -#ifndef _ALLXPSTR_H_ -#define _ALLXPSTR_H_ - -#include "resdef.h" - -#define XP_MSG_BASE 15000 -#define SEC_DIALOG_STRING_BASE (XP_MSG_BASE + 8000) - - -/* WARNING: DO NOT TAKE ERROR CODE -666, it is used internally - by the message lib */ - - -/* from merrors.h */ -RES_START -BEGIN_STR(mcom_include_merrors_i_strings) - -/* #define MK_HTTP_TYPE_CONFLICT -204 */ -ResDef(MK_HTTP_TYPE_CONFLICT, -204, -"A communications error occurred.\n\ - (TCP Error: %s)\n\n\ -Try connecting again.") - -/* #define MK_BAD_CONNECT -205 */ -ResDef(MK_BAD_CONNECT, -205, -MOZ_NAME_BRAND" is unable to connect to the server at\n\ -the location you have specified. The server may\n\ -be down or busy.\n\n\ -Try connecting again later.") - -/* #define MK_TCP_ERROR -206 */ -ResDef(MK_TCP_ERROR, -206, -"A communications error occurred.\n\ - (TCP Error: %s)\n\n\ -Try connecting again.") - -#ifdef XP_MAC -/* #define MK_OUT_OF_MEMORY -207 */ -ResDef(MK_OUT_OF_MEMORY , -207, -MOZ_NAME_BRAND" is out of memory.\n\n\ -Try quitting "MOZ_NAME_PRODUCT" and increasing its minimum memory\n\ -requirements through Get Info.") -#else -ResDef(MK_OUT_OF_MEMORY , -207, -MOZ_NAME_BRAND" is out of memory.\n\n\ -Try quitting some other applications or closing\n\ -some windows.") - -#endif - - -/* #define MK_MALFORMED_URL_ERROR -209 */ -ResDef(MK_MALFORMED_URL_ERROR, -209, -"This Location (URL) is not recognized:\n\ - %.200s\n\n\ -Check the Location and try again.") - -/* #define MK_UNABLE_TO_USE_PASV_FTP -211 */ -ResDef(MK_UNABLE_TO_USE_PASV_FTP, -211, -"Unable to use FTP passive mode") - -/* #define MK_UNABLE_TO_CHANGE_FTP_MODE -212 */ -ResDef(MK_UNABLE_TO_CHANGE_FTP_MODE , -212, -MOZ_NAME_BRAND" is unable to set the FTP transfer mode with\n\ -this server. You will not be able to download files.\n\n\ -You should contact the administrator for this server\n\ -or try again later.") - - -/* #define MK_UNABLE_TO_FTP_CWD -213 */ -ResDef(MK_UNABLE_TO_FTP_CWD, -213, -MOZ_NAME_BRAND" is unable to send the change directory (cd)\n\ -command, to the FTP server. You cannot view another\n\ -directory.\n\n\ -You should contact the administrator for this server\n\ -or try again later.") - - -/* #define MK_UNABLE_TO_SEND_PORT_COMMAND -214 */ -ResDef(MK_UNABLE_TO_SEND_PORT_COMMAND, -214, -MOZ_NAME_BRAND" is unable to send a port command to the FTP\n\ -server to establish a data connection.\n\n\ -You should contact the administrator for this server\n\ -or try again later.") - - -/* #define MK_UNABLE_TO_LOCATE_FILE -215 */ -ResDef(MK_UNABLE_TO_LOCATE_FILE, -215, -MOZ_NAME_BRAND" is unable to find the file or directory named:\n\ - %.200s\n\n\ -Check the name and try again.") - - -/* #define MK_BAD_NNTP_CONNECTION -216 */ -ResDef(MK_BAD_NNTP_CONNECTION, -216, -"A News error occurred: Invalid NNTP connection\n\n\ -Try connecting again.") - -/* #define MK_NNTP_SERVER_ERROR -217 */ -ResDef(MK_NNTP_SERVER_ERROR, -217, -"An error occurred with the News server.\n\n\ -If you are unable to connect again, contact the\n\ -administrator for this server.") - -/* #define MK_SERVER_TIMEOUT -218 */ -ResDef(MK_SERVER_TIMEOUT, -218, -"There was no response. The server could be down\n\ -or is not responding.\n\n\ -If you are unable to connect again later, contact\n\ -the server's administrator.") - - -/* #define MK_UNABLE_TO_LOCATE_HOST -219 */ -ResDef(MK_UNABLE_TO_LOCATE_HOST, -219, -MOZ_NAME_BRAND" is unable to locate the server:\n\ - %.200s\n\ -The server does not have a DNS entry.\n\n\ -Check the server name in the Location (URL)\n\ -and try again.") - -/* #define MK_SERVER_DISCONNECTED -220 */ -ResDef(MK_SERVER_DISCONNECTED, -220, -"The server has disconnected.\n\ -The server may have gone down or there may be a\n\ -network problem.\n\n\ -Try connecting again.") - -/* #define MK_NEWS_ITEM_UNAVAILABLE -221 */ -ResDef(MK_NEWS_ITEM_UNAVAILABLE, -221, -"The Discussion item is unavailable. It may have expired.\n\n\ -Try retrieving another item.") - -/* #define MK_UNABLE_TO_OPEN_NEWSRC -222 */ -ResDef(MK_UNABLE_TO_OPEN_NEWSRC, -222, -MOZ_NAME_BRAND" is unable to open your News file (newsrc).\n\n\ -Please verify that your Mail and Groups preferences are\n\ -correct and try again.") - - -/* #define MK_UNABLE_TO_OPEN_FILE -223 */ -ResDef(MK_UNABLE_TO_OPEN_FILE, -223, -MOZ_NAME_BRAND" is unable to open the file:\n\ - %.200s\n\n\ -Check the file name and try again.") - -/* #define MK_TCP_WRITE_ERROR -236 */ -ResDef(MK_TCP_WRITE_ERROR, -236, -"A network error occurred while "MOZ_NAME_PRODUCT"\n\ -was sending data.\n(Network Error: %s)\n\n\ -Try connecting again.") - -/* #define MK_COULD_NOT_LOGIN_TO_SMTP_SERVER -229 */ -ResDef(MK_COULD_NOT_LOGIN_TO_SMTP_SERVER, -229, -"An error occurred sending mail:\n\ -"MOZ_NAME_PRODUCT" was unable to connect to the SMTP server.\n\ -The server may be down or may be incorrectly configured.\n\n\ -Please verify that your Mail preferences are correct\n\ -and try again.") - - -/* #define MK_ERROR_SENDING_FROM_COMMAND -230 */ -ResDef(MK_ERROR_SENDING_FROM_COMMAND, -230, -"An error occurred sending mail.\n\ -The mail server responded:\n\ - %s\n\ -Please verify that your email address is correct\n\ -in your Mail preferences and try again.") - - -/* #define MK_ERROR_SENDING_RCPT_COMMAND -231 */ -ResDef(MK_ERROR_SENDING_RCPT_COMMAND, -231, -"An error occurred sending mail.\n\ -The mail server responded:\n\ - %s\n\ -Please check the message recipients and try again.") - -/* #define MK_ERROR_SENDING_DATA_COMMAND -232 */ -ResDef(MK_ERROR_SENDING_DATA_COMMAND, -232, -"SMTP Error while sending mail.\nServer responded: %s") - -/* #define MK_ERROR_SENDING_MESSAGE -233 */ -ResDef(MK_ERROR_SENDING_MESSAGE, -233, -"An error occurred sending mail.\n\ -The mail server responded:\n\ - %s\n\ -Please check the message and try again.") - -/* #define MK_SMTP_SERVER_ERROR -234 */ -ResDef(MK_SMTP_SERVER_ERROR, -234, -"An error occurred sending mail: SMTP server error.\n\ -The server responded:\n\ - %s\n\ -Contact your mail administrator for assistance.") - -/* #define MK_UNABLE_TO_CONNECT -240 -- generic error -- */ -ResDef(MK_UNABLE_TO_CONNECT, -240, -"A network error occurred:\n\ -unable to connect to server (TCP Error: %s)\n\ -The server may be down or unreachable.\n\n\ -Try connecting again later.") - -/* #define MK_CONNECTION_TIMED_OUT -241 */ -ResDef(MK_CONNECTION_TIMED_OUT, -241, -"There was no response. The server could be down\n\ -or is not responding.\n\n\ -If you are unable to connect again later, contact\n\ -the server's administrator.") - -/* #define MK_CONNECTION_REFUSED -242 */ -ResDef(MK_CONNECTION_REFUSED, -242, -MOZ_NAME_BRAND"'s network connection was refused by the server:\n\ - %.200s\n\ -The server may not be accepting connections or\n\ -may be busy.\n\n\ -Try connecting again later.") - - -#ifdef XP_WIN -/* #define MK_UNABLE_TO_CREATE_SOCKET -243 */ -ResDef(MK_UNABLE_TO_CREATE_SOCKET , -243, -MOZ_NAME_BRAND" was unable to create a network socket connection.\n\ -There may be insufficient system resources or the network\n\ -may be down. (Reason: %s)\n\n\ -Try connecting again later or try restarting "MOZ_NAME_PRODUCT". You\n\ -can also try restarting Windows.") -#else -ResDef(MK_UNABLE_TO_CREATE_SOCKET , -243, -MOZ_NAME_BRAND" was unable to create a network socket connection.\n\ -There may be insufficient system resources or the network\n\ -may be down. (Reason: %s)\n\n\ -Try connecting again later or try restarting "MOZ_NAME_PRODUCT".") -#endif - - -#ifdef XP_WIN -/* #define MK_UNABLE_TO_ACCEPT_SOCKET -245 */ -ResDef(MK_UNABLE_TO_ACCEPT_SOCKET, -245, -MOZ_NAME_BRAND" is unable to complete a socket connection \n\ -with this server. There may be insufficient system\n\ -resources.\n\n\ -Try restarting "MOZ_NAME_PRODUCT" or restarting Windows.") -#else -/* #define MK_UNABLE_TO_ACCEPT_SOCKET -245 */ -ResDef(MK_UNABLE_TO_ACCEPT_SOCKET, -245, -MOZ_NAME_BRAND" is unable to complete a socket connection\n\ -with this server. There may be insufficient system\n\ -resources.\n\n\ -Try restarting "MOZ_NAME_PRODUCT".") -#endif - - -/* #define MK_UNABLE_TO_CONNECT_TO_PROXY -246 */ -ResDef(MK_UNABLE_TO_CONNECT_TO_PROXY, -246, -MOZ_NAME_BRAND" is unable to connect to your proxy server.\n\ -The server may be down or may be incorrectly configured.\n\n\ -Please verify that your Proxy preferences are correct\n\ -and try again, or contact the server's administrator.") - -/* #define MK_UNABLE_TO_LOCATE_PROXY -247 */ -ResDef(MK_UNABLE_TO_LOCATE_PROXY, -247, -MOZ_NAME_BRAND" is unable to locate your proxy server.\n\ -The server may be down or may be incorrectly configured.\n\n\ -Please verify that your Proxy preferences are correct\n\ -and try again, or contact the server's administrator.") - - - -/* #define MK_ZERO_LENGTH_FILE -251 */ -ResDef(MK_ZERO_LENGTH_FILE, -251, -"Document contains no data") - - -/* #define MK_TCP_READ_ERROR -252 */ -ResDef(MK_TCP_READ_ERROR , -252, -"A network error occurred while "MOZ_NAME_PRODUCT"\n\ -was receiving data.\n(Network Error: %s)\n\n\ -Try connecting again.") - - - -/* #define MK_UNABLE_TO_OPEN_TMP_FILE -253 */ -ResDef(MK_UNABLE_TO_OPEN_TMP_FILE, -253, -MOZ_NAME_BRAND" is unable to open the temporary file:\n\ - %.200s\n\n\ -Check your `Temporary Directory' setting and try again.") - -/* #define MK_COULD_NOT_GET_USERS_MAIL_ADDRESS -235 */ -ResDef(MK_COULD_NOT_GET_USERS_MAIL_ADDRESS, -235, -"An error occurred sending mail:\n\ -the return mail address was invalid.\n\n\ -Please verify that your email address is correct\n\ -in your Mail preferences and try again.") - -/* #define MK_DISK_FULL -250 */ -ResDef(MK_DISK_FULL, -250, -"The disk is full. "MOZ_NAME_PRODUCT" is cancelling the file\n\ -transfer and removing the file.\n\n\ -Please remove some files and try again.") - - -/* #define MK_NNTP_AUTH_FAILED -260 -- NNTP authinfo failure -- */ -ResDef(MK_NNTP_AUTH_FAILED, -260, -"An authorization error occurred:\n\n\ -%s\n\n\ -Please try entering your name and/or password again.") - -/* #define MK_MIME_NO_SENDER -266 */ -ResDef(MK_MIME_NO_SENDER, -266, /* From: empty */ -"No sender was specified.") - -/* #define MK_MIME_NO_RECIPIENTS -267 */ -ResDef(MK_MIME_NO_RECIPIENTS, -267, /* To: and Newsgroups: empty */ -"No recipients were specified.") - -/* #define MK_MIME_NO_SUBJECT -268 */ -ResDef(MK_MIME_NO_SUBJECT, -268, /* Subject: empty */ -"No subject was specified.") - -/* #define MK_MIME_ERROR_WRITING_FILE -269 */ -ResDef(MK_MIME_ERROR_WRITING_FILE, -269, -"Error writing temporary file.") - -/* #define MK_MIME_MULTIPART_BLURB -275 */ -ResDef(MK_MIME_MULTIPART_BLURB, -275, /* text preceding multiparts */ -"This is a multi-part message in MIME format.") - -/* #define MK_PRINT_LOSSAGE -278 */ -ResDef(MK_PRINT_LOSSAGE, -278, -"Printing stopped. A problem occurred while receiving\n\ -the document. Transmission may have been interrupted\n\ -or there may be insufficient space to write the file.\n\n\ -Try again. Check that space is available in the\n\ -temporary directory or restart "MOZ_NAME_PRODUCT".") - -/* #define MK_SIGNATURE_TOO_LONG -279 */ -ResDef(MK_SIGNATURE_TOO_LONG, -279, -"Your signature exceeds the recommended four lines.") - -/* #define MK_SIGNATURE_TOO_WIDE -280 */ -ResDef(MK_SIGNATURE_TOO_WIDE, -280, -"Your signature exceeds the recommended 79 columns.\n\ -For most readers, the lines will appear truncated, or\n\ -will be wrapped unattractively. \n\n\ -Please edit it to keep the lines shorter than 80 characters.") - -ResDef(MK_UNABLE_TO_CONNECT2, -281, -"A network error occurred:\n\ - unable to connect to server\n\ -The server may be down or unreachable.\n\n\ -Try connecting again later.") - -/* #define MK_CANT_LOAD_HELP_TOPIC -282 */ -ResDef(MK_CANT_LOAD_HELP_TOPIC, -282, -"Unable to load the requested help topic") - -/* #define MK_TIMEBOMB_MESSAGE -301 */ -ResDef(MK_TIMEBOMB_MESSAGE, -301, -"This copy of "MOZ_NAME_PRODUCT" has expired.\n\ -This pre-release copy of "MOZ_NAME_FULL" has expired\n\ -and can only be used to download a newer version of "MOZ_NAME_PRODUCT".") - -/* #define MK_TIMEBOMB_URL_PROHIBIT -302 */ -ResDef(MK_TIMEBOMB_URL_PROHIBIT, -302, -"This trial or pre-release copy of "MOZ_NAME_FULL" has expired\n\ -and can only be used to purchase or download a newer version of "MOZ_NAME_PRODUCT".") - -/* #define MK_NO_WAIS_PROXY -303 */ -ResDef(MK_NO_WAIS_PROXY, -303, -"No WAIS proxy is configured.\n\n\ -Check your Proxy preferences and try again.") - -/* #define MK_NNTP_ERROR_MESSAGE -304 */ -ResDef(MK_NNTP_ERROR_MESSAGE, -304, -"A News (NNTP) error occurred:\n\ - %.100s") - -/* #define MK_NNTP_NEWSGROUP_SCAN_ERROR -305 */ -ResDef(MK_NNTP_NEWSGROUP_SCAN_ERROR, -305, -"A News error occurred. The scan of all discussion groups is incomplete.\n\ - \n\ -Try to View All Discussion Groups again.") - -/* #define MK_CREATING_NEWSRC_FILE -306 */ -ResDef(MK_CREATING_NEWSRC_FILE, -306, -MOZ_NAME_BRAND" could not find a News file (newsrc)\n\ -and is creating one for you.") - -/* #define MK_NNTP_SERVER_NOT_CONFIGURED -307 */ -ResDef(MK_NNTP_SERVER_NOT_CONFIGURED,-307, -"No NNTP server is configured.\n\n\ -Check your Mail and Groups preferences and try again.") - -/* #define MK_COMMUNICATIONS_ERROR -308 */ -ResDef(MK_COMMUNICATIONS_ERROR, -308, -"Communications exception (%d).") - - -/* #define MK_SECURE_NEWS_PROXY_ERROR -309 */ -ResDef(MK_SECURE_NEWS_PROXY_ERROR, -309, -MOZ_NAME_BRAND" was unble to connect to the secure news server\n\ -because of a proxy error") - - -/* #define MK_POP3_SERVER_ERROR -311 generic pop3 error code */ -ResDef(MK_POP3_SERVER_ERROR, -311, -"An error occurred with the POP3 server.\n\ -You should contact the administrator for this server\n\ -or try again later.") - -/* #define MK_POP3_USERNAME_UNDEFINED -312 no username defined */ -ResDef(MK_POP3_USERNAME_UNDEFINED, -312, -MOZ_NAME_BRAND" is unable to use the mail server because\n\ -you have not provided a username. Please provide\n\ -one in the preferences and try again") - -/* #define MK_POP3_PASSWORD_UNDEFINED -313 no password defined */ -ResDef(MK_POP3_PASSWORD_UNDEFINED, -313, -"Error getting mail password.") - -/* #define MK_POP3_USERNAME_FAILURE -314 failure in USER step */ -ResDef(MK_POP3_USERNAME_FAILURE, -314, -"An error occurred while sending your user name to the mail server.\n\ -You should contact the administrator for this server\n\ -or try again later.") - -/* #define MK_POP3_PASSWORD_FAILURE -315 failure in PASS step */ -ResDef(MK_POP3_PASSWORD_FAILURE, -315, -"An error occurred while sending your password to the mail server.\n\ -You should contact the administrator for this server\n\ -or try again later.") - -/* #define MK_POP3_NO_MESSAGES -316 no mail messages on pop server */ -ResDef(MK_POP3_NO_MESSAGES, -316, -"No new messages on server") - -/* #define MK_POP3_LIST_FAILURE -317 LIST command failed */ -ResDef(MK_POP3_LIST_FAILURE, -317, -"An error occurred while listing messages on the POP3 server.\n\ -You should contact the administrator for this server\n\ -or try again later.") - -/* #define MK_POP3_LAST_FAILURE -318 LAST command failed */ -ResDef(MK_POP3_LAST_FAILURE, -318, -"An error occurred while querying the POP3 server for\n\ -the last processed message.\n\ -You should contact the administrator for this server\n\ -or try again later.") - - -/* #define MK_POP3_RETR_FAILURE -319 RETR command failed, continues */ -ResDef(MK_POP3_RETR_FAILURE, -319, -"An error occurred while getting messages from the POP3 server.\n\ -You should contact the administrator for this server\n\ -or try again later.") - -/* #define MK_POP3_DELE_FAILURE -320 DELE command failed */ -ResDef(MK_POP3_DELE_FAILURE, -320, -"An error occurred while removing messages from the POP3 server.\n\ -You should contact the administrator for this server\n\ -or try again later.") - -/* #define MK_POP3_OUT_OF_DISK_SPACE -321 */ -ResDef(MK_POP3_OUT_OF_DISK_SPACE, -321, -"There isn't enough room on the local disk to download\n\ -your mail from the POP3 server. Please make room and\n\ -try again. (The `Empty Trash' and `Compress This Folder'\n\ -commands may recover some space.)") - -/* #define MK_POP3_MESSAGE_WRITE_ERROR -322 */ -ResDef(MK_POP3_MESSAGE_WRITE_ERROR, -322, -"An error occurred while saving mail messages.") - - -/* #define MK_COULD_NOT_PUT_FILE -325 FTP could not put file */ -ResDef(MK_COULD_NOT_PUT_FILE, -325, -"Could not post the file: %.80s.\n\ -For reason:\n\ - %.200s\n\n\ -You may not have permission to write to\n\ -this directory.\n\ -Check the permissions and try again.") - -/* #define MK_TIMEBOMB_WARNING_MESSAGE -326 */ -ResDef(MK_TIMEBOMB_WARNING_MESSAGE, -326, -"This is a pre-release copy of "MOZ_NAME_FULL" that\n\ -will expire at %s.\n\ -To obtain a newer pre-release version or the latest full\n\ -release of "MOZ_NAME_FULL" (which will not expire) \n\ -choose Software from the Help menu.") - -/* #define MK_UNABLE_TO_DELETE_FILE */ -ResDef(MK_UNABLE_TO_DELETE_FILE, -327, -"Could not delete file:\n\ - %s") - -/* #define MK_UNABLE_TO_DELETE_DIRECTORY */ -ResDef(MK_UNABLE_TO_DELETE_DIRECTORY, -328, -"Could not remove directory:\n\ - %s") - -/* #define MK_MKDIR_FILE_ALREADY_EXISTS */ -ResDef(MK_MKDIR_FILE_ALREADY_EXISTS, -329, -"Cannot create directory because a file or\n\ -directory of that name already exists: \n\ - %s") - -/* #define MK_COULD_NOT_CREATE_DIRECTORY */ -ResDef(MK_COULD_NOT_CREATE_DIRECTORY, -330, -"Could not create directory:\n\ - %s") - -/* #define MK_NOT_A_DIRECTORY */ -ResDef(MK_NOT_A_DIRECTORY, -331, -"Object is not a directory:\n\ - %s") - -/* define MK_COMPUSERVE_AUTH_FAILED -332 */ -ResDef(MK_COMPUSERVE_AUTH_FAILED, -332, -"Authorization failed") - -/* #define MK_RELATIVE_TIMEBOMB_MESSAGE -333 */ -ResDef(MK_RELATIVE_TIMEBOMB_MESSAGE, -333, -"This trial copy of "MOZ_NAME_PRODUCT" has expired.\n\n\ -To purchase a regular copy of "MOZ_NAME_FULL"\n(\ -which will not expire) choose Software from the Help menu.") - -/* #define MK_RELATIVE_TIMEBOMB_WARNING_MESSAGE -334 */ -ResDef(MK_RELATIVE_TIMEBOMB_WARNING_MESSAGE, -334, -"This trial copy of "MOZ_NAME_FULL" \n\ -will expire at %s.\n\n\ -To purchase a regular copy of "MOZ_NAME_FULL"\n(\ -which will not expire) choose Software from the Help menu.") - -/* #define MK_REDIRECT_ATTEMPT_NOT_ALLOWED -335 */ -ResDef(MK_REDIRECT_ATTEMPT_NOT_ALLOWED, -335, -"There was an attempt to redirect a url request,\n\ -but the attempt was not allowed by the client.") - -/* #define MK_BAD_GZIP_HEADER -336 */ -ResDef(MK_BAD_GZIP_HEADER, -336, -"Corruption was detected in the compressed GZip file that was requested") - -/* Mail/News errors */ - -ResDef(MK_MSG_CANT_COPY_TO_SAME_FOLDER, -401, - "Can't move or copy messages to the folder they're already in.") - -#ifdef XP_WIN16 -ResDef(MK_MSG_CANT_COPY_TO_QUEUE_FOLDER, -402, - "Cannot copy messages into the 'Unsent' folder:\n\ -That folder is only for holding messages which\n\ -have been deferred for later delivery.") -#else -ResDef(MK_MSG_CANT_COPY_TO_QUEUE_FOLDER, -402, - "Cannot copy messages into the 'Unsent Messages' folder:\n\ -That folder is only for holding messages which\n\ -have been deferred for later delivery.") -#endif - -ResDef(MK_MSG_CANT_COPY_TO_DRAFTS_FOLDER, -403, - "Cannot copy messages into the `unsent drafts' folder:\n\ -That folder is only for holding messages which have\n\ -have not yet been queued delivery.") - -ResDef(MK_MSG_CANT_CREATE_FOLDER, -404, - "Couldn't create the folder!") - -ResDef(MK_MSG_FOLDER_ALREADY_EXISTS, -405, - "The folder already exists.") - -ResDef(MK_MSG_FOLDER_NOT_EMPTY, -406, - "Can't delete a folder without first deleting the messages in it.") - -ResDef(MK_MSG_CANT_DELETE_FOLDER, -407, - "Can't delete a folder without first deleting the messages in it.") - -ResDef(MK_MSG_CANT_CREATE_INBOX, -408, - "Couldn't create default inbox folder!") - -ResDef(MK_MSG_CANT_CREATE_MAIL_DIR, -409, - "Couldn't create a mail folder directory. Mail will not work!") - -ResDef(MK_MSG_NO_POP_HOST, -410, - "No mail server has been specified in preferences.") - -ResDef(MK_MSG_MESSAGE_CANCELLED, -414, - "Message cancelled.") - -ResDef(MK_MSG_COULDNT_OPEN_FCC_FILE, -415, - "Couldn't open Sent Mail file. \n\ - Please verify that your Mail preferences are correct.") - -ResDef(MK_MSG_FOLDER_UNREADABLE, -416, - "Folder no longer exists?") - -ResDef(MK_MSG_FOLDER_SUMMARY_UNREADABLE, -417, - "Folder summary file no longer exists?") - -ResDef(MK_MSG_TMP_FOLDER_UNWRITABLE, -418, - "Couldn't open temporary folder file for output.") - -ResDef(MK_MSG_ID_NOT_IN_FOLDER, -419, - "The specified message doesn't exist in that folder.\n\ -It may have been deleted or moved into another folder.") - -ResDef(MK_MSG_NEWSRC_UNPARSABLE, -420, - "A newsrc file exists but is unparsable.") - -ResDef(MK_MSG_NO_RETURN_ADDRESS, -421, - "Your email address has not been specified.\n\ -Before sending mail or discussion messages, you must specify a\n\ -return address in Mail and Groups Preferences.") - -#if 0 -/* Windows and Mac resource only understand 254 chars per string */ -ResDef(MK_MSG_NO_RETURN_ADDRESS_AT, -421, - "The return email address set in Preferences is: %s\n\ -\n\ -This does not appear to be complete (it contains no `@' and host name.)\n\ -A valid email address will be of the form `USER@HOST', where USER is\n\ -usually your login ID, and HOST is the fully-specified name of the\n\ -machine to which your mail should be delivered. A fully-specified host\n\ -name will have at least one `.' in it, and will usually end in `.com',\n\ -`.edu', `.net', or a two-letter country code. If you are unsure what\n\ -your full email address is, please consult your system administrator.") - -/* Windows and Mac resource only understand 254 chars per string */ -ResDef(MK_MSG_NO_RETURN_ADDRESS_DOT, -422, - "The return email address set in Preferences is: %s\n\ -\n\ -This does not appear to be complete (it contains no `.' in the host name.)\n\ -A valid email address will be of the form `USER@HOST', where USER is\n\ -usually your login ID, and HOST is the fully-specified name of the\n\ -machine to which your mail should be delivered. A fully-specified host\n\ -name will have at least one `.' in it, and will usually end in `.com',\n\ -`.edu', `.net', or a two-letter country code. If you are unsure what\n\ -your full email address is, please consult your system administrator.") -#else -ResDef(MK_MSG_NO_RETURN_ADDRESS_AT, -423, - "The return email address set in Preferences is: %s\n\ -\n\ -This appears to be incomplete (it contains no `@'). Examples of\n\ -correct email addresses are `fred@xyz.com' and `sue@xyz.gov.au'.") - -ResDef(MK_MSG_NO_RETURN_ADDRESS_DOT, -424, - "The return email address set in Preferences is: %s\n\ -\n\ -This appears to be incomplete (it contains no `.'). Examples of\n\ -correct email addresses are `fred@xyz.com' and `sue@xyz.gov.au'.") -#endif - -ResDef(MK_MSG_NO_SMTP_HOST,-425, - "No SMTP server has been specified in Mail and Groups Preferences.") - -ResDef(MK_NNTP_CANCEL_CONFIRM, -426, - "Are you sure you want to cancel this message?") - -ResDef(MK_NNTP_CANCEL_DISALLOWED, -427, - "This message does not appear to be from you.\n\ -You may only cancel your own posts, not those made by others.") - -ResDef(MK_NNTP_CANCEL_ERROR, -428, - "Unable to cancel message!") - -ResDef(MK_NNTP_NOT_CANCELLED, -429, - "Message not cancelled.") - -ResDef(MK_NEWS_ERROR_FMT, -430, - "Error!\nDiscussion group server responded: %.512s\n") - - -ResDef(MK_MSG_NON_MAIL_FILE_READ_QUESTION, -431, - "%.300s does not appear to be a mail file.\n\ -Attempt to read it anyway?") - -ResDef(MK_MSG_NON_MAIL_FILE_WRITE_QUESTION, -432, - "%.300s does not appear to be a mail file.\n\ -Attempt to write it anyway?") - -ResDef(MK_MSG_ERROR_WRITING_NEWSRC, -433, - "Error saving newsrc file!") - -ResDef(MK_MSG_ERROR_WRITING_MAIL_FOLDER, -434, - "Error writing mail file!") - -ResDef(MK_MSG_OFFER_COMPRESS, -435, - "At least one of your mail folders is wasting a lot\n\ -of disk space. If you compress your Mail folders now,\n\ -you can recover %ld Kbytes of disk space. Compressing\n\ -folders might take a while.\n\ -\n\ -Compress folders now?") - -ResDef(MK_MSG_SEARCH_FAILED, -436, - "Not found.") - -ResDef(MK_MSG_EMPTY_MESSAGE, -437, - "You haven't typed anything, and there is no attachment.\n\ -Send anyway?") - -ResDef(MK_MSG_DOUBLE_INCLUDE, -438, - "You have included the same document twice: first as a quoted\n\ -document (meaning: with '>' at the beginning of each line), and\n\ -then as an attachment (meaning: as a second part of the message,\n\ -included after your new text).\n\ -\n\ -Send it anyway?") - -#ifdef XP_WIN16 -ResDef(MK_MSG_DELIVERY_FAILURE_1, -439, - "Delivery failed for 1 message.\n\n\ -This message has been left in the Unsent folder.\n\ -Before it can be delivered, the error must be\n\ -corrected.") - -ResDef(MK_MSG_DELIVERY_FAILURE_N, -440, - "Delivery failed for %d messages.\n\n\ -These messages have been left in the Unsent folder.\n\ -Before they can be delivered, the errors must be\n\ -corrected.") -#else -ResDef(MK_MSG_DELIVERY_FAILURE_1, -439, - "Delivery failed for 1 message.\n\n\ -This message has been left in the Unsent Messages folder.\n\ -Before it can be delivered, the error must be\n\ -corrected.") - -ResDef(MK_MSG_DELIVERY_FAILURE_N, -440, - "Delivery failed for %d messages.\n\n\ -These messages have been left in the Unsent Messages folder.\n\ -Before they can be delivered, the errors must be\n\ -corrected.") -#endif - - -ResDef(MK_MSG_MISSING_SUBJECT, -441, - "This message has no subject. Send anyway?") - -ResDef(MK_MSG_MIXED_SECURITY, -442, - "It will not be possible to send this message encrypted to all of the\n\ -addressees. Send it anyway?") - -ResDef (MK_MSG_CAN_ONLY_DELETE_MAIL_FOLDERS, -443, - "Can only delete mail folders.") - -ResDef(MK_MSG_FOLDER_BUSY, -444, -"Can't copy messages because the mail folder is in use.\n\ -Please wait until other copy operations are \n\ -complete and try again.\n" ) - -ResDef(MK_MSG_PANES_OPEN_ON_FOLDER, -445, -"Can't delete message folder '%s\' because you are viewing\n\ -its contents. Please close those windows and try again.") - -ResDef(MK_MSG_INCOMPLETE_NEWSGROUP_LIST, -446, -"The complete list of discussion groups was not retrieved for\n\ -this discussion group server. Operations will not proceed normally\n\ -until all discussion groups have been retrieved.\n\ -\n\ -Click on the 'All Groups' tab to continue retrieving\n\ -discussion groups.") - -ResDef(MK_MSG_ONLINE_IMAP_WITH_NO_BODY, -447, -"This IMAP message cannot be moved while offline. It has no attached body.") - -ResDef(MK_MSG_ONLINE_COPY_FAILED, -448, -"The IMAP message copy failed. A source message was not found.") - -ResDef(MK_MSG_ONLINE_MOVE_FAILED, -449, -"The IMAP message move failed.\n\ -The copy succeeded but a source message was not deleted.") - -ResDef(MK_MSG_CONFIRM_CONTINUE_IMAP_SYNC, -450, -"A playback operation failed. Continue?\n") - -ResDef(MK_MSG_CANT_MOVE_INBOX, -451, -"You cannot move your Inbox Folder.") - -ResDef(MK_MSG_CANT_FIND_SNM, -452, -"Could not find the summary information\n\ - for the %s IMAP folder.") - -ResDef(MK_MSG_NO_UNDO_DURING_IMAP_FOLDER_LOAD, -453, -"You cannot undo or redo a folder action while\n\ - the folder is loading.") - -ResDef(MK_MSG_MOVE_TARGET_NO_INFERIORS, -454, -"The targeted destination folder does not allow subfolders.") - -ResDef(MK_MSG_PARENT_TARGET_NO_INFERIORS, -455, -"The selected parent folder does not allow subfolders.\n\ - Try selecting the server folder and typing\n\ - 'parent/newFolder' to create a new hierarchy.") - -ResDef(MK_MSG_COPY_TARGET_NO_SELECT, -456, -"The targeted destination folder cannot hold messages.") - -ResDef(MK_MSG_TRASH_NO_INFERIORS, -457, -"This mail server cannot undo folder deletes, delete anyway?") - -ResDef(MK_MSG_CANT_COPY_TO_QUEUE_FOLDER_OLD, -458, - "Cannot copy messages into the 'Outbox' folder:\n\ -That folder is only for holding messages which\n\ -have been deferred for later delivery.") - -ResDef(MK_MSG_DELIVERY_FAILURE_1_OLD, -459, - "Delivery failed for 1 message.\n\n\ -This message has been left in the Outbox folder.\n\ -Before it can be delivered, the error must be\n\ -corrected.") - -ResDef(MK_MSG_DELIVERY_FAILURE_N_OLD, -460, - "Delivery failed for %d messages.\n\n\ -These messages have been left in the Outbox folder.\n\ -Before they can be delivered, the errors must be\n\ -corrected.") - -ResDef(MK_MSG_NO_MAIL_TO_NEWS, -461, - "You can't move a mail folder into a discussion group.") - -ResDef(MK_MSG_NO_NEWS_TO_MAIL, -462, - "You can't move a discussion group into a mail folder.") - -ResDef(MK_MSG_BOGUS_SERVER_MAILBOX_UID_STATE, -463, - "Mail Server Problem: The UID's for the messages in this\n\ - folder are not increasing. Contact your sysadmin.") - -ResDef(MK_MSG_IMAP_SERVER_NOT_IMAP4, -464, - "This mail server is not an IMAP4 mail server.") - -ResDef(MK_MSG_HTML_IMAP_NO_CACHED_BODY, -465, -"IMAP Go Online!\n\ -The body of this message has not been downloaded from \n\ -the server for reading offline. To read this message \n\ -you must first go online using the 'Go Online' menu item \n\ -in the File menu and view the message again.") - -ResDef(MK_MSG_COMPRESS_FAILED, -466, - "Compress failed.") - -ResDef(MK_MSG_LOTS_NEW_IMAP_FOLDERS, -467, -"At least 30 new IMAP folders have been found.\n\ -\n\ -Press to continue or to change\n\ -the IMAP server directory.") - -ResDef(MK_MSG_IMAP_DIR_PROMPT, -468, - "Enter IMAP server directory name.") - -ResDef(MK_MSG_NO_POST_TO_DIFFERENT_HOSTS_ALLOWED, -469, -"Posting to discussion groups on different hosts is not supported.") - -ResDef(MK_MSG_CANT_MOVE_OFFLINE_MOVE_RESULT, -470, -"This message was moved here while offline. You have to \n\ -go online to move it again.") - -ResDef(MK_MSG_SEARCH_HITS_NOT_IN_DB, -471, -"This IMAP folder is out of date. Open it again for a more complete search.") - -ResDef(MK_MSG_MAIL_DIRECTORY_CHANGED, -472, -"Your new mail directory preference\n\ -will take effect the next time\n\ -you restart Communicator.") - -END_STR(mcom_include_merrors_i_strings) - -/* WARNING: DO NOT TAKE ERROR CODE -666, it is used internally - by the message lib */ - - -/* General security error codes */ - -#define NO_SECURITY_ERROR_ENUM -#include "secerr.h" - -RES_START -BEGIN_STR(mcom_include_secerr_i_strings) - -ResDef(SEC_ERROR_IO, SEC_ERROR_BASE + 0, -"An I/O error occurred during security authorization.\n\ -Please try your connection again") - -ResDef(SEC_ERROR_LIBRARY_FAILURE, SEC_ERROR_BASE + 1, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_BAD_DATA, SEC_ERROR_BASE + 2, -"The security library has received bad data.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_OUTPUT_LEN, SEC_ERROR_BASE + 3, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_INPUT_LEN, SEC_ERROR_BASE + 4, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_INVALID_ARGS, SEC_ERROR_BASE + 5, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_INVALID_ALGORITHM, SEC_ERROR_BASE + 6, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_INVALID_AVA, SEC_ERROR_BASE + 7, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_INVALID_TIME, SEC_ERROR_BASE + 8, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_BAD_DER, SEC_ERROR_BASE + 9, -"The security library has encountered an improperly formatted\n\ -DER-encoded message.") - -ResDef(SEC_ERROR_BAD_SIGNATURE, SEC_ERROR_BASE + 10, -"The server's certificate has an invalid signature.\n\ -You will not be able to connect to this site securely.") - -ResDef(SEC_ERROR_EXPIRED_CERTIFICATE, SEC_ERROR_BASE + 11, -"This operation cannot be performed because a required\n\ -certificate has expired. Click on the `Security' icon\n\ -for more information about certificates.") - -ResDef(SEC_ERROR_REVOKED_CERTIFICATE, SEC_ERROR_BASE + 12, -"This operation cannot be performed because a required\n\ -certificate has been revoked. Click on the `Security'\n\ -icon for more information about certificates.") - -ResDef(SEC_ERROR_UNKNOWN_ISSUER, SEC_ERROR_BASE + 13, -"The certificate issuer for this server is not recognized by\n\ -"MOZ_NAME_PRODUCT". The security certificate may or may not be valid.\n\n\ -"MOZ_NAME_PRODUCT" refuses to connect to this server.") - -ResDef(SEC_ERROR_BAD_KEY, SEC_ERROR_BASE + 14, -"The server's public key is invalid.\n\ -You will not be able to connect to this site securely.") - -ResDef(SEC_ERROR_BAD_PASSWORD, SEC_ERROR_BASE + 15, -"The security password entered is incorrect.") - -ResDef(SEC_ERROR_RETRY_PASSWORD, SEC_ERROR_BASE + 16, -"You did not enter your new password correctly. Please try again.") - -ResDef(SEC_ERROR_NO_NODELOCK, SEC_ERROR_BASE + 17, -"The security library has experienced an error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_BAD_DATABASE, SEC_ERROR_BASE + 18, -"The security library has experienced a database error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_NO_MEMORY, SEC_ERROR_BASE + 19, -"The security library has experienced an out of memory error.\n\ -Please try to reconnect.") - -ResDef(SEC_ERROR_UNTRUSTED_ISSUER, SEC_ERROR_BASE + 20, -"The certificate issuer for this server has been marked as\n\ -not trusted by the user. "MOZ_NAME_PRODUCT" refuses to connect to this\n\ -server.") - -ResDef(SEC_ERROR_UNTRUSTED_CERT, SEC_ERROR_BASE + 21, -"The certificate for this server has been marked as not\n\ -trusted by the user. "MOZ_NAME_PRODUCT" refuses to connect to this\n\ -server.") - -ResDef(SEC_ERROR_DUPLICATE_CERT, (SEC_ERROR_BASE + 22), -"The Certificate that you are trying to download\n\ -already exists in your database.") - -ResDef(SEC_ERROR_DUPLICATE_CERT_NAME, (SEC_ERROR_BASE + 23), -"You are trying to download a certificate whose name\n\ -is the same as one that already exists in your database.\n\ -If you want to download the new certificate you should\n\ -delete the old one first.") - -ResDef(SEC_ERROR_ADDING_CERT, (SEC_ERROR_BASE + 24), -"Error adding certificate to your database") - -ResDef(SEC_ERROR_FILING_KEY, (SEC_ERROR_BASE + 25), -"Error refiling the key for this certificate") - -ResDef(SEC_ERROR_NO_KEY, (SEC_ERROR_BASE + 26), -"The Private Key for this certificate can\n\ -not be found in your key database") - -ResDef(SEC_ERROR_CERT_VALID, (SEC_ERROR_BASE + 27), -"This certificate is valid.") - -ResDef(SEC_ERROR_CERT_NOT_VALID, (SEC_ERROR_BASE + 28), -"This certificate is not valid.") - -ResDef(SEC_ERROR_CERT_NO_RESPONSE, (SEC_ERROR_BASE + 29), -"No Response") - -ResDef(SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE, (SEC_ERROR_BASE + 30), -"The certificate authority that issued this site's\n\ -certificate has expired.\n\ -Check your system date and time.") - -ResDef(SEC_ERROR_CRL_EXPIRED, (SEC_ERROR_BASE + 31), -"The certificate revocation list for this certificate authority\n\ -that issued this site's certificate has expired.\n\ -Reload a new certificate revocation list or check your system data and time.") - -ResDef(SEC_ERROR_CRL_BAD_SIGNATURE, (SEC_ERROR_BASE + 32), -"The certificate revocation list for this certificate authority\n\ -that issued this site's certificate has an invalid signature.\n\ -Reload a new certificate revocation list.") - -ResDef(SEC_ERROR_CRL_INVALID, (SEC_ERROR_BASE + 33), -"The certificate revocation list you are trying to load has\n\ -an invalid format.") - -ResDef(SEC_ERROR_EXTENSION_VALUE_INVALID,(SEC_ERROR_BASE + 34), -"Extension value is invalid.") - -ResDef(SEC_ERROR_EXTENSION_NOT_FOUND,(SEC_ERROR_BASE + 35), -"Extension not found.") - -ResDef(SEC_ERROR_CA_CERT_INVALID,(SEC_ERROR_BASE + 36), -"Issuer certificate is invalid.") - - -ResDef(SEC_ERROR_PATH_LEN_CONSTRAINT_INVALID,(SEC_ERROR_BASE + 37), -"Certificate path length constraint is invalid.") - -ResDef(SEC_ERROR_CERT_USAGES_INVALID,(SEC_ERROR_BASE + 38), -"Certificate usages is invalid.") - -ResDef(SEC_INTERNAL_ONLY, (SEC_ERROR_BASE + 39), -"**Internal ONLY module**") - -ResDef(SEC_ERROR_INVALID_KEY, (SEC_ERROR_BASE + 40), -"The system tried to use a key which does not support\n\ -the requested operation.") - -ResDef(SEC_ERROR_UNKNOWN_CRITICAL_EXTENSION,(SEC_ERROR_BASE + 41), -"Certificate contains unknown critical extension.") - -ResDef(SEC_ERROR_OLD_CRL, (SEC_ERROR_BASE + 42), -"The certificate revocation list you are trying to load is not\n\ -later than the current one.") - -ResDef(SEC_ERROR_NO_EMAIL_CERT, (SEC_ERROR_BASE + 43), -"This message cannot be encrypted or signed because you do not\n\ -yet have an email certificate. Click on the `Security' icon for more\n\ -information about certificates.") - -ResDef(SEC_ERROR_NO_RECIPIENT_CERTS_QUERY, (SEC_ERROR_BASE + 44), -"This message cannot be encrypted because you do not have\n\ -certificates for each of the recipients. Clicking on the\n\ -`Security' icon will give you more information.\n\ -\n\ -Turn off encryption and send the message anyway?") - -ResDef(SEC_ERROR_NOT_A_RECIPIENT, (SEC_ERROR_BASE + 45), -"The data cannot be decrypted because you are not a recipient;\n\ -either it was not intended for you, or a matching certificate or\n\ -Private Key cannot be found in your local database.") - -ResDef(SEC_ERROR_PKCS7_KEYALG_MISMATCH, (SEC_ERROR_BASE + 46), -"The data cannot be decrypted because the key encryption\n\ -algorithm it used does not match that of your certificate.") - -ResDef(SEC_ERROR_PKCS7_BAD_SIGNATURE, (SEC_ERROR_BASE + 47), -"Signature verification failed due to no signer found,\n\ -too many signers found, or improper or corrupted data.") - -ResDef(SEC_ERROR_UNSUPPORTED_KEYALG, (SEC_ERROR_BASE + 48), -"An unsupported or unknown key algorithm was encountered;\n\ -the current operation cannot be completed.") - -ResDef(SEC_ERROR_DECRYPTION_DISALLOWED, (SEC_ERROR_BASE + 49), -"The data cannot be decrypted because it was encrypted using an\n\ -algorithm or key size which is not allowed by this configuration.") - - -#ifdef FORTEZZA -/* Fortezza Alerts */ -ResDef(XP_SEC_FORTEZZA_BAD_CARD, (SEC_ERROR_BASE + 50), -"The Fortezza Card in Socket %d has not been properly initialized.\ - Please remove it and return it to your issuer.") - -ResDef(XP_SEC_FORTEZZA_NO_CARD, (SEC_ERROR_BASE + 51), -"No cards Found") - -ResDef(XP_SEC_FORTEZZA_NONE_SELECTED, (SEC_ERROR_BASE + 52), -"No Card Selected") - -ResDef(XP_SEC_FORTEZZA_MORE_INFO, (SEC_ERROR_BASE + 53), -"Please Select a personality to get more info on") - -ResDef(XP_SEC_FORTEZZA_PERSON_NOT_FOUND, (SEC_ERROR_BASE + 54), -"Personality not found") - -ResDef(XP_SEC_FORTEZZA_NO_MORE_INFO, (SEC_ERROR_BASE + 55), -"No more information on that Personality") - -ResDef(XP_SEC_FORTEZZA_BAD_PIN, (SEC_ERROR_BASE + 56), -"Invalid Pin") - -ResDef(XP_SEC_FORTEZZA_PERSON_ERROR, (SEC_ERROR_BASE + 57), -"Couldn't initialize personalities") -#endif /* FORTEZZA */ - -ResDef(SEC_ERROR_NO_KRL, (SEC_ERROR_BASE + 58), -"No key revocation list for this site's certificate has been found.\n\ -You must load the key revocation list before continuing.") - -ResDef(SEC_ERROR_KRL_EXPIRED, (SEC_ERROR_BASE + 59), -"The key revocation list for this site's certificate has expired.\n\ -Reload a new key revocation list.") - -ResDef(SEC_ERROR_KRL_BAD_SIGNATURE, (SEC_ERROR_BASE + 60), -"The key revocation list for this site's certificate has an invalid signature.\n\ -Reload a new key revocation list.") - -ResDef(SEC_ERROR_REVOKED_KEY, (SEC_ERROR_BASE + 61), -"The key for this site's certificate has been revoked.\n\ -You will be unable to access this site securely.") - -ResDef(SEC_ERROR_KRL_INVALID, (SEC_ERROR_BASE + 62), -"The key revocation list you are trying to load has\n\ -an invalid format.") - -ResDef(SEC_ERROR_NEED_RANDOM, (SEC_ERROR_BASE + 63), -"The security library is out of random data.") - -ResDef(SEC_ERROR_NO_MODULE, (SEC_ERROR_BASE + 64), -"The security library could not find a security module which can\n\ -perform the requested operation.") - -ResDef(SEC_ERROR_NO_TOKEN, (SEC_ERROR_BASE + 65), -"The security card or token does not exist, needs to be initialized\n\ -or has been removed.") - -ResDef(SEC_ERROR_READ_ONLY, (SEC_ERROR_BASE + 66), -"The security library has experienced a database error.\n\ -You will probably be unable to connect to this site securely.") - -ResDef(SEC_ERROR_NO_SLOT_SELECTED, (SEC_ERROR_BASE + 67), -"No slot or token was selected.") - -ResDef(SEC_ERROR_CERT_NICKNAME_COLLISION, (SEC_ERROR_BASE + 68), -"A certificate with the same name already exists.") - -ResDef(SEC_ERROR_KEY_NICKNAME_COLLISION, (SEC_ERROR_BASE + 69), -"A key with the same name already exists.") - -ResDef(SEC_ERROR_SAFE_NOT_CREATED, (SEC_ERROR_BASE + 70), -"An error occurred while creating safe object") - -ResDef(SEC_ERROR_BAGGAGE_NOT_CREATED, (SEC_ERROR_BASE + 71), -"An error occurred while creating safe object") - -ResDef(XP_JAVA_REMOVE_PRINCIPAL_ERROR, (SEC_ERROR_BASE + 72), -"Couldn't remove the principal") - -ResDef(XP_JAVA_DELETE_PRIVILEGE_ERROR, (SEC_ERROR_BASE + 73), -"Couldn't delete the privilege") - -ResDef(XP_JAVA_CERT_NOT_EXISTS_ERROR, (SEC_ERROR_BASE + 74), -"This principal doesn't have a certificate") - -ResDef(SEC_ERROR_BAD_EXPORT_ALGORITHM, (SEC_ERROR_BASE + 75), -"The operation cannot be performed because the required\n\ -algorithm is not allowed by this configuration.") - -ResDef(SEC_ERROR_EXPORTING_CERTIFICATES, (SEC_ERROR_BASE + 76), -"Unable to export certificates. An error occurred attempting to\n\ -export the certificates.") - -ResDef(SEC_ERROR_IMPORTING_CERTIFICATES, (SEC_ERROR_BASE + 77), -"An error occurred attempting to import the certificates.") - -ResDef(SEC_ERROR_PKCS12_DECODING_PFX, (SEC_ERROR_BASE + 78), -"Unable to import certificates. The file specified is either\n\ -corrupt or is not a valid file.") - -ResDef(SEC_ERROR_PKCS12_INVALID_MAC, (SEC_ERROR_BASE + 79), -"Unable to import certificates. Either the integrity password\n\ -is incorrect or the data in the file specified has been tampered\n\ -with or corrupted in some manner.") - -ResDef(SEC_ERROR_PKCS12_UNSUPPORTED_MAC_ALGORITHM, (SEC_ERROR_BASE + 80), -"Unable to import certificates. The algorithm used to generate the\n\ -integrity information for this file is not supported in the application.") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_ERROR_PKCS12_UNSUPPORTED_TRANSPORT_MODE, (SEC_ERROR_BASE + 81), -"Unable to import certificates. "MOZ_NAME_PRODUCT" only supports password\n\ -integrity and password privacy modes for importing certificates.") -#else -ResDef(SEC_ERROR_PKCS12_UNSUPPORTED_TRANSPORT_MODE, (SEC_ERROR_BASE + 81), -"Unable to import certificates. Communicator only supports password\n\ -integrity and password privacy modes for importing certificates.") -#endif - -ResDef(SEC_ERROR_PKCS12_CORRUPT_PFX_STRUCTURE, (SEC_ERROR_BASE + 82), -"Unable to import certificates. The file containing the certificates\n\ -is corrupt. Required information is either missing or invalid.") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_ERROR_PKCS12_UNSUPPORTED_PBE_ALGORITHM, (SEC_ERROR_BASE + 83), -"Unable to import certificates. The algorithm used to encrypt the\n\ -contents is not supported by "MOZ_NAME_PRODUCT".") -#else -ResDef(SEC_ERROR_PKCS12_UNSUPPORTED_PBE_ALGORITHM, (SEC_ERROR_BASE + 83), -"Unable to import certificates. The algorithm used to encrypt the\n\ -contents is not supported by Communicator.") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_ERROR_PKCS12_UNSUPPORTED_VERSION, (SEC_ERROR_BASE + 84), -"Unable to import certificates. The file is a version not supported by\n\ -"MOZ_NAME_PRODUCT".") -#else -ResDef(SEC_ERROR_PKCS12_UNSUPPORTED_VERSION, (SEC_ERROR_BASE + 84), -"Unable to import certificates. The file is a version not supported by\n\ -Communicator.") -#endif - -ResDef(SEC_ERROR_PKCS12_PRIVACY_PASSWORD_INCORRECT, (SEC_ERROR_BASE + 85), -"Unable to import certificates. The privacy password specified is\n\ -incorrect.") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_ERROR_PKCS12_CERT_COLLISION, (SEC_ERROR_BASE + 86), -"Unable to import certificates. A certificate with the same nickname,\n\ -as one being imported already exists in your "MOZ_NAME_PRODUCT" database.") -#else -ResDef(SEC_ERROR_PKCS12_CERT_COLLISION, (SEC_ERROR_BASE + 86), -"Unable to import certificates. A certificate with the same nickname,\n\ -as one being imported already exists in your Communicator database.") -#endif - -ResDef(SEC_ERROR_USER_CANCELLED, (SEC_ERROR_BASE + 87), -"The user pressed cancel.") - -ResDef(SEC_ERROR_PKCS12_DUPLICATE_DATA, (SEC_ERROR_BASE + 88), -"Certificates could not be imported since they already exist on \ -the machine.") - -ResDef(SEC_ERROR_MESSAGE_SEND_ABORTED, (SEC_ERROR_BASE + 89), -"Message not sent.") - -ResDef(SEC_ERROR_INADEQUATE_KEY_USAGE, (SEC_ERROR_BASE + 90), -"The certificate is not approved for the attempted operation.") - -ResDef(SEC_ERROR_INADEQUATE_CERT_TYPE, (SEC_ERROR_BASE + 91), -"The certificate is not approved for the attempted application.") - -ResDef(SEC_ERROR_CERT_ADDR_MISMATCH, (SEC_ERROR_BASE + 92), -"The email address in the signing certificate does not match\n\ -the email address in the message headers. If these two\n\ -addresses do not belong to the same person, then this could\n\ -be an attempt at forgery.") - -ResDef(SEC_ERROR_PKCS12_UNABLE_TO_IMPORT_KEY, (SEC_ERROR_BASE + 93), -"Unable to import certificates. An error occurred while attempting\n\ -to import the Private Key associated with the certificate being imported.") - -ResDef(SEC_ERROR_PKCS12_IMPORTING_CERT_CHAIN, (SEC_ERROR_BASE + 94), -"Unable to import certificates. An error occurred while attempting\n\ -to import the certificate chain associated with the certificate\n\ -being imported.") - -ResDef(SEC_ERROR_PKCS12_UNABLE_TO_LOCATE_OBJECT_BY_NAME, (SEC_ERROR_BASE + 95), -"Unable to export certificates. An error occurred while trying to locate\n\ -a certificate or a key by its nickname.") - -ResDef(SEC_ERROR_PKCS12_UNABLE_TO_EXPORT_KEY, (SEC_ERROR_BASE + 96), -"Unable to export certificates. The Private Key associated with a\n\ -certificate could not be located or could not be exported from the\n\ -key database.") - -ResDef(SEC_ERROR_PKCS12_UNABLE_TO_WRITE, (SEC_ERROR_BASE + 97), -"Unable to export certificates. An error occurred while trying to write\n\ -the export file. Make sure the destination drive is not full and try\n\ -exporting again.") - -ResDef(SEC_ERROR_PKCS12_UNABLE_TO_READ, (SEC_ERROR_BASE + 98), -"Unable to import certificates. An error occurred while reading the\n\ -import file. Please make sure the file exists and is not corrupt and\n\ -then try importing the file again.") - -ResDef(SEC_ERROR_PKCS12_KEY_DATABASE_NOT_INITIALIZED, (SEC_ERROR_BASE + 99), -"Unable to export certificates. The database which contains\n\ -Private Keys has not been initialized. Either your key database\n\ -is corrupt or has been deleted. There is no key associated with\n\ -this certificate.") - -ResDef(SEC_ERROR_KEYGEN_FAIL, (SEC_ERROR_BASE + 100), -"Unable to generate Public/Private Key Pair.") - -ResDef(SEC_ERROR_INVALID_PASSWORD, (SEC_ERROR_BASE + 101), -"The password you entered is invalid. Please pick a different one.") - -ResDef(SEC_ERROR_RETRY_OLD_PASSWORD, (SEC_ERROR_BASE + 102), -"You did not enter your old password correctly. Please try again.") - -ResDef(SEC_ERROR_BAD_NICKNAME, (SEC_ERROR_BASE + 103), -"The Certificate Name you entered is already in use by another certificate.") - -ResDef(SEC_ERROR_NOT_FORTEZZA_ISSUER, (SEC_ERROR_BASE + 104), -"Server FORTEZZA chain has a non-FORTEZZA Certificate. \n\ -You will probably be unable to connect to this site securely.") - - -/* used in pk11dlgs.c */ -ResDef(SEC_ERROR_UNKNOWN, (SEC_ERROR_BASE + 105), - "Unknown") - -/* define some error messages for lm_pkcs11.c */ -ResDef(SEC_ERROR_JS_INVALID_MODULE_NAME, (SEC_ERROR_BASE + 106), -"Invalid module name.") - -ResDef(SEC_ERROR_JS_INVALID_DLL, (SEC_ERROR_BASE + 107), -"Invalid module path/filename") - -ResDef(SEC_ERROR_JS_ADD_MOD_FAILURE, (SEC_ERROR_BASE + 108), -"Unable to add module") - -ResDef(SEC_ERROR_JS_DEL_MOD_FAILURE, (SEC_ERROR_BASE + 109), - "Unable to delete module") - -ResDef(SEC_ERROR_OLD_KRL, (SEC_ERROR_BASE + 110), -"The key revocation list you are trying to load is not\n\ -later than the current one.") - -ResDef(SEC_ERROR_CKL_CONFLICT, (SEC_ERROR_BASE + 111), -"The CKL you are trying to load has a different issuer\n\ -than your current CKL. You must first delete your\n\ -current CKL.") - -ResDef(SEC_ERROR_CERT_NOT_IN_NAME_SPACE, (SEC_ERROR_BASE + 112), -"The Certifying Authority for this certifcate is not\n\ -permited to issue a certifcate with this name.") - -ResDef(SEC_ERROR_KRL_NOT_YET_VALID, (SEC_ERROR_BASE + 113), -"The key revocation list for this site's certificate\n\ -is not yet valid. Reload a new key revocation list.") - -ResDef(SEC_ERROR_CRL_NOT_YET_VALID, (SEC_ERROR_BASE + 114), -"The certificate revocation list for this site's\n\ -certificate is not yet valid. Reload a new certificate\n\ -revocation list.") - -END_STR(mcom_include_secerr_i_strings) - -/* HTML Dialog Box stuff. Moved from secerr #'s to xp_msg #'s */ -RES_START -BEGIN_STR(mcom_include_sec_dialog_strings) -/* NOTE - you can't use backslash-quote to get a quote in the html below. - * you must use \042. This is due to windows resource compiler hosage - */ -ResDef(XP_DIALOG_HEADER_STRINGS, (SEC_DIALOG_STRING_BASE + 0), "\ -%-styleinfo-%\ -
") - -/* NOTE - dialogs and panels share the same footer strings !! */ -ResDef(XP_DIALOG_FOOTER_STRINGS, (SEC_DIALOG_STRING_BASE + 2), "\ -
%0%") - -ResDef(XP_DIALOG_JS_HEADER_STRINGS, (SEC_DIALOG_STRING_BASE + 3), "\ -%-styleinfo-%%0%\n%-cont-%") - -ResDef(XP_DIALOG_JS_FOOTER_STRINGS4, (SEC_DIALOG_STRING_BASE + 8), "\ -\n\ -\n\ -\n") - -ResDef(XP_DIALOG_CANCEL_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 9), "\ -
") - -ResDef(XP_DIALOG_OK_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 10), "\ -
") - -ResDef(XP_DIALOG_CONTINUE_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 11), "\ -
\ -
") - -ResDef(XP_DIALOG_CANCEL_OK_BUTTON_STRINGS, - (SEC_DIALOG_STRING_BASE + 12), "\ -
  \ -
") - -ResDef(XP_DIALOG_CANCEL_CONTINUE_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 13), "\ -
  \ -
") - -ResDef(XP_PANEL_HEADER_STRINGS, (SEC_DIALOG_STRING_BASE + 14), "\ -%-styleinfo-%
\ -") - -#ifdef XP_OS2_FIX -ResDef(XP_PANEL_FIRST_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 16), "\ -
\ -value=\042%cancel%\042 onclick=\042parent.clicker(this,window.parent)\042>  
%0%") -#else -ResDef(XP_PANEL_FIRST_BUTTON_STRINGS_1, (SEC_DIALOG_STRING_BASE + 17), "\ -type=\042button\042 name=\042button\042 value=\042%cancel%\042 \ -onclick=\042parent.clicker(this,window.parent)\042 width=80>%0%") -#endif - -#ifdef XP_OS2_FIX -ResDef(XP_PANEL_MIDDLE_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 18), "\ -
\ -\ -
%0%") -#else -ResDef(XP_PANEL_MIDDLE_BUTTON_STRINGS_1, (SEC_DIALOG_STRING_BASE + 19), "\ -onclick=\042parent.clicker(this,window.parent)\042 width=80>  \ -%0%") -#endif - -#ifdef XP_OS2_FIX -ResDef(XP_PANEL_LAST_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 20), "\ -
\ -%-cont-%") -#endif - -#ifdef XP_OS2_FIX -ResDef(XP_PANEL_LAST_BUTTON_STRINGS_1, (SEC_DIALOG_STRING_BASE + 21), "\ -type=\042button\042 name=\042button\042 value=\042%back%\042 onclick=\042parent.clicker(this,window.parent)\042>
%0%") -#else -ResDef(XP_PANEL_LAST_BUTTON_STRINGS_1, (SEC_DIALOG_STRING_BASE + 21), "\ -  \ -%0%") -#endif - -ResDef(XP_PLAIN_CERT_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 22), "\ -%0%") - -ResDef(XP_CERT_CONFIRM_STRINGS, (SEC_DIALOG_STRING_BASE + 23), "\ -%0%%1%
%2%
%3%") - -ResDef(XP_CERT_PAGE_STRINGS, (SEC_DIALOG_STRING_BASE + 24), "\ -%0%%1%%2%") - -ResDef(XP_SSL_SERVER_CERT1_STRINGS, (SEC_DIALOG_STRING_BASE + 25), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -\ -%1% is a site that uses encryption to protect transmitted information. \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT1_STRINGS_1, (SEC_DIALOG_STRING_BASE + 26), "\ -However, "MOZ_NAME_PRODUCT" does not recognize the authority who signed its \ -Certificate.

Although "MOZ_NAME_PRODUCT" does not recognize the \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT1_STRINGS_2, (SEC_DIALOG_STRING_BASE + 27), "\ -signer of this Certificate, you may decide to accept it anyway so that \ -you can connect to and exchange information with this site.

This \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT1_STRINGS_3, (SEC_DIALOG_STRING_BASE + 28), "\ -assistant will help you decide whether or not you wish to accept this \ -Certificate and to what extent.%2%") - -ResDef(XP_SSL_SERVER_CERT2_STRINGS, (SEC_DIALOG_STRING_BASE + 29), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Here is the \ -Certificate that is being presented:


Certificate for:
Signed by:
Encryption:
%1%
%2%
%3% Grade (%4% with %5%-bit secret \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT2_STRINGS_2, (SEC_DIALOG_STRING_BASE + 31), "\ -key)

The signer of the \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT2_STRINGS_3, (SEC_DIALOG_STRING_BASE + 32), "\ -Certificate promises you that the holder of this Certificate is who they \ -say they are. The encryption level is an indication of how difficult it \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT2_STRINGS_4, (SEC_DIALOG_STRING_BASE + 33), "\ -would be for someone to eavesdrop on any information exchanged between \ -you and this web site.%6%") - -ResDef(XP_SSL_SERVER_CERT3_STRINGS, (SEC_DIALOG_STRING_BASE + 34), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Are you willing \ -to accept this certificate for the purposes of receiving encrypted \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT3_STRINGS_1, (SEC_DIALOG_STRING_BASE + 35), "\ -information from this web site?

This means that you will be able to \ -browse through the site and receive documents from it and that all of \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT3_STRINGS_2, (SEC_DIALOG_STRING_BASE + 36), "\ -these documents are protected from observation by a third party by \ -encryption.

Accept this \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT3_STRINGS_3, (SEC_DIALOG_STRING_BASE + 37), "\ -certificate for this session
\ -Do not accept this certificate and do not connect\ -
Accept this certificate forever (until it expires)
\ -%4%") - -ResDef(XP_SSL_SERVER_CERT4_STRINGS, (SEC_DIALOG_STRING_BASE + 39), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -By accepting this \ -certificate you are ensuring that all information you exchange with this site \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT4_STRINGS_1, (SEC_DIALOG_STRING_BASE + 40), "\ -will be encrypted. However, encryption will not protect you from \ -fraud.

To protect yourself from fraud, do not send information \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT4_STRINGS_2, (SEC_DIALOG_STRING_BASE + 41), "(\ -especially personal information, credit card numbers, or passwords) to \ -this site if you have any doubt about the site's integrity.

For your \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT4_STRINGS_3, (SEC_DIALOG_STRING_BASE + 42), "\ -own protection, "MOZ_NAME_PRODUCT" can remind you of this at the appropriate \ -time.

Warn me \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT4_STRINGS_4, (SEC_DIALOG_STRING_BASE + 43), "\ -before I send information to this site

%2%") - -ResDef(XP_SSL_SERVER_CERT5A_STRINGS, (SEC_DIALOG_STRING_BASE + 44), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You have \ -finished examining the certificate presented by:
%1%

You have \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT5A_STRINGS_1, (SEC_DIALOG_STRING_BASE + 45), "\ -decided to refuse this ID. If, in the future, you change your mind about \ -this decision, just visit this site again and this assistant will \ -%-cont-%") - -ResDef(XP_SSL_SERVER_CERT5A_STRINGS_2, (SEC_DIALOG_STRING_BASE + 46), "\ -reappear.

Click on the Finish button to return to the document you were\ -viewing before you attempted to connect to this site.%2%") - -ResDef(XP_SSL_SERVER_CERT5B_STRINGS, (SEC_DIALOG_STRING_BASE + 47), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You have \ -finished examining the certificate presented by:
%1%

You have \ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_SSL_SERVER_CERT5B_STRINGS_1, (SEC_DIALOG_STRING_BASE + 48), "\ -decided to accept this certificate and have asked that "MOZ_NAME_FULL" warn \ -you before you send information to this site.

If you \ -%-cont-%") -#else -ResDef(XP_SSL_SERVER_CERT5B_STRINGS_1, (SEC_DIALOG_STRING_BASE + 48), "\ -decided to accept this certificate and have asked that "MOZ_NAME_PRODUCT" Communicator warn \ -you before you send information to this site.

If you \ -%-cont-%") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_SSL_SERVER_CERT5B_STRINGS_2, (SEC_DIALOG_STRING_BASE + 49), "\ -change your mind, open Security Info from the "MOZ_NAME_PRODUCT" menu and edit \ -Site Certificates.

Click on the Finish button to begin receiving\ -documents.%2%") -#else -ResDef(XP_SSL_SERVER_CERT5B_STRINGS_2, (SEC_DIALOG_STRING_BASE + 49), "\ -change your mind, open Security Info from the Communicator menu and edit \ -Site Certificates.

Click on the Finish button to begin receiving\ -documents.%2%") -#endif - -ResDef(XP_SSL_SERVER_CERT5C_STRINGS, (SEC_DIALOG_STRING_BASE + 50), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You have \ -finished examining the certificate presented by:
%1%

You have \ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_SSL_SERVER_CERT5C_STRINGS_1, (SEC_DIALOG_STRING_BASE + 51), "\ -decided to accept this certificate and have decided not to have "MOZ_NAME_PRODUCT" \ -"MOZ_NAME_PRODUCT" warn you before you send information to this site.

If \ -%-cont-%") -#else -ResDef(XP_SSL_SERVER_CERT5C_STRINGS_1, (SEC_DIALOG_STRING_BASE + 51), "\ -decided to accept this certificate and have decided not to have "MOZ_NAME_PRODUCT" \ -Communicator warn you before you send information to this site.

If \ -%-cont-%") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_SSL_SERVER_CERT5C_STRINGS_2, (SEC_DIALOG_STRING_BASE + 52), "\ -you change your mind, open Security Info from the "MOZ_NAME_PRODUCT" Menu \ -edit Site Certificates.

Click on the Finish button\ -to begin %-cont-%") -#else -ResDef(XP_SSL_SERVER_CERT5C_STRINGS_2, (SEC_DIALOG_STRING_BASE + 52), "\ -you change your mind, open Security Info from the Communicator Menu \ -edit Site Certificates.

Click on the Finish button\ -to begin %-cont-%") -#endif - -ResDef(XP_SSL_SERVER_CERT5C_STRINGS_3, (SEC_DIALOG_STRING_BASE + 53), "\ -receiving documents.%2%") - -ResDef(XP_SSL_CERT_DOMAIN_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 54), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -The certificate \ -that the site '%1%' has presented does not contain the correct site \ -%-cont-%") - -ResDef(XP_SSL_CERT_DOMAIN_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 55), "\ -name. It is possible, though unlikely, that someone may be trying to \ -intercept your communication with this site. If you suspect the \ -%-cont-%") - -ResDef(XP_SSL_CERT_DOMAIN_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 56), "\ -certificate shown below does not belong to the site you are connecting \ -with, please cancel the connection and notify the site administrator.

\ -%-cont-%") - -ResDef(XP_SSL_CERT_DOMAIN_DIALOG_STRINGS_3, (SEC_DIALOG_STRING_BASE + 57), "\ -Here is the Certificate that is being presented:


Certificate for:
Signed by:
Encryption: \ -%-cont-%") - -ResDef(XP_SSL_CERT_DOMAIN_DIALOG_STRINGS_4, (SEC_DIALOG_STRING_BASE + 58), "\ -
%2%
%3%
%4% Grade (%5% \ -with %6%-bit secret key)
\ -
%7%") - -ResDef(XP_PW_ENTER_NEW_STRINGS, (SEC_DIALOG_STRING_BASE + 60), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Please enter your new password. The safest passwords are a combination \ -of letters \ -%-cont-%") - -ResDef(XP_PW_ENTER_NEW_STRINGS_1, (SEC_DIALOG_STRING_BASE + 61), "\ -and numbers, are at least 8 characters long, and contain no words from a \ -dictionary.

Password:

Type in \ -%-cont-%") - -ResDef(XP_PW_ENTER_NEW_STRINGS_2, (SEC_DIALOG_STRING_BASE + 62), "\ -your password, again, for verification:

Retype Password:

Do not forget your password! Your \ -%-cont-%") - -ResDef(XP_PW_ENTER_NEW_STRINGS_3, (SEC_DIALOG_STRING_BASE + 63), "\ -password cannot be recovered. If you forget it, you will have to obtain \ -new Certificates.") - -ResDef(XP_PW_RETRY_NEW_STRINGS, (SEC_DIALOG_STRING_BASE + 64), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You did not \ -enter your password correctly. Please try again:

Password:

Type in your password, again, for \ -verification:

Retype Password:

\ -%-cont-%") - -ResDef(XP_PW_RETRY_NEW_STRINGS_2, (SEC_DIALOG_STRING_BASE + 66), "\ -Do not forget your password! Your password cannot be recovered. If \ -you forget it, you will have to obtain new Certificates. ") - -ResDef(XP_PW_SETUP_STRINGS, (SEC_DIALOG_STRING_BASE + 67), "\ -%sec-banner-being%%0%%sec-banner-end%\ -%1%%2%%3%%4%\ -%-cont-%") - -ResDef(XP_PW_SETUP_STRINGS_1, (SEC_DIALOG_STRING_BASE + 68), "\ -\ -
Password:
Type it again to confirm:
Important: \ -%-cont-%") - -ResDef(XP_PW_SETUP_STRINGS_3, (SEC_DIALOG_STRING_BASE + 70), "\ -Your password cannot be recovered. If you forget it, you will lose all of your \ -certificates.

%-cont-%") - -ResDef(XP_PW_SETUP_STRINGS_4, (SEC_DIALOG_STRING_BASE + 71), "\ -The safest passwords are at least 8 characters long, include \ -both letters and numbers, and contain no words from a dictionary.

\ -If you wish to change your password or other security \ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_PW_SETUP_STRINGS_5, (SEC_DIALOG_STRING_BASE + 72), "\ -preferences, choose Security Info from the "MOZ_NAME_PRODUCT" menu.") -#else -ResDef(XP_PW_SETUP_STRINGS_5, (SEC_DIALOG_STRING_BASE + 72), "\ -preferences, choose Security Info from the Communicator menu.") -#endif - -/* unused (SEC_DIALOG_STRING_BASE + 73) */ - -/* unused (SEC_DIALOG_STRING_BASE + 74) */ - -/* unused (SEC_DIALOG_STRING_BASE + 75) */ - -/* unused (SEC_DIALOG_STRING_BASE + 76) */ - -/* unused (SEC_DIALOG_STRING_BASE + 77) */ - -/* unused (SEC_DIALOG_STRING_BASE + 78) */ - -/* unused (SEC_DIALOG_STRING_BASE + 79) */ - -/* unused (SEC_DIALOG_STRING_BASE + 80) */ - -/* unused (SEC_DIALOG_STRING_BASE + 81) */ - -/* unused (SEC_DIALOG_STRING_BASE + 82) */ - -ResDef(XP_PW_SETUP_REFUSED_STRINGS, (SEC_DIALOG_STRING_BASE + 83), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You have elected to operate without a password.

If you decide that you \ -%-cont-%") - -ResDef(XP_PW_SETUP_REFUSED_STRINGS_1, (SEC_DIALOG_STRING_BASE + 84), "\ -would like to have a password to protect your Private Keys and Certificates, \ -you can set up a password in Security Preferences.") - -ResDef(XP_PW_CHANGE_STRINGS, (SEC_DIALOG_STRING_BASE + 85), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Change the password for the %1%.

Enter your old password:

Enter your new password. Leave \ -the password fields blank if you don't want a password.

\ -
\ -%-cont-%") - -ResDef(XP_PW_CHANGE_STRINGS_2, (SEC_DIALOG_STRING_BASE + 87), "\ -New Password:
Type it again to confirm:\ -%-cont-%") - -ResDef(XP_PW_CHANGE_STRINGS_3, (SEC_DIALOG_STRING_BASE + 88), "\ -

Important: Your password cannot be recovered. If \ -you forget it, you will lose all of your certificates.") - -/* unused (SEC_DIALOG_STRING_BASE + 89) */ - -ResDef(XP_PW_CHANGE_FAILURE_STRINGS, (SEC_DIALOG_STRING_BASE + 90), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Your attempt to change your password failed.

This may be because your \ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_PW_CHANGE_FAILURE_STRINGS_1, (SEC_DIALOG_STRING_BASE + 91), "\ -key database is inaccessible (which can happen if you were already \ -running a "MOZ_NAME_PRODUCT" when you started this one), or because of some other \ -%-cont-%") -#else -ResDef(XP_PW_CHANGE_FAILURE_STRINGS_1, (SEC_DIALOG_STRING_BASE + 91), "\ -key database is inaccessible (which can happen if you were already \ -running a Communicator when you started this one), or because of some other \ -%-cont-%") -#endif - -ResDef(XP_PW_CHANGE_FAILURE_STRINGS_2, (SEC_DIALOG_STRING_BASE + 92), "\ -error.

It may indicate that your key database file has been corrupted, \ -in which case you should try to get it from of a backup, if possible. As \ -%-cont-%") - -ResDef(XP_PW_CHANGE_FAILURE_STRINGS_3, (SEC_DIALOG_STRING_BASE + 93), "\ -a last resort, you may need to delete your key database, after which you \ -will have to obtain new personal Certificates.") - -ResDef(XP_DIALOG_CANCEL_OK_MOREINFO_BUTTON_STRINGS, - (SEC_DIALOG_STRING_BASE + 94), "\ -\ -%-cont-%") - -ResDef(XP_DIALOG_CANCEL_OK_MOREINFO_BUTTON_STRINGS_1, - (SEC_DIALOG_STRING_BASE + 95), "\ -
\ -  \ -%-cont-%") - -ResDef(XP_DIALOG_CANCEL_OK_MOREINFO_BUTTON_STRINGS_2, - (SEC_DIALOG_STRING_BASE + 96),"\ -
") - -/* unused (SEC_DIALOG_STRING_BASE + 97) */ - -/* unused (SEC_DIALOG_STRING_BASE + 98) */ - -ResDef(XP_PANEL_ONLY_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 99), "\ -

  \ -%-cont-%") - -ResDef(XP_PANEL_ONLY_BUTTON_STRINGS_1, (SEC_DIALOG_STRING_BASE + 100), "\ -
%0%") - -ResDef(XP_NOT_IMPLEMENTED_STRINGS, (SEC_DIALOG_STRING_BASE + 101), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -This function is \ -not implemented:
%1%
Certificate name:
%2%") - -ResDef(XP_CERT_VIEW_STRINGS, (SEC_DIALOG_STRING_BASE + 102), "\ -%0%%1%") - -ResDef(XP_DELETE_USER_CERT_STRINGS, (SEC_DIALOG_STRING_BASE + 103), "\ -WARNING: If you delete this Certificate you will not \ -be able to read any E-mail that has been encrypted with it.

\ -Are you sure that you want to delete this Personal Certificate?

%0%") - -ResDef(XP_DELETE_SITE_CERT_STRINGS, (SEC_DIALOG_STRING_BASE + 104), "\ -Are you sure that you want to delete this Site Certificate?

%0%") - -ResDef(XP_DELETE_CA_CERT_STRINGS, (SEC_DIALOG_STRING_BASE + 105), "\ -Are you sure that you want to delete this Certificate Authority?

%0%") - -ResDef(XP_EDIT_SITE_CERT_STRINGS, (SEC_DIALOG_STRING_BASE + 106), "\ -%0%


This Certificate belongs to an SSL server site.
Allow connections to this site
\ -%-cont-%") - -ResDef(XP_EDIT_SITE_CERT_STRINGS_1, (SEC_DIALOG_STRING_BASE + 107), "\ -Do not allow connections to \ -this site
Warn \ -%-cont-%") - -ResDef(XP_EDIT_SITE_CERT_STRINGS_2, (SEC_DIALOG_STRING_BASE + 108), "\ -before sending data to this site") - -ResDef(XP_EDIT_CA_CERT_STRINGS, (SEC_DIALOG_STRING_BASE + 109), "\ -%0%
This Certificate belongs to a Certifying Authority
\ -%-cont-%") - -ResDef(XP_EDIT_CA_CERT_STRINGS_1, (SEC_DIALOG_STRING_BASE + 110), "\ -%1%
%2%
%3%
Warn before sending data to \ -sites certified by this authority") - -ResDef(XP_SSL_CERT_POST_WARN_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 112), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Warning: You \ -%-cont-%") - -ResDef(XP_SSL_CERT_POST_WARN_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 113), "\ -are about to send encrypted information to the site %1%.

It is \ -card numbers, or passwords) to this site if you are in doubt about its \ -%-cont-%") - -ResDef(XP_SSL_CERT_POST_WARN_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 114), "\ -safer not to send information (particularly personal information, credit \ -Certificate or integrity.
Here is the Certificate for this site:


\ -%-cont-%") - -ResDef(XP_SSL_CERT_POST_WARN_DIALOG_STRINGS_3, (SEC_DIALOG_STRING_BASE + 115), "\ -
Certificate for:
Signed by: \ -
Encryption:
%2%
%3%
\ -%-cont-%") - -ResDef(XP_SSL_CERT_POST_WARN_DIALOG_STRINGS_4, (SEC_DIALOG_STRING_BASE + 116), "\ -%4% Grade (%5% with %6%-bit secret key)
\ -

Send this information and warn again next \ -%-cont-%") - -ResDef(XP_SSL_CERT_POST_WARN_DIALOG_STRINGS_6, (SEC_DIALOG_STRING_BASE + 118), "\ -time
Send this information \ -and do not warn again
Do \ -not send information
%7%") - -ResDef(XP_CA_CERT_DOWNLOAD1_STRINGS, (SEC_DIALOG_STRING_BASE + 119), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You are about to \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD1_STRINGS_1, (SEC_DIALOG_STRING_BASE + 120), "\ -go through the process of accepting a Certificate Authority. This has \ -serious implications on the security of future encryptions using \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD1_STRINGS_2, (SEC_DIALOG_STRING_BASE + 121), "\ -"MOZ_NAME_PRODUCT". This assistant will help you decide whether or not you wish to \ -accept this Certificate Authority.") - -ResDef(XP_CA_CERT_DOWNLOAD2_STRINGS, (SEC_DIALOG_STRING_BASE + 122), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -A Certificate \ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_CA_CERT_DOWNLOAD2_STRINGS_1, (SEC_DIALOG_STRING_BASE + 123), "\ -Authority certifies the identity of sites on the internet. By accepting \ -this Certificate Authority, you will allow "MOZ_NAME_FULL" to connect \ -%-cont-%") -#else -ResDef(XP_CA_CERT_DOWNLOAD2_STRINGS_1, (SEC_DIALOG_STRING_BASE + 123), "\ -Authority certifies the identity of sites on the internet. By accepting \ -this Certificate Authority, you will allow "MOZ_NAME_PRODUCT" Communicator to connect \ -%-cont-%") -#endif - -ResDef(XP_CA_CERT_DOWNLOAD2_STRINGS_2, (SEC_DIALOG_STRING_BASE + 124), "\ -to and receive information from any site that this authority certifies \ -without prompting or warning you.

If you choose to refuse this \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD2_STRINGS_3, (SEC_DIALOG_STRING_BASE + 125), "\ -Certificate Authority, you will be prompted before you connect to or \ -receive information from any site that this authority certifies. ") - -ResDef(XP_CA_CERT_DOWNLOAD3_STRINGS, (SEC_DIALOG_STRING_BASE + 126), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Here is the \ -certificate for this Certificate Authority. Examine it carefully. The \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD3_STRINGS_1, (SEC_DIALOG_STRING_BASE + 127), "\ -Certificate Fingerprint can be used to verify that this Authority is who \ -they say they are. To do this, compare the Fingerprint against the \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD3_STRINGS_2, (SEC_DIALOG_STRING_BASE + 128), "\ -Fingerprint published by this authority in other places.


\ -\ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD3_STRINGS_3, (SEC_DIALOG_STRING_BASE + 129), "\ -
Certificate for:
Signed by:
%1%
%2%
\ -

") - -ResDef(XP_CA_CERT_DOWNLOAD4_STRINGS, (SEC_DIALOG_STRING_BASE + 131), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Are you willing \ -to accept this Certificate Authority for the purposes of certifying \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD4_STRINGS_1, (SEC_DIALOG_STRING_BASE + 132), "\ -other internet sites, email users, or software developers?

\ -%1%%2%%3%") - -/* 133, 134 NOT USED */ - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_CA_CERT_DOWNLOAD5_STRINGS, (SEC_DIALOG_STRING_BASE + 135), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -By accepting this \ -Certificate Authority, you have told "MOZ_NAME_FULL" \ -%-cont-%") -#else -ResDef(XP_CA_CERT_DOWNLOAD5_STRINGS, (SEC_DIALOG_STRING_BASE + 135), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -By accepting this \ -Certificate Authority, you have told "MOZ_NAME_PRODUCT" Communicator to connect to \ -%-cont-%") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_CA_CERT_DOWNLOAD5_STRINGS_1, (SEC_DIALOG_STRING_BASE + 136), "\ -to connect to and receive information from any site that it certifies \ -without warning you or prompting you.

"MOZ_NAME_FULL" can, however, \ -warn you before \ -%-cont-%") -#else -ResDef(XP_CA_CERT_DOWNLOAD5_STRINGS_1, (SEC_DIALOG_STRING_BASE + 136), "\ -to connect to and receive information from any site that it certifies \ -without warning you or prompting you.

"MOZ_NAME_PRODUCT" Communicator can, however, \ -warn you before \ -%-cont-%") -#endif - -ResDef(XP_CA_CERT_DOWNLOAD5_STRINGS_2, (SEC_DIALOG_STRING_BASE + 137), "\ -you send information to such a site.

Warn me before sending information to sites \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD5_STRINGS_3, (SEC_DIALOG_STRING_BASE + 138), "\ -certified by this Certificate Authority") - -ResDef(XP_CA_CERT_DOWNLOAD6_STRINGS, (SEC_DIALOG_STRING_BASE + 139), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You have accepted \ -this Certificate Authority. You must now select a nickname that will be \ -%-cont-%") - -ResDef(XP_CA_CERT_DOWNLOAD6_STRINGS_1, (SEC_DIALOG_STRING_BASE + 140), "\ -used to identify this Certificate Authority, for example Mozilla's \ -Certificate Shack.

Nickname: ") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_CA_CERT_DOWNLOAD7_STRINGS, (SEC_DIALOG_STRING_BASE + 142), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -By rejecting this \ -Certificate Authority, you have told "MOZ_NAME_FULL" not to connect \ -%-cont-%") -#else -ResDef(XP_CA_CERT_DOWNLOAD7_STRINGS, (SEC_DIALOG_STRING_BASE + 142), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -By rejecting this \ -Certificate Authority, you have told "MOZ_NAME_BRAND" Communicator not to connect \ -%-cont-%") -#endif - -ResDef(XP_CA_CERT_DOWNLOAD7_STRINGS_1, (SEC_DIALOG_STRING_BASE + 143), "\ -to and receive information from any site that it certifies without \ -prompting you.") - -ResDef(XP_EMPTY_STRINGS, (SEC_DIALOG_STRING_BASE + 144), "\ -%0%") - -ResDef(XP_WHICH_CERT_CLIENT_AUTH_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 145), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -The site '%1%' \ -has requested client authentication.

Here is the \ -%-cont-%") - -ResDef(XP_WHICH_CERT_CLIENT_AUTH_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 146), "\ -site's certificate:


\ -
Certificate \ -for:
Signed by:
Encryption:
%2%
%3%
%4% Grade (%5% with %6%-bit secret key)

Select Your Certificate:%8%") - -ResDef(XP_NO_CERT_CLIENT_AUTH_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 149), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -The site '%1%' \ -has requested client authentication, but you do not have a Personal \ -%-cont-%") - -ResDef(XP_NO_CERT_CLIENT_AUTH_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 150), "\ -Certificate to authenticate yourself. The site may choose not to give \ -you access without one.%2%") - -ResDef(XP_BROWSER_SEC_INFO_ENCRYPTED_STRINGS, (SEC_DIALOG_STRING_BASE + 151), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -All of the \ -files that you have requested were encrypted.

This means that the \ -%-cont-%") - -ResDef(XP_BROWSER_SEC_INFO_ENCRYPTED_STRINGS_1, (SEC_DIALOG_STRING_BASE + 152), "\ -files that make up the document are sent to you encrypted for privacy \ -while in transit.

For more details on the encryption of this \ -%-cont-%") - -ResDef(XP_BROWSER_SEC_INFO_ENCRYPTED_STRINGS_2, (SEC_DIALOG_STRING_BASE + 153), "\ -document, open Document Information.

%1%") - -ResDef(XP_BROWSER_SEC_INFO_MIXED_STRINGS, (SEC_DIALOG_STRING_BASE + 155), "\ -%0%

Some of the \ -files that you have requested were encrypted.

Some of these files \ -%-cont-%") - -ResDef(XP_BROWSER_SEC_INFO_MIXED_STRINGS_1, (SEC_DIALOG_STRING_BASE + 156), "\ -are sent to you encrypted for privacy while in transit. Others are not \ -encrypted and can be observed by a third party while in transit.

To \ -%-cont-%") - -ResDef(XP_BROWSER_SEC_INFO_MIXED_STRINGS_2, (SEC_DIALOG_STRING_BASE + 157), "\ -find out exactly which files were encrypted and which were not, open \ -Document Information.

%1%") - -ResDef(XP_BROWSER_SEC_INFO_CLEAR_STRINGS, (SEC_DIALOG_STRING_BASE + 159), "\ -%0%

None of the \ -files that you have requested are encrypted.

Unencrypted files can \ -%-cont-%") - -ResDef(XP_BROWSER_SEC_INFO_CLEAR_STRINGS_1, (SEC_DIALOG_STRING_BASE + 160), "\ -be observed by a third party while in transit.

%1%") - -ResDef( XP_SMIME_RC2_CBC_40, (SEC_DIALOG_STRING_BASE + 161), \ -"RC2 encryption in CBC mode with a 40-bit key") - -ResDef( XP_SMIME_RC2_CBC_64, (SEC_DIALOG_STRING_BASE + 162), \ -"RC2 encryption in CBC mode with a 64-bit key") - -ResDef( XP_SMIME_RC2_CBC_128, (SEC_DIALOG_STRING_BASE + 163), \ -"RC2 encryption in CBC mode with a 128-bit key") - -ResDef( XP_SMIME_DES_CBC, (SEC_DIALOG_STRING_BASE + 164), \ -"DES encryption in CBC mode with a 56-bit key") - -ResDef( XP_SMIME_DES_EDE3, (SEC_DIALOG_STRING_BASE + 165), \ -"DES EDE3 encryption in CBC mode with a 168-bit key") - -ResDef( XP_SMIME_RC5PAD_64_16_40, (SEC_DIALOG_STRING_BASE + 166), \ -"RC5 encryption in CBC mode with a 40-bit key") - -ResDef( XP_SMIME_RC5PAD_64_16_64, (SEC_DIALOG_STRING_BASE + 167), \ -"RC5 encryption in CBC mode with a 64-bit key") - -ResDef( XP_SMIME_RC5PAD_64_16_128, (SEC_DIALOG_STRING_BASE + 168), \ -"RC5 encryption in CBC mode with a 128-bit key") - - -/* SEC_DIALOG_STRING_BASE + 169 thru SEC_DIALOG_STRING_BASE + 175 unused */ -/* (They used to be strings for payment stuff.) */ - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_CONFIG_NO_POLICY_STRINGS, (SEC_DIALOG_STRING_BASE + 176), \ -"No valid encryption policy file was found for this English language \n\ -version of "MOZ_NAME_PRODUCT". All encryption and decryption will be disabled.") -#else -ResDef(XP_CONFIG_NO_POLICY_STRINGS, (SEC_DIALOG_STRING_BASE + 176), \ -"No valid encryption policy file was found for this English language \n\ -version of Communicator. All encryption and decryption will be disabled.") -#endif - -ResDef(XP_CONFIG_NO_CIPHERS_STRINGS, (SEC_DIALOG_STRING_BASE + 177), \ -" (No ciphers are permitted)") - -ResDef(XP_CONFIG_MAYBE_CIPHERS_STRINGS, (SEC_DIALOG_STRING_BASE + 178), \ -" (When permitted)") - -ResDef(XP_CONFIG_SMIME_CIPHERS_STRINGS, (SEC_DIALOG_STRING_BASE + 179), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -

Select ciphers to enable for S/MIME %1%

    %2%
%3%") - -ResDef(XP_CONFIG_SSL2_CIPHERS_STRINGS, (SEC_DIALOG_STRING_BASE + 180), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -

Select ciphers to enable for SSL v2 %1%

    %2%
%3%") - -ResDef(XP_CONFIG_SSL3_CIPHERS_STRINGS, (SEC_DIALOG_STRING_BASE + 181), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -

Select ciphers to enable for SSL v3 %1%

    %2%
%3%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_USER_CERT_DOWNLOAD_STRINGS, (SEC_DIALOG_STRING_BASE + 182), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You have received a new Certificate. "MOZ_NAME_PRODUCT" will refer to this \ -%-cont-%") -#else -ResDef(XP_USER_CERT_DOWNLOAD_STRINGS, (SEC_DIALOG_STRING_BASE + 182), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You have received a new Certificate. Communicator will refer to this \ -%-cont-%") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_USER_CERT_DOWNLOAD_STRINGS_1, (SEC_DIALOG_STRING_BASE + 183), "\ -Certificate by the name shown below. %1%

Click OK to install the \ -certificate into "MOZ_NAME_PRODUCT" or click Cancel to refuse your new \ -%-cont-%") -#else -ResDef(XP_USER_CERT_DOWNLOAD_STRINGS_1, (SEC_DIALOG_STRING_BASE + 183), "\ -Certificate by the name shown below. %1%

Click OK to install the \ -certificate into Communicator or click Cancel to refuse your new \ -%-cont-%") -#endif - -ResDef(XP_USER_CERT_DOWNLOAD_STRINGS_2, (SEC_DIALOG_STRING_BASE + 184), "\ -Certificate.


Certificate Name: %2%

Certificate \ -for: %3%
Signed by: %4%


%5%") - -ResDef(XP_USER_CERT_NICKNAME_STRINGS, (SEC_DIALOG_STRING_BASE + 186), "\ -You can use the name provided or enter a new one.") - -ResDef(XP_USER_CERT_DL_MOREINFO_STRINGS, (SEC_DIALOG_STRING_BASE + 187), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -A Certificate is arriving from %1%.

This Certificate works in conjunction \ -%-cont-%") - -ResDef(XP_USER_CERT_DL_MOREINFO_STRINGS_1, (SEC_DIALOG_STRING_BASE + 188), "\ -with the corresponding Private Key that was generated for you when you \ -requested the Certificate. Together they can identify you to Web sites and \ -via Email.

Certificates and Private Keys are much more secure than \ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_USER_CERT_DL_MOREINFO_STRINGS_2, (SEC_DIALOG_STRING_BASE + 189), "\ -traditional username and password security methods. For more information \ -about Certificates, choose Security Info from the "MOZ_NAME_PRODUCT" menu.") -#else -ResDef(XP_USER_CERT_DL_MOREINFO_STRINGS_2, (SEC_DIALOG_STRING_BASE + 189), "\ -traditional username and password security methods. For more information \ -about Certificates, choose Security Info from the Communicator menu.") -#endif - -ResDef(XP_USER_CERT_SAVE_STRINGS, (SEC_DIALOG_STRING_BASE + 190), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You should make a copy of your new Certificate.

If you lose your Certificate \ -%-cont-%") - -ResDef(XP_USER_CERT_SAVE_STRINGS_1, (SEC_DIALOG_STRING_BASE + 191), "\ -it cannot be recovered. Only you hold your Private Key. Without it \ -you will not be able to read any email that you received using that \ -%-cont-%") - -ResDef(XP_USER_CERT_SAVE_STRINGS_2, (SEC_DIALOG_STRING_BASE + 192), "\ -Certificate.

To make a copy, click Save As and decide where you \ -would like to save your Certificate. If possible, you should save it on a \ -%-cont-%") - -ResDef(XP_USER_CERT_SAVE_STRINGS_3, (SEC_DIALOG_STRING_BASE + 193), "\ -floppy disk that you keep in a safe location.

") - -ResDef(XP_USER_CERT_SAVE_TITLE, (SEC_DIALOG_STRING_BASE + 194), "\ -Save User Certificate") - -/* unused (SEC_DIALOG_STRING_BASE + 195) */ - -/* unused (SEC_DIALOG_STRING_BASE + 196) */ - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_KEY_GEN_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 197), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -When you click OK, "MOZ_NAME_PRODUCT" will generate a Private Key for your \ -%-cont-%") -#else -ResDef(XP_KEY_GEN_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 197), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -When you click OK, Communicator will generate a Private Key for your \ -%-cont-%") -#endif - -ResDef(XP_KEY_GEN_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 198), "\ -Certificate. This may take a few minutes.

Important: If you \ -interrupt this process, you will have to reapply for the Certificate.\ -%1% %2% %3%

") - -ResDef(XP_KEY_GEN_MOREINFO_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 199), "\ -Key Generation Info") - -ResDef(XP_CERT_DL_MOREINFO_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 200), "\ -Certificate Download Info") - - -ResDef(XP_CERT_EXPIRED_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 201), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -%1% is a site \ -that uses encryption to protect transmitted information. However the \ -%-cont-%") - -ResDef(XP_CERT_EXPIRED_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 202), "\ -digital Certificate that identifies this site has expired. This may be \ -because the certificate has actually expired, or because the date on \ -%-cont-%") - -ResDef(XP_CERT_EXPIRED_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 203), "\ -your computer is wrong.

The certificate expires on %2%.

Your \ -computer's date is set to %3%. If this date is incorrect, then you \ -%-cont-%") - -ResDef(XP_CERT_EXPIRED_DIALOG_STRINGS_3, (SEC_DIALOG_STRING_BASE + 204), "\ -should reset the date on your computer.

You may continue or cancel \ -this connection.%4%") - -ResDef(XP_CERT_NOT_YET_GOOD_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 205), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -%1% is a site \ -that uses encryption to protect transmitted information. However the \ -%-cont-%") - -ResDef(XP_CERT_NOT_YET_GOOD_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 206), "\ -digital Certificate that identifies this site is not yet valid. This \ -may be because the certificate was installed too soon by the site \ -%-cont-%") - -ResDef(XP_CERT_NOT_YET_GOOD_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 207), "\ -administrator, or because the date on your computer is wrong.

The \ -certificate is valid beginning %2%.

Your computer's date is set to \ -%-cont-%") - -ResDef(XP_CERT_NOT_YET_GOOD_DIALOG_STRINGS_3, (SEC_DIALOG_STRING_BASE + 208), "\ -%3%. If this date is incorrect, then you should reset the date on your \ -computer.

You may continue or cancel this connection.%4%") - -ResDef(XP_CA_EXPIRED_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 209), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -%1% is a site \ -that uses encryption to protect transmitted information. However one of \ -%-cont-%") - -ResDef(XP_CA_EXPIRED_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 210), "\ -the Certificate Authorities that identifies this site has expired. This \ -may be because a certificate has actually expired, or because the date \ -%-cont-%") - -ResDef(XP_CA_EXPIRED_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 211), "\ -on your computer is wrong. Press the More Info button to see details of \ -the expired certificate.


Certificate Authority:
Expiration Date: \ -
%2%
%3%

Your computer's date is set \ -%-cont-%") - -ResDef(XP_CA_EXPIRED_DIALOG_STRINGS_5, (SEC_DIALOG_STRING_BASE + 214), "\ -to %4%. If this date is incorrect, then you should reset the date on \ -your computer.

You may continue or cancel this connection.") - -ResDef(XP_CA_NOT_YET_GOOD_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 215), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -%1% is a site \ -that uses encryption to protect transmitted information. However one of \ -%-cont-%") - -ResDef(XP_CA_NOT_YET_GOOD_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 216), "\ -the Certificate Authorities that identifies this site is not yet valid. \ -This may be because a certificate was install too soon by the site \ -%-cont-%") - -ResDef(XP_CA_NOT_YET_GOOD_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 217), "\ -administrator, or because the date on your computer is wrong. Press the \ -More Info button to see details of the expired certificate.


Certificate \ -Authority:
Certificate Valid On:
%2%
%3%
\ -%-cont-%") - -ResDef(XP_CA_NOT_YET_GOOD_DIALOG_STRINGS_5, (SEC_DIALOG_STRING_BASE + 220), "\ -
Your computer's date is set to %4%. If this date is incorrect, then \ -you should reset the date on your computer.

You may continue or cancel \ -%-cont-%") - -ResDef(XP_CA_NOT_YET_GOOD_DIALOG_STRINGS_6, (SEC_DIALOG_STRING_BASE + 221), "\ -this connection.") - -ResDef(XP_SEC_CANCEL, (SEC_DIALOG_STRING_BASE + 222), "\ -Cancel") - -ResDef(XP_SEC_OK, (SEC_DIALOG_STRING_BASE + 223), "\ -OK") - -ResDef(XP_SEC_CONTINUE, (SEC_DIALOG_STRING_BASE + 224), "\ -Continue") - -/* These must match the kludge versions below */ - -ResDef(XP_SEC_NEXT, (SEC_DIALOG_STRING_BASE + 225), "\ -Next>") - -ResDef(XP_SEC_BACK, (SEC_DIALOG_STRING_BASE + 226), "\ -<Back") - -ResDef(XP_SEC_FINISHED, (SEC_DIALOG_STRING_BASE + 227), "\ -Finish") - -ResDef(XP_SEC_MOREINFO, (SEC_DIALOG_STRING_BASE + 228), "\ -More Info...") - -ResDef(XP_SEC_SHOWCERT, (SEC_DIALOG_STRING_BASE + 229), "\ -Show Certificate") - -ResDef(XP_SEC_SHOWORDER, (SEC_DIALOG_STRING_BASE + 230), "\ -Show Order") - -ResDef(XP_SEC_SHOWDOCINFO, (SEC_DIALOG_STRING_BASE + 231), "\ -Show Document Info") - -/* These must match the original versions above */ - -ResDef(XP_SEC_NEXT_KLUDGE, (SEC_DIALOG_STRING_BASE + 232), "\ -Next>") - -ResDef(XP_SEC_BACK_KLUDGE, (SEC_DIALOG_STRING_BASE + 233), "\ -The certificate that you have selected has expired and may \ -%-cont-%") - -ResDef(XP_CLIENT_CERT_EXPIRED_RENEWAL_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 265), "\ -be rejected by the server. You may press %continue% to send it \ -anyway, or %cancel% to abort this connection. To renew your \ -%-cont-%") - -ResDef(XP_CLIENT_CERT_EXPIRED_RENEWAL_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 266), "\ -certificate press the %renew% button.") - -ResDef(XP_SEC_RENEW, (SEC_DIALOG_STRING_BASE + 267), "\ -Renew") - -ResDef(XP_CLIENT_CERT_NOT_YET_GOOD_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 268), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -The certificate that you have selected is not yet valid and may \ -be rejected by the server. You may press Continue to send it \ -anyway, or Cancel to abort this connection.") - -ResDef(XP_CLCERTEXP_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 269), "\ -Your Certificate Is Expired") - -ResDef(XP_ASKUSER, (SEC_DIALOG_STRING_BASE + 270), "\ -Ask every time") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_PICKAUTO, (SEC_DIALOG_STRING_BASE + 271), "\ -Let "MOZ_NAME_PRODUCT" choose automatically") -#else -ResDef(XP_PICKAUTO, (SEC_DIALOG_STRING_BASE + 271), "\ -Let Communicator choose automatically") -#endif - -ResDef(XP_HIGH_GRADE, (SEC_DIALOG_STRING_BASE + 272), "\ -1024 (High Grade)") - -ResDef(XP_MEDIUM_GRADE, (SEC_DIALOG_STRING_BASE + 273), "\ - 768 (Medium Grade)") - -ResDef(XP_LOW_GRADE, (SEC_DIALOG_STRING_BASE + 274), "\ - 512 (Low Grade)") - -ResDef(XP_VIEW_CERT_POLICY, (SEC_DIALOG_STRING_BASE + 275), "\ -View Certificate Policy") - -ResDef(XP_CHECK_CERT_STATUS, (SEC_DIALOG_STRING_BASE + 276), "\ -Check Certificate Status") - -ResDef(XP_SSL2_RC4_128, (SEC_DIALOG_STRING_BASE + 277), "\ -RC4 encryption with a 128-bit key") - -ResDef(XP_SSL2_RC2_128, (SEC_DIALOG_STRING_BASE + 278), "\ -RC2 encryption with a 128-bit key") - -ResDef(XP_SSL2_DES_192_EDE3, (SEC_DIALOG_STRING_BASE + 279), "\ -Triple DES encryption with a 168-bit key") - -ResDef(XP_SSL2_DES_64, (SEC_DIALOG_STRING_BASE + 280), "\ -DES encryption with a 56-bit key") - -ResDef(XP_SSL2_RC4_40, (SEC_DIALOG_STRING_BASE + 281), "\ -RC4 encryption with a 40-bit key") - -ResDef(XP_SSL2_RC2_40, (SEC_DIALOG_STRING_BASE + 282), "\ -RC2 encryption with a 40-bit key") - -ResDef(XP_SSL3_RSA_RC4_128_MD5, (SEC_DIALOG_STRING_BASE + 283), "\ -RC4 encryption with a 128-bit key and an MD5 MAC") - -ResDef(XP_SSL3_RSA_3DES_SHA, (SEC_DIALOG_STRING_BASE + 284), "\ -Triple DES encryption with a 168-bit key and a SHA-1 MAC") - -ResDef(XP_SSL3_RSA_DES_SHA, (SEC_DIALOG_STRING_BASE + 285), "\ -DES encryption with a 56-bit key and a SHA-1 MAC") - -ResDef(XP_SSL3_RSA_RC4_40_MD5, (SEC_DIALOG_STRING_BASE + 286), "\ -RC4 encryption with a 40-bit key and an MD5 MAC") - -ResDef(XP_SSL3_RSA_RC2_40_MD5, (SEC_DIALOG_STRING_BASE + 287), "\ -RC2 encryption with a 40-bit key and an MD5 MAC") - -ResDef(XP_SSL3_RSA_NULL_MD5, (SEC_DIALOG_STRING_BASE + 288), "\ -No encryption with an MD5 MAC") - -ResDef(XP_DIALOG_SHOW_CRLS, (SEC_DIALOG_STRING_BASE + 289), "\ -

CRL List:

\ -
\ -%-cont-%") - -ResDef(XP_DIALOG_SHOW_CRLS_1, (SEC_DIALOG_STRING_BASE + 290), "\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_SHOW_CRLS_2, (SEC_DIALOG_STRING_BASE + 291), "\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_SHOW_CRLS_3, (SEC_DIALOG_STRING_BASE + 292), "\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_SHOW_CRLS_4, (SEC_DIALOG_STRING_BASE + 293), "\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_SHOW_CRLS_5, (SEC_DIALOG_STRING_BASE + 294), "\ -
") - -ResDef(XP_SEC_NEW, (SEC_DIALOG_STRING_BASE + 295), "New/Edit ...") - -ResDef(XP_SEC_RELOAD, (SEC_DIALOG_STRING_BASE + 296), "\ -Reload") - -ResDef(XP_SEC_DELETE, (SEC_DIALOG_STRING_BASE + 297), "\ -Delete") - -ResDef(XP_SSL3_RSA_FIPS_3DES_SHA, (SEC_DIALOG_STRING_BASE + 298), "\ -FIPS 140-1 compliant triple DES encryption and SHA-1 MAC") - -ResDef(XP_SSL3_RSA_FIPS_DES_SHA, (SEC_DIALOG_STRING_BASE + 299), "\ -FIPS 140-1 compliant DES encryption and SHA-1 MAC") - -ResDef(XP_DIALOG_EDIT_MODULE_TITLE, (SEC_DIALOG_STRING_BASE + 307), "\ -Edit Security Module") - -ResDef(XP_DIALOG_NEW_MODULE_TITLE, (SEC_DIALOG_STRING_BASE + 308), "\ -Create a New Security Module") - -/* Ciphers */ -ResDef(XP_SSL3_FORTEZZA_SHA, (SEC_DIALOG_STRING_BASE + 309), "\ -FORTEZZA encryption with a 80-bit key and an SHA-1 MAC") - -ResDef(XP_SSL3_FORTEZZA_RC4_SHA, (SEC_DIALOG_STRING_BASE + 310), "\ -FORTEZZA authentication with RC4 128-bit key and an SHA-1 MAC") - -ResDef(XP_SSL3_FORTEZZA_NULL_SHA, (SEC_DIALOG_STRING_BASE + 311), "\ -No encryption with FORTEZZA authentication and an SHA-1 MAC") - - -ResDef(XP_SEC_ENTER_PWD, (SEC_DIALOG_STRING_BASE + 312), "\ -Please enter the password or the pin for\n\ -%s.") - -ResDef(XP_SSO_GET_PW_STRINGS, (SEC_DIALOG_STRING_BASE + 313), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -The %1% has not been initialized with a User PIN or Password. In order \ -%-cont-%") - -ResDef(XP_SSO_GET_PW_STRINGS_1, (SEC_DIALOG_STRING_BASE + 314), "\ -to initialize this card, you must enter the Administration or Site Security \ -Password. If you do not know this password, please hit cancel, and \ -%-cont-%") - -ResDef(XP_SSO_GET_PW_STRINGS_2, (SEC_DIALOG_STRING_BASE + 315), "\ -take this card back to your issuer to be initialized.

Enter adminstration \ -Password for the %2%:.") - -ResDef(XP_PW_RETRY_SSO_STRINGS, (SEC_DIALOG_STRING_BASE + 316), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -The administration password you entered for the %1% was incorrect. \ -%-cont-%") - -ResDef(XP_PW_RETRY_SSO_STRINGS_1, (SEC_DIALOG_STRING_BASE + 317), "\ -Many cards disable themselves after too many incorrect password attempts. \ -If you do not know this password, please hit cancel, and take this card \ -%-cont-%") - -ResDef(XP_PW_RETRY_SSO_STRINGS_2, (SEC_DIALOG_STRING_BASE + 318), "\ -back to your issuer to be initialized.

Enter adminstration Password for \ -the %2%:.") - -ResDef(XP_PW_SETUP_SSO_FAIL_STRINGS, (SEC_DIALOG_STRING_BASE + 319), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -The %1% could not be initialized because of the following error:

\ -%2%") - -ResDef(XP_SEC_EDIT, (SEC_DIALOG_STRING_BASE + 320), "\ -Edit Defaults...") - -ResDef(XP_SEC_LOGIN, (SEC_DIALOG_STRING_BASE + 321), "\ -Login") - -ResDef(XP_SEC_LOGOUT, (SEC_DIALOG_STRING_BASE + 322), "\ -Logout") - -ResDef(XP_SECURITY_ADVISOR, (SEC_DIALOG_STRING_BASE + 323), "\ -%0%%1%%2%%3%%4%%5%") - -ResDef(XP_SECURITY_ADVISOR_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 324), "\ -Security Info") - -ResDef(XP_SEC_SETPASSWORD, (SEC_DIALOG_STRING_BASE + 325), "\ -Set Password...") - -ResDef(XP_SEC_NO_LOGIN_NEEDED, (SEC_DIALOG_STRING_BASE + 326), "\ -Slot or Token does not require a login.") - -ResDef(XP_SEC_ALREADY_LOGGED_IN, (SEC_DIALOG_STRING_BASE + 327), "\ -Slot or Token is already logged in.") - -ResDef(XP_KEY_GEN_TOKEN_SELECT, (SEC_DIALOG_STRING_BASE + 328), "\ -

Select the card or database you wish to generate your key in:\ - %1% \ -%-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_2, (SEC_DIALOG_STRING_BASE + 341), "\ - %-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_3, (SEC_DIALOG_STRING_BASE + 342), "\ -\ -%-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_4, (SEC_DIALOG_STRING_BASE + 343), "\ - \ - \ -%-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_5, (SEC_DIALOG_STRING_BASE + 344), "\ -
For this session only:
%-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_6, (SEC_DIALOG_STRING_BASE + 345), "\ -\ -
%-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_7, (SEC_DIALOG_STRING_BASE + 346), "\ - \ - \ -%-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_8, (SEC_DIALOG_STRING_BASE + 347), "\ -
Never:
%-cont-%") - -ResDef(XP_EDIT_JAVA_PRIVILEGES_STRINGS_9, (SEC_DIALOG_STRING_BASE + 348), "\ -\ -
") - -ResDef(XP_DELETE_JAVA_PRIV_STRINGS, (SEC_DIALOG_STRING_BASE + 349), "\ -Are you sure that you want to delete the %0% privileges for \ -all applets and scripts from %1%?") - -ResDef(XP_MOREINFO_JAVA_PRIV_STRINGS, (SEC_DIALOG_STRING_BASE + 350), "\ - %0% is a %1% access.
\ -

    It consists of:
") - -/* 0 is cert name, 1 risk, 2 targets, 3 view cert button - */ -ResDef(XP_SIGNED_CERT_PRIV_STRINGS, (SEC_DIALOG_STRING_BASE + 351), "\ - \ -%-cont-%") - -ResDef(XP_SIGNED_CERT_PRIV_STRINGS_1, (SEC_DIALOG_STRING_BASE + 352), "\ - \ - \ -%-cont-%") - -ResDef(XP_SIGNED_CERT_PRIV_STRINGS_4, (SEC_DIALOG_STRING_BASE + 355), "\ -
Danger \ -
A Java applet or JavaScript script from \ -%0% is requesting unusual access to your computer or network. \ -%-cont-%") - -ResDef(XP_SIGNED_CERT_PRIV_STRINGS_2, (SEC_DIALOG_STRING_BASE + 353), "\ -You should not grant this access unless you trust that vendor or \ -distributor.
\ - \ -%-cont-%") - -ResDef(XP_SIGNED_CERT_PRIV_STRINGS_3, (SEC_DIALOG_STRING_BASE + 354), "\ -
The access requested is %1% \ -and consists of:
\ - \ -
\ -
\ -%-cont-%") - -ResDef(XP_SIGNED_CERT_PRIV_STRINGS_5, (SEC_DIALOG_STRING_BASE + 356), "\ -
Do you wish to grant the requested access? \ -
\ -Yes, grant this access to all applets and scripts from %0% for this \ -session %-cont-%") - -ResDef(XP_SIGNED_CERT_PRIV_STRINGS_6, (SEC_DIALOG_STRING_BASE + 357), "\ -
No, deny this access (This may mean the applet \ -or script cannot work properly) \ -%-cont-%") - -ResDef(XP_SIGNED_CERT_PRIV_STRINGS_7, (SEC_DIALOG_STRING_BASE + 358), "\ -
\ -Remember this decision for all applets and scripts from %0%
\ -") - -/* 0 is cert name, 1 risk, 2 targets. - */ -ResDef(XP_SIGNED_APPLET_PRIV_STRINGS, (SEC_DIALOG_STRING_BASE + 359), "\ - \ -%-cont-%") - -ResDef(XP_SIGNED_APPLET_PRIV_STRINGS_1, (SEC_DIALOG_STRING_BASE + 360), "\ - \ - \ -%-cont-%") - -ResDef(XP_SIGNED_APPLET_PRIV_STRINGS_3, (SEC_DIALOG_STRING_BASE + 362), "\ -
Danger \ -
A Java applet or JavaScript script on the \ -server \042%0%\042 is requesting unusual access to your computer \ -or network. %-cont-%") - -ResDef(XP_SIGNED_APPLET_PRIV_STRINGS_2, (SEC_DIALOG_STRING_BASE + 361), "\ -It is not digitally signed. Be aware that it may have been \ -tampered with and may cause harm to your computer.
The access requested is %1% \ -and consists of:
\ - \ -
\ -
\ -%-cont-%") - -ResDef(XP_SIGNED_APPLET_PRIV_STRINGS_4, (SEC_DIALOG_STRING_BASE + 363), "\ -
Do you wish to grant the requested access? \ -
\ -Yes, grant this access to all applets and scripts on the \042%0%\042 \ -server for this session \ -%-cont-%") - -ResDef(XP_SIGNED_APPLET_PRIV_STRINGS_5, (SEC_DIALOG_STRING_BASE + 364), "\ -
No, deny this access (This may mean the applet \ -or script cannot work properly) \ -%-cont-%") - -ResDef(XP_SIGNED_APPLET_PRIV_STRINGS_6, (SEC_DIALOG_STRING_BASE + 365), "\ -
\ -Remember this decision for all applets and scripts on the \042%0%\042 \ -server
") - -ResDef(XP_DIALOG_NEW_MODULE, (SEC_DIALOG_STRING_BASE + 366), "\ -Security Module Name:
\ -Security Module File:
") - -ResDef(XP_SEC_MODULE_NO_LIB, (SEC_DIALOG_STRING_BASE + 367), "\ -You must specify a PKCS #11 Version 2.0 library to load\n") - -ResDef(XP_DIALOG_SLOT_INFO, (SEC_DIALOG_STRING_BASE + 368), "\ -Slot Description: %0%
Manufacturer: %1%
\ -Version Number: %2%
Firmware Version: %3%
\ -%-cont-%") - -ResDef(XP_DIALOG_SLOT_INFO_1, (SEC_DIALOG_STRING_BASE + 369), "\ -%4%Token Name: %5%
Token Manufacturer:%6%
\ -Token Model: %7%
Token Serial Number:%8%
\ -%-cont-%") - -ResDef(XP_DIALOG_SLOT_INFO_2, (SEC_DIALOG_STRING_BASE + 370), "\ -Token Version: %9%
Token Firmware Version: %10%
\ -Login Type: %11%
State:%12%%13%%14%") - -ResDef(XP_DIALOG_SLOT_INFO_TITLE, (SEC_DIALOG_STRING_BASE + 371), "\ -Token/Slot Information") - -ResDef(XP_SLOT_LOGIN_REQUIRED, (SEC_DIALOG_STRING_BASE + 372), "\ -Login Required") - -ResDef(XP_SLOT_NO_LOGIN_REQUIRED, (SEC_DIALOG_STRING_BASE + 373), "\ -Public (no login required)") - -ResDef(XP_SLOT_READY, (SEC_DIALOG_STRING_BASE + 374), "\ -Ready") - -ResDef(XP_SLOT_NOT_LOGGED_IN, (SEC_DIALOG_STRING_BASE + 375), "\ -Not Logged In") - -ResDef(XP_SLOT_UNITIALIZED, (SEC_DIALOG_STRING_BASE + 376), "\ -Uninitialized") - -ResDef(XP_SLOT_NOT_PRESENT, (SEC_DIALOG_STRING_BASE + 377), "\ -Not Present") - -ResDef(XP_SLOT_DISABLED, (SEC_DIALOG_STRING_BASE + 378), "\ -Disabled(") - -ResDef(XP_SLOT_DISABLED_2, (SEC_DIALOG_STRING_BASE + 379), "\ -)") - -ResDef(XP_SLOT_PASSWORD_INIT, (SEC_DIALOG_STRING_BASE + 380), "\ - Initialize Token") - -ResDef(XP_SLOT_PASSWORD_CHANGE, (SEC_DIALOG_STRING_BASE + 381), "\ - Change Password ") - -ResDef(XP_SLOT_PASSWORD_SET, (SEC_DIALOG_STRING_BASE + 382), "\ - Set Password ") - -ResDef(XP_SLOT_PASSWORD_NO, (SEC_DIALOG_STRING_BASE + 383), "\ - No Password ") - -ResDef(XP_DOWNLOAD_EMAIL_CERT_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 384), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -You are downloading the e-mail certificate of another user. After accepting \ -%-cont-%") - -ResDef(XP_DOWNLOAD_EMAIL_CERT_DIALOG_STRINGS_1, (SEC_DIALOG_STRING_BASE + 385), "\ -this certificate you will be able to send encrypted e-mail to this user. \ -Press the More Info button to see details of the e-mail certificate. \ -%-cont-%") - -ResDef(XP_DOWNLOAD_EMAIL_CERT_DIALOG_STRINGS_2, (SEC_DIALOG_STRING_BASE + 386), "\ -
\ -\ -
Certificate For:\ -%-cont-%") - -ResDef(XP_DOWNLOAD_EMAIL_CERT_DIALOG_STRINGS_3, (SEC_DIALOG_STRING_BASE + 387), "\ -%1%
\ -Email Address:%2%
\ -%-cont-%") - -ResDef(XP_DOWNLOAD_EMAIL_CERT_DIALOG_STRINGS_4, (SEC_DIALOG_STRING_BASE + 388), "\ -Certified By:%3%
\ -\ -

") - -ResDef(XP_EMAIL_CERT_DOWNLOAD_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 389), "\ -Download an E-Mail Certificate") - -ResDef(XP_CA_CERT_SSL_OK_STRING, (SEC_DIALOG_STRING_BASE + 390), "\ -Accept this Certificate Authority for Certifying network sites") - -ResDef(XP_CA_CERT_EMAIL_OK_STRING, (SEC_DIALOG_STRING_BASE + 391), "\ -Accept this Certificate Authority for Certifying e-mail users") - -ResDef(XP_CA_CERT_OBJECT_SIGNING_OK_STRING, (SEC_DIALOG_STRING_BASE + 392), "\ -Accept this Certificate Authority for Certifying software developers") - -ResDef(XP_CERT_MULTI_SUBJECT_SELECT_STRING, (SEC_DIALOG_STRING_BASE + 393), "\ -%0%

%1%") - -ResDef(XP_CERT_MULTI_SUBJECT_SELECT_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 394), "\ -Select A Certificate") - -ResDef(XP_CERT_SELECT_EDIT_STRING, (SEC_DIALOG_STRING_BASE + 395), "\ -Please select a certificate to edit:

") - -ResDef(XP_CERT_SELECT_DEL_STRING, (SEC_DIALOG_STRING_BASE + 396), "\ -Please select a certificate to delete:

") - -ResDef(XP_CERT_SELECT_VIEW_STRING, (SEC_DIALOG_STRING_BASE + 397), "\ -Please select a certificate to view:

") - -ResDef(XP_CERT_SELECT_VERIFY_STRING, (SEC_DIALOG_STRING_BASE + 398), "\ -Please select a certificate to verify:

") - -ResDef(XP_DEL_EMAIL_CERT_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 399), "\ -Delete An E-mail Certificate") - -ResDef(XP_DELETE_EMAIL_CERT_STRINGS, (SEC_DIALOG_STRING_BASE + 400), "\ -Are you sure that you want to delete this E-mail Certificate?

%0%") - -ResDef(XP_SET_EMAIL_CERT_STRING, (SEC_DIALOG_STRING_BASE + 401), "\ - \ -Make this the default Certificate for signed and encrypted e-mail") - -/* - * NOTE to Translators: The following strings are part of a PKCS #11 standard - * they must be exactly 32 bytes long (space padded). If they are not, - * Communicator will revert to it's old strings */ -ResDef(SEC_PK11_MANUFACTURER, (SEC_DIALOG_STRING_BASE + 402), "\ -"MOZ_NAME_COMPANY" ") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_PK11_LIBARARY, (SEC_DIALOG_STRING_BASE + 403), "\ -"MOZ_NAME_PRODUCT" Internal Crypto Svc ") -#else -ResDef(SEC_PK11_LIBARARY, (SEC_DIALOG_STRING_BASE + 403), "\ -Communicator Internal Crypto Svc") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_PK11_TOKEN, (SEC_DIALOG_STRING_BASE + 404), "\ -"MOZ_NAME_PRODUCT" Generic Crypto Svcs ") -#else -ResDef(SEC_PK11_TOKEN, (SEC_DIALOG_STRING_BASE + 404), "\ -Communicator Generic Crypto Svcs") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_PK11_PRIV_TOKEN, (SEC_DIALOG_STRING_BASE + 405), "\ -"MOZ_NAME_PRODUCT" Certificate DB ") -#else -ResDef(SEC_PK11_PRIV_TOKEN, (SEC_DIALOG_STRING_BASE + 405), "\ -Communicator Certificate DB ") -#endif - -/* - * NOTE to Translators: The following strings are part of a PKCS #11 standard - * they must be exactly 64 bytes long (space padded). If they are not, - * Communicator will revert to it's old strings */ -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_PK11_SLOT, (SEC_DIALOG_STRING_BASE + 406), "\ -"MOZ_NAME_PRODUCT" Internal Cryptographic Services Version 4.0 ") -#else -ResDef(SEC_PK11_SLOT, (SEC_DIALOG_STRING_BASE + 406), "\ -Communicator Internal Cryptographic Services Version 4.0 ") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(SEC_PK11_PRIV_SLOT, (SEC_DIALOG_STRING_BASE + 407), "\ -"MOZ_NAME_PRODUCT" User Private Key and Certificate Services ") -#else -ResDef(SEC_PK11_PRIV_SLOT, (SEC_DIALOG_STRING_BASE + 407), "\ -Communicator User Private Key and Certificate Services ") -#endif - -ResDef(SEC_PK11_FIPS_SLOT, (SEC_DIALOG_STRING_BASE + 408), "\ -"MOZ_NAME_BRAND" Internal FIPS-140-1 Cryptographic Services ") - -ResDef(SEC_PK11_FIPS_PRIV_SLOT, (SEC_DIALOG_STRING_BASE + 409), "\ -"MOZ_NAME_BRAND" FIPS-140-1 User Private Key Services ") - -ResDef(XP_VERIFY_CERT_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 410), "\ -Verification of the selected certificate failed for the following \ -reasons:

%0%") - -ResDef(XP_VERIFYCERT_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 411), "\ -Verify A Certificate") - -ResDef(XP_VERIFY_CERT_OK_DIALOG_STRING, (SEC_DIALOG_STRING_BASE + 412), "\ -The Certificate has been successfully verified.") - -ResDef(XP_VERIFY_ERROR_EXPIRED, (SEC_DIALOG_STRING_BASE + 413), "\ -Certificate has expired") - -ResDef(XP_VERIFY_ERROR_NOT_CERTIFIED, (SEC_DIALOG_STRING_BASE + 414), "\ -Not certified for %s") - -ResDef(XP_VERIFY_ERROR_NOT_TRUSTED, (SEC_DIALOG_STRING_BASE + 415), "\ -Certificate not trusted") - -ResDef(XP_VERIFY_ERROR_NO_CA, (SEC_DIALOG_STRING_BASE + 416), "\ -Unable to find Certificate Authority") - -ResDef(XP_VERIFY_ERROR_BAD_SIG, (SEC_DIALOG_STRING_BASE + 417), "\ -Certificate signature is invalid") - -ResDef(XP_VERIFY_ERROR_BAD_CRL, (SEC_DIALOG_STRING_BASE + 418), "\ -Certificate Revocation List is invalid") - -ResDef(XP_VERIFY_ERROR_REVOKED, (SEC_DIALOG_STRING_BASE + 419), "\ -Certificate has been revoked") - -ResDef(XP_VERIFY_ERROR_NOT_CA, (SEC_DIALOG_STRING_BASE + 420), "\ -Not a valid Certificate Authority") - -ResDef(XP_VERIFY_ERROR_INTERNAL_ERROR, (SEC_DIALOG_STRING_BASE + 421), "\ -Internal Error") - -ResDef(XP_VERIFY_ERROR_SIGNING, (SEC_DIALOG_STRING_BASE + 422), "\ -Digital Signing") - -ResDef(XP_VERIFY_ERROR_ENCRYPTION, (SEC_DIALOG_STRING_BASE + 423), "\ -Encryption") - -ResDef(XP_VERIFY_ERROR_CERT_SIGNING, (SEC_DIALOG_STRING_BASE + 424), "\ -Certificate Signing") - -ResDef(XP_VERIFY_ERROR_CERT_UNKNOWN_USAGE, (SEC_DIALOG_STRING_BASE + 425), "\ -Unknown Usage") - -ResDef(XP_VERIFY_ERROR_EMAIL_CA, (SEC_DIALOG_STRING_BASE + 426), "\ -E-Mail Certification") - -ResDef(XP_VERIFY_ERROR_SSL_CA, (SEC_DIALOG_STRING_BASE + 427), "\ -Internet Site Certification") - -ResDef(XP_VERIFY_ERROR_OBJECT_SIGNING_CA, (SEC_DIALOG_STRING_BASE + 428), "\ -Software Developer Certification") - -ResDef(XP_VERIFY_ERROR_EMAIL, (SEC_DIALOG_STRING_BASE + 429), "\ -E-Mail") - -ResDef(XP_VERIFY_ERROR_SSL, (SEC_DIALOG_STRING_BASE + 430), "\ -Internet Site") - -ResDef(XP_VERIFY_ERROR_OBJECT_SIGNING, (SEC_DIALOG_STRING_BASE + 431), "\ -Software Developer") - -ResDef(XP_DIALOG_NULL_STRINGS, (SEC_DIALOG_STRING_BASE + 432), "\ -%0%") - -ResDef(XP_FIPS_MESSAGE_1, (SEC_DIALOG_STRING_BASE + 433), "\ -This will replace the "MOZ_NAME_PRODUCT" internal module with the "MOZ_NAME_PRODUCT" FIPS-140-1 \ -cryptographic module.\n\nThe FIPS-140-1 cryptographic module limits security ") - -ResDef(XP_FIPS_MESSAGE_2, (SEC_DIALOG_STRING_BASE + 434), "\ -functions to those approved by the United States Federal Government's internal \ -standards.\n\nDo you wish to delete the internal module, anyway?") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_INT_MODULE_MESSAGE_1, (SEC_DIALOG_STRING_BASE + 435), "\ -This will replace the FIPS-140-1 cryptographic module with the "MOZ_NAME_PRODUCT" \ -internal module.\n\nThis means that "MOZ_NAME_PRODUCT" will no longer be FIPS-140-1 \ -compliant (security ") -#else -ResDef(XP_INT_MODULE_MESSAGE_1, (SEC_DIALOG_STRING_BASE + 435), "\ -This will replace the FIPS-140-1 cryptographic module with the "MOZ_NAME_PRODUCT" \ -internal module.\n\nThis means that Communicator will no longer be FIPS-140-1 \ -compliant (security ") -#endif - -ResDef(XP_INT_MODULE_MESSAGE_2, (SEC_DIALOG_STRING_BASE + 436), "\ -functions to those approved by the United States Federal Government's internal \ -standards).\n\nDo you wish to delete the FIPS-140-1 module, anyway?") - -ResDef(XP_SEC_FETCH, (SEC_DIALOG_STRING_BASE + 437), "\ -Search") - -ResDef(XP_DIALOG_FETCH_TITLE, (SEC_DIALOG_STRING_BASE + 438), "\ -Search Directory for Certificates") - -ResDef(XP_DIALOG_FETCH_CANCEL_BUTTON_STRINGS, (SEC_DIALOG_STRING_BASE + 439), "\ -

  %0%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_DIALOG_FETCH_STRINGS, (SEC_DIALOG_STRING_BASE + 440), "\ -"MOZ_NAME_PRODUCT" will search network Directories for the Security Certificates \ -that are used to send other people encrypted mail messages.

Enter the exact E-mail \ -%-cont-%") -#else -ResDef(XP_DIALOG_FETCH_STRINGS, (SEC_DIALOG_STRING_BASE + 440), "\ -Communicator will search network Directories for the Security Certificates \ -that are used to send other people encrypted mail messages.

Enter the exact E-mail \ -%-cont-%") -#endif - -ResDef(XP_DIALOG_FETCH_STRINGS2, (SEC_DIALOG_STRING_BASE + 441), "\ -addresses of the people you are looking for and press Search. \ -\ -\ -\ -\ -%-cont-%") - -ResDef(XP_DIALOG_FETCH_STRINGS4, (SEC_DIALOG_STRING_BASE + 443), "\ -\ -\ -\ -\ -
Directory:
E-mail Addresses:
") - -ResDef(XP_DIALOG_ALL_DIRECTORIES, (SEC_DIALOG_STRING_BASE + 444), "\ -All Directories") - -ResDef(XP_DIALOG_FETCH_RESULTS_TITLE, (SEC_DIALOG_STRING_BASE + 445), "\ -Search Results") - -ResDef(XP_DIALOG_FETCH_RESULTS_STRINGS, (SEC_DIALOG_STRING_BASE + 446), "\ -Press the %ok% button to save the Certificates that were found, or \ -%cancel% to discard them.

\ -Certificates for the following E-Mail users were found in the \ -directory:
\ -%0%

%1%%2%") - -ResDef(XP_DIALOG_FETCH_NOT_FOUND_STRINGS, (SEC_DIALOG_STRING_BASE + 447), "\ -Certificates for the following E-Mail users were not found in the \ -directory:
") - -ResDef(XP_DIALOG_PUBLISH_CERT_TITLE, (SEC_DIALOG_STRING_BASE + 448), "\ -Send Your E-Mail Certificate To A Directory") - -ResDef(XP_DIALOG_PUBLISH_CERT_STRINGS, (SEC_DIALOG_STRING_BASE + 449), "\ -Select the Directory to send your \ -Certificate to:

\ -
\ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_DIALOG_PUBLISH_CERT_STRINGS2, (SEC_DIALOG_STRING_BASE + 450), "\ -"MOZ_NAME_PRODUCT" will send your Security Certificate to a network Directory \ -so that other user's can easily find it to send you \ -encrypted messages.") -#else -ResDef(XP_DIALOG_PUBLISH_CERT_STRINGS2, (SEC_DIALOG_STRING_BASE + 450), "\ -Communicator will send your Security Certificate to a network Directory \ -so that other user's can easily find it to send you \ -encrypted messages.") -#endif - -ResDef(XP_STATUS_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 451), "\ -%0%%1%%2%%3%%4%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_DIALOG_FETCH2_STRINGS, (SEC_DIALOG_STRING_BASE + 452), "\ -"MOZ_NAME_PRODUCT" will search a Directory for the Security \ -Certificates that are needed to send this encrypted message. \ -%-cont-%") -#else -ResDef(XP_DIALOG_FETCH2_STRINGS, (SEC_DIALOG_STRING_BASE + 452), "\ -Communicator will search a Directory for the Security \ -Certificates that are needed to send this encrypted message. \ -%-cont-%") -#endif - -ResDef(XP_DIALOG_FETCH2_STRINGS2, (SEC_DIALOG_STRING_BASE + 453), "\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -
Select a Directory:
Searching For:%2%
") - -ResDef(XP_SENDING_TO_DIRECTORY, (SEC_DIALOG_STRING_BASE + 455), "\ -Sending to Directory") - -ResDef(XP_SEARCHING_DIRECTORY, (SEC_DIALOG_STRING_BASE + 456), "\ -Searching Directory") - -ResDef(XP_DIRECTORY_PASSWORD, (SEC_DIALOG_STRING_BASE + 457), "\ -Enter Password for Directory") - -ResDef(XP_DIRECTORY_ERROR, (SEC_DIALOG_STRING_BASE + 458), "\ -An error occurred when communicating with the Directory") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_KEY_GEN_MOREINFO_STRINGS, (SEC_DIALOG_STRING_BASE + 459), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -"MOZ_NAME_PRODUCT" is about to generate a Private Key for you. It will be used \ -along with the Certificate you are now \ -%-cont-%") -#else -ResDef(XP_KEY_GEN_MOREINFO_STRINGS, (SEC_DIALOG_STRING_BASE + 459), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Communicator is about to generate a Private Key for you. It will be used \ -along with the Certificate you are now \ -%-cont-%") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_1, (SEC_DIALOG_STRING_BASE + 460), "\ -requesting to identify you to Web\ -Sites and via Email. You Private Key never leaves your computer, and if you \ -choose, will be protected by a "MOZ_NAME_PRODUCT" password.

\ -%-cont-%") -#else -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_1, (SEC_DIALOG_STRING_BASE + 460), "\ -requesting to identify you to Web\ -Sites and via Email. You Private Key never leaves your computer, and if you \ -choose, will be protected by a Communicator password.

\ -%-cont-%") -#endif - -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_2, (SEC_DIALOG_STRING_BASE + 461), "\ -Passwords are particularly important if you are in an environment where other \ -people have access to your computer, either physically or over a network. \ -%-cont-%") - -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_3, (SEC_DIALOG_STRING_BASE + 462), "\ -Do not give others your password, because that would allow them to use your \ -Certificate to impersonate you.

\ -%-cont-%") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_4, (SEC_DIALOG_STRING_BASE + 463), "\ -"MOZ_NAME_PRODUCT" uses a complex mathematical operation to generate your private \ -key. It may take up to severeal minutes to complete. If you interrupt \ -%-cont-%") -#else -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_4, (SEC_DIALOG_STRING_BASE + 463), "\ -Communicator uses a complex mathematical operation to generate your private \ -key. It may take up to severeal minutes to complete. If you interrupt \ -%-cont-%") -#endif - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_5, (SEC_DIALOG_STRING_BASE + 464), "\ -"MOZ_NAME_PRODUCT" during this process, it will not create your key, and you will \ -have to reapply for your Certificate.") -#else -ResDef(XP_KEY_GEN_MOREINFO_STRINGS_5, (SEC_DIALOG_STRING_BASE + 464), "\ -Communicator during this process, it will not create your key, and you will \ -have to reapply for your Certificate.") -#endif - -ResDef(XP_PW_MOREINFO_STRINGS, (SEC_DIALOG_STRING_BASE + 465), "\ -%sec-banner-begin%%0%%sec-banner-end%\ -Passwords are particularly important if you are in an environment where other \ -%-cont-%") - -ResDef(XP_PW_MOREINFO_STRINGS_1, (SEC_DIALOG_STRING_BASE + 466), "\ -people have access to your computer, either physically or over a network. \ -Do not give others your password, because that would allow them to use your \ -%-cont-%") - -ResDef(XP_PW_MOREINFO_STRINGS_2, (SEC_DIALOG_STRING_BASE + 467), "\ -Certificate to impersonate you.

The safest passwords are at least 8 \ -characters long, include both letters, and number or symbols, and contain \ -no words found in a dictionary.") - -ResDef(XP_PKCS12_TITLE_STRING, (SEC_DIALOG_STRING_BASE + 468), "\ -Select a Card or Database") - -ResDef(XP_PKCS12_SELECT_DIALOG_STRINGS, (SEC_DIALOG_STRING_BASE + 469), "\ -Select the card or database you wish to import certificates to:
\ -") - -ResDef(XP_VERIFY_NOT_FORTEZZA_CA, (SEC_DIALOG_STRING_BASE + 470), "\ -Not a valid FORTEZZA Certificate Authority") - -ResDef(XP_VERIFY_NO_PUBLIC_KEY, (SEC_DIALOG_STRING_BASE + 471), "\ -Certificate does not have a Recognized Public Key") - -#ifdef XP_MAC -ResDef(XP_PREENC_SAVE_PROMPT, (SEC_DIALOG_STRING_BASE + 472), "\ -Save this file encrypted [yes] or unencrypted [no]") -#else -ResDef(XP_PREENC_SAVE_PROMPT, (SEC_DIALOG_STRING_BASE + 472), "\ -Save this file encrypted [ok] or unencrypted [cancel]") -#endif - -ResDef(XP_SEC_ERROR_PWD, (SEC_DIALOG_STRING_BASE + 473), "\ -Successive login failures may disable this card or database. \ -Password is invalid. Retry?\n\ - %s\n") - -ResDef(XP_VERIFY_NO_KRL, (SEC_DIALOG_STRING_BASE + 474), -"No key revocation list for the certificate has been found.\n\ -You must load the key revocation list before continuing.") - -ResDef(XP_VERIFY_KRL_EXPIRED, (SEC_DIALOG_STRING_BASE + 475), -"The key revocation list for the certificate has expired.\n\ -Reload a new key revocation list.") - -ResDef(XP_VERIFY_KRL_BAD_SIGNATURE, (SEC_DIALOG_STRING_BASE + 476), -"The key revocation list for the certificate has an invalid signature.\n\ -Reload a new key revocation list.") - -ResDef(XP_VERIFY_REVOKED_KEY, (SEC_DIALOG_STRING_BASE + 477), -"The key for the certificate has been revoked.") - -ResDef(XP_VERIFY_KRL_INVALID, (SEC_DIALOG_STRING_BASE + 478), -"The key revocation list has an invalid format.") - -ResDef(XP_VERIFY_BAD_CERT_DOMAIN, (SEC_DIALOG_STRING_BASE + 479), -MOZ_NAME_BRAND" is unable to communicate securely with this site\n\ -because the domain to which you are attempting to connect\n\ -does not match the domain name in the server's certificate.") - -/* Fortezza SMIME strings */ -ResDef(XP_SMIME_SKIPJACK, (SEC_DIALOG_STRING_BASE + 480), "\ -FORTEZZA SKIPJACK encryption with an 80-bit key") - -/* New Security Advisor->Crypto Modules->Edit menu */ -ResDef(XP_DIALOG_EDIT_MODULE, (SEC_DIALOG_STRING_BASE + 481), "\ -Security Module Name: %0%\ -
\ -Security Module File: %3%\ -
\ -%-cont-%") - -ResDef(XP_DIALOG_EDIT_MODULE_0, (SEC_DIALOG_STRING_BASE + 482), "\ -Manufacturer: %6%
Description:%8%
\ -PKCS #11 Version: %7%
\ -Library Version: %9%
%-cont-%") - -ResDef(XP_DIALOG_EDIT_MODULE_1, (SEC_DIALOG_STRING_BASE + 483), "\ -

\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_EDIT_MODULE_2, (SEC_DIALOG_STRING_BASE + 484), "\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_EDIT_MODULE_3, (SEC_DIALOG_STRING_BASE + 485), "\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_EDIT_MODULE_4, (SEC_DIALOG_STRING_BASE + 486), "\ -\ -
\ -\ -
%-cont-%") - -ResDef(XP_DIALOG_EDIT_MODULE_5, (SEC_DIALOG_STRING_BASE + 487), "\ -
") - - ResDef(XP_SEC_CONFIG, (SEC_DIALOG_STRING_BASE + 491), "\ - Config") - - /* Config Slot/Token */ - - ResDef(XP_DIALOG_CONFIG_SLOT, (SEC_DIALOG_STRING_BASE + 492), "\ -

Module Name: %0%\ -
Slot Description: %1%\ -
Token Name: %2%\ -
Remarks: %3%


\ - %-cont-%") - - ResDef(XP_DIALOG_CONFIG_SLOT_0, (SEC_DIALOG_STRING_BASE + 493), "\ -

\ -

\ - Disable this token. \ - %-cont-%") - - ResDef(XP_DIALOG_CONFIG_SLOT_1, (SEC_DIALOG_STRING_BASE + 494), "\ -

\ -

\ -
\ - Enable this token and turn on the following functions: \ - %6%\ -
") - - - /* display this if try to configure a slot w/o token */ - ResDef(XP_DIALOG_CONFIG_SLOT_NO_SLOT, (SEC_DIALOG_STRING_BASE + 495), "\ -

Module Name: %0%\ -
Slot Description: %1%\ -
Token Name: %2%\ -


\ - %-cont-%") - - ResDef(XP_DIALOG_CONFIG_SLOT_NO_SLOT_0, (SEC_DIALOG_STRING_BASE + 496), "\ -

\ - %3%
%4%
%5%\ -

") - - ResDef(XP_DIALOG_CONFIG_SLOT_TITLE, (SEC_DIALOG_STRING_BASE + 497), "\ - Configure Slot") - - /* define prompts for lm_pkcs11.c */ - /* squeezed in this space */ - ResDef(XP_JS_PKCS11_MOD_PROMPT, (SEC_DIALOG_STRING_BASE + 498), "Module Name: ") - ResDef(XP_JS_PKCS11_DLL_PROMPT, (SEC_DIALOG_STRING_BASE + 499), "File: ") - - - /* some Mechanism Type labels */ - ResDef(XP_CKM_RSA_PKCS_LABEL, (SEC_DIALOG_STRING_BASE + 500),\ - "RSA PKCS encryption") - - - /* define some messages for lm_pkcs11.c */ - ResDef(XP_JS_PKCS11_EXTERNAL_DELETED, (SEC_DIALOG_STRING_BASE + 501), - "External security module successfully deleted") - ResDef(XP_JS_PKCS11_INTERNAL_DELETED, (SEC_DIALOG_STRING_BASE + 502), - "Internal security module successfully deleted") - ResDef(XP_JS_PKCS11_ADD_MOD_SUCCESS, (SEC_DIALOG_STRING_BASE + 503), - "A new security module has been installed") - ResDef(XP_JS_PKCS11_ADD_MOD_WARN, (SEC_DIALOG_STRING_BASE + 504), - "Are you sure you want to install this security module?") - ResDef(XP_JS_PKCS11_DEL_MOD_WARN, (SEC_DIALOG_STRING_BASE + 505), - "Are you sure you want to delete this security module?") - -ResDef(XP_SEC_PROMPT_FOR_NICKNAME, (SEC_DIALOG_STRING_BASE + 506), -"Enter a nickname for the certificate:") - - /* Security Advisor->Signers->CRL's */ - -ResDef(XP_DIALOG_SHOW_CRLS_TITLE, (SEC_DIALOG_STRING_BASE + 507), "\ -View/Edit CRL's") - -ResDef(XP_DIALOG_SHOW_CRL, (SEC_DIALOG_STRING_BASE + 508), "\ -

%0%

\ -URL:%1%
Last Update:%2%
Next Update:%3% %4%
\ -Signed by:
    %5%

\ -
") - -ResDef(XP_DIALOG_NEW_CRL, (SEC_DIALOG_STRING_BASE + 509), "\ -Enter the URL of the new CRL/CKL to load:") - -ResDef(XP_DIALOG_EDIT_CRL, (SEC_DIALOG_STRING_BASE + 510), "\ -

%0%

\ -Enter the URL of the Certificate Revocation List.

\ -URL:") - -ResDef(XP_DIALOG_NO_CRL_SELECTED, (SEC_DIALOG_STRING_BASE + 511), "\ -No CRL was selected. Please select a CRL from the list.") - -ResDef(XP_DIALOG_NO_URL_FOR_CRL, (SEC_DIALOG_STRING_BASE + 512), "\ -Selected CRL does not have a valid URL to load from.\n\ -Use 'New/Edit...' to set the URL.") - -ResDef(XP_DIALOG_CRL_EXPIRED_TAG, (SEC_DIALOG_STRING_BASE + 513), "\ -Expired") - -ResDef(XP_DIALOG_NO_URL_GIVEN, (SEC_DIALOG_STRING_BASE + 514), "\ -You did not enter a URL: No new CRL loaded.") - -ResDef(XP_DIALOG_CRL_EDIT_TITLE, (SEC_DIALOG_STRING_BASE + 515), "\ -Edit CRL") - -ResDef(XP_DIALOG_CRLS_TITLE, (SEC_DIALOG_STRING_BASE + 516), "\ -CRL") - -ResDef(XP_DIALOG_JS_HEADER_STRINGS_WITH_UTF8_CHARSET, (SEC_DIALOG_STRING_BASE + 517), "\ -\ -%0%\n\ -\n\ -%-cont-%") - -ResDef (MK_MSG_ASK_HTML_MAIL_4, XP_MSG_BASE + 947, "\ -\n\ -\n\ -\n\ -%-cont-%") - -ResDef (MK_MSG_ASK_HTML_MAIL_5, XP_MSG_BASE + 948, "\ -\n\ -\n\ -\n\ -") - - -/* Reserve a bunch extra, just in case. */ - -ResDef (MK_MSG_ASK_HTML_MAIL_6, XP_MSG_BASE + 949, "") -ResDef (MK_MSG_ASK_HTML_MAIL_7, XP_MSG_BASE + 950, "") -ResDef (MK_MSG_ASK_HTML_MAIL_8, XP_MSG_BASE + 951, "") -ResDef (MK_MSG_ASK_HTML_MAIL_9, XP_MSG_BASE + 952, "") -ResDef (MK_MSG_ASK_HTML_MAIL_10, XP_MSG_BASE + 953, "") - -/* String to use to indicate everyone at a given domain. Used as - in "@netscape.com". */ -ResDef (MK_MSG_EVERYONE, XP_MSG_BASE + 954, "") - -ResDef (MK_MSG_HTML_RECIPIENTS_TITLE, XP_MSG_BASE + 955, "HTML Recipients") - -ResDef (MK_MSG_HTML_RECIPIENTS, XP_MSG_BASE + 956, "\ -The recipients and domains below are not listed as being able to read\n\ -HTML messages. If this listing is incorrect, you may change it below.\n\ -%-cont-%") - -ResDef (MK_MSG_HTML_RECIPIENTS_1, XP_MSG_BASE + 957, "\ -

\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -
Does not prefer HTMLPrefers HTML
\n\ -\n\ -\n\ -
\n\ -\n\ -%-cont-%") - -ResDef (MK_MSG_HTML_RECIPIENTS_3, XP_MSG_BASE + 959, "\ -

\n\ -\n\ -

\n\ -
\n\ -\n\ -
\n\ -

\n\ -

\n\ -%-cont-%") - -ResDef (MK_MSG_HTML_RECIPIENTS_5, XP_MSG_BASE + 961, "\ -\n\ -\n\ -\n\ -%-cont-%") - -ResDef (MK_MSG_HTML_RECIPIENTS_6, XP_MSG_BASE + 962, "\ -\n\ -\n\ -
\n\ -\n\ -") - - -/* Reserve a bunch extra, just in case. */ - -ResDef (MK_MSG_HTML_RECIPIENTS_7, XP_MSG_BASE + 963, "") -ResDef (MK_MSG_HTML_RECIPIENTS_8, XP_MSG_BASE + 964, "") -ResDef (MK_MSG_HTML_RECIPIENTS_9, XP_MSG_BASE + 965, "") -ResDef (MK_MSG_HTML_RECIPIENTS_10, XP_MSG_BASE + 966, "") -ResDef (MK_MSG_HTML_RECIPIENTS_11, XP_MSG_BASE + 967, "") - -ResDef (MK_ADDR_ENTRY_ALREADY_EXISTS, XP_MSG_BASE + 968, - "An Address Book entry with this name and email address already exists.") - -ResDef (MK_ADDR_ENTRY_ALREADY_IN_LIST, XP_MSG_BASE + 969, - "This Address Book entry is already a member of this list.") - -ResDef (MK_LDAP_CUSTOM1, XP_MSG_BASE + 970, "Custom 1") -ResDef (MK_LDAP_CUSTOM2, XP_MSG_BASE + 971, "Custom 2") -ResDef (MK_LDAP_CUSTOM3, XP_MSG_BASE + 972, "Custom 3") -ResDef (MK_LDAP_CUSTOM4, XP_MSG_BASE + 973, "Custom 4") -ResDef (MK_LDAP_CUSTOM5, XP_MSG_BASE + 974, "Custom 5") - -ResDef (MK_ADDR_ADD_PERSON_TO_ABOOK, XP_MSG_BASE + 975, -"Mailing lists can only contain entries from the Personal Address Book.\n\ -Would you like to add %s to the address book?") - -ResDef (MK_ADDR_ENTRY_IS_LIST, XP_MSG_BASE + 976, -"A mailing list cannot have itself as a member") -ResDef (MK_ADDR_NEW_CARD, XP_MSG_BASE + 977, -"New Card") -ResDef (MK_ADDR_NEW_PERCARD, XP_MSG_BASE + 978, -"New Personal Card") -ResDef (MK_ADDR_PERCARD, XP_MSG_BASE + 979, -"Personal Card for %s") -ResDef (MK_ADDR_CCNAME, XP_MSG_BASE + 980, "CC: %s") -ResDef (MK_ADDR_BCCNAME, XP_MSG_BASE + 981, "Bcc: %s") -ResDef (MK_ADDR_TONAME, XP_MSG_BASE + 982, "To: %s") - -ResDef (XP_EDT_ERR_SAVE_WRITING_ROOT, XP_MSG_BASE + 983, - "%s can't be saved. Either the disk is full\n\ -or the file is locked.\n\n\ -Try saving on a different disk or try saving\n\ -%s with a different name.") -ResDef (XP_EDT_HEAD_FAILED, XP_MSG_BASE + 984, - "HEAD call to server failed.\nUpload aborted.") - -ResDef (MK_UNABLE_TO_OPEN_ADDR_FILE, XP_MSG_BASE + 985, - "Unable to open address book database file.") -ResDef (MK_ADDR_LIST_ALREADY_EXISTS, XP_MSG_BASE + 986, - "A mailing list with this name already exists.") -#ifndef MOZ_COMMUNICATOR_NAME -ResDef (MK_ADDR_UNABLE_TO_IMPORT, XP_MSG_BASE + 987, - MOZ_NAME_PRODUCT" is unable to import this file into the address book.") -#else -ResDef (MK_ADDR_UNABLE_TO_IMPORT, XP_MSG_BASE + 987, - "Communicator is unable to import this file into the address book.") -#endif - -ResDef(MK_MSG_PURGING_NEWSGROUP_ETC, XP_MSG_BASE + 988, - "Mail: Purging discussion group %s...") - - ResDef(MK_MSG_PURGING_NEWSGROUP_HEADER, XP_MSG_BASE + 989, - "Mail: Purging discussion group %s...header %ld") - -ResDef(MK_MSG_PURGING_NEWSGROUP_ARTICLE, XP_MSG_BASE + 990, -"Purging discussion group %s...article %ld") - -ResDef(MK_MSG_PURGING_NEWSGROUP_DONE, XP_MSG_BASE + 991, - "Mail: Purging discussion group %s...Done") - -ResDef (XP_EDT_PUBLISH_ERROR_BODY, XP_MSG_BASE + 992, - "Make sure you specify the entire destination URL.\n\ -e.g. http://somemachine/somedirectory/somefile.html\n\n\ -Try to publish to this URL anyway?") -ResDef (XP_EDT_PUBLISH_BAD_URL, XP_MSG_BASE + 993, - "Publish destination is invalid.") -ResDef (XP_EDT_PUBLISH_BAD_CHAR, XP_MSG_BASE + 994, - "Publish destination contains at least one illegal character.") -ResDef (XP_EDT_PUBLISH_BAD_PROTOCOL, XP_MSG_BASE + 995, - "Publish destination must begin with ftp:// or http://") -ResDef (XP_EDT_PUBLISH_NO_FILE, XP_MSG_BASE + 996, - "Publish destination ends in a slash.") -ResDef (XP_EDT_PUBLISH_NO_EXTENSION, XP_MSG_BASE + 997, - "Publish destination has no file extension.") - -ResDef (MK_CVCOLOR_SOURCE_OF, XP_MSG_BASE + 998, - "Source of: ") -ResDef (MK_ACCESS_COOKIES_THE_SERVER, XP_MSG_BASE + 999, - "The server ") -ResDef (MK_ACCESS_COOKIES_WISHES, XP_MSG_BASE + 1000, - "\nwishes to set a cookie that will be sent ") -ResDef (MK_ACCESS_COOKIES_TOANYSERV, XP_MSG_BASE + 1001, - "\nto any server in the domain ") -ResDef (MK_ACCESS_COOKIES_TOSELF, XP_MSG_BASE + 1002, - "only back to itself") -ResDef (MK_ACCESS_COOKIES_NAME_AND_VAL, XP_MSG_BASE + 1003, - "\nThe name and value of the cookie are:\n") -ResDef (MK_ACCESS_COOKIES_COOKIE_WILL_PERSIST, XP_MSG_BASE + 1004, - "\nThis cookie will persist until ") -ResDef (MK_ACCESS_COOKIES_SET_IT, XP_MSG_BASE + 1005, - "\nDo you wish to allow the cookie to be set?") - -ResDef (MK_CACHE_CONTENT_LENGTH, XP_MSG_BASE + 1006, - "Content Length:") -ResDef (MK_CACHE_REAL_CONTENT_LENGTH, XP_MSG_BASE + 1007, - "Real Content Length:") -ResDef (MK_CACHE_CONTENT_TYPE, XP_MSG_BASE + 1008, - "Content type:") -ResDef (MK_CACHE_LOCAL_FILENAME, XP_MSG_BASE + 1009, - "Local filename:") -ResDef (MK_CACHE_LAST_MODIFIED, XP_MSG_BASE + 1010, - "Last Modified:") -ResDef (MK_CACHE_EXPIRES, XP_MSG_BASE + 1011, - "Expires:") -ResDef (MK_CACHE_LAST_ACCESSED, XP_MSG_BASE + 1012, - "Last accessed:") -ResDef (MK_CACHE_CHARSET, XP_MSG_BASE + 1013, - "Character set:") -ResDef (MK_CACHE_SECURE, XP_MSG_BASE + 1014, - "Secure:") -ResDef (MK_CACHE_USES_RELATIVE_PATH, XP_MSG_BASE + 1015, - "Uses relative path:") -ResDef (MK_CACHE_FROM_NETSITE_SERVER, XP_MSG_BASE + 1016, - "From Netsite Server:") - -ResDef (XP_EDT_I18N_HAS_CHARSET, XP_MSG_BASE + 1017, - "Changing the character encoding may alter some\n\ -of the characters in your document.\n\ -This change is not undoable.\n\ -Are you sure you want to proceed?") - -ResDef (XP_EDT_BREAKING_LINKS, XP_MSG_BASE + 1018, - "The following links could become invalid because\n\ -they refer to files on your local hard disk(s).\n\n\ -%s\nIf you're sure you set up the links properly, click\n\ -OK to continue publishing.") -ResDef (XP_EDT_ERR_SAVE_FILE_WRITE, XP_MSG_BASE + 1019, - "%s can't be saved because the disk is full or the\n\ -file is locked. Try saving on a different disk or try saving\n\ -%s with a different name.") -ResDef (XP_EDT_ERR_SAVE_CONTINUE, XP_MSG_BASE + 1020, - "\n\n\ -If you continue saving, %s won't be saved with\n\ -this page.") -ResDef (XP_EDT_ERR_SAVE_SRC_NOT_FOUND, XP_MSG_BASE + 1021, - "The file %s associated with this page can't be\n\ -saved. Make sure the file is in the correct location.") -ResDef (XP_EDT_ERR_SAVE_FILE_READ, XP_MSG_BASE + 1022, - "The file %s associated with this page can't be\n\ -saved because there is a problem with the file.") -ResDef (XP_EDT_ERR_PUBLISH_PREPARING_ROOT, XP_MSG_BASE + 1023, - "There was a problem preparing %s for\n\ -publishing. "MOZ_NAME_PRODUCT" couldn't create a temporary file.") -ResDef (XP_EDT_ERR_CHECK_DISK, XP_MSG_BASE + 1024, - "\n\n\ -Check to see if your hard disk is full.") -ResDef (XP_EDT_ERR_PUBLISH_FILE_WRITE, XP_MSG_BASE + 1025, - "There was a problem preparing %s for publishing.\n\ -"MOZ_NAME_PRODUCT" couldn't create a temporary file.") -ResDef (XP_EDT_ERR_PUBLISH_CONTINUE, XP_MSG_BASE + 1026, - "\n\n\ -If you continue, %s won't be published with\n\ -this page.") -ResDef (XP_EDT_ERR_PUBLISH_SRC_NOT_FOUND, XP_MSG_BASE + 1027, -MOZ_NAME_BRAND" couldn't prepare the file %s for\n\ -publishing. Make sure the file is in the correct location.") -ResDef (XP_EDT_ERR_PUBLISH_FILE_READ, XP_MSG_BASE + 1028, - "The file %s associated with this page can't\n\ -be published because there is a problem with the file.") -ResDef (XP_EDT_ERR_MAIL_PREPARING_ROOT, XP_MSG_BASE + 1029, - "There was a problem preparing the message for sending.\n\ -"MOZ_NAME_PRODUCT" couldn't create a temporary file.") -ResDef (XP_EDT_ERR_MAIL_FILE_WRITE, XP_MSG_BASE + 1030, - "There was a problem preparing %s for sending.\n\ -"MOZ_NAME_PRODUCT" couldn't create a temporary file.") -ResDef (XP_EDT_ERR_MAIL_SRC_NOT_FOUND, XP_MSG_BASE + 1031, -MOZ_NAME_BRAND" couldn't prepare the file %s for\n\ -sending. Make sure the file is in the correct location.") -ResDef (XP_EDT_ERR_MAIL_FILE_READ, XP_MSG_BASE + 1032, - "The file %s associated with this page can't be\n\ -sent because there is a problem with the file.") -ResDef (XP_EDT_ERR_MAIL_CONTINUE, XP_MSG_BASE + 1033, - "\n\n\ -If you continue, %s won't be sent with\n\ -this page.") - -ResDef (MK_ADDR_VIEW_COMPLETE_VCARD, XP_MSG_BASE + 1034, - "View Complete Card") -ResDef (MK_ADDR_VIEW_CONDENSED_VCARD, XP_MSG_BASE + 1035, - "View Condensed Card") - -ResDef(MK_MSG_BY_FLAG, XP_MSG_BASE + 1036, - "By Flag") - -ResDef(MK_MSG_BY_UNREAD, XP_MSG_BASE + 1037, - "By Unread") - -ResDef(MK_MSG_BY_SIZE, XP_MSG_BASE + 1038, - "By Size") - -ResDef(XP_ALERT_OFFLINE_MODE_SELECTED, XP_MSG_BASE + 1039, -MOZ_NAME_BRAND" was unable to connect to the network because\n\ -you are in offline mode.\n\ -Choose Go Online from the File Menu and try again.") - -ResDef(MK_ADDR_FIRST_LAST_SEP, XP_MSG_BASE + 1040, - " ") - -ResDef(MK_ADDR_LAST_FIRST_SEP, XP_MSG_BASE + 1041, - ", ") - -ResDef(MK_MSG_CANT_MOVE_FOLDER, XP_MSG_BASE + 1042, - "That item can not be moved to the requested location.") - -ResDef(XP_SEC_ENTER_EXPORT_PWD, XP_MSG_BASE + 1043, - "Enter password to protect data being exported:") - -ResDef(MK_SEARCH_SCOPE_ONE, XP_MSG_BASE + 1044, "in %s") -ResDef(MK_SEARCH_SCOPE_SELECTED, XP_MSG_BASE + 1045, "in selected items") -ResDef(MK_SEARCH_SCOPE_OFFLINE_MAIL, XP_MSG_BASE + 1046, "in offline mail folders") -ResDef(MK_SEARCH_SCOPE_ONLINE_MAIL, XP_MSG_BASE + 1047, "in online mail folders") -ResDef(MK_SEARCH_SCOPE_SUBSCRIBED_NEWS, XP_MSG_BASE + 1048, "in subscribed discussion groups") -ResDef(MK_SEARCH_SCOPE_ALL_NEWS, XP_MSG_BASE + 1049, "in searchable discussion groups") - -ResDef(MK_ADDR_DEFAULT_DLS, XP_MSG_BASE + 1050, "Default Directory Server") -ResDef(MK_ADDR_SPECIFIC_DLS, XP_MSG_BASE + 1051, "Specific Directory Server") -ResDef(MK_ADDR_HOSTNAMEIP, XP_MSG_BASE + 1052, "Hostname or IP Address") -ResDef(MK_ADDR_CONFINFO, XP_MSG_BASE + 1053,MOZ_NAME_BRAND" Conference Address") -ResDef(MK_ADDR_ADDINFO, XP_MSG_BASE + 1054, "Additional Information:") - -ResDef(MK_MSG_HTML_DOMAINS_DIALOG_TITLE, XP_MSG_BASE + 1055, "HTML Domains") - -ResDef(MK_MSG_HTML_DOMAINS_DIALOG, XP_MSG_BASE + 1056, "\ -\n\ -This is a list of domains that can accept HTML mail. Anyone whose\n\ -%-cont-%") - -ResDef (MK_MSG_HTML_DOMAINS_DIALOG_3, XP_MSG_BASE + 1059, "\ -e-mail address ends in one of these domains is considered to use a\n\ -mail reader which understands HTML, such as "MOZ_NAME_PRODUCT".

\n\ -You may remove a domain from this list by clicking on it and\n\ -%-cont-%") - -ResDef (MK_MSG_HTML_DOMAINS_DIALOG_4, XP_MSG_BASE + 1060, "\ -choosing Delete.

\n\ -\n\ -\n\ -\n\ -") - -/* Reserve a bunch extra, just in case. */ - -ResDef (MK_MSG_HTML_DOMAINS_DIALOG_5, XP_MSG_BASE + 1061, "") -ResDef (MK_MSG_HTML_DOMAINS_DIALOG_6, XP_MSG_BASE + 1062, "") -ResDef (MK_MSG_HTML_DOMAINS_DIALOG_7, XP_MSG_BASE + 1063, "") -ResDef (MK_MSG_HTML_DOMAINS_DIALOG_8, XP_MSG_BASE + 1064, "") -ResDef (MK_MSG_HTML_DOMAINS_DIALOG_9, XP_MSG_BASE + 1065, "") - - -ResDef (MK_MSG_SET_HTML_NEWSGROUP_HEIRARCHY_CONFIRM, XP_MSG_BASE + 1066, -"The discussion group %s was accepting HTML because all groups whose name\n\ -started with \042%s\042 were marked to accept HTML. This action will\n\ -reverse that; groups whose name start with \042%s\042 will no longer\n\ -accept HTML.") - -ResDef (MK_MSG_NEXT_CATEGORY, XP_MSG_BASE + 1067, "Next Category") - -ResDef (MK_MSG_GROUP_NOT_ON_SERVER, XP_MSG_BASE + 1068, -"The discussion group %s does not appear to exist on the host %s.\n\ -Would you like to unsubscribe from it?") - -ResDef(MK_MIMEHTML_SHOW_SECURITY_ADVISOR, XP_MSG_BASE + 1079, - "Show Security Information") - -ResDef(MK_MIMEHTML_ENC_AND_SIGNED, XP_MSG_BASE + 1080, - "Encrypted
and Signed") -ResDef(MK_MIMEHTML_SIGNED, XP_MSG_BASE + 1081, "Signed") -ResDef(MK_MIMEHTML_ENCRYPTED, XP_MSG_BASE + 1082, "Encrypted") -ResDef(MK_MIMEHTML_CERTIFICATES, XP_MSG_BASE + 1083, "Certificates") -ResDef(MK_MIMEHTML_ENC_SIGNED_BAD, XP_MSG_BASE + 1084, - "Invalid Signature") -ResDef(MK_MIMEHTML_SIGNED_BAD, XP_MSG_BASE + 1085, - "Invalid Signature") -ResDef(MK_MIMEHTML_ENCRYPTED_BAD, XP_MSG_BASE + 1086, - "Invalid Encryption") -ResDef(MK_MIMEHTML_CERTIFICATES_BAD, XP_MSG_BASE + 1087, - "Invalid Certificates") - -ResDef (MK_MSG_NEW_NEWSGROUP, XP_MSG_BASE + 1088, -"New Discussion Group") -ResDef (MK_MSG_NEW_CATEGORY, XP_MSG_BASE + 1089, -"Creates a new category in this discussion group") - -ResDef(MK_ADDR_NO_EMAIL_ADDRESS, XP_MSG_BASE + 1090, - "There is no email address for %s.") - -ResDef (MK_MSG_EXPIRE_COUNT, XP_MSG_BASE + 1091, "Expired %ld messages") - -ResDef (MK_MSG_DONE_EXPIRE_COUNT, XP_MSG_BASE + 1092, "Expired %ld messages...Done") - -/* Localized names of mail folders */ -ResDef (MK_MSG_TRASH_L10N_NAME, XP_MSG_BASE + 1093, "Trash") -ResDef (MK_MSG_INBOX_L10N_NAME, XP_MSG_BASE + 1094, "Inbox") -#ifdef XP_WIN16 -ResDef (MK_MSG_OUTBOX_L10N_NAME, XP_MSG_BASE + 1095, "Unsent") -#else -ResDef (MK_MSG_OUTBOX_L10N_NAME, XP_MSG_BASE + 1095, "Unsent Messages") -#endif -ResDef (MK_MSG_DRAFTS_L10N_NAME, XP_MSG_BASE + 1096, "Drafts") -ResDef (MK_MSG_SENT_L10N_NAME, XP_MSG_BASE + 1097, "Sent") - -/* Caption text for FE_PromptWithCaption */ -ResDef (MK_MSG_NEW_FOLDER_CAPTION, XP_MSG_BASE + 1098, "New Folder") -ResDef (MK_MSG_RENAME_FOLDER_CAPTION, XP_MSG_BASE + 1099, "Rename Folder") - -ResDef (MK_MSG_MANAGE_MAIL_ACCOUNT, XP_MSG_BASE + 1100, "Manage Mail Account") - -ResDef (MK_MSG_UNABLE_MANAGE_MAIL_ACCOUNT, XP_MSG_BASE+1101, -MOZ_NAME_BRAND" is unable to manage your mail account.\n\ -Please contact your mail account administrator\n\ -or try again later.") - -ResDef (MK_MSG_MODERATE_NEWSGROUP, XP_MSG_BASE + 1102, -"Manage Discussion Group") - -ResDef(MK_UNABLE_TO_LOCATE_SOCKS_HOST, XP_MSG_BASE + 1103, -MOZ_NAME_BRAND" is unable to locate the socks server:\n\ - %.200s\n\ -The server does not have a DNS entry.\n\n\ -Check the socks server name in the proxy\n\ -configuration and try again.") - -ResDef (XP_SEC_PROMPT_NICKNAME_COLLISION, (XP_MSG_BASE + 1104), - "An object with that nickname exists. Please enter a new nickname.") - -ResDef(MK_MSG_GET_NEW_DISCUSSION_MSGS, XP_MSG_BASE + 1105, "Get New Discussion Messages") - -ResDef(MK_MSG_LOCAL_MAIL, XP_MSG_BASE + 1106, "Local Mail") -ResDef(MK_NEWS_DISCUSSIONS_ON, XP_MSG_BASE + 1107, "%s Discussions") - -ResDef( XP_RECEIVING_MESSAGE_HEADERS_OF, XP_MSG_BASE + 1108, -"%s Receiving: message headers %lu of %lu" ) - -ResDef( XP_RECEIVING_MESSAGE_FLAGS_OF, XP_MSG_BASE + 1109, -"%s Receiving: message flags %lu of %lu" ) - -ResDef( XP_IMAP_DELETING_MESSAGES, XP_MSG_BASE + 1110, "Deleting messages...") -ResDef( XP_IMAP_DELETING_MESSAGE, XP_MSG_BASE + 1111, "Deleting message...") -ResDef( XP_IMAP_MOVING_MESSAGES_TO, XP_MSG_BASE + 1112, "Moving messages to %s...") -ResDef( XP_IMAP_MOVING_MESSAGE_TO, XP_MSG_BASE + 1113, "Moving message to %s...") -ResDef( XP_IMAP_COPYING_MESSAGES_TO, XP_MSG_BASE + 1114, "Copying messages %s...") -ResDef( XP_IMAP_COPYING_MESSAGE_TO, XP_MSG_BASE + 1115, "Copying message %s...") -ResDef( XP_IMAP_SELECTING_MAILBOX, XP_MSG_BASE + 1116, "Opening folder %s...") - -#ifndef MOZ_COMMUNICATOR_NAME -ResDef(MK_MSG_CONFIRM_MOVE_MAGIC_FOLDER, XP_MSG_BASE + 1117, -"Are you sure you want to move %s away from its default \n\ -location? Next time "MOZ_NAME_PRODUCT" runs, a new %s folder \n\ -will be created in the default location") -#else -ResDef(MK_MSG_CONFIRM_MOVE_MAGIC_FOLDER, XP_MSG_BASE + 1117, -"Are you sure you want to move %s away from its default \n\ -location? Next time Communicator runs, a new %s folder \n\ -will be created in the default location") -#endif - -ResDef(MK_MSG_UPDATE_MSG_COUNTS, XP_MSG_BASE + 1118, "Update Message Counts") - -ResDef(MK_MSG_DELETING_MSGS_STATUS, XP_MSG_BASE + 1119, "Deleting %lu of %lu messages") -ResDef(MK_MSG_COPYING_MSGS_STATUS, XP_MSG_BASE + 1120, "Copying %lu of %lu messages to %s") -ResDef(MK_MSG_MOVING_MSGS_STATUS, XP_MSG_BASE + 1121, "Moving %lu of %lu messages to %s") - -ResDef(XP_EDT_PUBLISH_REPORT_ONE_FILE, XP_MSG_BASE + 1122, -"Your file was uploaded successfully.") -ResDef(XP_EDT_PUBLISH_REPORT_MSG, XP_MSG_BASE + 1123, -"%d files were uploaded successfully.") - -ResDef(MK_MSG_DELIVERING_MESSAGE_TO, XP_MSG_BASE + 1124, "Mail: delivering message %ld to %s...") -ResDef(MK_MSG_DELIVERING_MESSAGE, XP_MSG_BASE + 1125, "Mail: delivering message %ld...") - -ResDef(MK_MSG_FORWARDING_ENCRYPTED_WARNING, XP_MSG_BASE + 1126, - "You are doing an unencrypted Forward of a message which was\n\ -encrypted when you received it. Sending this message unencrypted\n\ -may reduce the level of privacy of the attached message.\n\ -\n\ -Send unencrypted anyway?") - -ResDef(XP_EDT_BROWSE_TO_DEFAULT, XP_MSG_BASE + 1127, -"\n\nBrowse to your default publishing location now?") - -ResDef (XP_EDT_BAD_CLIPBOARD_VERSION, XP_MSG_BASE + 1128, - "You can not copy and paste between different\n\ -versions of "MOZ_NAME_PRODUCT" Composer or "MOZ_NAME_PRODUCT" Gold.") -ResDef (XP_EDT_BAD_CLIPBOARD_ENCODING, XP_MSG_BASE + 1129, - "You can not copy and paste between windows with\n\ -different character set encodings.") - -ResDef(XP_ALERT_NFS_USEHTTP, XP_MSG_BASE+1130, -"NFS URLs not internally supported, use an HTTP proxy server: ") - -ResDef(MK_MSG_MARK_CATEGORY_READ, XP_MSG_BASE+1131, "Mark Category Read") - -ResDef(MK_MSG_TRACK_FOLDER_MOVE, XP_MSG_BASE + 1132, -"Change rule to reflect new folder location?") -ResDef(MK_MSG_TRACK_FOLDER_DEL, XP_MSG_BASE + 1133, -"Disable filter rule for this folder?") - -/* Webfonts strings from modules/libfont */ - -ResDef(WF_MSG_ABOUT_TITLE, XP_MSG_BASE + 1134, -"Dynamic Fonts") -ResDef(WF_MSG_ABOUT_BEGIN_1, XP_MSG_BASE + 1135, -"

Installed Font Displayers

\n\ - \n\ - The font displayers that you have installed and the font formats\n\ - supported by each, are listed below.") - ResDef(WF_MSG_ABOUT_BEGIN_2, XP_MSG_BASE + 1136, - "Use the radioboxes to enable or disable a particular format for a\n\ - particular displayer.

") - ResDef(WF_MSG_ABOUT_BEGIN_3, XP_MSG_BASE + 1137, - "For more information on "MOZ_NAME_PRODUCT" Dynamic Fonts, click\ - here


") -ResDef(WF_MSG_ABOUT_END, XP_MSG_BASE + 1138, -"
") -ResDef(WF_MSG_ABOUT_DISPLAYER_DYNAMIC, XP_MSG_BASE + 1139, -"\n\ - \n\ - ") -ResDef(WF_MSG_ABOUT_DISPLAYER_STATIC, XP_MSG_BASE + 1140, -"
%s
%s
Located at: %s

\n\ - \n\ - ") -ResDef(WF_MSG_ABOUT_DISPLAYER_MIME, XP_MSG_BASE + 1141, -"\n\ - \n\ - \n\ - \n\ - ") -ResDef(WF_MSG_ABOUT_DISPLAYER_END, XP_MSG_BASE + 1142, -"
%s
%s

%s%s%s
\n\ -
\n\ -
") -ResDef(WF_MSG_ABOUT_NO_DISPLAYER, XP_MSG_BASE + 1143, -"No Displayers Installed") -ResDef(WF_MSG_NATIVE_DISPLAYER_NAME, XP_MSG_BASE + 1144, -MOZ_NAME_BRAND" Default Font Displayer") -ResDef(WF_MSG_NATIVE_DISPLAYER_DESCRIPTION, XP_MSG_BASE + 1145, -"This font displayer handles fonts that are installed on the system.") - -/* More messenger strings */ -ResDef (MK_MSG_OUTBOX_L10N_NAME_OLD, XP_MSG_BASE + 1146, "Outbox") -ResDef(MK_MSG_BOGUS_QUEUE_MSG_1_OLD, XP_MSG_BASE + 1147, - "The `Outbox' folder contains a message which is not\n\ -scheduled for delivery!") -ResDef(MK_MSG_BOGUS_QUEUE_MSG_N_OLD, XP_MSG_BASE + 1148, - "The `Outbox' folder contains %d messages which are not\n\ -scheduled for delivery!") -ResDef(MK_MSG_BOGUS_QUEUE_REASON_OLD, XP_MSG_BASE + 1149, - "\n\nThis probably means that some program other than\n\ -"MOZ_NAME_PRODUCT" has added messages to this folder.\n") -ResDef(MK_MSG_WHY_QUEUE_SPECIAL_OLD, XP_MSG_BASE + 1150, - "The `Outbox' folder is special; it is only for holding\n\ -messages which have been deferred for later delivery.") - -ResDef(XP_AUTOADMIN_MISSING, XP_MSG_BASE + 1151, - "The local configuration file specified a configuration URL but the AutoAdmin component could not \ - be loaded. AutoAdmin is required to support remote configuration URLs. You will be unable to load\ - any remote documents." ) - - ResDef(MK_MSG_ADDING_LDAP_TO_AB, XP_MSG_BASE + 1152, - "Adding to Address Book: %ld of %ld") - - ResDef(MK_MSG_XSENDER_INTERNAL, XP_MSG_BASE + 1153, - "      Internal") - -ResDef(XP_PKCS12_IMPORT_FILE_PROMPT, (XP_MSG_BASE + 1154), -"File Name to Import") - -ResDef(XP_PKCS12_EXPORT_FILE_PROMPT, (XP_MSG_BASE + 1155), -"File Name to Export") - -ResDef(XP_EDT_CP_DOCUMENT_TOO_LARGE_READ, XP_MSG_BASE + 1156, - "This document is %ld bytes long. That is too large to be read by a Composer Plug-in. \ -The maximum allowed size is %ld bytes.") - -ResDef(XP_EDT_CP_DOCUMENT_TOO_LARGE_WRITE, XP_MSG_BASE + 1157, - "The Composer Plug-in tried to create a document that is %ld bytes long. \ -The maximum allowed size is %ld bytes.") - -ResDef(MK_MIME_SMIME_ENCRYPTED_CONTENT_DESCRIPTION, XP_MSG_BASE + 1158, - "S/MIME Encrypted Message") - -ResDef(MK_MIME_SMIME_SIGNATURE_CONTENT_DESCRIPTION, XP_MSG_BASE + 1159, - "S/MIME Cryptographic Signature") - -/* Netcaster Strings */ - -ResDef(XP_ALERT_CANT_RUN_NETCASTER, XP_MSG_BASE + 1160, -MOZ_NAME_BRAND" was unable to start Netcaster.\n\ -Make sure Netcaster is installed correctly.") - - -ResDef(XP_EDT_CANT_EDIT_URL, XP_MSG_BASE + 1161, - "Composer can't open the URL '%s'.\n\n\ -You must enter an absolute URL or an absolute pathname.\n\ -e.g. 'http://mysystem.com/mydoc.html'") - -ResDef(XP_SA_ALG_AND_BITS_FORMAT, XP_MSG_BASE + 1162, "%d-bit %s") - -ResDef(MK_MSG_IMAP_MULTIPLE_SELECT_FAILED, XP_MSG_BASE + 1163, -"Only one operation at a time on this folder is permitted. \ -\nPlease wait until the other operation completes and try again.") - -ResDef(MK_MSG_CONFIRM_MOVE_FOLDER_TO_TRASH, XP_MSG_BASE + 1164, -"Are you sure you want to move the selected folders into the Trash?") - -ResDef(XP_ALERT_NETCASTER_NO_JS, XP_MSG_BASE + 1165, -MOZ_NAME_BRAND" is unable to start Netcaster because Java and/or JavaScript are not enabled. \n\ -Please verify that your Advanced Preferences are set correctly and try again.") - - -ResDef(XP_EDT_ADD_COLUMNS, XP_MSG_BASE + 1170, - "Add %d column(s) to the table") - -ResDef(XP_EDT_ADD_ROWS, XP_MSG_BASE + 1171, - "Add %d rows(s) to the table") - -ResDef(XP_EDT_PERCENT_CELL, XP_MSG_BASE + 1172, - "% of parent cell ") - -ResDef(XP_EDT_PERCENT_TABLE, XP_MSG_BASE + 1173, - "% of table ") - -/* XP_NSCOLOR_BASE and the 70 color strings removed - * We would like to reserve this range (1174 - 1250) for Editor -*/ - -/* please reserve strings to here for future colors */ -ResDef(SU_NOT_A_JAR_FILE, XP_MSG_BASE + 1262, - "SmartUpdate failed: Downloaded archive is not a JAR file.") - -ResDef(SU_SECURITY_CHECK, XP_MSG_BASE + 1263, - "SmartUpdate failed: JAR archive failed security check. %s.") - -ResDef(SU_INSTALL_FILE_HEADER, XP_MSG_BASE + 1264, - "SmartUpdate failed: JAR archive has no installer file information.") - -ResDef(SU_INSTALL_FILE_MISSING, XP_MSG_BASE + 1265, - "SmartUpdate failed: JAR archive is missing an installer file %s.") - -ResDef(XP_GLOBAL_NO_CONFIG_RECEIVED_NO_FAILOVER, XP_MSG_BASE + 1266, -"No automatic configuration file was received.\n\n\ -You will be unable to load and documents from the network.\n\ -See your local system administrator for help." ) - -ResDef(XP_GLOBAL_BAD_TYPE_CONFIG_IGNORED, XP_MSG_BASE + 1267, - "The automatic configuration file is not of the correct type:\n\n\ - %s\n\n\ -Expected the MIME type of application/x-javascript-config." ) - -ResDef(XP_GLOBAL_CONF_LOAD_FAILED_NO_FAILOVER, XP_MSG_BASE + 1268, -"The automatic configuration file could not be loaded.\n\n\ -You will be unable to load any documents from the network.\n\ -See your local system administrator for help." ) - -ResDef(XP_GLOBAL_NO_CONFIG_RECIEVED, XP_MSG_BASE + 1269, - "No automatic configuration file was received.\n\n\ -Will default based on the last configuration." ) - -ResDef(XP_GLOBAL_EVEN_SAVED_IS_BAD, XP_MSG_BASE + 1270, - "The backup automatic configuration file had errors.\n\n\ -We will default to the standard configuration." ) - -ResDef(XP_GLOBAL_BAD_CONFIG_IGNORED, XP_MSG_BASE + 1271, - "The automatic configuration file has errors:\n\n %s\n\n\ -We will default to the standard configuration." ) - -ResDef(XP_GLOBAL_CONFIG_LOAD_ABORTED, XP_MSG_BASE + 1272, - "Automatic configuration load was cancelled.\n\n\ -We will default to the standard configuration." ) - -ResDef(XP_PKCS12_SUCCESSFUL_EXPORT, (XP_MSG_BASE + 1273), -"Your certificates have been successfully exported.") - -ResDef(XP_PKCS12_SUCCESSFUL_IMPORT, (XP_MSG_BASE + 1274), -"Your certificates have been successfully imported.") - -ResDef(XP_SEC_ENTER_IMPORT_PWD, (XP_MSG_BASE + 1275), -"Enter password protecting data to be imported:") - -ResDef(MK_MSG_CONTINUE_ADDING, (XP_MSG_BASE + 1276), -"Would you like to add the remaining addresses to the personal address book?") - -ResDef(MK_LDAP_USER_CERTIFICATE, XP_MSG_BASE + 1277, "User Certificate") - -ResDef(MK_LDAP_SMIME_USER_CERTIFICATE, XP_MSG_BASE + 1278, "User E-mail Certificate") - -ResDef(MK_MSG_UNIQUE_TRASH_RENAME_FAILED, XP_MSG_BASE + 1279, -"The Trash already contains a folder named '%s.'\n\ -Please either empty the trash or rename this folder.") - -ResDef(MK_MSG_NEEDED_UNIQUE_TRASH_NAME, XP_MSG_BASE + 1280, -"The Trash already contained a folder named '%s.'\n\ -The folder which you just deleted can be found in the Trash\n\ -under the new name '%s.'") - -ResDef(MK_MSG_IMAP_SERVER_SAID, XP_MSG_BASE + 1281, -"The current command did not succeed. The IMAP server responded:\n%s") - -ResDef(SU_INSTALL_ASK_FOR_DIRECTORY, XP_MSG_BASE + 1282, - "Where would you like to install %s?") - -ResDef(EDT_VIEW_SOURCE_WINDOW_TITLE, XP_MSG_BASE + 1283, -"View Document Source") - -ResDef(LAY_PAGEINFO_NOINFO, XP_MSG_BASE + 1284, -"

No info while document is loading

\n") -ResDef(LAY_PAGEINFO_FRAME, XP_MSG_BASE + 1285, -"
  • Frame: ") -ResDef(LAY_PAGEINFO_IMAGE, XP_MSG_BASE + 1286, -"Image:") -ResDef(LAY_PAGEINFO_EMBED, XP_MSG_BASE + 1287, -"Embed:") -ResDef(LAY_PAGEINFO_APPLET, XP_MSG_BASE + 1288, -"Applet:") -ResDef(LAY_PAGEINFO_BACKGROUND_IMAGE, XP_MSG_BASE + 1289, -"Background Image: ") -ResDef(LAY_PAGEINFO_ACTIONURL, XP_MSG_BASE + 1290, -"
  • Action URL: ") -ResDef(LAY_PAGEINFO_ENCODING, XP_MSG_BASE + 1291, -"
  • Encoding: ") -ResDef(LAY_PAGEINFO_METHOD, XP_MSG_BASE + 1292, -"
  • Method: ") -ResDef(LAY_PAGEINFO_LAYER, XP_MSG_BASE + 1293, -"
  • Layer: ") - -ResDef(MK_MSG_MAC_PROMPT_UUENCODE, XP_MSG_BASE + 1294, -"Some of these attachments contain Macintosh specific information. \ -Using UUENCODE will cause this information to be lost. \ -Continue sending?") - -ResDef(XP_SEC_REENTER_TO_CONFIRM_PWD, XP_MSG_BASE + 1295, -"Re-enter the password to confirm it:") - -ResDef(XP_SEC_BAD_CONFIRM_EXPORT_PWD, XP_MSG_BASE + 1296, -"The passwords entered did not match. Enter\n\ -the password to protect data being exported:") - -ResDef(MK_IMAP_STATUS_CREATING_MAILBOX, XP_MSG_BASE + 1297, -"Creating folder...") - -ResDef(MK_IMAP_STATUS_SELECTING_MAILBOX, XP_MSG_BASE + 1298, -"Opening folder...") - -ResDef(MK_IMAP_STATUS_DELETING_MAILBOX, XP_MSG_BASE + 1299, -"Deleting folder %s...") - -ResDef(MK_IMAP_STATUS_RENAMING_MAILBOX, XP_MSG_BASE + 1300, -"Renaming folder %s...") - -ResDef(MK_IMAP_STATUS_LOOKING_FOR_MAILBOX, XP_MSG_BASE + 1301, -"Looking for folders...") - -ResDef(MK_IMAP_STATUS_SUBSCRIBE_TO_MAILBOX, XP_MSG_BASE + 1302, -"Subscribing to folder %s...") - -ResDef(MK_IMAP_STATUS_UNSUBSCRIBE_MAILBOX, XP_MSG_BASE + 1303, -"Unsubscribing from folder %s...") - -ResDef(MK_IMAP_STATUS_SEARCH_MAILBOX, XP_MSG_BASE + 1304, -"Searching folder...") - -ResDef(MK_IMAP_STATUS_MSG_INFO, XP_MSG_BASE + 1305, -"Getting message info...") - -ResDef(MK_IMAP_STATUS_CLOSE_MAILBOX, XP_MSG_BASE + 1306, -"Closing folder...") - -ResDef(MK_IMAP_STATUS_EXPUNGING_MAILBOX, XP_MSG_BASE + 1307, -"Compacting folder...") - -ResDef(MK_IMAP_STATUS_LOGGING_OUT, XP_MSG_BASE + 1308, -"Logging out...") - -ResDef(MK_IMAP_STATUS_CHECK_COMPAT, XP_MSG_BASE + 1309, -"Checking IMAP server capability...") - -ResDef(MK_IMAP_STATUS_SENDING_LOGIN, XP_MSG_BASE + 1310, -"Sending login information...") - -ResDef(MK_IMAP_STATUS_SENDING_AUTH_LOGIN, XP_MSG_BASE + 1311, -"Sending authenticate login information...") - -ResDef(SU_NEED_TO_REBOOT, XP_MSG_BASE + 1312, - "SmartUpdate is not complete until you reboot Windows") - -ResDef(MK_MSG_REPLY_TO_SENDER, XP_MSG_BASE + 1313, - "to Sender") - -ResDef(MK_ADDR_DEFAULT_EXPORT_FILENAME, XP_MSG_BASE + 1314, - "untitled") - -ResDef(MK_MSG_ADVANCE_TO_NEXT_FOLDER, XP_MSG_BASE + 1315, - "Advance to next unread message in %s?") - -ResDef(MK_PORT_ACCESS_NOT_ALLOWED, XP_MSG_BASE + 1316, - "Sorry, access to the port number given\n\ -has been disabled for security reasons") - -ResDef(XP_PRIORITY_LOWEST, XP_MSG_BASE + 1317, "Lowest") -ResDef(XP_PRIORITY_LOW, XP_MSG_BASE + 1318, "Low") -ResDef(XP_PRIORITY_NORMAL, XP_MSG_BASE + 1319, "Normal") -ResDef(XP_PRIORITY_HIGH, XP_MSG_BASE + 1320, "High") -ResDef(XP_PRIORITY_HIGHEST, XP_MSG_BASE + 1321, "Highest") -ResDef(XP_PRIORITY_NONE, XP_MSG_BASE + 1322, "NONE") - -ResDef(XP_PROGRESS_READ_NEWSGROUP_COUNTS, XP_MSG_BASE + 1323, - "Receiving: message totals: %lu of %lu") - -ResDef(MK_LDAP_AUTH_PROMPT, XP_MSG_BASE + 1324, - "Please enter your %s and password for access to %s") - -ResDef( XP_FOLDER_RECEIVING_MESSAGE_OF, XP_MSG_BASE + 1325, -"%s - Receiving: message %lu of %lu" ) - -ResDef(MK_MSG_COLLABRA_DISABLED, XP_MSG_BASE + 1326, - "Sorry, Collabra has been disabled; newsgroup functionality \ -has been turned off.") - -ResDef(MK_IMAP_DOWNLOADING_MESSAGE, XP_MSG_BASE + 1327, - "Downloading message...") - -ResDef(MK_IMAP_CREATE_FOLDER_BUT_NO_SUBSCRIBE, XP_MSG_BASE + 1328, - "Folder creation succeeded, but "MOZ_NAME_PRODUCT" was unable to subscribe \ -the new folder.") - -ResDef(MK_IMAP_DELETE_FOLDER_BUT_NO_UNSUBSCRIBE, XP_MSG_BASE + 1329, - "Folder deletion succeeded, but "MOZ_NAME_PRODUCT" was unable to unubscribe \ -from the folder.") - -ResDef(MK_IMAP_RENAME_FOLDER_BUT_NO_SUBSCRIBE, XP_MSG_BASE + 1330, - "Folder move succeeded, but "MOZ_NAME_PRODUCT" was unable to subscribe \ -to the new folder name.") - -ResDef(MK_IMAP_RENAME_FOLDER_BUT_NO_UNSUBSCRIBE, XP_MSG_BASE + 1331, - "Folder move succeeded, but "MOZ_NAME_PRODUCT" was unable to unsubscribe \ -from the old folder name.") - -ResDef(XP_MSG_JS_CLOSE_WINDOW, XP_MSG_BASE + 1332, "Close Window?") - -ResDef(XP_MSG_JS_CLOSE_WINDOW_NAME, XP_MSG_BASE + 1333, "Close Window %s?") - -ResDef(MK_ACCESS_YOUR_COOKIES, XP_MSG_BASE + 1334, - "Your Cookies") -ResDef(MK_ACCESS_MAXIMUM_COOKS, XP_MSG_BASE + 1335, - "Maximum number of cookies allowed:") -ResDef(MK_ACCESS_COOK_COUNT, XP_MSG_BASE + 1336, - "The number of cookies you have:") -ResDef(MK_ACCESS_MAXIMUM_COOKS_PER_SERV, XP_MSG_BASE + 1337, - "Maximum number of cookies per server:") -ResDef(MK_ACCESS_MAXIMUM_COOK_SIZE, XP_MSG_BASE + 1338, - "Maximum size of each cookie:") -ResDef(MK_ACCESS_NO_COOKIES, XP_MSG_BASE + 1339, - "You have no cookies.") -ResDef(MK_ACCESS_NAME, XP_MSG_BASE + 1340, - "Name:") -ResDef(MK_ACCESS_VALUE, XP_MSG_BASE + 1341, - "Value:") -ResDef(MK_ACCESS_HOST, XP_MSG_BASE + 1342, - "Host:") -ResDef(MK_ACCESS_SEND_TO_HOST, XP_MSG_BASE + 1343, - "Send to host:") -ResDef(MK_ACCESS_IS_DOMAIN, XP_MSG_BASE + 1344, - "any host in the domain from the host above") -ResDef(MK_ACCESS_IS_NOT_DOMAIN, XP_MSG_BASE + 1345, - "the above fully qualified host only") -ResDef(MK_ACCESS_SEND_TO_PATH, XP_MSG_BASE + 1346, - "Send to path:") -ResDef(MK_ACCESS_AND_BELOW, XP_MSG_BASE + 1347, - " (and below)") -ResDef(MK_ACCESS_SECURE, XP_MSG_BASE + 1348, - "Secure:") -ResDef(MK_ACCESS_EXPIRES, XP_MSG_BASE + 1349, - "Expires:") -ResDef(MK_ACCESS_END_OF_SESSION, XP_MSG_BASE + 1350, - "at end of session") -ResDef(MK_LDAP_HTML_TITLE, XP_MSG_BASE + 1351, - "LDAP Search Results") -ResDef(MK_ACCESS_JAVASCRIPT_COOKIE_FILTER, XP_MSG_BASE + 1352, - "Javascript Cookie Filter Message:\n") -ResDef(MK_JSFILTERDIALOG_EDIT_TITLE, XP_MSG_BASE + 1353, - "Edit JavaScript Message Filter") -ResDef(MK_JSFILTERDIALOG_NEW_TITLE, XP_MSG_BASE + 1354, - "New JavaScript Message Filter") -ResDef(MK_JSFILTERDIALOG_STRING, XP_MSG_BASE + 1355, -"
    \ - \ -
    \ - JavaScript Message Filter \ -%-cont-%") -ResDef(MK_JSFILTERDIALOG_STRING_2, XP_MSG_BASE + 1356, -"
    Filter Name: \n\ - \ -%-cont-%") -ResDef(MK_JSFILTERDIALOG_STRING_3, XP_MSG_BASE + 1357, -"
    JavaScript Function: \n\ - \ -%-cont-%") -ResDef(MK_JSFILTER_DIALOG_STRING_4, XP_MSG_BASE + 1358, -"
    Description: \n\ - \ -%-cont-%") -ResDef(MK_JSFILTER_DIALOG_STRING_5, XP_MSG_BASE + 1359, -"
    Filter is \n\ - onoff \ -
    ") -ResDef(MK_JSFILTER_DIALOG_STRING_6, XP_MSG_BASE + 1360, "") -ResDef(MK_JSFILTER_DIALOG_STRING_7, XP_MSG_BASE + 1361, "") -ResDef(MK_JSFILTER_DIALOG_STRING_8, XP_MSG_BASE + 1362, "") -ResDef(MK_JSFILTER_DIALOG_STRING_9, XP_MSG_BASE + 1363, "") -ResDef(MK_JSFILTER_DIALOG_STRING_10, XP_MSG_BASE + 1364, "") -ResDef(MK_MSG_RETRIEVE_SELECTED, XP_MSG_BASE + 1365, - "Retrieve selected messages") -ResDef(MK_MSG_RETRIEVE_FLAGGED, XP_MSG_BASE + 1366, - "Retrieve flagged messages") - -ResDef(MK_IMAP_STATUS_GETTING_NAMESPACE, XP_MSG_BASE + 1367, - "Checking IMAP Namespace...") - -ResDef(MK_LDAP_REPL_CHANGELOG_BOGUS, XP_MSG_BASE + 1368, - "Can't replicate because the server's change log appears incomplete.") -ResDef(MK_LDAP_REPL_DSE_BOGUS, XP_MSG_BASE + 1369, - "Can't replicate because the server's replication information appears incomplete.") -ResDef(MK_LDAP_REPL_CANT_SYNC_REPLICA, XP_MSG_BASE + 1370, - "Can't replicate because the replica is too far out of date with the server.") -ResDef(MK_ADD_ADDRESSBOOK, XP_MSG_BASE + 1371, - "New Address Book...") -ResDef(MK_ADD_LDAPDIRECTORY, XP_MSG_BASE + 1372, - "New Directory...") -#ifdef XP_WIN16 -ResDef (MK_MSG_TEMPLATES_L10N_NAME, XP_MSG_BASE + 1373, "Template") -#else -ResDef (MK_MSG_TEMPLATES_L10N_NAME, XP_MSG_BASE + 1373, "Templates") -#endif -ResDef (MK_MSG_SAVING_AS_DRAFT, XP_MSG_BASE + 1374, "Saving as draft ...") -ResDef (MK_MSG_SAVING_AS_TEMPLATE, XP_MSG_BASE + 1375, "Saving as template ...") - -ResDef(MK_MSG_ADDBOOK_MOUSEOVER_TEXT, XP_MSG_BASE + 1376, - "Add %s to your Address Book") -ResDef(MK_MSG_ENTER_NAME_FOR_TEMPLATE, XP_MSG_BASE + 1377, - "Enter a name for your new message template.") - -ResDef(MK_MSG_MDN_DISPLAYED, XP_MSG_BASE + 1378, -MOZ_NAME_BRAND" Messenger has displayed the message. There is no guarantee \ -that the content has been read or understood.") - -ResDef(MK_MSG_MDN_DISPATCHED, XP_MSG_BASE + 1379, -"The message has been sent somewhere in some manner (e.g., printed, faxed, forwarded) \ -without being displayed to the person you sent it to. They may or may not \ -see it later.") - -ResDef(MK_MSG_MDN_PROCESSED, XP_MSG_BASE + 1380, -"The message has been processed in some manner (i.e., by some sort of rules or \ -server) without being displayed to the person you sent it to. They may or may not see it \ -later. There may not even be a human user associated the mailbox.") - -ResDef(MK_MSG_MDN_DELETED, XP_MSG_BASE + 1381, -"The message has been deleted. The person you sent it to may or may not have seen it. \ -They might \042undelete\042 it at a later time and read it.") - -ResDef(MK_MSG_MDN_DENIED, XP_MSG_BASE + 1382, -"The recipient of the message does not wish to send a return receipt back to \ -you.") - -ResDef(MK_MSG_MDN_FAILED, XP_MSG_BASE + 1383, -"A failure occurred. A proper return receipt could not be generated or sent to \ -you.") - -ResDef(MK_MSG_MDN_WISH_TO_SEND, XP_MSG_BASE + 1384, -"The sender of the message requested a receipt to be returned. \n\ -Do you wish to send one?") - -ResDef(MK_MSG_DELIV_IMAP, XP_MSG_BASE + 1385, - "Delivering message...") -ResDef(MK_MSG_DELIV_IMAP_DONE, XP_MSG_BASE + 1386, - "Delivering message... Done") -ResDef(MK_MSG_IMAP_DISCOVERING_MAILBOX, XP_MSG_BASE + 1387, -"Found folder: %s") - -ResDef(MK_MSG_UNABLE_TO_SAVE_DRAFT, XP_MSG_BASE + 1388, -MOZ_NAME_BRAND" is unable to save your message as a draft. Please make sure \n\ -that your Drafts mail folder is correctly chosen in your Mail and \n\ -Newsgroups preferences.") -ResDef(MK_MSG_UNABLE_TO_SAVE_TEMPLATE, XP_MSG_BASE + 1389, -MOZ_NAME_BRAND" is unable to save your message as a template. Please make \n\ -sure that your Templates mail folder is correctly chosen in your Mail \n\ -and Newsgroups preferences.") - -ResDef(MK_MSG_IMAP_INBOX_NAME, XP_MSG_BASE + 1390, "Inbox") - -ResDef(MK_IMAP_UPGRADE_NO_PERSONAL_NAMESPACE, XP_MSG_BASE + 1391, "The IMAP server indicates that \ -you have may not have any personal mail folders.\nPlease verify your subscriptions.") - -ResDef(MK_IMAP_UPGRADE_TOO_MANY_FOLDERS, XP_MSG_BASE + 1392, "While trying to automatically subscribe, \ -"MOZ_NAME_PRODUCT" has found a large number of IMAP folders.\nPlease select which folders you would like subscribed.") - -ResDef(MK_IMAP_UPGRADE_PROMPT_USER, XP_MSG_BASE + 1393, -MOZ_NAME_PRODUCT" has detected that you have upgraded from a previous version of Communicator.\n\ -You will need to choose which IMAP folders you want subscribed.") - -ResDef(MK_IMAP_UPGRADE_PROMPT_USER_2, XP_MSG_BASE + 1394, -"Any folders which are left unsubscribed will not appear in your folder lists,\n\ -but can be subscribed to later by choosing File / Subscribe.") - -ResDef(MK_IMAP_UPGRADE_PROMPT_QUESTION, XP_MSG_BASE + 1395, -"Would you like "MOZ_NAME_PRODUCT" to try to automatically subscribe to all your folders?") - -ResDef(MK_IMAP_UPGRADE_CUSTOM, XP_MSG_BASE + 1396, -"Please choose which folders you want subscribed in the Subscribe window...") - -ResDef(MK_IMAP_UPGRADE_WAIT_WHILE_UPGRADE, XP_MSG_BASE + 1397, -"Please wait while "MOZ_NAME_PRODUCT" upgrades you to use IMAP subscriptions...") - -ResDef(MK_IMAP_UPGRADE_SUCCESSFUL, XP_MSG_BASE + 1398, -"Upgrade to IMAP subscription successful.") - -ResDef(MK_POP3_ONLY_ONE, XP_MSG_BASE + 1399, -"You cannot add another server, because you are using POP.") - -ResDef(MK_MSG_REMOVE_MAILHOST_CONFIRM, XP_MSG_BASE + 1400, -"Are you sure you want to delete this server?\n\ -All mail downloaded from this server will be erased from your hard drive, and you cannot undo.") - -ResDef(MK_IMAP_GETTING_ACL_FOR_FOLDER, XP_MSG_BASE + 1401, -"Getting folder ACL...") - -ResDef(MK_MSG_EXPIRE_NEWS_ARTICLES, XP_MSG_BASE + 1402, -"Click here to remove all expired articles") - -ResDef(MK_MDN_DISPLAYED_RECEIPT, XP_MSG_BASE + 1403, -"Return Receipt (displayed)") - -ResDef(MK_MDN_DISPATCHED_RECEIPT, XP_MSG_BASE + 1404, -"Return Receipt (dispatched)") - -ResDef(MK_MDN_PROCESSED_RECEIPT, XP_MSG_BASE + 1405, -"Return Receipt (processed)") - -ResDef(MK_MDN_DELETED_RECEIPT, XP_MSG_BASE + 1406, -"Return Receipt (deleted)") - -ResDef(MK_MDN_DENIED_RECEIPT, XP_MSG_BASE + 1407, -"Return Receipt (denied)") - -ResDef(MK_MDN_FAILED_RECEIPT, XP_MSG_BASE + 1408, -"Return Receipt (failed)") - -ResDef(MK_IMAP_GETTING_SERVER_INFO, XP_MSG_BASE + 1409, -"Getting Server Configuration Info...") - -ResDef(MK_IMAP_GETTING_MAILBOX_INFO, XP_MSG_BASE + 1410, -"Getting Mailbox Configuration Info...") - -ResDef(MK_IMAP_EMPTY_MIME_PART, XP_MSG_BASE + 1411, -"This body part will be downloaded on demand.") - - -#define LI_MSG_BASE XP_MSG_BASE + 1500 -ResDef(LI_DOWN_CONFLICT_1, LI_MSG_BASE+1, "\ -Local and server copies of %0% are in conflict. What would you like to do:

    \ -%-cont-%") - -ResDef(LI_DOWN_CONFLICT_2, LI_MSG_BASE+2, "\ -\ -%-cont-%") - -ResDef(LI_DOWN_CONFLICT_3, LI_MSG_BASE+3, "\ -\ -\ -

    \ -%-cont-%") - -ResDef(LI_DOWN_CONFLICT_4, LI_MSG_BASE+4, "\ -

    \ -%-cont-%") - -ResDef(LI_DOWN_CONFLICT_5, LI_MSG_BASE+5, "\ -\ -%-cont-%") - -ResDef(LI_DOWN_CONFLICT_6, LI_MSG_BASE+6, "\ -Do this for all the remaining files \ -") - -ResDef(LI_DOWN_TITLE, LI_MSG_BASE+7, "\ -Download conflict") - -ResDef(LI_UP_CONFLICT_1, LI_MSG_BASE+8, "\ -Local and server copies of %0% are in conflict. What would you like to do:

    \ -%-cont-%") - -ResDef(LI_UP_CONFLICT_2, LI_MSG_BASE+9, "\ -\ -%-cont-%") - -ResDef(LI_UP_CONFLICT_3, LI_MSG_BASE+10, "\ -\ -\ -

    \ -%-cont-%") - -ResDef(LI_UP_CONFLICT_4, LI_MSG_BASE+11, "\ -

    \ -%-cont-%") - -ResDef(LI_UP_CONFLICT_5, LI_MSG_BASE+12, "\ -\ -Do this for all the remaining files \ -") - -ResDef(LI_UP_TITLE, LI_MSG_BASE+13, "\ -Upload conflict") - -ResDef(LI_INIT_LATER, LI_MSG_BASE+14, -"Your new location independence preference\n\ -will take effect the next time\n\ -you restart Communicator.") - - -#define RDF_MSG_BASE XP_MSG_BASE + 2000 - -ResDef(RDF_HTML_STR, RDF_MSG_BASE+1, "\ -

    %0%

    %1%") - -ResDef(RDF_HTML_STR_1, RDF_MSG_BASE+2, "\ -%s:\n") - -ResDef(RDF_HTML_STR_2, RDF_MSG_BASE+3, "\ -%s:\n") - -ResDef(RDF_HTML_STR_3, RDF_MSG_BASE+4, "\ -%s:%s\n") - -ResDef(RDF_HTML_STR_4, RDF_MSG_BASE+5, "\ - %s
    \n") - -ResDef(RDF_HTML_STR_5, RDF_MSG_BASE+6, "\ -%s:\n") - -ResDef(RDF_HTML_WINDATE, RDF_MSG_BASE+7, "%#m/%#d/%Y %#I:%M %p") -ResDef(RDF_HTML_MACDATE, RDF_MSG_BASE+8, "%m/%d/%Y %I:%M %p") - -ResDef(RDF_DATA_1, RDF_MSG_BASE+9, "Untitled URL") -ResDef(RDF_DATA_2, RDF_MSG_BASE+10, "Untitled Folder") -ResDef(RDF_DELETEFILE, RDF_MSG_BASE+11, "Delete file '%s' ?") -ResDef(RDF_UNABLETODELETEFILE, RDF_MSG_BASE+12, "File: '%s' could not be deleted.") -ResDef(RDF_DELETEFOLDER, RDF_MSG_BASE+13, "Delete folder '%s' and its contents?") -ResDef(RDF_UNABLETODELETEFOLDER, RDF_MSG_BASE+14, "Folder: '%s' could not be deleted.") -ResDef(RDF_NEWPASSWORD, RDF_MSG_BASE+15, "New Password:") -ResDef(RDF_CONFIRMPASSWORD, RDF_MSG_BASE+16, "Confirm New Password:") -ResDef(RDF_MISMATCHPASSWORD, RDF_MSG_BASE+17, "Passwords did not match.") -ResDef(RDF_ENTERPASSWORD, RDF_MSG_BASE+18, "Enter Password for '%s' ?") -ResDef(RDF_SITEMAPNAME, RDF_MSG_BASE+19, "Sitemap") -ResDef(RDF_RELATEDLINKSNAME, RDF_MSG_BASE+20, "Related Links") -ResDef(RDF_DEFAULTCOLUMNNAME, RDF_MSG_BASE+21, "Name") -ResDef(RDF_NEWWORKSPACEPROMPT, RDF_MSG_BASE+22, "New workspace name:") -ResDef(RDF_DELETEWORKSPACE, RDF_MSG_BASE+23, "Delete workspace '%s' and its contents?") - -ResDef(RDF_ADDITIONS_ALLOWED, RDF_MSG_BASE+24, "Additions allowed") -ResDef(RDF_DELETION_ALLOWED, RDF_MSG_BASE+25, "Deletion allowed") -ResDef(RDF_ICON_URL_LOCKED, RDF_MSG_BASE+26, "Icon URL locked") -ResDef(RDF_NAME_LOCKED, RDF_MSG_BASE+27, "Name locked") -ResDef(RDF_COPY_ALLOWED, RDF_MSG_BASE+28, "Copies allowed") -ResDef(RDF_MOVE_ALLOWED, RDF_MSG_BASE+29, "Moves allowed") -ResDef(RDF_WORKSPACE_POS_LOCKED, RDF_MSG_BASE+30, "Workspace position locked") - -ResDef(RDF_WEEKOF, RDF_MSG_BASE+31, "Week of %d/%d/%d") -ResDef(RDF_WITHINLASTHOUR, RDF_MSG_BASE+32, "Within the last hour") -ResDef(RDF_TODAY, RDF_MSG_BASE+33, "Today") - -#define RDF_DAY_BASE RDF_MSG_BASE + 34 -ResDef(RDF_DAY_0, RDF_DAY_BASE+0, "Sunday") -ResDef(RDF_DAY_1, RDF_DAY_BASE+1, "Monday") -ResDef(RDF_DAY_2, RDF_DAY_BASE+2, "Tuesday") -ResDef(RDF_DAY_3, RDF_DAY_BASE+3, "Wednesday") -ResDef(RDF_DAY_4, RDF_DAY_BASE+4, "Thursday") -ResDef(RDF_DAY_5, RDF_DAY_BASE+5, "Friday") -ResDef(RDF_DAY_6, RDF_DAY_BASE+6, "Saturday") - -#define RDF_CMD_BASE RDF_MSG_BASE + 41 -ResDef(RDF_CMD_0, RDF_CMD_BASE+0, " ") -ResDef(RDF_CMD_1, RDF_CMD_BASE+1, "Open or Close") -ResDef(RDF_CMD_2, RDF_CMD_BASE+2, "Open File") -ResDef(RDF_CMD_3, RDF_CMD_BASE+3, "Print") -ResDef(RDF_CMD_4, RDF_CMD_BASE+4, "Open URL In New Window") -ResDef(RDF_CMD_5, RDF_CMD_BASE+5, "Open URL in Composer") -ResDef(RDF_CMD_6, RDF_CMD_BASE+6, "Open As Workspace") -ResDef(RDF_CMD_7, RDF_CMD_BASE+7, "New Bookmark") -ResDef(RDF_CMD_8, RDF_CMD_BASE+8, "New Folder") -ResDef(RDF_CMD_9, RDF_CMD_BASE+9, "New Separator") -ResDef(RDF_CMD_10, RDF_CMD_BASE+10, "Make Alias") -ResDef(RDF_CMD_11, RDF_CMD_BASE+11, "Add To Bookmarks") -ResDef(RDF_CMD_12, RDF_CMD_BASE+12, "Save As...") -ResDef(RDF_CMD_13, RDF_CMD_BASE+13, "Create Shortcut") -ResDef(RDF_CMD_14, RDF_CMD_BASE+14, "Set Personal Toolbar Folder") -ResDef(RDF_CMD_15, RDF_CMD_BASE+15, "Set Bookmark Menu") -ResDef(RDF_CMD_16, RDF_CMD_BASE+16, "Set New Bookmark Folder") -ResDef(RDF_CMD_17, RDF_CMD_BASE+17, "Cut") -ResDef(RDF_CMD_18, RDF_CMD_BASE+18, "Copy") -ResDef(RDF_CMD_19, RDF_CMD_BASE+19, "Paste") -ResDef(RDF_CMD_20, RDF_CMD_BASE+20, "Delete File...") -ResDef(RDF_CMD_21, RDF_CMD_BASE+21, "Delete Folder...") -ResDef(RDF_CMD_22, RDF_CMD_BASE+22, "Reveal in Finder") -ResDef(RDF_CMD_23, RDF_CMD_BASE+23, "Properties...") -ResDef(RDF_CMD_24, RDF_CMD_BASE+24, "Rename Workspace") -ResDef(RDF_CMD_25, RDF_CMD_BASE+25, "Delete Workspace...") -ResDef(RDF_CMD_26, RDF_CMD_BASE+26, "Move Workspace Up") -ResDef(RDF_CMD_27, RDF_CMD_BASE+27, "Move Workspace Down") -ResDef(RDF_CMD_28, RDF_CMD_BASE+28, "Refresh") -ResDef(RDF_CMD_29, RDF_CMD_BASE+29, "Export...") -ResDef(RDF_CMD_30, RDF_CMD_BASE+30, "Remove as Bookmark Menu") -ResDef(RDF_CMD_31, RDF_CMD_BASE+31, "Remove as New Bookmark Folder") -ResDef(RDF_CMD_32, RDF_CMD_BASE+32, "Set Password...") -ResDef(RDF_CMD_33, RDF_CMD_BASE+33, "Remove Password...") -ResDef(RDF_CMD_34, RDF_CMD_BASE+34, "Export All...") -ResDef(RDF_CMD_35, RDF_CMD_BASE+35, "Undo") -ResDef(RDF_CMD_36, RDF_CMD_BASE+36, "New Workspace...") -ResDef(RDF_CMD_37, RDF_CMD_BASE+37, "Rename") - - -END_STR(mcom_include_xp_msg_i_strings) - -/* WARNING: DO NOT TAKE ERROR CODE -666, it is used internally - by the message lib */ - - -#endif /* _ALLXPSTR_H_ */ - diff --git a/l10nkits/client/windows/docs/nav40/branding.html b/l10nkits/client/windows/docs/nav40/branding.html deleted file mode 100644 index a19cfc0cb08..00000000000 --- a/l10nkits/client/windows/docs/nav40/branding.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Product Branding Issues - - - -

    -Product Branding Instructions

    -Under the terms of the Unlimited Localization Program, you must remove -or replace all trademarked Netscape terms, brand names, icons, images, -etc.  These trademarks are listed on the page found at the following -URL: - -

    http://home.netscape.com/misc/trademarks.html#trademarks - -

    Please refer to that page for details.  You may not release a localized -version of the Netscape Communicator with these trademarks left in the -product. -
      -

    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -

    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    - - - diff --git a/l10nkits/client/windows/docs/nav40/charsets.htm b/l10nkits/client/windows/docs/nav40/charsets.htm deleted file mode 100644 index 95e254dc806..00000000000 --- a/l10nkits/client/windows/docs/nav40/charsets.htm +++ /dev/null @@ -1,383 +0,0 @@ - - - - - HTML Output of: C:\TEMP\CHARSET.DBF - - - -

    -CSID REFERENCE TABLE

    -Use this table to determine the Character Set ID (CSID) for the character -set you wish to use, for example, for setting the value of  pref("intl.character_set") -in ALL_PREFS. -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CSIDCHARSET
    0CS_DEFAULT
    1CS_ASCII
    2CS_LATIN1
    6CS_MAC_ROMAN
    10CS_LATIN2
    11CS_MAC_CE
    14CS_8859_3
    15CS_8859_4
    16CS_8859_5
    17CS_8859_6
    18CS_8859_7
    19CS_8859_8
    20CS_8859_9
    21CS_SYMBOL
    22CS_DINGBATS
    23CS_DECTECH
    27CS_JISX0201
    29CS_TIS620
    35CS_UTF7
    38CS_USRDEF2
    39CS_KOI8_R
    40CS_MAC_CYRILLIC
    41CS_CP_1251
    42CS_MAC_GREEK
    43CS_CP_1253
    44CS_CP_1250
    45CS_CP_1254
    46CS_MAC_TURKISH
    53INTL_CHAR_SET_MAX
    254CS_USER_DEFINED_ENCODING
    255CS_UNKNOWN
    260CS_SJIS
    261CS_EUCJP
    263CS_BIG5
    264CS_GB_8BIT
    265CS_CNS_8BIT
    280CS_CNS11643_1
    281CS_CNS11643_2
    282CS_JISX0208
    284CS_KSC5601
    286CS_JISX0212
    287CS_GB2312
    290CS_UTF8
    292CS_NPC
    293CS_X_BIG5
    303CS_GB2312_11
    304CS_JISX0208_11
    305CS_KSC5601_11
    306CS_CNS11643_1110
    515CS_JIS
    525CS_2022_KR
    564CS_IMAP4_UTF7
    810CS_UCS2
    811CS_UCS4
    819CS_UCS2_SWAP
    1292CS_KSC_8BIT
    2308CS_SJIS_AUTO
    2309CS_EUCJP_AUTO
    2563CS_JIS_AUTO
    -@author: relliott -
    @source: ftang -
    @last updated: Mar. 19, 1998 -
    1997, Copyright Netscape -Communications Corp. All Rights Reserved
    - - - diff --git a/l10nkits/client/windows/docs/nav40/gettingStarted.html b/l10nkits/client/windows/docs/nav40/gettingStarted.html deleted file mode 100644 index 1d8fe51202d..00000000000 --- a/l10nkits/client/windows/docs/nav40/gettingStarted.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - Getting Started - - - -

    -2. Getting Started

    -Before you can begin using the Windows Front End Localization Kit, you -must install it and setup your working directories. This is a simple matter -of unzipping the compressed kit file(s) into the proper directories. Your -system must also meet certain requirements to run the tools needed to perform -the localization steps described below. - -

    -


    -

    -System Requirements

    -There a few system requirements for the kit in the strictest sense; however, -your choice of tools will have their own set of requirements.  The -most likely minimum configuration will be as follows: -
      -
    • -100% IBM compatible PC
    • - -
    • -Pentium® processor
    • - -
    • -Microsoft® Windows NT 3.51 or 4.0 (localized -versions will help testing but aren't required)
    • - -
    • -16 MB RAM
    • - -
    • -30 MB available hard disk space
    • - -
    • -A visual resource editor, such as those provided with Microsoft® -Visual C++, Borland® C++, etc.
    • - -
    • -An active Internet connection and the ability to ftp (send and receive) -large files
    • - -
    • -A Web browser (say, for example, Netscape Communicator ;-)
    • -
    - -

    - -

    - -

    -Installing the Kit

    -It is recommended that you install the Windows Front End Localization Kit -in a brand new directory on your development machine. For example, you -can create a \Netscape_L10N_Kits directory on your hard drive. This becomes -your kitRoot directory.  Place the L10n Kit's .ZIP file in -that directory and UNZIP it with the -d parameter: - -

    PKUNZIP -d filename -

      Example:  PKUNZIP -d winfekit
    - -
    -

    -Configuring Your Tools

    -If you intend to use the Netscape Translation Tools, please refer to the -Translation Tools User Guide for -instructions on setting up and using those tools.  If you intend to -use a different localization tool, please refer to that tool's documentation -for set up and usage instructions. -
      -
    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    - - - diff --git a/l10nkits/client/windows/docs/nav40/idBuild.jpg b/l10nkits/client/windows/docs/nav40/idBuild.jpg deleted file mode 100644 index 3082e454d8c..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/idBuild.jpg and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/image5LE.JPG b/l10nkits/client/windows/docs/nav40/image5LE.JPG deleted file mode 100644 index 560516659f0..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/image5LE.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/imageEJR.JPG b/l10nkits/client/windows/docs/nav40/imageEJR.JPG deleted file mode 100644 index 1d1f02f7ef0..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/imageEJR.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/imageGAN.JPG b/l10nkits/client/windows/docs/nav40/imageGAN.JPG deleted file mode 100644 index 30973021d3d..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/imageGAN.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/imageGHT.JPG b/l10nkits/client/windows/docs/nav40/imageGHT.JPG deleted file mode 100644 index b43ee129119..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/imageGHT.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/imageQC9.JPG b/l10nkits/client/windows/docs/nav40/imageQC9.JPG deleted file mode 100644 index 3f0f2b219f8..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/imageQC9.JPG and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/isocodes.htm b/l10nkits/client/windows/docs/nav40/isocodes.htm deleted file mode 100644 index c33c7d170f9..00000000000 --- a/l10nkits/client/windows/docs/nav40/isocodes.htm +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - ISO Locale codes - - - -
    -

    -ISO Language and Country Codes

    -2 letter language codes are derived from the ISO 639 standard; country -codes are from ISO 3166. Here are the codes for the locales currently supported -by the L10n kits. If an entry also includes the country code then you must -use that as well when creating the locale directory or naming a file. -

    -ISO Language and Country Codes table

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Language NameLanguage CodeCountry Code
    -
    Chinese (Traditional)
    -
    -
    zh
    -
    -
    CN
    -
    -
    Chinese (Simplified)
    -
    -
    zh
    -
    -
    TW
    -
    -
    Danish
    -
    -
    da
    -
    -
    DK
    -
    -
    Dutch
    -
    -
    nl
    -
    -
    NL
    -
    -
    French
    -
    -
    fr
    -
    -
    FR
    -
    -
    German
    -
    -
    de
    -
    -
    DE
    -
    -
    Italian
    -
    -
    it
    -
    -
    IT
    -
    -
    Japanese
    -
    -
    ja
    -
    -
    JP
    -
    -
    Korean
    -
    -
    ko
    -
    -
    KR
    -
    -
    Portuguese
    -
    -
    pt
    -
    -
    BR
    -
    -
    Spanish
    -
    -
    es
    -
    -
    ES
    -
    -
    Swedish
    -
    -
    sv
    -
    -
    SE
    -
    - -

    -1997, Copyright Netscape Communications -Corp. All Rights Reserved
    - - - diff --git a/l10nkits/client/windows/docs/nav40/isonames.htm b/l10nkits/client/windows/docs/nav40/isonames.htm deleted file mode 100644 index f3603451c68..00000000000 --- a/l10nkits/client/windows/docs/nav40/isonames.htm +++ /dev/null @@ -1,1029 +0,0 @@ - - - - - Named Entities and Numeric Character References - - - -

    -Named Entities and Numeric Character References

    -The following table lists all of the named entities found in the -official HTML 2.0 RFC. - -

    1st column shows the HTML source of the named entity -
    2nd column shows the result of using that named entity -
    3rd column shows the HTML source of the equivalent numeric character -reference -
    4th column shows the result of using that numeric character reference - -

    The 2nd and 4th columns should look identical. -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    &quot;"&#34;"
    &amp;&&#38;&
    &lt;<&#60;<
    &gt;>&#62;>
    &nbsp; &#160; 
    &iexcl;¡&#161;¡
    &cent;¢&#162;¢
    &pound;£&#163;£
    &curren;¤&#164;¤
    &yen;¥&#165;¥
    &brvbar;¦&#166;¦
    &sect;§&#167;§
    &uml;¨&#168;¨
    &copy;©&#169;©
    &ordf;ª&#170;ª
    &laquo;«&#171;«
    &not;¬&#172;¬
    &shy;­&#173;­
    &reg;®&#174;®
    &macr;¯&#175;¯
    &deg;°&#176;°
    &plusmn;±&#177;±
    &sup2;²&#178;²
    &sup3;³&#179;³
    &acute;´&#180;´
    &micro;µ&#181;µ
    &para;&#182;
    &middot;·&#183;·
    &cedil;¸&#184;¸
    &sup1;¹&#185;¹
    &ordm;º&#186;º
    &raquo;»&#187;»
    &frac14;¼&#188;¼
    &frac12;½&#189;½
    &frac34;¾&#190;¾
    &iquest;¿&#191;¿
    &Agrave;À&#192;À
    &Aacute;Á&#193;Á
    &Acirc;Â&#194;Â
    &Atilde;Ã&#195;Ã
    &Auml;Ä&#196;Ä
    &Aring;Å&#197;Å
    &AElig;Æ&#198;Æ
    &Ccedil;Ç&#199;Ç
    &Egrave;È&#200;È
    &Eacute;É&#201;É
    &Ecirc;Ê&#202;Ê
    &Euml;Ë&#203;Ë
    &Igrave;Ì&#204;Ì
    &Iacute;Í&#205;Í
    &Icirc;Î&#206;Î
    &Iuml;Ï&#207;Ï
    &ETH;Ð&#208;Ð
    &Ntilde;Ñ&#209;Ñ
    &Ograve;Ò&#210;Ò
    &Oacute;Ó&#211;Ó
    &Ocirc;Ô&#212;Ô
    &Otilde;Õ&#213;Õ
    &Ouml;Ö&#214;Ö
    &times;×&#215;×
    &Oslash;Ø&#216;Ø
    &Ugrave;Ù&#217;Ù
    &Uacute;Ú&#218;Ú
    &Ucirc;Û&#219;Û
    &Uuml;Ü&#220;Ü
    &Yacute;Ý&#221;Ý
    &THORN;Þ&#222;Þ
    &szlig;ß&#223;ß
    &agrave;à&#224;à
    &aacute;á&#225;á
    &acirc;â&#226;â
    &atilde;ã&#227;ã
    &auml;ä&#228;ä
    &aring;å&#229;å
    &aelig;æ&#230;æ
    &ccedil;ç&#231;ç
    &egrave;è&#232;è
    &eacute;é&#233;é
    &ecirc;ê&#234;ê
    &euml;ë&#235;ë
    &igrave;ì&#236;ì
    &iacute;í&#237;í
    &icirc;î&#238;î
    &iuml;ï&#239;ï
    &eth;ð&#240;ð
    &ntilde;ñ&#241;ñ
    &ograve;ò&#242;ò
    &oacute;ó&#243;ó
    &ocirc;ô&#244;ô
    &otilde;õ&#245;õ
    &ouml;ö&#246;ö
    &divide;÷&#247;÷
    &oslash;ø&#248;ø
    &ugrave;ù&#249;ù
    &uacute;ú&#250;ú
    &ucirc;û&#251;û
    &uuml;ü&#252;ü
    &yacute;ý&#253;ý
    &thorn;þ&#254;þ
    &yuml;ÿ&#255;ÿ
    - -


    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    - - - diff --git a/l10nkits/client/windows/docs/nav40/kitOverview.html b/l10nkits/client/windows/docs/nav40/kitOverview.html deleted file mode 100644 index d3fa4b99683..00000000000 --- a/l10nkits/client/windows/docs/nav40/kitOverview.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - Kit Overview - - - -

    -Kit Overview

    -This kit is primarily intended for knowledgeable 3rd parties, familiar -with the localization process and with commonly available localization -and resource editing tools.  Using this kit, you will localize the -components that make up the Windows front end (the Windows-specific, -user visible portions) of the Netscape Communicator or Navigator. You may -use the Netscape-developed translation tools (DogLev and ToolCool) or another -tool set of your choice to leverage and localize STRING TABLE, MENU, DIALOG -and certain DATA resource types. You will need to use a Windows compatible -resource editor to localize the remaining DATA resources and to resize -DIALOGs. -
      -
    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    - - - diff --git a/l10nkits/client/windows/docs/nav40/kitStruct.html b/l10nkits/client/windows/docs/nav40/kitStruct.html deleted file mode 100644 index 6106dce9ec7..00000000000 --- a/l10nkits/client/windows/docs/nav40/kitStruct.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Kit Structure - - - -

    -Kit Structure and Organization

    -When you install this Localization Kit you will find a number of new directories -on your hard disk. Each directory is named so as to be fairly self-explanatory, -but the following diagram and description may help avoid any confusion -you may have about what's what. -

    -

    - -

    -Description of Kit Directories

    - -
      -
    • -The kitRoot directory is wherever you install the Netscape -Localization Kits.
    • - -
    • -The l10nkits directory contains the tools and documentation -you need to complete your work (see below)
    • - -
    • -The products directory contains the English language version -of the files you will be translating. This kit concerns the files contained -in the 32 bit Windows client product.
    • -
    -The l10nkit directory tree has the following structure: - -

    -

      -
    • -Since this kit concerns the Windows client Communicator product (as opposed -to our server products) all the relevant documentation and tools are found -under the client\windows directory.
    • - -
    • -The docs directory contains documentation on the Kit, including -the file you are reading now.
    • - -
    • -The tools directory contains any tools provided with the -Kit, such as the Netscape Translation Tool.
    • -
    -  -
    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    - - - diff --git a/l10nkits/client/windows/docs/nav40/l10ntree.jpg b/l10nkits/client/windows/docs/nav40/l10ntree.jpg deleted file mode 100644 index b05ad158ffd..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/l10ntree.jpg and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/localizeAboutplg.html b/l10nkits/client/windows/docs/nav40/localizeAboutplg.html deleted file mode 100644 index a06206ad25d..00000000000 --- a/l10nkits/client/windows/docs/nav40/localizeAboutplg.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - Localizing ABOUTPLG - - - -

    -Localization Notes for ABOUTPLG

    -This resource contains the HTML and JavaScript source of the about:plugins -page. You only need to translate the user-visible portions of this file, -as indicated below. DO NOT translate tags or JavaScript language elements. -Unless you plan to create and support your own plugins, you probably should -not localize the URL contained in this page. - -

    Note: this is a cross platform resource; you may be able to reuse this -localization work for Macintosh and/or Unix versions. - -

    Just translate the items in magenta: -

      -
    • -<TITLE>About Plug-ins</TITLE>
    • - -
    • -document.writeln("<b><font size=+3>Installed -plug-ins</font></b><br>");
    • - -
    • -document.writeln("<b><font size=+2>No plug-ins -are installed.</font></b><br>");
    • - -
    • -document.writeln("For more information on Netscape -plug-ins,
    • - -
      <A REF=http://home.netscape.com/comprod/products/navigator/version_2.0/plugins/index.html> -
      click here</A>.<p><hr>"); -
    • -document.writeln("<dl><dd>File name:");
    • - -
    • -document.writeln("<tr><th width=20%><font size=-1>Mime -Type</font></th>");
    • - -
    • -document.writeln("<th width=50%><font size=-1>Description</font></th>");
    • - -
    • -document.writeln("<th width=20%><font size=-1>Suffixes</font></th>");
    • - -
    • -document.writeln("<th><font size=-1>Enabled</th></tr>");
    • - -
    • -enabled = "No";
    • - -
    • -enabled = "Yes";
    • -
    -  -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -
     
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/localizeAllPref.html b/l10nkits/client/windows/docs/nav40/localizeAllPref.html deleted file mode 100644 index a26a94d00d2..00000000000 --- a/l10nkits/client/windows/docs/nav40/localizeAllPref.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Localizing ALL_PREFS - - - -

    -Localization Notes for ALL_PREFS

    -These preferences are identified in the localization notes as "ALL_PREFSRCDATA" -followed by the Javascript function name for that preference.  For -example: -
      ALL_PREFSRCDATAnetwork.search.url
    -The localizable portion of this preference will appear in the XL_STR field.  -If this value is a string, it will be surrounded with quotes.  If -it is a number, it will not.  Do not delete quotes if they are present -and do not add them if they are absent!  Many entries also begin with -tab characters or initial spaces; it is best not to alter these, as well. - -

    NOTE: the following section is for reference, -showing the way the complete Javascript syntax looks.  The entries -contained in the translation databases separate the Javascript function -from the data that function returns. Comments are reproduced in the COMMENT -field of the translation database where appropriate. - -

    You only need to localize the following entries. The parts you need -to change are highlighted in majenta. Comments -are in green. Localize URLs according to the -rules. -

      -
    • -pref("network.search.url", "http://cgi.netscape.com/cgi-bin/url_search.cgi?search=");
    • - -
        This URL is connected to the Navigator's Search -button. -
         
      - -
    • -pref("browser.startup.homepage", "http://home.netscape.com/");
    • - -
        This is the default home page value that is attached -to the Home button and the Home menu item.
      -
    - -
      -
    • -pref("browser.personal_toolbar_button.max_chars", 15);
    • - -
        This determines the maximum number of characters -a personal toolbar button title can contain.  You may not need to -change this, but it's there if you do. -
         
      - -
    • -pref("intl.accept_languages",    "en");
    • - -
        This determines the default value of the ACCEPT_LANG -property of the META tag. You can see this value by choosing Edit | Preferences, -select Navigator | Language; the default value will be the 2 letter ISO -Language code value you supply here. -
         
      - -
    • -pref("intl.accept_charsets",  "iso-8859-1,*,utf-8");
    • - -
        Replace iso-8859-1 with sjis for Japanese, euc-kr -for Korean, gb for Simplified Chinese, Big5 for Traditional Chinese, iso8859-2 -for Latin 2 languages. -
         
      - -
    • -pref("intl.character_set",  2);
    • - -
        You only need to change this for non-LATIN1 languages.  -Use the CSID Reference table to look up the -appropriate value for other languages. -
         
      - -
    • -pref("intl.font_encoding", 6);
    • - -
        maybe not used, 6 = CS_MAC_ROMAN, 1292 = ko, -263 = trad. chinese, 264 = simp. chinese
      -  -
    • -pref("editor.template_location", http://home.netscape.com/home/gold3.0_templates.html");
    • - -
    • -pref("editor.default_template_location", "http://home.netscape.com/home/gold3.0_templates.html");
    • - -
        Localize these URL according to the rules.
      - -
    • -pref("editor.html_directory",       "C:\\My -Documents");
    • - -
    • -pref("editor.image_directory",       "C:\\My -Documents");
    • - -
        If the My Documents directory is translated on -the localized version of Windows you working on, then match this preference -with the localized value. -
         
      - -
    • -pref("editor.color_scheme",     "Netscape -Default Colors");
    • - -
        This string should match the value used to translate -STRINGTABLE42169 (but it's not critical if it doesn't). -
         
      - -
    • -pref("ldap.directory1.description", "Personal Address -Book");
    • - -
    • -pref("ldap_1.directory1.description", "Personal Address -Book");
    • - -
        These entries appears as the description for -searching the personal address book in a mail directory search.  Translate -them the way you do all the other instances of this string. -
         
      - -
    • - pref("netcaster.containers.container1", "-3;'Channel_Finder'; 'http://netcaster.netscape.com/finder/container/index.html'; -1440;0");
    • - -
        Localize this URL according to the rules.
      -
    -  -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -
     
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/localizeBookmarks.html b/l10nkits/client/windows/docs/nav40/localizeBookmarks.html deleted file mode 100644 index a5a2533efe3..00000000000 --- a/l10nkits/client/windows/docs/nav40/localizeBookmarks.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Localizing Bookmarks - - - -

    -Localization Notes for  BOOKMARKS.HTM

    -As part of the Unlimited Localization Program, you may choose to include -the default set of bookmarks that came with this kit, or you may create -your own bookmarks file.  Assuming you include a bookmarks file, you -should save it to  kitRoot\products\client\windows\platform\locale\nav40\program\defaults\bookmark.htm. -
      -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  -
      - - diff --git a/l10nkits/client/windows/docs/nav40/localizeConfigPref.html b/l10nkits/client/windows/docs/nav40/localizeConfigPref.html deleted file mode 100644 index 074d6b9b871..00000000000 --- a/l10nkits/client/windows/docs/nav40/localizeConfigPref.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - Localizing CONFIG_PREFS - - - -

    -Localization Notes for CONFIG_PREFS

    -These entries make up the configurable Guide Toolbar and Help menu items -and their functions. As part of the Unlimited Localization Program, you -may define your own set of Guide Toolbar and Help Menu items.  You -MUST remove or replace with your own links the following Help Menu items: -
      -
    • -Release Notes
    • - -
    • -Product Information and Support
    • - -
    • -Software Updates
    • - -
    • -Register Now
    • - -
    • -Member Services
    • -
    -CONFIG_PREF items are identified in the localization notes as "CONFIG_PREFSRCDATA" -followed by the Javascript function name.  For example, -
      CONFIG_PREFSRCDATAtoolbar.places.default_url
    -Most items in this list of preferences consist of two related components: -a label and a URL.  To localize a label, only edit the portion of -the preference that are within the second set of quotes.  For example, -
      -
    • -config("toolbar.places.item_0.label","The Internet");
    • -
    -The words, "The Internet" are contained in the second set of quotes; that -is the part you localize.  Because these are button labels, you should -try to keep them as short as possible.  If you find that you must -use a long word or phrase in your translation, you may discover that the -buttons no longer display the entire text.  You can increase the maximum -number of characters the Toolbar buttons will display by increasing the -value of the browser.personal_toolbar_button.max_chars preference. - -

    You can use the "-" character in a label to create a separator. - -

    You can specify a sub-folder in the Guide Toolbar by specifying the -URL to be the word "FOLDER".  For example: -

      -
    • -config("personal_toolbar.item_1.url","FOLDER");
    • -
    -This lets the code that lays out the toolbar know that the current item -is a folder with sub-folders.  DO NOT localize -the word "FOLDER". -

    -Forbidden CONFIG_PREFS Resources

    -There are some URLs in CONFIG_PREFS which must not be changed in any way.  -The first kind is the about: page URLs: -
      -
    • -config("menu.help.item_12.url","about:plugins");
    • - -
    • -config("menu.help.item_13.url","about:fonts");
    • -
    -You may translate the associated labels but not these URLs. (You can, of -course, delete them entirely, but then you won't have access to these "about" -pages via the menus.)  Refer to the Localizing -URLs section for more information. -
    Finally, some items in CONFIG_PREFS are non-localizable Javascript -preference values.  For example, -
      -
    • -config("toolbar.logo.frames",-1);
    • - -
    • -config("personal_toolbar.CreateNewToolbar", false);
    • - -
    • -config("personal_toolbar.NewToolbarFolderName", "");
    • -
    -Don't alter these. -
      -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -
     
    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    -  -
      - - diff --git a/l10nkits/client/windows/docs/nav40/localizeLicense.html b/l10nkits/client/windows/docs/nav40/localizeLicense.html deleted file mode 100644 index b9e69023df5..00000000000 --- a/l10nkits/client/windows/docs/nav40/localizeLicense.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - Localizing the License - - - -

    -Localization notes for LICENSE

    -You must include the Netscape End User License Agreement included with -this kit in your localized product.  The license file may be found -at: products\client\windows\platform\en\license\export\eula\license.txt. -The Localization Kit gives no information on the nature of this license -agreement; it only tells you how to put a localized license into the software. -Whether or not you localize this license (this may depend on your desires -or upon the laws of your country), you must include this in your localized -binaries by following this procedure. (This example uses Microsoft® -MSDEV; if you prefer a different resource editor you may need to execute -slightly different steps): -
      -
    • -Open license.txt in a text editor window.
    • - -
    • -Choose Edit | Select All.
    • - -
    • -Choose Edit | Copy.
    • - -
    • -Open resdll.dll (make sure you have the right one!).
    • - -
    • -Expand the DATA section, open the LICENSE entry.
    • - -
    • -Choose Edit | Select All.
    • - -
    • -Choose Edit | Paste to paste the new text over the old:
    • - -
    • -Terminate the entry with a null character: type "0"
    • - -
      Save and exit.
    -  -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -
     
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/localizeNpnul.html b/l10nkits/client/windows/docs/nav40/localizeNpnul.html deleted file mode 100644 index 316a882bff4..00000000000 --- a/l10nkits/client/windows/docs/nav40/localizeNpnul.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Localizing NPNUL - - - -

    -Localizing the NULL Plugin

    -The so-called "NULL" plugin is the default plugin that ships with all versions -of the Communicator.  It's job is to list the plugins that you have -installed, and if you don't have a requested plugin, to help you get it. - -

    The NULL plugin consists of a single file, npnul32.dll, located in the -kitRoot\products\client\windows\platform\locale\nav40\program\plugins\ -directory.  Localization notes have been provided for you to use when -localizing the resources for this file.  Instructions for individual -resources can be found in the COMMENT field of the matching DOG file, npnul32.dog -(or npnul16.dog for Windows 3.1) -

     
    -  -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -
     
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/localizeURL.html b/l10nkits/client/windows/docs/nav40/localizeURL.html deleted file mode 100644 index 57718bc00fd..00000000000 --- a/l10nkits/client/windows/docs/nav40/localizeURL.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - Localizing URLs - - - -

    -Localizing URLs

    -Many resources of all types in the Communicator contain Internet addresses -in the form of URLs (Universal Resource Locators). Most of these point -to locations within the Netscape domain; as part of the Unlimited Localization -Program, you can leave these as they are, or you may change them as you -desire. -

    -Internal URLs

    -There are a number of internal URLs that should not -be changed.  These are the strings that look like about:[some -value].  These point to internally contained resources, such as -the main About Communicator page.  If you localize these strings you -will not be able to load these pages.  The main examples you might -find are: -
      -
    • -about:
    • - -
    • -about:plugins
    • - -
    • -about:fonts
    • -
    -For more examples and information on these internal URLs go here. -
      -
      -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -
     
    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/localize_these_files.html b/l10nkits/client/windows/docs/nav40/localize_these_files.html deleted file mode 100644 index e4a11446b20..00000000000 --- a/l10nkits/client/windows/docs/nav40/localize_these_files.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - Localize these Files - - - -

    -Localize These Files

    -This section tells you exactly what files need to be localized. The following -tables contain two columns: -
      -
    • -The file to be localized column gives the specific file name. The path -name given for each file is relative to the Windows Front End Localization -Kit's starting point; e.g. \kitRoot\products\client\windows\platform\de -(German in this example).  If the file or resource name is a hypertext -link, further information can be found by following that link.
    • - -
    • -The purpose column describes the basic purpose of this file.
    • -
    -Table 1. Binary files to be localized - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    File to be localized Purpose
    nav40\program\brpref32.dllBrowser preferences
    nav40\program\editor32.dllComposer User Interface
    nav40\program\edpref32.dllComposer preferences
    nav40\program\mnpref32.dllMail and News preferences
    nav40\program\nsmailui.dllMail User Interface
    nav40\program\nsnotify.exeMail notification User Interface
    nav40\program\prefui32.dllPreference User Interface 
    nav40\program\resdll.dllMain Browser User Interface
    nav40\program\plugins\npnul32.dllNULL plugin
    - - -

    Table 2. External files to be localized - - - - - - - - - - - - -
    File to be localizedPurpose
    nav40\program\defaults\bookmark.htmDefault bookmarks file.
    -
    -Table 3. DATA resources requiring localization - - - - - - - - - - - - - - - - - - -
    Resource Name Purpose
    ABOUTPLGHTML source of about:plugins page
    LICENSEInternal software license agreement
    - -

     
    -  -
    - - - -
    -
    [CONTENTS]
    -
    - -
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/nomenclature.html b/l10nkits/client/windows/docs/nav40/nomenclature.html deleted file mode 100644 index 0c9415cf4de..00000000000 --- a/l10nkits/client/windows/docs/nav40/nomenclature.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - Conventions - - - -

    -Nomenclature and Typographical Conventions

    -Typographical Conventions -
    Words in italics typeface represent a variable term or phrase, -meant to be replaced by another value at "runtime."  Example: -
      locale -- replaced by a 2- or 4 letter locale code; e.g. zhtw
    -Words in bold typeface, using a proportional font, represent a literal -value in a string that might also contain a variable word or phrase. Example: -
      4.03 [locale] -- 4.03 [ ] are literal values, -while locale is a variable. -
         
      -
    -Words in a fixed width font represent file or directory names, -or DOS or Windows commands to be typed as they appear.  Sometimes, -part or all of the path will be in bold, for emphasis. -Examples: -
      Change to the kitRoot\l10nkits\client\windows\tools -directory -
      Execute RTRNKIT
    -Nomenclature -
    Throughout this document, certain terms and phrases will be used repeatedly: - -

    Table 1. Nomenclature and Typographical Conventions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    kitRoot directory indicates the starting or topmost directory of the Windows Front End -Localization Kit.
    platformeither 16 or 32 bit, depending on the version you are working on.
    localein general, this refers to the language into which you are localizing -the product. The list of valid locale names is defined in the ISO -Language and Country Codes Table.
    localization databasea database generated by a leveraging tool from a set of matched binary -resource files. 
    localization notesany special instructions, including the "translate/don't translate" -flag, associated with a given resource.  Localization notes are contained -in the localization database for each resource module.
    leverageThe process of merging previous localized versions of a file into a -current version. 
    forbidden resourceA resource that cannot be changed from the original value without (negatively) -impacting the functionality of the product. These are identified in the -localization databases.
    -  -
      -

    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/pixel.gif b/l10nkits/client/windows/docs/nav40/pixel.gif deleted file mode 100644 index 094fcbaee5b..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/pixel.gif and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/projectOverview.html b/l10nkits/client/windows/docs/nav40/projectOverview.html deleted file mode 100644 index 1b11879cd02..00000000000 --- a/l10nkits/client/windows/docs/nav40/projectOverview.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - Project Overview - - - -

    -1. Project Overview

    - -
    Welcome to the Netscape Communicator/Navigator -Localization Kit!
    - - -

    This localization kit will assist you in creating a localized version -of Netscape Communicator or Navigator for the 32-bit Windows platform. -Using the instructions and optionally, the tools provided in this kit, -you can translate the product's menus, dialogs and error messages to the -language of your choice. As long as you follow the terms of the license -agreement under which this kit is distributed, you are free to do what -you want with the resulting localized product. - -

    Localizing the Netscape client is based on "binary" or "no-compile"localization -model. Instead of localizing resource script (.RC) files, which must be -recompiled to produce a working localized version, you work directly on -the binary resource module (.DLL or .EXE) files. You have access to localization -notes to assist and guide you through some of the trickier areas of -the product.  Finally, this kit contains several tools developed by -Netscape to expedited the localization process; however, you may, if you -prefer, work with the localization tools of your choice. - -

    The no-compile localization model offers a number of key benefits over -source file translation: -

      -
    • -A simpler kit environment - no make files or bulky source trees are required.
    • - -
    • -Leveraging previous translations is simpler when resources can be stored -in a database, decreasing translation time.
    • - -
    • -"Forbidden" resources can be locked from over-translation, improving the -quality of translated products.
    • - -
      Localization notes and instructions can be displayed along side the -actual resource being localized, allowing the translator immediate access -to this information.
    -  -
    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/reference.html b/l10nkits/client/windows/docs/nav40/reference.html deleted file mode 100644 index b04f14751da..00000000000 --- a/l10nkits/client/windows/docs/nav40/reference.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - Reference - - - -

    -Reference

    -This section summarizes the references used throughout this document.  -In addition, other miscellaneous references may be found here. - -

    Table 5. Reference Links - - - - - - - - - - - - - - - - - - - - - - - - -
    Locale Table (local)Locale -Table (remote)Communicator -Data Sheet
    Communicator International -Features"about:" -URLs and easter eggsCSID Reference table 
    Cross-Product Encoding -UI Names
    -
    -Following are links to the two main header files used in the Communicator -project, resource.h and allxpstr.h. Resource.h contains the resource IDs -for the Windows Front End resources, while allxpstr.h contains both the -ID and the actual strings of the cross platform messages. These are provided -for reference only, as the resource name is -sometimes more descriptive than the numeric ID used in the translation -databases. You do not need to localize these files! -

    -  -
    - - - -
    -
    [CONTENTS]
    -
    - -
     
    - -

    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/reportingBugs.html b/l10nkits/client/windows/docs/nav40/reportingBugs.html deleted file mode 100644 index ddf085d774a..00000000000 --- a/l10nkits/client/windows/docs/nav40/reportingBugs.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Reporting Bugs - - - -

    -Reporting Bugs

    -Any bugs in the localization kits you find should be reported to mozilla.org -as soon as possible. When you report a bug, try to be as specific as you -can about the exact steps needed to reproduce the bug.  Provide a -complete description of the problem versus the expected results.  -You should let us know if the problem is 100% reproducible (it happens -every time), or if it is intermittant.  If you think that your operating -environment may play some factor, let us know the details of that.  -Finally, before reporting any bug, you should make sure that the problem -doesn't also happen in the US English product (if it does, we still want -to know, but it may not be possible to fix it through the localization -kits or tools as they are now). - -

    To report a bug, post a message to the following mozilla.org newsgroup: -

    - -
    news://secnews.netscape.com/netscape.mozilla.public.general
    - - -

    Be sure to include the information described above. -
      -

    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/resource.h b/l10nkits/client/windows/docs/nav40/resource.h deleted file mode 100644 index ad41d803971..00000000000 --- a/l10nkits/client/windows/docs/nav40/resource.h +++ /dev/null @@ -1,3949 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by netscape.rc -// -#define IDI_COMMUNICATOR 1 -#define IDR_MAINFRAME 2 -#define ID_CONFIGUREVIEWER 3 -#define IDC_REMOVE 3 -#define IDC_ADVANCED 3 -#define IDR_DOCUMENT 4 -#define IDR_NETSCAPETYPE_CNTR_IP 6 -#define IDC_VERIFY_HTML 7 -#define IDC_ADD_NEW_TAG 8 -#define IDM_MAINFRAMEFILEMENU 50 -#define IDM_MAINFRAMEEDITMENU 51 -#define IDM_MAINFRAMEVIEWMENU 52 -#define IDM_MAINFRAMEGOMENU 53 -#define IDM_MAILTHREADFILEMENU 54 -#define IDM_MAILTHREADEDITMENU 55 -#define IDM_MAILTHREADVIEWMENU 56 -#define IDM_MAILTHREADGOMENU 57 -#define IDM_MAILTHREADMESSAGEMENU 58 -#define IDM_COMPOSER_TABLE_SELECTMENU 70 -#define IDM_COMPOSER_TABLE_INSERTMENU 71 -#define IDM_COMPOSER_TABLE_DELETEMENU 72 -#define VK_APPS 0x5D -#define IDD_ABOUTBOX 100 -#define HOTLIST1_DIALOG 101 -#define IDD_ADDRESS_LIST 101 -#define IDR_EDITFRAME 101 -#define IDC_BUTTON_BACK 101 -#define IDD_NEWSGROUP_SERVERTYPE 101 -#define IDD_OPENURL_BOX 102 -#define IDS_COMPOSECOMPOSE 103 -#define IDC_BUTTON_ATTACH 103 -#define IDD_HISTORYBAR 103 -#define IDD_LOCATION_DLG 104 -#define IDS_COMPOSE_PRIORITY 104 -#define IDD_PAGE_TITLE 105 -#define IDS_WARN_REMOVE_SERVER 105 -#define IDD_ALERTBOX 106 -#define IDS_USERNAME 106 -#define IDD_PP_FOLDER_DISKSPACE 106 -#define IDS_NICKNAME 107 -#define IDD_CONFIRMBOX 108 -#define IDS_SPECIAL_FOLDER 108 -#define IDD_PROMPT 109 -#define IDD_PROMPT_PASSWD 110 -#define IDR_SEARCHFRAME 111 -#define IDC_URL 112 -#define IDD_URLTITLEBAR 112 -#define IDC_TITLE 113 -#define IDC_NUMLOADS 114 -#define IDS_ATTACHFILE 115 -#define IDB_MAINFRAME_MIXED 116 -#define IDS_COMPOSEOPEN 116 -#define IDS_COMPOSECLOSE 117 -#define IDS_WHITEBOX_MENU 117 -#define IDD_STYLEOG 118 -#define IDS_CANCEL_BUTTON 118 -#define IDD_PREF_CHOOSE_FOLDER 118 -#define IDC_ALERT 119 -#define IDD_JUST_HOME 119 -#define IDS_SENDLATER 119 -#define IDC_CONFIRM 120 -#define IDD_JUST_TOOLS 120 -#define IDR_HISTORY_MENU 120 -#define IDS_EXAMPLESPECIFICDLS 120 -#define IDR_HISTORYSEARCH_MENU 121 -#define IDR_HISTORY_ICON 121 -#define IDS_COMPOSEOPTIONS 121 -#define IDC_OVERANCHOR 122 -#define IDC_OVERANCHOR_OLD 122 -#define IDS_GO_OFFLINE 122 -#define IDC_PROMPT_ASK 123 -#define IDC_OVERANCHOR2 123 -#define IDC_SELECTANCHOR 123 -#define IDS_GO_ONLINE 123 -#define IDC_PROMPT_ANS 124 -#define IDD_ExternalViewerConfig 124 -#define IDS_ADD_LDAP_SERVER 124 -#define IDC_TITLETEXT 125 -#define IDR_MAINFRAME1 125 -#define IDS_LDAP_SERVER_PROPERTY 125 -#define IDI_MAIL 126 -#define IDS_ADD_NEWS_SERVER 126 -#define IDC_URLTEXT 127 -#define IDD_DIALOG1 127 -#define IDR_MAINFRAME2 127 -#define IDD_ADDRESS_USER 127 -#define IDS_NEWS_SERVER_PROPERTY 127 -#define IDC_SOURCE 128 -#define IDI_ICON1 128 -#define IDS_ADD_MAIL_SERVER 128 -#define IDC_STYL_TOOLS 129 -#define IDS_MAIL_SERVER_PROPERTY 129 -#define IDC_STYL_HOME 130 -#define IDD_HISTORY 130 -#define IDS_SERVER_POP3 130 -#define IDC_STYL_WINDOW 131 -#define IDD_APPEARANCE 131 -#define IDS_SERVER_IMAP 131 -#define IDS_SERVER_POP3_STATIC 131 -#define IDC_STYL_NETWORK 132 -#define IDD_STARTUP 132 -#define IDS_SERVER_IMAP_STATIC 132 -#define IDD_USERINFO 133 -#define IDS_POP3_ONLY_ONE 133 -#define IDD_HOTLIST 134 -#define IDS_REMOVE_MAILHOST_CONFIRM 134 -#define IDD_NETWORK 135 -#define IDS_MAIL_SERVER 135 -#define IDD_USERPASS 140 -#define IDS_HELP_BUTTON 140 -#define IDD_MAILURL 141 -#define IDS_BROWSE_BUTTON 141 -#define IDD_UNKNOWNTYPE 142 -#define IDD_HELPER_DIALOG 143 -#define IDD_NEWMIMETYPE 144 -#define IDD_CONFIGUREVIEWER_SMALL 145 -#define IDC_FileName 148 -#define IDD_SPLASH 148 -#define IDC_FileSize 149 -#define IDD_PRINTING_STATUS 149 -#define IDC_TransferTime 150 -#define IDS_PREF_REGULAR 150 -#define IDS_PREF_BOLD 151 -#define IDC_BytesTransferred 152 -#define IDS_PREF_ITALIC 152 -#define IDC_StatusRect 153 -#define IDS_PREF_BOLDITALIC 153 -#define IDS_NUMBERS_ONLY 154 -#define IDC_USE_EXCHANGE 155 -#define IDS_EMPTY_STRING 155 -#define IDS_PORT_RANGE 156 -#define IDD_LICENSE 157 -#define IDS_WIZARD_SENDMAIL 157 -#define IDD_SECURITY 158 -#define IDB_MCI1 158 -#define IDS_WIZARD_READMAIL 158 -#define IDB_MCI2 159 -#define IDS_WIZARD_READNEWS 159 -#define IDS_SENDMAIL_STATIC1 160 -#define IDS_READMAIL_STATIC1 161 -#define IDS_READMAIL_STATIC2 162 -#define IDS_READMAIL_STATIC3 163 -#define IDS_READMAIL_EG1 164 -#define IDS_FINISH 165 -#define IDS_NEXT 166 -#define IDS_WIZARD_COVER 167 -#define IDS_COVER_STATIC1 168 -#define IDB_PICTURES 169 -#define IDS_SENDMAIL_STATIC2 169 -#define IDB_NPOST 170 -#define IDD_ATTACH_DLG 170 -#define IDS_SENDMAIL_EG1 170 -#define IDS_SENDMAIL_EG2 171 -#define IDB_NPOSTR 172 -#define IDC_ACTIVATE_EMBED 172 -#define IDS_SENDMAIL_STATIC3 172 -#define IDS_READNEWS_STATIC1 173 -#define IDS_SENDMAIL_STATIC4 174 -#define IDS_SENDREADMAIL_STATIC5 175 -#define IDS_READNEWS_STATIC5 176 -#define IDB_IMAGE 177 -#define IDS_SERVER_EXISTS 177 -#define IDB_FILE 178 -#define IDS_INVALID_EMAIL 178 -#define IDS_READNEWS_STATIC2 179 -#define IDS_PE_ACCT_SETUP 180 -#define IDB_IMAGE_DELAYED 184 -#define IDB_IMAGE_BAD 185 -#define IDB_IMAGE_NOTFOUND 186 -#define IDB_GOPHER_AUDIO 187 -#define IDB_GOPHER_BINARY 188 -#define IDB_GOPHER_FIND 189 -#define IDB_GOPHER_FOLDER 190 -#define IDB_GOPHER_GENERIC 191 -#define IDB_GOPHER_IMAGE 192 -#define IDB_GOPHER_MOVIE 193 -#define IDB_GOPHER_TELNET 194 -#define IDB_GOPHER_TEXT 195 -#define IDB_SINGLE_NEWS_GROUP 196 -#define IDD_VIEWER_SECURITY 198 -#define IDD_CONTEXT_SAVE 199 -#define IDD_BOOKMARKS_PROPERTIES 200 -#define IDC_MIMESUBTYPE 202 -#define IDD_DOCI_GENERAL 202 -#define IDC_MIMETYPE 203 -#define IDD_PREF_STYLES 203 -#define IDC_SaveToDisk 204 -#define IDD_CONTEXT_PRINT_STATUS 204 -#define IDC_LaunchExtViewer 205 -#define IDI_DOCUMENT_ICON 205 -#define IDD_BOOKMARK_PREFERENCES 205 -#define IDC_ExternalViewer 206 -#define IDB_GOPHER_TELNET_MASK 206 -#define IDD_INTERNETSHORTCUT 206 -#define IDC_ViewerBrowse 207 -#define IDB_GOPHER_AUDIO_MASK 207 -#define IDC_Description 208 -#define IDB_GOPHER_FIND_MASK 208 -#define IDC_Extensions 209 -#define IDB_GOPHER_FOLDER_MASK 209 -#define IDC_AddSubType 210 -#define IDC_DeleteSubType2 211 -#define IDC_STYL_WINDOW_T1 211 -#define IDC_STYL_WINDOW_T3 212 -#define IDB_IMAGE_MASK 212 -#define IDC_COMBO1 213 -#define IDB_IMAGE_BAD_MASK 213 -#define IDC_FONTFACE_COMBO 213 -#define IDC_EDIT1 214 -#define IDC_STRT_EDIT1 214 -#define IDR_SRVR_INPLACE 214 -#define IDC_AUTO_SAVE_MINUTES 214 -#define IDC_PAGE_TITLE 214 -#define IDC_HISTORY_HELP 215 -#define IDC_EDIT3 215 -#define IDD_PREF_COLORS 215 -#define IDC_HISTORY_GOTO 216 -#define IDC_EDIT6 216 -#define IDC_EDIT_MAIL_TOADDRESS 216 -#define IDC_HISTORY_ADD_HOT 217 -#define IDC_PUBLISH_USER_NAME 217 -#define IDC_EDIT7 217 -#define IDC_EDIT_NEWS_TOADDRESS 217 -#define IDR_SRVR_EMBEDDED 218 -#define IDC_STYL_COMBO 219 -#define IDC_STYL_DEFAULTS 220 -#define ID_STYL_HELP 221 -#define ID_SYNC 221 -#define IDR_MAILFRAME 221 -#define IDD_DIALOG_ENCODING 222 -#define IDD_ENCODING 222 -#define IDD_PAGESETUP 223 -#define IDD_PAGESETUP16 224 -#define IDR_COMPOSEFRAME 224 -#define IDR_NEWSFRAME 225 -#define IDI_IBMHOD 226 -#define IDI_NETCASTER 228 -#define IDI_PROFILEMANAGER 229 -#define IDC_APP_STATIC1 230 -#define IDD_ADDRESSBOOK 230 -#define IDC_APP_STATIC2 231 -#define IDR_ADDRESS_MENU 231 -#define IDC_APP_STATIC4 232 -#define IDD_ADDRESS_NEWUSER 232 -#define IDC_APP_STATIC5 233 -#define IDC_APP_STATIC6 234 -#define IDC_APP_STATIC7 235 -#define IDC_APP_STATIC8 236 -#define IDC_APP_STATIC9 237 -#define IDC_APP_STATIC10 238 -#define IDC_APP_RADIO1 239 -#define IDC_APP_RADIO2 240 -#define IDC_APP_RADIO3 241 -#define IDC_COMBO_FOLDERS 241 -#define IDC_APP_RADIO4 242 -#define IDC_COMBO_SERVERS 242 -#define IDC_APP_RADIO5 243 -#define IDC_APP_RADIO6 244 -#define IDC_APP_RADIO7 245 -#define IDC_APP_RADIO8 246 -#define IDC_APP_RADIO9 247 -#define IDC_APP_RADIO10 248 -#define IDC_APP_BUTTON1 249 -#define IDC_APP_EDIT1 250 -#define IDC_APP_EDIT2 251 -#define IDC_APP_CHECK1 252 -#define IDS_ADDRESSMESSAGE 254 -#define ID_STATBAR_SIMPLE 255 -#define IDR_TASKBAR 256 -#define IDC_NET_STATIC1 260 -#define IDC_NET_STATIC2 261 -#define IDC_NET_STATIC3 262 -#define IDC_NET_STATIC4 263 -#define IDC_NET_STATIC5 264 -#define IDC_NET_STATIC6 265 -#define IDC_NET_STATIC7 266 -#define IDC_NET_STATIC8 267 -#define IDC_NET_STATIC9 268 -#define IDC_NET_STATIC10 269 -#define IDC_NET_STATIC11 270 -#define IDC_EDIT 270 -#define IDC_NET_STATIC12 271 -#define IDC_ADD_CURRENT_URL 271 -#define IDC_NET_STATIC13 272 -#define IDC_NET_STATIC14 273 -#define IDC_FIND 273 -#define IDC_NET_STATIC15 274 -#define IDC_FIND_TEXT 274 -#define IDC_NET_STATIC16 275 -#define IDC_DOWN 275 -#define IDC_UP 276 -#define IDC_NET_STATIC21 276 -#define IDC_NET_EDIT1 277 -#define IDC_PLUSPLUS 277 -#define IDC_NET_STATIC22 277 -#define IDC_NET_EDIT2 278 -#define IDC_MINUS 278 -#define IDC_NET_EDIT3 279 -#define IDC_PLUS 279 -#define IDC_NET_EDIT4 280 -#define IDC_URL_AREA 280 -#define IDC_NET_EDIT5 281 -#define IDC_UPPERLEFT 281 -#define IDC_NET_EDIT6 282 -#define IDC_HOTLIST_MAINAREA 282 -#define IDC_NET_EDIT7 283 -#define IDC_HOTLIST_AREA 283 -#define IDC_NET_EDIT8 284 -#define IDC_NAME 284 -#define IDC_NET_EDIT9 285 -#define IDC_LASTVISITED 285 -#define IDC_NET_EDIT10 286 -#define IDC_ADDEDON 286 -#define IDC_NET_EDIT11 287 -#define IDC_TYPE 287 -#define IDC_NET_EDIT12 288 -#define IDC_NEWITEM 288 -#define IDC_NEWURL 288 -#define IDC_NET_EDIT13 289 -#define IDC_COPYITEM 289 -#define IDC_NET_EDIT14 290 -#define IDC_REMOVEITEM 290 -#define IDC_DONE_EDITING 291 -#define IDC_NET_EDIT17 291 -#define IDC_PUT_URLS_UNDER 292 -#define IDC_PUT_HOTLIST_MENU_UNDER 293 -#define IDC_GENERATE_HTML 294 -#define IDC_EXPORT 295 -#define IDC_BUTTON_TO 295 -#define IDD_MUCWIZARD_WIN16 295 -#define IDC_IMPORT 296 -#define IDC_ITEMIS_URL 297 -#define IDC_NEWHEADER 297 -#define IDC_ITEMIS_HEADER 298 -#define IDC_NEWSEPARATOR 298 -#define IDC_ITEMIS_SEPARATOR 299 -#define IDC_HELPER_LIST 300 -#define IDC_HELPER_STATIC1 301 -#define IDC_HELPER_STATIC2 302 -#define IDC_HELPER_STATIC3 303 -#define IDC_HELPER_NEW 304 -#define IDC_HELPER_USENETSCAPE 305 -#define IDC_HELPER_SAVE 306 -#define IDC_HELPER_USEAPP 307 -#define IDC_HELPER_STATIC5 308 -#define IDC_HELPER_EXTENSIONS 309 -#define IDC_HELPER_STATIC6 310 -#define IDC_HELPER_STATIC7 311 -#define IDC_HELPER_STATIC8 312 -#define IDC_HELPER_STATIC9 313 -#define IDC_HELPER_STATIC10 314 -#define IDC_HELPER_UNKNOWN 315 -#define IDC_HELPER_STATIC4 316 -#define IDC_HELPER_PATH 317 -#define IDC_HELPER_BROWSE 318 -#define IDC_STRT_STATIC1 320 -#define IDC_STRT_STATIC2 321 -#define IDC_STRT_STATIC3 323 -#define IDC_STRT_STATIC4 324 -#define IDC_STRT_STATIC5 325 -#define IDC_STRT_STATIC6 326 -#define IDC_STRT_STATIC7 327 -#define IDC_STRT_STATIC8 328 -#define IDC_STRT_STATIC9 329 -#define IDC_STRT_STATIC10 330 -#define IDC_EDIT2 330 -#define IDC_STRT_BUTTON1 331 -#define IDC_PROMPT 331 -#define IDC_STRT_BUTTON2 332 -#define IDC_TO_EDIT 332 -#define IDC_STRT_BUTTON3 333 -#define IDC_FROM_EDIT 333 -#define IDC_STRT_BUTTON4 334 -#define IDC_SUBJECT_EDIT 334 -#define IDC_COMPOSE_SUBJECT 334 -#define IDC_STATIC_TITLE 334 -#define IDC_STRT_BUTTON5 335 -#define IDC_STATIC1 335 -#define IDC_STRT_EDIT2 336 -#define IDC_STATIC2 336 -#define IDC_STRT_EDIT3 337 -#define IDC_STATIC3 337 -#define IDC_STRT_EDIT4 338 -#define IDC_BODY_EDIT 338 -#define IDC_STATIC6 338 -#define IDC_STRT_EDIT5 339 -#define IDC_FILETYPE 339 -#define IDC_STRT_EDIT6 340 -#define ID_SAVETODISK 340 -#define IDC_STRT_EDIT9 341 -#define IDC_IN 341 -#define IDC_STRT_EDIT10 342 -#define IDC_OUT 342 -#define IDC_STRT_BUTTON6 343 -#define IDC_CLOSE_HOTLIST 343 -#define IDC_STRT_CHECK1 344 -#define IDC_STRT_EDIT7 345 -#define IDC_MISC_STATIC1 350 -#define IDC_MISC_STATIC2 351 -#define IDC_MISC_STATIC3 352 -#define IDC_MISC_STATIC4 353 -#define IDC_MISC_STATIC5 354 -#define IDC_MISC_STATIC6 355 -#define IDC_MISC_EDIT2 357 -#define IDC_MISC_EDIT1 358 -#define IDC_MISC_BUTTON7 359 -#define IDC_MISC_RADIO1 360 -#define IDC_MISC_RADIO2 361 -#define IDC_MISC_RADIO3 362 -#define IDC_MISC_RADIO4 363 -#define IDC_MISC_STATIC7 364 -#define IDC_MIMETYPE_EDIT 365 -#define IDC_MIMESUBTYPE_EDIT 366 -#define IDC_MAILTO_EDIT 367 -#define IDC_FROM_STATIC 368 -#define IDC_TOOLBARICON 370 -#define IDC_VERSION 371 -#define IDC_VERSION2 372 -#define IDC_BUTTON1 373 -#define IDC_SHORTCUT1 373 -#define IDC_USE_EXTERNAL_CHANGES 373 -#define IDC_ALT_TEXT_LOWRES 373 -#define IDC_USE_INTERNAL_CHANGES 374 -#define IDC_SHORTCUT2 374 -#define IDC_EXTRA_HTML 374 -#define IDC_ADD_HEADER 374 -#define IDC_BUTTON3 375 -#define IDC_SHORTCUT3 375 -#define IDC_BCC 375 -#define IDC_DELETE 375 -#define IDC_EDIT_HEADER_NAME 375 -#define IDC_REPLACE 375 -#define IDC_BUTTON4 376 -#define IDC_SHORTCUT4 376 -#define IDC_MOVEDOWN 376 -#define IDC_BUTTON5 377 -#define IDC_SHORTCUT5 377 -#define IDC_JAVA 377 -#define IDC_BUTTON6 378 -#define IDC_SHORTCUT6 378 -#define IDC_CUSTHELP 378 -#define IDC_APP_BUTTON2 379 -#define IDC_APP_BUTTON3 380 -#define IDC_CANCEL 381 -#define IDC_GET_DELETE 382 -#define IDC_ADD_SERVER 383 -#define IDD_COLOR_LIST 390 -#define IDD_COLOR_DLG 391 -#define IDC_PRINTING_STATUS_TEXT 418 -#define IDC_PRINTER_STATUS 420 -#define IDD_FONT_SELECT_DIALOG 421 -#define IDC_MISC_EDIT3 422 -#define IDD_PROPS_FONTDEF 423 -#define IDD_DOCINFO 430 -#define IDC_DISECURITY 431 -#define IDD_BOOKMRK 431 -#define IDB_BOOKMARK_ITEM 432 -#define IDC_DIKEY 432 -#define IDD_DOCI_SECURITY 432 -#define IDB_BOOKMARK_FOLDER 433 -#define IDC_DITITLE 433 -#define IDD_PREF_FONTS 433 -#define IDC_DIURL 434 -#define IDD_PREF_APPS 434 -#define IDC_DIMODIFIED 435 -#define IDD_PREF_MAIL 435 -#define IDD_PREF_MAILDIRS 435 -#define IDC_DISERVER 436 -#define IDD_PREF_CACHE 436 -#define IDC_DICERTIFIER 437 -#define IDD_PREF_PROXIES 437 -#define IDD_PREF_PROXY_MANUAL 437 -#define IDC_SECURESHOWAGAIN 438 -#define IDD_PREF_PROXIES1 438 -#define IDD_PREF_IMAGES 438 -#define IDD_PREF_HELPERS 439 -#define IDC_SECUREALERTEDIT 439 -#define IDD_PREF_NETWORK 440 -#define IDD_PREF_DIRS 441 -#define IDD_PREF_IDENTITY 442 -#define IDD_PREF_NEWS 443 -#define IDS_SENDNOW 444 -#define IDS_DEFAULTSENDNOW 445 -#define IDS_DEFAULTSENDLATER 446 -#define IDC_MISC_STATIC8 451 -#define IDC_MISC_STATIC9 452 -#define IDC_MISC_CHECK1 453 -#define IDC_MISC_CHECK2 454 -#define IDC_MISC_CHECK3 455 -#define IDC_MISC_CHECK4 456 -#define IDC_STATIC4 457 -#define IDB_IMAGE_SEC_REPLACE 458 -#define IDB_SECURE_STATUS 459 -#define IDB_NONSECURE_STATUS 460 -#define IDC_MISC_BUTTON1 461 -#define IDC_MISC_BUTTON2 462 -#define IDC_MISC_STATIC10 463 -#define IDC_MISC_STATIC11 464 -#define IDB_HISECURE_STATUS 465 -#define IDB_LITTLE_N 466 -#define IDD_COMPOSEBAR 470 -#define IDD_FONT_SELECT_DIALOG95 471 -#define IDD_PREF_BOOKMARKS 472 -#define IDD_PREF_ORGANIZATION 473 -#define IDD_PREF_SECALERTS 474 -#define IDD_PREF_DIRS1 475 -#define IDD_PREF_ALERTS 476 -#define IDD_PREF_MAILSTYLE 477 -#define IDD_PREF_COMPOSITION 478 -#define IDD_PREF_PASSWORDS 479 -#define IDD_PREF_LANG 480 -#define IDD_PLUGIN_SPLASH 490 -#define IDC_POST_EDIT 500 -#define IDC_ATTACH_EDIT 501 -#define IDC_COMPOSE_ATTACHMENT 501 -#define IDC_STATIC5 502 -#define IDC_APP_STATIC11 503 -#define IDC_NET_STATIC17 504 -#define IDC_NET_EDIT15 505 -#define IDC_NET_STATIC18 506 -#define IDC_NET_EDIT16 507 -#define IDC_STRT_STATIC11 508 -#define IDC_STRT_EDIT11 509 -#define IDC_STRT_STATIC12 510 -#define IDC_STRT_BUTTON7 511 -#define IDC_MISC_STATIC12 512 -#define IDC_NET_STATIC19 514 -#define IDC_MISC_STATIC13 515 -#define IDC_NET_EDIT18 518 -#define IDC_MISC_STATIC14 519 -#define IDC_MISC_STATIC15 520 -#define IDC_MISC_STATIC16 521 -#define IDC_MISC_STATIC17 522 -#define IDC_MISC_EDIT4 523 -#define IDC_MISC_EDIT5 524 -#define IDC_NET_EDIT19 525 -#define IDC_NET_STATIC20 526 -#define IDC_IMG_RADIO1 527 -#define IDC_IMG_RADIO2 528 -#define IDC_IMG_RADIO3 529 -#define IDC_IMG_RADIO4 530 -#define IDC_SEND 531 -#define IDC_RADIO1 540 -#define IDC_OPEN_IN_BROWSER 540 -#define IDC_RADIO2 541 -#define IDC_OPEN_IN_EDITOR 541 -#define IDC_RADIO3 542 -#define IDC_RADIO4 543 -#define IDC_MUCINTRO_ACCT_ADD 543 -#define IDC_ATTACH 544 -#define IDC_MUCINTRO_ACCT_EXIST 544 -#define IDC_STATIC_proxy 545 -#define IDC_MUCINTRO_ACCT_SYS 545 -#define IDC_FONT_PROPOR 546 -#define IDC_FONT_FIXED 547 -#define IDC_PFONT_STATIC1 548 -#define IDC_COLCHOOSE 550 -#define IDC_EDT_SELECT_BKGRND_COLOR 550 -#define IDC_COLCHOOSE2 551 -#define IDC_COLCHOOSE3 552 -#define IDC_BKGRND_COLOR_CHOOSE 552 -#define IDC_CHOOSE_BKGRND_COLOR 552 -#define IDC_COLCHOOSE4 553 -#define IDC_PFONT_STATIC2 554 -#define IDC_PFONT_STATIC4 555 -#define IDC_PFONT_STATIC5 556 -#define IDC_PFONT_STATIC3 557 -#define IDC_FONT_COMBO1 558 -#define IDC_FONT_PROPFONT 559 -#define IDC_FONT_FIXFONT2 560 -#define IDC_FONT_COMBO2 561 -#define IDC_COLOR_RADIO1 562 -#define IDC_EDT_BGRND_COLOR_DEF 562 -#define IDC_COLOR_RADIO2 563 -#define IDC_EDT_BGRND_FILE 563 -#define IDC_BKGRND_USE_IMAGE 563 -#define IDC_COLOR_EDIT1 564 -#define IDC_EDIT_BGRND_FILE 564 -#define IDC_COLOR_RADIO10 565 -#define IDC_COLOR_RADIO11 567 -#define IDC_COLOR_STATIC5 568 -#define IDC_COL_CHECK2 569 -#define IDC_COL_CHECK3 570 -#define IDC_COL_CHECK4 571 -#define IDC_COLBROWSE 572 -#define IDC_EDT_SELECT_BGRND_FILE 572 -#define IDC_BKGRND_IMAGE_BROWSE 572 -#define IDC_COLOR_STATIC6 573 -#define IDC_COLOR_STATIC7 574 -#define IDC_COLOR_STATIC8 575 -#define IDC_COLOR_STATIC9 576 -#define IDC_COLOR_RADIO3 577 -#define IDC_EDT_BGRND_COLOR_USR 577 -#define IDC_DOCINFO_STATIC1 578 -#define IDC_DOCINFO_STATIC2 579 -#define IDC_DOCINFO_STATIC3 580 -#define IDC_DIENCODING 581 -#define IDC_COL_STATIC2 582 -#define IDC_COLOR_LINK 583 -#define IDC_COLOR_FLINK 584 -#define IDC_COLOR_TEXT 585 -#define IDC_COLOR_BACK 586 -#define IDC_EDT_BGRND_COLOR 586 -#define IDC_COL_CHECK5 587 -#define IDS_APP_LANGUAGE 588 -#define IDS_APP_VERSION 589 -#define IDS_APP_NAME 590 -#define IDS_APP_CODE_NAME 591 -#define IDS_DEF_HOMEPAGE 592 -#define IDS_CHANGE_HOMEPAGE 593 -#define IDS_WIN_INI_SECTION 594 -#define IDS_INI_FILE_NAME 595 -#define IDS_NETSCAPE_TOOLBAR 596 -#define IDC_MISC_MIME 600 -#define IDC_MISC_8BIT 601 -#define IDC_MISC_MIMETXT 602 -#define IDC_MISC_CODE 602 -#define IDC_GENERIC1 603 -#define IDC_MISC_MIMETXT2 603 -#define IDC_DONTASKAGAIN 608 -#define IDC_DONTASKTEXT 609 -#define IDC_HANDLEBYOLE 610 -#define IDC_ASKHOWHANDLE 611 -#define IDC_MESSAGE 612 -#define IDC_PROGRESS 613 -#define IDC_ACTION 615 -#define IDC_LOCATION 616 -#define IDC_DESTINATION 617 -#define IDC_PROGRESS_BAR 619 -#define IDC_STATIC_LOC 620 -#define IDS_SHORTCUT1 621 -#define IDC_STATIC_DESC 621 -#define IDS_SHORTCUT2 622 -#define IDS_SHORTCUT3 623 -#define IDS_SHORTCUT4 624 -#define IDS_SHORTCUT5 625 -#define IDS_SHORTCUT6 626 -#define IDC_RADIO5 627 -#define IDC_CHECK2 627 -#define IDC_CHECK_DEFAULT 627 -#define IDC_CHECK_DOWNLOAD_DISC 627 -#define IDC_DIALER_FLAG 627 -#define IDC_RADIO6 628 -#define IDC_CHECK6 628 -#define IDC_CHECK_NEWS_SELF 628 -#define IDC_CK_KEEP_UNREAD 628 -#define IDC_RADIO7 629 -#define IDC_CHECK7 629 -#define IDC_CHECK_MAIL_OTHERS 629 -#define IDC_CHECK1 630 -#define IDC_RADIO8 630 -#define IDC_AUTO_SAVE 630 -#define IDC_LOCK_ASPECT 630 -#define IDC_HR_SAVE_DEFAULT 630 -#define IDS_SHORTCUTNAME1 631 -#define IDC_RADIO9 631 -#define IDC_HTMLCOMPOSE 631 -#define IDC_CHECK11 631 -#define IDS_SHORTCUTNAME2 632 -#define IDC_EDIT4 632 -#define IDS_SHORTCUTNAME3 633 -#define IDC_NICKNAME 633 -#define IDC_CHECK8 633 -#define IDC_CHECK12 633 -#define IDC_CHECK_NEWS_OTHERS 633 -#define IDS_SHORTCUTNAME4 634 -#define IDE_ADDRESS 634 -#define IDC_ADDRESS 634 -#define IDC_CHECK9 634 -#define IDC_CHECK_MAIL_FOLDER 634 -#define IDS_SHORTCUTNAME5 635 -#define IDC_CHECK10 635 -#define IDC_CHECK_NEWS_FOLDER 635 -#define IDS_SHORTCUTNAME6 636 -#define IDC_CHECK13 637 -#define IDC_INSERT_AFTER 638 -#define IDC_BEGIN_MENU 639 -#define IDC_INTERNETSHORTCUTLINK 640 -#define ID_LIST_FONTCOLOR 640 -#define IDC_INTERNETSHORTCUTDESCRIPTION 641 -#define IDC_PLACEONDESKTOP 642 -#define IDC_PAGESETUP_MBOTTOM 643 -#define IDC_PAGESETUP_MLEFT 644 -#define IDC_PAGESETUP_MRIGHT 645 -#define IDC_PAGESETUP_TITLE 646 -#define IDC_PAGESETUP_PAGENUMBERS 647 -#define IDC_PAGESETUP_SAMPLE 648 -#define IDC_PAGESETUP_MTOP 649 -#define IDC_PAGESETUP_PRINTBITMAPS 650 -#define IDC_PAGESETUP_ALLTEXTBLACK 651 -#define IDC_PAGESETUP_ALLLINESBLACK 652 -#define IDC_PAGESETUP_SOLIDLINES 653 -#define IDC_PAGESETUP_REVERSEORDER 654 -#define IDC_PAGESETUP_URL 655 -#define IDC_PAGESETUP_DATE 656 -#define IDC_PAGESETUP_TOTAL 657 -#define IDC_PAGESETUP_MARGINBOX 658 -#define IDC_PERCENTCOMPLETE 659 -#define IDC_PRINTBKIMAGE 659 -#define IDC_PROGRESSMETER 660 -#define IDC_TIMELEFT 661 -#define IDC_CHECK4 662 -#define IDC_CHECK4_BY_DATE 662 -#define IDB_TREEITEM 700 -#define IDB_TREEFOLDERCLOSED 701 -#define IDB_TREEFOLDEROPEN 702 -#define IDB_MAILMESSAGE 703 -#define ID_HIST_MORE 704 -#define ID_HIST_FEWER 705 -#define IDC_MENUBORDER 706 -#define IDB_OPENBOTTOMPARENT 708 -#define IDB_OPENMIDDLEPARENT 709 -#define IDB_OPENTOPPARENT 710 -#define IDB_OPENSINGLEPARENT 711 -#define IDB_MIDDLEITEM 713 -#define IDB_TOPITEM 714 -#define IDB_VERTPIPE 715 -#define IDB_HORZPIPE 716 -#define IDB_POSTOFFICE 717 -#define IDB_NEWSARTICLE 718 -#define IDB_NEWSREPLY 718 -#define IDB_UNREAD 721 -#define IDB_NEWSGROUP 723 -#define IDB_READ 724 -#define IDB_MARKED 725 -#define IDB_THREAD 726 -#define IDB_SORTINDICATORUP 739 -#define IDB_SORTINDICATORDOWN 740 -#define IDB_PUSHLEFT 741 -#define IDB_PUSHRIGHT 742 -#define IDB_PUSHLEFTRIGHT 743 -#define IDB_OPENTREENODE 745 -#define IDB_COMPOSETOOLBARP 755 -#define IDB_COMPOSETOOLBARPT 756 -#define IDB_COMPOSETOOLBART 757 -#define IDS_FILETOATTACH 758 -#define IDS_ADDRESSTO 759 -#define IDS_ADDRESSCC 760 -#define IDS_ADDRESSBCC 761 -#define IDS_ADDRESSREPLYTO 762 -#define IDS_ADDRESSNEWSGROUP 763 -#define IDS_ADDRESSFOLLOWUPTO 764 -#define IDS_RETURNRECEIPT 770 -#define IDS_ENCRYPTED 771 -#define IDS_SIGNED 772 -#define IDS_TOOLATTACH 773 -#define IDS_TOOLATTACHFILES 774 -#define IDS_TOOLATTACHALL 775 -#define IDS_COMPOSITION 776 -#define IDS_CANTWRITETOFILE 777 -#define IDS_TOOLATTACHFILE 778 -#define IDS_ATTACHWEBPAGE 779 -#define IDS_ATTACHADDRESS 781 -#define IDS_CONVERTWARN 782 -#define IDS_TOPMARGINERROR 783 -#define IDS_BOTTOMMARGINERROR 784 -#define IDS_RIGHTMARGINERROR 785 -#define IDS_LEFTMARGINERROR 786 -#define IDS_VIRTUALNEWSGROUP 787 -#define IDS_COMINGSOON 789 -#define IDS_PHONE 790 -#define IDS_CHECKING 791 -#define IDS_DEFAULTSAVEAS 792 -#define IDS_CONVERTTITLE 793 -#define IDS_ENCODING 795 -#define IDS_CHARSET 796 -#define IDS_ATTACHMYCARD 797 -#define IDS_USE8BIT 798 -#define IDS_USEUUENCODE 799 -#define IDC_COMPOSE_FROM 800 -#define IDS_VIRTUALNEWSGROUPDESC 800 -#define IDC_COMPOSE_REPLYTO 801 -#define IDC_COMPOSE_TO 802 -#define IDC_COMPOSE_CC 803 -#define IDC_COMPOSE_FCC 804 -#define IDC_COMPOSE_BCC 805 -#define IDC_COMPOSE_NEWSGROUPS 807 -#define IDC_COMPOSE_FOLLOWUP 809 -#define IDC_COMPOSE_SUBJECT_TEXT 826 -#define IDS_MESSAGEFORMAT 827 -#define IDS_FORMAT_ASKME 828 -#define IDS_FORMAT_PLAIN 829 -#define IDS_FORMAT_HTML 830 -#define IDS_FORMAT_BOTH 831 -#define IDC_BIGSPLASH 900 -#define IDB_NSSPLASH 901 -#define IDB_EDIT_NAMED_ANCHOR 905 -#define IDB_EDIT_NAMED_ANCHOR_MASK 906 -#define IDB_EDIT_FORM_ELEMENT 907 -#define IDB_EDIT_FORM_ELEMENT_MASK 908 -#define IDB_EDIT_UNSUPPORTED_TAG 909 -#define IDB_EDIT_UNSUPPORTED_TAG_MASK 910 -#define IDB_EDIT_UNSUPPORTED_END_TAG 911 -#define IDB_EDIT_UNSUPPORTED_END_TAG_MASK 912 -#define IDB_EDIT_JAVA 913 -#define IDB_EDIT_JAVA_MASK 914 -#define IDB_EDIT_PLUGIN 915 -#define IDB_EDIT_PLUGIN_MASK 916 -#define IDD_ADDRESS_SECURITY 917 -#define IDS_EMAILADDRESS 917 -#define IDD_ADDRESS_COOLTALK 918 -#define IDS_COMPANYNAME 918 -#define IDS_COMPOSE_REMOVE 920 -#define IDS_LOCALITY 921 -#define IDB_PERSON 922 -#define IDS_REMOVE_ATTACHMENT 922 -#define IDB_ARROW3D 923 -#define IDB_ARROW3D_PRESS 924 -#define IDB_NEWSART 925 -#define IDB_COMPOSETOOLBAR 926 -#define ID_SETFOCUS_PARA_STYLE 927 -#define ID_SETFOCUS_FONTFACE 928 -#define ID_SETFOCUS_FONTSIZE 929 -#define IDS_BUTTON_TEXT_CONNECT 930 -#define IDS_BUTTON_TEXT_DISCONNECT 931 -#define IDS_GO_ONLINE_NOW 932 -#define IDS_GO_OFFLINE_NOW 933 -#define IDS_ACTION_ONLINE 934 -#define IDS_ACTION_OFFLINE 935 -#define IDS_JSAPP 938 -#define IDS_IS_ENCRYPTED 939 -#define IDS_NOT_ENCRYPTED 940 -#define IDS_NOTHING_SUBSCRIBED 941 -#define IDS_NO_TEMP_DIRECTORY 942 -#define IDS_STUB_PREFIX 943 -#define IDS_TEXT_FOLDERS_SELECTED 944 -#define IDS_TEXT_DISCUSSIONS_SELECTED 945 -#define IDS_NO_RUN_WHILE_PROFILING 946 -#define IDS_SENDINGMESSAGE 947 -#define ID_GET_COLOR 950 -#define IDI_GIF 951 -#define IDI_JPEG 952 -#define IDI_JAVASCRIPT 953 -#define IDS_ANIMSMALL_X 1000 -#define IDB_ANIMSMALL_0 1000 -#define IDC_EDIT_HOST 1000 -#define IDC_ONLINE_MODE 1000 -#define IDC_LIST 1000 -#define IDC_RADIO_SENT 1000 -#define IDS_ANIMSMALL_Y 1001 -#define IDC_EDIT_PORT 1001 -#define IDC_OFFLINE_MODE 1001 -#define IDC_RADIO_OTHER 1001 -#define IDC_RADIO_NNTP 1001 -#define IDC_ENTRIES 1002 -#define IDC_EDIT_NEWS_SERVER 1002 -#define IDC_EDIT_USER_NAME 1002 -#define IDC_NEW_WORD 1002 -#define IDC_ASK_ME 1002 -#define IDC_EDIT_MAIL_SERVER 1003 -#define IDC_EDIT_ADDRESS 1003 -#define IDC_USE_AS_DEFAULT 1003 -#define IDC_EDIT_SMTP_SERVER 1004 -#define IDC_IP_ADDRESS 1005 -#define IDC_FIRSTNAME 1005 -#define IDC_MIDDLENAME 1006 -#define IDC_CHANGE 1006 -#define IDC_LASTNAME 1007 -#define IDC_ROWSPAN 1007 -#define IDC_COLSPAN 1008 -#define IDC_EDIT_MSG_DAYS 1008 -#define IDC_IGNORE_ALL 1009 -#define IDC_PREF_STRING_MSG 1009 -#define IDC_EDIT_MSG_NO 1009 -#define IDC_DESC 1009 -#define IDC_LOCALITY 1010 -#define IDC_CHANGE_ALL 1010 -#define IDC_CHECK_MSG_SIZE 1010 -#define IDC_ID 1010 -#define IDC_REGION 1011 -#define IDC_USE_PAGE_LOCATION 1011 -#define IDC_WIDTH 1011 -#define IDC_ERROR_PROMPT 1011 -#define IDC_KEEP_MSG_DAYS 1011 -#define IDC_CHECK_MSG_DAYS 1011 -#define IDC_KEEP_UNREAD 1012 -#define IDC_COMPANY_NAME 1013 -#define IDC_EDIT_MSG_SIZE 1013 -#define IDC_EDIT_DICTIONARY 1013 -#define IDC_STREET2 1013 -#define IDC_RUN 1013 -#define IDC_PIXELS_WIDTH 1014 -#define IDC_CHECK_COMAPCT_SIZE 1014 -#define IDC_CHECK_COMPACT_SIZE 1014 -#define IDC_PERCENT_WIDTH 1015 -#define IDC_EDIT_COMPACT_SIZE 1015 -#define IDC_PIXELS_HEIGHT 1016 -#define IDC_KEEP_MSG_NO 1016 -#define IDC_NEW_FOLDER 1016 -#define IDC_HEIGHT 1017 -#define IDC_KEEP_ALL 1017 -#define IDC_PERCENT_HEIGHT 1018 -#define IDC_SECURE 1018 -#define IDC_LIST3 1019 -#define IDC_CHECK_SAVE_PASSWORD 1019 -#define IDC_SAVE_PASSWORD 1019 -#define IDC_USE_NAME 1019 -#define IDC_LOGIN_LDAP 1020 -#define IDC_COLOR_WELL 1021 -#define IDC_CHOOSE_BACKGROUND 1022 -#define IDC_COMBO2 1023 -#define IDC_FONT_SIZE 1023 -#define IDC_CONNECTCOOLTALK 1024 -#define IDC_WRAP 1025 -#define IDC_HEADER 1026 -#define IDC_NOSAVE_FONTDEF 1026 -#define IDC_ALIGN_TOP 1027 -#define IDC_FONTFACE_MSG 1027 -#define IDC_ALIGN_V_CENTER 1028 -#define IDC_ALIGN_BOTTOM 1029 -#define IDC_USE_DEFAULT_LOCATION 1029 -#define IDC_ALIGN_BASELINE 1030 -#define IDC_ROW_HEADER 1031 -#define IDC_FONT_SIZE_MSG 1031 -#define IDC_COLUMN_HEADER 1032 -#define IDC_LANGUAGE 1032 -#define IDC_MAKE_IMAGE_BACKGROUND 1032 -#define IDC_SUGGESTIONS 1033 -#define IDC_WIDTH_PIXELS 1033 -#define IDC_CHECK_WORD 1034 -#define IDS_STATBAR_SECURITY 1050 -#define IDS_ANIM_X 1100 -#define IDC_DEFAULT_COLOR 1100 -#define IDB_ANIM_0 1100 -#define IDC_COLOR_HELP 1101 -#define IDS_ANIM_Y 1101 -#define IDC_LAST_USED_COLOR 1102 -#define IDC_BUTTON_MAIL_CHOOSE 1124 -#define IDC_FRAME_BOX 1178 -#define IDC_TOP_TAG 1179 -#define IDC_BOTTOM_TAG 1180 -#define IDC_HELP_TEXT 1181 -#define IDC_INTRO_TEXT 1183 -#define IDC_VIEW_TEXT1 1184 -#define IDC_EDIT_TEXT 1185 -#define IDC_CHECK3 1200 -#define IDD_ADDRESSDLG 1200 -#define IDC_CHECK_BY_ARTICLES 1200 -#define IDC_CHECK_SEND_MESSAGES 1200 -#define IDC_RADIO10 1201 -#define IDD_MULTIATTACH 1201 -#define IDC_OPEN_WINDOW 1201 -#define IDC_SHOW_IN_THREAD 1201 -#define IDC_RADIO11 1202 -#define IDD_ATTACHLOCATION 1202 -#define IDC_ADDRESSLIST 1203 -#define IDD_PREF_PCERTS 1203 -#define IDR_BOOKMARK_MENU 1203 -#define IDC_TO 1204 -#define IDD_PREF_SCERTS 1204 -#define IDC_CC 1205 -#define IDD_PREF_PROXY 1205 -#define IDC_LANG_LIST1 1206 -#define IDD_SEARCHEADERS 1206 -#define IDC_LANG_LIST2 1207 -#define IDD_DIALOG2 1207 -#define IDC_LANG_ADD 1208 -#define IDD_FINDBOOKMARK 1208 -#define IDC_LANG_REMOVE 1209 -#define IDC_LANG_EDIT 1210 -#define IDD_SEARCHMESSAGES 1210 -#define IDC_LANG_ADDTEXT 1211 -#define IDC_ATTACHURL 1211 -#define IDC_ATTACHFILE 1212 -#define IDD_DEFAULT_BROWSER 1212 -#define IDC_ATTACHMENTS 1213 -#define IDC_ASIS 1214 -#define IDC_CONVERT 1215 -#define IDC_LIST1 1216 -#define IDC_WORD_LIST 1216 -#define IDC_LANGUAGE_LIST 1216 -#define IDC_HEADER_LIST 1216 -#define IDC_EDIT5 1217 -#define ID_SELECT_NEXT_NONTEXT 1217 -#define IDB_SMALLANIMATION 1218 -#define IDC_MATCHCASE 1218 -#define IDB_COMPOSETOOLBARPD 1219 -#define IDD_WHATSNEW 1220 -#define IDC_WHOLEWORD 1221 -#define IDB_COMPOSETOOLBARPTD 1222 -#define IDC_ALLBOOKMARKS 1223 -#define IDC_FINDTEXT 1224 -#define IDC_SELECTEDBOOKMARKS 1225 -#define ID_NO 1226 -#define IDD_UPDATEWHATSNEW 1227 -#define IDC_IGNORE 1228 -#define IDD_PREF_SEC_ADVANCED 1228 -#define IDC_QUESTION_ICON 1229 -#define IDD_PREF_HELPERS1 1229 -#define IDC_WARNING_ICON 1229 -#define IDC_FINDINHEADER 1230 -#define IDD_PREF_PROTOCOLS 1230 -#define IDC_FINDINBODY 1231 -#define IDD_PREF_NET_LANG 1231 -#define IDC_SEARCHUP 1232 -#define IDC_SEARCHDOWN 1233 -#define IDC_DIRECTION 1234 -#define IDC_MORE_INFO 1235 -#define IDR_ACCELERATOR1 1237 -#define IDB_DRAG_URL 1239 -#define IDC_STARTBROWSER 1240 -#define IDC_STARTMAIL 1241 -#define IDC_STARTNEWS 1242 -#define IDD_PREFMAILPANES 1243 -#define IDC_RADIO12 1244 -#define IDC_RADIO13 1245 -#define IDC_RADIO14 1246 -#define IDC_RADIO15 1247 -#define IDC_STATIC_ISALIAS 1247 -#define IDC_RADIO16 1248 -#define IDC_STATIC_ALIASCOUNT 1248 -#define IDC_RADIO17 1249 -#define IDC_BUTTON_SELECTALIASES 1249 -#define IDS_ENTERPRISE_KEY 1250 -#define IDC_DISABLE_JAVA 1250 -#define IDC_DISABLE_SSL2 1251 -#define IDS_LOCKED_PREFERENCES 1252 -#define IDC_CONFIGURE_SSL2 1252 -#define IDC_FTP_ANON 1253 -#define IDI_IMAGE_DELAYED 1253 -#define IDB_SMIMAGE_DELAYED 1254 -#define IDC_DISABLE_SSL3 1254 -#define IDC_AUTO_PROXY_RELOAD 1254 -#define IDC_HELPER_MIME_TYPE 1254 -#define IDB_SMIMAGE_MASK 1255 -#define IDC_CONFIGURE_SSL3 1255 -#define IDR_MESSAGEFRAME 1255 -#define IDC_FEWER 1255 -#define IDC_FTP_EMAIL 1256 -#define IDC_HELPER_HANDLER 1256 -#define IDC_WEB_ANON 1257 -#define IDB_NOTIFY_MAIL1 1257 -#define IDC_COMBO_SCOPE 1257 -#define IDC_WEB_EMAIL 1258 -#define IDC_STATIC_WHERE 1258 -#define IDC_EDIT_IBEAM_LARGE 1259 -#define IDC_COMBO_FIELDS1 1259 -#define IDC_COMBO_FIELDS2 1260 -#define IDC_EDIT_IBEAM 1260 -#define IDC_LINK_COPY 1261 -#define IDC_COMBO_CRITERIA1 1261 -#define IDC_EDIT_MATCH1 1262 -#define IDC_HTML_COPY 1262 -#define IDC_LINK_MOVE 1263 -#define IDC_COMBO_CRITERIA2 1263 -#define IDC_HTML_MOVE 1264 -#define IDC_EDIT_MATCH2 1264 -#define IDC_IMAGE_COPY 1265 -#define IDC_COMBO_FIELDS3 1265 -#define IDC_IMAGE_MOVE 1266 -#define IDC_COMBO_CRITERIA3 1266 -#define IDC_TEXT_MOVE 1267 -#define IDC_EDIT_MATCH3 1267 -#define IDD_MAILFILTER 1267 -#define IDC_TEXT_COPY 1268 -#define IDC_COMBO_FIELDS4 1268 -#define IDC_COMBO_CRITERIA4 1269 -#define IDB_DRAG_URL_MASK 1270 -#define IDC_EDIT_MATCH4 1270 -#define IDB_NOTIFY_NEWS 1271 -#define IDC_OPEN_URL_BROWSER 1271 -#define IDB_NOTIFY_WEB 1272 -#define IDC_OPEN_URL_EDITOR 1272 -#define IDD_SAVE_DOCUMENT 1273 -#define IDC_SAVE_FILE_LABEL 1274 -#define IDC_COMBO_FIELDS5 1274 -#define IDC_COMBO_CRITERIA5 1275 -#define IDD_FILTER_PICKER 1275 -#define IDC_FILE_COUNT_MSG 1275 -#define IDC_SAVE_FILENAME 1276 -#define IDC_EDIT_MATCH5 1276 -#define IDC_SPIN5 1278 -#define IDB_MAILNEWSTABS 1280 -#define IDB_GRANITE 1281 -#define IDB_OUTLINER 1282 -#define IDC_RADIO_OFF 1283 -#define IDB_ADDRESSBOOK 1283 -#define IDC_RADIO_ON 1284 -#define IDB_BOOKMARKS 1284 -#define IDC_COMBO_ATTRIB1 1285 -#define IDB_COLUMN 1285 -#define IDC_COMBO_ATTRIB2 1286 -#define IDB_MAILCOL 1286 -#define IDC_COMBO_ATTRIB3 1287 -#define IDC_COMBO_ATTRIB4 1288 -#define IDC_COMBO_ATTRIB5 1289 -#define IDC_COMBO_OP1 1290 -#define IDC_COMBO_OP2 1291 -#define IDC_COMBO_OP3 1292 -#define IDC_COMBO_OP5 1293 -#define IDC_COMBO_OP4 1294 -#define IDC_EDIT_VALUE1 1296 -#define IDC_EDIT_VALUE2 1297 -#define IDC_EDIT_VALUE3 1298 -#define IDC_EDIT_VALUE4 1299 -#define IDC_EDIT_VALUE5 1300 -#define IDC_COMBO_DEST 1302 -#define IDC_EDIT_DESC 1303 -#define IDC_EDIT_NAME 1304 -#define IDC_COMBO_ACTION 1305 -#define IDC_STATIC_THE2 1306 -#define IDC_STATIC_THE3 1307 -#define IDC_STATIC_THE4 1308 -#define IDC_STATIC_THE5 1309 -#define IDC_STATIC_OF1 1310 -#define IDC_STATIC_OF2 1311 -#define IDC_STATIC_OF3 1312 -#define IDC_STATIC_OF4 1313 -#define IDC_STATIC_OF5 1314 -#define IDC_STATIC_THE1 1315 -#define IDC_STATIC_OF6 1316 -#define IDC_NEW 1319 -#define IDC_SAVE 1321 -#define IDC_CHECK_LOG 1322 -#define IDC_LIST_FILTERS 1323 -#define IDC_MNWIZ_READNEWS_FINISH 1324 -#define IDC_STATIC_DESCRIPTION 1326 -#define IDC_STATIC_ORDER 1327 -#define IDC_STATIC_NAME 1328 -#define IDC_STATIC_ON 1329 -#define IDC_QF_BTN 1330 -#define IDB_BOOKMARK_QF 1330 -#define IDB_MAILNEWS 1331 -#define IDC_ADDRNAME 1332 -#define IDC_LABEL 1332 -#define IDC_EXPLANATION2 1332 -#define IDC_ADD 1333 -#define IDC_MORE 1334 -#define IDB_COMPOSETABS 1334 -#define IDC_STATIC_FINDITEMS 1335 -#define IDB_ADDRESSTOOLBARP 1336 -#define IDB_DOCK_BTN 1337 -#define IDC_BC_BTN 1338 -#define IDB_NOTIFY_MAIL3 1340 -#define IDB_NOTIFY_MAIL2 1341 -#define IDR_NEWSMSGFRAME 1344 -#define IDB_SHADING 1345 -#define IDC_STOP 1345 -#define IDD_NEWS_BAR 1346 -#define IDC_COMBO_NEWS 1346 -#define IDC_OUTLINER_FOLDER 1347 -#define IDC_OUTLINER_MESSAGE 1348 -#define IDD_LDAPSEARCH 1348 -#define IDC_IN_STATIC 1349 -#define IDR_MAILTHREAD 1349 -#define IDC_DIRECTORIES 1350 -#define IDR_NEWSTHREAD 1350 -#define IDC_DIRSEARCH 1351 -#define IDD_MARKREADDATE 1351 -#define IDC_CREATE 1352 -#define IDC_COPY 1353 -#define IDC_ADD_LINK_BUTTON 1354 -#define IDC_STREET 1354 -#define IDC_POBOX 1354 -#define IDC_DELETE_LINK_BUTTON 1355 -#define IDC_ZIP 1355 -#define IDC_CHANGE_LINK_BUTTON 1356 -#define IDC_PHONE1 1356 -#define IDC_IMPORT_LINK_BUTTON 1357 -#define IDC_HOME 1357 -#define IDC_IMPORT_BITMAP 1357 -#define IDC_COUNTRY 1357 -#define IDB_VFLIPPY 1358 -#define IDC_BUTTON_NAME_EDIT 1358 -#define IDC_FAX 1358 -#define IDB_FOLDERTOOLBAR 1359 -#define IDC_BUTTON_PAGE_EDIT 1359 -#define IDC_HOME1 1359 -#define IDR_TASKBAR_POPUP 1360 -#define IDB_GRIPH 1361 -#define IDB_BANNER 1362 -#define IDD_ADDRESSPICKER 1363 -#define IDR_ONEKEYMESSAGE 1364 -#define IDB_BITMAP1 1366 -#define IDC_EXPLANATION 1366 -#define IDC_EXPLANATION3 1366 -#define IDB_LINKBUTTON 1367 -#define IDC_CoolServer 1367 -#define IDC_CoolHost 1368 -#define IDB_BITMAP2 1368 -#define IDC_EXPIRE 1369 -#define IDD_LINK_TOOLBAR 1370 -#define IDC_RADIO_POP 1370 -#define IDC_READMAIL_POP1 1370 -#define IDB_BOOKMARK_FOLDER2 1371 -#define IDC_RADIO_IMAP 1371 -#define IDD_ADDRESS_CONTACT 1372 -#define IDB_SUBMENU1 1373 -#define IDI_ICON2 1373 -#define IDC_STYLE_PLAIN 1373 -#define IDB_SUBMENU2 1374 -#define IDI_ICON3 1374 -#define IDC_STYLE_BOLD 1374 -#define IDB_TASKBARL 1375 -#define IDI_ICON4 1375 -#define IDC_STYLE_ITALIC 1375 -#define IDB_TASKBARS 1376 -#define IDC_STYLE_BOLDITALIC 1376 -#define IDB_NAVBUTTON 1377 -#define IDC_EDIT_NEWSGROUP 1377 -#define IDR_COMPOSEPLAIN 1377 -#define IDC_SIZE_PLAIN 1377 -#define IDC_SUBSCRIBE 1378 -#define IDB_EXPANDO 1378 -#define IDC_SIZE_BIGGER 1378 -#define IDC_EXPAND_ALL 1379 -#define IDC_SIZE_SMALLER 1379 -#define IDC_COLLAPSE_ALL 1380 -#define IDC_REUSE_WINDOW 1380 -#define IDC_REUSE_THREAD_WINDOW 1380 -#define IDD_NEWSGROUP_ALL 1381 -#define IDC_GET_NEW 1381 -#define IDC_EDIT_EMAIL 1381 -#define IDD_NEWSGROUP_SEARCH 1382 -#define IDC_CLEAR_NEW 1382 -#define IDB_MAILQF 1382 -#define IDC_EDIT_REPLYTO 1382 -#define IDD_NEWSGROUP_NEW 1383 -#define IDC_COMBO_SERVER 1383 -#define IDB_MAILINGLIST 1383 -#define IDC_EDIT_ORGANIZATION 1383 -#define IDC_SEARCH_NOW 1384 -#define IDB_BOOKMARK_FOLDER_OPEN 1384 -#define IDC_EDIT_SIGFILE 1384 -#define IDD_NEWSGROUP_ADDSERVER 1385 -#define IDC_BUTTON_BROWSE 1385 -#define IDC_NEWSGROUPS 1386 -#define IDD_PREF_MNMORE 1386 -#define IDC_EDIT_NEWS_DIR 1386 -#define IDC_BUTTON_CREATE 1386 -#define IDD_PREF_MORE_MAIL_SERVER 1386 -#define IDD_WIZARD_RECEIVEMAIL 1387 -#define IDC_CHECK_MAIL_SELF 1387 -#define IDC_SEARCHHELP 1387 -#define IDC_EDIT_MAIL_FOLDER 1388 -#define IDD_WIZARD_SENDMAIL 1389 -#define IDC_EDIT_NEWS_FOLDER 1389 -#define IDD_WIZARD_READNEWS 1390 -#define IDD_WIZARD_COVERPAGE 1391 -#define IDC_BUTTON_NEWS_CHOOSE 1391 -#define IDD_PREF_MNMAILNEWS 1392 -#define IDC_CHECK_AUTO_QUOTE 1392 -#define IDD_PREF_MNIDENTITY 1393 -#define IDC_EDIT_IN_SERVER 1393 -#define IDD_PREF_MNCOMPOSITION 1394 -#define IDC_EDIT_MAIL_DIR 1394 -#define IDD_PREF_MNNEWSSERVER 1395 -#define IDC_BUTTON_MORE 1395 -#define IDC_EDIT_IMAP_DIR 1395 -#define IDD_PREF_MNMAILSERVER 1396 -#define IDC_RADIO_REMOVE 1396 -#define IDC_EDIT_PUBLIC_DIR 1396 -#define IDD_PREF_MNADDRESSBOOK 1397 -#define IDC_RADIO_LEFT 1397 -#define IDC_EDIT_OTHERS_DIR 1397 -#define IDC_RADIO_REMOTE 1398 -#define IDC_RADIO_LOCAL 1399 -#define IDC_CHECK_MAIL 1400 -#define IDD_PREF_MNCHOOSEFOLDER 1400 -#define IDC_CHECK_MESSAGE 1401 -#define IDD_PREF_MNDIRECTORIES 1401 -#define IDC_EDIT_CHECK_MAIL 1402 -#define IDD_RESOLVE_EDIT_CHANGES 1402 -#define IDC_EDIT_MESSAGE_SIZE 1403 -#define IDD_PREF_LDAP_SERVER 1404 -#define IDC_CHOOSE_COLOR 1405 -#define IDC_COLOR 1406 -#define IDB_INSERT_LINK 1406 -#define IDD_DROPDOWN_TOOLBAR 1407 -#define IDC_COMBO_FOLDER 1407 -#define IDB_INSERT_TARGET 1407 -#define IDC_CHOOSE_FONT 1407 -#define IDB_HALIGN_LEFT 1408 -#define IDC_MOVEUP 1409 -#define IDB_HALIGN_CENTER 1409 -#define IDC_EDIT_NO_HITS 1410 -#define IDB_HALIGN_RIGHT 1411 -#define IDB_INSERT_IMAGE 1412 -#define IDB_INSERT_HRULE 1413 -#define IDB_INSERT_TABLE 1414 -#define IDC_STATIC_SERVER 1414 -#define IDC_EDIT_MAX_HITS 1415 -#define IDC_EDIT_PORT_NO 1416 -#define IDC_COMBO_MAIL_FOLDER 1417 -#define IDC_STATIC_ROOT 1417 -#define IDC_EDIT_ROOT 1418 -#define IDC_COMBO_NEWS_FOLDER 1419 -#define IDC_STATIC_PORT 1419 -#define IDC_CHECK_ENCRYPTED 1420 -#define IDC_STATIC_MAX_HITS 1420 -#define IDC_EDIT_SERVE 1421 -#define IDC_FIRSTNAME_FIRST 1421 -#define IDC_CHECK_PASSWORD 1421 -#define IDC_LASTNAME_FIRST 1422 -#define IDC_EDIT_SERVER 1423 -#define IDC_SERVERS_LIST 1423 -#define IDC_EDIT_DESCRIPTION 1424 -#define IDC_STATIC_FONT 1424 -#define IDC_BOOKMARKS 1424 -#define IDB_ADDRESSBOOKSELECT 1425 -#define IDC_STATIC_STYLE 1425 -#define IDC_CUSTPREVIEW 1425 -#define IDC_COOKIES 1425 -#define IDC_STATIC_SIZE 1426 -#define IDC_INSERT 1426 -#define IDC_HANDOPEN 1426 -#define IDC_ADDBOOK 1426 -#define IDB_LARGE_HTAB 1427 -#define IDC_HANDCLOSED 1427 -#define IDC_FILTERS 1427 -#define IDB_LARGE_HFTAB 1428 -#define IDC_MOVEBUTTON 1428 -#define IDB_SMALL_HTAB 1429 -#define IDB_SMALL_HFTAB 1430 -#define IDM_NEWMAILMESSAGE 1430 -#define IDB_OPTIONSSELECT 1433 -#define IDB_BUTTON_FOLDER 1434 -#define IDC_ATTACH_VCARD 1435 -#define IDC_RADIO_FIXED 1435 -#define IDC_BITMAPLIST 1436 -#define IDC_RADIO_VARIABLE 1436 -#define IDB_THREAD_BACK 1436 -#define IDD_WIZARD_MAILNEWS_WIN16 1436 -#define IDC_DELETEPROFILE 1437 -#define IDB_MESSAGE_BACK 1437 -#define IDB_BACK 1437 -#define IDD_NEWMAIL 1438 -#define IDC_ADDRESSBKT 1438 -#define IDC_EDITPROFILE 1438 -#define IDC_STATIC_EG1 1439 -#define IDB_ATTACHBUTTON 1439 -#define IDC_STATIC_EG2 1440 -#define IDC_OPTION 1440 -#define IDC_READMAIL_POP 1441 -#define IDB_MAILREPLY 1441 -#define IDC_READMAIL_IMAP 1442 -#define IDC_READNEWS_STATIC4 1443 -#define IDD_IMAGE_ALT 1443 -#define IDC_BUTTON_HELP 1444 -#define IDD_EXTRA_HTML 1444 -#define IDC_EXTRA_HTML_TEXT 1445 -#define IDC_HISTBAR_FINDTEXT 1445 -#define IDD_NEWFOLDER 1445 -#define IDB_USERBTN 1445 -#define IDC_READMAIL_POP2 1445 -#define IDC_HISTBAR_FIELD 1446 -#define IDD_SPELL_CHECKER 1446 -#define IDC_EXTRA_HTML_MSG 1446 -#define IDC_HISTBAR_FIND 1447 -#define IDC_LOCAL_FONT_MSG 1447 -#define IDD_PREF_MNCREATECARD 1447 -#define IDC_FONT_COLOR_FRAME 1448 -#define IDC_FILENAME_AREA 1449 -#define IDC_FONT_STYLE 1449 -#define IDC_CATEGORY 1450 -#define IDC_COPYFILES 1450 -#define IDC_TEXT1 1451 -#define IDC_IGNOREFILES 1451 -#define IDC_MOVEFILES 1452 -#define IDC_VIEW 1452 -#define IDC_FILTER_HELP 1453 -#define IDC_EDIT_MAXNEWSART 1454 -#define IDC_REUSE_MESSAGE_WINDOW 1456 -#define IDC_CHECK_NOTIFY 1457 -#define IDC_CHECK_POP_REMOTE 1458 -#define IDC_CHECK_IMAP_LOCAL 1459 -#define IDC_CHECK2_DEFAULT 1460 -#define IDC_CHECK_IMAP_SSL 1460 -#define IDC_RD_KEEP_DAYS 1461 -#define IDC_RADIO_ONLINE 1461 -#define IDC_CHECK_IMAP_TRASH 1461 -#define IDC_RD_KEEPALL 1462 -#define IDC_RADIO_OFFLINE 1462 -#define IDC_RD_KEEP_NEW 1463 -#define IDC_CHECK_ASKME_DEFAULT 1463 -#define IDC_ARROW_HAND 1464 -#define IDC_EDIT_DAYS 1464 -#define IDC_INSTALL 1464 -#define IDC_BNT_MORE 1465 -#define IDC_NETHELP 1465 -#define IDC_IBEAM_HAND 1466 -#define IDC_COLOR_LIST_FRAME 1466 -#define IDC_EDIT_NEWEST 1466 -#define IDC_CHECK_DOWNLOAD 1466 -#define IDC_EXPLANATION1 1466 -#define IDC_RADIO_FROM 1467 -#define IDC_RADIO_KEEP1 1468 -#define IDC_RADIO_ALWAYS 1468 -#define IDC_RADIO_SINCE 1468 -#define IDD_NEWSMAXHEADERS 1469 -#define IDC_RADIO_KEEP2 1469 -#define IDC_RADIO_NEVER 1469 -#define IDC_EDIT_DAYS_AGO 1469 -#define IDC_TEXT_ACTION 1469 -#define IDC_RADIO_KEEP3 1470 -#define IDD_PREF_MNOFFLINE 1470 -#define IDC_TEXT_ACTION2 1470 -#define IDC_CHECK_KEEP4 1471 -#define IDD_MORE_DISK_CHOICES 1471 -#define IDC_BUTTON_SELECT 1471 -#define IDD_PREF_MORE_DISKSPACE 1472 -#define IDD_ASKME_DIALOG 1473 -#define IDC_CHECK_DOWNLOAD_MAIL 1473 -#define IDB_PREVIEWSPLASH 1474 -#define IDD_NO_SPELL_CHECKER 1474 -#define IDC_TEXT_SELECTION_COUNT 1474 -#define IDC_TEXT_DISCUSSIONS_SELECTED 1474 -#define IDB_PROPREVIEWSPLASH 1475 -#define IDB_FILEATTACHMENT 1475 -#define IDC_LIST_DISCUSSIONS 1475 -#define IDD_PP_DOWNLOAD_DISCUS 1476 -#define IDD_CUSTOM_DICTIONARY 1476 -#define IDC_BUTTON_SELECT_ALL 1476 -#define IDD_PP_DOWNLOAD_MAIL 1477 -#define IDB_WEBATTACHMENT 1477 -#define IDC_ACCTADD_TEXT 1477 -#define IDC_STATIC_UNREAD 1477 -#define IDC_CTRL 1477 -#define IDD_GO_ONOROFF_LINE 1478 -#define IDC_MUCWIZARD_MODEMLIST 1478 -#define IDC_ACCTSYS_TEXT 1478 -#define IDC_STATIC_TOTAL 1478 -#define IDC_EMAIL_TEXT1 1478 -#define IDC_BTN_RECIPIENTS 1478 -#define IDB_MAIL 1479 -#define IDC_ACCTEXIST_TEXT 1479 -#define IDC_MUCWIZARD_OK 1479 -#define IDC_STATIC_SPACE 1479 -#define IDC_EMAIL_TEXT2 1479 -#define IDC_LIST2 1479 -#define IDB_DISCUSSIONS_1 1480 -#define IDC_MUCEDIT_TEXT1 1480 -#define IDC_MUCWIZARD_CANCEL 1480 -#define IDC_CHECK_RECEIVE_HTML 1480 -#define IDC_EMAIL_ADDRTEXT 1480 -#define ID_BTN_ADD 1480 -#define IDB_MESSAGE 1481 -#define IDC_MAIL_SERVER_NAME 1481 -#define IDC_EMAIL_TEXT4 1481 -#define ID_BTN_REMOVE 1481 -#define IDD_SELECT_DISCUSSIONS 1482 -#define IDI_FILE 1482 -#define IDB_BOOKMARKOUTLINER 1482 -#define IDC_MUCWIZARD_ACCTLIST 1482 -#define IDC_PERCENT_WASTED 1482 -#define IDC_EMAIL_TEXT_PATCH 1482 -#define IDC_STATIC_HTML1 1482 -#define IDC_MUCEDIT_TEXT2 1483 -#define IDC_MUCWIZARD_MODEMVIEW 1483 -#define IDC_USED_SPACE 1483 -#define IDC_STATIC_HTML2 1483 -#define IDB_COMPOSEVTAB 1484 -#define IDC_MUCEDIT_TEXT3 1484 -#define IDC_MUCWIZARD_ACCTVIEW 1484 -#define IDC_DOWNLOAD_NOW 1484 -#define IDC_HELP_RECIPIENTS 1484 -#define IDB_VERTICALTAB 1485 -#define IDC_MUCEDIT_TEXT4 1485 -#define IDC_PRETTY_NAME 1485 -#define IDC_HELP_HTMLOK 1485 -#define IDS_INVALID_PROFILE_NAME 1486 -#define IDC_CHECK 1486 -#define IDB_MSGENCRYPTED 1486 -#define IDC_UGLY_NAME 1486 -#define IDC_ICON1 1486 -#define IDS_UNABLE_CREATE_DIR 1487 -#define IDC_TEXT2 1487 -#define IDB_MSGSIGNEDENCRYPTED 1487 -#define IDC_NEWS_SERVER 1487 -#define IDS_PROFILE_EMPTY 1488 -#define IDC_SERVER_NAME 1488 -#define IDC_ADVANCED_ACCTNAME 1488 -#define IDS_PROFILE_DELETED 1489 -#define IDB_MSGSIGNED 1489 -#define IDC_PORT_NUMBER 1489 -#define IDC_LISTBOX_TAG 1489 -#define IDS_CONFIRM_DELETE 1490 -#define IDC_SECURITY_TYPE 1490 -#define IDC_EMAIL_NAMEEG 1490 -#define IDB_MSGENCRYPTEDBAD 1491 -#define IDC_DESCRIPTION_STR 1491 -#define IDC_EMAIL_ADDREG 1491 -#define IDC_VIEW_TEXT2 1492 -#define IDB_MSGSIGNEDBAD 1493 -#define IDC_TEXT_FOLDERS_SELECTED 1493 -#define IDC_USE_MAPI 1493 -#define IDS_BAD_DIRECTORY2 1494 -#define IDC_MAPI_GROUP 1494 -#define IDB_MSGSIGNEDENCRYPTEDBAD 1495 -#define IDC_STATIC_LABEL_SELECTED 1495 -#define IDB_MSGSTAMPMASK 1496 -#define IDC_HELP_SELECT_FOR_DOWNLOAD 1496 -#define IDB_MSGATTACHED 1497 -#define IDC_HELP_GO_OFFLINE 1497 -#define IDS_INSUFFICIENT_DISKSPACE_MOVE 1498 -#define IDC_DIALER_TEXT 1498 -#define IDS_INSUFFICIENT_DISKSPACE_COPY 1499 -#define IDC_LOGINNAME 1499 -#define IDD_SPELLING_LANGUAGE 1500 -#define IDC_ADVANCED_SEARCH 1500 -#define IDC_PASSWORD 1500 -#define IDS_PROFDIR_EXISTS 1501 -#define IDC_LDAP_SEARCHBASE 1501 -#define IDS_PROFILE_SELECTOR_TITLE 1502 -#define IDC_LDAP_ADDRESS 1502 -#define IDS_PE_INTROPAGE_TEXT 1503 -#define IDC_COMBO_AND_OR 1503 -#define IDC_LDAP_SERVER 1503 -#define IDD_PP_NEWS_GENERAL 1504 -#define IDB_SAENCRYPTEDBAD 1504 -#define IDS_PEMUC_NEWSPAGE 1504 -#define IDC_HTTP_SERVER 1504 -#define IDD_PP_NEWSHOST_GENERAL 1505 -#define IDB_SAENCRYPTED 1505 -#define IDC_CHECK_SUBFOLDERS 1505 -#define IDC_HTTP_ADDRESS 1505 -#define IDB_SAUNENCRYPTED 1506 -#define IDC_RADIO_SERVER 1506 -#define IDB_SASIGNED 1507 -#define IDC_REMOVE_HEADER 1507 -#define IDB_SASIGNEDBAD 1508 -#define IDS_PEMUCWIZ_TITLE 1508 -#define IDC_EDIT_HEADERS 1508 -#define IDB_SAENCRYPTED_MASK 1509 -#define IDS_PEMUCWIZ_BUTTON 1509 -#define IDC_CLEAR_SEARCH 1509 -#define IDC_ADVANCED_SEARCH_HELP 1510 -#define IDB_SAENCRYPTEDBAD_MASK 1510 -#define IDS_PEMUC_READNEWS_FINISH 1510 -#define IDS_CLICK_FINISH 1511 -#define IDB_SASIGNED_MASK 1512 -#define IDS_PEMUC_NAMEPAGE_TEXT 1512 -#define IDB_SAUNENCRYPTED_MASK 1513 -#define IDS_MUP_NAMEPAGE_TEXT 1513 -#define IDB_SASIGNEDBAD_MASK 1514 -#define IDS_PEMUCVIEW_TEXT1 1514 -#define IDD_HTML_MAIL_QUESTION 1515 -#define IDS_PEMUCVIEW_TEXT2 1515 -#define IDD_HTML_RECIPIENTS 1516 -#define IDS_PEMUCEDIT_UPGRADE 1516 -#define IDS_PEMUCEDIT_NORMAL 1517 -#define IDB_OLDCHARTB 1521 -#define IDB_NEW_FORMAT_TOOLBAR 1522 -#define IDD_LAUNCH_HELPER 1523 -#define IDB_MSGATTACHBUTTON 1524 -#define IDB_MSGATTACHBUTTONMASK 1525 -#define IDB_MAILFOLDER 1526 -#define IDB_MAILFOLDEROPEN 1527 -#define IDD_PP_ATTACHMENT_GENERAL 1528 -#define IDB_ED_DRAG 1529 -#define IDD_QA_DIALOG 1529 -#define IDC_TABLE_SIZE 1530 -#define IDC_TABLE_VSIZE 1531 -#define IDD_ADVANCED_SEARCH 1532 -#define IDC_ROW_SIZE 1532 -#define IDC_COL_SIZE 1533 -#define IDD_BASIC_SEARCH 1533 -#define IDC_TABLE_SEL 1534 -#define IDD_NOTIFY 1534 -#define IDC_COL_SEL 1535 -#define IDD_ADVANCED_LDAP_SEARCH 1535 -#define IDC_ROW_SEL 1536 -#define IDD_PP_FOLDER 1537 -#define IDC_CELL_SEL 1537 -#define IDD_PP_MULTISEL 1538 -#define IDC_ADD_ROWS 1538 -#define IDS_PROFILE_RENAME 1539 -#define IDC_ADD_COLS 1539 -#define IDS_PROFILE_RENAME2 1540 -#define IDS_MISSING_CFG 1541 -#define IDS_INVALID_CFG 1542 -#define IDS_INVALID_WIN16_DIR 1543 -#define IDB_DIRLIST 1543 -#define IDS_UNABLE_WRITE_REG 1544 -#define IDB_MAILHCLOSEPANE_H 1545 -#define IDB_MAILHCLOSEPANE_N 1546 -#define IDB_MAILVCLOSEPANE_H 1547 -#define IDB_MAILVCLOSEPANE_N 1548 -#define IDB_MAILHSHOWPANE_H 1549 -#define IDB_MAILHSHOWPANE_N 1550 -#define IDB_MAILVSHOWPANE_H 1551 -#define IDB_MAILVSHOWPANE_N 1552 -#define IDC_UNSUBSCRIBE 1553 -#define IDD_PREF_LDAP_OFFLINE_SETTINGS 1553 -#define IDC_BUTTON_FILE_MESSAGE 1553 -#define IDC_UPDATE_NOW 1553 -#define IDC_EDIT_USERNAME 1554 -#define IDC_CHECK_OVERRIDE 1555 -#define IDC_BUTTON_NEW_FOLDER 1555 -#define IDD_XPPROGRESS 1556 -#define IDC_LINE1 1557 -#define IDC_LINE2 1558 -#define IDC_STATIC_HOST 1558 -#define IDB_NAV_BAR 1559 -#define IDD_MAILSERVER_GENERAL 1559 -#define IDB_NAV_BAR1 1560 -#define IDD_MAILSERVER_POP 1560 -#define IDC_STATIC_TYPE 1560 -#define IDD_MAILSERVER_IMAP 1561 -#define IDC_RADIO_POP3 1561 -#define IDD_MAILSERVER_ADVANCED 1562 -#define IDC_COMBO_TYPE 1562 -#define IDC_STATIC_MAIL_SERVER 1563 -#define IDC_RADIO_SEARCH_LOCAL 1570 -#define IDC_RADIO_SEARCH_SERVER 1571 -#define IDC_COPY_STYLE 1580 -#define IDC_TABLE_COPY 1581 -#define IDC_TABLE_MOVE 1582 -#define IDS_MERGE_NEXT_CELL 1583 -#define IDD_NETPROFILE_LOGIN 1599 -#define IDC_CONFIRM1 1600 -#define IDC_CONFIRM2 1601 -#define IDC_CONFIRM3 1602 -#define IDC_CONFIRM4 1603 -#define IDC_INTRO1 1604 -#define IDC_INTRO2 1605 -#define IDC_INTRO3 1606 -#define IDC_NAME1 1607 -#define IDC_NAME2 1608 -#define IDC_NAME3 1609 -#define IDC_NAME4 1610 -#define IDC_PROFILE1 1611 -#define IDC_PROFILE2 1612 -#define IDC_PROFILE3 1613 -#define IDC_PROFILE4 1614 -#define IDS_UNABLETRANSFER_SUBDIR 1615 -#define IDS_ANDTHE 1616 -#define IDS_ORTHE 1617 -#define IDS_EDIT_CUSTOM 1618 -#define IDS_HEADER_DELETED_WARN 1620 -#define IDS_HEADER_TEXT_WARN 1621 -#define IDS_CUSTOM_HEADER_ERROR 1622 -#define IDS_EDIT_HEADER_IN_USE 1623 -#define IDD_SEARCH 1650 -#define IDD_HEADER_LIST 1670 -#define IDC_DRAG_COLOR 1675 -#define IDC_DROP_COLOR 1676 -#define IDC_DRAG_ARROW 1677 -#define IDC_NO_DROP 1678 -#define ID_MERGE_TABLE_CELLS 1679 -#define IDC_ALL_CELLS_SEL 1680 -#define ID_SPLIT_TABLE_CELL 1681 -#define IDS_MERGE_SELECTED_CELLS 1682 -#define IDS_SPLIT_TABLE_CELL 1684 -#define IDS_COPY_STYLE 1685 -#define ID_COPY_STYLE 1686 -#define IDD_EDIT_HEADER 1700 -#define IDC_SHORTCUT_BASE 1800 -#define IDC_EMAIL_ADDR 1996 -#define IDC_PROFILE_NAME 1997 -#define IDC_PROFILE_DIR 1998 -#define IDC_USER_NAME 1999 -#define IDB_FILE_PICT_TOOLBAR 2001 -#define IDB_FILE_TEXT_TOOLBAR 2002 -#define IDB_FILE_MIXED_TOOLBAR 2003 -#define IDB_CHAR_FORMAT_TOOLBAR 2004 -#define IDB_PARA_FORMAT_TOOLBAR 2005 -#define IDB_FORMS_TOOLBAR 2006 -#define IDB_PICTURES_EDT 2007 -#define IDS_FONTNAME_SANS_SERIF 2007 -#define IDB_MAINFRAME_MIXED_EDT 2008 -#define IDD_PREF_EDITOR 2008 -#define IDB_MAINFRAME_TEXT_EDT 2009 -#define IDB_GOLD_SPLASH 2010 -#define IDW_FORMAT_TOOLBAR 2011 -#define IDW_EDIT_TOOLBAR 2012 -#define IDW_PARA_TOOLBAR 2013 -#define IDW_FORMS_TOOLBAR 2014 -#define IDC_CONFIG_EDITBAR 2014 -#define IDC_CONFIG_FORMATBAR 2015 -#define IDC_CONFIG_CHARBAR 2016 -#define IDS_SAVE_DOC_PROMPT 2018 -#define IDS_SAVE_HTTP_PROMPT 2019 -#define IDB_COMBOBOX 2019 -#define IDD_HREF_BOOKMARK 2021 -#define IDD_HINT_DLG 2022 -#define IDC_HREF_FILE 2023 -#define IDD_PROPS_HRULE 2024 -#define IDB_IMAGE_PREVIEW 2025 -#define IDC_ANCHOR_EDIT 2026 -#define IDD_PROPS_IMAGE 2027 -#define IDB_ALIGN_TOP 2029 -#define IDB_ALIGN_MIDDLE_BASELINE 2030 -#define IDB_ALIGN_ABSMIDDLE 2031 -#define IDB_ALIGN_BOTTOM_BASELINE 2032 -#define IDB_ALIGN_LEFT 2033 -#define IDB_ALIGN_RIGHT 2034 -#define IDB_ALIGN_ABSBOTTOM 2035 -#define IDC_HREF_UNLINK 2036 -#define IDD_LIST_DLG 2039 -#define IDC_HREF_URL 2040 -#define IDC_TARGET_LIST 2041 -#define IDC_ANCHOR_LABEL 2050 -#define IDC_ANCHOR 2051 -#define IDC_ANCHOR_FRAME 2052 -#define IDC_LINK_FRAME 2053 -#define IDC_TARGET_LABEL 2054 -#define IDC_SHOW_HINT_AGAIN 2055 -#define IDC_EDIT_HINT 2056 -#define IDC_HINT_ICON 2057 -#define IDC_HREF_LABEL 2058 -#define IDC_OVERWRITE_ICON 2059 -#define IDC_IMAGE_LINK_TO 2060 -#define IDC_HR_ALIGN_LEFT 2066 -#define IDC_HR_ALIGN_CENTER 2067 -#define IDC_HR_ALIGN_RIGHT 2068 -#define IDC_HR_WIDTH 2069 -#define IDC_HR_WIDTH_PIXELS 2070 -#define IDC_HR_WIDTH_PERCENT 2071 -#define IDC_HR_SHADOW 2073 -#define IDC_IMAGE_BORDER 2073 -#define IDC_HR_HEIGHT 2074 -#define IDC_IMAGE_SPACE_HORIZ 2074 -#define IDC_PREVIEW_FRAME 2075 -#define IDC_IMAGE_SPACE_VERT 2076 -#define IDC_IMAGE_ALT_TEXT 2077 -#define IDC_IMAGE_ALIGN_STYLES 2078 -#define IDC_IMAGE_FILE 2079 -#define IDC_LOWRES_FILE 2080 -#define IDC_NOWRAP_MSG 2092 -#define IDC_LIST_CONTAINER 2096 -#define IDC_LOWRES_URL 2096 -#define IDC_LIST_TYPE 2097 -#define IDC_COMPACT_LIST 2098 -#define IDC_KEEP_IMAGE_WITH_DOC 2099 -#define IDC_IMAGE_URL 2101 -#define IDD_LOADING_IMAGES 2102 -#define IDC_LOADING_IMAGES 2102 -#define IDD_PROPS_DOCUMENT 2103 -#define IDC_DOC_TITLE 2104 -#define IDD_PROPS_CHARACTER 2104 -#define IDC_DOC_URL 2105 -#define IDC_DOC_AUTHOR 2106 -#define IDC_DOC_CREATE_DATE 2107 -#define IDC_FONTDEF_LOCATION 2107 -#define IDC_DOC_CREATION_DATE 2107 -#define IDC_DOC_CREATE_DATE2 2108 -#define IDC_DOC_UPDATE_DATE 2108 -#define IDC_DOC_META_LIST 2109 -#define IDC_DOC_DESCRIPTION 2109 -#define IDC_META_NAME 2110 -#define IDC_META_CONTENT 2111 -#define IDC_ADD_META_TAG 2112 -#define IDC_NAV_OPENS_NEW_WINDOW 2113 -#define IDC_EDITOR_OPENS_NEW 2114 -#define IDC_CHECK_BOLD 2115 -#define IDC_CHECK_ITALIC 2116 -#define IDC_CHECK_STRIKETHROUGH 2117 -#define IDC_CHECK_SUPERSCRIPT 2118 -#define IDD_SAVE_REMOTE_DOCUMENT 2118 -#define IDC_CHECK_SUBSCRIPT 2119 -#define IDD_PROPS_META 2119 -#define IDC_FONT_PROPORTIONAL 2120 -#define IDC_CHECK_UNDERLINE 2120 -#define IDC_FONT_FIXED_WIDTH 2121 -#define IDD_PAGE_DOC_COLORS 2121 -#define IDC_FONT_SIZE_COMBO 2124 -#define IDD_SAVE_IMAGE 2124 -#define IDC_FONT_COLOR_COMBO 2125 -#define IDD_SAVE_IMAGE_OVERWRITE 2125 -#define IDC_CHANGE_COLOR 2126 -#define IDC_FONT_SIZE_COMBO2 2126 -#define IDC_CHECK_BLINK 2127 -#define IDC_COPY_IMAGES 2128 -#define IDC_CHECK_NOBREAK 2128 -#define IDC_ADJUSTLINKS 2129 -#define IDC_DONT_ADJUSTLINKS 2130 -#define IDC_EDIT_AUTHOR 2132 -#define IDC_DOC_COLOR_PREVIEW 2134 -#define IDC_EQUIV_LIST 2135 -#define IDC_META_LIST 2136 -#define IDC_VAR_NAME 2137 -#define IDC_VAR_VALUE 2138 -#define IDC_VAR_SET 2139 -#define IDC_VAR_DELETE 2140 -#define IDC_VAR_NEW 2141 -#define IDC_SAVEAS_MSG 2142 -#define IDC_SAVEAS_NEW_DOC 2143 -#define IDC_SCHEME_LIST 2146 -#define IDC_SAVE_SCHEME 2147 -#define IDC_REMOVE_SCHEME 2148 -#define IDC_COLOR_ITEMS_LIST 2149 -#define IDC_BKRND_COLOR_DEF 2156 -#define IDC_OVERWRITE_ONE 2160 -#define IDC_OVERWRITE_ALL 2161 -#define IDC_DONT_OVERWRITE_ONE 2162 -#define IDC_DONT_OVERWRITE_ALL 2163 -#define IDD_PAGE_IMAGE 2163 -#define IDD_PAGE_LINK 2164 -#define IDD_PAGE_CHARACTER 2165 -#define IDC_CHOOSE_TEXT_COLOR 2166 -#define IDC_CHOOSE_LINK_COLOR 2167 -#define IDD_PAGE_PARAGRAPH 2167 -#define IDC_CHOOSE_ACTIVELINK_COLOR 2168 -#define IDC_CHOOSE_FOLLOWEDLINK_COLOR 2169 -#define IDD_PAGE_DOC_ADVANCED 2169 -#define IDC_SWATCH_TEXT 2170 -#define IDD_CREATE_TARGET 2170 -#define IDD_PROPS_TARGET 2170 -#define IDC_SWATCH_LINK 2171 -#define IDC_SWATCH_ACTIVELINK 2172 -#define IDC_SWATCH_FOLLOWEDLINK 2173 -#define IDC_SWATCH_FOLLOWEDLINK2 2174 -#define IDC_SWATCH_BKGRND 2174 -#define IDD_PUBLISH 2175 -#define IDC_APPLY_TO_CURRENT_DOC 2176 -#define IDC_APPLY_SETTINGS_MSG 2177 -#define IDD_PAGE_PARAMETERS 2177 -#define IDC_COLOR_SCHEME_GROUP 2178 -#define IDD_PAGE_JAVA_APPLET 2178 -#define IDC_COLOR_TEXT_GROUP 2179 -#define IDD_PAGE_PLUGIN 2179 -#define IDC_COLOR_BKGRND_GROUP 2180 -#define IDD_PAGE_DOC_INFO 2180 -#define IDC_SET_DOC_COLORS 2183 -#define IDC_USE_BROWSER_COLORS 2184 -#define IDD_SAVE_NEW_DOCUMENT 2184 -#define IDD_PAGE_PLUG_IN 2185 -#define IDC_TEXT_COLOR_DEFAULT 2186 -#define IDC_TEXT_COLOR_CUSTOM 2187 -#define IDC_CHECK_FIXED_WIDTH 2188 -#define IDD_PREF_PUBLISH 2189 -#define IDC_CLEAR_ALL_STYLES 2190 -#define IDC_PARAGRAPH_COMBO 2191 -#define IDC_CLEAR_TEXT_STYLES 2191 -#define IDB_PLUGIN 2191 -#define IDC_PARAGRAPH_STYLES 2191 -#define IDB_TARGET 2192 -#define IDC_ALIGN_CENTER 2193 -#define IDB_PLUGIN_SMALL 2193 -#define IDC_ALIGN_RIGHT 2194 -#define IDD_PROPS_HTML_TAG 2194 -#define IDC_CONTAINER_COMBO 2195 -#define IDC_LISTSTYLES 2195 -#define IDC_LIST_STYLES 2195 -#define IDD_PREF_TAG_TEMPLATES 2195 -#define IDC_LIST_ITEM_LABEL 2196 -#define IDD_PROPS_JAVA_HEADER 2196 -#define IDC_LIST_ITEM_COMBO 2197 -#define IDC_LIST_ITEM_STYLES 2197 -#define IDD_OPEN_TEMPLATE 2198 -#define IDC_NETSCAPE_TEMPLATES 2198 -#define IDC_INDENT_LEVEL 2198 -#define IDC_LIST_START_NUMBER 2201 -#define IDC_HR_WIDTH_TYPE 2202 -#define IDC_TARGET_NAME 2204 -#define IDC_TARGETS_IN_CURRENT_DOC 2205 -#define IDC_TARGETS_IN_FILE 2206 -#define DC_TARGET_LIST 2208 -#define IDC_JAVA_SCRIPT_NONE 2210 -#define IDC_JAVA_SCRIPT_CLIENT 2211 -#define IDC_CONTAINER_TYPE 2211 -#define IDC_CONTAINER_STYLES 2211 -#define IDC_JAVA_SCRIPT_SERVER 2212 -#define IDC_HTML_EDITOR 2212 -#define IDC_IMAGE_EDITOR 2213 -#define IDC_IMAGE_ORIGINAL_SIZE 2213 -#define IDC_ALIGN_STYLE_FRAME 2214 -#define IDC_SELECT_HTML_EDITOR 2214 -#define IDC_IMAGE_HEIGHT 2215 -#define IDC_SELECT_IMAGE_EDITOR 2215 -#define IDC_PUBLISH_FILE_COUNT 2215 -#define IDC_IMAGE_WIDTH 2216 -#define IDC_PUBLISH_CURRENT_FILE 2216 -#define IDC_PUBLISH_TO_URL 2217 -#define IDC_TIME_REMAINING 2218 -#define IDC_PUBLISH_RATE 2219 -#define IDC_PUBLISH_DIRECTORY 2220 -#define IDC_EDIT_IMAGE 2220 -#define IDC_PUBLISH_FILE 2221 -#define IDC_AUTOADJUST_LINKS 2221 -#define IDC_PUBLISH_USER 2222 -#define IDC_NO_ADJUST_LINKS 2222 -#define IDC_ALT_TEXT 2223 -#define IDC_INFO_ICON 2223 -#define IDC_KEYWORDS 2224 -#define IDC_PLUGIN_IS_VISIBLE 2224 -#define IDC_PUBLISH_FILENAME 2225 -#define IDC_FULL_WINDOW_SIZE 2225 -#define IDC_SELECT_DIRECTORY 2226 -#define IDC_REMOVE_ISMAP 2227 -#define IDC_SAVE_INTL_CHARSET 2227 -#define IDC_SELECT_FILE 2228 -#define IDC_PLUGIN_PAL_FOREGROUND 2228 -#define IDC_PUBLISH_DIRNAME 2229 -#define IDC_PLUGIN_PAL_BACKGROUND 2229 -#define IDC_PUBLISH_LOCATION_LIST 2230 -#define IDC_BROWSE_FILE 2230 -#define IDC_APPLET_LOCATION 2231 -#define IDC_PUBLISH_FTP 2231 -#define IDC_DOC_CLASIFICATION 2232 -#define IDC_PUBLISH_HTTP 2232 -#define IDC_PUBLISH_PASSWORD 2233 -#define IDC_APPLET_CLASS_NAME 2234 -#define IDC_PUBLISH_SAVE_PASSWORD 2234 -#define IDC_PUBLISH_REMEMBER_PASSWORD 2235 -#define IDC_NEW_DOC_TEMPLATE 2236 -#define IDC_RESTORE_DEFAULT_TEMPLATE 2237 -#define IDC_EDAL_A 2238 -#define IDC_EDIT_TAG 2238 -#define IDC_EDAL_B 2239 -#define IDC_EDALCB 2240 -#define IDC_EDIT_TAG_MSG 2240 -#define IDC_EDAL_C 2241 -#define IDC_VERIFY_TAG 2241 -#define IDC_EDAL_T 2242 -#define IDC_TAG_LIST 2242 -#define IDC_EDAL_L 2243 -#define IDC_SAVE_DOC_ENCODE 2243 -#define IDC_EDAL_R 2244 -#define IDC_CLEAR_LINK 2244 -#define IDC_LINKED_TEX 2244 -#define IDC_COLOR_LABEL 2245 -#define IDC_MIXED_COLOR_LABEL 2246 -#define IDC_BROWSE_TO_LOCATION 2248 -#define IDC_NEW_DOC_BLANK 2249 -#define IDC_NEW_DOC_WIZARD 2251 -#define IDC_PUBLISH_OTHER_FILES 2252 -#define IDC_SELECT_ALL 2254 -#define IDC_SELECT_NONE 2255 -#define IDC_INCLUDE_IMAGE_FILES 2257 -#define IDC_INCLUDE_ALL_FILES 2258 -#define IDC_PUBLISH_DEFAULT_LOCATION 2259 -#define IDD_CREATE_TABLE 2266 -#define IDD_PAGE_TABLE 2267 -#define IDD_PAGE_TABLE_ROW 2268 -#define IDD_PAGE_TABLE_CELL 2269 -#define IDR_EDIT_INSERT_TABLE 2270 -#define IDR_EDIT_DELETE_TABLE 2271 -#define IDC_APPLY 2272 -#define IDR_CATEGORYFRAME 2273 -#define IDD_LOGIN_DIALOG 2274 -#define IDC_LOGIN_LIST 2275 -#define IDD_SETUPWIZARD_INTRO 2275 -#define IDC_CREATENEWPROFILE 2276 -#define IDD_SETUPWIZARD_PROFILENAME 2277 -#define IDD_SETUPWIZARD_NAMEEMAIL 2278 -#define IDD_UPDATE_STATUS 2279 -#define IDD_SETUPWIZARD_CONFIRMTYPE 2280 -#define IDD_SEARCHLDAP 2282 -#define IDD_PREF_MNDISKSPACE 2283 -#define IDD_SETUPWIZARD_WIN16 2284 -#define IDD_MUCWIZARD_INTRO 2290 -#define IDD_MUCWIZARD_VIEW 2291 -#define IDD_MUCWIZARD_ASWREADY 2292 -#define IDC_RADIO_KEEP4 2293 -#define IDD_MUCWIZARD_MUCREADY 2293 -#define IDD_MUCWIZARD_EDIT 2294 -#define IDD_MSGSRCHACTION 2295 -#define IDD_EXPORTRDF 2296 -#define IDD_NETPROFILE_ADVANCED 2297 -#define IDD_MAILSERVER_TYPE 2298 -#define IDC_COMBO_AND_OR2 2300 -#define IDC_COMBO_AND_OR3 2301 -#define IDC_COMBO_AND_OR4 2302 -#define IDC_COMBO_AND_OR5 2303 -#define IDC_PROFILENAME_TEXT 2400 -#define IDC_HEADER_HELP 2500 -#define FIRST_HISTORY_MENU_ID 16384 -#define LAST_HISTORY_MENU_ID 16600 -#define FIRST_HT_MENU_ID 16601 -#define LAST_HT_MENU_ID 16639 -#define FIRST_BOOKMARK_MENU_ID 16640 -#define LAST_BOOKMARK_MENU_ID 18687 -#define FIRST_FILE_BOOKMARK_MENU_ID 18688 -#define LAST_FILE_BOOKMARK_MENU_ID 20735 -#define FIRST_MOVE_MENU_ID 20736 -#define LAST_MOVE_MENU_ID 21759 -#define FIRST_COPY_MENU_ID 21760 -#define LAST_COPY_MENU_ID 22783 -#define FIRST_ATTACH_MENU_ID 22784 -#define LAST_ATTACH_MENU_ID 22847 -#define FIRST_SAVEATTACH_MENU_ID 22848 -#define LAST_SAVEATTACH_MENU_ID 22911 -#define FIRST_ATTACHPROP_MENU_ID 22912 -#define LAST_ATTACHPROP_MENU_ID 22975 -#define FIRST_ADDSENDER_MENU_ID 22976 -#define LAST_ADDSENDER_MENU_ID 24000 -#define FIRST_ADDALL_MENU_ID 24001 -#define LAST_ADDALL_MENU_ID 25025 -#define IDB_NEWTABS 30990 -#define IDB_DIRECTORYBUTTON 30991 -#define ID_TBAR_ALWAYSONTOP 32700 -#define ID_TBAR_SHOWTEXT 32701 -#define ID_TBAR_POSITION 32702 -#define ID_FILE_OPENURL 32769 -#define ID_NEW_FRAME 32770 -#define ID_NETSCAPE_SAVE_AS 32771 -#define ID_NETSCAPE_SAVEFRAME_AS 32772 -#define ID_FONT_10 32773 -#define ID_FONT_12 32774 -#define ID_FONT_14 32775 -#define ID_FONT_16 32776 -#define ID_FONT_24 32777 -#define ID_FONT_36 32778 -#define ID_FONT_48 32779 -#define ID_NAVIGATE_BACK 32780 -#define ID_NAVIGATE_FORWARD 32781 -#define ID_NAVIGATE_RELOAD 32782 -#define ID_NAVIGATE_REPAINT 32783 -#define ID_ENTERKEY 32784 -#define IDS_TASKBAR 32784 -#define ID_OPTIONS_BUTTONS 32785 -#define IDS_NOTIFY_MAIL1_TIP 32785 -#define ID_OPTIONS_TITLEURLBAR 32786 -#define IDS_NOTIFY_NEWS_TIP 32786 -#define ID_FILE_SAVECONFIGURATION 32787 -#define IDS_NOTIFY_WEB_TIP 32787 -#define ID_OPTIONS_TITLELOCATION_BAR 32788 -#define ID_FILE_VIEWSOURCE 32789 -#define ID_OPTIONS_STEVENSONBOX 32790 -#define ID_OPTIONS_STYLES 32791 -#define ID_OPTIONS_FANCYFTP 32792 -#define ID_OPTIONS_FANCYNEWS 32793 -#define ID_OPTIONS_FLUSHCACHE 32794 -#define IDS_TBAR_NAME 32794 -#define ID_NAVIGATE_INTERRUPT 32795 -#define IDS_NOTIFY_FOLDERS_TIP 32796 -#define ID_FONT_SMALL 32797 -#define IDS_NOTIFY_COMPOSE_TIP 32797 -#define ID_FONT_MEDIUM 32798 -#define IDS_NOTIFY_ADDRESSBOOK_TIP 32798 -#define ID_FONT_LARGE 32799 -#define IDS_NOTIFY_CALENDAR_TIP 32799 -#define IDS_NOTIFY_CALLPOINT_TIP 32800 -#define ID_OPTIONS_TOGGLENETDEBUG 32801 -#define ID_CONFIGURE_EXT_VIEWERS 32802 -#define ID_VIEW_LOADIMAGES 32804 -#define ID_VIEW_REFRESH 32805 -#define ID_GO_HOME 32807 -#define ID_GO_HISTORY 32808 -#define ID_FILE_MAILTO 32809 -#define ID_HOTLIST_ADDCURRENTTOHOTLIST 32810 -#define ID_HOTLIST_VIEW 32811 -#define ID_HOTLIST_MCOM 32812 -#define ID_HOTLIST_FISHCAM 32815 -#define IDS_DRAGURLTIP 32815 -#define ID_OPTIONS_LOADINLINEDIMAGES 32816 -#define ID_EDIT_FINDINCURRENT 32818 -#define ID_STARTERS_WELCOME 32820 -#define ID_STARTERS_WHATSNEW 32821 -#define ID_STARTERS_READNEWSGROUPS 32822 -#define ID_STARTERS_INTERNETINDEX 32823 -#define ID_STARTERS_INTERNETSEARCH 32824 -#define ID_STARTERS_INTERNETWHITEPAGES 32825 -#define ID_STARTERS_ABOUTTHEINTERNET 32826 -#define ID_STARTERS_HOWTOCREATEWEBSERVERS 32827 -#define ID_STARTERS_MCOM 32828 -#define ID_HELP_VERSION 32829 -#define ID_HELP_GUIDEDTOUR 32830 -#define ID_HELP_MANUAL 32831 -#define ID_HELP_FREQUENTLYASKEDQUESTIONS 32832 -#define ID_HELP_HOWTOGIVEFEEDBACK 32833 -#define ID_HELP_HOWTOGETSUPPORT 32834 -#define ID_OPTIONS_SAVE 32835 -#define ID_SAVE_OPTIONS 32836 -#define ID_OPTIONS_SHOWSTARTERBUTTONS 32837 -#define ID_OPTIONS_SHOWFTPFILEINFORMATION 32838 -#define ID_BASE_PROPORTIONAL_FONT 32839 -#define ID_BASE_FIXED_FONT 32840 -#define ID_HELP_LICENSE 32841 -#define ID_FILE_DOCINFO 32842 -#define ID_OPTIONS_SHOWSEC_BAR 32843 -#define ID_DOCUMENT_TOP 32844 -#define ID_FILE_PREFERENCES 32845 -#define ID_POPUP_GOTOLINK 32846 -#define IDS_POPUP_LOADLINK 32847 -#define ID_POPUP_PROPERTIES 32848 -#define ID_POPUP_FOLDUNFOLD 32850 -#define ID_POPUP_INTERNETSHORTCUT 32852 -#define IDS_POPUP_BREADCRUMBS 32853 -#define IDS_POPUP_BOOKMARKS 32854 -#define IDS_POPUP_ADDLINK2BOOKMARKS 32855 -#define IDS_POPUP_LOADLINKNEWWINDOW 32856 -#define IDS_POPUP_SAVELINKCONTENTS 32857 -#define IDS_POPUP_COPYLINKCLIPBOARD 32858 -#define IDS_POPUP_SAVEIMAGEAS 32859 -#define IDS_POPUP_COPYIMGLOC2CLIPBOARD 32860 -#define IDS_POPUP_LOAD_IMAGE 32862 -#define IDS_POPUP_LOADEMBED 32864 -#define IDS_POPUP_NOEMBED 32865 -#define IDS_POPUP_SAVEEMBEDAS 32866 -#define IDS_POPUP_ACTIVATE_EMBED 32867 -#define IDS_POPUP_COPYEMBEDLOC 32868 -#define IDS_POPUP_FRAMEBACK 32869 -#define IDS_POPUP_SAVEATTACHMENTAS 32869 -#define IDS_POPUP_FRAMEFORWARD 32870 -#define ID_EDIT_DELETE 32871 -#define ID_LOCATION_FOCUS 32872 -#define IDS_POPUP_BACK 32873 -#define ID_FILE_SAVEAS 32874 -#define IDS_POPUP_COPYEMBEDDATA 32875 -#define ID_DOCUMENT_BOTTOM 32876 -#define IDD_JAVACONSOLE 32877 -#define ID_OPTIONS_SHOWJAVACONSOLE 32878 -#define IDD_COMPLETION_PICKER 32878 -#define ID_FILE_MAILNEW 32879 -#define ID_EDIT_FINDAGAIN 32880 -#define ID_NAVIGATE_RELOADCELL 32881 -#define ID_OPTIONS_MAILANDNEWS 32882 -#define ID_OPTIONS_SECURITY 32883 -#define ID_OPTIONS_NETWORK 32884 -#define ID_WINDOW_ADDRESSBOOK 32885 -#define ID_POPUP_MAILNEW 32887 -#define ID_POPUP_CUT 32888 -#define ID_POPUP_COPY 32889 -#define ID_POPUP_PASTE 32890 -#define ID_POPUP_DELETE 32891 -#define ID_POPUP_DELETEBOOKMARK 32891 -#define ID_POPUP_MAKEALIAS 32892 -#define ID_POPUP_SETTOMENU 32893 -#define ID_POPUP_SETTOFOLDER 32894 -#define ID_POPUP_INSERTFOLDER 32895 -#define ID_POPUP_INSERTSEPARATOR 32896 -#define ID_POPUP_INSERTBOOKMARK 32897 -#define IDS_POPUP_FORWARD 32898 -#define IDS_TITLE_NOTITLE 32899 -#define IDS_TITLE_NOSUBJECT 32900 -#define IDS_TITLE_ADDRESSBOOK 32901 -#define IDS_TITLE_BOOKMARKS 32902 -#define IDS_TITLE_WEB 32903 -#define IDS_TITLE_COMPOSE_MESSAGE 32904 -#define IDS_TITLE_MESSAGE 32905 -#define IDS_TITLE_ARTICLE 32906 -#define IDS_TITLE_COLLECTIONS 32907 -#define ID_PLACES 32908 -#define ID_SECURITY 32909 -#define ID_NETSEARCH 32910 -#define ID_HISTORY_TITLE 32911 -#define ID_HISTORY_LOCATION 32912 -#define ID_HISTORY_FIRSTVISIT 32913 -#define ID_HISTORY_LASTVISIT 32914 -#define ID_HISTORY_EXPIRES 32915 -#define ID_HISTORY_VISITCOUNT 32916 -#define ID_HISTORY_LOGAND 32917 -#define ID_HISTORY_LOGOR 32918 -#define ID_POPUP_LOADFRAMENEWWINDOW 32919 -#define ID_POPUP_MAILTO 32920 -#define ID_NEXT_WINDOW 33013 -#define ID_HELP_SECURITY 33014 -#define ID_HELP_REGISTRATION 33015 -#define ID_CANCEL_EDIT 33016 -#define ID_POPUP_LOADLINK 33102 -#define ID_POPUP_ADDLINK2BOOKMARKS 33103 -#define ID_POPUP_LOADLINKNEWWINDOW 33104 -#define ID_POPUP_SAVELINKCONTENTS 33105 -#define ID_POPUP_COPYLINKCLIPBOARD 33106 -#define ID_POPUP_LOADIMAGE 33107 -#define ID_POPUP_SAVEIMAGEAS 33108 -#define ID_POPUP_COPYIMGLOC2CLIPBOARD 33109 -#define ID_POPUP_LOADIMAGEINLINE 33110 -#define ID_POPUP_ACTIVATEEMBED 33111 -#define ID_POPUP_SAVEEMBEDAS 33112 -#define ID_POPUP_COPYEMBEDLOC 33113 -#define ID_POPUP_COPYEMBEDDATA 33114 -#define ID_OPTIONS_TIPS 33125 -#define ID_REMOVE_FONTFACE 33126 -#define ID_FILE_OPENFOLDER 34000 -#define ID_FILE_OPENFOLDERNEW 34001 -#define ID_FILE_OPENFOLDERREUSE 34002 -#define ID_OPEN_MAIL_WINDOW 34003 -#define ID_MESSAGE_GETNEWMAIL 34004 -#define ID_OPEN_NEWS_WINDOW 34005 -#define ID_FILE_GETNEWMAIL 34006 -#define ID_FILE_DELIVERMAILNOW 34007 -#define ID_FILE_NEWFOLDER 34008 -#define ID_FILE_COMPRESSTHISFOLDER 34009 -#define ID_FILE_COMPRESSALLFOLDERS 34010 -#define ID_FILE_EMPTYTRASHFOLDER 34011 -#define ID_EDIT_DELETEMESSAGE 34022 -#define ID_POPUP_DELETEFOLDER 34023 -#define ID_EDIT_SELECTTHREAD 34024 -#define ID_EDIT_SELECTMARKEDMESSAGES 34025 -#define ID_EDIT_SELECTALLMESSAGES 34026 -#define ID_MESSAGE_REPLY 34029 -#define ID_MESSAGE_FORWARD 34031 -#define ID_MESSAGE_MOVE_TOFILE 34032 -#define ID_MESSAGE_MOVE_INBOXFOLDER 34033 -#define ID_MESSAGE_MOVE_TRASHFOLDER 34034 -#define ID_MESSAGE_OPEN 34035 -#define ID_POUP_COPYLINKCLIPBOARD 34035 -#define ID_WINDOW_NEWWINDOW 34036 -#define ID_UNROT13 34037 -#define ID_SORT_SORTMENUGOESHERE 34039 -#define ID_GO_FIRSTUNREAD 34043 -#define ID_VIEW_SHOWALLHEADERS 34044 -#define ID_SORT_THREADMESSAGES 34047 -#define ID_MAIL_THREAD 34048 -#define ID_SORT_ASCENDING 34049 -#define ID_SORT_BYDATE 34050 -#define ID_SORT_BYSUBJECT 34051 -#define ID_SORT_BYSENDER 34052 -#define ID_MAIL_ALLHEADERS 34054 -#define ID_MAIL_UNROT13 34055 -#define ID_WINDOW_BOOKMARKWINDOW 34056 -#define ID_VIEW_PAGESERVICES 34057 -#define ID_WINDOW_WINDOW_0 34060 -#define ID_WINDOW_WINDOW_1 34061 -#define ID_WINDOW_WINDOW_2 34062 -#define ID_WINDOW_WINDOW_3 34063 -#define ID_WINDOW_WINDOW_4 34064 -#define ID_WINDOW_WINDOW_5 34065 -#define ID_WINDOW_WINDOW_6 34066 -#define ID_WINDOW_WINDOW_7 34067 -#define ID_WINDOW_WINDOW_8 34068 -#define ID_WINDOW_WINDOW_9 34069 -#define ID_WINDOW_NEWBROWSER 34079 -#define ID_WINDOW_MAIL 34080 -#define ID_WINDOW_NEWS 34081 -#define ID_FILE_SEND 34084 -#define ID_FILE_ATTACH 34085 -#define ID_FILE_QUOTE 34086 -#define ID_FILE_OPENNEWSHOST 34087 -#define ID_FILE_REMOVENEWSHOST 34088 -#define ID_OPTIONS 34090 -#define ID_OPTIONS_SHOWACTIVENEWSGROUPS 34091 -#define ID_SHOWALLNEWSGROUPS 34092 -#define ID_OPTIONS_SHOWNEWNEWSGROUPS 34093 -#define ID_FILE_SENDLATER 34094 -#define IDS_FILE_SEND 34095 -#define IDS_FILE_SENDLATER 34096 -#define ID_OPTIONS_SHOWSUBSCRIBEDNEWSGROUPS 34098 -#define ID_MAIL_READTOPIC 34105 -#define ID_MAIL_READALL 34106 -#define ID_MAIL_SORTAGAIN 34111 -#define ID_OPTIONS_SAVEOPTIONS 34112 -#define ID_NEWS_POSTNEW 34116 -#define ID_MAIL_SHOWREAD 34119 -#define ID_MESSAGE_MARKASREAD 34120 -#define ID_MESSAGE_MARKASUNREAD 34121 -#define ID_MESSAGE_MARK 34125 -#define ID_MESSAGE_UNMARK 34126 -#define ID_MESSAGE_MOVE_SENT 34127 -#define ID_ITEM_MAILNEW 34134 -#define ID_ITEM_ADDUSER 34135 -#define ID_ITEM_ADDLIST 34136 -#define ID_ITEM_PROPERTIES 34137 -#define ID_FILE_IMPORT 34138 -#define ID_EDIT_PASTEASQUOTE 34139 -#define ID_ITEM_FOLD 34140 -#define ID_FOLDERINFO_ICON 34141 -#define ID_FOLDERINFO_NAME 34142 -#define ID_FOLDERINFO_UNREAD 34143 -#define ID_FOLDERINFO_COUNT 34144 -#define ID_FILE_NEWAB 34145 -#define ID_FILE_NEWDIR 34156 -#define ID_COMPOSE_QUOTE 34201 -#define ID_VIEW_SHOWALLFIELDS 34300 -#define ID_VIEW_SHOWREPLYTO 34301 -#define ID_VIEW_SHOWMAILTO 34302 -#define ID_VIEW_SHOWCC 34303 -#define ID_VIEW_SHOWBCC 34304 -#define ID_VIEW_SHOWPOSTTO 34305 -#define ID_VIEW_SHOWFOLLOWUPSTO 34306 -#define ID_VIEW_SHOWSUBJECT 34307 -#define ID_VIEW_SHOWATTACHMENT 34308 -#define ID_FILE_ADDNEWSGROUP 34312 -#define ID_FILE_GETMOREMESSAGES 34313 -#define ID_EDIT_CANCELMESSAGE 34315 -#define ID_MESSAGE_FORWARDQUOTED 34319 -#define ID_OPTIONS_SHOWONLYUNREADMESSAGES 34326 -#define ID_OPTIONS_SHOWUNREAD 34335 -#define ID_OLE_UPDATE 34336 -#define ID_FILE_WHATSNEW 34337 -#define ID_EDIT_SELECTALL 34338 -#define ID_ITEM_MAKEALIAS 34340 -#define ID_ITEM_SETTOFOLDER 34341 -#define ID_ITEM_SETTOMENU 34342 -#define ID_ITEM_INSERTBOOKMARK 34343 -#define ID_ITEM_INSERTFOLDER 34344 -#define ID_ITEM_INSERTSEPARATOR 34345 -#define ID_ITEM_GOTOBOOKMARK 34346 -#define ID_EDIT_SEARCH 34352 -#define ID_EDIT_SEARCHAGAIN 34353 -#define ID_VIEW_ATTACHINLINE 34355 -#define ID_VIEW_ATTACHLINKS 34356 -#define ID_FILE_PRINTPREVIEW 34357 -#define ID_OPTIONS_IMMEDIATEDELIVERY 34358 -#define ID_OPTIONS_DEFERREDDELIVERY 34359 -#define ID_SORT_BYMESSAGENUMBER 34364 -#define ID_VIEW_SHOWFROM 34365 -#define ID_FILE_UPLOADFILE 34366 -#define ID_MAIL_NORMALHEADERS 34367 -#define ID_MAIL_COMPRESSEDHEADERS 34368 -#define ID_FILE_NEWMESSAGE 34369 -#define ID_FILE_OPENMESSAGE 34370 -#define ID_FILE_OPENMESSAGENEW 34371 -#define ID_FILE_OPENMESSAGEREUSE 34372 -#define ID_EDIT_FILTERRULES 34378 -#define ID_EDIT_MAILPREFERENCES 34379 -#define ID_VIEW_NEXT 34380 -#define ID_EDIT_FILTER 34380 -#define ID_VIEW_PREVIOUS 34381 -#define ID_VIEW_REUSE 34384 -#define ID_MESSAGE_SEND 34390 -#define ID_MESSAGE_SENDLATER 34391 -#define ID_VIEW_ROT13 34394 -#define ID_TOOLS_BOOKMARKS 34398 -#define ID_TOOLS_ADDRESSBOOK 34399 -#define IDS_COMPRESSINGFOLDERS 34400 -#define ID_EDIT_DELETEFOLDER 34406 -#define ID_MESSAGE_NEXT 34410 -#define ID_MESSAGE_PREVIOUS 34411 -#define ID_MESSAGE_NEXTUNREAD 34412 -#define ID_MESSAGE_REUSE 34413 -#define ID_MESSAGE_REPLYALL 34415 -#define ID_TOOLS_MAIL 34420 -#define ID_TOOLS_NEWS 34421 -#define IF_FILE_EMPTYTRASH 34434 -#define ID_FILE_EMPTYTRASH 34434 -#define ID_MESSAGE_POSTREPLY 34435 -#define ID_MESSAGE_POSTANDREPLY 34436 -#define ID_FILE_SAVEMESSAGES 34437 -#define ID_MESSAGE_STOP 34438 -#define ID_MESSAGE_PREVIOUSUNREAD 34441 -#define ID_VIEW_FOLDER 34442 -#define ID_SORT_BYPRIORITY 34448 -#define ID_SORT_BYTHREAD 34449 -#define ID_VIEW_ADVANCEDTOOLBARS 34451 -#define ID_MESSAGE_SENDUNSENT 34452 -#define ID_MESSAGE_ADDSENDER 34453 -#define ID_MESSAGE_ADDALL 34454 -#define ID_FOLDER_RENAME 34455 -#define ID_FOLDER_MOVETO 34456 -#define ID_FOLDER_COPYTO 34457 -#define ID_TOOLS_WEB 34458 -#define ID_FOLDER_SELECT 34459 -#define ID_CATEGORY_SELECT 34460 -#define ID_TOOLS_EDITOR 34461 -#define ID_EDIT_FINDNEXT 34464 -#define ID_VIEW_HEADERS_MICRO 34467 -#define ID_VIEW_HEADERS_SHORT 34468 -#define ID_VIEW_HEADERS_ALL 34469 -#define ID_BLEH_DOUBLEBLEH 34473 -#define ID_DRAG_THIS_URL 34482 -#define ID_EDT_NEW_DOC_FROM_TEMPLATE 34483 -#define ID_GO_PUBLISH_LOCATION 34484 -#define IDS_DEF_PUB_LOC_NOT_SET 34485 -#define ID_VIEW_FRAME_SOURCE 34486 -#define ID_VIEW_FRAME_INFO 34487 -#define ID_MAIL_WRAPLONGLINES 34496 -#define ID_HOTLIST_ADDCURRENTTOHOTLIST2 34497 -#define IDS_PUBLISH_FILES 34503 -#define IDS_FILE_COUNT_FORMAT 34504 -#define IDS_UPLOADING_FILE 34505 -#define IDS_SAVING_FILE 34506 -#define IDS_PREPARING_PUBLISH 34507 -#define IDS_PUBLISH_REPORT_MSG 34508 -#define IDS_PUBLISH_REPORT_ONE_FILE 34509 -#define ID_LOCAL_POPUP 34512 -#define ID_ANIMATION_BONK 34513 -#define ID_VIEW_TWOPANE 34514 -#define ID_VIEW_ONEPANE 34515 -#define ID_DIRECTORY 34516 -#define ID_SWITCH_SORT 34517 -#define ID_FILE_NEWNEWSGROUP 34518 -#define ID_OPEN_NEWSGROUP 34519 -#define ID_FILE_DELETENEWSGROUP 34520 -#define ID_FILE_SUBSCRIBE 34521 -#define ID_FILE_UNSUBSCRIBE 34522 -#define ID_EDIT_SEARCHNEWSGROUPS 34523 -#define ID_MESSAGE_MARKALLREAD 34526 -#define ID_FILE_OPENNEWSGROUP 34527 -#define ID_SECURITY_ADVISOR 34528 -#define ID_FILE_OPENDRAFT 34529 -#define ID_MESSAGE_GETNEWNEWS 34535 -#define ID_SORT_TYPE 34547 -#define ID_SORT_TITLE 34547 -#define ID_SORT_NAME 34548 -#define ID_SORT_LOCATION 34548 -#define ID_SORT_NICKNAME 34549 -#define ID_SORT_FIRSTVISIT 34549 -#define ID_SORT_EMAILADDRESS 34550 -#define ID_SORT_LASTVISIT 34550 -#define ID_SORT_COMPANY 34551 -#define ID_SORT_EXPIREDATE 34551 -#define ID_SORT_LOCALITY 34552 -#define ID_SORT_VISITCOUNT 34552 -#define ID_ASCENDING 34553 -#define ID_DECENDING 34554 -#define ID_DESCENDING 34554 -#define ID_FILE_COMPOSE 34558 -#define ID_ITEM_MESSAGECC 34559 -#define ID_ITEM_MESSAGEBCC 34560 -#define ID_MESSAGE_CONTINUE 34561 -#define ID_MESSAGE_NEXTUNREADTHREAD 34563 -#define ID_MESSAGE_KILL 34564 -#define ID_MESSAGE_WATCH 34565 -#define ID_VIEW_ALLTHREADS 34566 -#define ID_VIEW_WATCHEDTHREADS 34567 -#define ID_VIEW_NEWTHREADS 34568 -#define ID_VIEW_KILLEDTHREADS 34569 -#define ID_EDIT_LDAPSEARCH 34570 -#define ID_MESSAGE_KILLCATEGORY 34574 -#define ID_MESSAGE_CATCHUP 34576 -#define ID_MESSAGE_MARKTHREADREAD 34579 -#define ID_MESSAGE_SELECT 34582 -#define ID_NAVIGATE_MSGCONTAINER 34582 -#define ID_NAVIGATE_CONTAINER 34583 -#define ID_MESSAGE_MARKASLATER 34584 -#define ID_MESSAGE_FILE 34585 -#define ID_BUTTON_CONTAINER 34586 -#define ID_APP_SUPER_EXIT 34593 -#define ID_MESSAGE_REPLYBUTTON 34594 -#define ID_MESSAGE_MARKBUTTON 34595 -#define ID_WINDOW_NETCASTER 34596 -#define ID_WINDOW_AIM 34597 -#define IDS_AIM_MENU 34598 -#define IDS_AIM_REGISTRY 34599 -#define ID_DELETE_BUTTON 34600 -#define IDS_DELETE_BUTTON 34601 -#define ID_RENAME_BUTTON 34602 -#define IDS_RENAME_BUTTON 34603 -#define ID_BUTTON_PROPERTIES 34604 -#define IDS_BUTTON_PROPERTIES 34605 -#define IDS_NETSCAPE_TIP 34606 -#define ID_OPTIONS_ENCODING_1 35001 -#define ID_OPTIONS_ENCODING_2 35002 -#define ID_OPTIONS_ENCODING_3 35003 -#define ID_OPTIONS_ENCODING_4 35004 -#define ID_OPTIONS_ENCODING_5 35005 -#define ID_OPTIONS_ENCODING_6 35006 -#define ID_OPTIONS_ENCODING_7 35007 -#define ID_OPTIONS_ENCODING_8 35008 -#define ID_OPTIONS_ENCODING_9 35009 -#define ID_OPTIONS_ENCODING_10 35010 -#define ID_OPTIONS_ENCODING_11 35011 -#define ID_OPTIONS_ENCODING_12 35012 -#define ID_OPTIONS_ENCODING_13 35013 -#define ID_OPTIONS_ENCODING_14 35014 -#define ID_OPTIONS_ENCODING_15 35015 -#define ID_OPTIONS_ENCODING_16 35016 -#define ID_OPTIONS_ENCODING_17 35017 -#define ID_OPTIONS_ENCODING_18 35018 -#define ID_OPTIONS_ENCODING_19 35019 -#define ID_OPTIONS_ENCODING_20 35020 -#define ID_OPTIONS_ENCODING_21 35021 -#define ID_OPTIONS_ENCODING_22 35022 -#define ID_OPTIONS_ENCODING_23 35023 -#define ID_OPTIONS_ENCODING_24 35024 -#define ID_OPTIONS_ENCODING_25 35025 -#define ID_OPTIONS_ENCODING_26 35026 -#define ID_OPTIONS_ENCODING_27 35027 -#define ID_OPTIONS_ENCODING_28 35028 -#define ID_OPTIONS_ENCODING_29 35029 -#define ID_OPTIONS_ENCODING_30 35030 -#define ID_OPTIONS_ENCODING_31 35031 -#define ID_OPTIONS_ENCODING_32 35032 -#define ID_OPTIONS_ENCODING_33 35033 -#define ID_OPTIONS_ENCODING_34 35034 -#define ID_OPTIONS_ENCODING_35 35035 -#define ID_OPTIONS_ENCODING_36 35036 -#define ID_OPTIONS_ENCODING_37 35037 -#define ID_OPTIONS_ENCODING_38 35038 -#define ID_OPTIONS_ENCODING_39 35039 -#define ID_OPTIONS_ENCODING_40 35040 -#define ID_OPTIONS_ENCODING_41 35041 -#define ID_OPTIONS_ENCODING_42 35042 -#define ID_OPTIONS_ENCODING_43 35043 -#define ID_OPTIONS_ENCODING_44 35044 -#define ID_OPTIONS_ENCODING_45 35045 -#define ID_OPTIONS_ENCODING_46 35046 -#define ID_OPTIONS_ENCODING_47 35047 -#define ID_OPTIONS_ENCODING_48 35048 -#define ID_OPTIONS_ENCODING_49 35049 -#define ID_OPTIONS_ENCODING_50 35050 -#define ID_OPTIONS_ENCODING_51 35051 -#define ID_OPTIONS_ENCODING_52 35052 -#define ID_OPTIONS_ENCODING_53 35053 -#define ID_OPTIONS_ENCODING_54 35054 -#define ID_OPTIONS_ENCODING_55 35055 -#define ID_OPTIONS_ENCODING_56 35056 -#define ID_OPTIONS_ENCODING_57 35057 -#define ID_OPTIONS_ENCODING_58 35058 -#define ID_OPTIONS_ENCODING_59 35059 -#define ID_OPTIONS_ENCODING_60 35060 -#define ID_OPTIONS_ENCODING_61 35061 -#define ID_OPTIONS_ENCODING_62 35062 -#define ID_OPTIONS_ENCODING_63 35063 -#define ID_OPTIONS_ENCODING_64 35064 -#define ID_OPTIONS_ENCODING_65 35065 -#define ID_OPTIONS_ENCODING_66 35066 -#define ID_OPTIONS_ENCODING_67 35067 -#define ID_OPTIONS_ENCODING_68 35068 -#define ID_OPTIONS_ENCODING_69 35069 -#define ID_OPTIONS_ENCODING_70 35070 -#define ID_EDT_FILE_SAVE 42001 -#define ID_EDT_FILE_SAVEAS 42002 -#define ID_EDIT_DOCUMENT 42003 -#define ID_OPT_EDITBAR_TOGGLE 42004 -#define ID_OPT_CHARBAR_TOGGLE 42005 -#define IDM_OPT_MESSAGEBAR_TOGGLE 42006 -#define ID_MAKE_LINK 42008 -#define ID_FORMAT_CHAR_BOLD 42010 -#define ID_FORMAT_CHAR_ITALIC 42011 -#define ID_FORMAT_CHAR_NOBREAKS 42012 -#define ID_FORMAT_CHAR_SUPER 42013 -#define ID_FORMAT_CHAR_SUB 42014 -#define ID_FORMAT_CHAR_STRIKEOUT 42015 -#define ID_FORMAT_CHAR_BLINK 42016 -#define ID_FORMAT_CHAR_NONE 42017 -#define ID_COMBO_FONTSIZE 42018 -#define ID_COMBO_FONTFACE 42019 -#define ID_COMBO_FONTCOLOR 42020 -#define ID_COMBO_PARA 42021 -#define ID_OPEN_NAV_WINDOW 42022 -#define ID_NEXT_WORD 42024 -#define ID_PREVIOUS_WORD 42025 -#define ID_NEXT_PARAGRAPH 42026 -#define IDS_LINK_TO_FILE 42026 -#define ID_PREVIOUS_PARAGRAPH 42027 -#define IDS_ANCHOR_IMAGE_FILE 42027 -#define IDS_ANCHOR_TEXT 42028 -#define IDS_ANCHOR_IMAGE 42029 -#define IDS_DRAG_SITEMAN_HINT 42030 -#define IDS_DRAG_BOOKMARK_HINT 42031 -#define ID_OPEN_EDITOR_WINDOW 42032 -#define ID_EDT_FINDREPLACE 42034 -#define IDS_TYPE_URL_OR_TARGET 42035 -#define IDS_TYPE_URL 42036 -#define IDS_NEW_EDITOR 42037 -#define IDS_NETSCAPE_COMPOSER 42037 -#define ID_ACTIVATE_SITE_MANAGER 42038 -#define ID_VIEW_NEWONLY 42039 -#define IDS_SITE_MANAGER 42041 -#define IDS_ANCHOR_SELECTED_TEXT 42042 -#define IDS_NEW_ANCHOR_TEXT 42043 -#define ID_EDITOR_UP 42044 -#define ID_EDITOR_DOWN 42045 -#define ID_EDITOR_NEXTCHAR 42046 -#define ID_EDITOR_PREVIOUSCHAR 42047 -#define ID_EDITOR_BEGINOFLINE 42048 -#define ID_EDITOR_ENDOFLINE 42049 -#define ID_EDITOR_PAGEUP 42050 -#define ID_EDITOR_PAGEDOWN 42051 -#define ID_EDITOR_BEGINOFDOCUMENT 42052 -#define ID_EDITOR_ENDOFDOCUMENT 42053 -#define ID_EDITOR_NEXTWORD 42054 -#define ID_EDITOR_PREVIOUSWORD 42055 -#define ID_EDITOR_SELECTUP 42056 -#define ID_EDITOR_SELECTDOWN 42057 -#define ID_EDITOR_SELECTNEXTCHAR 42058 -#define ID_EDITOR_SELECTPREVIOUSCHAR 42059 -#define ID_EDITOR_SELECTBEGINOFLINE 42060 -#define ID_EDITOR_SELECTENDOFLINE 42061 -#define ID_EDITOR_SELECTPAGEUP 42062 -#define ID_EDITOR_SELECTPAGEDOWN 42063 -#define ID_EDITOR_SELECTBEGINOFDOCUMENT 42064 -#define ID_EDITOR_SELECTENDOFDOCUMENT 42065 -#define ID_EDITOR_SELECTNEXTWORD 42066 -#define ID_EDITOR_SELECTPREVIOUSWORD 42067 -#define IDS_LEFT 42068 -#define IDS_CENTER 42069 -#define IDS_RIGHT 42070 -#define IDS_TOP 42071 -#define IDS_BOTTOM 42072 -#define IDS_BASELINE 42073 -#define IDS_SELECT_LOWRES_IMAGE 42074 -#define ID_PROPS_LOCAL 42075 -#define ID_PROPS_FONTDEF 42076 -#define ID_PROPS_IMAGE 42077 -#define ID_PROPS_HRULE 42078 -#define ID_PROPS_LINK 42079 -#define ID_PROPS_PARAGRAPH 42080 -#define ID_PROPS_CHARACTER 42081 -#define ID_PROPS_DOCUMENT 42082 -#define ID_PROPS_TEXT 42083 -#define ID_PROPS_JAVA 42084 -#define ID_PROPS_PLUGIN 42085 -#define ID_PROPS_TARGET 42086 -#define ID_PROPS_TAG 42087 -#define ID_PROPS_DOC_COLOR 42088 -#define ID_FORMAT_INDENT 42097 -#define ID_FORMAT_OUTDENT 42098 -#define ID_INSERT_IMAGE 42100 -#define ID_INSERT_HRULE 42101 -#define ID_INSERT_LINE_BREAK 42102 -#define ID_INSERT_BREAK_LEFT 42103 -#define ID_INSERT_BREAK_RIGHT 42104 -#define ID_INSERT_BREAK_BOTH 42105 -#define ID_INSERT_TARGET 42108 -#define ID_INSERT_TAG 42109 -#define IDS_CREATE_LINK 42110 -#define IDS_POPUP_CREATE_LINK 42111 -#define IDS_POPUP_INSERT_LINK 42112 -#define IDS_CAPTION_NONE 42113 -#define IDS_CAPTION_ABOVE 42114 -#define IDS_CAPTION_BELOW 42115 -#define IDS_PROPS_LINK 42116 -#define IDS_POPUP_PROPS_PAGE 42117 -#define IDS_POPUP_MAKE_IMAGE_BACKGROUND 42118 -#define ID_MAKE_IMAGE_BACKGROUND 42119 -#define IDS_EDIT_CUT 42121 -#define IDS_EDIT_COPY 42122 -#define IDS_EDIT_PASTE 42123 -#define IDS_EDIT_PASTE_LINK 42124 -#define IDS_EDIT_COPY_LINK 42125 -#define IDS_EDIT_SAVE_IMAGE 42126 -#define IDS_EDIT_ADD_LINK2BOOKMARKS 42127 -#define IDS_ERR_DIF_LOCAL_DEVICE_LINK 42128 -#define IDS_ERR_DIF_LOCAL_DEVICE_IMG 42129 -#define ID_INSERT_LINK 42134 -#define ID_EDIT_WINDOW_BOOKMARKS 42135 -#define IDS_INSERT_IMAGE 42136 -#define IDS_INSERT_HRULE 42137 -#define IDS_ERR_SRC_NOT_FOUND 42138 -#define IDS_ERR_COPY_FILE 42139 -#define IDS_WARN_REPLACE_FILE 42140 -#define IDS_COPY_FILE 42141 -#define IDS_RESOLVE_IMAGE_URL 42142 -#define IDS_RESOLVE_LINK_URL 42143 -#define IDS_EDIT_LINK 42144 -#define IDS_BROWSE_LINK 42145 -#define IDS_SAVE_AS_CAPTION 42146 -#define IDS_OVERWRITE_ACTIVE_FILE 42147 -#define IDS_DOC_PROPS_CAPTION 42150 -#define ID_FILE_OPEN_TO_EDIT 42151 -#define IDS_SAVEAS_REMOTE_MSG 42152 -#define IDS_SAVEAS_NEWDOC_MSG 42153 -#define IDS_SAVEAS_REMOTE_OR_NEWDOC_MSG 42154 -#define IDS_POPUP_LOAD_LINK_EDT 42155 -#define ID_POPUP_EDIT_IMAGE 42156 -#define IDS_POPUP_LOADLINKNEWWINDOW_EDT 42157 -#define IDS_POPUP_COPYLINKCLIPBOARD_EDT 42158 -#define IDS_POPUP_EDIT_LINK 42159 -#define IDS_POPUP_SAVELINKCONTENTS_EDT 42160 -#define IDS_POPUP_ADDLINK2BOOKMARKS_EDT 42162 -#define IDS_TEXT 42163 -#define IDS_LINK_TEXT 42164 -#define IDS_ACTIVE_LINK_TEXT 42165 -#define IDS_FOLLOWED_LINK 42166 -#define IDS_VALIDATE_IMAGE_FILE 42167 -#define IDS_COLOR_SCHEME_NS_DEFAULT 42169 -#define IDS_FILE_PRINT 42172 -#define IDS_FILE_PAGE_SETUP 42173 -#define IDS_FILE_PRINT_PREVIEW 42174 -#define ID_WEB_PAGE_STARTER 42177 -#define IDS_UNLINK_WARNING 42178 -#define IDS_CLEAR_CHAR_STYLES_CAPTION 42179 -#define ID_UNUM_LIST 42180 -#define ID_NUM_LIST 42181 -#define ID_INSERT_NONBREAK_SPACE 42182 -#define IDS_EDIT_TOOLBAR_CAPTION 42183 -#define IDS_CHAR_TOOLBAR_CAPTION 42185 -#define IDS_FORMS_TOOLBAR_CAPTION 42186 -#define IDS_EDIT_DOC_SOURCE 42187 -#define ID_FORMAT_CHAR_NO_TEXT_STYLES 42188 -#define ID_EDIT_HELP 42189 -#define IDS_TEXT_PROPS_CAPTION 42190 -#define IDS_IMAGE_PROPS_CAPTION 42191 -#define IDS_LINK_PROPS_CAPTION 42192 -#define IDS_REMOVE_LINKS_CAPTION 42192 -#define IDS_JAVA_PROPS_CAPTION 42193 -#define IDS_ERROR_READ_ONLY 42206 -#define IDS_FILE_ERROR_CAPTION 42207 -#define IDS_ERROR_BLOCKED 42208 -#define IDS_ERROR_BAD_URL 42209 -#define IDS_ERROR_FILE_OPEN 42210 -#define IDS_ERROR_FILE_WRITE 42211 -#define IDS_ERROR_CREATE_BAKNAME 42212 -#define IDS_ERROR_DELETE_BAKFILE 42213 -#define IDS_ERROR_WRITING_FILE 42214 -#define ID_FILE_PUBLISH 42216 -#define ID_FILE_EDITSOURCE 42217 -#define IDS_PROPS_IMAGE 42218 -#define IDS_PROPS_HRULE 42219 -#define IDS_PROPS_PARAGRAPH 42220 -#define IDS_PROPS_CHARACTER 42221 -#define IDS_PROPS_DOCUMENT 42222 -#define IDS_PROPS_IMAGE_LINK 42222 -#define IDS_PROPS_TAG 42223 -#define IDS_SELECT_IMAGE 42224 -#define IDS_PROPS_CAPTION 42226 -#define IDS_PERCENT_WINDOW 42227 -#define IDS_UNUM_LIST 42228 -#define IDS_NUM_LIST 42229 -#define IDS_BLOCK_QUOTE 42230 -#define IDS_DIRECTORY_LIST 42231 -#define IDS_MENU_LIST 42232 -#define IDS_DESCRIPTION_LIST 42233 -#define IDS_DEFAULT 42234 -#define IDS_LIST 42235 -#define IDS_DIGIT 42236 -#define IDS_BIG_ROMAN 42237 -#define IDS_SMALL_LETTERS 42238 -#define IDS_BIG_LETTERS 42239 -#define IDS_SOLID_CIRCLE 42240 -#define IDS_OPEN_CIRCLE 42241 -#define IDS_SOLID_SQUARE 42242 -#define IDS_NUMBER_STYLE 42243 -#define IDS_BULLET_STYLE 42244 -#define IDS_AUTOMATIC 42245 -#define IDS_PROPS_TARGET 42246 -#define IDS_EDIT_IMAGE 42247 -#define IDS_EDIT_TEMPLATE_PROMPT 42249 -#define IDS_SELECT_TEMPLATE_CAPTION 42250 -#define IDS_DEF_PUB_LOC_PROMPT 42251 -#define IDS_BROWSETO_PROMPT 42251 -#define IDS_SELECT_IMAGE_EDITOR 42255 -#define IDS_SELECT_HTML_EDITOR 42256 -#define IDS_OTHER_HREF_ATTRIBUTES 42257 -#define IDS_EDIT_HTML_ATTRIB_CAPTION 42258 -#define IDS_BAD_PUBLISH_URL 42261 -#define IDS_TARGETS_IN_CURRENT_DOC 42263 -#define IDS_TARGETS_IN_FILE 42264 -#define IDS_NO_TARGETS 42265 -#define IDS_REMOVE_OTHER_LINKS 42266 -#define IDS_REMOVE_LINK 42267 -#define IDS_REMOVE_LINKS 42268 -#define IDS_REMOVE_ALL_LINKS 42269 -#define ID_REMOVE_LINKS 42270 -#define IDS_UNABLE_TO_LAUNCH_EDITOR 42273 -#define IDS_IMAGE_IS_REMOTE 42274 -#define IDS_EDIT_IMAGE_CAPTION 42275 -#define IDS_SELECTION_MIXED_COLORS 42276 -#define IDS_DONT_CHANGE_COLORS 42277 -#define ID_EDT_NEW_DOC_BLANK 42279 -#define ID_EDT_NEW_DOC_TEMPLATE 42280 -#define ID_EDT_NEW_DOC_WIZARD 42281 -#define IDS_FILE_IS_MODIFIED 42282 -#define IDS_FILE_MODIFIED_CAPTION 42283 -#define IDS_PUBLISHING_DOCUMENT 42287 -#define IDS_COPYRIGHT_WARNING_HINT 42290 -#define ID_EDIT_DISPLAY_PARAGRAPH_MARKS 42291 -#define IDS_PIXELS 42292 -#define ID_POPUP_PROPS_LINK 42295 -#define IDS_BROWSE_AFTER_PUBLISH 42295 -#define IDS_ERROR_HTML_CAPTION 42296 -#define IDS_TAG_UNOPENED 42297 -#define IDS_TAG_UNCLOSED 42298 -#define IDS_TAG_PREMATURE_CLOSE 42299 -#define IDS_TAG_TAGNAME_EXPECTED 42300 -#define IDS_TAG_UNTERMINATED_STRING 42301 -#define IDS_TAG_ERROR 42302 -#define IDS_DOCUMENT_BUSY 42303 -#define IDS_SELECTION_CROSSES_TABLE_DATA_CELL 42304 -#define IDS_COPY_ERROR_CAPTION 42305 -#define IDS_SELECTION_EMPTY 42306 -#define IDS_WHITE_ON_BLACK 42307 -#define IDS_WHITE_ON_BLUE 42308 -#define IDS_BLUE_ON_ORANGE 42309 -#define IDS_BLACK_ON_YELLOW 42310 -#define IDS_BLACK_ON_LTYELLOW 42311 -#define IDS_BLACK_ON_OFFWHITE 42312 -#define IDS_BLACK_ON_LTBLUE 42313 -#define IDS_BLACK_ON_MEDBLUE 42314 -#define IDS_WHITE_ON_GREEN 42315 -#define IDS_WHITE_ON_VIOLET 42316 -#define IDS_BLACK_ON_WHITE 42317 -#define IDS_INTEGER_RANGE_ERROR 42318 -#define ID_POPUP_SETASWALLPAPER 42319 -#define IDS_SINGLE_CELL_CAPTION 42320 -#define IDS_SELECTED_CELLS_CAPTION 42321 -#define IDS_SELECTED_ROW_CAPTION 42322 -#define IDS_SELECTED_COLUMN_CAPTION 42323 -#define IDS_CHANGE_SEL_CAPTION 42324 -#define ID_PROPS_TABLE 42330 -#define ID_PROPS_TABLE_ROW 42331 -#define ID_PROPS_TABLE_COLUMN 42332 -#define ID_PROPS_TABLE_CELL 42333 -#define IDC_WIDTH_PERCENT 42334 -#define IDC_HEIGHT_PIXELS 42335 -#define IDC_HEIGHT_PERCENT 42336 -#define IDC_TABLE_CELL_ALIGN 42339 -#define IDS_PERCENT_PARENT_CELL 42339 -#define IDC_TABLE_CELL_VALIGN 42340 -#define ID_POPUP_DELETE_TABLE 42340 -#define ID_POPUP_INSERT_TABLE 42341 -#define IDS_POPUP_DELETE_TABLE 42342 -#define IDS_POPUP_INSERT_TABLE 42343 -#define IDS_DELETE_ROW 42344 -#define IDS_PROPS_TABLE_CAPTION 42345 -#define IDS_POPUP_TABLE_PROPS 42346 -#define IDS_POPUP_TABLE_CELL_PROPS 42347 -#define IDS_SUBMENU_SELECT_TABLE 42348 -#define IDS_SUBMENU_INSERT_TABLE 42349 -#define IDS_SUBMENU_DELETE_TABLE 42350 -#define IDS_CHANGE_SELECTED_CELL 42351 -#define IDS_CHANGE_SELECTED_ROW 42352 -#define IDS_CHANGE_SELECTED_COL 42353 -#define IDS_ROW 42355 -#define IDS_COLUMN 42356 -#define IDS_CELL 42357 -#define IDS_TABLE 42358 -#define IDS_PERCENT_TABLE 42359 -#define IDS_APPLY_CELL_MSG 42360 -#define IDS_SMALL_ROMAN 42363 -#define ID_FORMAT_CHAR_UNDERLINE 42364 -#define ID_NAVIGATE_CONTINUE 42365 -#define ID_DISPLAY_TABLES 42366 -#define IDS_PARAGRAPH_STYLE 42367 -#define IDS_CHECK_DISK_SPACE 42368 -#define IDS_AUTOSAVE_CAPTION 42369 -#define IDS_AUTOSAVE_OFF_MSG 42370 -#define ID_TOOLS_INBOX 42371 -#define ID_VIEW_PROPERTIES 42372 -#define ID_MESSAGE_RETRIEVEOFFLINE 42376 -#define ID_EDIT 42377 -#define ID_LIVE_CALL 42378 -#define ID_FILE_NEW_MAIL_MESSAGE 42379 -#define ID_FILE_OPEN_DRAF 42380 -#define ID_FILE_SAVE_DRAFT 42381 -#define ID_EDIT_FIND_IN_MESSAGE 42382 -#define ID_EDIT_FIND_AGAIN 42383 -#define ID_VIEW_ADDRESSES 42384 -#define ID_VIEW_ATTACHMENTS 42385 -#define ID_VIEW_MESSAGE_BODY_ONLY 42386 -#define ID_NAVIGATE_PLUGINS 42387 -#define ID_MESSAGE_SEND_NOW 42388 -#define ID_PRIORITY_HIGHEST 42390 -#define ID_PRIORITY_HIGH 42391 -#define ID_PRIORITY_NORMAL 42392 -#define ID_PRIORITY_LOW 42393 -#define ID_PRIORITY_LOWEST 42394 -#define ID_MESSAGE_ATTACH_FILE 42395 -#define ID_MESSAGE_ATTACH_WEB_PAGE 42396 -#define ID_MESSAGE_CONVERT2HTML 42397 -#define ID_EDIT_MAIL_WIZARD 42399 -#define IDS_DONT_CHANGE 42400 -#define IDS_FONTSIZE_NEG_2 42401 -#define IDS_FONTSIZE_NEG_1 42402 -#define IDS_FONTSIZE_0 42403 -#define IDS_FONTSIZE_1 42404 -#define IDS_FONTSIZE_2 42405 -#define IDS_FONTSIZE_3 42406 -#define IDS_FONTSIZE_4 42407 -#define ID_EDIT_BACKGROUND_IMAGE 42408 -#define ID_EDIT_PAGE_TITLE 42409 -#define ID_BLOCK_QUOTE 42410 -#define ID_NAVIGATE_MSG_BACK 42411 -#define ID_NAVIGATE_MSG_FORWARD 42412 -#define ID_MESSAGE_UNFLAGMESSAGE 42413 -#define ID_MESSAGE_PREVIOUSFLAGGED 42414 -#define ID_MESSAGE_NEXTFLAGGED 42415 -#define ID_MESSAGE_FIRSTFLAGGED 42416 -#define ID_MESSAGE_NEXTNEWSGROUP 42417 -#define ID_MESSAGE_NEXTUNREADNEWSGROUP 42418 -#define ID_VIEW_TASKBAR 42420 -#define ID_FILE_EDITMESSAGE 42422 -#define ID_VIEW_MESSAGE 42423 -#define IDM_CLOSE 42424 -#define IDM_SAVE 42425 -#define IDM_SAVEAS 42426 -#define IDM_SAVEASDRAFT 42427 -#define IDM_PRINTSETUP 42428 -#define IDM_PRINTPREVIEW 42429 -#define IDM_PRINT 42430 -#define IDM_EXIT 42431 -#define IDM_FINDINMESSAGE 42432 -#define IDM_FINDAGAIN 42433 -#define IDM_SEARCHADDRESSES 42434 -#define IDM_PREFERENCES 42435 -#define idm_redo 42436 -#define IDM_UNDO 42437 -#define IDM_CUT 42438 -#define IDM_COPY 42439 -#define IDM_PASTE 42440 -#define IDM_PASTEASQUOTE 42441 -#define IDM_SELECTALL 42442 -#define IDM_HIDETOOLBAR 42443 -#define IDM_HIDETASKBAR 42444 -#define IDM_ADDRESSES 42445 -#define IDM_ATTACHMENTS 42446 -#define IDM_MESSAGEBODYONLY 42447 -#define IDM_SENDNOW 42448 -#define IDM_SENDLATER 42449 -#define IDM_PRIORITY_HIGHEST 42450 -#define IDM_PRIORITYHIGH 42451 -#define IDM_PRIORITYNORMAL 42452 -#define IDM_PRIORITYLOW 42453 -#define IDM_PRIORITYLOWEST 42454 -#define IDM_ATTACHFILE 42455 -#define IDM_ATTACHWEBPAGE 42456 -#define IDM_ATTACHVCARD 42457 -#define IDM_QUOTEORIGINAL 42458 -#define IDM_BROWSER 42459 -#define IDM_INBOX 42460 -#define IDM_NEWSGROUPS 42461 -#define IDM_FOLDERS 42462 -#define IDM_EDITOR 42463 -#define IDM_CALENDAR 42464 -#define IDM_CALLPOINT 42465 -#define IDM_ADDRESSBOOK 42466 -#define IDM_HISTORY 42468 -#define IDM_JAVACONSOLE 42469 -#define IDM_HELP 42470 -#define IDM_DELETELAYER 42471 -#define IDM_REMOVELINK 42472 -#define IDM_SELECTTABLE 42473 -#define IDM_PARAGRAPHMARKS 42474 -#define IDM_TABLEBORDERS 42475 -#define IDM_CONVERTTOPLAINTEXT 42476 -#define IDM_SEND 42477 -#define IDM_SELECTEDOBJECT 42487 -#define IDM_CHARACTER 42488 -#define IDM_PARAGRAPH 42489 -#define IDM_FORMATLINK 42490 -#define IDM_FORMATLIST 42491 -#define IDM_FORMATTABLE 42492 -#define IDM_BACKGROUND 42493 -#define IDM_LINKCOLORS 42494 -#define IDM_PAGETITLE 42495 -#define IDM_STYLESHEET 42496 -#define IDM_MESSAGEPROPERTIES 42497 -#define ID_CREATE_CARD 42499 -#define ID_ITEM_SETTOTOOLBAR 42500 -#define ID_TOOLS_CHECK_SPELLING 42501 -#define IDM_ATTACHPERSONALCARD 42502 -#define ID_WINDOW_CALENDAR 42503 -#define ID_VIEW_CATEGORIES 42505 -#define ID_MESSAGE_IGNORECATEGORY 42506 -#define ID_MESSAGE_ADDCARD 42507 -#define ID_FILE_SELECTCATEGORY 42508 -#define ID_BIG_SWITCH 42509 -#define ID_EDIT_SERVER 42510 -#define ID_STOP_ANIMATION 42511 -#define ID_FILE_NEWCATEGORY 42512 -#define ID_NEW_DOC_BLANK 42513 -#define ID_DELETE_LAYER 42514 -#define ID_EDIT_REALLYDELETEMESSAGE 42515 -#define IDM_OFFLINE 42516 -#define IDM_DELETE 42517 -#define IDM_OPTIONS 42518 -#define IDM_CONVERT 42519 -#define IDM_EDITPLUGINS 42521 -#define ID_FILE_GETNEXT 42522 -#define ID_FILE_SYNCHRONIZE 42523 -#define ID_SORT_DESCENDING 42524 -#define ID_SORT_BYFLAG 42525 -#define ID_OPTIONS_PREFERENCES 42526 -#define ID_REMOVE_LIST 42527 -#define ID_SORT_BYSTATUS 42528 -#define ID_FILE_NEWNEWSHOST 42529 -#define ID_SORT_BYSIZE 42530 -#define ID_MESSAGE_RETRIEVESELECTED 42532 -#define ID_NEWS_MODERATE 42533 -#define IDM_ATTACHMYCARD 42534 -#define ID_SORT_BYUNREAD 42535 -#define ID_BOOKMARKS_FILE_ADDTOTOOLBAR 42536 -#define ID_BOOKMARKS_FILE_INTERNETSHORTCUT 42537 -#define ID_BOOKMARKS_FILE_GOOFFLINE 42538 -#define ID_EDIT_MANAGEMAILACCOUNT 42539 -#define ID_POPUP_SAVEAS 42540 -#define ID_INCREASE_FONT 42541 -#define ID_DECREASE_FONT 42542 -#define ID_EDIT_DOMAINS 42543 -#define ID_POPUP_EDIT_LINK 42544 -#define ID_FILE_UPDATECOUNTS 42545 -#define ID_VIEW_ABTOOLBAR 42545 -#define ID_POPUP_SETTOTOOLBAR 42546 -#define ID_DONEGETTINGMAIL 42547 -#define ID_DONEGOINGOFFLINE 42548 -#define IDS_CONVERT_TEXT_TO_TABLE 42700 -#define IDS_CONVERT_TABLE_TO_TEXT 42701 -#define IDS_ALIGN 42702 -#define IDS_ALIGN_TABLE 42703 -#define IDS_ALIGN_LEFT 42704 -#define IDS_ALIGN_RIGHT 42705 -#define IDS_ALIGN_CENTER 42706 -#define ID_ALIGN_LEFT 42710 -#define ID_ALIGN_RIGHT 42711 -#define ID_ALIGN_CENTER 42712 -#define ID_ALIGN_TABLE_LEFT 42713 -#define ID_ALIGN_TABLE_CENTER 42714 -#define ID_ALIGN_TABLE_RIGHT 42715 -#define ID_INSERT_TABLE_OR_PROPS 42719 -#define ID_INSERT_TABLE 42720 -#define ID_INSERT_TABLE_CAPTION 42721 -#define ID_INSERT_TABLE_ROW 42722 -#define ID_INSERT_TABLE_COLUMN 42723 -#define ID_INSERT_TABLE_CELL 42724 -#define ID_INSERT_TABLE_ROW_ABOVE 42725 -#define ID_INSERT_TABLE_COLUMN_BEFORE 42726 -#define ID_INSERT_TABLE_CELL_BEFORE 42727 -#define ID_INSERT_TABLE_MORE 42728 -#define ID_DELETE_TABLE 42729 -#define ID_DELETE_TABLE_CAPTION 42730 -#define ID_DELETE_TABLE_ROW 42731 -#define ID_DELETE_TABLE_COLUMN 42732 -#define ID_DELETE_TABLE_CELL 42733 -#define ID_DELETE_TABLE_MORE 42734 -#define ID_TOGGLE_TABLE_BORDER 42735 -#define ID_TOGGLE_HEADER_CELL 42736 -#define ID_TABLE_TEXT_CONVERT 42737 -#define ID_SELECT_TABLE 42740 -#define ID_SELECT_TABLE_ROW 42741 -#define ID_SELECT_TABLE_COLUMN 42742 -#define ID_SELECT_TABLE_CELL 42743 -#define ID_SELECT_TABLE_ALL_CELLS 42744 -#define IDS_CURRENT_COLOR 42750 -#define IDS_CURRENT_BKGRND_COLOR 42751 -#define IDS_DEFAULT_BKGRND_COLOR 42752 -#define IDS_CUSTOM_COLORS_LABEL 42753 -#define IDS_LAST_USED_COLOR 42754 -#define IDS_OTHER 42755 -#define IDS_OTHER_BUTTON 42756 -#define IDS_DEFAULT_BUTTON 42757 -#define ID_HISTORY_LOPCONTAINS 43000 -#define ID_HISTORY_LOPNOTCONTAINS 43001 -#define ID_HISTORY_LOPIS 43002 -#define ID_HISTORY_LOPNOTIS 43003 -#define ID_HISTORY_LOPISBEFORE 43004 -#define ID_HISTORY_LOPISAFTER 43005 -#define ID_HISTORY_LOPISLESSTHAN 43006 -#define ID_HISTORY_LOPISGREATERTHAN 43007 -#define ID_HISTORY_LOPAND 43008 -#define ID_HISTORY_LOPOR 43009 -#define ID_HISTORY_WINTITLE 43010 -#define ID_HISTORY_MENUUNDO 43011 -#define ID_HISTORY_MENUREDO 43012 -#define ID_HISTORY_URCUT 43013 -#define ID_HISTORY_URCOPY 43014 -#define ID_HISTORY_URDELETE 43015 -#define ID_HISTORY_MENUAND 43016 -#define ID_HISTORY_MENUOR 43017 -#define ID_HISTORY_SEARCH_WINTITLE 43018 -#define ID_INCREASE_INDENT 43019 -#define ID_HIST_FILE_ADDTOTOOLBAR 43020 -#define ID_HIST_FILE_INTERNETSHORTCUT 43021 -#define ID_OTHER_FONTFACE 43022 -#define IDS_TRANSFER_STATUS 59142 -#define IDS_SECURITY_STATUS 59143 -#define IDS_SIGNED_STATUS 59144 -#define ID_FORMAT_INCREASE_FONTSIZE 59395 -#define ID_FORMAT_DECREASE_FONTSIZE 59396 -#define ID_ALIGN_POPUP 59397 -#define ID_INSERT_POPUP 59398 -#define IDS_SHOW_EDITBAR 59400 -#define IDS_HIDE_EDITBAR 59401 -#define IDS_SHOW_FORMATBAR 59402 -#define IDS_HIDE_FORMATBAR 59403 -#define IDS_TOOLS_MENU 59404 -#define IDM_ADDRESSPICKER 59405 -#define IDS_PROPS_SELECTION 59406 -#define IDS_ALT_ENTER 59407 -#define IDS_EXTRA_HTML_MSG 59408 -#define IDS_IMG_TAG 59409 -#define IDS_HREF_TAG 59410 -#define IDS_HRULE_TAG 59411 -#define IDS_TABLE_TAG 59412 -#define IDS_TR_TAG 59413 -#define IDS_TD_TAG 59414 -#define IDS_CUSTOM_COLOR 59415 -#define IDS_MIXED_COLORS 59416 -#define IDS_MIXED_FONTS 59417 -#define IDS_MIXED_DONT_CHANGE 59418 -#define IDS_MIXED_STYLE 59419 -#define IDS_INVALID_WORD 59423 -#define IDS_ERR_ADD_WORD 59424 -#define IDS_CONFIRM_STOP_PLUGIN 59425 -#define IDS_ERR_LAUNCH_EDITOR_PLUGIN 59426 -#define IDS_CONVERR5 59428 -#define IDS_CONVERR6 59429 -#define IDS_CONVERR7 59430 -#define IDS_CONVERR8 59431 -#define IDS_CONVERR9 59432 -#define IDS_CONVERR10 59433 -#define IDS_CONVERR11 59434 -#define IDS_CONVERR12 59435 -#define IDS_CONVERR13 59436 -#define IDS_CONVERR14 59437 -#define IDS_CONVERR0 59438 -#define IDS_CONVERR1 59439 -#define IDS_CONVERR2 59440 -#define IDS_CONVERR3 59441 -#define IDS_CONVERR4 59442 -#define IDS_CMD_MAIL_STUB 59599 -#define IDS_CMDLINE_ERROR6 59600 -#define IDS_CMDLINE_ERROR1 59601 -#define IDS_CMDLINE_ERROR3 59603 -#define IDS_CMDLINE_ERROR4 59604 -#define IDS_HIDDEN_FRAME_STRING 59605 -#define IDS_CMDLINE_ERROR7 59606 -#define IDS_CMDLINE_ERROR8 59607 -#define IDS_COPYRIGHT_0 60010 -#define IDS_COPYRIGHT_1 60011 -#define IDS_COPYRIGHT_2 60012 -#define IDS_COPYRIGHT_3 60013 -#define IDS_COPYRIGHT_4 60014 -#define IDS_COPYRIGHT_5 60015 -#define IDS_COPYRIGHT_6 60016 -#define IDS_COPYRIGHT_7 60017 -#define IDS_COPYRIGHT_8 60018 -#define IDS_COPYRIGHT_9 60019 -#define IDS_COPYRIGHT_A 60020 -#define IDS_COPYRIGHT_B 60021 -#define IDS_COPYRIGHT_C 60022 -#define IDS_COPYRIGHT_D 60023 -#define IDS_AUTHORS_0 60030 -#define IDS_MAIL_0 60090 -#define IDS_MAIL_1 60091 -#define IDS_MAIL_2 60092 -#define IDS_MAIL_3 60093 -#define IDS_MAIL_4 60094 -#define IDS_MAIL_5 60095 -#define IDS_MAIL_6 60096 -#define IDS_MAIL_7 60097 -#define IDS_MAIL_8 60098 -#define IDS_MAIL_9 60099 -#define IDS_MAIL_A 60100 -#define IDS_MAIL_B 60101 -#define IDS_MAIL_C 60102 -#define IDS_MAIL_D 60103 -#define IDS_MAIL_E 60104 -#define IDS_MAIL_F 60105 -#define IDS_MAIL_G 60106 -#define IDS_MAIL_H 60107 -#define IDS_LICENSE_CLICKER 60109 -#define IDS_NONSEC_POST_FR_SEC_0 60110 -#define IDS_NONSEC_INLINES_0 60120 -#define IDS_NONSEC_INLINES_1 60121 -#define IDS_NONSEC_REDIRECT_0 60130 -#define IDS_NONSEC_UNKNOWN 60132 -#define IDS_DOCINFO_SECURE_0 60140 -#define IDS_DOCINFO_SECURE_1 60141 -#define IDS_DOCINFO_SECURE_2 60142 -#define IDS_DOCINFO_NONSECURE_0 60150 -#define IDS_DOCINFO_NONSECURE_1 60151 -#define IDS_DOCINFO_NONSECURE_2 60152 -#define IDS_ENTER_SECURE_0 60160 -#define IDS_ENTER_SECURE_1 60161 -#define IDS_LEAVE_SECURE_0 60170 -#define IDS_LEAVE_SECURE_1 60171 -#define IDS_NONSEC_POST_FR_NONSEC_0 60180 -#define IDS_MOZILLA_0 60190 -#define IDS_MOZILLA_1 60191 -#define IDS_MOZILLA_2 60192 -#define IDS_MOZILLA_3 60193 -#define IDS_MOZILLA_4 60194 -#define IDS_ABOUT_0 60200 -#define IDS_ABOUT_1 60201 -#define IDS_ABOUT_2 60202 -#define IDS_ABOUT_3 60203 -#define IDS_ABOUT_4 60204 -#define IDS_ABOUT_5 60205 -#define IDS_ABOUT_6 60206 -#define IDS_ABOUT_7 60207 -#define IDS_ABOUT_8 60208 -#define IDS_ABOUT_9 60209 -#define IDS_ABOUT_A 60210 -#define IDS_ABOUT_B 60211 -#define IDS_ABOUT_C 60212 -#define IDS_ABOUT_D 60213 -#define IDS_ABOUT_E 60214 -#define IDS_ABOUT_F 60215 -#define IDS_ABOUT_10 60216 -#define IDS_ABOUT_11 60217 -#define IDS_ABOUT_12 60218 -#define IDS_ABOUT_13 60219 -#define IDS_ABOUT_14 60220 -#define IDS_ABOUT_15 60221 -#define IDS_ABOUT_16 60222 -#define IDS_ABOUT_17 60223 -#define IDS_ABOUT_18 60224 -#define IDS_ABOUT_19 60225 -#define IDS_ABOUT_1A 60226 -#define IDS_ABOUT_1B 60227 -#define IDS_ABOUT_1C 60228 -#define IDS_ABOUT_1D 60229 -#define IDS_ABOUT_1E 60230 -#define IDS_ABOUT_1F 60231 -#define IDS_ABOUT_20 60232 -#define IDS_ABOUT_21 60233 -#define IDS_ABOUT_22 60234 -#define IDS_ABOUT_23 60235 -#define IDS_ABOUT_24 60236 -#define IDS_ABOUT_25 60237 -#define IDS_ABOUT_CUSTOM_0 60300 -#define IDS_ABOUT_CUSTOM_1 60301 -#define IDS_ABOUT_CUSTOM_2 60302 -#define IDS_ABOUT_CUSTOM_3 60303 -#define IDS_ABOUT_CUSTOM_4 60304 -#define IDS_MAIL_INVALID_EMAIL 61204 -#define IDS_MAIL_NORETURN 61205 -#define IDS_MAIL_INVALID_BUILD 61206 -#define IDS_MAIL_TOO_LONG 61207 -#define IDS_FIND_NOT_FOUND 61208 -#define IDS_AUTH_DEFAULT 61209 -#define IDS_NOLDAPSERVERS 61210 -#define IDS_DIRECT_WELCOME 61211 -#define IDS_DIRECT_WHATNEW 61212 -#define IDS_DIRECT_FAQ 61213 -#define IDS_DIRECT_TOUR 61214 -#define IDS_DIRECT_SUPPORT 61215 -#define IDS_DIRECT_FEEDBACK 61216 -#define IDS_DIRECT_MANUAL 61217 -#define IDS_DIRECT_VERSION 61218 -#define IDS_DIRECT_HOME 61219 -#define IDS_DIRECT_INTERNET_ABOUT 61220 -#define IDS_DIRECT_INTERNET_INDEX 61221 -#define IDS_DIRECT_INTERNET_SEARCH 61222 -#define IDS_DIRECT_INTERNET_WHITEPG 61223 -#define IDS_DIRECT_WEB_SERVICES 61224 -#define IDS_OPEN_CLIPBOARD 61226 -#define IDS_EMPTY_CLIPBOARD 61227 -#define IDS_EVIL 61228 -#define IDS_NET_INIT_FAILED 61229 -#define IDS_DIRECT_NETSCAPE_WHATSCOOL 61230 -#define IDS_DIRECT_LICENSE 61233 -#define IDS_LOCAL_HELP 61234 -#define IDP_OLE_INIT_FAILED 61234 -#define IDS_ABOUT_PAGE 61235 -#define IDS_HELP_SECURITY 61236 -#define IDS_DIRECT_MARKETPLACE 61237 -#define IDS_DDE_PROCESS_CMDLINE 61239 -#define IDS_DDE_SERVICE_NAME 61240 -#define IDS_DDE_OPENURL 61241 -#define IDS_DDE_SHOWFILE 61242 -#define IDS_DDE_ACTIVATE 61243 -#define IDS_DDE_LISTWINDOWS 61244 -#define IDS_DDE_GETWINDOWINFO 61245 -#define IDS_DDE_PARSEANCHOR 61246 -#define IDS_DDE_EXIT 61247 -#define IDS_DDE_REGISTERPROTOCOL 61248 -#define IDS_DDE_UNREGISTERPROTOCOL 61249 -#define IDS_DDE_REGISTERVIEWER 61250 -#define IDS_DDE_QUERYVIEWER 61251 -#define IDS_DDE_VIEWDOCCACHE 61252 -#define IDS_DDE_CMDLINE_SERVICE_NAME 61252 -#define IDS_DDE_VIEWDOCDATA 61253 -#define IDS_DDE_VIEWDOCFILE 61254 -#define IDS_DDE_UNREGISTERVIEWER 61255 -#define IDS_DDE_REGISTERURLECHO 61256 -#define IDS_DDE_URLECHO 61257 -#define IDS_DDE_UNREGISTERURLECHO 61258 -#define IDS_DDE_REGISTERWINDOWCLOSE 61259 -#define IDS_DDE_REGISTERWINDOWCHANGE 61259 -#define IDS_DDE_WINDOWCLOSE 61260 -#define IDS_DDE_WINDOWCHANGE 61260 -#define IDS_DDE_UNREGISTERWINDOWCLOSE 61261 -#define IDS_DDE_UNREGISTERWINDOWCHANGE 61261 -#define IDS_DDE_BEGINPROGRESS 61262 -#define IDS_DDE_SETPROGRESSRANGE 61263 -#define IDS_DDE_MAKINGPROGRESS 61264 -#define IDS_DDE_ENDPROGRESS 61265 -#define IDS_DDE_ALERT 61266 -#define IDS_DDE_VERSION 61270 -#define IDS_DDE_CANCELPROGRESS 61271 -#define IDS_DDE_QUERYURLFILE 61272 -#define IDS_DDE_LISTFRAMECHILDREN 61273 -#define IDS_DDE_GETFRAMEPARENT 61274 -#define IDS_HELP_REGISTRATION 61299 -#define IDS_WINEXEC_XX 61300 -#define IDS_WINEXEC_0_8 61301 -#define IDS_WINEXEC_2_3 61302 -#define IDS_WINEXEC_10_THRU_15 61303 -#define IDS_WINEXEC_16 61304 -#define IDS_WINEXEC_21 61305 -#define IDS_NO_NSMAPI32 61306 -#define IDS_MAPI_BACKUP_FAILED 61307 -#define IDS_NSMAPI32_COPY_FAILED 61308 -#define IDS_MAPI_BACKUP_MISSING 61309 -#define IDS_NSMAPI32_COPY_FAILED2 61310 -#define IDS_DDE_REGISTERSTATUSBARCHANGE 61311 -#define IDS_DDE_STATUSBARCHANGE 61312 -#define IDS_DDE_UNREGISTERSTATUSBARCHANGE 61313 -#define IDS_DDE_NAVIGATEBACK 61314 -#define IDS_DDE_NAVIGATEFORWARD 61315 -#define IDS_DDE_RELOAD 61316 -#define IDS_DDE_STOP 61317 -#define IDS_DDE_GETDOCWIDTH 61318 -#define IDS_DDE_GETDOCHEIGHT 61319 -#define IDS_DDE_USERAGENT 61320 -#define IDS_DDE_CACHE_CLEARCACHE 61321 -#define IDS_DDE_CACHE_FILENAME 61322 -#define IDS_DDE_CACHE_INCACHE 61323 -#define IDS_DDE_CACHE_REMOVEURL 61324 -#define IDS_DDE_CACHE_ADDURL 61325 -#define IDS_DDE_HISTORY_CLEARHISTORY 61326 -#define IDS_DDE_HISTORY_INHISTORY 61327 -#define IDS_DDE_HISTORY_ADDURL 61328 -#define IDS_DDE_HISTORY_REMOVEURL 61329 -#define IDS_DDE_HISTORY_NUMENTRIES 61330 -#define IDS_DDE_HISTORY_GETENTRY 61331 -#define IDS_DDE_GETWINDOWID 61332 -#define IDS_DDE_SUPPORTSMIMETYPE 61333 -#define IDS_DDE_EXECUTEJAVASCRIPT 61334 -#define IDS_DDE_PRINTWINDOW 61335 -#define IDS_DDE_PRINTURL 61336 -#define IDS_SELECT_APPROPRIATE_VIEWER 62000 -#define IDS_DOC_LOAD_COMPLETE 62001 -#define IDS_SPAWNING_EXTERNAL_VIEWER 62004 -#define IDS_SAVE_AS 62005 -#define IDS_FAILED_CREATE_TEMP_FILE 62006 -#define IDS_LOADING 62007 -#define IDS_NO_VIEWER_CONFIGD 62010 -#define IDS_UNABLE_FIND_APP 62011 -#define IDS_UNABLE_TO_LAUNCH_APP 62012 -#define IDS_SPAWNING_APP 62013 -#define IDS_LOGIN_AS 62014 -#define IDS_DOC_DONE 62015 -#define IDS_NOT_A_URL 62020 -#define IDS_REMOVE_CATEGORY 62021 -#define IDS_NO_ITEMS_TO_REMOVE 62022 -#define IDS_NEW_ITEM 62023 -#define IDS_NEW_HEADER 62024 -#define IDS_NO_SOURCE_LOADED 62026 -#define IDS_UNABLE_TO_LOAD_SOURCE 62027 -#define IDS_COULDNT_SELECT_PAL 62028 -#define IDS_ERR_CACHE_DIR_NOT_EXIST 62032 -#define IDS_ERR_TMP_DIR_NOT_EXIST 62033 -#define IDS_CURRENT_URL 62034 -#define IDS_NO_DOC_CURRENTLY_LOADED 62035 -#define IDS_THIS_IS_BOTTOM_LEDGE 62036 -#define IDS_CANNOT_PRINT_WHILE_LOADING 62037 -#define IDS_CANT_PREVIEW_WHILE_LOADING 62038 -#define IDS_SAVE_IN_PROGRESS 62039 -#define IDS_LAYING_OUT_DOC 62041 -#define IDS_LAYOUT_DOC_PERCENT_DONE 62042 -#define IDS_STYLES 62043 -#define IDS_MAIL_AND_NEWS 62044 -#define IDS_APPS_AND_DIRS 62046 -#define IDS_IMGS_AND_SECTY 62047 -#define IDS_PROXIES 62048 -#define IDS_HELPER_APPS 62049 -#define IDS_MARK_ALL_AS_UNVISITED 62050 -#define IDS_COMPLETE_BOTH 62051 -#define IDS_SELECT_VIEWER 62052 -#define IDS_SELECT_TELNET_APP 62053 -#define IDS_SELECT_HTML_VIEWER 62054 -#define IDS_SELECT_3270_APP 62055 -#define IDS_SELECT_NEWSRC_FILE 62056 -#define IDS_SIG_FILE 62057 -#define IDS_CONTINUE_CLEAR_CACHE 62060 -#define IDS_CONTINUE_CLEAR_MEM_CACHE 62061 -#define IDS_LOCATION 62062 -#define IDS_GOTO 62063 -#define IDS_SERVER_ERR_NUM 62064 -#define IDS_NETSITE 62065 -#define IDS_ACTIVATE_EMBED_STATUS 62069 -#define IDS_VIEWER_SEC_MESSAGE 62073 -#define IDS_VIEWER_SEC_DONTASK 62074 -#define IDS_DIRECT_CONTEST 62075 -#define IDS_PAGESETUP_INCHES 62076 -#define IDS_PAGESETUP_CENTIMETERS 62077 -#define IDS_PAGESETUP_CM 62078 -#define IDS_INTERRUPT_ONGOING 62080 -#define IDS_INVALID_INIFILE 62083 -#define IDS_DOCINFO_SECHIGH 62088 -#define IDS_DOCINFO_SECLOW 62089 -#define IDS_DOCINFO_SECDEF 62090 -#define IDS_ABOUT_SECURITY 62092 -#define IDS_RESOURCE_CHARSET 62093 -#define IDS_SOURCE_FILETYPE 62094 -#define IDS_OLE_CANTUSE_VIEWER 62095 -#define IDS_OLE_CANTUSE_HANDLER 62096 -#define IDS_OLE_CANTUSE_VIEWER2 62110 -#define IDS_LANGUAGE_USRDEF2 62120 -#define IDS_LANGUAGE_USRDEF3 62121 -#define IDS_LANGUAGE_USRDEF4 62122 -#define IDS_LANGUAGE_USRDEF5 62123 -#define IDS_LANGUAGE_USRDEF6 62124 -#define IDS_LANGUAGE_USRDEF7 62125 -#define IDS_LANGUAGE_LATIN1 62130 -#define IDS_LANGUAGE_JAPANESE 62131 -#define IDS_LANGUAGE_LATIN2 62132 -#define IDS_LANGUAGE_TAIWANESE 62133 -#define IDS_LANGUAGE_KOREAN 62134 -#define IDS_LANGUAGE_CHINESE 62135 -#define IDS_ACCEPTLANG_EN 62137 -#define IDS_ACCEPTLANG_ENUS 62138 -#define IDS_ACCEPTLANG_ENGB 62139 -#define IDS_ACCEPTLANG_FR 62140 -#define IDS_ACCEPTLANG_FRFR 62141 -#define IDS_ACCEPTLANG_FRCA 62142 -#define IDS_ACCEPTLANG_DE 62143 -#define IDS_ACCEPTLANG_JA 62144 -#define IDS_ACCEPTLANG_ZH 62145 -#define IDS_ACCEPTLANG_ZHCN 62146 -#define IDS_ACCEPTLANG_ZHTW 62147 -#define IDS_ACCEPTLANG_KO 62148 -#define IDS_ACCEPTLANG_ES 62149 -#define IDS_ACCEPTLANG_ESES 62150 -#define IDS_ACCEPTLANG_ESBR 62151 -#define IDS_ACCEPTLANG_IT 62152 -#define IDS_ACCEPTLANG_NL 62153 -#define IDS_ACCEPTLANG_SV 62154 -#define IDS_FILE_UPLOAD 62155 -#define IDS_MENU_MAIL 62156 -#define IDS_MENU_NEWS 62157 -#define IDS_MENU_BOOKMARK 62158 -#define IDS_MENU_HISTORY 62159 -#define IDS_MENU_POSTREPLY 62160 -#define IDS_MENU_POSTMAILREPLY 62161 -#define IDS_MENU_MAILREPLY 62162 -#define IDS_MENU_FORWARD 62163 -#define IDS_MENU_FORWARDQUOTED 62164 -#define IDS_MENU_TOADDRESS 62165 -#define IDS_MENU_UNSCRAMBLE 62166 -#define IDS_MENU_REPLY 62167 -#define IDS_MENU_REPLYALL 62168 -#define IDS_MENU_DELMSG 62169 -#define IDS_CLOSEWINDOWS_EXIT 62172 -#define IDS_EXIT_CONFIRMATION 62173 -#define IDS_REDIRECT_TO_SECURE 62177 -#define IDS_CONFIRM_DISK_SPACE 62178 -#define IDS_MAIL_FRAME 62179 -#define IDS_MAIL_NOFRAME 62181 -#define IDS_PRINT_NOFRAME 62183 -#define IDS_PRINT_FRAME 62184 -#define IDS_ABOUT_PLUGINS 62200 -#define IDS_LANGUAGE_USERDEFINED 62201 -#define IDS_MESSAGENOTSENT 62202 -#define IDS_MESSAGECOMPOSITION 62203 -#define IDS_COMPOSE_FROM 62204 -#define IDS_COMPOSE_REPLYTO 62205 -#define IDS_COMPOSE_MAILTO 62206 -#define IDS_COMPOSE_CC 62207 -#define IDS_COMPOSE_BLINDCC 62208 -#define IDS_COMPOSE_FILECC 62209 -#define IDS_COMPOSE_NEWSGROUPS 62210 -#define IDS_COMPOSE_FOLLOWUPTO 62211 -#define IDS_COMPOSE_SUBJECT 62212 -#define IDS_COMPOSE_ATTACHMENT 62213 -#define IDS_COMPOSE_NOSUBJECT 62214 -#define IDS_COMPOSE_DEFAULTNOSUBJECT 62215 -#define IDS_BOOKMARK_GOTO 62216 -#define IDS_POPUP_SHORTCUT 62217 -#define IDS_BOOKMARK_OPENFOLDER 62220 -#define IDS_BOOKMARK_CLOSEFOLDER 62221 -#define IDS_BOOKMARK_PROPERTIES 62222 -#define IDS_BOOKMARK_HEADER 62223 -#define IDS_BOOKMARK_SEPARATOR 62224 -#define IDS_BOOKMARK_NAME 62225 -#define IDS_BOOKMARK_CHANGED 62226 -#define IDS_BOOKMARK_UNCHANGED 62227 -#define IDS_BOOKMARK_DONE 62228 -#define IDS_BOOKMARK_BOOKMARK 62229 -#define IDS_BOOKMARK_ADDRESSPROPERTIES 62231 -#define IDS_BOOKMARK_BOOKMARKPROPERTIES 62232 -#define IDS_MAIL_COMPRESSFOLDER 62233 -#define IDS_MAIL_DELETEFOLDER 62234 -#define IDS_MAIL_UNSUBSCRIBE 62235 -#define IDS_MAIL_SUBSCRIBE 62236 -#define IDS_MAIL_GETMOREMESSAGES 62237 -#define IDS_MAIL_GETALLMESSAGES 62238 -#define IDS_MAIL_MARKNEWSGROUPREAD 62239 -#define IDS_MAIL_ADDNEWSGROUP 62240 -#define IDS_MAIL_SHOWALLNEWSGROUPS 62241 -#define IDS_MAIL_REMOVENEWSHOST 62242 -#define IDS_MAIL_REPLY 62244 -#define IDS_MAIL_REPLYALL 62245 -#define IDS_MAIL_FILETO 62245 -#define IDS_NEWSGROUPCOLON 62245 -#define IDS_MAIL_FORWARD 62246 -#define IDS_FOLDERCOLON 62246 -#define IDS_MAIL_FORWARDQUOTED 62247 -#define IDS_MAIL_SELECTTHREAD 62248 -#define IDS_NOTITLE 62248 -#define IDS_MAIL_DELETEMESSAGE 62249 -#define IDS_MAIL_BYRECIPIENT 62249 -#define IDS_MAIL_POSTREPLY 62250 -#define IDS_MAIL_POSTANDMAILREPLY 62251 -#define IDS_MAIL_NAME 62251 -#define IDS_MAIL_RE 62253 -#define IDS_MAIL_TOTAL 62255 -#define IDS_MAIL_SENDER 62256 -#define IDS_MAIL_SUBJECT 62257 -#define IDS_MAIL_DATE 62258 -#define IDS_MAIL_UNREAD 62259 -#define IDS_MAIL_RECIPIENT 62260 -#define IDS_BOOKMARK_ISALIAS 62261 -#define IDS_MAIL_PRIORITY 62262 -#define IDS_MAIL_STATUS 62263 -#define IDS_MAIL_LENGTH 62264 -#define IDS_MAIL_LOCATION 62265 -#define IDS_MESSAGESENTANYWAY 62266 -#define IDS_MAIL_CONTAINERS 62267 -#define IDS_MAIL_MYCONTAINERS 62268 -#define IDS_UNTITLED 62271 -#define IDS_FONT_FIXNAME 62272 -#define IDS_FONT_PROPNAME 62273 -#define IDS_FILTER_ALLFILES 62276 -#define IDS_SAVE_SAVING 62280 -#define IDS_SAVE_SAVINGLOCATION 62281 -#define IDS_SAVE_VIEWLOCATION 62282 -#define IDS_FRAME_NETPREF 62284 -#define IDS_FRAME_SECPREF 62285 -#define IDS_FRAME_GENPREF 62286 -#define IDS_FRAME_MAILPREF 62287 -#define IDS_FRAME_EDITORPREF 62288 -#define IDS_USER_PROMPT 62289 -#define IDS_LOAD_PREFS 62292 -#define IDS_LOAD_BOOKMARKS 62293 -#define IDS_LOAD_PLUGINS 62294 -#define IDS_DRAG_THIS_URL_TIP 62295 -#define IDS_OPEN 62296 -#define IDS_PROXIE_FOLDERS 62297 -#define IDS_BROWSE_TO_PUB_LOC_CAPTION 62298 -#define IDS_LOAD_JAVA 62298 -#define IDS_LANGUAGE_GREEK 62300 -#define IDS_LANGUAGE_TURKISH 62301 -#define IDS_SOURCE_SAMEAS_DEST 62302 -#define IDS_SAVING_LOCATION 62303 -#define IDS_VIEWING_LOCATION 62304 -#define IDS_LANGUAGE_WIN1251 62308 -#define IDS_CLOSE_BUTTON 62310 -#define IDS_LANGUAGE_UTF8 62311 -#define IDS_RES_VERSION 62312 -#define IDS_TITLE_ERROR 62313 -#define IDS_URL_INVALID 62314 -#define IDS_URL_UNREGISTERED 62315 -#define IDS_URL_SAVEFAILED 62316 -#define IDS_GETPATH_FAILED 62317 -#define IDS_CANT_WRITEFILE 62318 -#define IDS_NONAME 62319 -#define IDS_NOADDRESS 62320 -#define IDS_FILTER_HTM16 62323 -#define IDS_FILTER_HTM32 62324 -#define IDS_FILTERNT_HTM 62325 -#define IDS_FILTERNT 62326 -#define IDS_FILTER16 62327 -#define IDS_FILTER32 62328 -#define IDS_HTM_FILTER16 62329 -#define IDS_HTM_FILTER32 62330 -#define IDS_JPG_FILTER16 62331 -#define IDS_JPG_FILTER32 62332 -#define IDS_GIF_FILTER 62333 -#define IDS_XBM_FILTER 62334 -#define IDS_ALL_FILTER 62335 -#define IDS_IMAGE_FILTER16 62336 -#define IDS_IMAGE_FILTER32 62337 -#define IDS_POPUP_SETASWALLPAPER 62338 -#define IDS_POPUP_SAVEBACKGROUNDAS 62339 -#define IDS_PRINTING_PAGE 62341 -#define IDS_PAGE_N_OF_COUNT 62342 -#define IDS_SHORTCUT_TO 62343 -#define IDS_MORE_BOOKMARKS 62344 -#define IDS_UNSENT_MESSAGES 62345 -#define IDS_UPLOAD_FILES 62346 -#define IDS_NETSCAPE_MAIL_TITLE 62347 -#define IDS_CHARSET_LIST_FOR_UNICODE 62348 -#define IDS_BOOKMARK_QF_TIP 62351 -#define IDS_BREADCRUMB_QF_TIP 62352 -#define ID_CUSTOMIZE_TOOLBAR 62353 -#define IDS_NEWSGROUP_NAME 62354 -#define IDS_SUBSCRIBE 62355 -#define IDS_POSTINGS 62356 -#define IDS_SUBSCRIBE_GROUP 62357 -#define IDS_SCOPE_INSTR 62358 -#define IDS_SCOPE_ALLMAIL 62359 -#define IDS_SCOPE_SUBNEWS 62360 -#define IDS_SCOPE_ALLNEWS 62361 -#define IDS_SCOPE_SELECTED 62362 -#define IDS_MAIL_THISFOLDER 62363 -#define IDS_HIDE_TOOLBARS 62365 -#define IDS_HIDE_COMMANDTOOLBAR 62365 -#define IDS_SHOW_TOOLBARS 62366 -#define IDS_SHOW_COMMANDTOOLBAR 62366 -#define IDS_EXPANDO 62367 -#define IDS_ADDBOOKMARK 62368 -#define IDS_EDITBOOKMARK 62369 -#define IDS_PRIORITY_NONE 62370 -#define IDS_ADDBREADCRUMB 62370 -#define IDS_PRIORITY_LOWEST 62371 -#define IDS_EDITBREADCRUMB 62371 -#define IDS_PRIORITY_LOW 62372 -#define IDS_PRIORITY_NORMAL 62373 -#define IDS_PRIORITY_HIGH 62374 -#define IDS_PRIORITY_HIGHEST 62375 -#define ID_VIEW_COMMANDTOOLBAR 62376 -#define ID_VIEW_LOCATIONTOOLBAR 62377 -#define ID_VIEW_CUSTOMTOOLBAR 62378 -#define IDS_ACCEPTLANG_AF 62380 -#define IDS_ACCEPTLANG_SQ 62381 -#define IDS_ACCEPTLANG_EU 62382 -#define IDS_ACCEPTLANG_CA 62383 -#define IDS_ACCEPTLANG_DA 62384 -#define IDS_ACCEPTLANG_NLBE 62385 -#define IDS_ACCEPTLANG_FO 62386 -#define IDS_ACCEPTLANG_FI 62387 -#define IDS_ACCEPTLANG_FRBE 62388 -#define IDS_ACCEPTLANG_FRCH 62389 -#define IDS_ACCEPTLANG_DEDE 62390 -#define IDS_ACCEPTLANG_DEAU 62391 -#define IDS_ACCEPTLANG_DECH 62392 -#define IDS_ACCEPTLANG_GL 62393 -#define IDS_ACCEPTLANG_IS 62394 -#define IDS_ACCEPTLANG_IN 62395 -#define IDS_ACCEPTLANG_GA 62396 -#define IDS_ACCEPTLANG_GD 62397 -#define IDS_ACCEPTLANG_NO 62398 -#define IDS_ACCEPTLANG_HR 62399 -#define IDS_ACCEPTLANG_CS 62400 -#define IDS_ACCEPTLANG_HU 62401 -#define IDS_ACCEPTLANG_PL 62402 -#define IDS_ACCEPTLANG_RO 62403 -#define IDS_ACCEPTLANG_SK 62404 -#define IDS_ACCEPTLANG_SL 62405 -#define IDS_ACCEPTLANG_BG 62406 -#define IDS_ACCEPTLANG_BE 62407 -#define IDS_ACCEPTLANG_MK 62408 -#define IDS_ACCEPTLANG_RU 62409 -#define IDS_ACCEPTLANG_SR 62410 -#define IDS_ACCEPTLANG_UK 62411 -#define IDS_ACCEPTLANG_EL 62412 -#define IDS_ACCEPTLANG_TR 62413 -#define ID_WINDOW_TASKBAR 62414 -#define ID_BOOKMARKS_FILEROOT 62415 -#define IDS_HIDE_LOCATIONTOOLBAR 62416 -#define IDS_SHOW_LOCATIONTOOLBAR 62417 -#define IDS_MESSAGE_POSTREPLY 62418 -#define IDS_MESSAGE_POSTANDREPLY 62419 -#define IDS_MESSAGE_REPLY 62420 -#define IDS_MESSAGE_REPLYALL 62421 -#define IDS_HIDE_CUSTOMTOOLBAR 62424 -#define IDS_SHOW_CUSTOMTOOLBAR 62425 -#define IDS_HIDE 62426 -#define IDS_DOCK_TASKBAR 62427 -#define IDS_SHOW_TASKBAR 62428 -#define ID_WINDOW_LIVECALL 62429 -#define ID_FILE_SAVEFRAME_AS 62431 -#define ID_EDIT_FRAME 62432 -#define ID_HOTLIST_TOOLBAR 62433 -#define IDS_SPELL_CHECK_DONE 62433 -#define IDS_VIEWSOURCE 62434 -#define IDS_VIEWINFO 62435 -#define IDS_VIEWFRAMESOURCE 62436 -#define IDS_VIEWFRAMEINFO 62437 -#define IDS_MENU_CANCELMESSAGE 62438 -#define IDS_STATUS_CANCELMESSAGE 62439 -#define IDS_MENU_DELETEMESSAGE 62440 -#define IDS_POPUP_OPENFOLDER 62441 -#define IDS_POPUP_OPENFOLDERNEWWINDOW 62442 -#define IDS_POPUP_NEWSUBFOLDER 62443 -#define IDS_POPUP_DELETEFOLDER 62444 -#define IDS_POPUP_RENAMEFOLDER 62445 -#define IDS_POPUP_COMPRESSFOLDER 62446 -#define IDS_POPUP_NEWMESSAGE 62447 -#define IDS_POPUP_SEARCH 62448 -#define IDS_POPUP_OPENNEWSGROUP 62450 -#define IDS_POPUP_OPENNEWSGROUPNEWWINDOW 62451 -#define IDS_POPUP_REMOVENEWSGROUP 62452 -#define IDS_POPUP_INVITETONEWSGROUP 62453 -#define IDS_OPENACCEL 62453 -#define IDS_POPUP_MARKNEWSGROUPREAD 62454 -#define IDS_POPUP_UPDATEMESSAGECOUNT 62455 -#define IDS_POPUP_JOINNEWSGROUP 62456 -#define IDS_POPUP_REMOVENEWSHOST 62457 -#define IDS_POPUP_NEWFOLDER 62458 -#define IDS_POPUP_OPENMESSAGE 62459 -#define IDS_POPUP_OPENMESSAGENEWWINDOW 62460 -#define IDS_POPUP_ADDTOADDRESSBOOK 62461 -#define IDS_POPUP_IGNORETHREAD 62462 -#define IDS_POPUP_WATCHTHREAD 62463 -#define IDS_POPUP_FILE 62465 -#define IDS_POPUP_DELETEMESSAGE 62466 -#define IDS_POPUP_SAVEMESSAGE 62467 -#define IDS_POPUP_PRINTMESSAGE 62468 -#define IDS_POPUP_CANCELMESSAGE 62469 -#define IDS_POPUP_ADDSENDER 62470 -#define IDS_POPUP_ADDALL 62471 -#define IDS_NAVIGATION_TIP 62475 -#define ID_NAVIGATION_TOOLBAR 62475 -#define IDS_PERSONAL_TIP 62476 -#define ID_PERSONAL_TOOLBAR 62476 -#define IDS_LOCATION_TIP 62477 -#define ID_LOCATION_TOOLBAR 62477 -#define IDS_TOOLBARFOLDER 62478 -#define IDS_MENU_DELETENEWSGROUP 62479 -#define IDS_MENU_DELETENEWSHOST 62480 -#define IDS_MENU_DELETESELECTION 62481 -#define IDS_STATUS_DELETENEWSGROUP 62482 -#define IDS_STATUS_DELETENEWSHOST 62483 -#define IDS_STATUS_DELETESELECTION 62484 -#define IDS_CREATEDON 62485 -#define IDS_SEARCHING 62486 -#define IDS_SEARCHHITS 62487 -#define IDS_SEARCHNOHITS 62488 -#define IDS_SEARCH 62489 -#define IDS_STOP 62490 -#define IDS_SEARCHONEHIT 62491 -#define IDS_POPUP_PRIORITY 62492 -#define IDS_POPUP_LOWEST 62493 -#define IDS_POPUP_LOW 62494 -#define IDS_POPUP_NORMAL 62495 -#define IDS_POPUP_HIGH 62496 -#define IDS_POPUP_HIGHEST 62497 -#define IDS_MSGSTODOWNLOAD 62498 -#define IDS_PROGRESS 62499 -#define IDS_SET_PERSONALTOOLBAR 62500 -#define IDS_TURNOFF_PERSONALTOOLBAR 62501 -#define ID_COMPOSE_MESSAGE_TOOLBAR 62502 -#define ID_ADDRESS_BOOK_TOOLBAR 62503 -#define ID_MESSENGER_INFOBAR 62505 -#define ID_MESSENGER 62513 -#define ID_BROWSER 62514 -#define ID_MESSAGES 62515 -#define ID_FOLDERS 62516 -#define ID_ADDRESS_BOOK 62517 -#define IDS_MENU_HIDECATEGORIES 62519 -#define IDS_MENU_SHOWCATEGORIES 62520 -#define IDS_MENU_HIDEMESSAGE 62521 -#define IDS_MENU_SHOWMESSAGE 62522 -#define IDS_CALENDAR_MENU 62527 -#define IDS_HORIZONTAL 62528 -#define IDS_VERTICAL 62529 -#define IDS_CALENDAR_REGISTRY 62530 -#define IDS_INSTALL_DIRECTORY 62531 -#define ID_WINDOW_IBMHOSTONDEMAND 62532 -#define IDS_3270_REGISTRY 62533 -#define IDS_IBMHOSTONDEMAND_MENU 62534 -#define ID_VIEW_INCREASEFONT 62537 -#define ID_VIEW_DECREASEFONT 62538 -#define IDS_CURRENTVERSION 62539 -#define IDS_NSCPINI 62540 -#define IDS_CALENDAR32EXE 62541 -#define IDS_CALENDAR16EXE 62542 -#define IDS_POPUP_COPY 62543 -#define IDS_STATUS_MOVEMESSAGE 62543 -#define IDS_3270HTML 62544 -#define IDS_IBMHOSTONDEMAND 62545 -#define IDS_CALENDAR 62546 -#define IDS_3270 62547 -#define IDS_CANT3270 62548 -#define IDS_CANTCALENDAR 62549 -#define IDS_NETHELP_REGISTRY 62550 -#define IDS_NETHELP_DIRECTORY 62552 -#define IDS_COPYRIGHT 62553 -#define IDS_NETSCAPE_REGISTRY 62554 -#define IDS_YOUHAVENEWMAIL 62555 -#define IDS_FOLDERPROPS 62556 -#define IDS_STATUS_COPYMESSAGE 62556 -#define IDS_NEWSGROUPPROPS 62557 -#define IDS_STATUS_MOVEFOLDER 62557 -#define IDS_MAILHOSTPROPS 62558 -#define IDS_NEWSHOSTPROPS 62559 -#define IDS_FOLDERCOUNTS 62560 -#define IDS_FOLDERUNKNOWNCOUNTS 62561 -#define IDS_OPEN_STRING 62562 -#define IDS_CREATIONFAILED 62563 -#define IDS_WHYCREATIONFAILED 62564 -#define IDS_NOPRINTERFONT 62565 -#define IDS_NOPAGETOPRINT 62566 -#define IDS_NOPRINTJOB 62567 -#define IDS_FORMATTING 62568 -#define IDS_MAILSOUND 62569 -#define IDS_POPUP_MARKTHREADREAD 62570 -#define IDS_POPUP_MARKALLREAD 62571 -#define IDS_POPUP_CATCHUP 62572 -#define IDS_MAILSOUND16 62573 -#define IDS_CONFERENCE_REGISTRY 62574 -#define IDS_CONFERENCE 62575 -#define IDS_PATHNAME 62576 -#define IDS_SIZE 62577 -#define IDS_MENU_GETNEXT 62578 -#define IDS_ALTMAIL_MISSING_DLL 62579 -#define IDS_ALTMAIL_OLD_DLL 62580 -#define IDS_ALTMAIL_MISSING_FUNCTIONS 62581 -#define IDS_ALTMAIL_REGISTER_FAILED 62582 -#define IDS_UNKNOWN_DOCTYPE 62583 -#define IDS_SAVE_VIEWER 62584 -#define IDS_UNKNOWN_TIMELEFT 62585 -#define IDS_NO_OPEN_WRITE 62586 -#define IDS_CANT_WRITE 62587 -#define IDS_CANT_CLOSE 62588 -#define IDS_CANT_CLEANUP 62589 -#define IDS_FOLDERPROP 62590 -#define IDS_NEWSGROUPPROP 62591 -#define IDS_MAILSERVERPROP 62592 -#define IDS_NEWSHOSTPROP 62593 -#define IDS_CATEGORYPROP 62594 -#define IDS_SEARCHMESSAGES 62595 -#define IDS_SEARCHLDAP 62596 -#define IDS_MENU_ALL 62597 -#define IDS_MENU_ALLMESSAGES 62598 -#define IDS_MENU_ALLCATEGORIES 62599 -#define IDS_POPUP_FOLDERPROP 62600 -#define IDS_POPUP_MAILSERVERPROP 62601 -#define IDS_POPUP_NEWSHOSTPROP 62602 -#define IDS_POPUP_NEWSGROUPPROP 62603 -#define IDS_POPUP_SETTOTOOLBAR 62604 -#define IDS_POPUP_UNSETTOOLBAR 62605 -#define IDS_POPUP_SAVEAS 62606 -#define IDS_POPUP_LOADFRAMENEWWINDOW 62607 -#define IDS_POPUP_SENDPAGE 62608 -#define IDS_POPUP_RELOADFRAME 62609 -#define IDS_POPUP_RELOAD 62610 -#define IDS_POPUP_SHOWIMAGE 62611 -#define IDS_POPUP_STOP 62612 -#define IDS_QUICKFILE_FILEBOOKMARK 62613 -#define IDS_CANTPRINT_LOGIN 62614 -#define IDS_POPUP_CATEGORYPROP 62615 -#define IDS_SHOWHIDECOLUMNS 62616 -#define IDS_EMPTYINGTRASH 62617 -#define IDS_POPUP_ATTACHMENTPROP 62618 -#define IDS_ATTACHMENTPROP 62619 -#define IDS_TITLE_COMPOSE_PAGE 62620 -#define IDS_POPUP_LOADLINKNAVIGATOR 62621 -#define IDS_MENU_NEWFOLDER 62622 -#define IDS_MENU_NEWCATEGORY 62623 -#define IDS_POPUP_NEXTMESSAGE 62624 -#define IDS_POPUP_NEXTUNREADMSG 62625 -#define IDS_POPUP_NEXTFLAGGEDMSG 62626 -#define IDS_POPUP_NEXTUNREADTHREAD 62627 -#define IDS_POPUP_NEXTFOLDER 62630 -#define IDS_POPUP_NEXTGROUP 62631 -#define IDS_POPUP_NEXTUNREADFOLDER 62632 -#define IDS_POPUP_MARKASREAD 62634 -#define IDS_POPUP_MARKASUNREAD 62635 -#define IDS_POPUP_MARKFORLATER 62638 -#define IDS_MAIN 62639 -#define ID_EDIT_WITHFRAME_FINDINCURRENT 62640 -#define IDS_FINDINPAGE 62641 -#define IDS_FINDINFRAME 62642 -#define IDS_BROWSER_STOP_TIP 62643 -#define IDS_MENU_NEWNEWSGROUP 62644 -#define IDS_POPUP_OPENSELECTION 62647 -#define IDS_POPUP_OPENMESSAGEREUSEWINDOW 62648 -#define IDS_MENU_IGNORETHREAD 62648 -#define IDS_MENU_IGNORECATEGORY 62649 -#define IDS_MENU_NEXTFOLDER 62651 -#define IDS_MENU_NEXTNEWSGROUP 62652 -#define IDS_MENU_NEXTUNREADFOLDER 62653 -#define IDS_MENU_NEXTUNREADNEWSGROUP 62654 -#define IDS_NOATTACHMENTS 62655 -#define IDS_MENU_COMPRESSFOLDERS 62656 -#define IDS_MENU_COMPRESSFOLDER 62657 -#define IDC_FIRST_PLACES_MENU_ID 65000 -#define ID_COMMAND_PAGE_FROM_WIZARD 65197 -#define ID_COMMAND_HELPINDEX 65198 -#define IDS_COMMAND_HELPINDEX 65198 -#define ID_COMMAND_ABOUT 65199 -#define IDS_COMMAND_ABOUT 65199 -#define IDC_FIRST_HELP_MENU_ID 65200 -#define IDURL_COMMAND_ABOUT 65399 -#define IDS_BROWSETO_CAPTION 65400 -#define IDS_SELECT_BROWSETO_CAPTION 65401 -#define IDS_NEW_PAGE_TEMPLATE 65402 -#define IDS_EDITING_TEMPLATE 65403 -#define IDS_EXAMPLEHOSTNAME 65404 -#define IDS_DOWNLOADINGARTICLES 65406 -#define IDS_PUBLISH_CAPTION 65407 -#define IDS_PUBLISH_PAGE 65408 -#define IDS_ENTER_PUBLISH_FILENAME 65409 -#define IDS_TASKBAR_NEWS_HTEXT 65410 -#define IDS_TASKBAR_NEWS_VTEXT 65411 -#define IDS_TASKBAR_FLOAT_NAVTIP 65412 -#define IDS_TASKBAR_FLOAT_MAILTIP 65413 -#define IDS_TASKBAR_FLOAT_NEWSTIP 65414 -#define IDS_TASKBAR_FLOAT_COMPOSETIP 65415 -#define IDS_TASKBAR_ONTOP 65416 -#define IDS_TASKBAR_SHOWTEXT 65417 -#define IDS_TASKBAR_HIDETEXT 65418 -#define IDS_BOOKMARK_LASTVISITED 65419 -#define IDS_HELPCONTENTS 65420 -#define IDS_ABOUTNETSCAPE 65421 -#define IDS_ABOUTCOMMUNICATOR 65421 -#define ID_PRINT_PAGE 65422 -#define ID_PRINT_FRAME_NOSELECTION 65423 -#define ID_PRINT_FRAME_SELECTED 65424 -#define IDS_FILESAVEFAILED 65425 -#define IDS_POPUP_OPENATTACHMENT 65426 -#define IDS_STRING_FILE 65427 -#define IDS_SHOW_MESSAGE_TOOLBAR 65428 -#define IDS_HIDE_MESSAGE_TOOLBAR 65429 -#define IDS_SHOW_ADDRESS_AREA 65430 -#define IDS_HIDE_ADDRESS_AREA 65431 -#define IDS_CANT_LOAD_PREFS 65432 -#define IDS_HIDE_ABTOOLBAR 65433 -#define IDS_SHOW_ABTOOLBAR 65434 -#define IDS_AB_NEW_LIST 65435 -#define IDS_AB_PROPERTIES 65436 -#define IDS_AB_NEW_USER 65437 -#define IDS_STATUS_OFFLINE 65438 -#define IDS_MSGTOBIG 65439 -#define IDS_PTS 65440 -#define IDS_DEFAULT_NOCOLOR 65441 -#define IDS_CHOOSE_TEXT_COLOR 65442 -#define IDS_CHOOSE_LINK_COLOR 65443 -#define IDS_CHOOSE_ACTIVELINK_COLOR 65444 -#define IDS_CHOOSE_FOLLOWED_LINK_COLOR 65445 -#define IDS_CHOOSE_BACKGROUND_COLOR 65446 -#define IDS_DEFAULT_VARIABLE 65447 -#define IDS_DEFAULT_FIXED_WIDTH 65448 -#define IDS_XP_FONT 65449 -#define IDS_TRUE_TYPE 65450 -#define IDS_VECTOR_FONT 65450 -#define IDS_DYNAMIC_FONT 65450 -#define IDS_LOCAL_FONT 65451 -#define IDS_DEFAULT_SHORT 65452 -#define IDS_ADVANCED_FONTSIZE_MSG 65453 -#define IDS_SHOW_PARA_MARKS 65454 -#define IDS_HIDE_PARA_MARKS 65455 -#define IDS_SHOW_TABLE_BORDERS 65456 -#define IDS_HIDE_TABLE_BORDERS 65457 -#define ID_COMPOSER 65458 -#define IDS_NETCASTER_MENU 65460 -#define IDS_OPENING_FILE 65463 -#define IDS_ASK_HANDLEBYOLE 65464 -#define IDS_UNDO 65470 -#define IDS_REDO 65471 -#define IDS_COLOR_TIP_FORMAT 65472 -#define IDS_COLOR_TIP_RGB 65472 -#define IDS_COLOR_TIP_HTML 65473 -#define IDS_PKCS12_FILTER 65474 -#define IDS_UNTITLED_FOLDER 65476 -#define IDS_MULTIPLE_FONTS 65477 -#define IDS_NEW_DOC_BLANK 65490 -#define IDS_NEW_DOC_FROM_TEMPLATE 65491 -#define IDS_NEW_DOC_FROM_WIZARD 65492 -#define IDS_FILE_OPEN 65496 -#define IDS_FILE_OPENURL 65497 -#define IDS_EDIT_FINDINCURRENT 65498 -#define IDS_EDIT_FINDAGAIN 65499 -#define IDC_EMAIL_TEXT 65500 -#define IDS_EDIT_REPLACE 65500 -#define IDS_ADVSEARCH 65501 -#define IDS_BASICSEARCH 65502 -#define ID_FILE_NEW_NAVCENTER 65503 -#define IDS_SEARCH_PROMPT 65503 -#define ID_VIEW_NAV_CENTER 65504 -#define IDS_ADRSEARCH 65504 -#define IDM_SAVEASTEMPLATE 65504 -#define IDS_ADVSEARCH_TITLE 65505 -#define IDS_BASICSEARCH_TITLE 65506 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 1568 -#define _APS_NEXT_COMMAND_VALUE 42549 -#define _APS_NEXT_CONTROL_VALUE 1564 -#define _APS_NEXT_SYMED_VALUE 118 -#endif -#endif diff --git a/l10nkits/client/windows/docs/nav40/returnKit.html b/l10nkits/client/windows/docs/nav40/returnKit.html deleted file mode 100644 index bdda2ede2e0..00000000000 --- a/l10nkits/client/windows/docs/nav40/returnKit.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - Returning the Kit - - - -

    -6. Returning the Finished Kit

    - -

    Once you are satisfied with the quality of your localization efforts, -you are required by the terms of the Unlimited Localization Program -license to make your localized product publicly available. The exact details of -how you do this is up to you, the most commonly acceptable method is to post -your localized product to a publicly accessible ftp site. -

    -You should post just the localized versions of the files mentioned in the Localize These -Files section of this document. For ease of transfer, you may create a compressed archive -in the .ZIP file format that contains the localized files. Create one .ZIP file for each -language/platform you do. If you are publishing more than one language or platform, you -may combine multiple .ZIP files into one master .ZIP file if this makes your life easier. -

    -If your localized product includes your own trademarks, you should identify these and any -restrictions you are placing on their use. You must also include a copy of the End User -License Agreement (EULA), as well as a notice stating that Netscape Communications -is not required to support your product, and that you are the Licensor referred to in the EULA. -Please refer to the Universal Localization Agreement for the exact legal requirements. -

    -Once your localized product is publicly available, you may inform the world in any manner you -choose, but we encourage you to also post the download location to the mozilla.org -Announcements newsgroup (netscape.public.mozilla.announce). -

    - -

    Congratulations! You are done!
    - -
    -
    - - - - - -
    -
    [BACK]
    -
    -
    [CONTENTS]
    -
    - -

    -

    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    - -
    - - - diff --git a/l10nkits/client/windows/docs/nav40/splash.html b/l10nkits/client/windows/docs/nav40/splash.html deleted file mode 100644 index dc57a775544..00000000000 --- a/l10nkits/client/windows/docs/nav40/splash.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - Title Page - - - -
    -

    -NETSCAPE COMMUNICATOR

    - -
    - -
    -

    -Localization Kit

    - -
    -

    -for Microsoft® Windows (32-bit version)

    - -
    -

    -Revision 1.2

    - -
    Copyright © 1994-1998 Netscape® Communications Corporation, -All rights reserved.
    -  -
      -
    - - - - - -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    - - - diff --git a/l10nkits/client/windows/docs/nav40/testKit.html b/l10nkits/client/windows/docs/nav40/testKit.html deleted file mode 100644 index 68b8f6111b5..00000000000 --- a/l10nkits/client/windows/docs/nav40/testKit.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Testing the Localized Resources - - - -

    -4. Ensuring Quality

    -The quality of your localized version will have a large impact on its acceptance -in the marketplace.  You can greatly enhance your chances of producing -a quality product by using experienced and skilled localizers, and by performing -post-translation testing. - -

    When performing the actual translation, you should be sensitive to a -number of issues: -

      -
    • -Completeness: you should aim for as thorough a translation as possible.  -Try not to leave portions of the product untranslated. However, be aware -that some terms may best be left in English, depending on local conventions.
    • - -
    • -Suitability: all translations should be suitable and appropriate for product, -the language, the market and the customers you intend to reach.  This -includes using the proper technical terminology for a give platform or -computer operation, as well as using language that is readily understood -by the average user of the product in a given language.  You should, -where possible, try to use terminology which is similar to other products -available on the same platform (without violating copyrights or trademarks, -of course).
    • - -
    • -Accuracy: you should be sure your translation conveys the same meaning -and intention as the original English.
    • - -
    • -Grammar and spelling: you should be sure your translation is grammatically -accurate and free from spelling errors.
    • -
    -Keep in mind that engineers do not necessarily make the best localizers! - -

    Once localization is complete, there are two basic types of post-translation -testing that should be done: -
      - - - - - - - - - - - - -
    Linguistic ReviewChecking all translations for accuracy and appropriateness in the actual -context in which they appear.
    Functional TestingEnsuring the product still functions as designed (or at least as well -as the US English product).
    - - -

    For the linguistic review, you should have an independent reviewer (i.e. -not the person who implemented the translations) check every string for -the items listed above.  In some cases, it may be enough to review -the running product itself; however, it is also valuable to print out your -translations (using ToolCool or your own translation tools) and review -them externally from the product. - -

    For the functional testing, your best resource are the directions contained -in the localization notes and this document. You should review the completed -product's localization notes with this document in hand, double checking -that you have followed all the instructions contained here and in the appropriate -.DOG file's COMMENT field. - -

    Consider the following general guidelines when testing: -

      -
    • -It is helpful to have a second copy of the product running with the English -version so you can compare them side by side (a second computer might be -helpful or required for this).
    • - -
    • -Walk through every menu in each module you have localized looking for translation -accuracy, pick letter conflicts and other problems.
    • - -
    • -Bring up as many dialogs as you can, looking for translation accuracy, -pick letter conflicts, truncated strings and functionality issues.
    • - -
    • -Use as many of the features of the product as possible: read web pages, -read and send mail and discussion group messages, set mail filters, search -mail and discussion groups, create web pages using the Composer, etc. If -functional problems are found, you should compare the same steps you took -in the localized product to the English product: if the two products fail -in the same way, it is a "core" bug, which can only be fixed by changing -the core product's executable. If the localized product fails while the -English product does not, then it is probably a translation-related bug; -these can be fixed by altering the way you localize the product (perhaps -by not translating a particular item, or by translating it differently).
    • -
    -The following section tells you how to report bugs in the localization -kit itself, or in the core product. -
      -
    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/toc.html b/l10nkits/client/windows/docs/nav40/toc.html deleted file mode 100644 index 9c8e6ca4024..00000000000 --- a/l10nkits/client/windows/docs/nav40/toc.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - Table of Contents - - - -

    -Table of Contents

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    i. Title Page
    -
    1. Project Overview  - -
    2. Getting Started  -
    3. Using the Kit  -
    4. Ensuring Quality -
    5. Troubleshooting  -
    6. Returning the Finished Kit  -
     
    7. References 
    - -
     
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/troubleshooting.html b/l10nkits/client/windows/docs/nav40/troubleshooting.html deleted file mode 100644 index 16c1d28d42f..00000000000 --- a/l10nkits/client/windows/docs/nav40/troubleshooting.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - Troubleshooting - - - -

    -5. Troubleshooting

    -This section discusses tools and tips for diagnosing, correcting or avoiding -problems encountered using this localization kit. -

    -Using the idBuild

    -A special build of the US English product is provided with this kit, called -the idBuild.  This version of the product is designed to help you -locate where specific strings are coming from within the resources.  -It does this by prepending to the resource string (putting in front) a -token representing the resource ID.  The token will be in the following -form: -
      -
    • -an initial letter, either M, D or S, which stands for MENU, DIALOG or STRINGTABLE.  -(RCDATA is ignored.)
    • - -
    • -the resource's numeric id
    • - -
    • -for Menus and Dialogs, a dash followed by the Item number
    • - - -

      Example: D2298-3 = DIALOG2298Item3

    -This knowledge can help expand upon the information provided in the localization -notes by giving you the actual context in which a specific string appears.  -It can also help you locate problematic issues, such as STRINGTABLE resources -being used in menus, concatenated strings, etc. - -

    NOTE: the idBuild is provided "AS IS" with no guarantees as to functionality, -stability or fitness for any purpose.  It may crash, or some features -may not work due to the unexpected way in which the resources have been -modified.  Use it at your own risk. - -

    To use the idBuild: -
      -

      -
    • -Install the current version of Communicator (4.03 as of this writing)
    • - -
    • -Make backup copies of the 8 resource binaries listed in the -table above.  Store these copies somewhere safe.
    • - -
    • -Copy the 8 resource binaries provided in the kitRoot\products\client\windows\32bit\en\nav40\program\idBuild -directory to the installed version's Program directory -(replacing the originals).
    • - -
    • -Start the program as usual.
    • -
    -What you will see will be the modified Communicator, with resource IDs -visible next to the actual English strings.  In some cases, you might -not be able to see the entire string because of the increased string length.  -If absolutely necessary, you can modify the idBuild's binaries using MSDEV -to produce a more useful version, or you may simply inspect the strings -you can't fully see at runtime. - -

    idBuild Main Menu -
    - -

    In the image above, you can see the Communicator's main menu and the -toolbar buttons displayed with attached resource IDs. Note how most of -the menu items begin with "M", telling you they are standard menu resources.  -However, a few begin "S", indicating they come from the STRINGTABLE resources.  -These require special attention when assigning pickletters. - -

    If you see a string in the product itself (not a web page being displayed) -that does not have a resource ID attached, there are 4 possibilities as -it's origin: - -

    1. It is part of a multipart string.  For example, the toolbar -buttons are made up of strings with 3 components, each separated by newline -characters (\n ).  The first part is the status bar message; -this will have the resource ID.  The second and third components are -the ToolTip (pop-up help message) and the button label itself.  These -won't show the resource ID because it is prepended to the first part. - -

    2. The string comes from an RCDATA resource.  For example, the -Help menu contains a number of entries that come from CONFIG_PREFS.  -These are not touched by the idBuild generation process. - -

    3. The string comes from an external source.  For example, the -idBuild doesn't contain the MFC resources, so any strings coming from MFC42.dll -will be in there original form. - -

    4. The string is hard coded in the Netscape binary.  There are -still several strings that have not been resourced (for example, the Java -Console is entirely hard coded).  You will not be able to localize -these for this version. -
      -
      -

    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
     
    -1998, Copyright Netscape Communications -Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/usingKit.html b/l10nkits/client/windows/docs/nav40/usingKit.html deleted file mode 100644 index 863d38a5b47..00000000000 --- a/l10nkits/client/windows/docs/nav40/usingKit.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - Using the Kit - - - -
     
    -  - - - - -
    -
    WARNING! Protect yourself from data loss -by making regular backups of your work.
    -
    - -

    -3. Using the Kit

    -Once your copy of the Windows Front End Localization Kit is correctly installed, -you may begin your localization work by following the instructions in the -remainder of this document. The next section discusses the contents of -the localization notes provided with this kit.  It is important that -you work properly with the instructions contained in these files or the -localized product you create may not function. -

    -Understanding the Localization Notes

    -Each binary file to be localized has an associated localization notes file, -called a "DOG" file.  These files are created by the Netscape translation -tool, ToolCool. For a complete description of the process used to create -these files, please consult the Netscape Translation Tool User's Guide -that comes with those tools. It is very important that you work properly -with these localization notes, as they contain the bulk of the instructions -for this project. Most importantly, the .DOG files identify the "forbidden" -resources - those resources that you must not change. - -

    Each DOG file associated with a. dll or .exe has the same name as the -binary file, but will have the extension .DOG. -

      E.g. RESDLL.DLL has an associated RESDLL.DOG
    -The .DOG file lists certain information about each resource contained in -the associated binary file; : -
    Field Name      Purpose
    -FILENAME        Not used.
    -IDENTIFIER      Resource ID.
    -US_STR          Original English string.
    -XL_STR          Target translated string.
    -COMMENT         Localization notes for translator.
    -REASON          Explanation of leveraging results.
    -TRANSLATE       Resource is forbidden from translation if this is "FALSE"
    -Resource IDs are made up of a combination of the resource type and a unique -identifier, depending on the type of resource.  See the individual -sections dealing with each resource type for a description of how resources -are identified. You must not change the contents of this field. - -

    The original English string is what you need to translate; however, -your translation must go in the XL_STR field. It is not useful to change -the contents of the US_STR field. - -

    Your translation will be done in the XL_STR field. If there is no leveraged -translation from a prior version, this string will originally match the -US_STR value. - -

    If a resource requires some extra explanation, this can be found in -the COMMENT field. - -

    The REASON field indicates the results of the leveraging process which -created the database, which in turn was used to generate the .DOG file. -Unless you are using the Netscape translation tools, this field is not -useful to you. - -

    The TRANSLATE field dictates whether or not you can change the value -of the XL_STR field. If this field is blank, the resource is OK to translate; -if the value is "FALSE", you must not translate it. (When viewed through -ToolCool, this field appears as a check box. When checked, you may translate -this resource; when unchecked, you may not.) - -

    The next section presents the basic localization process as a checklist. -

    -
    - -

    -Localization Checklist

    -The basic localization process is this: - -

    1. Create your working directories -
    Copy the English directory (kitRoot\products\client\windows\platform\en) -to a new directory at the same level.  Be sure to use the appropriate -naming convention for your new directory.  This is the ISO 639:1988 -standard (Code for the representation of names of languages).  -A sub-set of these codes can be found in the accompanying table.  -You can go here -for a complete listing of the standard. - -

    2. Identify files to localize -
    Consult the Localize These -Files page to learn which binary files contain localizable resources. - -

    For each file to be localized, follow these steps using the tool of -your choice, being careful to follow all instructions contained in the -Localization Notes for that resource.: -

      -
    • -Localize the STRINGTABLE resources
    • - -
    • -Localize the MENU resources
    • - -
    • -Localize the DIALOG resources
    • - -
    • -Localize the Javascript preferences stored in DATA resources (RESDLL.DLL -only)
    • - -
    • -Localize the remaining DATA resources (RESDLL.DLL only)
    • -
    -3. Localize external files -
    In addition to the binary resource modules requiring localization, -there are a number of external files which may need to be localized1: -these are listed in the Localize -These Files page. Further instructions can be found there. - -

    4. Complete post-translation processing -
    After translation is complete, you need to test your work and deal -with any problems: -

      -
    • -Test the localized product.
    • - -
    • -Fix translation bugs using your localization tools or a resource editor.
    • - -
    • -Fix dialog size bugs using your localization tools or a resource editor.
    • - -
    • -Report core bugs to Netscape.
    • -
    -5. Return kits (optional) -
    Finally, you may be required to deliver files back to Netscape: -
      -
    • -Return the necessary files to Netscape (if required).
    • - -
    • -Inform us that the localized files have been returned (if required).
    • -
    - -
    -

    -Product Branding Issues

    -If you are using this kit under the auspices of the Unlimited Localization -Program, you must remove or replace Netscape trademarked strings, images -and icons in your localized version. Click here -for instructions. - -

    -


    -

    -How to Localize Different Resource Types

    -This section provides you with general information about localizing the -various resource types and files found with this kit.  (Remember, -specific localization notes for binary resources is found in the associated -.DOG file.) -

    -Localizing URLs

    - -
      Many resources of all types in the Communicator contain Internet addresses -in the form of URLs (Universal Resource Locators). Because many of these -URLs originally point to locations within the Netscape domain, how they -are localized depends on whether you are creating a branded Netscape version -or not.  The rules for how to handle URLs are found here.
    - -

    -Localizing String Tables

    - -
      STRINGTABLE resources are the most sensitive, potentially problematic -resource type you will be working with. Therefore, you must pay close attention -to the instructions provided in the localization notes. -

      -Localization Notes

      -String table resources are identified by the word STRINGTABLE, followed -by the numeric resource ID generated from the project's header files.  -For example, in the file BRPREF32.DLL, STRINGTABLE109 contains the label -and explanatory text for the Languages pane of the preference dialog.  -Localization notes for string table resources are provided in the comments -field for each resource contained in the associated .DOG file. Please pay -special attention to these notes and to the TRANSLATE field. In general, -be aware of the following: -
        -
        -
      • -Many strings contain C++ print format strings, such as %s, %ld, %lu, etc.  -Do not modify these while translating the rest of the string.
      • - -
      • -Many strings contain new line characters: \n.  In general, you should -try leave these as you find them.  In some cases, the new line is -used to delimit a matched set of strings used to build a button label, -a ToolTip and a status bar message all relating to single control. In these -cases, you must preserve the new line characters.
      • - -
      • -Many strings actually show up as part of an HTML or Javascript document -or dialog.  Be careful not to break format tags, like <TITLE>, -<FONT>, etc. by translating these.
      • -
      -
    - -

    -Localizing Menus

    - -
      Menu translation is usually not as tricky as localizing string tables; -however, you should take care to assign unique pickletters to menu choices.  -This process can be made difficult by the fact that some strings that appear -in menus at runtime actually come from string tables.  The special -ID Build provided in this kit can help you find these. -

      -Localization Notes

      -Menu resources are identified first by the word MENU, then by a resource -number, then by a sequential Item number. For example, in RESDLL.DLL, MENU2ITEM0 -contains the word "&File". This resource is the first item in menu -structure structure #2 (the File menu).  The ampersand character (&) -denotes the pickletter is the letter "F".  Localization notes for -individual MENU resource items are provided in the comments field for that -item in the localization databases. Not all MENU resource items need to -be translated so again, please pay special attention to these notes and -to the TRANSLATE field!
    - -

    -Localizing Dialogs

    - -
      Dialog translation is usually not as tricky as localizing string tables; -however, you should take care to assign unique pickletters to dialog controls.  -This process can be made difficult by the fact that some strings that appear -in menus and dialogs at runtime actually come from string tables.  -The special ID Build provided in this kit can help you find these. Once -a DIALOG resource has been translated, the dialog may need to be resized -using a visual resource editor, such as MSDEV (Microsoft® -Visual C++ 4.0 or greater) or Borland® -Resource Workshop. -

      -Localization Notes

      -Dialog resources are identified first by the word DIALOG , then by a resource -number, then by a sequential Item number. For example, in NSMAILUI.DLL, -DIALOG129Item0 contains the word "Password". This resource is the first -item (the dialog title) in DIALOG129. Localization notes for individual -DIALOG resource items are provided in the comments field for that item -in the localization databases. Not all DIALOG resource items need to be -translated so again, please pay special attention to these notes and to -the TRANSLATE field!
    - -
      A special note on Dialog fonts: -
      The second item in each dialog definition (e.g. DIALOGnnnITEM1) is -the font information for that dialog.  If you find it necessary to -change the font name or size, be aware of the following fact: the font -size is represented in the translation database by the ASCII character -corresponding to that size.  In the US product the default font size -is 9, which appears as a Horizontal Tab (Font size = 9 = ASCII character -9 = tab).  In the database, this will appear as an unprintable character, -such as a black box.  There are two concerns here: first, if you change -the font name, be careful not to accidentally delete the tab character.  -Second, if you decide to change the font size, you can do so by substituting -the appropriate ASCII character which matches the new size you want.  -For example, to change the font size to 10, replace the tab with a Line -Feed character (ASCII 10).  This is rather confusing, so it is probably -best to avoid changing the fonts if possible.
    - -

    -Localizing Javascript Preferences

    - -
      Javascript is used to define default preference information for the -Communicator and it's components.  These preferences end up stored -in the DATA section of RESDLL.DLL. You can use the ToolCool to edit these -just as you would STRINGTABLE resources, or use your preferred localization -tools. - -

      There are two groups of localizable Javascript preferences: ALL_PREFS -and CONFIG_PREFS.  Most of these preference settings are not localizable; -these are marked as forbidden in the localization notes.  Those that -are localizable should be treated very carefully, as Javascript is rather -particular about the format of the data it receives.  Pay special -attention not to unbalance quotes, delete the preceding tab characters, -etc.

    - -
      -

      -Localization Notes for ALL_PREFS

      -The entries in the ALL_PREFS section contain the default values for certain -cross-platform preferences, including some crucial for the correct operation -of localized versions.  The rules for how to handle this section are -found here. -

      -Localization Notes for CONFIG_PREFS

      -The entries in the CONFIG_PREFS section make up the configurable Toolbar -and Help menu items and their functions.  How they are localized depends -on whether you are creating a branded Netscape version or not.  The -rules for how to handle this section are found here.
    - -

    -Localizing DATA

    - -
      There are several additional resources stored as DATA that cannot be -edited using ToolCool.  Therefore, you must use a resource editor -and a text editor to localize these by following this procedure.  -(This example uses Microsoft® MSDEV; -if you prefer a different resource editor you may need to execute slightly -different steps).
    - -
      -
        -
      • -Open the file containing the DATA resources (usually RESDLL.DLL)
      • - -
      • -Expand the DATA resource type.
      • - -
      • -Select the resource you want to localize
      • - -
      • -Choose Edit | Select All.
      • - -
      • -Choose Edit | Copy.
      • - -
      • -Open a text editor window by clicking on the new document icon (or if you -prefer, you may use any other text editor).
      • - -
      • -Choose Edit | Paste.
      • - -
      • -You should now have the text representation of the DATA resource in your -text editor window. You may localize it according to the instructions in -the Localization Notes section for each DATA resource.
      • - -
      • -When done, save your work, then select ALL the text (use Edit | Select -All if your editor supports this).
      • - -
      • -Choose Edit | Copy.
      • - -
      • -Go back to the RESDLL.DLL in MSDEV and select the DATA resource you have -translated.
      • - -
      • -Choose Edit | Select All.
      • - -
      • -Choose Edit | Paste.
      • - -
      • -You should now see the original English DATA resource replaced by your -translated version.
      • - -
      • -IMPORTANT: Go to the end of -the resource and insert a NULL value by typing the number zero (0) in the -first empty byte position.
      • - -
      • -Close the resource and save your work.
      • -
      -
    - - - -

    -Localizing External Files

    - -
      As mentioned above, you may choose (or be required) to translate several -external files.  If this is the case, the links contained in the text -file section of Localize These -Files will tell you what to do. (Note: this may be nothing at all).
    - -

    -Localizing the NULL Plugin

    - -
      The so-called "NULL" plugin is the default plugin that ships with all -versions of the Communicator.  It's job is to list the plugins that -you have installed, and if you don't have a requested plugin, to help you -get it. - -

      The name and location of the NULL plugin is given in the Localize -These Files binary file section. Localization notes have been provided -for you to use when localizing the resources for this file.  Instructions -for individual resources can be found in the COMMENT field of the matching -.DOG file. - -

      -


    - -

    -Notes

    - -
      1. Whether or not you have to incorporate or create -localized version of these files depends on your agreement with Netscape, -if any; or if localization is occurring as part of the Universal Localization -Program, upon your desire to perform this work.[BACK]
    -  -
    - - - - - - - -
    -
    [BACK]
    -
    -
    [NEXT]
    -
    -
    [CONTENTS]
    -
    - -
    - -
    1998, Copyright Netscape -Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/windows/docs/nav40/winfekit.jpg b/l10nkits/client/windows/docs/nav40/winfekit.jpg deleted file mode 100644 index 099ecfed626..00000000000 Binary files a/l10nkits/client/windows/docs/nav40/winfekit.jpg and /dev/null differ diff --git a/l10nkits/client/windows/docs/nav40/xpencui.htm b/l10nkits/client/windows/docs/nav40/xpencui.htm deleted file mode 100644 index 7968fbb3a13..00000000000 --- a/l10nkits/client/windows/docs/nav40/xpencui.htm +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - Cross-Product Encoding UI Names - - - -
    -

    -Cross-Product Encoding UI Names

    - -
    Uppercase and lowercase are treated distinctly
    - -
     
    - - - - - - - - - - - - - - - - - -
    UNIXWindowsMacintosh
    Western (ISO-8859-1)  -
    Western (Windows-1252)  -
    Central European (ISO-8859-2)  -
    Central European (Windows-1250)  -
    Japanese (Auto-Detect)  -
    Japanese (Shift_JIS)  -
    Japanese (EUC-JP)  -
    Japanese (ISO-2022-JP)  -
    Traditional Chinese (Big5)  -
    Traditional Chinese (EUC-TW)  -
    Simplified Chinese (GB2312)  -
    Simplified Chinese (HZ)  -
    Korean (Auto-Detect)  -
    Korean (EUC-KR)  -
    Korean (ISO-2022-KR)  -
    Cyrillic (KOI8-R)  -
    Cyrillic (ISO-8859-5)  -
    Cyrillic (Windows-1251)  -
    Greek (ISO-8859-7)  -
    Greek (Windows-1253)  -
    Turkish (ISO-8859-9)  -
    Unicode (UTF-8)  -
    Unicode (UCS-2)  -
    Unicode (UTF-7)  -
    User-Defined  -
    Western (ISO-8859-1)  -
    Western (Windows-1252)  -
    Central European (ISO-8859-2)  -
    Central European (Windows-1250)  -
    Japanese (Auto-Detect)  -
    Japanese (Shift_JIS)  -
    Japanese (EUC-JP)  -
    Japanese (ISO-2022-JP)  -
    Traditional Chinese (Big5)  -
    Traditional Chinese (EUC-TW)  -
    Simplified Chinese (GB2312)  -
    Simplified Chinese (HZ)  -
    Korean (Auto-Detect)  -
    Korean (EUC-KR)  -
    Korean (ISO-2022-KR)  -
    Cyrillic (KOI8-R)  -
    Cyrillic (ISO-8859-5)  -
    Cyrillic (Windows-1251)  -
    Greek (ISO-8859-7)  -
    Greek (Windows-1253)  -
    Turkish (ISO-8859-9)  -
    Unicode (UTF-8)  -
    Unicode (UCS-2)  -
    Unicode (UTF-7)  -
    User-Defined  -
    Western (ISO-8859-1)  -
    Western (MacRoman)  -
    Western (Windows-1252)  -
    Central European (ISO-8859-2)  -
    Central European (Windows -1250)  -
    Central European (MacCE)  -
    Japanese (Auto-Detect)  -
    Japanese (Shift_JIS)  -
    Japanese (EUC-JP)  -
    Japanese (ISO-2022-JP)  -
    Traditional Chinese (Big5)  -
    Traditional Chinese (EUC-TW)  -
    Simplified Chinese (GB2312)  -
    Simplified Chinese (HZ)  -
    Korean (Auto-Detect)  -
    Korean (EUC-KR)  -
    Korean (ISO-2022-KR)  -
    Cyrillic (KOI8-R)  -
    Cyrillic (ISO-8859-5)  -
    Cyrillic (Windows-1251)  -
    Cyrillic (MacCyrillic)  -
    Greek (ISO-8859-7)  -
    Greek (Windows-1253)  -
    Greek (MacGreek)  -
    Turkish (ISO-8859-9)  -
    Turkish (MacTurkish)  -
    Unicode (UTF-8)  -
    Unicode (UCS-2)  -
    Unicode (UTF-7)  -
    User-Defined  -
    - -
    -
    -

    -Cross-Product Encoding Names to be Transmitted

    - -
    Uppercase and lowercase are not distinct
    - -
     
    - - - - - - - - - - - - - - - - - -
    UNIXWindowsMacintosh
    Western (ISO-8859-1)  -
    Central European (ISO-8859-2)  -
    Central European (Windows-1250)  -
    Japanese (Shift_JIS)  -
    Japanese (EUC-JP)  -
    Japanese (ISO-2022-JP)  -
    Traditional Chinese (Big5)  -
    Traditional Chinese (x-EUC-TW)  -
    Simplified Chinese (GB2312)  -
    Simplified Chinese (HZ-GB-2312)  -
    Korean (EUC-KR)  -
    Korean (ISO-2022-KR)  -
    Cyrillic (KOI8-R)  -
    Cyrillic (ISO-8859-5)  -
    Cyrillic (Windows-1251)  -
    Greek (ISO-8859-7)  -
    Greek (Windows-1253)  -
    Turkish (ISO-8859-9)  -
    Unicode (UTF-8)  -
    Unicode (ISO-10646-UCS-2)  -
    Unicode (UNICODE-1-1-UTF-7)  -
    Western (ISO-8859-1)  -
    Central European (ISO-8859-2)  -
    Central European (Windows-1250)  -
    Japanese (Shift_JIS)  -
    Japanese (EUC-JP)  -
    Japanese (ISO-2022-JP)  -
    Traditional Chinese (Big5)  -
    Traditional Chinese (x-EUC-TW)  -
    Simplified Chinese (GB2312)  -
    Simplified Chinese (HZ-GB-2312)  -
    Korean (EUC-KR)  -
    Korean (ISO-2022-KR)  -
    Cyrillic (KOI8-R)  -
    Cyrillic (ISO-8859-5)  -
    Cyrillic (Windows-1251)  -
    Greek (ISO-8859-7)  -
    Greek (Windows-1253)  -
    Turkish (ISO-8859-9)  -
    Unicode (UTF-8)  -
    Unicode (ISO-10646-UCS-2)  -
    Unicode (UNICODE-1-1-UTF-7)  -
    Western (ISO-8859-1)  -
    Western (x-MacRoman)  -
    Central European (ISO-8859-2)  -
    Central European (Windows-1250)  -
    Central European (x-MacCE)  -
    Japanese (Shift_JIS)  -
    Japanese (EUC-JP)  -
    Japanese (ISO-2022-JP)  -
    Traditional Chinese (Big5)  -
    Traditional Chinese (x-EUC-TW)  -
    Simplified Chinese (GB2312)  -
    Simplified Chinese (HZ-GB-2312)  -
    Korean (EUC-KR)  -
    Korean (ISO-2022-KR)  -
    Cyrillic (KOI8-R)  -
    Cyrillic (ISO-8859-5)  -
    Cyrillic (Windows-1251)  -
    Cyrillic (x-MacCyrillic)  -
    Greek (ISO-8859-7)  -
    Greek (Windows-1253)  -
    Greek (x-MacGreek)  -
    Turkish (ISO-8859-9)  -
    Turkish (x-MacTurkish)  -
    Unicode (UTF-8)  -
    Unicode (ISO-10646-UCS-2)  -
    Unicode (UNICODE-1-1-UTF-7)  -
    -  -
     1998, Copyright -Netscape Communications Corp. All Rights Reserved
    -  - - diff --git a/l10nkits/client/xp/docs/mozilla.org/kitDownload.html b/l10nkits/client/xp/docs/mozilla.org/kitDownload.html deleted file mode 100644 index 6dee6ba1700..00000000000 --- a/l10nkits/client/xp/docs/mozilla.org/kitDownload.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - Download L10n Kits - - -Download Your Localization Kit - -

    Make your selections from the links below. If the Localization kit for -the product or operating system you need is not shown list, we aren't supporting -freely downloadable localization kits for that product or platform (yet). -Kits have been broken into separate components for faster downloads. - -

    Before downloading any localization kit, please read the License -Agreement! By downloading and using any of the information, -software or tools linked from this page, you affirm that you have read -this Agreement and agree to abide by the terms and conditions contained -therein. -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Windows (NT)
    Description
    win32Kit.zip32 bit Localization Notes - version 4.03. Contains translation databases -in binary (.dbf) and text (.dog) format.
    winDocs.zipWindows Localization Kit Documentation. Contains .HTML documentation -(identical to the on-line -version).
    nstools.exeWindows Translation Tools. A self-extracting installer for ToolCool -and DogLev. Includes documentation.
    win32Bits.zip32 bit English export binaries - version 4.03. Contains the localizable -resources matching the most recent localization notes.
    Installer
    Description
    winInstDocs.zipWindows Installer Localization Kit Documentation. Contains .HTML documentation -(identical to the on-line -version).
    C32E403.EXEWindows 32 bit English export installer, complete version.
    - -

    -

    -
    - -
    - - - - - - - - - - - - - - - - - -
    ADDITIONAL INFORMATION
    Program Terms:Universal Localization -Program License
    Product Info:Overview of -Localization Kits | FAQ
    - -
    - - - -
    -
    -
    - -
    Copyright -© 1998 Netscape -Communications Corporation
    -
    - - - diff --git a/l10nkits/client/xp/docs/mozilla.org/l10nLibrary.html b/l10nkits/client/xp/docs/mozilla.org/l10nLibrary.html deleted file mode 100644 index a946b79c2ad..00000000000 --- a/l10nkits/client/xp/docs/mozilla.org/l10nLibrary.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - L10n Library - - - -

    -L10n Library

    -This is where you will find localization kit documentation on-line.  -Documentation will also be provided within the localization kits themselves.  -Theoretically, the on-line docs and the in-kit docs should be the same; -however, if there is a discrepancy, you should: -
      a) believe the in-kit docs over the on-line docs, and -
      b) inform us that there is a mismatch between the two versions.  -We'll fix it as soon as possible.
    - -
    - -

    Documentation is grouped into "pods" of related HTML pages. Select the -pod you wish to read from the links below. -
      -

    - - - - - - - - - - - - - - - - - - - - - - - - -
    Documentation PodDescription
    Windows -32 bit Front EndInstructions for localizing the client for Windows NT and Windows -'95.
    Netscape -Translation ToolsInstructions for using the freely available Netscape Translation Tools: -ToolCool and DogLev (note: DogLev docs are under -construction.)
    Windows -InstallerInstructions for localizing the Windows installer program.
    -  - - diff --git a/l10nkits/client/xp/docs/mozilla.org/l10nkitintro.html b/l10nkits/client/xp/docs/mozilla.org/l10nkitintro.html deleted file mode 100644 index ae1426ef812..00000000000 --- a/l10nkits/client/xp/docs/mozilla.org/l10nkitintro.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - universal localization kits - - - -
    -

    -they're here!

    - -
    -

    -localization kits

    - -

    -purpose

    -This page details the localization kits that are being made publicly available -as part of the universal localization program. As the program's FAQ -stated, there are two dimensions to this program: what is permitted versus -what is facilitated. Localization kits are the primary way in which the -universal localization program facilitates translation of the branded Netscape -Communicator Standard Edition and Netscape Navigator products, as well -as the Mozilla product and its derivatives. - -

    A localization kit contains the tools, instructions and resources necessary -to produce a localized version of the target software. Currently, these -kits are derived from the Netscape Communicator Standard Edition and Netscape -Navigator version 4.x products. By following the instructions in the kits, -you will be able to produce a localized client product in any supported -language. By extension, you may be able to apply the tools and information -provided in the localization kits to localize the Mozilla client. Finally, -following this model, we anticipate developers publishing their own localization -kits based on their derivatives of the mozilla.org source code. - -

    -kit contents

    -While the exact contents of each localization kit differs according to -the platform and product it is intended for, each kit is composed of the -following general pieces: -
      -
    • -The English language resources (in exportable, binary form)
    • - -
    • -Localization notes
    • - -
    • -Kit documentation
    • - -
    • -Tools
    • -
    - -
    -Resources
    - -
    -The English language resources are provided as the base for your localization -work. These resources will match the version used to generate the localization -notes. For Microsoft Windows and Apple Macintosh platforms, the English -language resources are provided as binaries. (You may also download a later -version of the product by visiting Netscape's download -pages. Be sure you only localize the export version! -Otherwise, you will not be able to legally distribute your localized product.) -Netscape's experience with localization has convinced us that localizing -resource binaries is more efficient than working on source files (at least -on Windows and Macintosh).
    - -

    -

    -Localization notes
    - -
    -Localization notes are the heart of the kits: this is where you will find -detailed information on the exact way in which particularly sensitive resources -must be handled. For example, the localization notes tell you which resources -must not be changed from their original values; they will also identify -resources that appear as HTML or Javascript, or that must match other resources -in order for the product to function properly.
    - -

    -

    -Documentation
    - -
    -The localization kit documentation is a series of HTML files which give -you an overview of the localization process, as well as generic instructions -on localizing the different data types found in the product.
    - -

    -

    -Tools
    - -
    -We have attempted to make our Localization Kits "tools agnostic," meaning -you are free to use whichever localization tools you desire to accomplish -your aims. At the same time, we have chosen to release some of our internally -developed localization tools; these are provided "as is", with no support -(but we use them daily with great success).
    - - -

    -


    -

    -next steps

    -If you have questions about the universal localization program, try the -FAQ. - -

    Read the Press -Release announcing the universal localization program. - -

    To download any of the localization kits, proceed to the -download pages. - -

    To read the localization kit documentation on-line, visit the L10n -Library. - -

    If you're looking for more information about localization, internationalization -or links to related subjects, visit the Links & Resources page. [coming -soon!] -
    -


    -
    - - - - - - - - - -
    -
    [Download]
    -
    -
    [L10n Library]
    -
    -
    [FAQ]
    -
    [Links & Resources]
    - -
    Copyright 1998, Netscape Communications Corp., All -Rights Reserved.
    - - - diff --git a/l10nkits/client/xp/docs/mozilla.org/ulpFAQ.html b/l10nkits/client/xp/docs/mozilla.org/ulpFAQ.html deleted file mode 100644 index 6158a5801ae..00000000000 --- a/l10nkits/client/xp/docs/mozilla.org/ulpFAQ.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - universal localization program FAQ - - - -

    -universal localization program FAQ

    - -Last Updated: 23 Mar. 1998 3:40 pm -
    -
    - -

    -OVERVIEW

    - -

    Netscape's universal localization program furthers the goals of mozilla.org by -publishing tools and documentation to aid developers who wish to localize Mozilla. In addition, -participants in the universal localization program may freely translate the Netscape Navigator -and Netscape Communicator Standard Edition version 4.x. These localized products may be freely distributed under -the participant's branding. -

    -This document answers some frequently asked questions about the universal localization program. -

    -

      -

      -GENERAL

      - -
    1. -What is localization?
    2. - -
    3. -How does the universal localization program relate to mozilla.org?
    4. - -
    5. -How does the universal localization program relate to the unlimited distribution program?
    6. - -
    7. -What are the terms of the universal localization program's License?
    8. - -
    9. -What products may I localize?
    10. - -
    11. -Who should participate in the universal localization program?
    12. - -

      -DISTRIBUTION

      - -
    13. -Where can I distribute the localized version?
    14. - -
    15. -How much does this cost?
    16. - -
    17. -Am I allowed to use the Netscape brand, trademarks and logo?
    18. - -
    19. -Will there be any end user support from Netscape for my finished -product?
    20. - -
    21. -Am I required to give my localization back to the Net?
    22. - -
    23. -Can I download software from the general download page on -the Netscape web site and localize it?
    24. - -

      -TECHNICAL INFORMATION

      - -
    25. -What is a localization kit?
    26. - -
    27. -Why do I need a localization kit?
    28. - -
    29. -What platforms does this Program support?
    30. - -
    31. -Into what languages can I translate the software?
    32. - -
    33. -How can I get technical assistance?
    34. - -
    35. -I understand that the source code distributed by mozilla.org will not -include certain 3rd-party components, and cryptography. If I localize -Netscape Navigator 4.x, will I lose the ability to use those components?
    36. - -
    37. -Will this work for Communicator Professional Edition components?
    38. - -
    39. -What about products in France?
    40. - -
    41. -What spell checkers can I use?
    42. - -
    43. -What about installers?
    44. -
    - -
    - -
      - -

      -GENERAL

      - - -
    1. -What is Localization?
    2. - -
      Localization is the process of adapting software for a specific international market; -this process includes translating the user interface, resizing dialog boxes, replacing icons -and other culturally sensitive graphics (if necessary), customizing features (if necessary), -and testing the localized product to ensure that the program still works. - -

      -

    3. -How does the universal localization program relate to mozilla.org?
    4. - -
      The universal localization program is an extension of the philosophy -behind mozilla.org. The goal of the program is to enable developers on the -Internet to freely localize and distribute products based on the Netscape -client and on derivatives based on the mozilla.org source. mozilla.org -will host the content for this program, and provide a forum for developers -to correspond on their work. - -

      -

    5. -How does the universal localization program relate to the unlimited distribution program?
    6. - -
      Whereas the unlimited distribution program allows you to -freely distribute Netscape Navigator and Netscape Communicator -Standard Edition client binaries, and to make slight modifications to these products, -the universal localization program allows you to create localized, -independently branded versions of these products. You may then distribute these localized -products according to the terms of the License. -

      -For more information on the -unlimited distribution program, please visit -http://home.netscape.com/comprod/netscape_partner_programs/browser_distrib/index.html. - -

      -

    7. -What are the terms of the universal localization program's License?
    8. - -
      We are still working out some of the details of the License Agreement -under which this program will be administered. References to the License Agreement in -this document are, therefore, regrettably vague. We hope to have this ironed out soon. - -

      -

    9. -What products may I localize?
    10. - -
      You may localize the Netscape Navigator, Netscape Communicator Standard -Edition, or any client based on the Mozilla source code available from mozilla.org (or its -mirror sites). -Note that localizing products not directly documented in the localization -kits probably will be more difficult than localizing those that are directly documented. - - -

      -

    11. -Who should participate in the universal localization program?
    12. - -
      This program is intended for professional software localizers, localization engineers, -or others who are knowledgeable in software localization concepts and techniques. -However, if you are familiar with common tools, such as resource editors, and if you -are fluent in a particular language, you could use the tools and information provided by -this program to localize Navigator or Communicator in your language. - -

      -DISTRIBUTION

      - -

      -

    13. -Where can I distribute the localized version?
    14. - -
      The terms of the License do not change due to translation of the software: -you may distribute localized versions of the Netscape branded binaries anywhere -allowed by the export license. (A copy of this license comes with every Netscape product). -For localized Mozilla product derivatives, you may distribute them anywhere allowable under -the final free source License (whatever that turns out to be). - -

      -

    15. -How much does this cost?
    16. - -
      There is no cost to participate in the universal localization program. - -

      -

    17. -Am I allowed to use the Netscape brand, trademarks and logo?
    18. - -
      You may not use the name "Netscape" nor the "N" logo -in your localized product. However, you may use the trademarks "Navigator," -"Communicator," "Messenger," "Collabra", and the "Ship's Wheel icon". The universal -localization program License will give you the exact legal details. - -

      -

    19. -Will there be any end user support from Netscape for my finished product?
    20. - -
      No. The products derived from the mozilla.org source and Netscape binaries -are not entitled to Netscape end user support. The level of support you provide -your end users is up to you to decide. - -

      -

    21. -Am I required to give my localization back to the Net?
    22. - -
      The terms of the License are not yet set on this issue. - -

      -

    23. -Can I download software from the general download page on the Netscape -web site and localize it?
    24. - -
      Yes. You may download, localize and distribute any Netscape Navigator -and Netscape Communicator Standard Edition product. However, we may not produce a -localization kit for all versions and platforms. You may try -to use the instructions and tools in the kits we do release for these other versions -and platforms, but successful localization could be quite difficult under these circumstances. - -

      -TECHNICAL INFORMATION

      - -

      -

    25. -What is a localization kit?
    26. - -
      A localization kit contains the tools, instructions and resources necessary -to produce a localized version of a specific software product. The -detailed instructions contained in a given localization kit are usually -specific to a single platform and/or version of a product. These instructions -may, however, be broadly applicable to more than one version or platform. -Therefore, when we say a localization kit "supports" a given platform, -version or language, what we mean is that kit contains detailed instructions -that directly apply to that platform or version or language. It may -be possible to use a localization kit for one platform to successfully -localize another. On the other hand, it may be quite difficult. - -

      -

    27. -Why do I need a localization kit?
    28. - -
      The primary goal of a localization kit is to convey information about -the product being localized so that the over-translation of restricted -resources does not occur. Over-translation occurs when a resource changes -that must not be changed. It can also occur when a resource must be changed -in a particular way, but is not done so. In both cases, the product may -not function properly or may cease to function at all (e.g. crash). The -information contained in the localization kits is designed to help -avoid these situations and to help you correctly localize the product. -Attempting to translate the source files directly without such a kit could -be a frustrating and error-prone operation. - -

      -

    29. -What platforms does this program support?
    30. - -
      This question has two dimensions: what platforms are permissible versus what platforms -are made easy for me to localize onto. The first issue is addressed by the program, the second, -by the localization kits. -

      -The universal localization program allows you to create and distribute localized -products for any platform, except Caldera Linux. Netscape has an exclusive agreement -with Caldera, so this platform is off the list. -

      -Localization kits are currently planned for Windows (32 bit) and Macintosh platforms. -Windows 16 bit and Unix localization kits are not available at this time. You are welcome to -try to localize the software for any platform (except Caldera Linux), with or without the benefit of -a localization kit (but doing so without will be harder than with). - -

      -

    31. -Into what languages can I translate the software?
    32. - -
      This is the same issue as above: under the universal localization program, you are free -to localize the product into any language you desire. On the other hand, not every language -is fully supported by current (version 4.x) client software. In general, if the target language you desire -is supported by one of the encodings listed in the Navigator's View | Encoding menu, -localization into that language should be successful. This is because parts of the product's -user interface is HTML, which depends on the encoding support built into the HTML rendering -engine to display properly. -

      -You will need an operating system that also supports that language. This is because the fonts -necessary to display the standard (non-HTML) localized resources, as well as the input methods, -keyboard mappings, etc., required to input your language's characters, are provided by the -OS. -

      -Please note that at this time, Communicator does not support bidirectional languages, such -as Arabic and Hebrew, nor languages with complex scripts, such as Devanagari. Languages -with contextual line breaking algorithms, such as Thai, are also not supported (although -partial localization and display of web pages may still be possible through various means). -

      -To provide support for additional languages, you will be able modify the 5.x source -code which will be distributed by mozilla.org. - -

      -

    33. -How can I get technical assistance?
    34. - -
      There is no formal technical support; you are on your own. However, -we expect that you will find the newsgroups and mailing lists hosted on -mozilla.org to be a valuable resource. You can find the list of newsgroups -by going to the mozilla.org Community pages: - http://www.mozilla.org/community.html - -

      -

    35. -I understand that the source code distributed by mozilla.org will not -include certain 3rd-party components or cryptography. If I localize -Netscape Navigator 4.x, will I lose the ability to use those components?
    36. - -
      No. Since the localization process does not depend on having -the source code to the program available (all you are doing, really, is -changing strings in an existing executable) you will retain all of the -functionality present in the executable you started with. It will -just be in a different language. - -

      -

    37. -Will this work for Communicator Professional Edition components?
    38. - -
      No. The Professional Edition includes 3rd Party components that are -not covered by the Unlimited Distribution or NPL programs. These -components cannot be modified under this program. - -

      -

    39. -What about products in France?
    40. - -
      You are free to create French versions. However, to comply with French law, -if you distribute a product which has cryptographic -capabilities, that product must use the special encryption level for France. -Compliant versions of Communicator and Navigator are available from Netscape's -download page. The English Export version of Netscape Navigator -and Netscape Communicator Standard Edition are not authorized for import -into France. -

      -Netscape's download page can be found -here: -http://home.netscape.com/download/client_download.html - -

      -

    41. -What Spell Checkers can I use?
    42. - -
      The spell checker module built into Composer is licensed from Inso -Software. Inso permits you to bundle two spell checkers with -your product. For additional spell check dictionaries, contact Inso Corporation. -

      -Visit Inso Corp.'s web site at: http://www.inso.com/ - -

      -

    43. -What about Installers?
    44. - -
      Currently, Netscape's installer programs are built using 3rd party -modules, for which we do not have redistribution rights. Therefore, -we are not releasing a complete installer kit; however, guidelines for -creating your own installer will be available. You may use any commercially -available installer software to package your localized product and obtain -authorization for distribution directly from the provider of the installer -software.
    - - - diff --git a/l10nkits/client/xp/docs/mozilla.org/ulpLicense.html b/l10nkits/client/xp/docs/mozilla.org/ulpLicense.html deleted file mode 100644 index a704fd622db..00000000000 --- a/l10nkits/client/xp/docs/mozilla.org/ulpLicense.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - Universal Localization Program License Agreement - - - -

    -Universal Localization Program License Agreement

    - -
    1.  Definitions.
    -
    -(a) "Agreement" shall mean this Universal Localization
    -Agreement.
    -
    -(b) "Netscape Products" shall mean the Netscape
    -Navigator 4.x and / or Netscape Communicator Standard
    -Edition 4.x on all platforms made generally available
    -by Netscape (excluding Linux).
    -
    -(c) "Licensee" shall mean the person or entity who may
    -avail itself of the rights granted in this Agreement by
    -agreeing to the terms and conditions set forth in this
    -Agreement.
    -
    -(d) "Localized Product" shall mean the version of the
    -Netscape Product that Licensee localizes pursuant to
    -the provisions set forth in the localization kit and
    -Section 3 of this Agreement.
    -
    -(e) "EULA" shall mean the end user license agreement
    -that is provided with the Netscape Product
    -
    -2.  License Grant.  (a) Netscape grants to Licensee,
    -subject to these terms and conditions, a nonexclusive,
    -royalty free and nontransferable right to (i) create a
    -Localized Product; (ii) reproduce the Localized Product
    -in executable code form only on any media and (iii)
    -distribute by sublicense such Localized Product copies
    -to end users, directly or through
    -distributors. Licensee may electronically distribute
    -the Localized Product, in exportable version only,
    -pursuant to the terms and conditions set forth herein.
    -
    -(b) Except as expressly permitted herein or by
    -applicable law, Licensee shall not and, shall not
    -permit any distributor or other person to,
    -re-configure, modify, decompile, reverse engineer,
    -disassemble, or otherwise determine or attempt to
    -determine source code from the Netscape Product or
    -Localized Products or to create any derivative works
    -based upon the Netscape Product or Localized Products
    -including the Netscape user interface.  If Licensee or
    -any distributor fails to comply with this Section 2(b),
    -the Agreement shall immediately terminate (in addition
    -to all other remedies it may have and except for end
    -user licenses), and all licenses granted hereunder
    -shall be revoked.
    -
    -(c) Licensee is not granted any right in this Agreement
    -to use any Netscape trademark, even if provided with
    -the Netscape Product.  A current list of Netscape’s
    -trademarks may be found at
    -http://home.netscape.com/misc/trademarks.html.
    -
    -3. Localization Requirements and Guidelines.  (a)
    -Licensee agrees to use all reasonable efforts to
    -complete the localization in accordance with the
    -following requirements: (i) the localization process
    -shall consist of Licensee translating and localizing
    -the Netscape Products, to the extent practical without
    -having access to the source code of such products; (ii)
    -Licensee may localize the EULA for the convenience of
    -the end users, however, the English language version of
    -the EULA shall be controlling in the event of any
    -inconsistency between the translated end user license
    -agreement and EULA; and (iii) Licensee must localize
    -the content behind the following links, making
    -appropriate URL changes to reflect the Maintenance and
    -Technical Support available by Licensee, How to Give
    -Feedback and How to Get Support.  For notices, updates
    -and changes to this Agreement, Licensee shall regularly
    -check the URL where this Agreement was viewed and
    -agreed to.
    -
    -(b) Licensee should use reasonable efforts to complete
    -the localization in accordance with the following
    -guidelines: (a) In the About Box of the Localized
    -Product, Licensee should identify itself as the company
    -or individual that localized the Netscape Product(s);
    -and (b) the guidelines set forth in the localization
    -kit.
    -
    -4.  Support.  Netscape shall not provide any support to
    -Licensee for the Netscape Products, Localized Products
    -or services called for by this Agreement.  Netscape
    -shall not provide any support to end users for the
    -Netscape Products or Localized Products.
    -
    -5.  Distribution.  (a) Licensee shall and shall cause
    -its distributors to comply with all then-current
    -applicable laws, regulations and other legal
    -requirements in its performance of this Agreement,
    -including without limitation, all applicable export
    -laws, rules and regulations of any agency of the
    -U.S. Government or other applicable agencies.  Licensee
    -shall ensure the inclusion of appropriate notices
    -required by the U.S. Government agencies or other
    -applicable agencies.
    -
    -(b) Licensee shall use commercially reasonable best
    -efforts to ensure that its distributors and
    -sub-distributors comply with all of the relevant terms
    -contained in this Agreement. The Localized Products
    -distributed pursuant to this Agreement must be
    -distributed with the EULA.
    -
    -(c) This is a nonexclusive relationship, and each party
    -agrees that the other may enter into similar
    -arrangements with third parties.  Licensee shall and
    -shall cause its distributors to treat all Localized
    -Products at least as favorably as it treats any
    -competitive products it distributes.
    -
    -(d) Licensee agrees to distribute documentation or
    -packaging relating to the Localized Product that shall
    -conspicuously state that, notwithstanding anything in
    -the EULA to the contrary, (i) Netscape will not supply,
    -and end users are not entitled to, any support,
    -warranty or documentation associated with the Localized
    -Product; and (ii) that Licensee is the Licensor
    -referred to in the EULA.
    -
    -(e) During the term of this Agreement, Licensee agrees
    -that each Localized Product created by Licensee must be
    -made publicly available in executable code form, free
    -of charge, for electronic delivery via a mechanism
    -generally accepted in the software development
    -community.
    -
    -6.  Proprietary Rights.  Title to and ownership of all
    -copies of the Netscape Products, including all
    -copyrights thereto, whether in machine-readable or
    -printed form, and including without limitation
    -derivative works, compilations, or collective works
    -thereof and all related technical know-how and all
    -rights therein are and shall remain the exclusive
    -property of Netscape or its suppliers.  Licensee
    -acknowledges that Netscape is the owner of the
    -Netscape, Navigator and Communicator trademarks, and
    -any trademark applications and/or registrations
    -thereto, agrees that it will do nothing inconsistent
    -with such ownership. Licensee and distributor shall not
    -take any action to jeopardize, limit or interfere in
    -any manner with Netscape’s ownership rights set
    -forth herein.  Further, Licensee or its distributors
    -shall not remove or alter any copyright or other
    -proprietary notices, legends, symbols, or labels
    -appearing on the Netscape Products and/or Localized
    -Products delivered to Licensee and Licensee shall
    -reproduce such notices on all copies of the Localized
    -Products made hereunder.
    -
    -7.  Warranty. THE NETSCAPE PRODUCTS ARE PROVIDED UNDER
    -THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT WARRANTY OF
    -ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
    -WITHOUT LIMITATION, WARRANTIES THAT THE NETSCAPE
    -PRODUCTS OR LOCALIZED PRODUCTS ARE FREE OF DEFECTS,
    -MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR
    -NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
    -PERFORMANCE OF THE NETSCAPE PRODUCTS OR LOCALIZED
    -PRODUCTS ARE WITH LICENSEE. SHOULD A NETSCAPE PRODUCT
    -OR LOCALIZED PRODUCT PROVE DEFECTIVE IN ANY RESPECT,
    -LICENSE (NOT NETSCAPE OR ITS SUPPLIERS) ASSUME THE COST
    -OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS
    -DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF
    -THIS LICENSE. NO USE OF ANY NETSCAPE PRODUCT OR
    -LOCALIZED PRODUCT IS AUTHORIZED HEREUNDER EXCEPT UNDER
    -THIS DISCLAIMER.
    -
    -       Licensee warrants that Licensee’s performance
    -of the services called for by this Agreement and its
    -resulting work product does not and shall not violate
    -any applicable law, rule or regulation; any contracts
    -with third parties; or any third-party rights in any
    -patent, trademark, copyright, trade secret or other
    -intellectual property right.
    -
    -8.  Indemnity. Netscape shall have no obligation or
    -liability for, and Licensee shall defend, indemnify and
    -hold Netscape harmless from and against any claim
    -(including reasonable attorneys' fees and costs)
    -arising from Licensee's localization and/or
    -distribution of the Localized Products under, and/or
    -
    -compliance with the terms and conditions set forth in,
    -this Agreement.
    -
    -9.  Limitation of Liability.  (a) TO THE EXTENT ALLOWED
    -BY APPLICABLE LAW, IN NO EVENT SHALL NETSCAPE OR ITS
    -SUPPLIERS BE LIABLE (UNDER ANY LEGAL THEORY, WHETER
    -TORT, CONTRACT OR OTHERWISE) FOR ANY DAMAGES
    -WHATSOEVER, INCLUDING WITHOUT LIMITATION, ANY LOSS OF
    -PROFITS, LOSS OF BUSINESS, LOSS OF USE OR DATA,
    -INTERRUPTION OF BUSINESS, DAMAGES FOR LOSS OF GOODWILL,
    -COMPUTER FAILURE OR MALFUNCTION OR FOR DIRECT,
    -INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
    -OF ANY KIND, EVEN IF NETSCAPE HAS BEEN ADVISED OF THE
    -POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING ANY
    -FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
    -(b) IN NO EVENT WILL NETSCAPE OR ITS SUPPLIERS BE
    -LIABLE FOR ANY CLAIM AGAINST LICENSEE BY ANY THIRD
    -PARTY.  (c) IN NO EVENT SHALL NETSCAPE OR ITS SUPPLIERS
    -BE LIABLE FOR (I) ANY REPRESENTATION OR WARRANTY MADE
    -TO ANY THIRD PARTY BY LICENSEE, ANY DISTRIBUTOR OR
    -THEIR RESPECTIVE AGENTS; (II) FAILURE OF THE PRODUCTS
    -TO PERFORM; (III) FAILURE OF THE PRODUCTS TO PROVIDE
    -SECURITY; OR (IV) THE RESULTS OR INFORMATION OBTAINED
    -OR DECISIONS MADE BY END USERS OF THE PRODUCTS OR THE
    -DOCUMENTATION.  THIS LIMITATION OF LIABILITY IS AN
    -ESSENTIAL PART OF THE BARGAIN UNDER THIS AGREEMENT.
    -
    -10. Term and Termination.  This Agreement shall remain
    -in effect until terminated pursuant to the terms and
    -conditions set forth in this Agreement.
    -Notwithstanding anything in this Agreement to the
    -contrary, in the event Microsoft Corporation ceases to
    -distribute free of charge products with features
    -comparable to the Netscape Products, Netscape reserves
    -the right to terminate this Agreement upon 90 days
    -notice to Licensee.
    -
    -This Agreement shall be terminated: (a) automatically
    -in the event Licensee or a distributor of Licensee
    -attempts to derive the source code of the Netscape
    -Product and/or the Localized Products; or (b) upon 60
    -days prior notice by either party.  Immediately upon
    -termination or expiration hereof, all licenses granted
    -hereunder (except for validly granted end user licenses
    -for Localized Products) shall terminate, and Licensee
    -shall deliver to Netscape or destroy all copies of the
    -Localized Products and/or Netscape Products in its
    -possession or control, and shall furnish to Netscape an
    -affidavit signed by an officer of Licensee certifying
    -such delivery or destruction. Termination by either
    -party shall not act as a waiver or release of any
    -breach hereof or any liability hereunder. Sections
    -2(b), 4, 5, 6, 7, 8, 9, 10, 11 and 12 shall survive any
    -expiration or termination of this Agreement.
    -
    -11.  Notice.  Any notice required or permitted
    -hereunder shall be in English, in writing and shall be
    -deemed to be properly given by Netscape upon posting of
    -such notice to a URL which corresponds to the URL where
    -this Agreement was viewed and agreed to or where the
    -details of this program are generally made available by
    -Netscape.  Notices to Netscape shall be to the
    -attention of the Legal Department, Netscape
    -Communications Corporation, 501 East Middlefield Road,
    -Mountain View, California 94043.
    -
    -12.  Miscellaneous.  (a) Neither party’s waiver of a
    -breach or delay or omission to exercise any right or
    -remedy shall be construed as a waiver of any subsequent
    -breach or as a waiver of such right or remedy.  (b)
    -This Agreement shall be governed by and construed under
    -the laws of the State of California, U.S.A., without
    -reference to its conflicts of law provisions.  (c)
    -Unless otherwise agreed in writing, all disputes
    -relating to this Agreement (except any dispute relating
    -to intellectual property rights) shall be subject to
    -final and binding arbitration in Santa Clara County,
    -California under the auspices of JAMS/End Dispute, with
    -the losing party bearing all costs of such arbitration.
    -Notwithstanding the foregoing, Netscape reserves the
    -right to invoke the jurisdiction of any competent court
    -to remedy or prevent violation of any provision under
    -this Agreement relating to Netscape Confidential
    -Information.  (d) This Agreement will not be governed
    -by the United Nations Convention of Contracts for the
    -International Sale of Goods. (e) This Agreement creates
    -no agency, partnership, joint venture, or employment
    -relationship and neither Licensee nor its agents have
    -any authority to bind Netscape in any respect
    -whatsoever. (f) If the application of any provision
    -hereof to any particular facts shall be held to be
    -unenforceable by any competent court, then (x) the
    -enforceability of such provision as applied to any
    -other facts and the validity of other provisions hereof
    -shall not be affected and (y) such provision shall be
    -reformed without further action by the parties hereto
    -only to the extent necessary to make such provision
    -valid and enforceable when applied to the particular
    -facts.  (g) This Agreement constitutes the entire
    -agreement between the parties concerning the subject
    -matter hereof and supersedes all prior and
    -contemporaneous agreements, and communications, whether
    -oral or written, between the parties relating to the
    -subject matter of this Agreement and all past courses
    -of dealing or industry custom. (h) If Licensee has an
    -effective agreement with Netscape ("Prior Agreement")
    -covering only the distribution of the Localized
    -Products set forth herein, then this Agreement shall
    -supersede the Prior Agreement.  If any Prior Agreement
    -covers any Netscape products in addition to the
    -Localized Products, for example Netscape server
    -products, then this Agreement shall supersede only
    -those portions of the Prior Agreement covering the
    -Localized Products. (i) This Agreement is written in
    -the English language only, which language shall be
    -controlling in all respects. (j) Netscape reserves the
    -right to amend the terms contained in this Agreement
    -provided Licensee is given 30 days notice as set forth
    -in Section 11. (k) If any dispute arises under this
    -Agreement, the prevailing party shall be reimbursed by
    -the other party for any and all legal fees and costs
    -associated therewith. ((l) Les parties aux
    -présentés confirment leur volonté que cette
    -convention de même que tous les documents y compris
    -tout avis qui s'y rattaché, soient redigés en
    -langue anglaise (translation: The parties confirm that
    -this Agreement and all related documentation will be in
    -the English language").
    -
    -
    -
    -Universal Localization Agreement Rev. 032798
    - - - diff --git a/mozilla/base/Makefile b/mozilla/base/Makefile deleted file mode 100644 index def05c31f80..00000000000 --- a/mozilla/base/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -#!gmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH = .. - -DIRS = public src tests - -include $(DEPTH)/config/config.mk - -include $(DEPTH)/config/rules.mk diff --git a/mozilla/base/macbuild/base.mcp b/mozilla/base/macbuild/base.mcp deleted file mode 100644 index 188a8be7c88..00000000000 Binary files a/mozilla/base/macbuild/base.mcp and /dev/null differ diff --git a/mozilla/base/makefile.win b/mozilla/base/makefile.win deleted file mode 100644 index b7f84e8a5a2..00000000000 --- a/mozilla/base/makefile.win +++ /dev/null @@ -1,23 +0,0 @@ -#!nmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH=.. -IGNORE_MANIFEST=1 - -DIRS=public src tests - -include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/base/public/MANIFEST b/mozilla/base/public/MANIFEST deleted file mode 100644 index 4eb9882bdee..00000000000 --- a/mozilla/base/public/MANIFEST +++ /dev/null @@ -1,5 +0,0 @@ -# -# This is a list of local files which get copied to the mozilla:dist:base directory -# - -nsISizeOfHandler.h \ No newline at end of file diff --git a/mozilla/base/public/Makefile b/mozilla/base/public/Makefile deleted file mode 100644 index 7d4fce97311..00000000000 --- a/mozilla/base/public/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -#!gmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH=../.. - -DEFINES = -D_IMPL_NS_BASE - -EXPORTS = \ - nsISizeOfHandler.h \ - $(NULL) - -MODULE = raptor - -include $(DEPTH)/config/config.mk - -include $(DEPTH)/config/rules.mk diff --git a/mozilla/base/public/makefile.win b/mozilla/base/public/makefile.win deleted file mode 100644 index 404ffd9763c..00000000000 --- a/mozilla/base/public/makefile.win +++ /dev/null @@ -1,30 +0,0 @@ -#!nmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH=..\.. -IGNORE_MANIFEST=1 - -DEFINES = -D_IMPL_NS_BASE - -EXPORTS = \ - nsISizeOfHandler.h \ - $(NULL) - -MODULE = raptor - -include <$(DEPTH)\config\rules.mak> - diff --git a/mozilla/base/public/nsISizeOfHandler.h b/mozilla/base/public/nsISizeOfHandler.h deleted file mode 100644 index af035d6db6e..00000000000 --- a/mozilla/base/public/nsISizeOfHandler.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#ifndef nsISizeOfHandler_h___ -#define nsISizeOfHandler_h___ - -#include "nscore.h" -#include "nsISupports.h" - -/* c028d1f0-fc9e-11d1-89e4-006008911b81 */ -#define NS_ISIZEOF_HANDLER_IID \ -{ 0xc028d1f0, 0xfc9e, 0x11d1, {0x89, 0xe4, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81}} - -/** - * An API to managing a sizeof computation of an arbitrary graph. - * The handler is responsible for remembering which objects have been - * seen before. Note that the handler doesn't hold references to - * nsISupport's objects; the assumption is that the objects being - * sized are stationary and will not be modified during the sizing - * computation and therefore do not need an extra reference count. - */ -class nsISizeOfHandler : public nsISupports { -public: - /** - * Add in a simple size value to the running total. - * Always returns NS_OK. - */ - NS_IMETHOD Add(size_t aSize) = 0; - - /** - * Update aResult with PR_TRUE if the object has been traversed - * by the sizeof computation before. Otherwise aResult is set to - * PR_FALSE and the object is added to the internal database - * of objects that have been traversed. It's ok to pass a null - * pointer in; aResult will be set to PR_TRUE so you won't accidently - * try to traverse through null pointer. - * - * Note: This violates the COM API standard on purpose; so there! - */ - virtual PRBool HaveSeen(void* anObject) = 0; - - /** - * Return the currently computed size. - * Always returns NS_OK. - */ - NS_IMETHOD GetSize(PRUint32& aResult) = 0; -}; - -extern NS_BASE nsresult -NS_NewSizeOfHandler(nsISizeOfHandler** aInstancePtrResult); - -#endif /* nsISizeofHandler_h___ */ diff --git a/mozilla/base/src/MANIFEST b/mozilla/base/src/MANIFEST deleted file mode 100644 index c26f38284ec..00000000000 --- a/mozilla/base/src/MANIFEST +++ /dev/null @@ -1,22 +0,0 @@ -# -# This is a list of local files which get copied to the mozilla:dist directory -# - -nscore.h -nsIArena.h -nsIAtom.h -nsIByteBuffer.h -nsBTree.h -nsCRT.h -nsDeque.h -nsITimer.h -nsITimerCallback.h -nsIUnicharBuffer.h -nsRBTree.h -nsIUnicharInputStream.h -nsString.h -nsVoidArray.h -nsUnitConversion.h -nsIBaseStream.h -nsIInputStream.h -nsIOutputStream.h diff --git a/mozilla/base/src/Makefile b/mozilla/base/src/Makefile deleted file mode 100644 index 788665215ce..00000000000 --- a/mozilla/base/src/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -#!gmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH=../.. - -DEFINES =-D_IMPL_NS_BASE - -DIRS = unix - -LIBRARY_NAME = raptorbase - -CPPSRCS = \ - nsArena.cpp \ - nsAtomTable.cpp \ - nsBTree.cpp \ - nsByteBuffer.cpp \ - nsCRT.cpp \ - nsDeque.cpp \ - nsRBTree.cpp \ - nsSizeOfHandler.cpp \ - nsString.cpp \ - nsUnicharBuffer.cpp \ - nsUnicharInputStream.cpp \ - nsVoidArray.cpp \ - $(NULL) - -EXPORTS = \ - nscore.h \ - nsBTree.h \ - nsCRT.h \ - nsDeque.h \ - nsIArena.h \ - nsIAtom.h \ - nsIByteBuffer.h \ - nsIBaseStream.h \ - nsIInputStream.h \ - nsIOutputStream.h \ - nsITimer.h \ - nsITimerCallback.h \ - nsIUnicharBuffer.h \ - nsIUnicharInputStream.h \ - nsRBTree.h \ - nsString.h \ - nsVoidArray.h \ - nsUnitConversion.h \ - $(NULL) - -MODULE = raptor - -REQUIRES = xpcom netlib raptor - -include $(DEPTH)/config/config.mk - -TARGET = $(LIBARY) - -include $(DEPTH)/config/rules.mk diff --git a/mozilla/base/src/mac/nsTimerMac.cpp b/mozilla/base/src/mac/nsTimerMac.cpp deleted file mode 100644 index 829a666d962..00000000000 --- a/mozilla/base/src/mac/nsTimerMac.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -// -// Mac implementation of the nsITimer interface -// - -// nsMacTimerPeriodical idles, - - -#include "nsITimer.h" -#include "nsITimerCallback.h" -#include "prlog.h" -#include -#include -#include -#include - -#pragma mark class TimerImpl -// -// TimerImpl implements nsITimer API -// -class TimerImpl : public nsITimer -{ - private: - nsTimerCallbackFunc mCallbackFunc; - nsITimerCallback * mCallbackObject; - void * mClosure; - PRUint32 mDelay; - UInt32 mFireTime; // Timer should fire when TickCount >= this number - - public: - - // constructors - - TimerImpl(); - - virtual ~TimerImpl(){}; - - NS_DECL_ISUPPORTS - - UInt32 GetFireTime() { return mFireTime; } - - void Fire(); - - // nsITimer overrides - - virtual nsresult Init(nsTimerCallbackFunc aFunc, - void *aClosure, - PRUint32 aDelay); - - virtual nsresult Init(nsITimerCallback *aCallback, - PRUint32 aDelay); - - virtual void Cancel(); - - virtual PRUint32 GetDelay(); - - virtual void SetDelay(PRUint32 aDelay); - - private: - // Calculates mFireTime too - void SetDelaySelf( PRUint32 aDelay ); -}; - -#pragma mark class TimerPeriodical -// -// TimerPeriodical is a singleton LPeriodical subclass that fires -// off TimerImpl. The firing is done on idle -// -class TimerPeriodical : public LPeriodical -{ - static TimerPeriodical * gPeriodical; - - LArray * mTimers; // List of TimerImpl * - - public: - // Returns the singleton instance - static TimerPeriodical * GetPeriodical(); - - TimerPeriodical(); - - virtual ~TimerPeriodical(); - - nsresult AddTimer( TimerImpl * aTimer); - - nsresult RemoveTimer( TimerImpl * aTimer); - - virtual void SpendTime( const EventRecord &inMacEvent); -}; - -#pragma mark class TimerImplComparator -// -// TimerImplComparator compares two TimerImpl -// -class TimerImplComparator : public LComparator -{ - virtual Int32 Compare( - const void* inItemOne, - const void* inItemTwo, - Uint32 inSizeOne, - Uint32 inSizeTwo) const; -}; - - -// -// TimerImpl implementation -// - -static NS_DEFINE_IID(kITimerIID, NS_ITIMER_IID); -NS_IMPL_ISUPPORTS(TimerImpl, kITimerIID) - -TimerImpl::TimerImpl() -{ - NS_INIT_REFCNT(); - mCallbackFunc = NULL; - mCallbackObject = NULL; - mClosure = NULL; - mDelay = 0; - mFireTime = 0; -} - -nsresult TimerImpl::Init(nsTimerCallbackFunc aFunc, - void *aClosure, - PRUint32 aDelay) -{ - mCallbackFunc = aFunc; - mClosure = aClosure; - SetDelaySelf(aDelay); - return TimerPeriodical::GetPeriodical()->AddTimer(this); -} - -nsresult TimerImpl::Init(nsITimerCallback *aCallback, - PRUint32 aDelay) -{ - mCallbackObject = aCallback; - SetDelaySelf(aDelay); - return TimerPeriodical::GetPeriodical()->AddTimer(this); -} - -void TimerImpl::Cancel() -{ - TimerPeriodical::GetPeriodical()->RemoveTimer(this); -} - -PRUint32 TimerImpl::GetDelay() -{ - return mDelay; -} - -void TimerImpl::SetDelay(PRUint32 aDelay) -{ - SetDelaySelf(aDelay); - // Make sure that timer was sorted - NS_ADDREF(this); - TimerPeriodical::GetPeriodical()->RemoveTimer(this); - TimerPeriodical::GetPeriodical()->AddTimer(this); - NS_RELEASE(this); -} - -void TimerImpl::Fire() -{ - if (mCallbackFunc != NULL) { - (*mCallbackFunc)(this, mClosure); - } - else if (mCallbackObject != NULL) { - mCallbackObject->Notify(this); // Fire the timer - } -} - -void TimerImpl::SetDelaySelf( PRUint32 aDelay ) -{ - mDelay = aDelay; - mFireTime = TickCount() + mDelay / 100 * 6; // We need mFireTime in ticks, 1/60th of a second -} - -TimerPeriodical * TimerPeriodical::gPeriodical = NULL; - -TimerPeriodical * TimerPeriodical::GetPeriodical() -{ - if (gPeriodical == NULL) - gPeriodical = new TimerPeriodical(); - return gPeriodical; -} - -TimerPeriodical::TimerPeriodical() -{ - mTimers = new LArray( sizeof(TimerImpl*)); - mTimers->SetComparator( new TimerImplComparator()); - mTimers->SetKeepSorted( true ); -} - -TimerPeriodical::~TimerPeriodical() -{ - PR_ASSERT(mTimers->GetCount() == 0); - delete mTimers; -} - -nsresult TimerPeriodical::AddTimer( TimerImpl * aTimer) -{ - try - { - NS_ADDREF(aTimer); - mTimers->AddItem( aTimer ); - StartRepeating(); - } - catch(...) - { - return NS_ERROR_UNEXPECTED; - } - return NS_OK; -} - -nsresult TimerPeriodical::RemoveTimer( TimerImpl * aTimer) -{ - mTimers->Remove( aTimer ); - NS_RELEASE( aTimer ); - if ( mTimers->GetCount() == 0 ) - StopRepeating(); - return NS_OK; -} - -// Called through every event loop -// Loops through the list of available timers, and -// fires off the available ones -void TimerPeriodical::SpendTime( const EventRecord &inMacEvent) -{ - LArrayIterator iter( *mTimers, LArrayIterator::from_Start); - TimerImpl * timer; - while (iter.Next( &timer)) - { - if ( timer->GetFireTime() <= inMacEvent.when ) - { - NS_ADDREF(timer); - RemoveTimer(timer); - timer->Fire(); - NS_RELEASE(timer); - } - else - break; // Items are sorted, so we do not need to iterate until the end - } -} - -// -// class TimerImplComparator implementation -// -Int32 TimerImplComparator::Compare( - const void* inItemOne, - const void* inItemTwo, - Uint32 inSizeOne, - Uint32 inSizeTwo) const -{ - return (( TimerImpl *) inItemOne)->GetFireTime() - (( TimerImpl *) inItemTwo)->GetFireTime(); -} - -NS_BASE nsresult NS_NewTimer(nsITimer** aInstancePtrResult) -{ - NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); - if (nsnull == aInstancePtrResult) { - return NS_ERROR_NULL_POINTER; - } - TimerImpl *timer = new TimerImpl(); - if (nsnull == timer) { - return NS_ERROR_OUT_OF_MEMORY; - } - - return timer->QueryInterface(kITimerIID, (void **) aInstancePtrResult); -} diff --git a/mozilla/base/src/makefile.win b/mozilla/base/src/makefile.win deleted file mode 100644 index 1976497e597..00000000000 --- a/mozilla/base/src/makefile.win +++ /dev/null @@ -1,95 +0,0 @@ -#!nmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH=..\.. -IGNORE_MANIFEST=1 - -DIRS = windows - -DEFINES=-D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN -LIBRARY_NAME=raptorbase - -CPPSRCS = \ - nsArena.cpp \ - nsAtomTable.cpp \ - nsBTree.cpp \ - nsByteBuffer.cpp \ - nsCRT.cpp \ - nsDeque.cpp \ - nsRBTree.cpp \ - nsSizeOfHandler.cpp \ - nsString.cpp \ - nsUnicharBuffer.cpp \ - nsUnicharInputStream.cpp \ - nsVoidArray.cpp \ - $(NULL) - -CPP_OBJS = \ - .\$(OBJDIR)\nsArena.obj \ - .\$(OBJDIR)\nsAtomTable.obj \ - .\$(OBJDIR)\nsBTree.obj \ - .\$(OBJDIR)\nsByteBuffer.obj \ - .\$(OBJDIR)\nsCRT.obj \ - .\$(OBJDIR)\nsDeque.obj \ - .\$(OBJDIR)\nsRBTree.obj \ - .\$(OBJDIR)\nsSizeOfHandler.obj \ - .\$(OBJDIR)\nsString.obj \ - .\$(OBJDIR)\nsUnicharBuffer.obj \ - .\$(OBJDIR)\nsUnicharInputStream.obj \ - .\$(OBJDIR)\nsVoidArray.obj \ - $(NULL) - -EXPORTS=nscore.h nsIArena.h nsIAtom.h nsIByteBuffer.h \ - nsBTree.h nsCRT.h nsDeque.h nsITimer.h \ - nsITimerCallback.h nsIUnicharBuffer.h nsRBTree.h \ - nsIUnicharInputStream.h nsString.h nsVoidArray.h \ - nsUnitConversion.h \ - nsIBaseStream.h nsIInputStream.h nsIOutputStream.h - -MODULE=raptor - -REQUIRES=xpcom netlib raptor - -LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\netlib \ - -I$(PUBLIC)\raptor - -MAKE_OBJ_TYPE = DLL -DLLNAME = raptorbase -DLL=.\$(OBJDIR)\$(DLLNAME).dll - -OBJS = $(OBJS) .\$(OBJDIR)\nsTimer.obj - -LCFLAGS = \ - $(LCFLAGS) \ - $(DEFINES) \ - $(NULL) - -# These are the libraries we need to link with to create the dll -LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\libplc21.lib \ - $(LIBNSPR) - -include <$(DEPTH)\config\rules.mak> - -libs:: $(DLL) - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib - -clobber:: - rm -f $(DIST)\bin\$(DLLNAME).dll - rm -f $(DIST)\lib\$(DLLNAME).lib diff --git a/mozilla/base/src/nsArena.cpp b/mozilla/base/src/nsArena.cpp deleted file mode 100644 index a38ef687f58..00000000000 --- a/mozilla/base/src/nsArena.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#include "nsIArena.h" -#include "nsCRT.h" - -#define PL_ARENA_CONST_ALIGN_MASK 7 -#include "plarena.h" - -static NS_DEFINE_IID(kArenaIID, NS_IARENA_IID); - -// Simple arena implementation layered on plarena -class ArenaImpl : public nsIArena { -public: - ArenaImpl(PRInt32 aBlockSize); - - NS_DECL_ISUPPORTS - - virtual void* Alloc(PRInt32 aSize); - -protected: - ~ArenaImpl(); - - PLArenaPool mPool; - PRInt32 mBlockSize; -}; - -ArenaImpl::ArenaImpl(PRInt32 aBlockSize) -{ - NS_INIT_REFCNT(); - if (aBlockSize < NS_MIN_ARENA_BLOCK_SIZE) { - aBlockSize = NS_DEFAULT_ARENA_BLOCK_SIZE; - } - PL_INIT_ARENA_POOL(&mPool, "nsIArena", aBlockSize); - mBlockSize = aBlockSize; -} - -NS_IMPL_ISUPPORTS(ArenaImpl,kArenaIID) - -ArenaImpl::~ArenaImpl() -{ - PL_FinishArenaPool(&mPool); -} - -void* ArenaImpl::Alloc(PRInt32 size) -{ - // Adjust size so that it's a multiple of sizeof(double) - PRInt32 align = size & (sizeof(double) - 1); - if (0 != align) { - size += sizeof(double) - align; - } - - void* p; - PL_ARENA_ALLOCATE(p, &mPool, size); - return p; -} - -NS_BASE nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult, - PRInt32 aArenaBlockSize) -{ - ArenaImpl* it = new ArenaImpl(aArenaBlockSize); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return it->QueryInterface(kArenaIID, (void **) aInstancePtrResult); -} diff --git a/mozilla/base/src/nsAtomTable.cpp b/mozilla/base/src/nsAtomTable.cpp deleted file mode 100644 index 41c5de0282b..00000000000 --- a/mozilla/base/src/nsAtomTable.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#include "nsIAtom.h" -#include "nsString.h" -#include "nsCRT.h" -#include "plhash.h" -#include "nsISizeOfHandler.h" - -/** - * The shared hash table for atom lookups. - */ -static nsrefcnt gAtoms; -static struct PLHashTable* gAtomHashTable; - -class AtomImpl : public nsIAtom { -public: - AtomImpl(); - ~AtomImpl(); - - NS_DECL_ISUPPORTS - - void* operator new(size_t size, const PRUnichar* us, PRInt32 uslen); - - virtual void ToString(nsString& aBuf) const; - - virtual const PRUnichar* GetUnicode() const; - - NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const; - - // Actually more; 0 terminated. This slot is reserved for the - // terminating zero. - PRUnichar mString[1]; -}; - -AtomImpl::AtomImpl() -{ - NS_INIT_REFCNT(); - // Every live atom holds a reference on the atom hashtable - gAtoms++; -} - -AtomImpl::~AtomImpl() -{ - NS_PRECONDITION(nsnull != gAtomHashTable, "null atom hashtable"); - if (nsnull != gAtomHashTable) { - PL_HashTableRemove(gAtomHashTable, mString); - nsrefcnt cnt = --gAtoms; - if (0 == cnt) { - // When the last atom is destroyed, the atom arena is destroyed - NS_ASSERTION(0 == gAtomHashTable->nentries, "bad atom table"); - PL_HashTableDestroy(gAtomHashTable); - gAtomHashTable = nsnull; - } - } -} - -static NS_DEFINE_IID(kIAtomIID, NS_IATOM_IID); -NS_IMPL_ISUPPORTS(AtomImpl, kIAtomIID); - -void* AtomImpl::operator new(size_t size, const PRUnichar* us, PRInt32 uslen) -{ - size = size + uslen * sizeof(PRUnichar); - AtomImpl* ii = (AtomImpl*) new char[size]; - nsCRT::memcpy(ii->mString, us, uslen * sizeof(PRUnichar)); - ii->mString[uslen] = 0; - return ii; -} - -void AtomImpl::ToString(nsString& aBuf) const -{ - aBuf.SetLength(0); - aBuf.Append(mString, nsCRT::strlen(mString)); -} - -const PRUnichar* AtomImpl::GetUnicode() const -{ - return mString; -} - -NS_IMETHODIMP -AtomImpl::SizeOf(nsISizeOfHandler* aHandler) const -{ - aHandler->Add(sizeof(*this) + nsCRT::strlen(mString) * sizeof(PRUnichar)); - return NS_OK; -} - -//---------------------------------------------------------------------- - -static PLHashNumber HashKey(const PRUnichar* k) -{ - return (PLHashNumber) nsCRT::HashCode(k); -} - -static PRIntn CompareKeys(const PRUnichar* k1, const PRUnichar* k2) -{ - return nsCRT::strcmp(k1, k2) == 0; -} - -NS_BASE nsIAtom* NS_NewAtom(const char* isolatin1) -{ - nsAutoString tmp(isolatin1); - return NS_NewAtom(tmp.GetUnicode()); -} - -NS_BASE nsIAtom* NS_NewAtom(const nsString& aString) -{ - return NS_NewAtom(aString.GetUnicode()); -} - -NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* us) -{ - if (nsnull == gAtomHashTable) { - gAtomHashTable = PL_NewHashTable(8, (PLHashFunction) HashKey, - (PLHashComparator) CompareKeys, - (PLHashComparator) nsnull, - nsnull, nsnull); - } - PRInt32 uslen; - PRInt32 hashCode = nsCRT::HashCode(us, &uslen); - PLHashEntry** hep = PL_HashTableRawLookup(gAtomHashTable, hashCode, us); - PLHashEntry* he = *hep; - if (nsnull != he) { - nsIAtom* id = (nsIAtom*) he->value; - NS_ADDREF(id); - return id; - } - AtomImpl* id = new(us, uslen) AtomImpl(); - PL_HashTableRawAdd(gAtomHashTable, hep, hashCode, id->mString, id); - NS_ADDREF(id); - return id; -} - -NS_BASE nsrefcnt NS_GetNumberOfAtoms(void) -{ - if (nsnull != gAtomHashTable) { - NS_PRECONDITION(nsrefcnt(gAtomHashTable->nentries) == gAtoms, "bad atom table"); - } - return gAtoms; -} diff --git a/mozilla/base/src/nsBTree.cpp b/mozilla/base/src/nsBTree.cpp deleted file mode 100644 index a771d94aaac..00000000000 --- a/mozilla/base/src/nsBTree.cpp +++ /dev/null @@ -1,403 +0,0 @@ - -/** - * This file defines the binary tree class and it - * nsNode child class. - * - * This simple version stores nodes, and the - * nodes store void* ptrs. - * - * @update gess 4/11/98 - * @param - * @return - */ - -#include "nsBTree.h" - -/** - * default constructor - * - * @update gess 4/11/98 - */ -nsNode::nsNode(){ - mLeft=0; - mRight=0; - mParent=0; - mColor=eBlack; -} - - -/** - * Copy constructor - * - * @update gess 4/11/98 - * @param - * @return - */ -nsNode::nsNode(const nsNode& aNode){ - mLeft=aNode.mLeft; - mRight=aNode.mRight; - mParent=aNode.mParent; - mColor=aNode.mColor; -} - -/** - * destructor - * - * @update gess 4/11/98 - */ -nsNode::~nsNode(){ -} - -/** - * Retrive ptr to parent node - * - * @update gess 4/11/98 - * @return ptr to parent node - */ -nsNode* nsNode::GetParentNode(void) const{ - return mParent; -} - -/** - * Retrieve ptr to left (less) node - * - * @update gess 4/11/98 - * @return ptr to left (may be NULL) - */ -nsNode* nsNode::GetLeftNode(void) const{ - return mLeft; -} - -/** - * Retrieve ptr to right (more) node - * - * @update gess 4/11/98 - * @return ptr to right node (may be NULL) - */ -nsNode* nsNode::GetRightNode(void) const{ - return mRight; -} - - -/** - * - * - * @update gess 4/11/98 - * @param - * @return - */ -nsNode& nsNode::operator=(const nsNode& aNode){ - if(this!=&aNode){ - mLeft=aNode.mLeft; - mRight=aNode.mRight; - mParent=aNode.mParent; - mColor=aNode.mColor; - } - return *this; -} - -/******************************************************** - * Here comes the BTREE class... - ********************************************************/ - -/** - * nsBTree constructor - * - * @update gess 4/11/98 - */ -nsBTree::nsBTree(){ - mRoot=0; -} - - -/** - * destructor - * - * @update gess 4/11/98 - */ -nsBTree::~nsBTree(){ - if(mRoot){ - //walk the tree and destroy the children. - } -} - -/** - * Given a node, we're supposed to add it into - * our tree. - * - * @update gess 4/11/98 - * @param aNode to be added to tree - * @return ptr to added node or NULL - */ -nsNode* nsBTree::Add(nsNode& aNode){ - PRBool result=PR_TRUE; - - nsNode* node1=mRoot; //x - nsNode* node2=0; //y - while(node1) { - node2=node1; - if(aNode<*node1) - node1=node1->mLeft; - else node1=node1->mRight; - } - aNode.mParent=node2; - if(!node2){ - mRoot=&aNode; - } - else{ - if(aNode<*node2) - node2->mLeft=&aNode; - else node2->mRight=&aNode; - } - - return &aNode; -} - - -/** - * Removes given node from tree if present. - * - * @update gess 4/11/98 - * @param aNode to be found and removed - * @return ptr to remove node, or NULL - */ -nsNode* nsBTree::Remove(nsNode& aNode){ - nsNode* result=0; - nsNode* node3=Find(aNode); - - if(node3) { - nsNode* node1; - nsNode* node2; - - if((!node3->mLeft) || (!node3->mRight)) - node2=node3; - else node2=After(*node3); - - if(node2->mLeft) - node1=node2->mLeft; - else node1=node2->mRight; - - if(node1) - node1->mParent=node2->mParent; - - if(node2->mParent) { - if(node2==node2->mParent->mLeft) - node2->mParent->mLeft=node1; - else node2->mParent->mRight=node1; - } - else mRoot=node1; - - if(node2!=node3) - (*node3)==(*node2); - - if(node2->mColor == nsNode::eBlack) - ReBalance(*node1); - - delete node2; - result=&aNode; - } - return result; -} - -/** - * Clears the tree of any data. - * Be careful here if your objects are heap based! - * This method doesn't free the objects, so if you - * don't have your own pointers, they will become - * orphaned. - * - * @update gess 4/11/98 - * @param - * @return this - */ -nsBTree& nsBTree::Empty(nsNode* aNode) { - mRoot=0; - return *this; -} - -/** - * This method destroys all the objects in the tree. - * WARNING: Never call this method on stored objects - * that are stack-based! - * - * @update gess 4/11/98 - * @param - * @return this - */ -nsBTree& nsBTree::Erase(nsNode* aNode){ - nsNode* node1 =(aNode) ? aNode : mRoot; - - if(aNode) { - Erase(aNode->mLeft); //begin by walking left side - Erase(aNode->mRight); //then search right side - delete aNode; //until a leaf, then delete - } - return *this; -} - -/** - * Retrieve ptr to first node in tree - * - * @update gess 4/11/98 - * @return - */ -nsNode* nsBTree::First(void) const{ - if(mRoot) - return First(*mRoot); - return 0; -} - -/** - * Retrive ptr to first node rel to given node - * - * @update gess 4/11/98 - * @param node to begin scan from - * @return ptr to first node from given node or NULL - */ -nsNode* nsBTree::First(const nsNode& aNode) const{ - nsNode* result=0; - - if(mRoot) { - result=mRoot; - while(result->GetLeftNode()) { - result=result->GetLeftNode(); - } - } - return result; -} - -/** - * Retrive ptr to last node - * - * @update gess 4/11/98 - * @return ptr to last node rel to root or NULL - */ -nsNode* nsBTree::Last(void) const{ - if(mRoot) - return Last(*mRoot); - return 0; -} - -/** - * Retrive ptr to last node rel to given node - * - * @update gess 4/11/98 - * @param node to begin scan from - * @return ptr to first node from given node or NULL - */ -nsNode* nsBTree::Last(const nsNode& aNode) const{ - nsNode* result=0; - - if(mRoot) { - result=mRoot; - while(result->GetRightNode()) { - result=result->GetRightNode(); - } - } - return result; -} - - -/** - * Retrive ptr to prior node rel to given node - * - * @update gess 4/11/98 - * @param node to begin scan from - * @return ptr to prior node from given node or NULL - */ -nsNode* nsBTree::Before(const nsNode& aNode) const{ - - if(aNode.GetLeftNode()) - return Last(*aNode.GetLeftNode()); - - //otherwise... - - nsNode* node1=(nsNode*)&aNode; - nsNode* node2=aNode.GetParentNode(); - - while((node2) && (node1==node2->GetLeftNode())) { - node1=node2; - node2=node2->GetParentNode(); - } - return node2; -} - - -/** - * Retrive ptr to next node rel to given node - * - * @update gess 4/11/98 - * @param node to begin scan from - * @return ptr to next node from given node or NULL - */ -nsNode* nsBTree::After(const nsNode& aNode) const{ - - if(aNode.GetRightNode()) - return First(*aNode.GetRightNode()); - - //otherwise... - - nsNode* node1=(nsNode*)&aNode; - nsNode* node2=aNode.GetParentNode(); - - while((node2) && (node1==node2->GetRightNode())) { - node1=node2; - node2=node2->GetParentNode(); - } - - return node2; -} - -/** - * Scan for given node - * - * @update gess 4/11/98 - * @param node to find - * @return ptr to given node, or NULL - */ -nsNode* nsBTree::Find(const nsNode& aNode) const{ - nsNode* result=mRoot; - - while((result) && (!(aNode==(*result)))) { - if(aNode<*result) - result=result->mLeft; - else result=result->mRight; - } - return (nsNode*)result; -} - -/** - * Rebalances tree around the given node. This only - * needs to be called after a node is deleted. - * This method does nothing for btrees, but is - * needed for RBTrees. - * - * @update gess 4/11/98 - * @param aNode -- node to balance around - * @return this - */ -nsBTree& nsBTree::ReBalance(nsNode& aNode){ - return *this; -} - - -/** - * - * - * @update gess 4/11/98 - * @param - * @return - */ -const nsBTree& nsBTree::ForEach(nsNodeFunctor& aFunctor,nsNode* aNode) const{ - nsNode* node1 =(aNode) ? aNode : mRoot; - - if(node1) { - if(node1->mLeft) - ForEach(aFunctor,node1->mLeft); //begin by walking left side - aFunctor(*node1); - if(node1->mRight) - ForEach(aFunctor,node1->mRight); //then search right side - } - return *this; -} - diff --git a/mozilla/base/src/nsBTree.h b/mozilla/base/src/nsBTree.h deleted file mode 100644 index 62b79b8b654..00000000000 --- a/mozilla/base/src/nsBTree.h +++ /dev/null @@ -1,283 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -/** - * This file defines the binary tree class and it - * nsNode child class. Note that like all nsBTree - * containers, this one does not automatically balance. - * (Find for random data, bad for pre-ordered data). - * - * This simple version stores nodes, and the - * nodes store void* ptrs. - * - * @update gess 4/11/98 - */ - - -/** - * nsNode - * - * @update gess 4/11/98 - * @param - * @return - */ - -#ifndef _BTREE_H -#define _BTREE_H - -#include "nscore.h" - -struct NS_BASE nsNode { - - /** - * - * @update gess4/20/98 - * @param - * @return - */ - nsNode(); - - /** - * Copy constructor - * @update gess 4/11/98 - */ - nsNode(const nsNode& aNode); - - /** - * destructor - * @update gess 4/11/98 - */ - virtual ~nsNode(); - - /** - * Retrieve parent node - * - * @update gess 4/11/98 - * @return - */ - nsNode* GetParentNode(void) const; - - /** - * - * @update gess 4/11/98 - * @param - * @return - */ - nsNode* GetLeftNode() const; - - /** - * - * @update gess 4/11/98 - * @param - * @return - */ - nsNode* GetRightNode() const; - - /** - * - * @update gess 4/11/98 - * @param - * @return - */ - virtual nsNode& operator=(const nsNode& aNode); - - - /** - * This method gets called to determine which of - * two nodes is less. When you create your own - * subclass of nsNode, this is the most important - * method for you to overload. - * - * @update gess 4/11/98 - * @param - * @return - */ - virtual PRBool operator<(const nsNode& aNode) const=0; - - /** - * This method gets called to determine which of - * two nodes is less. When you create your own - * subclass of nsNode, this is the most important - * method for you to overload. - * - * @update gess 4/11/98 - * @param - * @return - */ - virtual PRBool operator==(const nsNode& aNode) const=0; - - enum eRBColor {eRed,eBlack}; - - nsNode* mParent; - nsNode* mLeft; - nsNode* mRight; - eRBColor mColor; -}; - -/** - * The Nodefunctor class is used when you want to create - * callbacks between the nsRBTree and your generic code. - * - * @update gess4/20/98 - */ -class NS_BASE nsNodeFunctor { -public: - virtual nsNodeFunctor& operator()(nsNode& aNode)=0; -}; - - -/**************************************************** - * Here comes the nsBTree class... - ****************************************************/ - -class NS_BASE nsBTree { -public: -friend class nsBTreeIterator; - - nsBTree(); - ~nsBTree(); - - /** - * Add given node reference into our tree. - * - * @update gess 4/11/98 - * @param aNode is a ref to a node to be added - * @return newly added node - */ - nsNode* Add(nsNode& aNode); - - /** - * Remove given node reference into our tree. - * - * @update gess 4/11/98 - * @param aNode is a ref to a node to be removed - * @return Ptr to node if found (and removed) or NULL - */ - nsNode* Remove(nsNode& aNode); - - /** - * Clears the tree of any data. - * Be careful here if your objects are heap based! - * This method doesn't free the objects, so if you - * don't have your own pointers, they will become - * orphaned. - * - * @update gess 4/11/98 - * @param - * @return this - */ - nsBTree& Empty(nsNode* aNode=0); - - /** - * This method destroys all the objects in the tree. - * WARNING: Never call this method on stored objects - * that are stack-based! - * - * @update gess 4/11/98 - * @param - * @return this - */ - nsBTree& Erase(nsNode* aNode=0); - - /** - * Retrieve ptr to 1st node in tree (starting at root) - * - * @update gess 4/11/98 - * @return ptr to 1st node, possible to be NULL - */ - nsNode* First(void) const; - - /** - * Find first node in tree starting at given node - * - * @update gess 4/11/98 - * @param aNode node to begin 1st search from - * @return ptr to 1st node below given node - */ - nsNode* First(const nsNode& aNode) const; - - /** - * Retrieve ptr to last node in tree relative to root. - * - * @update gess 4/11/98 - * @return ptr to last node or NULL - */ - nsNode* Last(void) const; - - /** - * Retrieve ptr to last node in tree relative to given node. - * - * @update gess 4/11/98 - * @param node to find last node from - * @return ptr to last node or NULL - */ - nsNode* Last(const nsNode& aNode) const; - - /** - * Retrieve a ptr to the node that preceeds given node - * - * @update gess 4/11/98 - * @param aNode used as reference to find prev. - * @return ptr to prev node or NULL - */ - nsNode* Before(const nsNode& aNode) const; - - /** - * Retrieve a ptr to the node after given node - * - * @update gess 4/11/98 - * @param aNode used as reference to find next. - * @return ptr to next node or NULL - */ - nsNode* After(const nsNode& aNode) const; - - /** - * Find given node in tree. - * (Why would you want to find a node you already have?) - * - * @update gess 4/11/98 - * @param aNode is the node you're searching for - * @return ptr to node if found, or NULL - */ - nsNode* Find(const nsNode& aNode) const; - - /** - * Walks the tree, starting with root. - * - * @update gess 4/11/98 - */ - virtual const nsBTree& ForEach(nsNodeFunctor& aFunctor,nsNode* aNode=0) const; - -protected: - - /** - * Rebalances tree around the given node. This only - * needs to be called after a node is deleted. - * - * @update gess 4/11/98 - * @param aNode -- node to balance around - * @return this - */ - virtual nsBTree& ReBalance(nsNode& aNode); - - - nsNode* mRoot; -}; - -#endif - diff --git a/mozilla/base/src/nsByteBuffer.cpp b/mozilla/base/src/nsByteBuffer.cpp deleted file mode 100644 index a27f8cbf2c9..00000000000 --- a/mozilla/base/src/nsByteBuffer.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#include "nsIByteBuffer.h" -#include "nsIInputStream.h" -#include "nsCRT.h" - -#define MIN_BUFFER_SIZE 32 - -class ByteBufferImpl : public nsIByteBuffer { -public: - ByteBufferImpl(PRInt32 aBufferSize); - ~ByteBufferImpl(); - - NS_DECL_ISUPPORTS - virtual PRInt32 GetLength() const; - virtual PRInt32 GetBufferSize() const; - virtual char* GetBuffer() const; - virtual PRBool Grow(PRInt32 aNewSize); - virtual PRInt32 Fill(PRInt32* aErrorCode, nsIInputStream* aStream, - PRInt32 aKeep); - - char* mBuffer; - PRInt32 mSpace; - PRInt32 mLength; -}; - -ByteBufferImpl::ByteBufferImpl(PRInt32 aBufferSize) -{ - if (PRUint32(aBufferSize) < MIN_BUFFER_SIZE) { - aBufferSize = MIN_BUFFER_SIZE; - } - mSpace = aBufferSize; - mBuffer = new char[aBufferSize]; - mLength = 0; - NS_INIT_REFCNT(); -} - -NS_DEFINE_IID(kByteBufferIID,NS_IBYTE_BUFFER_IID); -NS_IMPL_ISUPPORTS(ByteBufferImpl,kByteBufferIID) - -ByteBufferImpl::~ByteBufferImpl() -{ - if (nsnull != mBuffer) { - delete mBuffer; - mBuffer = nsnull; - } - mLength = 0; -} - -PRInt32 ByteBufferImpl::GetLength() const -{ - return mLength; -} - -PRInt32 ByteBufferImpl::GetBufferSize() const -{ - return mSpace; -} - -char* ByteBufferImpl::GetBuffer() const -{ - return mBuffer; -} - -PRBool ByteBufferImpl::Grow(PRInt32 aNewSize) -{ - if (PRUint32(aNewSize) < MIN_BUFFER_SIZE) { - aNewSize = MIN_BUFFER_SIZE; - } - char* newbuf = new char[aNewSize]; - if (nsnull != newbuf) { - if (0 != mLength) { - nsCRT::memcpy(newbuf, mBuffer, mLength); - } - delete mBuffer; - mBuffer = newbuf; - return PR_TRUE; - } - return PR_FALSE; -} - -PRInt32 ByteBufferImpl::Fill(PRInt32* aErrorCode, nsIInputStream* aStream, - PRInt32 aKeep) -{ - NS_PRECONDITION(nsnull != aStream, "null stream"); - NS_PRECONDITION(PRUint32(aKeep) <= PRUint32(mLength), "illegal keep count"); - if ((nsnull == aStream) || (PRUint32(aKeep) > PRUint32(mLength))) { - // whoops - *aErrorCode = NS_INPUTSTREAM_ILLEGAL_ARGS; - return -1; - } - - if (0 != aKeep) { - // Slide over kept data - nsCRT::memmove(mBuffer, mBuffer + (mLength - aKeep), aKeep); - } - - // Read in some new data - mLength = aKeep; - PRInt32 amount = mSpace - aKeep; - PRInt32 nb = aStream->Read(aErrorCode, mBuffer, aKeep, amount); - if (nb > 0) { - mLength += nb; - } - return nb; -} - -NS_BASE nsresult NS_NewByteBuffer(nsIByteBuffer** aInstancePtrResult, - nsISupports* aOuter, - PRInt32 aBufferSize) -{ - if (nsnull != aOuter) { - return NS_ERROR_NO_AGGREGATION; - } - ByteBufferImpl* it = new ByteBufferImpl(aBufferSize); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return it->QueryInterface(kByteBufferIID, (void **) aInstancePtrResult); -} diff --git a/mozilla/base/src/nsCRT.cpp b/mozilla/base/src/nsCRT.cpp deleted file mode 100644 index c4ac141a2ad..00000000000 --- a/mozilla/base/src/nsCRT.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#include "nsCRT.h" - -// XXX Bug: These tables don't lowercase the upper 128 characters properly - -// This table maps uppercase characters to lower case characters; -// characters that are neither upper nor lower case are unaffected. -static const unsigned char kUpper2Lower[256] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, - - // upper band mapped to lower [A-Z] => [a-z] - 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122, - - 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - -static const unsigned char kLower2Upper[256] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, - - // lower band mapped to upper [a-z] => [A-Z] - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - - 123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - -static const PRUnichar kIsoLatin1ToUCS2[256] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 -}; - -//---------------------------------------------------------------------- - -#define TOLOWER(_ucs2) \ - (((_ucs2) < 256) ? PRUnichar(kUpper2Lower[_ucs2]) : _ToLower(_ucs2)) - -#define TOUPPER(_ucs2) \ - (((_ucs2) < 256) ? PRUnichar(kLower2Upper[_ucs2]) : _ToUpper(_ucs2)) - -static PRUnichar _ToLower(PRUnichar aChar) -{ - // XXX need i18n code here - return aChar; -} - -static PRUnichar _ToUpper(PRUnichar aChar) -{ - // XXX need i18n code here - return aChar; -} - -//---------------------------------------------------------------------- - -PRUnichar nsCRT::ToUpper(PRUnichar aChar) -{ - return TOUPPER(aChar); -} - -PRUnichar nsCRT::ToLower(PRUnichar aChar) -{ - return TOLOWER(aChar); -} - -PRInt32 nsCRT::strlen(const PRUnichar* s) -{ - PRInt32 len = 0; - while (*s++ != 0) { - len++; - } - return len; -} - -PRInt32 nsCRT::strcmp(const PRUnichar* s1, const PRUnichar* s2) -{ - for (;;) { - PRUnichar c1 = *s1++; - PRUnichar c2 = *s2++; - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - if (c1 == 0) break; - } - return 0; -} - -// characters following a null character are not compared -PRInt32 nsCRT::strncmp(const PRUnichar* s1, const PRUnichar* s2, PRInt32 n) -{ - while (--n >= 0) { - PRUnichar c1 = *s1++; - PRUnichar c2 = *s2++; - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - if (c1 == 0) break; - } - return 0; -} - -PRInt32 nsCRT::strcasecmp(const PRUnichar* s1, const PRUnichar* s2) -{ - for (;;) { - PRUnichar c1 = *s1++; - PRUnichar c2 = *s2++; - if (c1 != c2) { - c1 = TOLOWER(c1); - c2 = TOLOWER(c2); - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - } - if (c1 == 0) break; - } - return 0; -} - -PRInt32 nsCRT::strncasecmp(const PRUnichar* s1, const PRUnichar* s2, PRInt32 n) -{ - while (--n >= 0) { - PRUnichar c1 = *s1++; - PRUnichar c2 = *s2++; - if (c1 != c2) { - c1 = TOLOWER(c1); - c2 = TOLOWER(c2); - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - } - if (c1 == 0) break; - } - return 0; -} - -PRInt32 nsCRT::strcmp(const PRUnichar* s1, const char* s2) -{ - for (;;) { - PRUnichar c1 = *s1++; - PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++]; - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - if (c1 == 0) break; - } - return 0; -} - -PRInt32 nsCRT::strncmp(const PRUnichar* s1, const char* s2, PRInt32 n) -{ - while (--n >= 0) { - PRUnichar c1 = *s1++; - PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++]; - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - if (c1 == 0) break; - } - return 0; -} - -PRInt32 nsCRT::strcasecmp(const PRUnichar* s1, const char* s2) -{ - for (;;) { - PRUnichar c1 = *s1++; - PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++]; - if (c1 != c2) { - c1 = TOLOWER(c1); - c2 = TOLOWER(c2); - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - } - if (c1 == 0) break; - } - return 0; -} - -PRInt32 nsCRT::strncasecmp(const PRUnichar* s1, const char* s2, PRInt32 n) -{ - while (--n >= 0) { - PRUnichar c1 = *s1++; - PRUnichar c2 = kIsoLatin1ToUCS2[*(const unsigned char*)s2++]; - if (c1 != c2) { - c1 = TOLOWER(c1); - c2 = TOLOWER(c2); - if (c1 != c2) { - if (c1 < c2) return -1; - return 1; - } - } - if (c1 == 0) break; - } - return 0; -} - -PRInt32 nsCRT::HashCode(const PRUnichar* us) -{ - PRInt32 rv = 0; - PRUnichar ch; - while ((ch = *us++) != 0) { - // FYI: rv = rv*37 + ch - rv = ((rv << 5) + (rv << 2) + rv) + ch; - } - return rv; -} - -PRInt32 nsCRT::HashCode(const PRUnichar* us, PRInt32* uslenp) -{ - PRInt32 rv = 0; - PRInt32 len = 0; - PRUnichar ch; - while ((ch = *us++) != 0) { - // FYI: rv = rv*37 + ch - rv = ((rv << 5) + (rv << 2) + rv) + ch; - len++; - } - *uslenp = len; - return rv; -} - -PRInt32 nsCRT::atoi( const PRUnichar *string ) -{ - return atoi(string); -} - diff --git a/mozilla/base/src/nsCRT.h b/mozilla/base/src/nsCRT.h deleted file mode 100644 index 0161c67e129..00000000000 --- a/mozilla/base/src/nsCRT.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#ifndef nsCRT_h___ -#define nsCRT_h___ - -#include -#include -#include "plstr.h" -#include "nscore.h" - -/// This is a wrapper class around all the C runtime functions. - -class NS_BASE nsCRT { -public: - /** Copy bytes from aSrc to aDest. - @param aDest the destination address - @param aSrc the source address - @param aCount the number of bytes to copy - */ - static void memcpy(void* aDest, const void* aSrc, PRInt32 aCount) { - ::memcpy(aDest, aSrc, (size_t)aCount); - } - - static void memmove(void* aDest, const void* aSrc, PRInt32 aCount) { - ::memmove(aDest, aSrc, (size_t)aCount); - } - - static void memset(void* aDest, PRUint8 aByte, PRInt32 aCount) { - ::memset(aDest, aByte, aCount); - } - - static void zero(void* aDest, PRInt32 aCount) { - ::memset(aDest, 0, (size_t)aCount); - } - - /** Compute the string length of s - @param s the string in question - @return the length of s - */ - static PRInt32 strlen(const char* s) { - return PRInt32(::strlen(s)); - } - - /// Compare s1 and s2. - static PRInt32 strcmp(const char* s1, const char* s2) { - return PRInt32(PL_strcmp(s1, s2)); - } - - /// Case-insensitive string comparison. - static PRInt32 strcasecmp(const char* s1, const char* s2) { - return PRInt32(PL_strcasecmp(s1, s2)); - } - - /// Case-insensitive string comparison with length - static PRInt32 strncasecmp(const char* s1, const char* s2, PRInt32 aMaxLen) { - return PRInt32(PL_strncasecmp(s1, s2, aMaxLen)); - } - - /// Like strlen except for ucs2 strings - static PRInt32 strlen(const PRUnichar* s); - - /// Like strcmp except for ucs2 strings - static PRInt32 strcmp(const PRUnichar* s1, const PRUnichar* s2); - /// Like strcmp except for ucs2 strings - static PRInt32 strncmp(const PRUnichar* s1, const PRUnichar* s2, - PRInt32 aMaxLen); - - /// Like strcasecmp except for ucs2 strings - static PRInt32 strcasecmp(const PRUnichar* s1, const PRUnichar* s2); - /// Like strncasecmp except for ucs2 strings - static PRInt32 strncasecmp(const PRUnichar* s1, const PRUnichar* s2, - PRInt32 aMaxLen); - - /// Like strcmp with a char* and a ucs2 string - static PRInt32 strcmp(const PRUnichar* s1, const char* s2); - /// Like strncmp with a char* and a ucs2 string - static PRInt32 strncmp(const PRUnichar* s1, const char* s2, - PRInt32 aMaxLen); - - /// Like strcasecmp with a char* and a ucs2 string - static PRInt32 strcasecmp(const PRUnichar* s1, const char* s2); - /// Like strncasecmp with a char* and a ucs2 string - static PRInt32 strncasecmp(const PRUnichar* s1, const char* s2, - PRInt32 aMaxLen); - - /// Compute a hashcode for a ucs2 string - static PRInt32 HashCode(const PRUnichar* s1); - - /// Same as above except that we return the length in s1len - static PRInt32 HashCode(const PRUnichar* s1, PRInt32* s1len); - - /// String to integer. - static PRInt32 atoi( const PRUnichar *string ); - - static PRUnichar ToUpper(PRUnichar aChar); - - static PRUnichar ToLower(PRUnichar aChar); -}; - -#endif /* nsCRT_h___ */ diff --git a/mozilla/base/src/nsDeque.cpp b/mozilla/base/src/nsDeque.cpp deleted file mode 100644 index c221ec9aaf3..00000000000 --- a/mozilla/base/src/nsDeque.cpp +++ /dev/null @@ -1,433 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - - -#include "nsDeque.h" -#include "nsCRT.h" - -/** - * Standard constructor - * @update gess4/18/98 - * @return new deque - */ -nsDeque::nsDeque(nsDequeFunctor& aMemDestroyer) : mMemDestroyer(aMemDestroyer) { - mMemDestroyer=aMemDestroyer; - mCapacity=eGrowthDelta; - mOrigin=mSize=0; - mData=new void*[mCapacity]; -} - - -/** - * Destructor - * @update gess4/18/98 - */ -nsDeque::~nsDeque() { - Erase(); - delete [] mData; - mData=0; -} - - -/** - * Returns the number of elements currently stored in - * this deque. - * - * @update gess4/18/98 - * @param - * @return int contains element count - */ -PRInt32 nsDeque::GetSize(void) const { - return mSize; -} - -/** - * Remove all items from container without destroying them. - * - * @update gess4/18/98 - * @param - * @return - */ -nsDeque& nsDeque::Empty() { - nsCRT::zero(mData,mCapacity*sizeof(mData)); - mSize=0; - mOrigin=0; - return *this; -} - -/** - * Remove and delete all items from container - * - * @update gess4/18/98 - * @return this - */ -nsDeque& nsDeque::Erase() { - ForEach(mMemDestroyer); - return Empty(); -} - - -/** - * This method adds an item to the end of the queue. - * This operation has the potential to cause the - * underlying buffer to resize. - * - * @update gess4/18/98 - * @param anItem: new item to be added to queue - * @return nada - */ -nsDeque& nsDeque::Push(void* anItem) { - if(mSize==mCapacity) { - void** temp=new void*[mCapacity+eGrowthDelta]; - - //Here's the interesting part: You can't just move the elements - //directy (in situ) from the old buffer to the new one. - //Since capacity has changed, the old origin doesn't make - //sense anymore. It's better to resequence the elements now. - - int tempi=0; - int i=0; - int j=0; - for(i=mOrigin;i0) { - result=mData[mOrigin]; - mData[mOrigin++]=0; //zero it out for debugging purposes. - mSize--; - if(0==mSize) - mOrigin=0; - } - return result; -} - -/** - * Remove and return the last item in the container. - * - * @update gess4/18/98 - * @param none - * @return ptr to last item in container - */ -void* nsDeque::PopBack(void) { - void* result=0; - if(mSize>0) { - int offset=mOrigin+mSize; - if(offset>=mCapacity) - offset-=mCapacity; - result=mData[offset-1]; - mData[offset-1]=0; - mSize--; - if(0==mSize) - mOrigin=0; - } - return result; -} - -/** - * Call this to retrieve the ith element from this container. - * Keep in mind that accessing the underlying elements is - * done in a relative fashion. Object 0 is not necessarily - * the first element (the first element is at mOrigin). - * - * @update gess4/18/98 - * @param anIndex : 0 relative offset of item you want - * @return void* or null - */ -void* nsDeque::ObjectAt(PRInt32 anIndex) const { - void* result=0; - - if((anIndex>=0) && (anIndexoperator==(anIter)); -} - - -/** - * Compare 2 iterators for equivalence. - * - * @update gess4/18/98 - * @param anIter is the other iterator to be compared to - * @return TRUE if EQUAL - */ -PRBool nsDequeIterator::operator<(nsDequeIterator& anIter) { - return PRBool(((mIndex=(nsDequeIterator& anIter) { - return PRBool(((mIndex>=anIter.mIndex) && (&mDeque==&anIter.mDeque))); -} - -/** - * Pre-increment operator - * - * @update gess4/18/98 - * @return object at preincremented index - */ -void* nsDequeIterator::operator++() { - return mDeque.ObjectAt(++mIndex); -} - -/** - * Post-increment operator - * - * @update gess4/18/98 - * @param param is ignored - * @return object at post-incremented index - */ -void* nsDequeIterator::operator++(int) { - return mDeque.ObjectAt(mIndex++); -} - -/** - * Pre-decrement operator - * - * @update gess4/18/98 - * @return object at pre-decremented index - */ -void* nsDequeIterator::operator--() { - return mDeque.ObjectAt(--mIndex); -} - -/** - * Post-decrement operator - * - * @update gess4/18/98 - * @param param is ignored - * @return object at post-decremented index - */ -void* nsDequeIterator::operator--(int) { - return mDeque.ObjectAt(mIndex--); -} - -/** - * Dereference operator - * - * @update gess4/18/98 - * @return object at ith index - */ -void* nsDequeIterator::GetCurrent(void) { - return mDeque.ObjectAt(mIndex); -} - -/** - * Call this method when you wanto to iterate all the - * members of the container, passing a functor along - * to call your code. - * - * @update gess4/20/98 - * @param aFunctor object to call for each member - * @return *this - */ -const void* nsDequeIterator::ForEach(nsDequeFunctor& aFunctor) const{ - return mDeque.ForEach(aFunctor); -} - - -/** - * conduct automated self test for this class - * - * @update gess4/18/98 - * @param - * @return - */ -void nsDeque::SelfTest(void) { -#undef _SELFTEST_DEQUE -#ifdef _SELFTEST_DEQUE -#include - - { - nsDeque theDeque(PR_FALSE); //construct a simple one... - - int ints[10]={100,200,300,400,500,600,700,800,900,1000}; - int count=sizeof(ints)/sizeof(int); - - int i=0; - for(i=0;i