This is the full DMAKE source distribution. DMAKE is a Make like tool that
has been written by me and has been used by individuals at the University of
Waterloo. This release replaces all previous releases; which are no longer
supported. Please read the file 'readme/release' which accompanies
this distribution and describes details of this release.
dmake is available for anonymous ftp from plg.uwaterloo.ca.
It is in the pub/dmake directory, set your mode to binary, and copy the
distribution format that suits your target environment the best.
README - Identifies the dmake version in the
pub/dmake directory.
dmake40.tar.gz - GNU Zip compressed tar archive
dmake40.tar.Z - Lempel-Ziv compressed tar archive
dmake40.zip - pkzip archive
dmake40-msdos-exe.zip - MSDOS executalbe zip archive
dmake40.shar01 - xx part shar archive, get all parts
...
dmake40.sharxx
dmake.patchY - Patch Y for dmake
Note that all archives are created on a UNIX system. This means that the
distributions heading for DOS-land need to have the <lf> turned into a
<cr><lf>. There exist a number of filters for doing this (sed comes to mind),
each is easily run over the file tree using a UNIX shell script. Thus I don't
provide two different versions of the archives.
dmake is different from other versions of Make in that it supports significant
enhancements (See the man page). A short summary of the more important
features follows:
. support for portable makefiles
. runs on many platforms (DOS, generic unix [sysv and bsd4.3],
apollo, OS/2, Atari, MAC, and many others)
. significantly enhanced macro facilities
. sophisticated inference algorithm supporting transitive closure
on the inference graph
. support for traversing the file sytem both during making of targets
and during inference
. %-meta rules for specifying rules to be used for inferring
prerequisites
. conditional macros
. proper support for libraries
. parallel making of targets on architectures that support it
. attributed targets
. text diversions
. group recipes
. swapping itself to DISK under MSDOS
. supports MKS extended argument passing convention
. highly configurable
Once you have downloaded and unpacked the source distribution please read
the instructions found in the files contained in the 'readme' sub-directory.
All code found in this distribution is original and written by me except where
noted in the source and the following:
- dbug/dbug package from Fred Fish (dmake DEBUG=1, to make a debugging version
of dmake)
- malloc.c package in dbug/malloc from the NET, see the directory for
attribution.
-dennis
-------------------------------------------------------------------------------
If you have time to complain about being |Dennis Vadura
tired then you don't have enough to do!! |dva...@plg.uwaterloo.ca
===============================================================================
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake dmake/dbug dmake/dbug/dbug dmake/dbug/malloc
# dmake/mac dmake/man dmake/man/dmake.tf.A dmake/msdos
# dmake/msdos/bccdos dmake/msdos/mscdos dmake/msdos/mscdos/config.mk
# dmake/msdos/tccdos dmake/msdos/ztcdos dmake/os2 dmake/os2/ibm
# dmake/os2/mscdos dmake/qnx dmake/readme dmake/tos dmake/unix
# dmake/unix/386ix dmake/unix/bsd43 dmake/unix/bsd43/uw
# dmake/unix/bsd43/vf dmake/unix/coherent dmake/unix/solaris
# dmake/unix/solaris/gcc dmake/unix/sysvr1 dmake/unix/sysvr3
# dmake/unix/sysvr3/pwd dmake/unix/sysvr4 dmake/unix/xenix
# dmake/unix/xenix/pwd
# Wrapped by kent@sparky on Fri Oct 21 16:50:30 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 1 (of 27)."'
if test ! -d 'dmake' ; then
echo shar: Creating directory \"'dmake'\"
mkdir 'dmake'
fi
if test ! -d 'dmake/dbug' ; then
echo shar: Creating directory \"'dmake/dbug'\"
mkdir 'dmake/dbug'
fi
if test ! -d 'dmake/dbug/dbug' ; then
echo shar: Creating directory \"'dmake/dbug/dbug'\"
mkdir 'dmake/dbug/dbug'
fi
if test ! -d 'dmake/dbug/malloc' ; then
echo shar: Creating directory \"'dmake/dbug/malloc'\"
mkdir 'dmake/dbug/malloc'
fi
if test ! -d 'dmake/mac' ; then
echo shar: Creating directory \"'dmake/mac'\"
mkdir 'dmake/mac'
fi
if test ! -d 'dmake/man' ; then
echo shar: Creating directory \"'dmake/man'\"
mkdir 'dmake/man'
fi
if test -f 'dmake/man/dmake.tf.A' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/man/dmake.tf.A'\"
else
echo shar: Extracting \"'dmake/man/dmake.tf.A'\" \(57788 characters\)
sed "s/^X//" >'dmake/man/dmake.tf.A' <<'END_OF_FILE'
X.\" Copyright (c) 1990,1991,1992 Dennis Vadura, All rights reserved.
X.\"
X.ds TB "0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.5i +0.5i +2.0i
X.de Ip
X.fi
X.nr Ip \w'\\$1 'u
X.IP "\\$1" \\n(Ipu
X\\$2
X.nf
X..
X.de Is
X.nr )I \w'\\$1'u
X..
X.de Ii
X.in \\n()Ru
X.nr )E 1
X.ns
X.ne 1.1v
X.it 1 }N
X.di ]B
X\&\\$1
X..
X.TH DMAKE p "UW" "Version 3.9 PL0" "Unsupported Free Software"
X.SH NAME
X\fBdmake\fR \- maintain program groups, or interdependent files
X.SH SYNOPSIS
X.B dmake
X[\-P#] [\-{f|C|K} file] [\-{w|W} target ...]
X[macro[[!][*][+][:]]=\fIvalue\fP ...]
X[\-v{cdfimt}] [\-ABcdeEghiknpqrsStTuVxX] [target ...]
X.SH DESCRIPTION
X.PP
X.B dmake
Xis a re-implementation of the UNIX Make utility with significant enhancements.
X.B dmake
Xexecutes commands found in an external file called a
X.I makefile
Xto update one or more target names.
XEach target may depend on zero or more prerequisite targets.
XIf any of the target's prerequisites is newer than the target or if the target
Xitself does not exist, then
X.B dmake
Xwill attempt to make the target.
X.PP
XIf no
X.B \-f
Xcommand line option is present then
X.B dmake
Xsearches for an existing
X.I makefile
Xfrom the list of prerequisites specified for the special target \fI.MAKEFILES\fR
X(see the STARTUP section for more details).
XIf "\-" is the name of the file specified to the
X.B \-f
Xflag then \fBdmake\fR uses standard input as the source of the makefile text.
X.PP
XAny macro definitions (arguments with embedded "="
Xsigns) that appear on the command line are processed first
Xand supercede definitions for macros of the same name found
Xwithin the makefile. In general it is impossible for definitions found
Xinside the makefile to redefine a macro defined on the command line, see the
XMACROS section for exceptions.
X.PP
XIf no
X.I target
Xnames are specified on the command line, then \fBdmake\fR uses the first
Xnon-special target found in the makefile as the default target.
XSee the
X.B "SPECIAL TARGETS"
Xsection for the list of special targets and their function.
XMakefiles written for most previous
Xversions of
X.I Make
Xwill be handled correctly by
X.B dmake.
XKnown differences between \fBdmake\fR and other versions of make
Xare discussed in the
X.B COMPATIBILITY
Xsection found at the end of this document.
X.B dmake
Xreturns 0 if no errors were detected and a non-zero result if an error
Xoccurred.
X.SH OPTIONS
X.IP "\fB\-A\fR"
XEnable AUGMAKE special inference rule transformations
X(see the "PERCENT(%) RULES" section), these are set to off by default.
X.IP "\fB\-B\fR"
XEnable the use of spaces instead of <tabs> to begin recipe lines.
XThis flag equivalent to the .NOTABS special macro and is further described
Xbelow.
X.IP "\fB\-c\fR"
XUse non-standard comment stripping. If you specify \fB\-c\fP then
X.B dmake
Xwill treat any \fB#\fP character as a start of comment character wherever it
Xmay appear unless it is escaped by a \e.
X.IP "\fB\-C [+]file\fR"
XThis option writes to \fIfile\fP a copy of standard output and
Xstandard error from any child processes and from the
X.B dmake
Xprocess itself. If you specify a \fB+\fP prior to the file name then
Xthe text is appended to the previous contents of \fIfile\fP.
XThis option is active in the MSDOS implementation only and is ignored
Xby non-MSDOS versions of
X.B dmake.
X.IP "\fB\-d\fR"
XDisable the use of the directory cache. Normally \fBdmake\fP caches directories
Xas it checks file timestamps. Giving this flag is equivalent to the
X\&.DIRCACHE attribute or macro being set to \fIno\fP.
X.IP "\fB\-E\fR"
XRead the environment and define all strings of the
Xform '\fBENV\-VAR\fP=\fIevalue\fP'
Xdefined within as macros whose name is \fBENV\-VAR\fP,
Xand whose value is '\fIevalue\fP'.
XThe environment is processed prior to processing the user
Xspecified makefile thereby allowing definitions in the makefile to override
Xdefinitions in the environment.
X.IP "\fB\-e\fR"
XSame as \-E, except that the environment is processed after the
Xuser specified makefile has been processed
X(thus definitions in the environment override definitions in the makefile).
XThe \-e and \-E options are mutually exclusive.
XIf both are given the latter takes effect.
X.IP "\fB\-f file\fR"
XUse \fBfile\fR as the source for the makefile text.
XOnly one \fB\-f\fR option is allowed.
X.IP "\fB\-g\fR"
XGlobally disable group recipe parsing, equivalent to the .IGNOREGROUP
Xattribute or macro being set to \fIyes\fP at the start of the makefile.
X.IP "\fB\-h\fR"
XPrint the command summary for \fBdmake\fR.
X.IP "\fB\-i\fR"
XTells \fBdmake\fR to ignore errors, and continue making other targets.
XThis is equivalent to the .IGNORE attribute or macro.
X.IP "\fB\-K file\fR"
XTurns on \fB.KEEP_STATE\fP state tracking and tells \fBdmake\fP to use
X\fIfile\fP as the state file.
X.IP "\fB\-k\fR"
XCauses \fBdmake\fR to ignore errors caused by command execution and to make
Xall targets not depending on targets that could not be made.
XOrdinarily \fBdmake\fR stops after a command returns a non-zero status,
Xspecifying \fB\-k\fR causes \fBdmake\fR to ignore the error
Xand continue to make as much as possible.
X.IP "\fB\-n\fR"
XCauses \fBdmake\fR to print out what it would have executed,
Xbut does not actually execute the commands. A special check is made for
Xthe string "$(MAKE)" inside a recipe line, if found, the line is expanded
Xand invoked, thereby enabling recursive makes to give a full
Xdescription of all that they will do.
XThe check for "$(MAKE)" is disabled inside group recipes.
X.IP "\fB\-p\fR"
XPrint out a version of the digested makefile in human readable form.
X(useful for debugging, but cannot be re-read by \fBdmake\fP)
X.IP "\fB\-P#\fR"
XOn systems that support multi-processing cause \fBdmake\fP to use \fI#\fP
Xconcurrent child processes to make targets.
XSee the "MULTI PROCESSING" section for more information.
X.IP "\fB\-q\fR"
XCheck and see if the target is up to date. Exits with code 0 if up to date,
X1 otherwise.
X.IP "\fB\-r\fR"
XTells \fBdmake\fR not to read the initial startup makefile, see STARTUP
Xsection for more details.
X.IP "\fB\-s\fR"
XTells \fBdmake\fR to do all its work silently and not echo the commands it is
Xexecuting to stdout (also suppresses warnings).
XThis is equivalent to the .SILENT attribute or macro.
X.IP "\fB\-S\fR"
XForce sequential execution of recipes on architectures which support
Xconcurrent makes. For backward compatibility with old makefiles that have
Xnasty side-effect prerequisite dependencies.
X.IP "\fB\-t\fR"
XCauses \fBdmake\fR to touch the targets and bring them up to date
Xwithout executing any commands.
XNote that targets will not be created if they do not already exist.
X.IP "\fB\-T\fR"
XTells \fBdmake\fP to not perform transitive closure on the inference graph.
X.IP "\fB\-u\fR"
XForce an unconditional update. (ie. do everything that would
Xbe done if everything that a target depended on was out of date)
X.IP "\fB\-v[dfimt]\fR"
XVerbose flag, when making targets print to stdout what we are going to make
Xand what we think its time stamp is. The optional flags \fB[dfimt]\fP can be
Xused to restrict the information that is displayed. In the absence of any
Xoptional flags all are assumed to be given (ie. \fB\-v\fP is equivalent to
X\fB\-vdfimt\fP). The meanings of the optional flags are:
X.RS
X.IP "\fBd\fP"
XNotify of change directory operations only.
X.IP "\fBf\fP"
XNotify of file I/O operations only.
X.IP "\fBi\fP"
XNotify of inference algorithm operation only.
X.IP "\fBm\fP"
XNotify of target update operations only.
X.IP "\fBt\fP"
XKeep any temporary files created; normally they are automatically deleted.
X.RE
X.IP "\fB\-V\fR"
XPrint the version of \fBdmake\fR, and values of builtin macros.
X.IP "\fB\-W target\fR"
XRun \fBdmake\fP pretending that \fItarget\fP is out of date.
X.IP "\fB\-w target\fR"
X\fIWhat if?\fP Show what would be made if \fItarget\fP were out of date.
X.IP "\fB\-x\fR"
XUpon processing the user makefile export all non-internally defined macros
Xto the user's environment. This option together with the \-e option
Xallows SYSV AUGMAKE recursive makes to function as expected.
X.IP "\fB\-X\fR"
XInhibit the execution of \fB#!\fP lines found at the beginning of a makefile.
XThe use of this flag prevents non-termination of recursive make invocations.
X.SH INDEX
XHere is a list of the sections that follow and a short description of each.
XPerhaps you won't have to read the entire man page to find
Xwhat you need.
X.IP \fBSTARTUP\fP 1.9i
XDescribes \fBdmake\fP initialization.
X.IP \fBSYNTAX\fP 1.9i
XDescribes the syntax of makefile expressions.
X.IP \fBATTRIBUTES\fP 1.9i
XDescribes the notion of attributes and how they are used when
Xmaking targets.
X.IP \fBMACROS\fP 1.9i
XDefining and expanding macros.
X.IP "\fBRULES AND TARGETS" 1.9i
XHow to define targets and their prerequisites.
X.IP \fBRECIPES\fP 1.9i
XHow to tell \fBdmake\fP how to make a target.
X.IP "\fBTEXT DIVERSIONS\fP" 1.9i
XHow to use text diversions in recipes and macro expansions.
X.IP "\fBSPECIAL TARGETS\fP" 1.9i
XSome targets are special.
X.IP "\fBSPECIAL MACROS\fP" 1.9i
XMacros used by \fBdmake\fP to alter the processing of the makefile,
Xand those defined by \fBdmake\fP for the user.
X.IP "\fBCONTROL MACROS\fP" 1.9i
XItemized list of special control macros.
X.IP "\fBRUN-TIME MACROS\fP" 1.9i
XDiscussion of special run-time macros such as $@ and $<.
X.IP "\fBFUNCTION MACROS\fP" 1.9i
XGNU style function macros, only $(mktmp ...) for now.
X.IP "\fBCONDITIONAL MACROS\fP" 1.9i
XTarget specific conditional macros.
X.IP "\fBDYNAMIC PREREQUISITES\fP" 1.9i
XProcessing of prerequisites which contain macro expansions in their name.
X.IP "\fBBINDING TARGETS\fP" 1.9i
XThe rules that \fBdmake\fP uses to bind
Xa target to an existing file in the file system.
X.IP "\fBPERCENT(%) RULES\fP" 1.9i
XSpecification of recipes to be used by the inference algorithm.
X.IP "\fBMAKING INFERENCES\fP" 1.9i
XThe rules that \fBdmake\fP uses when inferring how to make a target which
Xhas no explicit recipe. This and the previous section are really a single
Xsection in the text.
X.IP "\fBMAKING TARGETS\fP" 1.9i
XHow \fBdmake\fP makes targets other than libraries.
X.IP "\fBMAKING LIBRARIES\fP" 1.9i
XHow \fBdmake\fP makes libraries.
X.IP "\fBKEEP STATE\fP" 1.9i
XA discussion of how .KEEP_STATE works.
X.IP "\fBMULTI PROCESSING\fP" 1.9i
XDiscussion of \fBdmake's\fP parallel make facilities for architectures that
Xsupport them.
X.IP "\fBCONDITIONALS\fP" 1.9i
XConditional expressions which control the processing of the makefile.
X.IP "\fBEXAMPLES\fP" 1.9i
XSome hopefully useful examples.
X.IP "\fBCOMPATIBILITY\fP" 1.9i
XHow \fBdmake\fP compares with previous versions of make.
X.IP "\fBLIMITS\fP" 1.9i
XLimitations of \fBdmake\fP.
X.IP \fBPORTABILITY\fP 1.9i
XComments on writing portable makefiles.
X.IP \fBFILES\fP 1.9i
XFiles used by \fBdmake\fP.
X.IP "\fBSEE ALSO\fP" 1.9i
XOther related programs, and man pages.
X.IP "\fBAUTHOR\fP" 1.9i
XThe guy responsible for this thing.
X.IP \fBBUGS\fP 1.9i
XHope not.
X.SH STARTUP
XWhen
X.B dmake
Xbegins execution it first processes the command line and then processes
Xan initial startup-makefile.
XThis is followed by an attempt to locate and process a user supplied makefile.
XThe startup file defines the default values of all required control macros
Xand the set of default rules for making targets and inferences.
XWhen searching for the startup makefile,
X.B dmake
Xsearches the following locations, in the order specified,
Xuntil a startup file is located:
X.LP
X.RS
X.IP 1.
XThe location given as the value of the macro
XMAKESTARTUP defined on the command line.
X.IP 2.
XThe location given as the value of the environment variable MAKESTARTUP
Xdefined in the current environment.
X.IP 3.
XThe location given as the value of the macro
XMAKESTARTUP defined internally within \fBdmake\fP.
X.RE
X.LP
XThe above search is disabled by specifying the \-r option on the command line.
XAn error is issued if a startup makefile cannot be found and the \-r
Xoption was not specified.
XA user may substitute a custom startup file by defining
Xthe MAKESTARTUP environment variable or by redefining the
XMAKESTARTUP macro on the command line.
XTo determine where
X.B dmake
Xlooks for the default startup file, check your environment or issue the command
X\fI"dmake \-V"\fP.
X.PP
XA similar search is performed to locate a default user makefile when no
X\fB\-f\fP command line option is specified.
XBy default, the prerequisite list of the special target .MAKEFILES
Xspecifies the names of possible makefiles and the search order that
X\fBdmake\fP should use to determine if one exists.
XA typical definition for this target is:
X.RS
X.sp
X\&.MAKEFILES : makefile.mk Makefile makefile
X.sp
X.RE
X\fBdmake\fP will first look for makefile.mk and then the others.
XIf a prerequisite
Xcannot be found \fBdmake\fP will try to make it before going on to the next
Xprerequisite. For example, makefile.mk can be checked out of an RCS file
Xif the proper rules for doing so are defined in the startup file.
X.PP
XIf the first line of the user makefile is of the form:
X.RS
X.sp
X\#! command command_args
X.sp
X.RE
Xthen \fBdmake\fP will expand and run the command prior to reading any
Xadditional input. If the return code of the command is zero then \fBdmake\fP
Xwill continue on to process the remainder of the user makefile, if the return
Xcode is non-zero then dmake will exit.
X.PP
X\fBdmake\fP builds the internal dependency graph as it parses a user specified
Xmakefile. The graph is rooted at the special target \fB.ROOT\fP. .ROOT is the
Xtop level target that dmake builds when it starts to build targets. All user
Xspecified targets (those from the command line or taken as defaults from
Xthe makefile) are made prerequisites of the special target \fB.TARGETS\fP.
X\fBdmake\fP by default creates the relationship that .ROOT depends on .TARGETS
Xand as a result everything is made. This approach allows the user to customize, within
Xtheir makefile, the order and which, target, is built first. For example the
Xdefault makefiles come with settings for .ROOT that specify:
X.sp
X.RS
X\&.ROOT .PHONY .NOSTATE .SEQUENTIAL : .INIT .TARGETS .DONE
X.RE
X.sp
Xwith .INIT and .DONE defined as:
X.sp
X.RS
X\&.INIT .DONE :;
X.RE
X.sp
Xwhich nicely emulates the behaviour of Sun's make extensions. The building of
X\&.ROOT's prerequisites is always forced to be sequential.
X.SH SYNTAX
XThis section is a summary of the syntax of makefile statements.
XThe description is given in a style similar to BNF, where { } enclose
Xitems that may appear zero or more times, and [ ] enclose items that
Xare optional. Alternative productions for a left hand side are indicated
Xby '\(->', and newlines are significant. All symbols in \fBbold\fP type
Xare text or names representing text supplied by the user.
X.sp 2
X.RS
X.Ip "Makefile" "\(-> { Statement }"
X.Ip "Statement" "\(-> Macro-Definition"
X\(-> Conditional-Macro-Definition
X\(-> Conditional
X\(-> Rule-Definition
X\(-> Attribute-Definition
X.Ip "Macro-Definition" "\(-> \fBMACRO = LINE\fP"
X\(-> \fBMACRO [\fB!\fR]*= LINE\fP
X\(-> \fBMACRO [\fB!\fR]:= LINE\fP
X\(-> \fBMACRO [\fB!\fR]*:= LINE\fP
X\(-> \fBMACRO [\fB!\fR]+= LINE\fP
X\(-> \fBMACRO [\fB!\fR]+:= LINE\fP
X.Ip "Conditional-Macro-Definition \(-> " "\fBTARGET\fP ?= Macro-Definition"
X.Ip "Conditional \(-> " "\fB\&.IF\fR expression"
X Makefile
X[ \fB.ELIF\fR expression
X Makefile ]
X[ \fB.ELSE\fR
X Makefile ]
X\fB\&.END\fR
X.Ip "expression" "\(-> \fBLINE\fR"
X\(-> \fBSTRING == LINE\fR
X\(-> \fBSTRING != LINE\fR
X.sp
X.Ip "Rule-Definition \(-> " "target-definition"
X [ recipe ]
X.PP
Xtarget-definition \(-> targets [attrs] op { \fBPREREQUISITE\fP } [\fB;\fR rcp-line]
X.Ip "targets" "\(-> target { targets }"
X\(-> \fB"\fRtarget\fB"\fR { targets }
X.Ip "target" "\(-> special-target"
X\(-> \fBTARGET\fR
X.Ip "attrs" "\(-> attribute { attrs }"
X\(-> \fB"\fRattribute\fB"\fR { attrs }
X.Ip "op" "\(-> \fB:\fR { modifier }"
X.Ip "modifier" "\(-> \fB:\fR"
X\(-> \fB^\fR
X\(-> \fB!\fR
X\(-> \fB\-\fR
X\(-> \fB|\fR
X.Ip "recipe" "\(-> { \fBTAB\fR rcp-line }"
X\(-> [\fB@\fR][\fB%\fR][\fB\-\fR] \fB[
X.Is "recipe \(-> "
X.Ii " "
X \fR{ \fBLINE\fR }
X.Ii " "
X\fB]\fR
X.Ip "rcp-line" "\(-> [\fB@\fR][\fB%\fR][\fB\-\fR][\fB+\fR] \fBLINE\fR"
X.sp
X.Ip Attribute-Definition "\(-> attrs \fB:\fR targets"
X.sp
X.Ip "attribute" "\(-> \fB.EPILOG\fR"
X\(-> \fB.GROUP\fR
X\(-> \fB.IGNORE\fR
X\(-> \fB.IGNOREGROUP\fR
X\(-> \fB.LIBRARY\fR
X\(-> \fB.MKSARGS\fR
X\(-> \fB.NOINFER\fR
X\(-> \fB.NOSTATE\fR
X\(-> \fB.PHONY\fR
X\(-> \fB.PRECIOUS\fR
X\(-> \fB.PROLOG\fR
X\(-> \fB.SETDIR=\fIpath\fP\fR
X\(-> \fB.SILENT\fR
X\(-> \fB.SEQUENTIAL\fR
X\(-> \fB.SWAP\fR
X\(-> \fB.USESHELL\fR
X\(-> \fB.SYMBOL\fR
X\(-> \fB.UPDATEALL\fR
X.Ip "special-target" "\(-> \fB.ERROR\fR"
X\(-> \fB.EXIT\fR
X\(-> \fB.EXPORT\fR
X\(-> \fB.GROUPEPILOG\fR
X\(-> \fB.GROUPPROLOG\fR
X\(-> \fB.IMPORT\fR
X\(-> \fB.INCLUDE\fR
X\(-> \fB.INCLUDEDIRS\fR
X\(-> \fB.MAKEFILES\fR
X\(-> \fB.REMOVE\fR
X\(-> \fB.SOURCE\fR
X\(-> \fB.SOURCE.\fIsuffix\fR
X\(-> .\fIsuffix1\fR.\fIsuffix2\fR
X.fi
X.RE
X.sp 1
X.PP
XWhere, \fBTAB\fP represents a <tab> character, \fBSTRING\fP represents an
Xarbitrary sequence of characters, and
X\fBLINE\fP represents a
Xpossibly empty sequence of characters terminated by a non-escaped
X(not immediately preceded by a backslash '\e') new-line character.
X\fBMACRO\fP, \fBPREREQUISITE\fP,
Xand \fBTARGET\fP each represent a string of characters not
Xincluding space or tab which respectively form the name of a macro,
Xprerequisite or target.
XThe name may itself be a macro expansion expression.
XA \fBLINE\fP can be continued over several physical lines by terminating it with
Xa single backslash character. Comments are initiated by the
Xpound \fB#\fR character and extend to the end of line.
XAll comment text is discarded, a '#' may be placed into the makefile text
Xby escaping it with '\e' (ie. \e# translates to # when it is parsed).
XAn exception to this occurs when a # is seen inside
Xa recipe line that begins with a <tab> or is inside a group recipe.
XIf you specify the \fB\-c\fP command line switch then this behavior is
Xdisabled and
X.B dmake
Xwill treat all # characters as start of comment indicators unless they
Xare escaped by \e.
XA set of continued lines may be commented out by placing a single # at the
Xstart of the first line.
XA continued line cannot span more than one makefile.
X.PP
X\fBwhite space\fP is defined to be any combination of
X<space>, <tab>, and the sequence \e<nl>
Xwhen \e<nl> is used to terminate a LINE.
XWhen processing \fBmacro\fP definition lines,
Xany amount of white space is allowed on either side of the macro operator
Xand white space is stripped from both before and after the macro
Xvalue string.
XThe sequence \e<nl> is treated as white space during recipe expansion
Xand is deleted from the final recipe string.
XYou must escape the \e<nl> with another \e in order to get a \e at the end
Xof a recipe line.
XThe \e<nl> sequence is deleted from macro values when they are expanded.
X.PP
XWhen processing \fBtarget\fP definition lines,
Xthe recipe for a target must, in general, follow the first definition
Xof the target (See the RULES AND TARGETS section for an exception), and
Xthe recipe may not span across multiple makefiles.
XAny targets and prerequisites found on a target definition line are taken
Xto be white space separated tokens.
XThe rule operator (\fIop\fP in SYNTAX section) is also considered
Xto be a token but does not require
Xwhite space to precede or follow it. Since the rule operator begins with a `:',
Xtraditional versions of make do not allow the `:' character to
Xform a valid target name. \fBdmake\fP allows `:' to be present in
Xtarget/prerequisite names as long as the entire target/prerequisite name is
Xquoted. For example:
X.sp
X\ta:fred : test
X.sp
Xwould be parsed as TARGET = a, PREREQUISITES={fred, :, test}, which
Xis not what was intended. To fix this you must write:
X.sp
X\t"a:fred" : test
X.sp
XWhich will be parsed as expected. Quoted target and prerequisite
Xspecifications may also contain white space thereby allowing the use of
Xcomplex function macro expressions..
XSee the EXAMPLES section for how to apply \fB"\fP quoting
Xto a list of targets.
X.SH ATTRIBUTES
X.B dmake
Xdefines several target attributes. Attributes may be
Xassigned to a single target, a group of targets, or to all targets in the
Xmakefile. Attributes are used to modify
X\fBdmake\fP actions during target update.
XThe recognized attributes are:
X.sp
X.IP \fB.EPILOG\fP 1.2i
XInsert shell epilog code when executing a group recipe associated with
Xany target having this attribute set.
X.IP \fB.FIRST\fP 1.2i
XUsed in conjunction with .INCLUDE. Terminates the inclusion with the first
Xsuccessfully included prerequisite.
X.IP \fB.GROUP\fP 1.2i
XForce execution of a target's recipe as a group recipe.
X.IP \fB.IGNORE\fP 1.2i
XIgnore an error when trying to make any target with this attribute set.
X.IP \fB.IGNOREGROUP\fP 1.2i
XDisable the special meaning of '[' to initiate a group recipe.
X.IP \fB.LIBRARY\fP 1.2i
XTarget is a library.
X.IP \fB.MKSARGS\fP 1.2i
XIf running in an MSDOS environment then use MKS extended argument passing
Xconventions to pass arguments to commands. Non-MSDOS
Xenvironments ignore this attribute.
X.IP \fB.NOINFER\fP 1.2i
XAny target with this attribute set will not be subjected
Xto transitive closure if it is inferred as a prerequisite
Xof a target whose recipe and prerequisites are being inferred.
X(i.e. the inference algorithm will not use any prerequisite with this attribute
Xset, as a target)
XIf specified as '.NOINFER:' (ie. with no prerequisites or targets) then the
Xeffect is equivalent to specifying \fB\-T\fP on the command line.
X.IP \fB.NOSTATE\fP 1.2i
XAny target with this attribute set will not have command line flag
Xinformation stored in the state file if .KEEP_STATE has been enabled.
X.IP \fB.PHONY\fP 1.2i
XAny target with this attribute set will have its recipe executed
Xeach time the target is made even if a file matching the target name can
Xbe located. Any targets that have a .PHONY attributed target as a
Xprerequisite will be made each time the .PHONY attributed prerequisite is
Xmade.
X.IP \fB.PRECIOUS\fP 1.2i
XDo not remove associated target under any circumstances.
XSet by default for any targets whose corresponding files exist in the file
Xsystem prior to the execution of \fBdmake\fP.
X.IP \fB.PROLOG\fP 1.2i
XInsert shell prolog code when executing a group recipe associated with
Xany target having this attribute set.
X.IP \fB.SEQUENTIAL\fP 1.2i
XForce a sequential make of the associated target's prerequisites.
X.IP \fB.SETDIR\fP 1.2i
XChange current working directory to specified directory when making the
Xassociated target. You must
Xspecify the directory at the time the attribute is specified. To do this
Xsimply give \fI.SETDIR=path\fP as the attribute. \fIpath\fP is expanded and
Xthe result is used as the value of the directory to change to.
XIf \fIpath\fP contains \fB$$@\fP then the name of the target to be built is
Xused in computing the path to change directory to.
XIf path is surrounded by single quotes then path is not expanded, and is used
Xliterally as the directory name.
XIf the \fIpath\fP contains any `:' characters then the entire attribute string
Xmust be quoted using ".
XIf a target having this attribute set also has the .IGNORE
Xattribute set then if the change to the specified directory fails it will be
Xignored, and no error message will be issued.
X.IP \fB.SILENT\fP 1.2i
XDo not echo the recipe lines when making any target with this attribute set,
Xand do not issue any warnings.
X.IP \fB.SWAP\fP 1.2i
XUnder MSDOS
Xwhen making a target with this attribute set swap the \fBdmake\fP executable
Xto disk prior to executing the recipe line. Also see the '%' recipe line
Xflag defined in the RECIPES section.
X.IP \fB.SYMBOL\fP 1.2i
XTarget is a library member and is an entry point into a module in the
Xlibrary. This attribute is used only when searching a library for a target.
XTargets of the form lib((entry)) have this attribute set automatically.
X.IP \fB.USESHELL\fP 1.2i
XForce each recipe line of a target to be executed using a shell.
XSpecifying this attribute is equivalent to specifying the '+' character at the
Xstart of each line of a non-group recipe.
X.IP \fB.UPDATEALL\fP 1.2i
XIndicates that all the targets listed in this rule are updated by the
Xexecution of the accompanying recipe.
XA common example is the production of the
X.I y.tab.c
Xand
X.I y.tab.h
Xfiles by
X.B yacc
Xwhen it is run on a grammar. Specifying .UPDATEALL in such a rule
Xprevents the running of yacc twice, once for the y.tab.c file and once
Xfor the y.tab.h file. .UPDATEALL targets that are specified in a single rule
Xare treated as a single target and all timestamps are updated whenever any
Xtarget in the set is made. As a side-effect, \fBdmake\fP internally sorts
Xsuch targets in ascending alphabetical order and the value of $@ is always
Xthe first target in the sorted set.
X.LP
XAll attributes are user setable and except for .UPDATEALL, .SETDIR and .MKSARGS
Xmay be used in one of two forms.
XThe .MKSARGS attribute is restricted to use as a global attribute, and
Xthe use of the .UPDATEALL and .SETDIR attributes is restricted to rules
Xof the second form only.
X.sp
X\tATTRIBUTE_LIST : \fItargets\fP
X.sp
Xassigns the attributes specified by ATTRIBUTE_LIST to each target in
X.I targets
Xor
X.sp
X\t\fItargets\fP ATTRIBUTE_LIST : ...
X.sp
Xassigns the attributes specified by ATTRIBUTE_LIST to each target in
X.I targets.
XIn the first form if
X.I targets
Xis empty (ie. a NULL list), then the
Xlist of attributes will apply to all targets in the makefile
X(this is equivalent to the common Make construct of \fI".IGNORE :"\fP
Xbut has been modified to the notion of an attribute instead of
Xa special target).
XNot all of the attributes have global meaning.
XIn particular, .LIBRARY, .NOSTATE, .PHONY, .SETDIR, .SYMBOL and .UPDATEALL
Xhave no assigned global meaning.
X.PP
XAny attribute may be used with any target, even with the special targets.
XSome combinations are useless (e.g. .INCLUDE .PRECIOUS: ... ),
Xwhile others are useful (e.g. .INCLUDE .IGNORE : "file.mk" will not complain
Xif file.mk cannot be found using the include file search rules,
Xsee the section on SPECIAL TARGETS for a description of .INCLUDE).
XIf a specified attribute will not be used with the special target a warning
Xis issued and the attribute is ignored.
X.SH MACROS
X.B dmake
Xsupports six forms of macro assignment.
X.sp
X.IP "\fBMACRO = LINE\fP" 1.55i
XThis is the most common and familiar form of macro assignment. It assigns
XLINE literally as the value of MACRO.
XFuture expansions of MACRO recursively expand its value.
X.IP "\fBMACRO *= LINE\fP" 1.55i
XThis form behaves exactly as the simple '=' form with the exception that if
XMACRO already has a value then the assignment is not performed.
X.IP "\fBMACRO := LINE\fP" 1.55i
XThis form differs from the simple '=' form in that it expands LINE
Xprior to assigning it as the value of MACRO.
XFuture expansions of MACRO do not recursively expand its value.
X.IP "\fBMACRO *:= LINE\fP" 1.55i
XThis form behaves exactly as the ':=' form with the exception that if
XMACRO already has a value then the assignment and expansion are not performed.
X.IP "\fBMACRO += LINE\fP" 1.55i
XThis form of macro assignment allows macro values to grow. It takes the
Xliteral value of LINE and appends it to the previous value of MACRO separating
Xthe two by a single space.
XFuture expansions of MACRO recursively expand its value.
X.IP "\fBMACRO +:= LINE\fP" 1.55i
XThis form is similar to the '+=' form except that the value of LINE is expanded
Xprior to being added to the value of MACRO.
X.PP
XMacro expressions specified on the command line allow the macro value
Xto be redefined within the makefile only if the macro is defined using
Xthe '+=' and '+:=' operators. Other operators will define a macro that cannot
Xbe further modified.
X.PP
XEach of the preceeding macro assignment operators may be prefixed by \fB!\fP
Xto indicate that the assignment should be forced and that no warnings should
Xbe issued. Thus, specifying \fB!\fP has the effect of silently forcing the
Xspecified macro assignment.
X.PP
XWhen \fBdmake\fP defines a non-environment macro it strips leading and
Xtrailing white space from the macro value.
XMacros imported from the environment via either the .IMPORT special
Xtarget (see the SPECIAL TARGETS section), or the \fB\-e\fP, or \fB\-E\fP flags
Xare an exception to this rule. Their values are
Xalways taken literally and white space is never stripped.
XIn addition, named macros defined using the .IMPORT special target do
Xnot have their values expanded when they are used within a makefile.
XIn contrast, environment macros that are imported
Xdue to the specification of the \fB\-e\fP or \fB\-E\fP flags
Xare subject to expansion when used.
X.PP
XTo specify a macro expansion
Xenclose the name in () or {} and precede it with a dollar sign $.
XThus $(TEST) represents an expansion of the macro variable named TEST.
XIf TEST is
Xdefined then $(TEST) is replaced by its expanded value. If TEST is not
Xdefined then $(TEST) expands to the NULL string (this is equivalent to
Xdefining a macro as 'TEST=' ). A short form may be used for single character
Xnamed macros. In this case the parentheses are optional, and $(I) is
Xequivalent to $I.
XMacro expansion is recursive, hence, if the value string contains an expression
Xrepresenting a macro expansion, the expansion is performed. Circular macro
Xexpansions are detected and cause an error to be issued.
X.PP
XWhen defining a macro the given macro name is first expanded before being used
Xto define the macro. Thus it is possible to define macros whose names
Xdepend on values of other macros. For example, suppose CWD is defined as
X.sp
X\tCWD = $(PWD:b)
X.sp
Xthen the value of $(CWD) is the name of the current directory.
XThis can be used to define macros specific to this directory, for
Xexample:
X.sp
X\t_$(CWD).prt = list of files to print...
X.sp
XThe actual name of the defined macro is a function of the current directory.
XA construct such as this is useful when processing a hierarchy of directories
Xusing .SETDIR attributed targets and a collection of small distributed
Xmakefile stubs.
X.PP
XMacro variables may be defined within the makefile, on the command
Xline, or imported from the environment.
X.PP
X.B \fBdmake\fR
Xsupports several non-standard macro expansions:
XThe first is of the form:
X.RS
X.IP \fI$(macro_name:modifier_list:modifier_list:...)\fR
X.RE
X.LP
Xwhere
X.I modifier_list
Xis chosen from the set { B or b, D or d, E or e, F or f, I or i, L or l, S or
Xs, T or t, U or u, ^, + } and
X.RS
X.sp
X.Is "b "
X.Ii "b "
X\- file (not including suffix) portion of path names
X.Ii "d"
X\- directory portion of all path names
X.Ii "e"
X\- suffix portion of path names
X.Ii "f"
X\- file (including suffix) portion of path names
X.Ii "i"
X\- inferred names of targets
X.Ii "l"
X\- macro value in lower case
X.Ii "s"
X\- simple pattern substitution
X.Ii "t"
X\- tokenization.
X.Ii "u"
X\- macro value in upper case
X.Ii "^"
X\- prepend a prefix to each token
X.Ii "+"
X\- append a suffix to each token
X.sp
X.RE
XThus if we have the example:
X.LP
X\ttest = d1/d2/d3/a.out f.out d1/k.out
X.LP
XThe following macro expansions produce the values on the right of '\(->' after
Xexpansion.
X.RS
X.sp
X.Is "$(test:s/out/in/:f) "
X.Ii "$(test:d)"
X\(-> d1/d2/d3/ d1/
X.Ii "$(test:b)"
X\(-> a f k
X.Ii "$(test:f)"
X\(-> a.out f.out k.out
X.Ii "${test:db}"
X\(-> d1/d2/d3/a f d1/k
X.Ii "${test:s/out/in/:f}"
X\(-> a.in f.in k.in
X.Ii $(test:f:t"+")
X\(-> a.out+f.out+k.out
X.Ii $(test:e)
X\(-> .out .out .out
X.Ii $(test:u)
X\(-> D1/D2/D3/A.OUT F.OUT D1/K.OUT
X.RE
X.PP
XIf a token ends in a string composed from the value of the macro DIRBRKSTR
X(ie. ends in a directory separator string, e.g. '/' in UNIX) and you use the
X\fB:d\fP modifier then the expansion returns the directory name less the
Xfinal directory separator string. Thus successive pairs of :d modifiers
Xeach remove a level of directory in the token string.
X.PP
XThe tokenization modifier takes all white space separated tokens from the
Xmacro value and separates them by the quoted separator string. The separator
Xstring may contain the following escape codes \ea => <bel>,
X\&\eb => <backspace>, \ef => <formfeed>, \en => <nl>, \er => <cr>,
X\&\et => <tab>, \ev => <vertical tab>, \e" => ", and \exxx => <xxx> where
Xxxx is the octal representation of a character. Thus the
Xexpansion:
X.LP
X.RS
X.nf
X$(test:f:t"+\en")
X.RE
Xproduces:
X.RS
Xa.out+
Xf.out+
Xk.out
X.fi
X.RE
X.PP
XThe prefix operator \fB^\fP takes all white space separated tokens from the
Xmacro value and prepends \fIstring\fP to each.
X.LP
X.RS
X.nf
X$(test:f:^mydir/)
X.RE
Xproduces:
X.RS
Xmydir/a.out mydir/f.out mydir/k.out
X.fi
X.RE
X.PP
XThe suffix operator \fB+\fP takes all white space separated tokens from the
Xmacro value and appends \fIstring\fP to each.
X.LP
X.RS
X.nf
X$(test:b:+.c)
X.RE
Xproduces:
X.RS
Xa.c f.c k.c
X.fi
X.RE
X.PP
XThe next non-standard form of macro expansion allows for recursive macros.
XIt is possible to specify a $(\fImacro_name\fR) or ${\fImacro_name\fR} expansion
Xwhere \fImacro_name\fR contains more $( ... ) or ${ ... } macro expansions
Xitself.
X.PP
XFor example $(CC$(_HOST)$(_COMPILER)) will first expand CC$(_HOST)$(_COMPILER)
Xto get a result and use that result as the name of the macro to expand.
XThis is useful for writing a makefile for more than one target
Xenvironment. As an example consider the following hypothetical case.
XSuppose that _HOST and _COMPILER are imported from the environment
Xand are set to represent the host machine type and the host compiler
Xrespectively.
X.RS
X.sp
X.nf
XCFLAGS_VAX_CC = \-c \-O # _HOST == "_VAX", _COMPILER == "_CC"
XCFLAGS_PC_MSC = \-c \-ML # _HOST == "_PC", _COMPILER == "_MSC"
X.sp
X# redefine CFLAGS macro as:
X.sp
XCFLAGS := $(CFLAGS$(_HOST)$(_COMPILER))
X.fi
X.sp
X.RE
XThis causes CFLAGS to take on a value that corresponds to the
Xenvironment in which the make is being invoked.
X.PP
XThe final non-standard macro expansion is of the form:
X.RS
X.sp
Xstring1{token_list}string2
X.RE
X.LP
Xwhere string1, string2 and token_list are expanded. After expansion,
Xstring1 is prepended to each token found in token_list and
Xstring2 is appended to each resulting token from the previous prepend.
Xstring1 and string2 are not delimited by white space
Xwhereas the tokens in token_list are.
XA null token in the token list
Xis specified using "".
XThus using another example we have:
X.RS
X.sp
X.Is "test/{f1 f2}.o "
X.Ii "test/{f1 f2}.o"
X--> test/f1.o test/f2.o
X.Ii "test/ {f1 f2}.o"
X--> test/ f1.o f2.o
X.Ii "test/{f1 f2} .o"
X--> test/f1 test/f2 .o
X.Ii "test/{""f1"" """"}.o"
X--> test/f1.o test/.o
X.sp
X.Ii and
X.sp
X.Is "test/{d1 d2}/{f1 f2}.o --> "
X.Ii "test/{d1 d2}/{f1 f2}.o --> "
Xtest/d1/f1.o test/d1/f2.o
Xtest/d2/f1.o test/d2/f2.o
X.sp
X.RE
XThis last expansion is activated only when the first characters of
X.I token_list
Xappear immediately after the opening '{' with no intervening white space.
XThe reason for this restriction is the following incompatibility with
XBourne Shell recipes. The line
X.RS
X.sp
X{ echo hello;}
X.sp
X.RE
Xis valid /bin/sh syntax; while
X.RS
X.sp
X{echo hello;}
X.sp
X.RE
Xis not.
XHence the latter triggers the enhanced macro expansion while the former
Xcauses it to be suppressed.
XSee the SPECIAL MACROS section for a description of the special macros that
X\fBdmake\fP defines and understands.
X.SH "RULES AND TARGETS"
XA makefile contains a series of entries that specify dependencies.
XSuch entries are called \fItarget/prerequisite\fP or \fIrule\fP definitions.
XEach rule definition
Xis optionally followed by a set of lines that provide a recipe for updating
Xany targets defined by the rule.
XWhenever
X.B dmake
Xattempts to bring a target up to date and an explicit recipe is provided with
Xa rule defining the target, that recipe is used to update the
Xtarget. A rule definition begins with a line having the following syntax:
X.sp
X.RS
X.nf
X\fI<targets>\fP [\fI<attributes>\fP] \fI<ruleop>\fP [\fI<prerequisites>\fP] [;\fI<recipe>\fP]
X.fi
X.RE
X.sp
X.I targets
Xis a non-empty list of targets. If the target is a
Xspecial target (see SPECIAL TARGETS section below) then it must appear alone
Xon the rule line. For example:
X.sp
X.RS
X\&.IMPORT .ERROR : ...
X.RE
X.sp
Xis not allowed since both .IMPORT and .ERROR are special targets.
XSpecial targets are not used in the construction of the dependency graph and
Xwill not be made.
X.PP
X.I attributes
Xis a possibly empty list of attributes. Any attribute defined in the
XATTRIBUTES section above may be specified. All attributes will be applied to
Xthe list of named targets in the rule definition. No other targets will
Xbe affected.
X.sp
X.IP NOTE: 0.75i
XAs stated earlier,
Xif both the target list and prerequisite list are empty but the attributes
Xlist is not, then the specified attributes affect all targets in the makefile.
X.sp
X.PP
X.I ruleop
Xis a separator which is used to identify the targets from the prerequisites.
XOptionally it also provides a facility for modifying the way in which
X.B dmake
Xhandles the making of the associated targets.
XIn its simplest form the operator is a single ':', and need not be separated
Xby white space from its neighboring tokens. It may additionally be followed
Xby any of the modifiers { !, ^, \-, :, | }, where:
X.sp
X.IP \fB!\fP
Xsays execute the recipe for the associated targets once for each out of date
Xprerequisite. Ordinarily the recipe is executed
Xonce for all out of date prerequisites at the same time.
X.IP \fB^\fP
Xsays to insert the specified prerequisites, if any, before any
Xother prerequisites already associated with the specified targets.
XIn general, it is not useful to specify ^ with an empty
Xlist of prerequisites.
X.IP \fB\-\fP
Xsays to clear the previous list of prerequisites before adding
Xthe new prerequisites. Thus,
X.sp
X\t.SUFFIXES :
X.br
X\t.SUFFIXES : .a .b
X.sp
Xcan be replaced by
X.sp
X\t.SUFFIXES :\- .a .b
X.sp
Xhowever the old form still works as expected. NOTE: .SUFFIXES is ignored by
X.B dmake
Xit is used here simply as an example.
X.IP \fB:\fP
XWhen the rule operator is not modified by a second ':'
Xonly one set of rules may be specified for making a target.
XMultiple definitions may be used to add to the
Xlist of prerequisites that a target depends on.
XHowever, if a target is multiply defined
Xonly one definition may specify a recipe
Xfor making the target.
X.sp
XWhen a target's rule operator is modified by a second ':'
X(:: for example) then this definition may not be the only
Xdefinition with a recipe for the target. There may be other :: target
Xdefinition lines that specify a different set of prerequisites with a
Xdifferent recipe for updating the target.
XAny such target is made if any of the definitions
Xfind it to be out of date
Xwith respect to the related prerequisites
Xand the corresponding recipe is used to update the
Xtarget. By definition all '::' recipes that are found to be out of date for
Xare executed.
X.sp
XIn the following simple example, each rule has a `::' \fIruleop\fP. In such an
Xoperator we call the first `:' the operator, and the second `:' the modifier.
X.sp
X.nf
Xa.o :: a.c b.h
X first recipe for making a.o
X
Xa.o :: a.y b.h
X second recipe for making a.o
X.fi
X.sp
XIf a.o is found to be out of date with respect to a.c then the first recipe
Xis used to make a.o. If it is found out of date with respect to a.y then
Xthe second recipe is used. If a.o is out of date with respect to
Xb.h then both recipes are invoked to make a.o.
XIn the last case the order of invocation corresponds to the order in which the
Xrule definitions appear in the makefile.
X.IP \fB|\fP
XIs defined only for PERCENT rule target definitions. When specified it
Xindicates that the following construct should be parsed using the old
Xsemantinc meaning:
X.sp
X.nf
X%.o :| %.c %.r %.f ; some rule
X.sp
Xis equivalent to:
X.sp
X%.o : %.c ; some rule
X%.o : %.r ; some rule
X%.o : %.f ; some rule
X.fi
X.PP
XTargets defined using a single `:' operator
Xwith a recipe may be redefined again with a new recipe by using a
X`:' operator with a `:' modifier.
XThis is equivalent to a target having been
Xinitially defined with a rule using a `:' modifier.
XOnce a target is defined using a `:'
Xmodifier it may not be defined again with a recipe using only the `:' operator
Xwith no `:' modifier. In both cases the use of a `:' modifier creates a new
Xlist of prerequisites and makes it the current prerequisite list for the target.
XThe `:' operator with no recipe always modifies the current list
Xof prerequisites.
XThus assuming each of the following definitions has a recipe attached, then:
X.RS
X.sp
X.nf
Xjoe : fred ... (1)
Xjoe :: more ... (2)
X.sp
Xand
X.sp
Xjoe :: fred ... (3)
Xjoe :: more ... (4)
X.sp
X.fi
X.RE
Xare legal and mean: add the recipe associated with (2), or (4) to the set
Xof recipes for joe, placing them after existing recipes for
Xmaking joe.
XThe constructs:
X.RS
X.sp
X.nf
Xjoe :: fred ... (5)
Xjoe : more ... (6)
X.sp
Xand
X.sp
Xjoe : fred ... (7)
Xjoe : more ... (8)
X.sp
X.fi
X.RE
Xare errors since we have two sets of perfectly good recipes for
Xmaking the target.
X.PP
X.I prerequisites
Xis a possibly empty list of targets that must be brought up to date before
Xmaking the current target.
X.PP
X.I recipe
Xis a short form and allows the user to specify short rule definitions
Xon a single line.
XIt is taken to be the first recipe line in a larger recipe
Xif additional lines follow the rule definition.
XIf the semi-colon is present but the recipe line is empty (ie. null string)
Xthen it is taken
Xto be an empty rule. Any target so defined causes the
X.I "Don't know how to make ..."
Xerror message to be suppressed when
X.B dmake
Xtries to make the target and fails.
XThis silence is maintained for rules that are terminated
Xby a semicolon and have no following recipe lines, for targets listed on the
Xcommand line, for the first target found in the makefile, and for any target
Xhaving no recipe but containing a list of prerequisites (see the COMPATIBILITY
Xsection for an exception to this rule if the AUGMAKE (\fB\-A\fP) flag
Xwas specified.
X.SH "RECIPES"
XThe traditional format used by most versions of Make defines the recipe
Xlines as arbitrary strings that may contain macro expansions. They
Xfollow a rule definition line and may be spaced
Xapart by comment or blank lines.
XThe list of recipe lines defining the recipe is terminated by a new target
Xdefinition, a macro definition, or end-of-file.
XEach recipe line
X.B MUST
Xbegin with a \fB<TAB>\fP character which
Xmay optionally be followed with one or all
Xof the characters
X.IR "'@%+\-'" "."
XThe
X.I "'\-'"
Xindicates that non-zero exit values (ie. errors)
Xare to be ignored when this recipe line is executed, the
X.I "'\+'"
Xindicates that the current recipe line is to be executed using the shell, the
X.I "'%'"
Xindicates that
X.B dmake
Xshould swap itself out to secondary storage (MSDOS only) before running the
Xrecipe and the
X.I "'@'"
Xindicates that the recipe line should NOT be echoed to the terminal prior to
Xbeing executed. Each switch is off by default
X(ie. by default, errors are significant, commands are echoed, no swapping is
Xdone and a shell is
Xused only if the recipe line contains a character found in the value of the
XSHELLMETAS macro).
XGlobal settings activated via command line options or special attribute or
Xtarget names may also affect these settings.
XAn example recipe:
X.sp
X.RS
X.nf
Xtarget :
X\tfirst recipe line
X\tsecond recipe line, executed independently of the first.
X\t@a recipe line that is not echoed
X\t\-and one that has errors ignored
X\t%and one that causes dmake to swap out
X\t\+and one that is executed using a shell.
X.fi
X.RE
X.PP
XThe second and new format of the recipe block begins the block with the
Xcharacter '[' (the open group character) in the last non-white space
Xposition of a line, and terminates the
Xblock with the character ']' (the close group character)
Xin the first non-white space position of a line.
XIn this form each recipe line need not have a leading TAB. This is
Xcalled a recipe group. Groups so defined are fed intact as a single
Xunit to a shell for execution whenever the corresponding target needs to
Xbe updated. If the open group character '[' is preceded
Xby one or all of \-, @ or %
Xthen they apply to the entire group in the same way that they
Xapply to single recipe lines. You may also specify '+' but it is
Xredundant as a shell is already being used to run the recipe.
XSee the MAKING TARGETS section for a description of how
X.B dmake
Xinvokes recipes.
XHere is an example of a group recipe:
X.sp
X.RS
X.nf
Xtarget :
X[
X\tfirst recipe line
X\tsecond recipe line
X\tall of these recipe lines are fed to a
X\tsingle copy of a shell for execution.
X]
X.fi
X.RE
X.sp
X.SH "TEXT DIVERSIONS"
X.B dmake
Xsupports the notion of text diversions.
XIf a recipe line contains the macro expression
X.RS
X.sp
X$(mktmp[,[\fIfile\fP][,\fItext\fP]] \fIdata\fP)
X.sp
X.RE
Xthen all text contained in the \fIdata\fP expression is expanded and
Xis written to a temporary file. The return
Xvalue of the macro is the name of the temporary file.
X.PP
X.I data
Xcan be any text and must be separated from the 'mktmp' portion of the
Xmacro name by white-space. The only restriction on the data text is that
Xit must contain a balanced number of parentheses of the same kind as are
Xused to initiate the $(mktmp ...) expression. For example:
X.sp
X\t$(mktmp $(XXX))
X.sp
Xis legal and works as expected, but:
X.sp
X\t$(mktmp text (to dump to file)
X.sp
Xis not legal. You can achieve what you wish by either defining a macro that
Xexpands to '(' or by using {} in the macro expression; like this:
X.sp
X\t${mktmp text (to dump to file}
X.sp
XSince the temporary file is opened when the
Xmacro containing the text diversion expression is expanded, diversions may
Xbe nested and any diversions that are created as part of ':=' macro
Xexpansions persist for the duration of the
X.B dmake
Xrun.
XThe diversion text may contain
Xthe same escape codes as those described in the MACROS section.
XThus if the \fIdata\fP text is to contain new lines they must be inserted
Xusing the \en escape sequence. For example the expression:
X.RS
X.sp
X.nf
Xall:
X cat $(mktmp this is a\en\e
X test of the text diversion\en)
X.fi
X.sp
X.RE
Xis replaced by:
X.RS
X.sp
Xcat /tmp/mk12294AA
X.sp
X.RE
Xwhere the temporary file contains two lines both of which are terminated
Xby a new-line. If the \fIdata\fP text spans multiple lines in the makefile
Xthen each line must be continued via the use of a \e.
XA second more illustrative example generates a response file to an MSDOS
Xlink command:
X.RS
X.sp
X.nf
XOBJ = fred.obj mary.obj joe.obj
Xall : $(OBJ)
X link @$(mktmp $(^:t"+\en")\en)
X.fi
X.sp
X.RE
XThe result of making `all' in the second example is the command:
X.RS
X.sp
Xlink @/tmp/mk02394AA
X.sp
X.RE
Xwhere the temporary file contains:
X.RS
X.sp
X.nf
Xfred.obj+
Xmary.obj+
Xjoe.obj
X.fi
X.sp
X.RE
XThe last line of the file is terminated by a new-line which is inserted
Xdue to the \en found at the end of the \fIdata\fP string.
X.PP
XIf the optional \fIfile\fP specifier is present then its expanded value
Xis the name of the temporary file to create. Whenever a $(mktmp ...) macro
Xis expanded the macro $(TMPFILE) is set to a new temporary file name. Thus
Xthe construct:
X.RS
X.sp
X$(mktmp,$(TMPFILE) data)
X.sp
X.RE
Xis completely equivalent to not specifying the $(TMPFILE) optional argument.
XAnother example that would be useful for MSDOS users with a Turbo-C compiler
X.RS
X.sp
X$(mktmp,turboc.cfg $(CFLAGS))
X.sp
X.RE
Xwill place the contents of CFLAGS into a local \fIturboc.cfg\fP file.
XThe second optional argument, \fItext\fP, if present alters the name
Xof the value returned by the $(mktmp ...) macro.
X.PP
XUnder MS-DOS text diversions may be a problem. Many DOS tools require
Xthat path names which contain directories use the \e character to delimit
Xthe directories. Some users however wish to use the '/' to delimit pathnames
Xand use environments that allow them to do so.
XThe macro USESHELL is set to "yes" if the
Xcurrent recipe is forced to use a shell via the .USESHELL or '+' directives,
Xotherwise its value is "no".
XThe
X.B dmake
Xstartup files define the macro DIVFILE whose value is either the
Xvalue of TMPFILE or the value of TMPFILE edited to replace any '/' characters
Xto the appropriate value based on the current shell and whether it will be
Xused to execute the recipe.
X.PP
XPrevious versions of
X.B dmake
Xdefined text diversions using <+, +> strings,
Xwhere <+ started a text diversion and +> terminated one.
X.B dmake
Xis backward compatible with this construct only
Xif the <+ and +> appear literally
Xon the same recipe line or in the same macro value string. In such instances
Xthe expression:
X.sp
X\t<+data+>
X.sp
Xis mapped to:
X.sp
X\t$(mktmp data)
X.sp
Xwhich is fully output compatible with the earlier construct. <+, +>
Xconstructs whose text spans multiple lines must be converted by hand to use
X$(mktmp ...).
X.PP
XIf the environment variable TMPDIR is defined then the
Xtemporary file is placed into the directory specified by that variable.
XA makefile can modify the location of temporary files by
Xdefining a macro named TMPDIR and exporting it using the .EXPORT special
Xtarget.
X.SH "SPECIAL TARGETS"
XThis section describes the special targets that are recognized by \fBdmake\fP.
XSome are affected by attributes and others are not.
X.IP \fB.ERROR\fP 1.4i
XIf defined then the recipe associated with this target is executed
Xwhenever an error condition is detected by \fBdmake\fP. All attributes that
Xcan be used with any other target may be used with this target. Any
Xprerequisites of this target will be brought up to date during its processing.
XNOTE: errors will be ignored while making this target, in extreme cases this
Xmay cause some problems.
X.IP \fB.EXIT\fP 1.4i
XIf this target is encountered while parsing a makefile then the parsing of the
Xmakefile is immediately terminated at that point.
X.IP \fB.EXPORT\fP 1.4i
XAll prerequisites associated with this target are assumed to
Xcorrespond to macro names and they and their values
Xare exported to the environment as environment strings at the point in
Xthe makefile at which this target appears.
XAny attributes specified with this target are ignored.
XOnly macros which have been assigned a value in the makefile prior to the
Xexport directive are exported, macros as yet undefined
Xor macros whose value contains any of the characters "+=:*"
Xare not exported.
Xis suppre
X.IP \fB.IMPORT\fP 1.4i
XPrerequisite names specified for this target are searched for in the
Xenvironment and defined as macros with their value taken from the environment.
XIf the special name \fB.EVERYTHING\fP is used as a prerequisite name then
Xall environment variables defined in the environment are imported.
XThe functionality of the \fB\-E\fP flag can be forced by placing the construct
X\&\fI.IMPORT : .EVERYTHING\fP at the start of a makefile. Similarly, by
Xplacing the construct at the end, one can emulate the effect of the \fB\-e\fP
Xcommand line flag.
XIf a prerequisite name cannot be found in the environment
Xan error message is issued.
X\&.IMPORT accepts the .IGNORE attribute. When given, it causes \fBdmake\fP
Xto ignore the above error.
XSee the MACROS section for a description of the processing of imported macro
Xvalues.
X.IP \fB.INCLUDE\fP 1.4i
XParse another makefile just as if it had been located at the point of the
X\&.INCLUDE in the current makefile. The list of prerequisites gives the list of
Xmakefiles to try to read. If the list contains multiple makefiles then they
Xare read in order from left to right. The following search rules are used
Xwhen trying to locate the file. If the filename is surrounded by " or just
Xby itself then it is searched for in the current directory. If it is not
Xfound it is then searched for in each of the directories specified
Xas prerequisites of the \&.INCLUDEDIRS special target.
XIf the file name is surrounded by < and >, (ie.
X<my_spiffy_new_makefile>) then it is searched for only in the directories
Xgiven by the .INCLUDEDIRS special target. In both cases if the file name is a
Xfully qualified name starting at the root of the file system then it is only
Xsearched for once, and the .INCLUDEDIRS list is ignored. .INCLUDE accepts
Xthe .IGNORE and .SETDIR attributes. If .IGNORE attribute is given and the file
Xcannot be found then \fBdmake\fP continues processing,
Xotherwise an error message is generated.
XThe .SETDIR attribute causes
X.B dmake
Xto change directories to the specified directory prior to attempting the
Xinclude operation. If all fails \fBdmake\fP attempts to \fImake\fP the file
Xto be included. If making the file fails then \fBdmake\fP terminates unless
Xthe .INCLUDE directive also specified the .IGNORE attribute.
XIf .FIRST is specified along with .INCLUDE then \fBdmake\fP attempts to
Xinclude each named prerequisite and will terminate the inclusion with the
Xfirst prerequisite that results in a successful inclusion.
X.IP \fB.INCLUDEDIRS\fP 1.4i
XThe list of prerequisites specified for this target defines the set of
Xdirectories to search when trying to include a makefile.
X.IP \fB.KEEP_STATE\fP 1.4i
XThis special target is a synonym for the macro definition
X.sp
X\&\t.KEEP_STATE := _state.mk
X.sp
XIt's effect is to turn on STATE keeping and to define \fI_state.mk\fP
Xas the state file.
X.IP \fB.MAKEFILES\fP 1.4i
XThe list of prerequisites is the set of files to try to read as the default
Xmakefile. By default this target is defined as:
X.sp
X\t\&.MAKEFILES : makefile.mk Makefile makefile
X.sp
X.IP \fB.SOURCE\fP 1.4i
XThe prerequisite list of this target defines a set of directories to check
Xwhen trying to locate a target file name. See the section on BINDING of
Xtargets for more information.
X.IP \fB.SOURCE.suff\fP 1.4i
XThe same as .SOURCE, except that the .SOURCE.suff list is searched first when
Xtrying to locate a file matching the a target whose name ends in the suffix
X\&.suff.
X.IP \fB.REMOVE\fP 1.4i
XThe recipe of this target is used whenever \fBdmake\fP needs to remove
Xintermediate targets that were made but do not need to be kept around.
XSuch targets result from the application of transitive closure on the
Xdependency graph.
X.PP
XIn addition to the special targets above,
Xseveral other forms of targets are recognized and are considered special,
Xtheir exact form and use is defined in the sections that follow.
X.SH "SPECIAL MACROS"
X.B dmake
Xdefines a number of special macros. They are divided into three classes:
Xcontrol macros, run-time macros, and function macros.
XThe control macros are used by
X.B dmake
Xto configure its actions, and are the preferred method of doing so.
XIn the case when a control macro has the same function as a special
Xtarget or attribute they share the same name as the special target or
Xattribute.
XThe run-time macros are defined when
X.B dmake
Xmakes targets and may be used by the user inside recipes.
XThe function macros provide higher level functions dealing with macro
Xexpansion and diversion file processing.
X.SH "CONTROL MACROS"
XTo use the control macros simply assign them a value just like any other
Xmacro. The control macros are divided into three groups:
Xstring valued macros, character valued macros, and boolean valued macros.
X.PP
XThe following are all of the string valued macros.
XThis list is divided into two groups. The first group gives the string
Xvalued macros that are defined internally and cannot be directly set by the
Xuser.
X.IP \fBINCDEPTH\fP 1.6i
XThis macro's value is a string of digits representing
Xthe current depth of makefile inclusion.
XIn the first makefile level this value is zero.
X.IP \fBMFLAGS\fP 1.6i
XIs the list of flags
Xthat were given on the command line including a leading switch character.
XThe \-f flag is not included in this list.
X.IP \fBMAKECMD\fP 1.6i
XIs the name with which \fBdmake\fP was invoked.
X.IP \fBMAKEDIR\fP 1.6i
XIs the full path to the initial directory in which
X.B dmake
Xwas invoked.
X.IP \fBMAKEFILE\fP 1.6i
XContains the string "\-f \fImakefile\fP" where, \fImakefile\fP is the name
Xof initial user makefile that was first read.
X.IP \fBMAKEFLAGS\fP 1.6i
XIs the same as $(MFLAGS) but has no leading switch
Xcharacter. (ie. MFLAGS = \-$(MAKEFLAGS))
X.IP \fBMAKEMACROS\fP 1.6i
XContains the complete list of macro expressions that were specified on the
Xcommand line.
X.IP \fBMAKETARGETS\fP 1.6i
XContains the name(s) of the target(s), if any, that were
Xspecified on the command line.
X.IP \fBMAXPROCESSLIMIT\fP 1.6i
XIs a numeric string representing the maximum number of processes that
X\fBdmake\fP can use when making targets using parallel mode.
X.IP \fBNULL\fP 1.6i
XIs permanently defined to be the NULL string.
XThis is useful when comparing a conditional expression to an NULL value.
X.IP \fBPWD\fP 1.6i
XIs the full path to the
Xcurrent directory in which make is executing.
X.IP \fBTMPFILE\fP 1.6i
XIs set to the name of the most recent temporary file opened by \fBdmake\fP.
XTemporary files are used for text diversions and for group recipe processing.
X.IP \fBTMD\fP 1.6i
XStands for "To Make Dir", and
Xis the path from the present directory (value of $(PWD)) to the directory
Xthat \fBdmake\fP was started up in (value of $(MAKEDIR)).
XThis macro is modified when .SETDIR attributes are processed.
X.IP \fBUSESHELL\fP 1.6i
XThe value of this macro is set to "yes" if the current recipe is forced to
Xuse a shell for its execution via the .USESHELL or '+' directives, its value
Xis "no" otherwise.
X.sp
X.PP
XThe second group of string valued macros control
X.B dmake
Xbehavior and may be set by the user.
X.IP \fB.DIRCACHE\fP 1.6i
XIf set to "yes" enables the directory cache (this is the default). If set to
X"no" disables the directory cache (equivalent to -d commandline flag).
X.IP \fB.NAMEMAX\fP 1.6i
XDefines the maximum length of a filename component. The value of the variable
Xis initialized at startup to the value of the compiled macro NAME_MAX. On
Xsome systems the value of NAME_MAX is too short by default. Setting a new
Xvalue for .NAMEMAX will override the compiled value.
X.IP \fB.NOTABS\fP 1.6i
XWhen set to non-NULL enables the use of spaces as well as <tabs> to begin
Xrecipe lines.
XBy default a non\-group recipe is terminated by a line without any leading
Xwhite\-space or by a line not beggining with a <tab> character.
XEnabling this mode modifies the first condition of
Xthe above termination rule to terminate a
END_OF_FILE
if test 57788 -ne `wc -c <'dmake/man/dmake.tf.A'`; then
echo shar: \"'dmake/man/dmake.tf.A'\" unpacked with wrong size!
elif test -f 'dmake/man/dmake.tf.B'; then
echo shar: Combining \"'dmake/man/dmake.tf'\" \(109647 characters\)
cat 'dmake/man/dmake.tf.A' 'dmake/man/dmake.tf.B' > 'dmake/man/dmake.tf'
if test 109647 -ne `wc -c <'dmake/man/dmake.tf'`; then
echo shar: \"'dmake/man/dmake.tf'\" combined with wrong size!
else
rm dmake/man/dmake.tf.A dmake/man/dmake.tf.B
fi
fi
# end of 'dmake/man/dmake.tf.A'
fi
if test ! -d 'dmake/msdos' ; then
echo shar: Creating directory \"'dmake/msdos'\"
mkdir 'dmake/msdos'
fi
if test ! -d 'dmake/msdos/bccdos' ; then
echo shar: Creating directory \"'dmake/msdos/bccdos'\"
mkdir 'dmake/msdos/bccdos'
fi
if test ! -d 'dmake/msdos/mscdos' ; then
echo shar: Creating directory \"'dmake/msdos/mscdos'\"
mkdir 'dmake/msdos/mscdos'
fi
if test -f 'dmake/msdos/mscdos/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/config.mk'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/config.mk'\" \(2471 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/config.mk' <<'END_OF_FILE'
X# This is the MSC 4.0 and higher DOS configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
XTMPDIR :=
X.EXPORT : TMPDIR
X
X# Definition of macros for library, and C startup code.
X
X# The following sources are required for MSC
XOSR_SRC = tempnam.c
X.SETDIR=$(osrdir) : $(OSR_SRC)
X
XSRC += $(OSR_SRC)
X.SOURCE.h : $(osrdir)
X
XSET_STACK = /stack:4096
XNDB_LDFLAGS += $(SET_STACK)
X
X# Local configuration modifications for CFLAGS
X# If you have a 286 or better, you can uncomment the following line.
X#HAVE_286 = y
X
X.IF $(HAVE_286)
X CFLAGS += -G2
X ASFLAGS += -Dhave286
X.END
X
XASFLAGS += -t -mx $(S_$(MODEL))
X
X# Microsoft C doesn't need tail but needs head
XLDTAIL = ;
XLDHEAD = $(LDFLAGS)
X
X# Debugging libraries
XDB_LDFLAGS += /co /li /map $(SET_STACK)
XDB_LDLIBS +=
X
X# NO Debug MSC flags:
X# Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
X# to get these by default when you make dmake using 'dmake'.
X#
X# Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
X# and sets the flags appropriately.
X
X.IMPORT .IGNORE : MSC_VER
XMSC_VER *= 6.0 # If unset, assume 6.0 by default.
X
X.IF $(MSC_VER) == 4.0
X CFLAGS += -I$(osrdir) $(C_$(MODEL):s/A/m/)
X CFLAGS += -DM_I86=1 # 5.0+ define this automatically
X# CFLAGS += -D__STDC__=1 # 5.0, 5.1, but not 6.0 do this automatically
X NDB_CFLAGS +=
X DB_CFLAGS += -Zi
X.ELSE
X DB_CFLAGS += -Zi
X CFLAGS += -I$(osrdir) $(C_$(MODEL))
X .IF $(MSC_VER) != 6.0
X # For 5.0 and 5.1, we define _MSC_VER=500 or 510
X CFLAGS += -D_MSC_VER=$(MSC_VER:s,.,,)0
X NDB_CFLAGS += -Oscl -Gs
X .ELSE
X # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
X CFLAGS += -D__STDC__=1 # incredibly not auto done by 6.0
X NDB_CFLAGS += -Osecgl -Gs
X
X # Redefine rule for making our objects, we don't need mv
X %$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
X .END
X NDB_LDFLAGS += /exe /packc /batch
X NDB_LDLIBS +=
X.END
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
X
XC_s =
XC_m = -AM
XC_c = -AC
XC_l = -AL
X
XS_s = -Dmsmall
XS_m = -Dmmedium
XS_c = -Dmcompact
XS_l = -Dmlarge
END_OF_FILE
if test 2471 -ne `wc -c <'dmake/msdos/mscdos/config.mk'`; then
echo shar: \"'dmake/msdos/mscdos/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/config.mk'
fi
if test ! -d 'dmake/msdos/tccdos' ; then
echo shar: Creating directory \"'dmake/msdos/tccdos'\"
mkdir 'dmake/msdos/tccdos'
fi
if test ! -d 'dmake/msdos/ztcdos' ; then
echo shar: Creating directory \"'dmake/msdos/ztcdos'\"
mkdir 'dmake/msdos/ztcdos'
fi
if test ! -d 'dmake/os2' ; then
echo shar: Creating directory \"'dmake/os2'\"
mkdir 'dmake/os2'
fi
if test ! -d 'dmake/os2/ibm' ; then
echo shar: Creating directory \"'dmake/os2/ibm'\"
mkdir 'dmake/os2/ibm'
fi
if test ! -d 'dmake/os2/mscdos' ; then
echo shar: Creating directory \"'dmake/os2/mscdos'\"
mkdir 'dmake/os2/mscdos'
fi
if test ! -d 'dmake/qnx' ; then
echo shar: Creating directory \"'dmake/qnx'\"
mkdir 'dmake/qnx'
fi
if test ! -d 'dmake/readme' ; then
echo shar: Creating directory \"'dmake/readme'\"
mkdir 'dmake/readme'
fi
if test ! -d 'dmake/tos' ; then
echo shar: Creating directory \"'dmake/tos'\"
mkdir 'dmake/tos'
fi
if test ! -d 'dmake/unix' ; then
echo shar: Creating directory \"'dmake/unix'\"
mkdir 'dmake/unix'
fi
if test ! -d 'dmake/unix/386ix' ; then
echo shar: Creating directory \"'dmake/unix/386ix'\"
mkdir 'dmake/unix/386ix'
fi
if test ! -d 'dmake/unix/bsd43' ; then
echo shar: Creating directory \"'dmake/unix/bsd43'\"
mkdir 'dmake/unix/bsd43'
fi
if test ! -d 'dmake/unix/bsd43/uw' ; then
echo shar: Creating directory \"'dmake/unix/bsd43/uw'\"
mkdir 'dmake/unix/bsd43/uw'
fi
if test ! -d 'dmake/unix/bsd43/vf' ; then
echo shar: Creating directory \"'dmake/unix/bsd43/vf'\"
mkdir 'dmake/unix/bsd43/vf'
fi
if test ! -d 'dmake/unix/coherent' ; then
echo shar: Creating directory \"'dmake/unix/coherent'\"
mkdir 'dmake/unix/coherent'
fi
if test ! -d 'dmake/unix/solaris' ; then
echo shar: Creating directory \"'dmake/unix/solaris'\"
mkdir 'dmake/unix/solaris'
fi
if test ! -d 'dmake/unix/solaris/gcc' ; then
echo shar: Creating directory \"'dmake/unix/solaris/gcc'\"
mkdir 'dmake/unix/solaris/gcc'
fi
if test ! -d 'dmake/unix/sysvr1' ; then
echo shar: Creating directory \"'dmake/unix/sysvr1'\"
mkdir 'dmake/unix/sysvr1'
fi
if test ! -d 'dmake/unix/sysvr3' ; then
echo shar: Creating directory \"'dmake/unix/sysvr3'\"
mkdir 'dmake/unix/sysvr3'
fi
if test ! -d 'dmake/unix/sysvr3/pwd' ; then
echo shar: Creating directory \"'dmake/unix/sysvr3/pwd'\"
mkdir 'dmake/unix/sysvr3/pwd'
fi
if test ! -d 'dmake/unix/sysvr4' ; then
echo shar: Creating directory \"'dmake/unix/sysvr4'\"
mkdir 'dmake/unix/sysvr4'
fi
if test ! -d 'dmake/unix/xenix' ; then
echo shar: Creating directory \"'dmake/unix/xenix'\"
mkdir 'dmake/unix/xenix'
fi
if test ! -d 'dmake/unix/xenix/pwd' ; then
echo shar: Creating directory \"'dmake/unix/xenix/pwd'\"
mkdir 'dmake/unix/xenix/pwd'
fi
echo shar: End of archive 1 \(of 27\).
cp /dev/null ark1isdone
MISSING=""
for I in 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 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 27 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/man/dmake.nc.A
# Wrapped by kent@sparky on Fri Oct 21 16:50:31 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 2 (of 27)."'
if test -f 'dmake/man/dmake.nc.A' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/man/dmake.nc.A'\"
else
echo shar: Extracting \"'dmake/man/dmake.nc.A'\" \(66779 characters\)
sed "s/^X//" >'dmake/man/dmake.nc.A' <<'END_OF_FILE'
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
XNAME
X dmake - maintain program groups, or interdependent files
X
XSYNOPSIS
X dmake [-P#] [-{f|C|K} file] [-{w|W} target ...]
X [macro[[!][*][+][:]]=value ...] [-v{cdfimt}]
X [-ABcdeEghiknpqrsStTuVxX] [target ...]
X
XDESCRIPTION
X dmake is a re-implementation of the UNIX Make utility with
X significant enhancements. dmake executes commands found in
X an external file called a makefile to update one or more
X target names. Each target may depend on zero or more prere-
X quisite targets. If any of the target's prerequisites is
X newer than the target or if the target itself does not
X exist, then dmake will attempt to make the target.
X
X If no -f command line option is present then dmake searches
X for an existing makefile from the list of prerequisites
X specified for the special target .MAKEFILES (see the STARTUP
X section for more details). If "-" is the name of the file
X specified to the -f flag then dmake uses standard input as
X the source of the makefile text.
X
X Any macro definitions (arguments with embedded "=" signs)
X that appear on the command line are processed first and
X supercede definitions for macros of the same name found
X within the makefile. In general it is impossible for defin-
X itions found inside the makefile to redefine a macro defined
X on the command line, see the MACROS section for exceptions.
X
X If no target names are specified on the command line, then
X dmake uses the first non-special target found in the
X makefile as the default target. See the SPECIAL TARGETS
X section for the list of special targets and their function.
X Makefiles written for most previous versions of Make will be
X handled correctly by dmake. Known differences between dmake
X and other versions of make are discussed in the COMPATIBIL-
X ITY section found at the end of this document. dmake
X returns 0 if no errors were detected and a non-zero result
X if an error occurred.
X
XOPTIONS
X -A Enable AUGMAKE special inference rule transformations
X (see the "PERCENT(%) RULES" section), these are set to
X off by default.
X
X -B Enable the use of spaces instead of <tabs> to begin
X recipe lines. This flag equivalent to the .NOTABS spe-
X cial macro and is further described below.
X
X
X
X
X
XVersion 3.9 PL0 UW 1
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X -c Use non-standard comment stripping. If you specify -c
X then dmake will treat any # character as a start of
X comment character wherever it may appear unless it is
X escaped by a \.
X
X -C [+]file
X This option writes to file a copy of standard output
X and standard error from any child processes and from
X the dmake process itself. If you specify a + prior to
X the file name then the text is appended to the previous
X contents of file. This option is active in the MSDOS
X implementation only and is ignored by non-MSDOS ver-
X sions of dmake.
X
X -d Disable the use of the directory cache. Normally dmake
X caches directories as it checks file timestamps. Giv-
X ing this flag is equivalent to the .DIRCACHE attribute
X or macro being set to no.
X
X -E Read the environment and define all strings of the form
X 'ENV-VAR=evalue' defined within as macros whose name is
X ENV-VAR, and whose value is 'evalue'. The environment
X is processed prior to processing the user specified
X makefile thereby allowing definitions in the makefile
X to override definitions in the environment.
X
X -e Same as -E, except that the environment is processed
X after the user specified makefile has been processed
X (thus definitions in the environment override defini-
X tions in the makefile). The -e and -E options are
X mutually exclusive. If both are given the latter takes
X effect.
X
X -f file
X Use file as the source for the makefile text. Only one
X -f option is allowed.
X
X -g Globally disable group recipe parsing, equivalent to
X the .IGNOREGROUP attribute or macro being set to yes at
X the start of the makefile.
X
X -h Print the command summary for dmake.
X
X -i Tells dmake to ignore errors, and continue making other
X targets. This is equivalent to the .IGNORE attribute
X or macro.
X
X -K file
X Turns on .KEEP_STATE state tracking and tells dmake to
X use file as the state file.
X
X
X
X
X
XVersion 3.9 PL0 UW 2
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X -k Causes dmake to ignore errors caused by command execu-
X tion and to make all targets not depending on targets
X that could not be made. Ordinarily dmake stops after a
X command returns a non-zero status, specifying -k causes
X dmake to ignore the error and continue to make as much
X as possible.
X
X -n Causes dmake to print out what it would have executed,
X but does not actually execute the commands. A special
X check is made for the string "$(MAKE)" inside a recipe
X line, if found, the line is expanded and invoked,
X thereby enabling recursive makes to give a full
X description of all that they will do. The check for
X "$(MAKE)" is disabled inside group recipes.
X
X -p Print out a version of the digested makefile in human
X readable form. (useful for debugging, but cannot be
X re-read by dmake)
X
X -P# On systems that support multi-processing cause dmake to
X use # concurrent child processes to make targets. See
X the "MULTI PROCESSING" section for more information.
X
X -q Check and see if the target is up to date. Exits with
X code 0 if up to date, 1 otherwise.
X
X -r Tells dmake not to read the initial startup makefile,
X see STARTUP section for more details.
X
X -s Tells dmake to do all its work silently and not echo
X the commands it is executing to stdout (also suppresses
X warnings). This is equivalent to the .SILENT attri-
X bute or macro.
X
X -S Force sequential execution of recipes on architectures
X which support concurrent makes. For backward compati-
X bility with old makefiles that have nasty side-effect
X prerequisite dependencies.
X
X -t Causes dmake to touch the targets and bring them up to
X date without executing any commands. Note that targets
X will not be created if they do not already exist.
X
X -T Tells dmake to not perform transitive closure on the
X inference graph.
X
X -u Force an unconditional update. (ie. do everything that
X would be done if everything that a target depended on
X was out of date)
X
X -v[dfimt]
X Verbose flag, when making targets print to stdout what
X
X
X
XVersion 3.9 PL0 UW 3
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X we are going to make and what we think its time stamp
X is. The optional flags [dfimt] can be used to restrict
X the information that is displayed. In the absence of
X any optional flags all are assumed to be given (ie. -v
X is equivalent to -vdfimt). The meanings of the
X optional flags are:
X
X d Notify of change directory operations only.
X
X f Notify of file I/O operations only.
X
X i Notify of inference algorithm operation only.
X
X m Notify of target update operations only.
X
X t Keep any temporary files created; normally they
X are automatically deleted.
X
X -V Print the version of dmake, and values of builtin mac-
X ros.
X
X -W target
X Run dmake pretending that target is out of date.
X
X -w target
X What if? Show what would be made if target were out of
X date.
X
X -x Upon processing the user makefile export all non-
X internally defined macros to the user's environment.
X This option together with the -e option allows SYSV
X AUGMAKE recursive makes to function as expected.
X
X -X Inhibit the execution of #! lines found at the begin-
X ning of a makefile. The use of this flag prevents
X non-termination of recursive make invocations.
X
XINDEX
X Here is a list of the sections that follow and a short
X description of each. Perhaps you won't have to read the
X entire man page to find what you need.
X
X STARTUP Describes dmake initialization.
X
X SYNTAX Describes the syntax of makefile expres-
X sions.
X
X ATTRIBUTES Describes the notion of attributes and
X how they are used when making targets.
X
X MACROS Defining and expanding macros.
X
X
X
X
XVersion 3.9 PL0 UW 4
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X RULES AND TARGETS How to define targets and their prere-
X quisites.
X
X RECIPES How to tell dmake how to make a target.
X
X TEXT DIVERSIONS How to use text diversions in recipes and
X macro expansions.
X
X SPECIAL TARGETS Some targets are special.
X
X SPECIAL MACROS Macros used by dmake to alter the pro-
X cessing of the makefile, and those
X defined by dmake for the user.
X
X CONTROL MACROS Itemized list of special control macros.
X
X RUN-TIME MACROS Discussion of special run-time macros
X such as $@ and $<.
X
X FUNCTION MACROS GNU style function macros, only $(mktmp
X ...) for now.
X
X CONDITIONAL MACROS Target specific conditional macros.
X
X DYNAMIC PREREQUISITES
X Processing of prerequisites which contain
X macro expansions in their name.
X
X BINDING TARGETS The rules that dmake uses to bind a tar-
X get to an existing file in the file sys-
X tem.
X
X PERCENT(%) RULES Specification of recipes to be used by
X the inference algorithm.
X
X MAKING INFERENCES The rules that dmake uses when inferring
X how to make a target which has no expli-
X cit recipe. This and the previous sec-
X tion are really a single section in the
X text.
X
X MAKING TARGETS How dmake makes targets other than
X libraries.
X
X MAKING LIBRARIES How dmake makes libraries.
X
X KEEP STATE A discussion of how .KEEP_STATE works.
X
X MULTI PROCESSING Discussion of dmake's parallel make
X facilities for architectures that support
X them.
X
X
X
X
XVersion 3.9 PL0 UW 5
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X CONDITIONALS Conditional expressions which control the
X processing of the makefile.
X
X EXAMPLES Some hopefully useful examples.
X
X COMPATIBILITY How dmake compares with previous versions
X of make.
X
X LIMITS Limitations of dmake.
X
X PORTABILITY Comments on writing portable makefiles.
X
X FILES Files used by dmake.
X
X SEE ALSO Other related programs, and man pages.
X
X AUTHOR The guy responsible for this thing.
X
X BUGS Hope not.
X
XSTARTUP
X When dmake begins execution it first processes the command
X line and then processes an initial startup-makefile. This
X is followed by an attempt to locate and process a user sup-
X plied makefile. The startup file defines the default values
X of all required control macros and the set of default rules
X for making targets and inferences. When searching for the
X startup makefile, dmake searches the following locations, in
X the order specified, until a startup file is located:
X
X 1. The location given as the value of the macro MAK-
X ESTARTUP defined on the command line.
X
X 2. The location given as the value of the environment
X variable MAKESTARTUP defined in the current
X environment.
X
X 3. The location given as the value of the macro MAK-
X ESTARTUP defined internally within dmake.
X
X The above search is disabled by specifying the -r option on
X the command line. An error is issued if a startup makefile
X cannot be found and the -r option was not specified. A user
X may substitute a custom startup file by defining the MAKES-
X TARTUP environment variable or by redefining the MAKESTARTUP
X macro on the command line. To determine where dmake looks
X for the default startup file, check your environment or
X issue the command "dmake -V".
X
X A similar search is performed to locate a default user
X makefile when no -f command line option is specified. By
X default, the prerequisite list of the special target
X
X
X
XVersion 3.9 PL0 UW 6
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X .MAKEFILES specifies the names of possible makefiles and the
X search order that dmake should use to determine if one
X exists. A typical definition for this target is:
X
X .MAKEFILES : makefile.mk Makefile makefile
X
X dmake will first look for makefile.mk and then the others.
X If a prerequisite cannot be found dmake will try to make it
X before going on to the next prerequisite. For example,
X makefile.mk can be checked out of an RCS file if the proper
X rules for doing so are defined in the startup file.
X
X If the first line of the user makefile is of the form:
X
X #! command command_args
X
X then dmake will expand and run the command prior to reading
X any additional input. If the return code of the command is
X zero then dmake will continue on to process the remainder of
X the user makefile, if the return code is non-zero then dmake
X will exit.
X
X dmake builds the internal dependency graph as it parses a
X user specified makefile. The graph is rooted at the special
X target .ROOT. .ROOT is the top level target that dmake
X builds when it starts to build targets. All user specified
X targets (those from the command line or taken as defaults
X from the makefile) are made prerequisites of the special
X target .TARGETS. dmake by default creates the relationship
X that .ROOT depends on .TARGETS and as a result everything is
X made. This approach allows the user to customize, within
X their makefile, the order and which, target, is built first.
X For example the default makefiles come with settings for
X .ROOT that specify:
X
X .ROOT .PHONY .NOSTATE .SEQUENTIAL : .INIT .TARGETS
X .DONE
X
X with .INIT and .DONE defined as:
X
X .INIT .DONE :;
X
X which nicely emulates the behaviour of Sun's make exten-
X sions. The building of .ROOT's prerequisites is always
X forced to be sequential.
X
XSYNTAX
X This section is a summary of the syntax of makefile state-
X ments. The description is given in a style similar to BNF,
X where { } enclose items that may appear zero or more times,
X and [ ] enclose items that are optional. Alternative pro-
X ductions for a left hand side are indicated by '->', and
X
X
X
XVersion 3.9 PL0 UW 7
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X newlines are significant. All symbols in bold type are text
X or names representing text supplied by the user.
X
X
X
X Makefile -> { Statement }
X
X Statement -> Macro-Definition
X -> Conditional-Macro-Definition
X -> Conditional
X -> Rule-Definition
X -> Attribute-Definition
X
X Macro-Definition -> MACRO = LINE
X -> MACRO [!]*= LINE
X -> MACRO [!]:= LINE
X -> MACRO [!]*:= LINE
X -> MACRO [!]+= LINE
X -> MACRO [!]+:= LINE
X
X Conditional-Macro-Definition -> TARGET ?= Macro-
X Definition
X
X Conditional -> .IF expression
X Makefile
X [ .ELIF expression
X Makefile ]
X [ .ELSE
X Makefile ]
X .END
X
X expression -> LINE
X -> STRING == LINE
X -> STRING != LINE
X
X
X Rule-Definition -> target-definition
X [ recipe ]
X
X target-definition -> targets [attrs] op { PREREQUISITE } [; rcp-line]
X
X targets -> target { targets }
X -> "target" { targets }
X
X target -> special-target
X -> TARGET
X
X attrs -> attribute { attrs }
X -> "attribute" { attrs }
X
X op -> : { modifier }
X
X
X
X
XVersion 3.9 PL0 UW 8
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X modifier -> :
X -> ^
X -> !
X -> -
X -> |
X
X recipe -> { TAB rcp-line }
X -> [@][%][-] [
X { LINE }
X ]
X
X rcp-line -> [@][%][-][+] LINE
X
X
X Attribute-Definition -> attrs : targets
X
X
X attribute -> .EPILOG
X -> .GROUP
X -> .IGNORE
X -> .IGNOREGROUP
X -> .LIBRARY
X -> .MKSARGS
X -> .NOINFER
X -> .NOSTATE
X -> .PHONY
X -> .PRECIOUS
X -> .PROLOG
X -> .SETDIR=path
X -> .SILENT
X -> .SEQUENTIAL
X -> .SWAP
X -> .USESHELL
X -> .SYMBOL
X -> .UPDATEALL
X
X special-target -> .ERROR
X -> .EXIT
X -> .EXPORT
X -> .GROUPEPILOG
X -> .GROUPPROLOG
X -> .IMPORT
X -> .INCLUDE
X -> .INCLUDEDIRS
X -> .MAKEFILES
X -> .REMOVE
X -> .SOURCE
X -> .SOURCE.suffix
X -> .suffix1.suffix2
X
X
X
X
X
X
XVersion 3.9 PL0 UW 9
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X Where, TAB represents a <tab> character, STRING represents
X an arbitrary sequence of characters, and LINE represents a
X possibly empty sequence of characters terminated by a non-
X escaped (not immediately preceded by a backslash '\') new-
X line character. MACRO, PREREQUISITE, and TARGET each
X represent a string of characters not including space or tab
X which respectively form the name of a macro, prerequisite or
X target. The name may itself be a macro expansion expres-
X sion. A LINE can be continued over several physical lines
X by terminating it with a single backslash character. Com-
X ments are initiated by the pound # character and extend to
X the end of line. All comment text is discarded, a '#' may
X be placed into the makefile text by escaping it with '\'
X (ie. \# translates to # when it is parsed). An exception to
X this occurs when a # is seen inside a recipe line that
X begins with a <tab> or is inside a group recipe. If you
X specify the -c command line switch then this behavior is
X disabled and dmake will treat all # characters as start of
X comment indicators unless they are escaped by \. A set of
X continued lines may be commented out by placing a single #
X at the start of the first line. A continued line cannot
X span more than one makefile.
X
X white space is defined to be any combination of <space>,
X <tab>, and the sequence \<nl> when \<nl> is used to ter-
X minate a LINE. When processing macro definition lines, any
X amount of white space is allowed on either side of the macro
X operator and white space is stripped from both before and
X after the macro value string. The sequence \<nl> is treated
X as white space during recipe expansion and is deleted from
X the final recipe string. You must escape the \<nl> with
X another \ in order to get a \ at the end of a recipe line.
X The \<nl> sequence is deleted from macro values when they
X are expanded.
X
X When processing target definition lines, the recipe for a
X target must, in general, follow the first definition of the
X target (See the RULES AND TARGETS section for an exception),
X and the recipe may not span across multiple makefiles. Any
X targets and prerequisites found on a target definition line
X are taken to be white space separated tokens. The rule
X operator (op in SYNTAX section) is also considered to be a
X token but does not require white space to precede or follow
X it. Since the rule operator begins with a `:', traditional
X versions of make do not allow the `:' character to form a
X valid target name. dmake allows `:' to be present in
X target/prerequisite names as long as the entire
X target/prerequisite name is quoted. For example:
X
X a:fred : test
X
X would be parsed as TARGET = a, PREREQUISITES={fred, :,
X
X
X
XVersion 3.9 PL0 UW 10
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X test}, which is not what was intended. To fix this you must
X write:
X
X "a:fred" : test
X
X Which will be parsed as expected. Quoted target and prere-
X quisite specifications may also contain white space thereby
X allowing the use of complex function macro expressions..
X See the EXAMPLES section for how to apply " quoting to a
X list of targets.
X
XATTRIBUTES
X dmake defines several target attributes. Attributes may be
X assigned to a single target, a group of targets, or to all
X targets in the makefile. Attributes are used to modify
X dmake actions during target update. The recognized attri-
X butes are:
X
X
X .EPILOG Insert shell epilog code when executing a group
X recipe associated with any target having this
X attribute set.
X
X .FIRST Used in conjunction with .INCLUDE. Terminates
X the inclusion with the first successfully
X included prerequisite.
X
X .GROUP Force execution of a target's recipe as a group
X recipe.
X
X .IGNORE Ignore an error when trying to make any target
X with this attribute set.
X
X .IGNOREGROUP
X Disable the special meaning of '[' to initiate a
X group recipe.
X
X .LIBRARY Target is a library.
X
X .MKSARGS If running in an MSDOS environment then use MKS
X extended argument passing conventions to pass
X arguments to commands. Non-MSDOS environments
X ignore this attribute.
X
X .NOINFER Any target with this attribute set will not be
X subjected to transitive closure if it is
X inferred as a prerequisite of a target whose
X recipe and prerequisites are being inferred.
X (i.e. the inference algorithm will not use any
X prerequisite with this attribute set, as a tar-
X get) If specified as '.NOINFER:' (ie. with no
X prerequisites or targets) then the effect is
X
X
X
XVersion 3.9 PL0 UW 11
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X equivalent to specifying -T on the command line.
X
X .NOSTATE Any target with this attribute set will not have
X command line flag information stored in the
X state file if .KEEP_STATE has been enabled.
X
X .PHONY Any target with this attribute set will have its
X recipe executed each time the target is made
X even if a file matching the target name can be
X located. Any targets that have a .PHONY attri-
X buted target as a prerequisite will be made each
X time the .PHONY attributed prerequisite is made.
X
X .PRECIOUS Do not remove associated target under any cir-
X cumstances. Set by default for any targets
X whose corresponding files exist in the file sys-
X tem prior to the execution of dmake.
X
X .PROLOG Insert shell prolog code when executing a group
X recipe associated with any target having this
X attribute set.
X
X .SEQUENTIAL Force a sequential make of the associated
X target's prerequisites.
X
X .SETDIR Change current working directory to specified
X directory when making the associated target.
X You must specify the directory at the time the
X attribute is specified. To do this simply give
X .SETDIR=path as the attribute. path is expanded
X and the result is used as the value of the
X directory to change to. If path contains $$@
X then the name of the target to be built is used
X in computing the path to change directory to.
X If path is surrounded by single quotes then path
X is not expanded, and is used literally as the
X directory name. If the path contains any `:'
X characters then the entire attribute string must
X be quoted using ". If a target having this
X attribute set also has the .IGNORE attribute set
X then if the change to the specified directory
X fails it will be ignored, and no error message
X will be issued.
X
X .SILENT Do not echo the recipe lines when making any
X target with this attribute set, and do not issue
X any warnings.
X
X .SWAP Under MSDOS when making a target with this
X attribute set swap the dmake executable to disk
X prior to executing the recipe line. Also see
X the '%' recipe line flag defined in the RECIPES
X
X
X
XVersion 3.9 PL0 UW 12
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X section.
X
X .SYMBOL Target is a library member and is an entry point
X into a module in the library. This attribute is
X used only when searching a library for a target.
X Targets of the form lib((entry)) have this
X attribute set automatically.
X
X .USESHELL Force each recipe line of a target to be exe-
X cuted using a shell. Specifying this attribute
X is equivalent to specifying the '+' character at
X the start of each line of a non-group recipe.
X
X .UPDATEALL Indicates that all the targets listed in this
X rule are updated by the execution of the accom-
X panying recipe. A common example is the produc-
X tion of the y.tab.c and y.tab.h files by yacc
X when it is run on a grammar. Specifying
X .UPDATEALL in such a rule prevents the running
X of yacc twice, once for the y.tab.c file and
X once for the y.tab.h file. .UPDATEALL targets
X that are specified in a single rule are treated
X as a single target and all timestamps are
X updated whenever any target in the set is made.
X As a side-effect, dmake internally sorts such
X targets in ascending alphabetical order and the
X value of $@ is always the first target in the
X sorted set.
X
X All attributes are user setable and except for .UPDATEALL,
X .SETDIR and .MKSARGS may be used in one of two forms. The
X .MKSARGS attribute is restricted to use as a global attri-
X bute, and the use of the .UPDATEALL and .SETDIR attributes
X is restricted to rules of the second form only.
X
X ATTRIBUTE_LIST : targets
X
X assigns the attributes specified by ATTRIBUTE_LIST to each
X target in targets or
X
X targets ATTRIBUTE_LIST : ...
X
X assigns the attributes specified by ATTRIBUTE_LIST to each
X target in targets. In the first form if targets is empty
X (ie. a NULL list), then the list of attributes will apply to
X all targets in the makefile (this is equivalent to the com-
X mon Make construct of ".IGNORE :" but has been modified to
X the notion of an attribute instead of a special target).
X Not all of the attributes have global meaning. In particu-
X lar, .LIBRARY, .NOSTATE, .PHONY, .SETDIR, .SYMBOL and
X .UPDATEALL have no assigned global meaning.
X
X
X
X
XVersion 3.9 PL0 UW 13
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X Any attribute may be used with any target, even with the
X special targets. Some combinations are useless (e.g.
X .INCLUDE .PRECIOUS: ... ), while others are useful (e.g.
X .INCLUDE .IGNORE : "file.mk" will not complain if file.mk
X cannot be found using the include file search rules, see the
X section on SPECIAL TARGETS for a description of .INCLUDE).
X If a specified attribute will not be used with the special
X target a warning is issued and the attribute is ignored.
X
XMACROS
X dmake supports six forms of macro assignment.
X
X
X MACRO = LINE This is the most common and familiar form of
X macro assignment. It assigns LINE literally
X as the value of MACRO. Future expansions of
X MACRO recursively expand its value.
X
X MACRO *= LINE This form behaves exactly as the simple '='
X form with the exception that if MACRO
X already has a value then the assignment is
X not performed.
X
X MACRO := LINE This form differs from the simple '=' form
X in that it expands LINE prior to assigning
X it as the value of MACRO. Future expansions
X of MACRO do not recursively expand its
X value.
X
X MACRO *:= LINE This form behaves exactly as the ':=' form
X with the exception that if MACRO already has
X a value then the assignment and expansion
X are not performed.
X
X MACRO += LINE This form of macro assignment allows macro
X values to grow. It takes the literal value
X of LINE and appends it to the previous value
X of MACRO separating the two by a single
X space. Future expansions of MACRO recur-
X sively expand its value.
X
X MACRO +:= LINE This form is similar to the '+=' form except
X that the value of LINE is expanded prior to
X being added to the value of MACRO.
X
X Macro expressions specified on the command line allow the
X macro value to be redefined within the makefile only if the
X macro is defined using the '+=' and '+:=' operators. Other
X operators will define a macro that cannot be further modi-
X fied.
X
X
X
X
X
XVersion 3.9 PL0 UW 14
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X Each of the preceeding macro assignment operators may be
X prefixed by ! to indicate that the assignment should be
X forced and that no warnings should be issued. Thus, speci-
X fying ! has the effect of silently forcing the specified
X macro assignment.
X
X When dmake defines a non-environment macro it strips leading
X and trailing white space from the macro value. Macros
X imported from the environment via either the .IMPORT special
X target (see the SPECIAL TARGETS section), or the -e, or -E
X flags are an exception to this rule. Their values are
X always taken literally and white space is never stripped.
X In addition, named macros defined using the .IMPORT special
X target do not have their values expanded when they are used
X within a makefile. In contrast, environment macros that are
X imported due to the specification of the -e or -E flags are
X subject to expansion when used.
X
X To specify a macro expansion enclose the name in () or {}
X and precede it with a dollar sign $. Thus $(TEST)
X represents an expansion of the macro variable named TEST.
X If TEST is defined then $(TEST) is replaced by its expanded
X value. If TEST is not defined then $(TEST) expands to the
X NULL string (this is equivalent to defining a macro as
X 'TEST=' ). A short form may be used for single character
X named macros. In this case the parentheses are optional,
X and $(I) is equivalent to $I. Macro expansion is recursive,
X hence, if the value string contains an expression represent-
X ing a macro expansion, the expansion is performed. Circular
X macro expansions are detected and cause an error to be
X issued.
X
X When defining a macro the given macro name is first expanded
X before being used to define the macro. Thus it is possible
X to define macros whose names depend on values of other mac-
X ros. For example, suppose CWD is defined as
X
X CWD = $(PWD:b)
X
X then the value of $(CWD) is the name of the current direc-
X tory. This can be used to define macros specific to this
X directory, for example:
X
X _$(CWD).prt = list of files to print...
X
X The actual name of the defined macro is a function of the
X current directory. A construct such as this is useful when
X processing a hierarchy of directories using .SETDIR attri-
X buted targets and a collection of small distributed makefile
X stubs.
X
X
X
X
X
XVersion 3.9 PL0 UW 15
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X Macro variables may be defined within the makefile, on the
X command line, or imported from the environment.
X
X dmake supports several non-standard macro expansions: The
X first is of the form:
X
X $(macro_name:modifier_list:modifier_list:...)
X
X where modifier_list is chosen from the set { B or b, D or d,
X E or e, F or f, I or i, L or l, S or s, T or t, U or u, ^, +
X } and
X
X b - file (not including suffix) portion of path names
X d - directory portion of all path names
X e - suffix portion of path names
X f - file (including suffix) portion of path names
X i - inferred names of targets
X l - macro value in lower case
X s - simple pattern substitution
X t - tokenization.
X u - macro value in upper case
X ^ - prepend a prefix to each token
X + - append a suffix to each token
X
X Thus if we have the example:
X
X test = d1/d2/d3/a.out f.out d1/k.out
X
X The following macro expansions produce the values on the
X right of '->' after expansion.
X
X $(test:d) -> d1/d2/d3/ d1/
X $(test:b) -> a f k
X $(test:f) -> a.out f.out k.out
X ${test:db} -> d1/d2/d3/a f d1/k
X ${test:s/out/in/:f} -> a.in f.in k.in
X $(test:f:t"+") -> a.out+f.out+k.out
X $(test:e) -> .out .out .out
X $(test:u) -> D1/D2/D3/A.OUT F.OUT D1/K.OUT
X
X If a token ends in a string composed from the value of the
X macro DIRBRKSTR (ie. ends in a directory separator string,
X e.g. '/' in UNIX) and you use the :d modifier then the
X expansion returns the directory name less the final direc-
X tory separator string. Thus successive pairs of :d modif-
X iers each remove a level of directory in the token string.
X
X The tokenization modifier takes all white space separated
X tokens from the macro value and separates them by the quoted
X separator string. The separator string may contain the fol-
X lowing escape codes \a => <bel>, \b => <backspace>, \f =>
X <formfeed>, \n => <nl>, \r => <cr>, \t => <tab>, \v =>
X
X
X
XVersion 3.9 PL0 UW 16
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X <vertical tab>, \" => ", and \xxx => <xxx> where xxx is the
X octal representation of a character. Thus the expansion:
X
X $(test:f:t"+\n")
X produces:
X a.out+
X f.out+
X k.out
X
X The prefix operator ^ takes all white space separated tokens
X from the macro value and prepends string to each.
X
X $(test:f:^mydir/)
X produces:
X mydir/a.out mydir/f.out mydir/k.out
X
X The suffix operator + takes all white space separated tokens
X from the macro value and appends string to each.
X
X $(test:b:+.c)
X produces:
X a.c f.c k.c
X
X The next non-standard form of macro expansion allows for
X recursive macros. It is possible to specify a $(macro_name)
X or ${macro_name} expansion where macro_name contains more $(
X ... ) or ${ ... } macro expansions itself.
X
X For example $(CC$(_HOST)$(_COMPILER)) will first expand
X CC$(_HOST)$(_COMPILER) to get a result and use that result
X as the name of the macro to expand. This is useful for
X writing a makefile for more than one target environment. As
X an example consider the following hypothetical case. Suppose
X that _HOST and _COMPILER are imported from the environment
X and are set to represent the host machine type and the host
X compiler respectively.
X
X CFLAGS_VAX_CC = -c -O # _HOST == "_VAX", _COMPILER == "_CC"
X CFLAGS_PC_MSC = -c -ML # _HOST == "_PC", _COMPILER == "_MSC"
X
X # redefine CFLAGS macro as:
X
X CFLAGS := $(CFLAGS$(_HOST)$(_COMPILER))
X
X This causes CFLAGS to take on a value that corresponds to
X the environment in which the make is being invoked.
X
X The final non-standard macro expansion is of the form:
X
X string1{token_list}string2
X
X
X
X
X
XVersion 3.9 PL0 UW 17
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X where string1, string2 and token_list are expanded. After
X expansion, string1 is prepended to each token found in
X token_list and string2 is appended to each resulting token
X from the previous prepend. string1 and string2 are not del-
X imited by white space whereas the tokens in token_list are.
X A null token in the token list is specified using "". Thus
X using another example we have:
X
X test/{f1 f2}.o --> test/f1.o test/f2.o
X test/ {f1 f2}.o --> test/ f1.o f2.o
X test/{f1 f2} .o --> test/f1 test/f2 .o
X test/{"f1" ""}.o --> test/f1.o test/.o
X
X and
X
X test/{d1 d2}/{f1 f2}.o --> test/d1/f1.o test/d1/f2.o
X test/d2/f1.o test/d2/f2.o
X
X This last expansion is activated only when the first charac-
X ters of token_list appear immediately after the opening '{'
X with no intervening white space. The reason for this res-
X triction is the following incompatibility with Bourne Shell
X recipes. The line
X
X { echo hello;}
X
X is valid /bin/sh syntax; while
X
X {echo hello;}
X
X is not. Hence the latter triggers the enhanced macro expan-
X sion while the former causes it to be suppressed. See the
X SPECIAL MACROS section for a description of the special mac-
X ros that dmake defines and understands.
X
XRULES AND TARGETS
X A makefile contains a series of entries that specify depen-
X dencies. Such entries are called target/prerequisite or
X rule definitions. Each rule definition is optionally fol-
X lowed by a set of lines that provide a recipe for updating
X any targets defined by the rule. Whenever dmake attempts to
X bring a target up to date and an explicit recipe is provided
X with a rule defining the target, that recipe is used to
X update the target. A rule definition begins with a line
X having the following syntax:
X
X <targets> [<attributes>] <ruleop> [<prerequisites>] [;<recipe>]
X
X targets is a non-empty list of targets. If the target is a
X special target (see SPECIAL TARGETS section below) then it
X must appear alone on the rule line. For example:
X
X
X
X
XVersion 3.9 PL0 UW 18
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X .IMPORT .ERROR : ...
X
X is not allowed since both .IMPORT and .ERROR are special
X targets. Special targets are not used in the construction
X of the dependency graph and will not be made.
X
X attributes is a possibly empty list of attributes. Any
X attribute defined in the ATTRIBUTES section above may be
X specified. All attributes will be applied to the list of
X named targets in the rule definition. No other targets will
X be affected.
X
X
X NOTE: As stated earlier, if both the target list and
X prerequisite list are empty but the attributes list
X is not, then the specified attributes affect all
X targets in the makefile.
X
X
X ruleop is a separator which is used to identify the targets
X from the prerequisites. Optionally it also provides a
X facility for modifying the way in which dmake handles the
X making of the associated targets. In its simplest form the
X operator is a single ':', and need not be separated by white
X space from its neighboring tokens. It may additionally be
X followed by any of the modifiers { !, ^, -, :, | }, where:
X
X
X ! says execute the recipe for the associated targets once
X for each out of date prerequisite. Ordinarily the
X recipe is executed once for all out of date prere-
X quisites at the same time.
X
X ^ says to insert the specified prerequisites, if any,
X before any other prerequisites already associated with
X the specified targets. In general, it is not useful to
X specify ^ with an empty list of prerequisites.
X
X - says to clear the previous list of prerequisites before
X adding the new prerequisites. Thus,
X
X .SUFFIXES :
X .SUFFIXES : .a .b
X
X can be replaced by
X
X .SUFFIXES :- .a .b
X
X however the old form still works as expected. NOTE:
X .SUFFIXES is ignored by dmake it is used here simply as
X an example.
X
X
X
X
XVersion 3.9 PL0 UW 19
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X : When the rule operator is not modified by a second ':'
X only one set of rules may be specified for making a
X target. Multiple definitions may be used to add to the
X list of prerequisites that a target depends on. How-
X ever, if a target is multiply defined only one defini-
X tion may specify a recipe for making the target.
X
X When a target's rule operator is modified by a second
X ':' (:: for example) then this definition may not be
X the only definition with a recipe for the target.
X There may be other :: target definition lines that
X specify a different set of prerequisites with a dif-
X ferent recipe for updating the target. Any such target
X is made if any of the definitions find it to be out of
X date with respect to the related prerequisites and the
X corresponding recipe is used to update the target. By
X definition all '::' recipes that are found to be out of
X date for are executed.
X
X In the following simple example, each rule has a `::'
X ruleop. In such an operator we call the first `:' the
X operator, and the second `:' the modifier.
X
X a.o :: a.c b.h
X first recipe for making a.o
X
X a.o :: a.y b.h
X second recipe for making a.o
X
X If a.o is found to be out of date with respect to a.c
X then the first recipe is used to make a.o. If it is
X found out of date with respect to a.y then the second
X recipe is used. If a.o is out of date with respect to
X b.h then both recipes are invoked to make a.o. In the
X last case the order of invocation corresponds to the
X order in which the rule definitions appear in the
X makefile.
X
X | Is defined only for PERCENT rule target definitions.
X When specified it indicates that the following con-
X struct should be parsed using the old semantinc mean-
X ing:
X
X %.o :| %.c %.r %.f ; some rule
X
X is equivalent to:
X
X %.o : %.c ; some rule
X %.o : %.r ; some rule
X %.o : %.f ; some rule
X
X
X
X
X
XVersion 3.9 PL0 UW 20
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X Targets defined using a single `:' operator with a recipe
X may be redefined again with a new recipe by using a `:'
X operator with a `:' modifier. This is equivalent to a tar-
X get having been initially defined with a rule using a `:'
X modifier. Once a target is defined using a `:' modifier it
X may not be defined again with a recipe using only the `:'
X operator with no `:' modifier. In both cases the use of a
X `:' modifier creates a new list of prerequisites and makes
X it the current prerequisite list for the target. The `:'
X operator with no recipe always modifies the current list of
X prerequisites. Thus assuming each of the following defini-
X tions has a recipe attached, then:
X
X joe : fred ... (1)
X joe :: more ... (2)
X
X and
X
X joe :: fred ... (3)
X joe :: more ... (4)
X
X are legal and mean: add the recipe associated with (2), or
X (4) to the set of recipes for joe, placing them after exist-
X ing recipes for making joe. The constructs:
X
X joe :: fred ... (5)
X joe : more ... (6)
X
X and
X
X joe : fred ... (7)
X joe : more ... (8)
X
X are errors since we have two sets of perfectly good recipes
X for making the target.
X
X prerequisites is a possibly empty list of targets that must
X be brought up to date before making the current target.
X
X recipe is a short form and allows the user to specify short
X rule definitions on a single line. It is taken to be the
X first recipe line in a larger recipe if additional lines
X follow the rule definition. If the semi-colon is present
X but the recipe line is empty (ie. null string) then it is
X taken to be an empty rule. Any target so defined causes the
X Don't know how to make ... error message to be suppressed
X when dmake tries to make the target and fails. This silence
X is maintained for rules that are terminated by a semicolon
X and have no following recipe lines, for targets listed on
X the command line, for the first target found in the
X makefile, and for any target having no recipe but containing
X a list of prerequisites (see the COMPATIBILITY section for
X
X
X
XVersion 3.9 PL0 UW 21
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X an exception to this rule if the AUGMAKE (-A) flag was
X specified.
X
XRECIPES
X The traditional format used by most versions of Make defines
X the recipe lines as arbitrary strings that may contain macro
X expansions. They follow a rule definition line and may be
X spaced apart by comment or blank lines. The list of recipe
X lines defining the recipe is terminated by a new target
X definition, a macro definition, or end-of-file. Each recipe
X line MUST begin with a <TAB> character which may optionally
X be followed with one or all of the characters '@%+-'. The
X '-' indicates that non-zero exit values (ie. errors) are to
X be ignored when this recipe line is executed, the '+' indi-
X cates that the current recipe line is to be executed using
X the shell, the '%' indicates that dmake should swap itself
X out to secondary storage (MSDOS only) before running the
X recipe and the '@' indicates that the recipe line should NOT
X be echoed to the terminal prior to being executed. Each
X switch is off by default (ie. by default, errors are signi-
X ficant, commands are echoed, no swapping is done and a shell
X is used only if the recipe line contains a character found
X in the value of the SHELLMETAS macro). Global settings
X activated via command line options or special attribute or
X target names may also affect these settings. An example
X recipe:
X
X target :
X first recipe line
X second recipe line, executed independently of the first.
X @a recipe line that is not echoed
X -and one that has errors ignored
X %and one that causes dmake to swap out
X +and one that is executed using a shell.
X
X The second and new format of the recipe block begins the
X block with the character '[' (the open group character) in
X the last non-white space position of a line, and terminates
X the block with the character ']' (the close group character)
X in the first non-white space position of a line. In this
X form each recipe line need not have a leading TAB. This is
X called a recipe group. Groups so defined are fed intact as
X a single unit to a shell for execution whenever the
X corresponding target needs to be updated. If the open group
X character '[' is preceded by one or all of -, @ or % then
X they apply to the entire group in the same way that they
X apply to single recipe lines. You may also specify '+' but
X it is redundant as a shell is already being used to run the
X recipe. See the MAKING TARGETS section for a description of
X how dmake invokes recipes. Here is an example of a group
X recipe:
X
X
X
X
XVersion 3.9 PL0 UW 22
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X target :
X [
X first recipe line
X second recipe line
X all of these recipe lines are fed to a
X single copy of a shell for execution.
X ]
X
X
XTEXT DIVERSIONS
X dmake supports the notion of text diversions. If a recipe
X line contains the macro expression
X
X $(mktmp[,[file][,text]] data)
X
X then all text contained in the data expression is expanded
X and is written to a temporary file. The return value of the
X macro is the name of the temporary file.
X
X data can be any text and must be separated from the 'mktmp'
X portion of the macro name by white-space. The only restric-
X tion on the data text is that it must contain a balanced
X number of parentheses of the same kind as are used to ini-
X tiate the $(mktmp ...) expression. For example:
X
X $(mktmp $(XXX))
X
X is legal and works as expected, but:
X
X $(mktmp text (to dump to file)
X
X is not legal. You can achieve what you wish by either
X defining a macro that expands to '(' or by using {} in the
X macro expression; like this:
X
X ${mktmp text (to dump to file}
X
X Since the temporary file is opened when the macro containing
X the text diversion expression is expanded, diversions may be
X nested and any diversions that are created as part of ':='
X macro expansions persist for the duration of the dmake run.
X The diversion text may contain the same escape codes as
X those described in the MACROS section. Thus if the data
X text is to contain new lines they must be inserted using the
X \n escape sequence. For example the expression:
X
X all:
X cat $(mktmp this is a\n\
X test of the text diversion\n)
X
X is replaced by:
X
X
X
X
XVersion 3.9 PL0 UW 23
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X cat /tmp/mk12294AA
X
X where the temporary file contains two lines both of which
X are terminated by a new-line. If the data text spans multi-
X ple lines in the makefile then each line must be continued
X via the use of a \. A second more illustrative example gen-
X erates a response file to an MSDOS link command:
X
X OBJ = fred.obj mary.obj joe.obj
X all : $(OBJ)
X link @$(mktmp $(^:t"+\n")\n)
X
X The result of making `all' in the second example is the com-
X mand:
X
X link @/tmp/mk02394AA
X
X where the temporary file contains:
X
X fred.obj+
X mary.obj+
X joe.obj
X
X The last line of the file is terminated by a new-line which
X is inserted due to the \n found at the end of the data
X string.
X
X If the optional file specifier is present then its expanded
X value is the name of the temporary file to create. Whenever
X a $(mktmp ...) macro is expanded the macro $(TMPFILE) is set
X to a new temporary file name. Thus the construct:
X
X $(mktmp,$(TMPFILE) data)
X
X is completely equivalent to not specifying the $(TMPFILE)
X optional argument. Another example that would be useful for
X MSDOS users with a Turbo-C compiler
X
X $(mktmp,turboc.cfg $(CFLAGS))
X
X will place the contents of CFLAGS into a local turboc.cfg
X file. The second optional argument, text, if present alters
X the name of the value returned by the $(mktmp ...) macro.
X
X Under MS-DOS text diversions may be a problem. Many DOS
X tools require that path names which contain directories use
X the \ character to delimit the directories. Some users how-
X ever wish to use the '/' to delimit pathnames and use
X environments that allow them to do so. The macro USESHELL
X is set to "yes" if the current recipe is forced to use a
X shell via the .USESHELL or '+' directives, otherwise its
X value is "no". The dmake startup files define the macro
X
X
X
XVersion 3.9 PL0 UW 24
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X DIVFILE whose value is either the value of TMPFILE or the
X value of TMPFILE edited to replace any '/' characters to the
X appropriate value based on the current shell and whether it
X will be used to execute the recipe.
X
X Previous versions of dmake defined text diversions using <+,
X +> strings, where <+ started a text diversion and +> ter-
X minated one. dmake is backward compatible with this con-
X struct only if the <+ and +> appear literally on the same
X recipe line or in the same macro value string. In such
X instances the expression:
X
X <+data+>
X
X is mapped to:
X
X $(mktmp data)
X
X which is fully output compatible with the earlier construct.
X <+, +> constructs whose text spans multiple lines must be
X converted by hand to use $(mktmp ...).
X
X If the environment variable TMPDIR is defined then the tem-
X porary file is placed into the directory specified by that
X variable. A makefile can modify the location of temporary
X files by defining a macro named TMPDIR and exporting it
X using the .EXPORT special target.
X
XSPECIAL TARGETS
X This section describes the special targets that are recog-
X nized by dmake. Some are affected by attributes and others
X are not.
X
X .ERROR If defined then the recipe associated with
X this target is executed whenever an error con-
X dition is detected by dmake. All attributes
X that can be used with any other target may be
X used with this target. Any prerequisites of
X this target will be brought up to date during
X its processing. NOTE: errors will be ignored
X while making this target, in extreme cases
X this may cause some problems.
X
X .EXIT If this target is encountered while parsing a
X makefile then the parsing of the makefile is
X immediately terminated at that point.
X
X .EXPORT All prerequisites associated with this target
X are assumed to correspond to macro names and
X they and their values are exported to the
X environment as environment strings at the
X point in the makefile at which this target
X
X
X
XVersion 3.9 PL0 UW 25
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X appears. Any attributes specified with this
X target are ignored. Only macros which have
X been assigned a value in the makefile prior to
X the export directive are exported, macros as
X yet undefined or macros whose value contains
X any of the characters "+=:*" are not exported.
X is suppre
X
X .IMPORT Prerequisite names specified for this target
X are searched for in the environment and
X defined as macros with their value taken from
X the environment. If the special name .EVERY-
X THING is used as a prerequisite name then all
X environment variables defined in the environ-
X ment are imported. The functionality of the
X -E flag can be forced by placing the construct
X .IMPORT : .EVERYTHING at the start of a
X makefile. Similarly, by placing the construct
X at the end, one can emulate the effect of the
X -e command line flag. If a prerequisite name
X cannot be found in the environment an error
X message is issued. .IMPORT accepts the
X .IGNORE attribute. When given, it causes
X dmake to ignore the above error. See the MAC-
X ROS section for a description of the process-
X ing of imported macro values.
X
X .INCLUDE Parse another makefile just as if it had been
X located at the point of the .INCLUDE in the
X current makefile. The list of prerequisites
X gives the list of makefiles to try to read.
X If the list contains multiple makefiles then
X they are read in order from left to right.
X The following search rules are used when try-
X ing to locate the file. If the filename is
X surrounded by " or just by itself then it is
X searched for in the current directory. If it
X is not found it is then searched for in each
X of the directories specified as prerequisites
X of the .INCLUDEDIRS special target. If the
X file name is surrounded by < and >, (ie.
X <my_spiffy_new_makefile>) then it is searched
X for only in the directories given by the
X .INCLUDEDIRS special target. In both cases if
X the file name is a fully qualified name start-
X ing at the root of the file system then it is
X only searched for once, and the .INCLUDEDIRS
X list is ignored. .INCLUDE accepts the .IGNORE
X and .SETDIR attributes. If .IGNORE attribute
X is given and the file cannot be found then
X dmake continues processing, otherwise an error
X message is generated. The .SETDIR attribute
X
X
X
XVersion 3.9 PL0 UW 26
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X causes dmake to change directories to the
X specified directory prior to attempting the
X include operation. If all fails dmake
X attempts to make the file to be included. If
X making the file fails then dmake terminates
X unless the .INCLUDE directive also specified
X the .IGNORE attribute. If .FIRST is specified
X along with .INCLUDE then dmake attempts to
X include each named prerequisite and will ter-
X minate the inclusion with the first prere-
X quisite that results in a successful inclu-
X sion.
X
X .INCLUDEDIRS The list of prerequisites specified for this
X target defines the set of directories to
X search when trying to include a makefile.
X
X .KEEP_STATE This special target is a synonym for the macro
X definition
X
X .KEEP_STATE := _state.mk
X
X It's effect is to turn on STATE keeping and to
X define _state.mk as the state file.
X
X .MAKEFILES The list of prerequisites is the set of files
X to try to read as the default makefile. By
X default this target is defined as:
X
X .MAKEFILES : makefile.mk Makefile
X makefile
X
X
X .SOURCE The prerequisite list of this target defines a
X set of directories to check when trying to
X locate a target file name. See the section on
X BINDING of targets for more information.
X
X .SOURCE.suff The same as .SOURCE, except that the
X .SOURCE.suff list is searched first when try-
X ing to locate a file matching the a target
X whose name ends in the suffix .suff.
X
X .REMOVE The recipe of this target is used whenever
X dmake needs to remove intermediate targets
X that were made but do not need to be kept
X around. Such targets result from the applica-
X tion of transitive closure on the dependency
X graph.
X
X In addition to the special targets above, several other
X forms of targets are recognized and are considered special,
X
X
X
XVersion 3.9 PL0 UW 27
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X their exact form and use is defined in the sections that
X follow.
X
XSPECIAL MACROS
X dmake defines a number of special macros. They are divided
X into three classes: control macros, run-time macros, and
X function macros. The control macros are used by dmake to
X configure its actions, and are the preferred method of doing
X so. In the case when a control macro has the same function
X as a special target or attribute they share the same name as
X the special target or attribute. The run-time macros are
X defined when dmake makes targets and may be used by the user
X inside recipes. The function macros provide higher level
X functions dealing with macro expansion and diversion file
X processing.
X
XCONTROL MACROS
X To use the control macros simply assign them a value just
X like any other macro. The control macros are divided into
X three groups: string valued macros, character valued macros,
X and boolean valued macros.
X
X The following are all of the string valued macros. This
X list is divided into two groups. The first group gives the
X string valued macros that are defined internally and cannot
X be directly set by the user.
X
X INCDEPTH This macro's value is a string of digits
X representing the current depth of makefile
X inclusion. In the first makefile level this
X value is zero.
X
X MFLAGS Is the list of flags that were given on the
X command line including a leading switch
X character. The -f flag is not included in
X this list.
X
X MAKECMD Is the name with which dmake was invoked.
X
X MAKEDIR Is the full path to the initial directory in
X which dmake was invoked.
X
X MAKEFILE Contains the string "-f makefile" where,
X makefile is the name of initial user
X makefile that was first read.
X
X MAKEFLAGS Is the same as $(MFLAGS) but has no leading
X switch character. (ie. MFLAGS =
X -$(MAKEFLAGS))
X
X MAKEMACROS Contains the complete list of macro expres-
X sions that were specified on the command
X
X
X
XVersion 3.9 PL0 UW 28
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
END_OF_FILE
if test 66779 -ne `wc -c <'dmake/man/dmake.nc.A'`; then
echo shar: \"'dmake/man/dmake.nc.A'\" unpacked with wrong size!
elif test -f 'dmake/man/dmake.nc.B'; then
echo shar: Combining \"'dmake/man/dmake.nc'\" \(131520 characters\)
cat 'dmake/man/dmake.nc.A' 'dmake/man/dmake.nc.B' > 'dmake/man/dmake.nc'
if test 131520 -ne `wc -c <'dmake/man/dmake.nc'`; then
echo shar: \"'dmake/man/dmake.nc'\" combined with wrong size!
else
rm dmake/man/dmake.nc.A dmake/man/dmake.nc.B
fi
fi
# end of 'dmake/man/dmake.nc.A'
fi
echo shar: End of archive 2 \(of 27\).
cp /dev/null ark2isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/mac/main.c dmake/man/dmake.nc.B
# Wrapped by kent@sparky on Fri Oct 21 16:50:31 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 3 (of 27)."'
if test -f 'dmake/mac/main.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/main.c'\"
else
echo shar: Extracting \"'dmake/mac/main.c'\" \(1796 characters\)
sed "s/^X//" >'dmake/mac/main.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/main.c,v 1.1 1994/10/06 17:42:59 dvadura Exp $
X-- SYNOPSIS -- The real main function
X--
X-- DESCRIPTION
X-- In order to get the third argument to main(), which is a list of
X-- environmental variables, we have #defined main to dmakemain,
X-- and put the real main here.
X--
X-- The environmental variables are placed in the environ global variable
X-- and set up for processing by dmake in make_env().
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: main.c,v $
X * Revision 1.1 1994/10/06 17:42:59 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X
X
X/*
X * Put envp in environ and call dmake's main().
X */
X#undef main
Xvoid main (int argc, char *argv[], char *envp[]) {
X environ = envp;
X dmakemain (argc, argv);
X} /* void main () */
END_OF_FILE
if test 1796 -ne `wc -c <'dmake/mac/main.c'`; then
echo shar: \"'dmake/mac/main.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/main.c'
fi
if test -f 'dmake/man/dmake.nc.B' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/man/dmake.nc.B'\"
else
echo shar: Extracting \"'dmake/man/dmake.nc.B'\" \(64741 characters\)
sed "s/^X//" >'dmake/man/dmake.nc.B' <<'END_OF_FILE'
X line.
X
X MAKETARGETS Contains the name(s) of the target(s), if
X any, that were specified on the command
X line.
X
X MAXPROCESSLIMIT Is a numeric string representing the maximum
X number of processes that dmake can use when
X making targets using parallel mode.
X
X NULL Is permanently defined to be the NULL
X string. This is useful when comparing a
X conditional expression to an NULL value.
X
X PWD Is the full path to the current directory in
X which make is executing.
X
X TMPFILE Is set to the name of the most recent tem-
X porary file opened by dmake. Temporary
X files are used for text diversions and for
X group recipe processing.
X
X TMD Stands for "To Make Dir", and is the path
X from the present directory (value of $(PWD))
X to the directory that dmake was started up
X in (value of $(MAKEDIR)). This macro is
X modified when .SETDIR attributes are pro-
X cessed.
X
X USESHELL The value of this macro is set to "yes" if
X the current recipe is forced to use a shell
X for its execution via the .USESHELL or '+'
X directives, its value is "no" otherwise.
X
X
X The second group of string valued macros control dmake
X behavior and may be set by the user.
X
X .DIRCACHE If set to "yes" enables the directory cache
X (this is the default). If set to "no" dis-
X ables the directory cache (equivalent to -d
X commandline flag).
X
X .NAMEMAX Defines the maximum length of a filename
X component. The value of the variable is
X initialized at startup to the value of the
X compiled macro NAME_MAX. On some systems
X the value of NAME_MAX is too short by
X default. Setting a new value for .NAMEMAX
X will override the compiled value.
X
X
X
X
X
XVersion 3.9 PL0 UW 29
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X .NOTABS When set to non-NULL enables the use of
X spaces as well as <tabs> to begin recipe
X lines. By default a non-group recipe is
X terminated by a line without any leading
X white-space or by a line not beggining with
X a <tab> character. Enabling this mode modi-
X fies the first condition of the above termi-
X nation rule to terminate a non-group recipe
X with a line that contains only white-space.
X This mode does not effect the parsing of
X group recipes bracketed by [].
X
X AUGMAKE If set to a non NULL value will enable the
X transformation of special meta targets to
X support special AUGMAKE inferences (See the
X COMPATIBILITY section).
X
X DIRBRKSTR Contains the string of chars used to ter-
X minate the name of a directory in a path-
X name. Under UNIX its value is "/", under
X MSDOS its value is "/\:".
X
X DIRSEPSTR Contains the string that is used to separate
X directory components when path names are
X constructed. It is defined with a default
X value at startup.
X
X DIVFILE Is defined in the startup file and gives the
X name that should be returned for the diver-
X sion file name when used in $(mktmp ...)
X expansions, see the TEXT DIVERSION section
X for details.
X
X DYNAMICNESTINGLEVEL
X Specifies the maximum number of recursive
X dynamic macro expansions. Its initial value
X is 100.
X
X .KEEP_STATE Assigning this macro a value tells dmake the
X name of the state file to use and turns on
X the keeping of state information for any
X targets that are brought up to date by the
X make.
X
X GROUPFLAGS This macro gives the set of flags to pass to
X the shell when invoking it to execute a
X group recipe. The value of the macro is the
X list of flags with a leading switch indica-
X tor. (ie. `-' under UNIX)
X
X GROUPSHELL This macro defines the full path to the exe-
X cutable image to be used as the shell when
X
X
X
XVersion 3.9 PL0 UW 30
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X processing group recipes. This macro must
X be defined if group recipes are used. It is
X assigned a default value in the startup
X makefile. Under UNIX this value is /bin/sh.
X
X GROUPSUFFIX If defined, this macro gives the string to
X use as a suffix when creating group recipe
X files to be handed to the command inter-
X preter. For example, if it is defined as
X .sh, then all temporary files created by
X dmake will end in the suffix .sh. Under
X MSDOS if you are using command.com as your
X GROUPSHELL, then this suffix must be set to
X .bat in order for group recipes to function
X correctly. The setting of GROUPSUFFIX and
X GROUPSHELL is done automatically for
X command.com in the startup.mk files.
X
X MAKE Is defined in the startup file by default.
X The string $(MAKE) is recognized when using
X the -n option for single line recipes. Ini-
X tially this macro is defined to have the
X value "$(MAKECMD) $(MFLAGS)".
X
X MAKESTARTUP This macro defines the full path to the ini-
X tial startup makefile. Use the -V command
X line option to discover its initial value.
X
X MAXLINELENGTH This macro defines the maximum size of a
X single line of makefile input text. The
X size is specified as a number, the default
X value is defined internally and is shown via
X the -V option. A buffer of this size plus 2
X is allocated for reading makefile text. The
X buffer is freed before any targets are made,
X thereby allowing files containing long input
X lines to be processed without consuming
X memory during the actual make. This macro
X can only be used to extend the line length
X beyond it's default minimum value.
X
X MAXPROCESS Specify the maximum number of child
X processes to use when making targets. The
X default value of this macro is "1" and its
X value cannot exceed the value of the macro
X MAXPROCESSLIMIT. Setting the value of MAX-
X PROCESS on the command line or in the
X makefile is equivalent to supplying a
X corresponding value to the -P flag on the
X command line.
X
X
X
X
X
XVersion 3.9 PL0 UW 31
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X PREP This macro defines the number of iterations
X to be expanded automatically when processing
X % rule definitions of the form:
X
X % : %.suff
X
X See the sections on PERCENT(%) RULES for
X details on how PREP is used.
X
X SHELL This macro defines the full path to the exe-
X cutable image to be used as the shell when
X processing single line recipes. This macro
X must be defined if recipes requiring the
X shell for execution are to be used. It is
X assigned a default value in the startup
X makefile. Under UNIX this value is /bin/sh.
X
X SHELLFLAGS This macro gives the set of flags to pass to
X the shell when invoking it to execute a sin-
X gle line recipe. The value of the macro is
X the list of flags with a leading switch
X indicator. (ie. `-' under UNIX)
X
X SHELLMETAS Each time dmake executes a single recipe
X line (not a group recipe) the line is
X searched for any occurrence of a character
X defined in the value of SHELLMETAS. If such
X a character is found the recipe line is
X defined to require a shell to ensure its
X correct execution. In such instances a
X shell is used to invoke the recipe line. If
X no match is found the recipe line is exe-
X cuted without the use of a shell.
X
X
X There is only one character valued macro defined by dmake:
X SWITCHAR contains the switch character used to introduce
X options on command lines. For UNIX its value is `-', and
X for MSDOS its value may be `/' or `-'. The macro is inter-
X nally defined and is not user setable. The MSDOS version of
X dmake attempts to first extract SWITCHAR from an environment
X variable of the same name. If that fails it then attempts
X to use the undocumented getswitchar system call, and returns
X the result of that. Under MSDOS version 4.0 you must set
X the value of the environment macro SWITCHAR to '/' to obtain
X predictable behavior.
X
X All boolean macros currently understood by dmake correspond
X directly to the previously defined attributes. These macros
X provide a second way to apply global attributes, and
X represent the preferred method of doing so. They are used
X by assigning them a value. If the value is not a NULL
X
X
X
XVersion 3.9 PL0 UW 32
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X string then the boolean condition is set to on. If the
X value is a NULL string then the condition is set to off.
X There are five conditions defined and they correspond
X directly to the attributes of the same name. Their meanings
X are defined in the ATTRIBUTES section above. The macros
X are: .EPILOG, .IGNORE, .MKSARGS, .NOINFER, .PRECIOUS, .PRO-
X LOG, .SEQUENTIAL, .SILENT, .SWAP, and .USESHELL. Assigning
X any of these a non NULL value will globally set the
X corresponding attribute to on.
X
XRUN_TIME MACROS
X These macros are defined when dmake is making targets, and
X may take on different values for each target. $@ is defined
X to be the full target name, $? is the list of all out of
X date prerequisites, $& is the list of all prerequisites, $>
X is the name of the library if the current target is a
X library member, and $< is the list of prerequisites speci-
X fied in the current rule. If the current target had a
X recipe inferred then $< is the name of the inferred prere-
X quisite even if the target had a list of prerequisites sup-
X plied using an explicit rule that did not provide a recipe.
X In such situations $& gives the full list of prerequisites.
X
X $* is defined as $(@:db) when making targets with explicit
X recipes and is defined as the value of % when making targets
X whose recipe is the result of an inference. In the first
X case $* is the target name with no suffix, and in the second
X case, is the value of the matched % pattern from the associ-
X ated %-rule. $^ expands to the set of out of date prere-
X quisites taken from the current value of $<. In addition to
X these, $$ expands to $, {{ expands to {, }} expands to },
X and the strings <+ and +> are recognized as respectively
X starting and terminating a text diversion when they appear
X literally together in the same input line.
X
X The difference between $? and $^ can best be illustrated by
X an example, consider:
X
X fred.out : joe amy hello
X rules for making fred
X
X fred.out : my.c your.h his.h her.h # more prerequisites
X
X Assume joe, amy, and my.c are newer then fred.out. When
X dmake executes the recipe for making fred.out the values of
X the following macros will be:
X
X $@ --> fred.out
X $* --> fred
X $? --> joe amy my.c # note the difference between $? and $^
X $^ --> joe amy
X $< --> joe amy hello
X
X
X
XVersion 3.9 PL0 UW 33
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X $& --> joe amy hello my.c your.h his.h her.h
X
X
XFUNCTION MACROS
X dmake supports a full set of functional macros. One of
X these, the $(mktmp ...) macro, is discussed in detail in the
X TEXT DIVERSION section and is not covered here.
X
X
X $(assign expression)
X Causes expression to be parsed as a macro assign-
X ment expression and results in the specified
X assignment being made. An error is issued if the
X assignment is not syntatically correct. expres-
X sion may contain white space. This is in effect a
X dynamic macro assignment facility and may appear
X anywhere any other macro may appear. The result
X of the expanding a dynamic macro assignment
X expression is the name of the macro that was
X assigned and $(NULL) if the expression is not a
X valid macro assignment expression. Some examples
X are:
X
X $(assign foo := fred)
X $(assign $(indirect_macro_name) +:= $(morejunk))
X
X $(null,text true false)
X expands the value of text. If it is NULL then the
X macro returns the value of the expansion of true
X and the expansion of false otherwise. The terms
X true, and false must be strings containing no
X white-space.
X
X $(!null,text true false)
X Behaves identically to the previous macro except
X that the true string is chosen if the expansion of
X text is not NULL.
X
X $(eq,text_a,text_b true false)
X expands text_a and text_b and compares their
X results. If equal it returns the result of the
X expansion of the true term, otherwise it returns
X the expansion of the false term.
X
X $(!eq,text_a,text_b true false)
X Behaves identically to the previous macro except
X that the true string is chosen if the expansions
X of the two strings are not equal
X
X $(nil expression)
X Always returns the value of $(NULL) regardless of
X what expression is. This function macro can be
X
X
X
XVersion 3.9 PL0 UW 34
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X used to discard results of expanding macro expres-
X sions.
X
X $(shell command)
X Runs command as if it were part of a recipe and
X returns, separated by a single space, all the
X non-white space terms written to stdout by the
X command. For example:
X
X $(shell ls *.c)
X
X will return "a.c b.c c.c d.c" if the files exist
X in the current directory. The recipe modification
X flags [+@%-] are honored if they appear as the
X first characters in the command. For example:
X
X $(shell +ls *.c)
X
X will run the command using the current shell.
X
X $(shell,expand command)
X Is an extension to the $(shell... function macro
X that expands the result of running command.
X
X $(sort list)
X Will take all white-space separated tokens in list
X and will return their sorted equivalent list.
X
X $(strip data)
X Will replace all strings of white-space in data by
X a single space.
X
X $(subst,pat,replacement data)
X Will search for pat in data and will replace any
X occurrence of pat with the replacement string.
X The expansion
X
X $(subst,.o,.c $(OBJECTS))
X
X is equivalent to:
X
X $(OBJECTS:s/.o/.c/)
X
X
XCONDITIONAL MACROS
X dmake supports conditional macros. These allow the defini-
X tion of target specific macro values. You can now say the
X following:
X
X target ?= MacroName MacroOp Value
X
X This creates a definition for MacroName whose value is Value
X
X
X
XVersion 3.9 PL0 UW 35
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X only when target is being made. You may use a conditional
X macro assignment anywhere that a regular macro assignment
X may appear, including as the value of a $(assign ...) macro.
X
X The new definition is associated with the most recent cell
X definition for target. If no prior definition exists then
X one is created. The implications of this are immediately
X evident in the following example:
X
X foo := hello
X
X all : cond;@echo "all done, foo=[$(foo)] bar=[$(bar)]"
X
X cond ?= bar := global decl
X
X cond .SETDIR=unix::;@echo $(foo) $(bar)
X cond ?= foo := hi
X
X cond .SETDIR=msdos::;@echo $(foo) $(bar)
X cond ?= foo := hihi
X
X The first conditional assignment creates a binding for 'bar'
X that is activated when 'cond' is made. The bindings follow-
X ing the :: definitions are activated when their respective
X recipe rules are used. Thus the first binding serves to
X provide a global value for 'bar' while any of the cond ::
X rules are processed, and the local bindings for 'foo' come
X into effect when their associated :: rule is processed.
X
X Conditionals for targets of .UPDATEALL are all activated
X before the target group is made. Assignments are processed
X in order. Note that the value of a conditional macro
X assignment is NOT AVAILABLE until the associated target is
X made, thus the construct
X
X mytarget ?= bar := hello
X mytarget ?= foo := $(bar)
X
X results in $(foo) expanding to "", if you want the result to
X be "hello" you must use:
X
X mytarget ?= bar := hello
X mytarget ?= foo = $(bar)
X
X Once a target is made any associated conditional macros are
X deactivated and their values are no longer available.
X Activation occurrs after all inference, and .SETDIR direc-
X tives have been processed and after $@ is assigned, but
X before prerequisites are processed; thereby making the
X values of conditional macro definitions available during
X construction of prerequisites.
X
X
X
X
XVersion 3.9 PL0 UW 36
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X If a %-meta rule target has associated conditional macro
X assignments, and the rule is chosen by the inference algo-
X rithm then the conditional macro assignments are inferred
X together with the associated recipe.
X
XDYNAMIC PREREQUISITES
X dmake looks for prerequisites whose names contain macro
X expansions during target processing. Any such prerequisites
X are expanded and the result of the expansion is used as the
X prerequisite name. As an example the line:
X
X fred : $$@.c
X
X causes the $$@ to be expanded when dmake is making fred, and
X it resolves to the target fred. This enables dynamic prere-
X quisites to be generated. The value of @ may be modified by
X any of the valid macro modifiers. So you can say for exam-
X ple:
X
X fred.out : $$(@:b).c
X
X where the $$(@:b) expands to fred. Note the use of $$
X instead of $ to indicate the dynamic expansion, this is due
X to the fact that the rule line is expanded when it is ini-
X tially parsed, and $$ then returns $ which later triggers
X the dynamic prerequisite expansion. If you really want a $
X to be part of a prerequisite name you must use $$$$.
X Dynamic macro expansion is performed in all user defined
X rules, and the special targets .SOURCE*, and .INCLUDEDIRS.
X
X If dynamic macro expansion results in multiple white space
X separated tokens then these are inserted into the prere-
X quisite list inplace of the dynamic prerequisite. If the
X new list contains additional dynamic prerequisites they will
X be expanded when they are processed. The level of recursion
X in this expansion is controlled by the value of the variable
X DYNAMICNESTINGLEVEL and is set to 100 by default.
X
XBINDING TARGETS
X This operation takes a target name and binds it to an exist-
X ing file, if possible. dmake makes a distinction between
X the internal target name of a target and its associated
X external file name. Thus it is possible for a target's
X internal name and its external file name to differ. To per-
X form the binding, the following set of rules is used.
X Assume that we are trying to bind a target whose name is of
X the form X.suff, where .suff is the suffix and X is the stem
X portion (ie. that part which contains the directory and the
X basename). dmake takes this target name and performs a
X series of search operations that try to find a suitably
X named file in the external file system. The search opera-
X tion is user controlled via the settings of the various
X
X
X
XVersion 3.9 PL0 UW 37
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X .SOURCE targets.
X
X 1. If target has the .SYMBOL attribute set then look
X for it in the library. If found, replace the tar-
X get name with the library member name and continue
X with step 2. If the name is not found then
X return.
X
X 2. Extract the suffix portion (that following the
X `.') of the target name. If the suffix is not
X null, look up the special target .SOURCE.<suff>
X (<suff> is the suffix). If the special target
X exists then search each directory given in the
X .SOURCE.<suff> prerequisite list for the target.
X If the target's suffix was null (ie. .suff was
X empty) then perform the above search but use the
X special target .SOURCE.NULL instead. If at any
X point a match is found then terminate the search.
X If a directory in the prerequisite list is the
X special name `.NULL ' perform a search for the
X full target name without prepending any directory
X portion (ie. prepend the NULL directory).
X
X 3. The search in step 2. failed. Repeat the same
X search but this time use the special target
X .SOURCE. (a default target of '.SOURCE : .NULL'
X is defined by dmake at startup, and is user rede-
X finable)
X
X 4. The search in step 3. failed. If the target has
X the library member attribute (.LIBMEMBER) set then
X try to find the target in the library which was
X passed along with the .LIBMEMBER attribute (see
X the MAKING LIBRARIES section). The bound file
X name assigned to a target which is successfully
X located in a library is the same name that would
X be assigned had the search failed (see 5.).
X
X 5. The search failed. Either the target was not
X found in any of the search directories or no
X applicable .SOURCE special targets exist. If
X applicable .SOURCE special targets exist, but the
X target was not found, then dmake assigns the first
X name searched as the bound file name. If no
X applicable .SOURCE special targets exist, then the
X full original target name becomes the bound file
X name.
X
X There is potential here for a lot of search operations. The
X trick is to define .SOURCE.x special targets with short
X search lists and leave .SOURCE as short as possible. The
X search algorithm has the following useful side effect. When
X
X
X
XVersion 3.9 PL0 UW 38
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X a target having the .LIBMEMBER (library member) attribute is
X searched for, it is first searched for as an ordinary file.
X When a number of library members require updating it is
X desirable to compile all of them first and to update the
X library at the end in a single operation. If one of the
X members does not compile and dmake stops, then the user may
X fix the error and make again. dmake will not remake any of
X the targets whose object files have already been generated
X as long as none of their prerequisite files have been modi-
X fied as a result of the fix.
X
X When dmake constructs target pathnames './' substrings are
X removed and substrings of the form 'foo/..' are eliminated.
X This may result in somewhat unexpected values of the macro
X expansion $@, but is infact the corect result.
X
X When defining .SOURCE and .SOURCE.x targets the construct
X
X .SOURCE :
X .SOURCE : fred gery
X
X is equivalent to
X
X .SOURCE :- fred gery
X
X dmake correctly handles the UNIX Make variable VPATH. By
X definition VPATH contains a list of ':' separated direc-
X tories to search when looking for a target. dmake maps
X VPATH to the following special rule:
X
X .SOURCE :^ $(VPATH:s/:/ /)
X
X Which takes the value of VPATH and sets .SOURCE to the same
X set of directories as specified in VPATH.
X
XPERCENT(%) RULES AND MAKING INFERENCES
X When dmake makes a target, the target's set of prerequisites
X (if any) must exist and the target must have a recipe which
X dmake can use to make it. If the makefile does not specify
X an explicit recipe for the target then dmake uses special
X rules to try to infer a recipe which it can use to make the
X target. Previous versions of Make perform this task by
X using rules that are defined by targets of the form
X .<suffix>.<suffix> and by using the .SUFFIXES list of suf-
X fixes. The exact workings of this mechanism were sometimes
X difficult to understand and often limiting in their useful-
X ness. Instead, dmake supports the concept of %-meta rules.
X The syntax and semantics of these rules differ from standard
X rule lines as follows:
X
X <%-target> [<attributes>] <ruleop> [<%-prerequisites>] [;<recipe>]
X
X
X
X
XVersion 3.9 PL0 UW 39
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X where %-target is a target containing exactly a single `%'
X sign, attributes is a list (possibly empty) of attributes,
X ruleop is the standard set of rule operators, %-prere-
X quisites , if present, is a list of prerequisites containing
X zero or more `%' signs, and recipe, if present, is the first
X line of the recipe.
X
X The %-target defines a pattern against which a target whose
X recipe is being inferred gets matched. The pattern match
X goes as follows: all chars are matched exactly from left to
X right up to but not including the % sign in the pattern, %
X then matches the longest string from the actual target name
X not ending in the suffix given after the % sign in the pat-
X tern. Consider the following examples:
X
X %.c matches fred.c but not joe.c.Z
X dir/%.c matches dir/fred.c but not dd/fred.c
X fred/% matches fred/joe.c but not f/joe.c
X % matches anything
X
X In each case the part of the target name that matched the %
X sign is retained and is substituted for any % signs in the
X prerequisite list of the %-meta rule when the rule is
X selected during inference and dmake constructs the new
X dependency. As an example the following %-meta rules
X describe the following:
X
X %.c : %.y ; recipe...
X
X describes how to make any file ending in .c if a correspond-
X ing file ending in .y can be found.
X
X foo%.o : fee%.k ; recipe...
X
X is used to describe how to make fooxxxx.o from feexxxx.k.
X
X %.a :; recipe...
X
X describes how to make a file whose suffix is .a without
X inferring any prerequisites.
X
X %.c : %.y yaccsrc/%.y ; recipe...
X
X is a short form for the construct:
X
X %.c : %.y ; recipe...
X %.c : yaccsrc/%.y ; recipe...
X
X ie. It is possible to specify the same recipe for two
X %-rules by giving more than one prerequisite in the prere-
X quisite list. A more interesting example is:
X
X
X
X
XVersion 3.9 PL0 UW 40
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X % : RCS/%,v ; co $<
X
X which describes how to take any target and check it out of
X the RCS directory if the corresponding file exists in the
X RCS directory. The equivalent SCCS rule would be:
X
X % : s.% ; get $<
X
X
X The previous RCS example defines an infinite rule, because
X it says how to make anything from RCS/%,v, and anything also
X includes RCS/fred.c,v. To limit the size of the graph that
X results from such rules dmake uses the macro variable PREP
X (stands for % repetition). By default the value of this
X variable is 0, which says that no repetitions of a %-rule
X are to be generated. If it is set to something greater than
X 0, then that many repetitions of any infinite %-rule are
X allowed. If in the above example PREP was set to 1, then
X dmake would generate the dependency graph:
X
X % --> RCS/%,v --> RCS/RCS/%,v,v
X
X Where each link is assigned the same recipe as the first
X link. PREP should be used only in special cases, since it
X may result in a large increase in the number of possible
X prerequisites tested. dmake further assumes that any target
X that has no suffix can be made from a prerequisite that has
X at least one suffix.
X
X dmake supports dynamic prerequisite generation for prere-
X quisites of %-meta rules. This is best illustrated by an
X example. The RCS rule shown above can infer how to check
X out a file from a corresponding RCS file only if the target
X is a simple file name with no directory information. That
X is, the above rule can infer how to find RCS/fred.c,v from
X the target fred.c, but cannot infer how to find
X srcdir/RCS/fred.c,v from srcdir/fred.c because the above
X rule will cause dmake to look for RCS/srcdir/fred.c,v; which
X does not exist (assume that srcdir has its own RCS directory
X as is the common case).
X
X A more versatile formulation of the above RCS check out rule
X is the following:
X
X % : $$(@:d)RCS/$$(@:f),v : co $@
X
X This rule uses the dynamic macro $@ to specify the prere-
X quisite to try to infer. During inference of this rule the
X macro $@ is set to the value of the target of the %-meta
X rule and the appropriate prerequisite is generated by
X extracting the directory portion of the target name (if
X any), appending the string RCS/ to it, and appending the
X
X
X
XVersion 3.9 PL0 UW 41
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X target file name with a trailing ,v attached to the previous
X result.
X
X dmake can also infer indirect prerequisites. An inferred
X target can have a list of prerequisites added that will not
X show up in the value of $< but will show up in the value of
X $? and $&. Indirect prerequisites are specified in an
X inference rule by quoting the prerequisite with single
X quotes. For example, if you had the explicit dependency:
X
X fred.o : fred.c ; rule to make fred.o
X fred.o : local.h
X
X then this can be inferred for fred.o from the following
X inference rule:
X
X %.o : %.c 'local.h' ; rule to make a .o from a .c
X
X You may infer indirect prerequisites that are a function of
X the value of '%' in the current rule. The meta-rule:
X
X %.o : %.c '$(INC)/%.h' ; rule to make a .o from a .c
X
X infers an indirect prerequisite found in the INC directory
X whose name is the same as the expansion of $(INC), and the
X prerequisite name depends on the base name of the current
X target. The set of indirect prerequisites is attached to
X the meta rule in which they are specified and are inferred
X only if the rule is used to infer a recipe for a target.
X They do not play an active role in driving the inference
X algorithm. The construct:
X
X %.o : %.c %.f 'local.h'; recipe
X
X is equivalent to:
X
X %.o : %.c 'local.h' : recipe
X
X while:
X
X %.o :| %.c %.f 'local.h'; recipe
X
X is equivalent to:
X
X %.o : %.c 'local.h' : recipe
X %.o : %.f 'local.h' : recipe
X
X
X If any of the attributes .SETDIR, .EPILOG, .PROLOG, .SILENT,
X .USESHELL, .SWAP, .PRECIOUS, .LIBRARY, .NOSTATE and .IGNORE
X are given for a %-rule then when that rule is bound to a
X target as the result of an inference, the target's set of
X
X
X
XVersion 3.9 PL0 UW 42
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X attributes is augmented by the attributes from the above set
X that are specified in the bound %-rule. Other attributes
X specified for %-meta rules are not inherited by the target.
X The .SETDIR attribute is treated in a special way. If the
X target already had a .SETDIR attribute set then dmake
X changes to that directory prior to performing the inference.
X During inference any .SETDIR attributes for the inferred
X prerequisite are honored. The directories must exist for a
X %-meta rule to be selected as a possible inference path. If
X the directories do not exist no error message is issued,
X instead the corresponding path in the inference graph is
X rejected.
X
X dmake also supports the old format special target
X .<suffix>.<suffix> by identifying any rules of this form and
X mapping them to the appropriate %-rule. So for example if
X an old makefile contains the construct:
X
X .c.o :; cc -c $< -o $@
X
X dmake maps this into the following %-rule:
X
X %.o : %.c; cc -c $< -o $@
X
X Furthermore, dmake understands several SYSV AUGMAKE special
X targets and maps them into corresponding %-meta rules.
X These transformation must be enabled by providing the -A
X flag on the command line or by setting the value of AUGMAKE
X to non-NULL. The construct
X
X .suff :; recipe
X
X gets mapped into:
X
X % : %.suff; recipe
X
X and the construct
X
X .c~.o :; recipe
X
X gets mapped into:
X
X %.o : s.%.c ; recipe
X
X In general, a special target of the form .<str>~ is replaced
X by the %-rule construct s.%.<str>, thereby providing support
X for the syntax used by SYSV AUGMAKE for providing SCCS sup-
X port. When enabled, these mappings allow processing of
X existing SYSV makefiles without modifications.
X
X dmake bases all of its inferences on the inference graph
X constructed from the %-rules defined in the makefile. It
X
X
X
XVersion 3.9 PL0 UW 43
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X knows exactly which targets can be made from which prere-
X quisites by making queries on the inference graph. For this
X reason .SUFFIXES is not needed and is completely ignored.
X
X For a %-meta rule to be inferred as the rule whose recipe
X will be used to make a target, the target's name must match
X the %-target pattern, and any inferred %-prerequisite must
X already exist or have an explicit recipe so that the prere-
X quisite can be made. Without transitive closure on the
X inference graph the above rule describes precisely when an
X inference match terminates the search. If transitive clo-
X sure is enabled (the usual case), and a prerequisite does
X not exist or cannot be made, then dmake invokes the infer-
X ence algorithm recursively on the prerequisite to see if
X there is some way the prerequisite can be manufactured.
X For, if the prerequisite can be made then the current target
X can also be made using the current %-meta rule. This means
X that there is no longer a need to give a rule for making a
X .o from a .y if you have already given a rule for making a
X .o from a .c and a .c from a .y. In such cases dmake can
X infer how to make the .o from the .y via the intermediary .c
X and will remove the .c when the .o is made. Transitive clo-
X sure can be disabled by giving the -T switch on the command
X line.
X
X A word of caution. dmake bases its transitive closure on
X the %-meta rule targets. When it performs transitive clo-
X sure it infers how to make a target from a prerequisite by
X performing a pattern match as if the potential prerequisite
X were a new target. The set of rules:
X
X %.o : %.c :; rule for making .o from .c
X %.c : %.y :; rule for making .c from .y
X % : RCS/%,v :; check out of RCS file
X
X will, by performing transitive closure, allow dmake to infer
X how to make a .o from a .y using a .c as an intermediate
X temporary file. Additionally it will be able to infer how
X to make a .y from an RCS file, as long as that RCS file is
X in the RCS directory and has a name which ends in .y,v. The
X transitivity computation is performed dynamically for each
X target that does not have a recipe. This has potential to
X be costly if the %-meta rules are not carefully specified.
X The .NOINFER attribute is used to mark a %-meta node as
X being a final target during inference. Any node with this
X attribute set will not be used for subsequent inferences.
X As an example the node RCS/%,v is marked as a final node
X since we know that if the RCS file does not exist there
X likely is no other way to make it. Thus the standard
X startup makefile contains an entry similar to:
X .NOINFER : RCS/%,v
X Thereby indicating that the RCS file is the end of the
X
X
X
XVersion 3.9 PL0 UW 44
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X inference chain. Whenever the inference algorithm deter-
X mines that a target can be made from more than one prere-
X quisite and the inference chains for the two methods are the
X same length the algorithm reports an ambiguity and prints
X the ambiguous inference chains.
X
X dmake tries to remove intermediate files resulting from
X transitive closure if the file is not marked as being PRE-
X CIOUS, or the -u flag was not given on the command line, and
X if the inferred intermediate did not previously exist.
X Intermediate targets that existed prior to being made are
X never removed. This is in keeping with the philosophy that
X dmake should never remove things from the file system that
X it did not add. If the special target .REMOVE is defined
X and has a recipe then dmake constructs a list of the inter-
X mediate files to be removed and makes them prerequisites of
X .REMOVE. It then makes .REMOVE thereby removing the prere-
X quisites if the recipe of .REMOVE says to. Typically
X .REMOVE is defined in the startup file as:
X
X .REMOVE :; $(RM) $<
X
XMAKING TARGETS
X In order to update a target dmake must execute a recipe.
X When a recipe needs to be executed it is first expanded so
X that any macros in the recipe text are expanded, and it is
X then either executed directly or passed to a shell. dmake
X supports two types of recipes. The regular recipes and
X group recipes.
X
X When a regular recipe is invoked dmake executes each line of
X the recipe separately using a new copy of a shell if a shell
X is required. Thus effects of commands do not generally per-
X sist across recipe lines (e.g. cd requests in a recipe line
X do not carry over to the next recipe line). This is true
X even in environments such as MSDOS, where dmake internally
X sets the current working director to match the directory it
X was in before the command was executed.
X
X The decision on whether a shell is required to execute a
X command is based on the value of the macro SHELLMETAS or on
X the specification of '+' or .USESHELL for the current recipe
X or target respectively. If any character in the value of
X SHELLMETAS is found in the expanded recipe text-line or the
X use of a shell is requested explicitly via '+' or .USESHELL
X then the command is executed using a shell, otherwise the
X command is executed directly. The shell that is used for
X execution is given by the value of the macro SHELL. The
X flags that are passed to the shell are given by the value of
X SHELLFLAGS. Thus dmake constructs the command line:
X
X $(SHELL) $(SHELLFLAGS) $(expanded_recipe_command)
X
X
X
XVersion 3.9 PL0 UW 45
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X Normally dmake writes the command line that it is about to
X invoke to standard output. If the .SILENT attribute is set
X for the target or for the recipe line (via @), then the
X recipe line is not echoed.
X
X Group recipe processing is similar to that of regular
X recipes, except that a shell is always invoked. The shell
X that is invoked is given by the value of the macro GROUP-
X SHELL, and its flags are taken from the value of the macro
X GROUPFLAGS. If a target has the .PROLOG attribute set then
X dmake prepends to the shell script the recipe associated
X with the special target .GROUPPROLOG, and if the attribute
X .EPILOG is set as well, then the recipe associated with the
X special target .GROUPEPILOG is appended to the script file.
X This facility can be used to always prepend a common header
X and common trailer to group recipes. Group recipes are
X echoed to standard output just like standard recipes, but
X are enclosed by lines beginning with [ and ].
X
X The recipe flags [+,-,%,@] are recognized at the start of a
X recipe line even if they appear in a macro. For example:
X
X SH = +
X all:
X $(SH)echo hi
X
X is completely equivalent to writing
X
X SH = +
X all:
X +echo hi
X
X
X The last step performed by dmake prior to running a recipe
X is to set the macro CMNDNAME to the name of the command to
X execute (determined by finding the first white-space ending
X token in the command line). It then sets the macro CMNDARGS
X to be the remainder of the line. dmake then expands the
X macro COMMAND which by default is set to
X
X COMMAND = $(CMNDNAME) $(CMNDARGS)
X
X The result of this final expansion is the command that will
X be executed. The reason for this expansion is to allow for
X a different interface to the argument passing facilities
X (esp. under DOS) than that provided by dmake. You can for
X example define COMMAND to be
X
X COMMAND = $(CMNDNAME) @$(mktmp $(CMNDARGS))
X
X which dumps the arguments into a temporary file and runs the
X command
X
X
X
XVersion 3.9 PL0 UW 46
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X $(CMNDNAME) @/tmp/ASAD23043
X
X which has a much shorter argument list. It is now up to the
X command to use the supplied argument as the source for all
X other arguments. As an optimization, if COMMAND is not
X defined dmake does not perform the above expansion. On sys-
X tems, such as UNIX, that handle long command lines this pro-
X vides a slight saving in processing the makefiles.
X
XMAKING LIBRARIES
X Libraries are easy to maintain using dmake. A library is a
X file containing a collection of object files. Thus to make
X a library you simply specify it as a target with the
X .LIBRARY attribute set and specify its list of prere-
X quisites. The prerequisites should be the object members
X that are to go into the library. When dmake makes the
X library target it uses the .LIBRARY attribute to pass to the
X prerequisites the .LIBMEMBER attribute and the name of the
X library. This enables the file binding mechanism to look
X for the member in the library if an appropriate object file
X cannot be found. A small example best illustrates this.
X
X mylib.a .LIBRARY : mem1.o mem2.o mem3.o
X rules for making library...
X # remember to remove .o's when lib is made
X
X # equivalent to: '%.o : %.c ; ...'
X .c.o :; rules for making .o from .c say
X
X dmake will use the .c.o rule for making the library members
X if appropriate .c files can be found using the search rules.
X NOTE: this is not specific in any way to C programs, they
X are simply used as an example.
X
X dmake tries to handle the old library construct format in a
X sensible way. The construct lib(member.o) is separated and
X the lib portion is declared as a library target. The new
X target is defined with the .LIBRARY attribute set and the
X member.o portion of the construct is declared as a prere-
X quisite of the lib target. If the construct lib(member.o)
X appears as a prerequisite of a target in the makefile, that
X target has the new name of the lib assigned as its prere-
X quisite. Thus the following example:
X
X a.out : ml.a(a.o) ml.a(b.o); $(CC) -o $@ $<
X
X .c.o :; $(CC) -c $(CFLAGS) -o $@ $<
X %.a:
X ar rv $@ $?
X ranlib $@
X rm -rf $?
X
X
X
X
XVersion 3.9 PL0 UW 47
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X constructs the following dependency graph.
X
X a.out : ml.a; $(CC) -o $@ $<
X ml.a .LIBRARY : a.o b.o
X
X %.o : %.c ; $(CC) -c $(CFLAGS) -o $@ $<
X %.a :
X ar rv $@ $?
X ranlib $@
X rm -rf $?
X
X and making a.out then works as expected.
X
X The same thing happens for any target of the form
X lib((entry)). These targets have an additional feature in
X that the entry target has the .SYMBOL attribute set automat-
X ically.
X
X NOTE: If the notion of entry points is supported by the
X archive and by dmake (currently not the case) then dmake
X will search the archive for the entry point and return not
X only the modification time of the member which defines the
X entry but also the name of the member file. This name will
X then replace entry and will be used for making the member
X file. Once bound to an archive member the .SYMBOL attribute
X is removed from the target. This feature is presently dis-
X abled as there is little standardization among archive for-
X mats, and we have yet to find a makefile utilizing this
X feature (possibly due to the fact that it is unimplemented
X in most versions of UNIX Make).
X
X Finally, when dmake looks for a library member it must first
X locate the library file. It does so by first looking for
X the library relative to the current directory and if it is
X not found it then looks relative to the current value of
X $(TMD). This allows commonly used libraries to be kept near
X the root of a source tree and to be easily found by dmake.
X
XKEEP STATE
X dmake supports the keeping of state information for targets
X that it makes whenever the macro .KEEP_STATE is assigned a
X value. The value of the macro should be the name of a state
X file that will contain the state information. If state
X keeping is enabled then each target that does not poses the
X .NOSTATE attribute will have a record written into the state
X file indicating the target's name, the current directory,
X the command used to update the target, and which, if any, ::
X rule is being used. When you make this target again if any
X of this information does not match the previous settings and
X the target is not out dated it will still be re-made. The
X assumption is that one of the conditions above has changed
X and that we wish to remake the target. For example, state
X
X
X
XVersion 3.9 PL0 UW 48
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X keeping is used in the maintenance of dmake to test compile
X different versions of the source using different compilers.
X Changing the compiler causes the compilation flags to be
X modified and hence all sources to be recompiled.
X
X The state file is an ascii file and is portable, however it
X is not in human readable form as the entries represent hash
X keys of the above information.
X
X The Sun Microsystem's Make construct
X
X .KEEP_STATE :
X
X is recognized and is mapped to .KEEP_STATE:=_state.mk. The
X dmake version of state keeping does not include scanning C
X source files for dependencies like Sun Make. This is
X specific to C programs and it was felt that it does not
X belong in make. dmake instead provides the tool, cdepend,
X to scan C source files and to produce depedency information.
X Users are free to modify cdepend to produce other dependency
X files. (NOTE: cdepend does not come with the distribution
X at this time, but will be available in a patch in the near
X future)
X
XMULTI PROCESSING
X If the architecture supports it then dmake is capable of
X making a target's prerequisites in parallel. dmake will
X make as much in parallel as it can and use a number of child
X processes up to the maximum specified by MAXPROCESS or by
X the value supplied to the -P command line flag. A parallel
X make is enabled by setting the value of MAXPROCESS (either
X directly or via -P option) to a value which is > 1. dmake
X guarantees that all dependencies as specified in the
X makefile are honored. A target will not be made until all
X of its prerequisites have been made. Note that when you
X specify -P 4 then four child processes are run concurrently
X but dmake actually displays the fifth command it will run
X immediately upon a child process becomming free. This is an
X artifact of the method used to traverse the dependency graph
X and cannot be removed. If a parallel make is being per-
X formed then the following restrictions on parallelism are
X enforced.
X
X 1. Individual recipe lines in a non-group recipe are
X performed sequentially in the order in which they
X are specified within the makefile and in parallel
X with the recipes of other targets.
X
X 2. If a target contains multiple recipe definitions
X (cf. :: rules) then these are performed sequen-
X tially in the order in which the :: rules are
X specified within the makefile and in parallel with
X
X
X
XVersion 3.9 PL0 UW 49
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X the recipes of other targets.
X
X 3. If a target rule contains the `!' modifier, then
X the recipe is performed sequentially for the list
X of outdated prerequisites and in parallel with the
X recipes of other targets.
X
X 4. If a target has the .SEQUENTIAL attribute set then
X all of its prerequisites are made sequentially
X relative to one another (as if MAXPROCESS=1), but
X in parallel with other targets in the makefile.
X
X Note: If you specify a parallel make then the order of tar-
X get update and the order in which the associated recipes are
X invoked will not correspond to that displayed by the -n
X flag.
X
XCONDITIONALS
X dmake supports a makefile construct called a conditional.
X It allows the user to conditionally select portions of
X makefile text for input processing and to discard other por-
X tions. This becomes useful for writing makefiles that are
X intended to function for more than one target host and
X environment. The conditional expression is specified as
X follows:
X
X .IF expression
X ... if text ...
X .ELIF expression
X ... if text ...
X .ELSE
X ... else text ...
X .END
X
X The .ELSE and .ELIF portions are optional, and the condi-
X tionals may be nested (ie. the text may contain another
X conditional). .IF, .ELSE, and .END may appear anywhere in
X the makefile, but a single conditional expression may not
X span multiple makefiles.
X
X expression can be one of the following three forms:
X
X <text> | <text> == <text> | <text> != <text>
X
X where text is either text or a macro expression. In any
X case, before the comparison is made, the expression is
X expanded. The text portions are then selected and compared.
X White space at the start and end of the text portion is dis-
X carded before the comparison. This means that a macro that
X evaluates to nothing but white space is considered a NULL
X value for the purpose of the comparison. In the first case
X the expression evaluates TRUE if the text is not NULL
X
X
X
XVersion 3.9 PL0 UW 50
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X otherwise it evaluates FALSE. The remaining two cases both
X evaluate the expression on the basis of a string comparison.
X If a macro expression needs to be equated to a NULL string
X then compare it to the value of the macro $(NULL). You can
X use the $(shell ...) macro to construct more complex test
X expressions.
X
XEXAMPLES
X # A simple example showing how to use make
X #
X prgm : a.o b.o
X cc a.o b.o -o prgm
X a.o : a.c g.h
X cc a.c -o $@
X b.o : b.c g.h
X cc b.c -o $@
X
X In the previous example prgm is remade only if a.o and/or
X b.o is out of date with respect to prgm. These dependencies
X can be stated more concisely by using the inference rules
X defined in the standard startup file. The default rule for
X making .o's from .c's looks something like this:
X
X %.o : %.c; cc -c $(CFLAGS) -o $@ $<
X
X Since there exists a rule (defined in the startup file) for
X making .o's from .c's dmake will use that rule for manufac-
X turing a .o from a .c and we can specify our dependencies
X more concisely.
X
X prgm : a.o b.o
X cc -o prgm $<
X a.o b.o : g.h
X
X A more general way to say the above using the new macro
X expansions would be:
X
X SRC = a b
X OBJ = {$(SRC)}.o
X
X prgm : $(OBJ)
X cc -o $@ $<
X
X $(OBJ) : g.h
X
X If we want to keep the objects in a separate directory,
X called objdir, then we would write something like this.
X
X SRC = a b
X OBJ = {$(SRC)}.o
X
X prgm : $(OBJ)
X
X
X
XVersion 3.9 PL0 UW 51
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X cc $< -o $@
X
X $(OBJ) : g.h
X %.o : %.c
X $(CC) -c $(CFLAGS) -o $(@:f) $<
X mv $(@:f) objdir
X
X .SOURCE.o : objdir # tell make to look here for .o's
X
X An example of building library members would go something
X like this: (NOTE: The same rules as above will be used to
X produce .o's from .c's)
X
X SRC = a b
X LIB = lib
X LIBm = { $(SRC) }.o
X
X prgm: $(LIB)
X cc -o $@ $(LIB)
X
X $(LIB) .LIBRARY : $(LIBm)
X ar rv $@ $<
X rm $<
X
X Finally, suppose that each of the source files in the previ-
X ous example had the `:' character in their target name.
X Then we would write the above example as:
X
X SRC = f:a f:b
X LIB = lib
X LIBm = "{ $(SRC) }.o" # put quotes around each token
X
X prgm: $(LIB)
X cc -o $@ $(LIB)
X
X $(LIB) .LIBRARY : $(LIBm)
X ar rv $@ $<
X rm $<
X
XCOMPATIBILITY
X There are two notable differences between dmake and the
X standard version of BSD UNIX 4.2/4.3 Make.
X
X 1. BSD UNIX 4.2/4.3 Make supports wild card filename
X expansion for prerequisite names. Thus if a direc-
X tory contains a.h, b.h and c.h, then a line like
X
X target: *.h
X
X will cause UNIX make to expand the *.h into "a.h b.h
X c.h". dmake does not support this type of filename
X expansion.
X
X
X
XVersion 3.9 PL0 UW 52
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X 2. Unlike UNIX make, touching a library member causes
X dmake to search the library for the member name and
X to update the library time stamp. This is only
X implemented in the UNIX version. MSDOS and other
X versions may not have librarians that keep file time
X stamps, as a result dmake touches the library file
X itself, and prints a warning.
X
X dmake is not compatible with GNU Make. In particular it
X does not understand GNU Make's macro expansions that query
X the file system.
X
X dmake is fully compatible with SYSV AUGMAKE, and supports
X the following AUGMAKE features:
X
X 1. The word include appearing at the start of a line
X can be used instead of the ".INCLUDE :" construct
X understood by dmake.
X
X 2. The macro modifier expression $(macro:str=sub) is
X understood and is equivalent to the expression
X $(macro:s/str/sub), with the restriction that str
X must match the following regular expression:
X
X str[ |\t][ |\t]*
X
X (ie. str only matches at the end of a token where
X str is a suffix and is terminated by a space, a tab,
X or end of line) Normally sub is expanded before the
X substitution is made, if you specify -A on the com-
X mand line then sub is not expanded.
X
X 3. The macro % is defined to be $@ (ie. $% expands to
X the same value as $@).
X
X 4. The AUGMAKE notion of libraries is handled
X correctly.
X
X 5. When defining special targets for the inference
X rules and the AUGMAKE special target handling is
X enabled then the special target .X is equivalent to
X the %-rule "% : %.X".
X
X 6. Directories are always made if you specify -A. This
X is consistent with other UNIX versions of Make.
X
X 7. Makefiles that utilize virtual targets to force mak-
X ing of other targets work as expected if AUGMAKE
X special target handling is enabled. For example:
X
X FRC:
X myprog.o : myprog.c $(FRC) ; ...
X
X
X
XVersion 3.9 PL0 UW 53
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
X Works as expected if you issue the command
X
X 'dmake -A FRC=FRC'
X
X but fails with a 'don't know how to make FRC' error
X message if you do not specify AUGMAKE special target
X handling via the -A flag (or by setting AUGMAKE:=yes
X internally).
X
XLIMITS
X In some environments the length of an argument string is
X restricted. (e.g. MSDOS command line arguments cannot be
X longer than 128 bytes if you are using the standard
X command.com command interpreter as your shell, dmake text
X diversions may help in these situations.)
X
XPORTABILITY
X To write makefiles that can be moved from one environment to
X another requires some forethought. In particular you must
X define as macros all those things that may be different in
X the new environment. dmake has two facilities that help to
X support writing portable makefiles, recursive macros and
X conditional expressions. The recursive macros, allow one to
X define environment configurations that allow different
X environments for similar types of operating systems. For
X example the same make script can be used for SYSV and BSD
X but with different macro definitions.
X
X To write a makefile that is portable between UNIX and MSDOS
X requires both features since in almost all cases you will
X need to define new recipes for making targets. The recipes
X will probably be quite different since the capabilities of
X the tools on each machine are different. Different macros
X will be needed to help handle the smaller differences in the
X two environments.
X
XFILES
X Makefile, makefile, startup.mk (use dmake -V to tell you
X where the startup file is)
X
XSEE ALSO
X sh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
X S.I. Feldman Make - A Program for Maintaining Computer Pro-
X grams
X
XAUTHOR
X Dennis Vadura, CS Dept. University of Waterloo.
X dva...@watdragon.uwaterloo.ca
X Many thanks to Carl Seger for his helpful suggestions, and
X to Trevor John Thompson for his many excellent ideas and
X informative bug reports.
X
X
X
X
XVersion 3.9 PL0 UW 54
X
X
X
X
XDMAKE(p) Unsupported Free Software DMAKE(p)
X
X
X
XBUGS
X Some system commands return non-zero status inappropriately.
X Use -i (`-' within the makefile) to overcome the difficulty.
X
X Some systems do not have easily accessible time stamps for
X library members (MSDOS, AMIGA, etc) for these dmake uses the
X time stamp of the library instead and prints a warning the
X first time it does so. This is almost always ok, except
X when multiple makefiles update a single library file. In
X these instances it is possible to miss an update if one is
X not careful.
X
X This man page is way too long.
X
XWARNINGS
X Rules supported by make(1) may not work if transitive clo-
X sure is turned off (-T, .NOINFER).
X
X PWD from csh/ksh will cause problems if a cd operation is
X performed and -e or -E option is used.
X
X Using internal macros such as COMMAND, may wreak havoc if
X you don't understand their functionality.
X
X
XVersion 3.9 PL0 UW 55
END_OF_FILE
if test 64741 -ne `wc -c <'dmake/man/dmake.nc.B'`; then
echo shar: \"'dmake/man/dmake.nc.B'\" unpacked with wrong size!
elif test -f 'dmake/man/dmake.nc.A'; then
echo shar: Combining \"'dmake/man/dmake.nc'\" \(131520 characters\)
cat 'dmake/man/dmake.nc.A' 'dmake/man/dmake.nc.B' > 'dmake/man/dmake.nc'
if test 131520 -ne `wc -c <'dmake/man/dmake.nc'`; then
echo shar: \"'dmake/man/dmake.nc'\" combined with wrong size!
else
rm dmake/man/dmake.nc.A dmake/man/dmake.nc.B
fi
fi
# end of 'dmake/man/dmake.nc.B'
fi
echo shar: End of archive 3 \(of 27\).
cp /dev/null ark3isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/man/dmake.tf.B dmake/tos/arlib.c
# dmake/unix/sysvr3/stdlib.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:32 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 4 (of 27)."'
if test -f 'dmake/man/dmake.tf.B' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/man/dmake.tf.B'\"
else
echo shar: Extracting \"'dmake/man/dmake.tf.B'\" \(51859 characters\)
sed "s/^X//" >'dmake/man/dmake.tf.B' <<'END_OF_FILE'
Xnon\-group recipe with a line that contains only white\-space.
XThis mode does not effect the parsing of group recipes bracketed by [].
X.IP \fBAUGMAKE\fP 1.6i
XIf set to a non NULL value will enable the transformation of special
Xmeta targets to support special AUGMAKE inferences (See the COMPATIBILITY
Xsection).
X.IP \fBDIRBRKSTR\fP 1.6i
XContains the string of chars used to terminate
Xthe name of a directory in a pathname.
XUnder UNIX its value is "/", under MSDOS its value is "/\e:".
X.IP \fBDIRSEPSTR\fP 1.6i
XContains the string that is used to separate directory components when
Xpath names are constructed. It is defined with a default value at startup.
X.IP \fBDIVFILE\fP 1.6i
XIs defined in the startup file and gives the name that should be returned for
Xthe diversion file name when used in
X$(mktmp ...) expansions, see the TEXT DIVERSION section for details.
X.IP \fBDYNAMICNESTINGLEVEL\fP 1.6i
XSpecifies the maximum number of recursive dynamic macro expansions. Its
Xinitial value is 100.
X.IP \fB.KEEP_STATE\fP 1.6i
XAssigning this macro a value tells
X.B dmake
Xthe name of the state file to use and turns on the keeping of state
Xinformation for any targets that are brought up to date by the make.
X.IP \fBGROUPFLAGS\fP 1.6i
XThis macro gives the set of flags to pass to the shell when
Xinvoking it to execute a group recipe. The value of the macro is the
Xlist of flags with a leading switch indicator. (ie. `\-' under UNIX)
X.IP \fBGROUPSHELL\fP 1.6i
XThis macro defines the full
Xpath to the executable image to be used as the shell when
Xprocessing group recipes. This macro must be defined if group recipes are
Xused. It is assigned a default value in the startup makefile. Under UNIX
Xthis value is /bin/sh.
X.IP \fBGROUPSUFFIX\fP 1.6i
XIf defined, this macro gives the string to use as a suffix
Xwhen creating group recipe files to be handed to the command interpreter.
XFor example, if it is defined as .sh, then all
Xtemporary files created by \fBdmake\fP will end in the suffix .sh.
XUnder MSDOS if you are using command.com as your GROUPSHELL, then this suffix
Xmust be set to .bat in order for group recipes to function correctly.
XThe setting of GROUPSUFFIX and GROUPSHELL is done automatically for
Xcommand.com in the startup.mk files.
X.IP \fBMAKE\fP 1.6i
XIs defined in the startup file by default.
XThe string $(MAKE) is recognized when
Xusing the \-n option for single line recipes. Initially this macro is defined
Xto have the value "$(MAKECMD) $(MFLAGS)".
X.IP \fBMAKESTARTUP\fP 1.6i
XThis macro defines the full path to the initial startup
Xmakefile. Use the \fB\-V\fP command line option to discover its initial
Xvalue.
X.IP \fBMAXLINELENGTH\fP 1.6i
XThis macro defines the maximum size of a single line of
Xmakefile input text. The size is specified as a number, the default value
Xis defined internally and is shown via the \fB\-V\fP option.
XA buffer of this size plus 2 is allocated for reading makefile text. The
Xbuffer is freed before any targets are made, thereby allowing files containing
Xlong input lines to be processed without consuming memory during the actual
Xmake.
XThis macro can only be used to extend the line length beyond it's default
Xminimum value.
X.IP \fBMAXPROCESS\fP 1.6i
XSpecify the maximum number of child processes to use when making targets.
XThe default value of this macro is "1" and its value cannot exceed the value
Xof the macro MAXPROCESSLIMIT. Setting the value of MAXPROCESS on the command
Xline or in the makefile is equivalent to supplying a corresponding value to
Xthe -P flag on the command line.
X.IP \fBPREP\fP 1.6i
XThis macro defines the number of iterations to be expanded
Xautomatically when processing % rule definitions of the form:
X.sp
X% : %.suff
X.sp
XSee the sections on PERCENT(%) RULES for details on how PREP is used.
X.IP \fBSHELL\fP 1.6i
XThis macro defines the full path to the executable
Ximage to be used as the shell when
Xprocessing single line recipes. This macro must be defined if recipes
Xrequiring the shell for execution are to be used.
XIt is assigned a default value in the startup makefile.
XUnder UNIX this value is /bin/sh.
X.IP \fBSHELLFLAGS\fP 1.6i
XThis macro gives the set of flags to pass to the shell when
Xinvoking it to execute a single line recipe. The value of the macro is the
Xlist of flags with a leading switch indicator. (ie. `\-' under UNIX)
X.IP \fBSHELLMETAS\fP 1.6i
XEach time
X.B dmake
Xexecutes a single recipe line (not a group recipe) the line is
Xsearched for any occurrence of a character defined in the value of SHELLMETAS.
XIf such a character is found the recipe line is defined to require a shell
Xto ensure its correct execution. In such instances
Xa shell is used to invoke the recipe line.
XIf no match is found the recipe line is executed without the use of a shell.
X.sp
X.PP
XThere is only one character valued macro defined by \fBdmake\fP:
X\fBSWITCHAR\fP contains the switch character used
Xto introduce options on command lines. For UNIX its value is `\-', and for
XMSDOS its value may be `/' or `\-'.
XThe macro is internally defined and is not user setable.
XThe MSDOS version of \fBdmake\fP attempts to first extract SWITCHAR from an
Xenvironment variable of the same name. If that fails it then attempts to
Xuse the undocumented getswitchar system call, and returns the result of
Xthat. Under MSDOS version 4.0 you must set the value of the environment
Xmacro SWITCHAR to '/' to obtain predictable behavior.
X.PP
XAll boolean macros currently understood by
X.B dmake
Xcorrespond directly to the previously defined attributes.
XThese macros provide
Xa second way to apply global attributes, and represent the
Xpreferred method of doing so. They are used by assigning them a
Xvalue. If the value is not a NULL string then the boolean condition
Xis set to on.
XIf the value is a NULL string then the condition is set to off.
XThere are five conditions defined and they correspond directly to the
Xattributes of the same name. Their meanings are defined in the ATTRIBUTES
Xsection above.
XThe macros are:
X\&\fB.EPILOG\fP,
X\&\fB.IGNORE\fP,
X\&\fB.MKSARGS\fP,
X\&\fB.NOINFER\fP,
X\&\fB.PRECIOUS\fP,
X\&\fB.PROLOG\fP,
X\&\fB.SEQUENTIAL\fP,
X\&\fB.SILENT\fP,
X\&\fB.SWAP\fP, and
X\&\fB.USESHELL\fP.
XAssigning any of these a non NULL value will globally set
Xthe corresponding attribute to on.
X.SH "RUN_TIME MACROS"
XThese macros are defined
Xwhen \fBdmake\fP is making targets, and may take on different values for each
Xtarget. \fB$@\fP is defined to be the full target name, \fB$?\fP is the
Xlist of all out of date prerequisites, \fB$&\fP is the list of all
Xprerequisites, \fB$>\fP is the name of the library if the current target is a
Xlibrary member, and
X\fB$<\fP is the list of prerequisites specified in the current rule.
XIf the current target had a recipe inferred then \fB$<\fP is the name of the
Xinferred prerequisite even if the target had a list of prerequisites supplied
Xusing an explicit rule that did not provide a recipe. In such situations
X\fB$&\fP gives the full list of prerequisites.
X.PP
X\fB$*\fP is defined as
X\fB$(@:db)\fP when making targets with explicit recipes and is defined as the
Xvalue of % when making targets whose recipe is the result of an inference.
XIn the first case \fB$*\fP is the target name with no suffix,
Xand in the second case, is the value of the matched % pattern from
Xthe associated %-rule.
X\fB$^\fP expands to the set of out of date prerequisites taken from the
Xcurrent value of \fB$<\fP.
XIn addition to these,
X\fB$$\fP expands to $, \fB{{\fP expands to {, \fB}}\fP expands to }, and the
Xstrings \fB<+\fP and \fB+>\fP are recognized
Xas respectively starting and terminating a text diversion when they appear
Xliterally together in the same input line.
X.PP
XThe difference between $? and $^ can best be illustrated by an example,
Xconsider:
X.RS
X.sp
X.nf
Xfred.out : joe amy hello
X\trules for making fred
X
Xfred.out : my.c your.h his.h her.h # more prerequisites
X.fi
X.sp
X.RE
XAssume joe, amy, and my.c are newer then fred.out. When
X.B dmake
Xexecutes the recipe for making fred.out the values of the following macros
Xwill be:
X.RS
X.sp
X.nf
X.Is "$@ "
X.Ii "$@"
X--> fred.out
X.Ii "$*"
X--> fred
X.Ii "$?"
X--> joe amy my.c # note the difference between $? and $^
X.Ii "$^"
X--> joe amy
X.Ii "$<"
X--> joe amy hello
X.Ii "$&"
X--> joe amy hello my.c your.h his.h her.h
X.fi
X.sp
X.RE
X.SH "FUNCTION MACROS"
X.B dmake
Xsupports a full set of functional macros. One of these, the $(mktmp ...)
Xmacro, is discussed in detail in the TEXT DIVERSION section and is not
Xcovered here.
X.RS
X.sp
X.IP "$(\fBassign\fP \fBexpression\fP)"
XCauses \fIexpression\fP to be parsed as a macro assignment expression and results
Xin the specified assignment being made. An error is issued if the assignment
Xis not syntatically correct. \fIexpression\fP may contain white space. This is
Xin effect a dynamic macro assignment facility and may appear anywhere any
Xother macro may appear. The result of the expanding a dynamic macro
Xassignment expression is the name of the macro that was assigned and $(NULL)
Xif the \fIexpression\fP is not a valid macro assignment expression.
XSome examples are:
X.sp
X.nf
X$(assign foo := fred)
X$(assign $(indirect_macro_name) +:= $(morejunk))
X.fi
X.IP "$(\fBnull\fP,\fItext\fP \fBtrue\fP \fBfalse\fP)"
Xexpands the value of
X.I text.
XIf it is NULL then the macro returns the value of the expansion of \fBtrue\fP
Xand the expansion of \fBfalse\fP otherwise. The terms \fBtrue\fP, and
X\fBfalse\fP must be strings containing no white\-space.
X.IP "$(\fB!null\fP,\fItext\fP \fBtrue\fP \fBfalse\fP)"
XBehaves identically to the previous macro except that the
X.B true
Xstring is chosen if the expansion of
X.I text
Xis not NULL.
X.IP "$(\fBeq\fP,\fItext_a\fP,\fItext_b\fP \fBtrue\fP \fBfalse\fP)"
Xexpands
X.I text_a
Xand
X.I text_b
Xand compares their results. If equal it returns the result of the expansion
Xof the
X.B true
Xterm, otherwise it returns the expansion of the
X.B false
Xterm.
X.IP "$(\fB!eq\fP,\fItext_a\fP,\fItext_b\fP \fBtrue\fP \fBfalse\fP)"
XBehaves identically to the previous macro except that the
X.B true
Xstring is chosen if the expansions of the two strings are not equal
X.IP "$(\fBnil\fP \fBexpression\fP)"
XAlways returns the value of $(NULL) regardless of what \fIexpression\fP is.
XThis function macro can be used to discard results of expanding
Xmacro expressions.
X.IP "$(\fBshell\fP \fBcommand\fP)"
XRuns \fIcommand\fP as if it were part of a recipe and returns,
Xseparated by a single space, all the non-white
Xspace terms written to stdout by the command.
XFor example:
X.RS
X.RS
X.sp
X$(shell ls *.c)
X.sp
X.RE
Xwill return \fI"a.c b.c c.c d.c"\fP if the files exist in the current
Xdirectory. The recipe modification flags \fB[+@%\-]\fP are honored if they
Xappear as the first characters in the command. For example:
X.RS
X.sp
X$(shell +ls *.c)
X.sp
X.RE
Xwill run the command using the current shell.
X.RE
X.IP "$(\fBshell,expand\fP \fBcommand\fP)"
XIs an extension to the \fB$(shell...\fP function macro that expands the result
Xof running \fBcommand\fP.
X.IP "$(\fBsort\fP \fBlist\fP)"
XWill take all white\-space separated tokens in \fIlist\fP and will
Xreturn their sorted equivalent list.
X.IP "$(\fBstrip\fP \fBdata\fP)"
XWill replace all strings of white\-space in data by a single space.
X.IP "$(\fBsubst\fP,\fIpat\fP,\fIreplacement\fP \fBdata\fP)"
XWill search for \fIpat\fP in
X.B data
Xand will replace any occurrence of
X.I pat
Xwith the
X.I replacement
Xstring. The expansion
X.RS
X.sp
X$(subst,.o,.c $(OBJECTS))
X.sp
X.RE
Xis equivalent to:
X.RS
X.sp
X$(OBJECTS:s/.o/.c/)
X.sp
X.RE
X.RE
X.SH "CONDITIONAL MACROS"
X.B dmake
Xsupports conditional macros. These allow the definition of target specific
Xmacro values. You can now say the following:
X.RS
X.sp
X\fBtarget\fP ?= \fIMacroName MacroOp Value\fP
X.sp
X.RE
XThis creates a definition for \fIMacroName\fP whose value is \fIValue\fP
Xonly when \fBtarget\fP is being made. You may use a conditional macro
Xassignment anywhere that a regular macro assignment may appear, including
Xas the value of a $(assign ...) macro.
X.LP
XThe new definition is associated with the most recent cell definition
Xfor \fBtarget\fP. If no prior definition exists then one is created. The
Ximplications of this are immediately evident in the following example:
X.sp
X.RS
X.nf
Xfoo := hello
X.sp
Xall : cond;@echo "all done, foo=[$(foo)] bar=[$(bar)]"
X.sp
Xcond ?= bar := global decl
X.sp
Xcond .SETDIR=unix::;@echo $(foo) $(bar)
Xcond ?= foo := hi
X.sp
Xcond .SETDIR=msdos::;@echo $(foo) $(bar)
X cond ?= foo := hihi
X.fi
X.RE
X.sp
XThe first conditional assignment creates a binding for 'bar' that is
Xactivated when 'cond' is made. The bindings following the :: definitions are
Xactivated when their respective recipe rules are used. Thus the
Xfirst binding serves to provide a global value for 'bar' while any of the
Xcond :: rules are processed, and the local bindings for 'foo' come into
Xeffect when their associated :: rule is processed.
X.LP
XConditionals for targets of .UPDATEALL are all activated before the
Xtarget group is made. Assignments are processed in order. Note that
Xthe value of a conditional macro assignment is NOT AVAILABLE until the
Xassociated target is made, thus the construct
X.sp
X.RS
X.nf
Xmytarget ?= bar := hello
Xmytarget ?= foo := $(bar)
X.fi
X.RE
X.sp
Xresults in $(foo) expanding to "", if you want the result to be "hello"
Xyou must use:
X.sp
X.RS
X.nf
Xmytarget ?= bar := hello
Xmytarget ?= foo = $(bar)
X.fi
X.RE
X.sp
XOnce a target is made any associated conditional macros are deactivated
Xand their values are no longer available. Activation occurrs after all
Xinference, and .SETDIR directives have been processed and after $@ is
Xassigned, but before prerequisites are processed; thereby making the values of
Xconditional macro definitions available during construction of prerequisites.
X.LP
XIf a %-meta rule target has associated conditional macro assignments,
Xand the rule is chosen by the inference algorithm then the conditional
Xmacro assignments are inferred together with the associated recipe.
X.SH "DYNAMIC PREREQUISITES"
X.B dmake
Xlooks for prerequisites whose names contain macro expansions during target
Xprocessing. Any such prerequisites are expanded and the result of the
Xexpansion is used as the prerequisite name. As an example the line:
X.sp
X\tfred : $$@.c
X.sp
Xcauses the $$@ to be expanded when \fBdmake\fP is making fred, and it resolves
Xto the target \fIfred\fP.
XThis enables dynamic prerequisites to be generated. The value
Xof @ may be modified by any of the valid macro modifiers. So you can say for
Xexample:
X.sp
X\tfred.out : $$(@:b).c
X.sp
Xwhere the $$(@:b) expands to \fIfred\fP.
XNote the use of $$ instead of $ to indicate the dynamic expansion, this
Xis due to the fact that the rule line is expanded when it is initially parsed,
Xand $$ then returns $ which later triggers the dynamic prerequisite expansion.
XIf you really want a $ to be part of a prerequisite name you must use $$$$.
XDynamic macro expansion is performed in all user defined rules,
Xand the special targets .SOURCE*, and .INCLUDEDIRS.
X.PP
XIf dynamic macro expansion results in multiple white space separated tokens
Xthen these are inserted into the prerequisite list inplace of the dynamic
Xprerequisite. If the new list contains additional dynamic prerequisites they
Xwill be expanded when they are processed. The level of recursion in this
Xexpansion is controlled by the value of the variable \fBDYNAMICNESTINGLEVEL\fP
Xand is set to 100 by default.
X.SH "BINDING TARGETS"
XThis operation takes a target name and binds it to an existing file, if
Xpossible.
X.B dmake
Xmakes a distinction between the internal target name of a target and its
Xassociated external file name.
XThus it is possible for a target's internal name and its external
Xfile name to differ.
XTo perform the binding, the following set of rules is used.
XAssume that we are
Xtrying to bind a target whose name is of the form \fIX.suff\fP,
Xwhere \fI.suff\fP is the suffix and \fIX\fP is the stem portion
X(ie. that part which contains the directory and the basename).
X.B dmake
Xtakes this target name and performs a series of search operations that try to
Xfind a suitably named file in the external file system.
XThe search operation is user controlled
Xvia the settings of the various .SOURCE targets.
X.RS
X.IP 1.
XIf target has the .SYMBOL attribute set then look for it in the library.
XIf found, replace the target name with the library member name and continue
Xwith step 2. If the name is not found then return.
X.IP 2.
XExtract the suffix portion (that following the `.') of the target name.
XIf the suffix is not null, look up the special target .SOURCE.<suff>
X(<suff> is the suffix).
XIf the special target exists then search each directory given in
Xthe .SOURCE.<suff> prerequisite list for the target.
XIf the target's suffix was null (ie. \fI.suff\fP was empty) then
Xperform the above search but use the special target .SOURCE.NULL instead.
XIf at any point a match is found then terminate the search.
XIf a directory in the prerequisite list is the special name `.NULL ' perform
Xa search for the full target name without prepending any directory portion
X(ie. prepend the NULL directory).
X.IP 3.
XThe search in step 2. failed. Repeat the same search but this time
Xuse the special target .SOURCE.
X(a default target of '.SOURCE : .NULL' is defined by \fBdmake\fP at startup,
Xand is user redefinable)
X.IP 4.
XThe search in step 3. failed.
XIf the target has the library member attribute (.LIBMEMBER)
Xset then try to find the target in the library which was passed along
Xwith the .LIBMEMBER attribute (see the MAKING LIBRARIES section).
XThe bound file name assigned to a target which is successfully
Xlocated in a library is the same name that would be assigned had the search
Xfailed (see 5.).
X.IP 5.
XThe search failed. Either the target was not found in any of the search
Xdirectories or no applicable .SOURCE special targets exist.
XIf applicable .SOURCE special targets exist, but the target was not found,
Xthen \fBdmake\fP assigns the first name searched as the bound file name.
XIf no applicable .SOURCE special targets exist,
Xthen the full original target name becomes the bound file name.
X.RE
X.PP
XThere is potential here for a lot of search operations. The trick is to
Xdefine .SOURCE.x special targets with short search lists and leave .SOURCE
Xas short as possible.
XThe search algorithm has the following useful side effect.
XWhen a target having the .LIBMEMBER (library member) attribute is searched for,
Xit is first searched for as an ordinary file.
XWhen a number of library members require updating it is desirable to compile
Xall of them first and to update the library at the end in a single operation.
XIf one of the members does not compile and \fBdmake\fP stops, then
Xthe user may fix the error and make again. \fBdmake\fP will not remake any
Xof the targets whose object files have already been generated as long as
Xnone of their prerequisite files have been modified as a result of the fix.
X.PP
XWhen \fBdmake\fP constructs target pathnames './' substrings are removed and
Xsubstrings of the form 'foo/..' are eliminated. This may result in somewhat
Xunexpected values of the macro expansion \fB$@\fP, but is infact the corect
Xresult.
X.PP
XWhen defining .SOURCE and .SOURCE.x targets the construct
X.sp
X\t.SOURCE :
X.br
X\t.SOURCE : fred gery
X.sp
Xis equivalent to
X.sp
X\t.SOURCE :\- fred gery
X.PP
X\fBdmake\fP correctly handles the UNIX Make variable VPATH. By definition VPATH
Xcontains a list of ':' separated directories to search when looking for a
Xtarget. \fBdmake\fP maps VPATH to the following special rule:
X.sp
X\t.SOURCE :^ $(VPATH:s/:/ /)
X.sp
XWhich takes the value of VPATH and sets .SOURCE to the same set of directories
Xas specified in VPATH.
X.SH "PERCENT(%) RULES AND MAKING INFERENCES"
XWhen \fBdmake\fP makes a target, the target's set of prerequisites (if any)
Xmust exist and the target must have a recipe which \fBdmake\fP
Xcan use to make it.
XIf the makefile does not specify an explicit recipe for the target then
X.B dmake
Xuses special rules to try to infer a recipe which it can use
Xto make the target. Previous versions of Make perform this task by using
Xrules that are defined by targets of the form .<suffix>.<suffix> and by
Xusing the .SUFFIXES list of suffixes. The exact workings of this mechanism
Xwere sometimes difficult to understand and often limiting in their usefulness.
XInstead, \fBdmake\fP supports the concept of \fI%-meta\fP rules.
XThe syntax and semantics of these rules differ from standard rule lines as
Xfollows:
X.sp
X.nf
X.RS
X\fI<%-target>\fP [\fI<attributes>\fP] \fI<ruleop>\fP [\fI<%-prerequisites>\fP] [;\fI<recipe>\fP]
X.RE
X.fi
X.sp
Xwhere \fI%-target\fP is a target containing exactly a single `%' sign,
X.I attributes
Xis a list (possibly empty) of attributes,
X.I ruleop
Xis the standard set of rule operators,
X.I "%-prerequisites"
X\&, if present, is a list of prerequisites containing zero or more `%' signs,
Xand
X.I recipe,
Xif present, is the first line of the recipe.
X.PP
XThe
X.I %-target
Xdefines a pattern against which a target whose recipe is
Xbeing inferred gets matched. The pattern match goes as follows: all chars are
Xmatched exactly from left to right up to but not including the % sign in the
Xpattern, % then matches the longest string from the actual target name
Xnot ending in
Xthe suffix given after the % sign in the pattern.
XConsider the following examples:
X.RS
X.sp
X.nf
X.Is "dir/%.c "
X.Ii "%.c"
Xmatches fred.c but not joe.c.Z
X.Ii "dir/%.c"
Xmatches dir/fred.c but not dd/fred.c
X.Ii "fred/%"
Xmatches fred/joe.c but not f/joe.c
X.Ii "%"
Xmatches anything
X.fi
X.sp
X.RE
XIn each case the part of the target name that matched the % sign is retained
Xand is substituted for any % signs in the prerequisite list of the %-meta rule
Xwhen the rule is selected during inference and
X.B dmake
Xconstructs the new dependency.
XAs an example the following %-meta rules describe the following:
X.RS
X.sp
X%.c : %.y ; recipe...
X.sp
X.RE
Xdescribes how to make any file ending in .c if a corresponding file ending
Xin .y can be found.
X.RS
X.sp
Xfoo%.o : fee%.k ; recipe...
X.sp
X.RE
Xis used to describe how to make fooxxxx.o from feexxxx.k.
X.RS
X.sp
X%.a :; recipe...
X.sp
X.RE
Xdescribes how to make a file whose suffix is .a without inferring any
Xprerequisites.
X.RS
X.sp
X%.c : %.y yaccsrc/%.y ; recipe...
X.sp
X.RE
Xis a short form for the construct:
X.RS
X.sp
X%.c : %.y ; recipe...
X.br
X%.c : yaccsrc/%.y ; recipe...
X.sp
X.RE
Xie. It is possible to specify the same recipe for two %-rules by giving
Xmore than one prerequisite in the prerequisite list.
XA more interesting example is:
X.RS
X.sp
X% : RCS/%,v ; co $<
X.sp
X.RE
Xwhich describes how to take any target and check it out of
Xthe RCS directory if the corresponding file exists in the RCS directory.
XThe equivalent SCCS rule would be:
X.RS
X.sp
X% : s.% ; get $<
X.sp
X.RE
X.PP
XThe previous RCS example defines an infinite rule, because it says how to make
X.I anything
Xfrom RCS/%,v, and
X.I anything
Xalso includes RCS/fred.c,v.
XTo limit the size of the graph that results from such rules
X.B dmake
Xuses the macro variable PREP (stands for % repetition). By default the value
Xof this variable is 0, which says that no repetitions of a %-rule are to be
Xgenerated. If it is set to something greater than 0, then that many
Xrepetitions of any infinite %-rule are allowed. If in the above
Xexample PREP was set to 1, then \fBdmake\fP would generate the dependency
Xgraph:
X.RS
X.sp
X% --> RCS/%,v --> RCS/RCS/%,v,v
X.sp
X.RE
XWhere each link is assigned the same recipe as the first link.
XPREP should be used only in special cases, since it may result in
Xa large increase in the number of possible prerequisites tested.
X.B dmake
Xfurther assumes that any target that has no suffix can be made from
Xa prerequisite that has at least one suffix.
X.PP
X.B dmake
Xsupports dynamic prerequisite generation for prerequisites of %-meta rules.
XThis is best illustrated by an example. The RCS rule shown above can infer
Xhow to check out a file from a corresponding RCS file only if the target
Xis a simple file name with no directory information. That is, the above rule
Xcan infer how to find \fIRCS/fred.c,v\fP from the target \fIfred.c\fP,
Xbut cannot infer how to find \fIsrcdir/RCS/fred.c,v\fP from \fIsrcdir/fred.c\fP
Xbecause the above rule will cause \fBdmake\fP to look for RCS/srcdir/fred.c,v;
Xwhich does not exist (assume that srcdir has its own RCS directory as is the
Xcommon case).
X.PP
XA more versatile formulation of the above RCS check out rule is the following:
X.RS
X.sp
X% : $$(@:d)RCS/$$(@:f),v : co $@
X.sp
X.RE
XThis rule uses the dynamic macro $@ to specify the prerequisite to try to
Xinfer. During inference of this rule the macro $@ is set to the value of
Xthe target of the %-meta rule and the appropriate prerequisite is generated by
Xextracting the directory portion of the target name (if any), appending the
Xstring \fIRCS/\fP to it, and appending the target file name with a trailing
X\fI,v\fP attached to the previous result.
X.PP
X.B dmake
Xcan also infer indirect prerequisites.
XAn inferred target can have a list of prerequisites added that will not
Xshow up in the value of $< but will show up in the value of $? and $&.
XIndirect prerequisites are specified in an inference rule by quoting the
Xprerequisite with single quotes. For example, if you had the explicit
Xdependency:
X.RS
X.sp
X.nf
Xfred.o : fred.c ; rule to make fred.o
Xfred.o : local.h
X.fi
X.sp
X.RE
Xthen this can be inferred for fred.o from the following inference rule:
X.RS
X.sp
X%.o : %.c 'local.h' ; rule to make a .o from a .c
X.sp
X.RE
XYou may infer indirect prerequisites that are a function of the value of '%'
Xin the current rule. The meta-rule:
X.RS
X.sp
X%.o : %.c '$(INC)/%.h' ; rule to make a .o from a .c
X.sp
X.RE
Xinfers an indirect prerequisite found in the INC directory whose name is the
Xsame as the expansion of $(INC), and the prerequisite name depends on the
Xbase name of the current target.
XThe set of indirect prerequisites is attached to the meta rule in which they
Xare specified and are inferred only if the rule is used to infer a recipe
Xfor a target. They do not play an active role in driving the inference
Xalgorithm.
XThe construct:
X.RS
X.sp
X%.o : %.c %.f 'local.h'; recipe
X.sp
X.RE
Xis equivalent to:
X.RS
X.sp
X.nf
X%.o : %.c 'local.h' : recipe
X.fi
X.sp
X.RE
Xwhile:
X.RS
X.sp
X%.o :| %.c %.f 'local.h'; recipe
X.sp
X.RE
Xis equivalent to:
X.RS
X.sp
X.nf
X%.o : %.c 'local.h' : recipe
X%.o : %.f 'local.h' : recipe
X.fi
X.sp
X.RE
X.PP
XIf any of the attributes .SETDIR, .EPILOG, .PROLOG, .SILENT,
X\&.USESHELL, .SWAP, .PRECIOUS, .LIBRARY, .NOSTATE and .IGNORE
Xare given for a %-rule then when that rule is bound to a target
Xas the result of an inference, the target's set of attributes is augmented by
Xthe attributes from the above set that are specified in the bound %-rule.
XOther attributes specified for %-meta rules are not inherited by the target.
XThe .SETDIR attribute is treated in a special way.
XIf the target already had a .SETDIR attribute set then
X.B dmake
Xchanges to that directory prior to performing the inference.
XDuring inference any .SETDIR attributes for the inferred prerequisite
Xare honored.
XThe directories must exist for a %-meta rule to be selected as a possible
Xinference path. If the directories do not exist no error message is issued,
Xinstead the corresponding path in the inference graph is rejected.
X.PP
X.B dmake
Xalso supports the old format special target .<suffix>.<suffix>
Xby identifying any rules
Xof this form and mapping them to the appropriate %-rule. So for example if
Xan old makefile contains the construct:
X.RS
X.sp
X\&.c.o :; cc \-c $< \-o $@
X.sp
X.RE
X.B dmake
Xmaps this into the following %-rule:
X.RS
X.sp
X%.o : %.c; cc \-c $< \-o $@
X.sp
X.RE
XFurthermore,
X.B dmake
Xunderstands several SYSV AUGMAKE special targets and maps them into
Xcorresponding %-meta rules. These transformation must be enabled by providing
Xthe \-A flag on the command line or by setting the value of AUGMAKE to
Xnon\-NULL.
XThe construct
X.RS
X.sp
X\&.suff :; recipe
X.sp
X.RE
Xgets mapped into:
X.RS
X.sp
X% : %.suff; recipe
X.sp
X.RE
Xand the construct
X.RS
X.sp
X\&.c~.o :; recipe
X.sp
X.RE
Xgets mapped into:
X.RS
X.sp
X%.o : s.%.c ; recipe
X.sp
X.RE
XIn general, a special target of the form .<str>~ is replaced by the %-rule
Xconstruct s.%.<str>, thereby providing support for the syntax used by SYSV
XAUGMAKE for providing SCCS support.
XWhen enabled, these mappings allow processing of existing SYSV
Xmakefiles without modifications.
X.PP
X.B dmake
Xbases all of its inferences on the inference graph constructed from the
X%-rules defined in the makefile.
XIt knows exactly which targets can be made from which prerequisites by
Xmaking queries on the inference graph. For this reason .SUFFIXES is not
Xneeded and is completely ignored.
X.PP
XFor a %-meta rule to be inferred as the
Xrule whose recipe will be used to make a target, the target's name must match
Xthe %-target pattern, and any inferred %-prerequisite must already exist or
Xhave an explicit recipe so that the prerequisite can be made.
XWithout \fItransitive closure\fP on the inference graph the above rule
Xdescribes precisely when an inference match terminates the search.
XIf transitive closure is enabled (the usual case), and a prerequisite does
Xnot exist or cannot be made, then
X.B dmake
Xinvokes the inference algorithm recursively on the prerequisite to see if
Xthere is some way the prerequisite can be manufactured. For, if the
Xprerequisite can be made then the current target can also be made using the
Xcurrent %-meta rule.
XThis means that there is no longer a need to give a rule
Xfor making a .o from a .y if you have already given a rule for making a .o
Xfrom a .c and a .c from a .y. In such cases
X.B dmake
Xcan infer how to make the
X\&.o from the .y via the intermediary .c and will remove the .c when the .o is
Xmade. Transitive closure can be disabled by giving the \-T switch on the
Xcommand line.
X.PP
XA word of caution.
X.B dmake
Xbases its transitive closure on the %-meta rule targets.
XWhen it performs transitive closure it infers how to make a target from a
Xprerequisite by performing a pattern match as if the potential prerequisite
Xwere a new target.
XThe set of rules:
X.RS
X.nf
X.sp
X%.o : %.c :; rule for making .o from .c
X%.c : %.y :; rule for making .c from .y
X% : RCS/%,v :; check out of RCS file
X.fi
X.sp
X.RE
Xwill, by performing transitive closure, allow \fBdmake\fP to infer how to make
Xa .o from a .y using a .c as an intermediate temporary file. Additionally
Xit will be able to infer how to make a .y from an RCS file, as long as that
XRCS file is in the RCS directory and has a name which ends in .y,v.
XThe transitivity computation is performed dynamically for each target that
Xdoes not have a recipe. This has potential to be costly if the %-meta
Xrules are not carefully specified. The .NOINFER attribute is used to mark
Xa %-meta node as being a final target during inference. Any node with this
Xattribute set will not be used for subsequent inferences. As an example
Xthe node RCS/%,v is marked as a final node since we know that if the RCS file
Xdoes not exist there likely is no other way to make it. Thus the standard
Xstartup makefile contains an entry similar to:
X.RS
X.nf
X\&.NOINFER : RCS/%,v
X.fi
X.RE
XThereby indicating that the RCS file is the end of the inference chain.
XWhenever the inference algorithm determines that a target can be made from
Xmore than one prerequisite and the inference chains for the two methods
Xare the same length the algorithm reports an ambiguity and prints the
Xambiguous inference chains.
X.PP
X.B dmake
Xtries to
Xremove intermediate files resulting from transitive closure if the file
Xis not marked as being PRECIOUS, or the \fB\-u\fP flag was not given on the
Xcommand line, and if the inferred intermediate did not previously exist.
XIntermediate targets that existed prior to being made are never removed.
XThis is in keeping with the philosophy that
X.B dmake
Xshould never remove things from the file system that it did not add.
XIf the special target .REMOVE is defined and has a recipe then
X.B dmake
Xconstructs a list of the intermediate files to be removed and makes them
Xprerequisites of .REMOVE. It then makes .REMOVE thereby removing the
Xprerequisites if the recipe of .REMOVE says to. Typically .REMOVE is defined
Xin the startup file as:
X.sp
X\t.REMOVE :; $(RM) $<
X.SH "MAKING TARGETS"
XIn order to update a target \fBdmake\fP must execute a recipe.
XWhen a recipe needs to be executed it is first expanded so that any macros
Xin the recipe text are expanded, and it is then either executed directly or
Xpassed to a shell.
X.B dmake
Xsupports two types of recipes. The regular recipes and group recipes.
X.PP
XWhen a regular recipe is invoked \fBdmake\fP executes each line of the recipe
Xseparately using a new copy of a shell if a shell is required.
XThus effects of commands do not generally persist across recipe lines
X(e.g. cd requests in a recipe line do not carry over to the next recipe line).
XThis is true even in environments such as \fBMSDOS\fP, where dmake internally
Xsets the current working director to match the directory it was in before
Xthe command was executed.
X.PP
XThe decision on whether a shell is required to execute a command is based on
Xthe value of the macro SHELLMETAS or on the specification of '+' or .USESHELL
Xfor the current recipe or target respectively.
XIf any character in the value of
XSHELLMETAS is found in the expanded recipe text-line or the use of a shell
Xis requested explicitly via '+' or .USESHELL then the command is
Xexecuted using a shell, otherwise the command is executed directly.
XThe shell that is used for execution is given by the value of the macro SHELL.
XThe flags that are passed to the shell are given by the value of SHELLFLAGS.
XThus \fBdmake\fP constructs the command line:
X.sp
X\t$(SHELL) $(SHELLFLAGS) $(expanded_recipe_command)
X.sp
XNormally
X.B dmake
Xwrites the command line that it is about to invoke to standard output.
XIf the .SILENT attribute is set for the target or for
Xthe recipe line (via @), then the recipe line is not echoed.
X.PP
XGroup recipe processing is similar to that of regular recipes, except that
Xa shell is always invoked. The shell that is invoked is given by the value of
Xthe macro GROUPSHELL, and its flags are taken from the value of the macro
XGROUPFLAGS. If a target has the .PROLOG attribute set then
X.B dmake
Xprepends to the shell script the recipe associated with the special target
X\&.GROUPPROLOG, and if the attribute .EPILOG is set as well, then the recipe
Xassociated with the special target .GROUPEPILOG is appended to the script
Xfile.
XThis facility can be used to always prepend a common header and common trailer
Xto group recipes.
XGroup recipes are echoed to standard output just like standard recipes, but
Xare enclosed by lines beginning with [ and ].
X.PP
XThe recipe flags [+,\-,%,@] are recognized at the start of a recipe line
Xeven if they appear in a macro. For example:
X.RS
X.sp
X.nf
XSH = +
Xall:
X\t$(SH)echo hi
X.fi
X.sp
X.RE
Xis completely equivalent to writing
X.RS
X.sp
X.nf
XSH = +
Xall:
X\t+echo hi
X.fi
X.sp
X.RE
X.PP
XThe last step performed by
X.B dmake
Xprior to running a recipe is to set the macro CMNDNAME to the name of the
Xcommand to execute (determined by finding the first white\-space ending token
Xin the command line). It then sets the macro CMNDARGS to be the remainder
Xof the line.
X.B dmake
Xthen expands the macro COMMAND which by default is set to
X.RS
X.sp
XCOMMAND = $(CMNDNAME) $(CMNDARGS)
X.sp
X.RE
XThe result of this final expansion is the command that will be executed.
XThe reason for this expansion is to allow for a different interface to
Xthe argument passing facilities (esp. under DOS) than that provided by
X.B dmake\fR.\fP
XYou can for example define COMMAND to be
X.RS
X.sp
XCOMMAND = $(CMNDNAME) @$(mktmp $(CMNDARGS))
X.sp
X.RE
Xwhich dumps the arguments into a temporary file and runs the command
X.RS
X.sp
X$(CMNDNAME) @/tmp/ASAD23043
X.sp
X.RE
Xwhich has a much shorter argument list. It is now up to the command to
Xuse the supplied argument as the source for all other arguments.
XAs an optimization, if COMMAND is not defined
X.B dmake
Xdoes not perform the above expansion. On systems, such as UNIX, that
Xhandle long command lines this provides a slight saving in processing the
Xmakefiles.
X.SH "MAKING LIBRARIES"
XLibraries are easy to maintain using \fBdmake\fP. A library is a file
Xcontaining a collection of object files.
XThus to make a library you simply specify it as a target with the .LIBRARY
Xattribute set and specify its list of prerequisites. The prerequisites should
Xbe the object members that are to go into the library. When
X.B dmake
Xmakes the library target it uses the .LIBRARY attribute to pass to the
Xprerequisites the .LIBMEMBER attribute and the name of the library. This
Xenables the file binding mechanism to look for the member in the library if an
Xappropriate object file cannot be found. A small example best illustrates
Xthis.
X.RS
X.nf
X.sp
Xmylib.a .LIBRARY : mem1.o mem2.o mem3.o
X\trules for making library...
X\t# remember to remove .o's when lib is made
X.sp
X# equivalent to: '%.o : %.c ; ...'
X\&.c.o :; rules for making .o from .c say
X.sp
X.fi
X.RE
X.B dmake
Xwill use the .c.o rule for making the library members if appropriate .c files
Xcan be found using the search rules. NOTE: this is not specific in any way
Xto C programs, they are simply used as an example.
X.PP
X.B dmake
Xtries to handle the old library construct format in a sensible way.
XThe construct
X.I lib(member.o)
Xis separated and the \fIlib\fP portion is declared
Xas a library target.
XThe new target is defined
Xwith the .LIBRARY attribute set and the \fImember.o\fP portion of the
Xconstruct is
Xdeclared as a prerequisite of the lib target.
XIf the construct \fIlib(member.o)\fP
Xappears as a prerequisite of a target in the
Xmakefile, that target has the new name of the lib assigned as its
Xprerequisite. Thus the following example:
X.RS
X.sp
X.nf
Xa.out : ml.a(a.o) ml.a(b.o); $(CC) \-o $@ $<
X
X\&.c.o :; $(CC) \-c $(CFLAGS) \-o $@ $<
X%.a:
X\tar rv $@ $?
X\tranlib $@
X\trm \-rf $?
X.sp
X.fi
X.RE
Xconstructs the following dependency
Xgraph.
X.RS
X.sp
X.nf
Xa.out : ml.a; $(CC) \-o $@ $<
Xml.a .LIBRARY : a.o b.o
X
X%.o : %.c ; $(CC) -c $(CFLAGS) \-o $@ $<
X%.a :
X\tar rv $@ $?
X\tranlib $@
X\trm -rf $?
X.sp
X.fi
X.RE
Xand making a.out then works as expected.
X.PP
XThe same thing happens for any target of the form \fIlib((entry))\fP.
XThese targets have an
Xadditional feature in that the \fIentry\fP target has the .SYMBOL attribute
Xset automatically.
X.PP
XNOTE: If the notion of entry points is supported by the archive and by
X\fBdmake\fP (currently not the case) then
X.B dmake
Xwill search the archive for the entry point and return not only the
Xmodification time of the member which defines the entry but also the name of
Xthe member file. This name will then replace \fIentry\fP and will be used for
Xmaking the member file. Once bound to an archive member the .SYMBOL
Xattribute is removed from the target.
XThis feature is presently disabled as there is little standardization
Xamong archive formats, and we have yet to find a makefile utilizing this
Xfeature (possibly due to the fact that it is unimplemented in most versions
Xof UNIX Make).
X.PP
XFinally, when
X.B dmake
Xlooks for a library member it must first locate the library file.
XIt does so by first looking for the library relative to the current directory
Xand if it is not found it then looks relative to the current value of
X$(TMD). This allows commonly used libraries to be kept near the root of
Xa source tree and to be easily found by
X.B dmake\fR.\fP
X.SH "KEEP STATE"
X.B dmake
Xsupports the keeping of state information for targets that it makes whenever
Xthe macro .KEEP_STATE is assigned a value. The value of the macro should be
Xthe name of a state file that will contain the state information. If state
Xkeeping is enabled then each target that does not poses the .NOSTATE
Xattribute will have a record written into the state file indicating the
Xtarget's name, the current directory, the command used to update the target,
Xand which, if any, :: rule is being used. When you make this target again
Xif any of this information does not match the previous settings and the
Xtarget is not out dated it will still be re\-made. The assumption is that one
Xof the conditions above has changed and that we wish to remake the target.
XFor example,
Xstate keeping is used in the maintenance of
X.B dmake
Xto test compile different versions of the source using different compilers.
XChanging the compiler causes the compilation flags to be modified and hence
Xall sources to be recompiled.
X.PP
XThe state file is an ascii file and is portable, however it is
Xnot in human readable form as the entries represent hash keys of the above
Xinformation.
X.PP
XThe Sun Microsystem's Make construct
X.RS
X.sp
X\&.KEEP_STATE :
X.sp
X.RE
Xis recognized and is mapped to \fB.KEEP_STATE:=_state.mk\fP.
XThe
X.B dmake
Xversion of state keeping does not include scanning C source files for
Xdependencies like Sun Make. This is specific to C programs and it was
Xfelt that it does not belong in make.
X.B dmake
Xinstead provides the tool, \fBcdepend\fP, to scan C source files and to produce
Xdepedency information. Users are free to modify cdepend to produce other
Xdependency files. (NOTE:
X.B cdepend
Xdoes not come with the distribution at this time, but will be available in
Xa patch in the near future)
X.SH "MULTI PROCESSING"
XIf the architecture supports it then \fBdmake\fP is capable of making a target's
Xprerequisites in parallel. \fBdmake\fP will make as much in parallel as it
Xcan and use a number of child processes up to the maximum specified by
XMAXPROCESS or by the value supplied to the \-P command line flag.
XA parallel make is enabled by setting the value of MAXPROCESS (either directly
Xor via \-P option) to a value which is > 1.
X\fBdmake\fP guarantees that all dependencies as specified in the makefile are
Xhonored. A target will not be made until all of its prerequisites have been
Xmade. Note that when you specify \fB-P 4\fP then four child processes are
Xrun concurrently but \fBdmake\fP actually displays the fifth command it will
Xrun immediately upon a child process becomming free. This is an artifact of
Xthe method used to traverse the dependency graph and cannot be removed.
XIf a parallel make is being performed then the following restrictions on
Xparallelism are enforced.
X.RS
X.IP 1.
XIndividual recipe lines in a non-group recipe are performed sequentially in
Xthe order in which they are specified within the makefile and in parallel with
Xthe recipes of other targets.
X.IP 2.
XIf a target contains multiple recipe definitions (cf. :: rules) then these are
Xperformed sequentially in the order in which the :: rules are specified within
Xthe makefile and in parallel with the recipes of other targets.
X.IP 3.
XIf a target rule contains the `!' modifier, then the recipe is performed
Xsequentially for the list of outdated prerequisites and in parallel with the recipes of other targets.
X.IP 4.
XIf a target has the .SEQUENTIAL attribute set then all of its prerequisites
Xare made sequentially relative to one another (as if MAXPROCESS=1), but in
Xparallel with other targets in the makefile.
X.RE
X.PP
XNote: If you specify a parallel make then
Xthe order of target update and the order in which the associated recipes are
Xinvoked will not correspond to that displayed by the \-n flag.
X.SH "CONDITIONALS"
X.B dmake
Xsupports a makefile construct called a \fIconditional\fR. It allows
Xthe user
Xto conditionally select portions of makefile text for input processing
Xand to discard other portions. This becomes useful for
Xwriting makefiles that are intended to function for more than one target
Xhost and environment. The conditional expression is specified as follows:
X.sp
X.RS
X.nf
X\&.IF \fIexpression\fR
X ... if text ...
X\&.ELIF \fIexpression\fR
X ... if text ...
X\&.ELSE
X ... else text ...
X\&.END
X.RE
X.fi
X.sp
XThe .ELSE and .ELIF portions are optional, and the conditionals may be
Xnested (ie. the text may contain another conditional).
X\&.IF, .ELSE, and .END
Xmay appear anywhere in the makefile, but a single conditional expression
Xmay not span multiple makefiles.
X.PP
X\fIexpression\fR can be one of the following three forms:
X.sp
X\t<text> | <text> == <text> | <text> != <text>
X.sp
Xwhere \fItext\fR is either text or a macro expression. In any case,
Xbefore the comparison is made, the expression is expanded. The text
Xportions are then selected and compared. White space at the start and
Xend of the text portion is discarded before the comparison. This means
Xthat a macro that evaluates to nothing but white space is considered a
XNULL value for the purpose of the comparison.
XIn the first case the expression evaluates TRUE if the text is not NULL
Xotherwise it evaluates FALSE. The remaining two cases both evaluate the
Xexpression on the basis of a string comparison.
XIf a macro expression needs to be equated to a NULL string then compare it to
Xthe value of the macro $(NULL).
XYou can use the $(shell ...) macro to construct more complex test expressions.
X.SH "EXAMPLES"
X.RS
X.nf
X.sp
X# A simple example showing how to use make
X#
Xprgm : a.o b.o
X cc a.o b.o \-o prgm
Xa.o : a.c g.h
X cc a.c \-o $@
Xb.o : b.c g.h
X cc b.c \-o $@
X.fi
X.RE
X.sp
XIn the previous
Xexample prgm is remade only if a.o and/or b.o is out of date with
Xrespect to prgm.
XThese dependencies can be stated more concisely
Xby using the inference rules defined in the standard startup file.
XThe default rule for making .o's from .c's looks something like this:
X.sp
X\&\t%.o : %.c; cc \-c $(CFLAGS) \-o $@ $<
X.sp
XSince there exists a rule (defined in the startup file)
Xfor making .o's from .c's
X\fBdmake\fR will use that rule
Xfor manufacturing a .o from a .c and we can specify our dependencies
Xmore concisely.
X.sp
X.RS
X.nf
Xprgm : a.o b.o
X cc \-o prgm $<
Xa.o b.o : g.h
X.fi
X.RE
X.sp
XA more general way to say the above using the new macro expansions
Xwould be:
X.sp
X.RS
X.nf
XSRC = a b
XOBJ = {$(SRC)}.o
X.sp
Xprgm : $(OBJ)
X cc \-o $@ $<
X.sp
X$(OBJ) : g.h
X.fi
X.RE
X.sp
XIf we want to keep the objects in a separate directory, called
Xobjdir, then we would write
Xsomething like this.
X.sp
X.RS
X.nf
XSRC = a b
XOBJ = {$(SRC)}.o
X.sp
Xprgm : $(OBJ)
X cc $< \-o $@
X.sp
X$(OBJ) : g.h
X\&%.o : %.c
X $(CC) \-c $(CFLAGS) \-o $(@:f) $<
X mv $(@:f) objdir
X
X\&.SOURCE.o : objdir # tell make to look here for .o's
X.fi
X.RE
X.sp
XAn example of building library members would go something like this:
X(NOTE: The same rules as above will be used to produce .o's from .c's)
X.sp
X.RS
X.nf
XSRC\t= a b
XLIB\t= lib
XLIBm\t= { $(SRC) }.o
X.sp
Xprgm: $(LIB)
X cc \-o $@ $(LIB)
X.sp
X$(LIB) .LIBRARY : $(LIBm)
X ar rv $@ $<
X rm $<
X.fi
X.RE
X.sp
XFinally, suppose that each of the source files in the previous example had
Xthe `:' character in their target name. Then we would write the above example
Xas:
X.sp
X.RS
X.nf
XSRC\t= f:a f:b
XLIB\t= lib
XLIBm\t= "{ $(SRC) }.o" # put quotes around each token
X.sp
Xprgm: $(LIB)
X cc \-o $@ $(LIB)
X.sp
X$(LIB) .LIBRARY : $(LIBm)
X ar rv $@ $<
X rm $<
X.fi
X.RE
X.SH "COMPATIBILITY"
XThere are two notable differences between
X.B \fBdmake\fR
Xand the standard version of BSD UNIX 4.2/4.3 Make.
X.RS
X.IP 1. .3i
XBSD UNIX 4.2/4.3 Make supports wild card filename expansion for
Xprerequisite names. Thus if a directory contains a.h, b.h and c.h, then a
Xline like
X.sp
X\ttarget: *.h
X.sp
Xwill cause UNIX make to expand the *.h into "a.h b.h c.h". \fBdmake\fR
Xdoes not support this type of filename expansion.
X.IP 2. .3i
XUnlike UNIX make, touching a library member causes \fBdmake\fR
Xto search the library for the member name and to update the library time stamp.
XThis is only implemented in the UNIX version.
XMSDOS and other versions may not have librarians that keep file time stamps,
Xas a result \fBdmake\fR touches the library file itself, and prints a warning.
X.RE
X.PP
X\fBdmake\fP is not compatible with GNU Make. In particular it does not
Xunderstand GNU Make's macro expansions that query the file system.
X.PP
X.B dmake
Xis fully compatible with SYSV AUGMAKE, and supports the following AUGMAKE
Xfeatures:
X.RS
X.IP 1. .3i
XThe word \fBinclude\fP appearing at the start of a line can be used instead of
Xthe ".INCLUDE :" construct understood by \fBdmake\fP.
X.IP 2. .3i
XThe macro modifier expression $(macro:str=sub) is understood and is equivalent
Xto the expression $(macro:s/str/sub), with the restriction that str must match
Xthe following regular expression:
X.sp
X\tstr[ |\et][ |\et]*
X.sp
X(ie. str only matches at the end of a token where str is a suffix and is
Xterminated by a space, a tab, or end of line)
XNormally \fIsub\fP is expanded before the substitution is made, if you specify
X\-A on the command line then sub is not expanded.
X.IP 3.
XThe macro % is defined to be $@ (ie. $% expands to the same value as $@).
X.IP 4.
XThe AUGMAKE notion of libraries is handled correctly.
X.IP 5.
XWhen defining special targets for the inference rules and the AUGMAKE special
Xtarget handling is enabled then the special target
X\&.X is equivalent to the %-rule "% : %.X".
X.IP 6.
XDirectories are always made if you specify \fB\-A\fP. This is consistent
Xwith other UNIX versions of Make.
X.IP 7.
XMakefiles that utilize virtual targets to force making of other targets work
Xas expected if AUGMAKE special target handling is enabled. For example:
X.sp
X.nf
X\tFRC:
X\tmyprog.o : myprog.c $(FRC) ; ...
X.fi
X.sp
XWorks as expected if you issue the command
X.sp
X\t'\fBdmake\fP \-A FRC=FRC'
X.sp
Xbut fails with a 'don't know how to make FRC'
Xerror message if you do not specify AUGMAKE special target handling via
Xthe \-A flag (or by setting AUGMAKE:=yes internally).
X.RE
X.SH "LIMITS"
XIn some environments the length of an argument string is restricted.
X(e.g. MSDOS command line arguments cannot be longer than 128 bytes if you are
Xusing the standard command.com command interpreter as your shell,
X.B dmake
Xtext diversions may help in these situations.)
X.SH "PORTABILITY"
XTo write makefiles that can be moved from one environment to another requires
Xsome forethought. In particular you must define as macros all those things
Xthat may be different in the new environment.
X.B dmake
Xhas two facilities that help to support writing portable makefiles, recursive
Xmacros and conditional expressions. The recursive macros, allow one to define
Xenvironment configurations that allow different environments for similar types
Xof operating systems. For example the same make script can be used for SYSV and
XBSD but with different macro definitions.
X.PP
XTo write a makefile that is portable between UNIX and MSDOS requires both
Xfeatures since in almost all cases you will need to define new recipes for
Xmaking targets. The recipes will probably be quite different since the
Xcapabilities of the tools on each machine are different. Different
Xmacros will be needed to help handle the smaller differences in the two
Xenvironments.
X.SH FILES
XMakefile, makefile, startup.mk (use dmake \-V to tell you where the startup
Xfile is)
X.SH "SEE ALSO"
Xsh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
X.br
XS.I. Feldman \fIMake - A Program for Maintaining Computer Programs\fP
X.SH "AUTHOR"
XDennis Vadura, CS Dept. University of Waterloo. dva...@watdragon.uwaterloo.ca
X.br
XMany thanks to Carl Seger for his helpful suggestions,
Xand to Trevor John Thompson for his many excellent ideas and
Xinformative bug reports.
X.SH BUGS
XSome system commands return non-zero status inappropriately.
XUse
X.B \-i
X(`\-' within the makefile) to overcome the difficulty.
X.PP
XSome systems do not have easily accessible
Xtime stamps for library members (MSDOS, AMIGA, etc)
Xfor these \fBdmake\fR uses the time stamp of the library instead and prints
Xa warning the first time it does so. This is almost always ok, except when
Xmultiple makefiles update a single library file. In these instances it is
Xpossible to miss an update if one is not careful.
X.PP
XThis man page is way too long.
X.SH WARNINGS
XRules supported by make(1) may not work if transitive closure is turned off
X(-T, .NOINFER).
X.PP
XPWD from csh/ksh will cause problems if a cd operation is performed and
X-e or -E option is used.
X.PP
XUsing internal macros such as COMMAND, may wreak havoc if you don't understand
Xtheir functionality.
END_OF_FILE
if test 51859 -ne `wc -c <'dmake/man/dmake.tf.B'`; then
echo shar: \"'dmake/man/dmake.tf.B'\" unpacked with wrong size!
elif test -f 'dmake/man/dmake.tf.A'; then
echo shar: Combining \"'dmake/man/dmake.tf'\" \(109647 characters\)
cat 'dmake/man/dmake.tf.A' 'dmake/man/dmake.tf.B' > 'dmake/man/dmake.tf'
if test 109647 -ne `wc -c <'dmake/man/dmake.tf'`; then
echo shar: \"'dmake/man/dmake.tf'\" combined with wrong size!
else
rm dmake/man/dmake.tf.A dmake/man/dmake.tf.B
fi
fi
# end of 'dmake/man/dmake.tf.B'
fi
if test -f 'dmake/tos/arlib.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/arlib.c'\"
else
echo shar: Extracting \"'dmake/tos/arlib.c'\" \(13319 characters\)
sed "s/^X//" >'dmake/tos/arlib.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/tos/RCS/arlib.c,v 1.1 1994/10/06 17:41:28 dvadura Exp $
X-- SYNOPSIS -- Unix archive manipulation code.
X--
X-- DESCRIPTION
X-- Originally this code was provided by Eric Gisin of MKS. I took
X-- his code and completely rewrote it adding cacheing of lib members
X-- and other various optimizations. I kept the overal functional
X-- idea of the library routines as they are similar to those in GNU
X-- make and felt it advantageous to maintain a similar interface.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: arlib.c,v $
X * Revision 1.1 1994/10/06 17:41:28 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <ar.h>
X#include "extern.h"
X#include "sysintf.h"
X
X/* By defining the defines below it is possible to configure the library
X * code for library cacheing/non-cacheing, ASCII archive headers, and a full
X * decode of the ar_hdr fields in the scan_ar function. */
X
X#define ASCARCH 1 /* ASCII time stored in archive */
X#define LC 1 /* Turn on library cacheing */
X#define DECODE_ALL_AR_FIELDS 0 /* decode only fields make needs*/
X
X#if LC
X# define FOUND_MEMBER FALSE
X#else
X# define FOUND_MEMBER TRUE
X# define _cache_member(a, b, c)
X# define _check_cache(a, b, c, d) FALSE
X#endif
X
X#define MAXFNAME 32 /* Longest file name in archive */
X#define MAXMNAME 8 /* Max module name < MAXFNAME */
X
X
X/* This struct is used to pass the library and member information about the
X * routines that perform the library seeking/cacheing */
Xstruct ar_args {
X char *lib;
X char *member;
X time_t time;
X};
X
X
Xtypedef struct AR {
X char ar_name[MAXFNAME+1]; /* File name */
X long ar_size; /* Size in bytes */
X time_t ar_time; /* Modification time */
X
X#ifdef DOS
X char ar_modname[MAXMNAME+1]; /* DOS module name */
X#endif
X
X#if DECODE_ALL_AR_FIELDS
X uint16 ar_mode; /* File mode */
X uint16 ar_uid; /* File owner */
X uint16 ar_gid; /* File group owner */
X#endif
X} AR, *ARPTR;
X
X
Xstatic int ar_scan ANSI((FILE *,
X int (*) ANSI((FILE *, struct AR *, struct ar_args *)),
X struct ar_args *));
Xstatic int ar_touch ANSI(( FILE *, time_t ));
Xstatic int time_function ANSI(( FILE *, struct AR *, struct ar_args * ));
Xstatic int touch_function ANSI(( FILE *, struct AR *, struct ar_args * ));
X
X#if LC
Xstatic int _cache_member ANSI((char *, char *, time_t));
Xstatic int _check_cache ANSI((char *, char *, time_t *, int));
X#endif
X
X/* decoded archive header */
Xstatic AR _ar;
X
X
XPUBLIC time_t
Xseek_arch(name, lib)/*
X======================
X Look for module 'name' inside 'lib'. If compiled with cacheing then first
X check to see if the specified lib is cached. If so then return that time
X stamp instead of looking into the library. */
Xchar *name;
Xchar *lib;
X{
X FILE *f;
X int rv;
X time_t mtime;
X struct ar_args args;
X
X /* Check the cache first (if there is a cache) */
X if( _check_cache(name, lib, &mtime, FALSE) ) return( mtime );
X
X /* Open the lib file and perform the scan of the members, looking
X * for our particular member. If cacheing is enabled it will be
X * taken care of automatically during the scan. */
X
X args.lib = lib;
X args.member = name;
X args.time = (time_t)0L;
X
X if( (f = fopen(lib, "rb")) == NIL(FILE) ) return( (time_t)0L );
X rv = ar_scan(f, time_function, &args );
X fclose( f );
X
X if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
X
X return( args.time );
X}
X
X
XPUBLIC int
Xtouch_arch(name, lib)/*
X=======================
X Look for module 'name' inside 'lib'. If compiled with cacheing then first
X check to see if the specified lib is cached. If so then set that time
X stamp and write it into the library. Returns 0 on success, non-zero
X on failure. */
Xchar *name;
Xchar *lib;
X{
X FILE *f;
X int rv;
X struct ar_args args;
X
X /* Open the lib file and perform the scan of the members, looking
X * for our particular member. If cacheing is enabled it will be
X * taken care of automatically during the scan. */
X
X args.lib = lib;
X args.member = name;
X args.time = (time_t)0L;
X
X if( (f = fopen(lib, "rb+")) == NIL(FILE) ) return( (time_t)1L );
X rv = ar_scan(f, touch_function, &args );
X fclose( f );
X
X if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
X
X return( 0 );
X}
X
X
X
Xstatic int
Xtime_function(f, arp, argp)/*
X=============================
X get library member's time, if it matches than return it in argp, if
X cacheing is enabled than cache the library members also. */
XFILE *f; /* library file */
Xstruct AR *arp; /* library member header */
Xstruct ar_args *argp;
X{
X int rv = _cache_member( arp->ar_name, argp->lib, arp->ar_time );
X
X if( strcmp(argp->member, arp->ar_name) == 0 ) {
X argp->time = arp->ar_time;
X
X if( arp->ar_time == 0 && !(Glob_attr & A_SILENT) )
X Warning( "(%s): Can't extract library member timestamp; using EPOCH",
X argp->member);
X
X return( rv ); /* 1 => no cacheing, 0 => cacheing */
X }
X
X return( FALSE ); /* continue scan */
X}
X
X
X
Xstatic int
Xtouch_function(f, arp, argp)/*
X==============================
X Update library member's time stamp, and write new time value into cache
X if required. */
XFILE *f; /* library file */
Xstruct AR *arp; /* library member header */
Xstruct ar_args *argp;
X{
X extern time_t time ANSI(( time_t * ));
X time_t now = time((time_t*) NULL); /* Current time. */
X
X if( strcmp(argp->member, arp->ar_name) == 0 ) {
X _check_cache( argp->member, argp->lib, &now, TRUE );
X ar_touch(f, now );
X
X return( TRUE );
X }
X
X return( FALSE ); /* continue scan */
X}
X
X
X
X
Xstatic int
Xar_scan(f, function, arg)/*
X===========================
X Scan the opened archive, and call the given function for each member found.
X The function will be called with the file positioned at the beginning of
X the member and it can read up to arp->ar_size bytes of the archive member.
X If the function returns 1, we stop and return 1. We return 0 at the end
X of the archive, or -1 if the archive has invalid format. This interface
X is more general than required by "make", but it can be used by other
X utilities. */
Xregister FILE *f;
Xint (*function) ANSI((FILE *, struct AR *, struct ar_args *));
Xstruct ar_args *arg;
X{
X extern long atol ANSI((char *));
X register char *p;
X struct ar_hdr arhdr; /* external archive header */
X off_t offset; /* member seek offset */
X
X#if ASCARCH
X char magic[SARMAG];
X#else
X unsigned short word;
X#endif
X
X fseek( f, 0L, 0 ); /* Start at the beginning of the archive file */
X
X#if ASCARCH
X fread( magic, sizeof(magic), 1, f );
X if( strncmp(magic, ARMAG, SARMAG) != 0 ) return( -1 );
X#else
X fread( (char*)&word, sizeof(word), 1, f );
X if( word != ARMAG ) return( -1 );
X#endif
X
X /* scan the library, calling `function' for each member
X */
X while( 1 ) {
X if( fread((char*) &arhdr, sizeof(arhdr), 1, f) != 1 ) break;
X offset = ftell(f);
X strncpy(_ar.ar_name, arhdr.ar_name, sizeof(arhdr.ar_name));
X
X for( p = &_ar.ar_name[sizeof(arhdr.ar_name)];
X --p >= _ar.ar_name && *p == ' ';);
X
X p[1] = '\0';
X if( *p == '/' ) *p = 0; /* Only SysV has trailing '/' */
X
X#if ASCARCH
X if( strncmp(arhdr.ar_fmag, ARFMAG, sizeof(arhdr.ar_fmag)) != 0 )
X return( -1 );
X _ar.ar_time = atol(arhdr.ar_date);
X _ar.ar_size = atol(arhdr.ar_size);
X#else
X _ar.ar_time = arhdr.ar_date;
X _ar.ar_size = arhdr.ar_size;
X#endif
X
X
X#if DECODE_ALL_AR_FIELDS
X#if ASCARCH
X _ar.ar_mode = atoi(arhdr.ar_mode);
X _ar.ar_uid = atoi(arhdr.ar_uid);
X _ar.ar_gid = atoi(arhdr.ar_gid);
X#else
X _ar.ar_mode = arhdr.ar_mode;
X _ar.ar_size = arhdr.ar_size;
X _ar.ar_uid = arhdr.ar_uid;
X _ar.ar_gid = arhdr.ar_gid;
X#endif
X#endif
X
X if( (*function)(f, &_ar, arg) ) return( 1 );
X fseek( f, offset + (_ar.ar_size+1 & ~1L), 0 );
X }
X
X if( !feof(f) ) return( -1 );
X return 0;
X}
X
X
X
Xstatic int
Xar_touch( f, now )/*
X====================
X touch module header timestamp. */
XFILE *f;
Xtime_t now;
X{
X struct ar_hdr arhdr; /* external archive header */
X
X fseek(f, - (off_t) (sizeof(arhdr) - sizeof(arhdr.ar_name)), 1);
X
X#if ASCARCH
X fprintf(f, "%lu", now);
X#else
X fwrite((char *)now, sizeof(now), 1, f);
X#endif
X
X return( ferror(f) ? 0 : 1 );
X}
X
X
X#if LC
Xtypedef struct mem {
X time_t m_time; /* modify time of member*/
X struct mem *m_next; /* next member in lib */
X char m_valid; /* valid cache entry */
X char m_name[1]; /* lib member name */
X} MEM, *MEMPTR;
X
Xtypedef struct lib {
X struct lib *lb_next; /* next library in list */
X struct mem *lb_members; /* list of lib members */
X char lb_valid; /* valid cache entry */
X char *lb_name; /* library name */
X} LIB, *LIBPTR;
X
Xstatic LIBPTR _cache = NIL(LIB);
Xstatic MEMPTR _find_member ANSI(( LIBPTR, char * ));
X
Xstatic int
X_check_cache( name, lib, pmtime, touch )/*
X==========================================
X Check to see if we have cached member in lib, if so return time in pmtime
X and return TRUE, otherwise return FALSE, if touch is TRUE then touch
X the archive member instead. */
Xchar *name;
Xchar *lib;
Xtime_t *pmtime;
Xint touch;
X{
X register MEMPTR mp;
X register LIBPTR lp;
X
X for( lp=_cache; lp != NIL(LIB) && lp->lb_name != lib; lp=lp->lb_next );
X if( lp == NIL(LIB) ) return( FALSE );
X
X mp = _find_member( lp, name );
X if( mp == NIL(MEM) || !mp->m_valid ) return( FALSE );
X
X if( touch == TRUE )
X {
X mp->m_time = *pmtime;
X mp->m_valid = 1;
X }
X else
X *pmtime = mp->m_time;
X
X lp->lb_valid = 1;
X lp->lb_members = mp;
X
X return( TRUE );
X}
X
X
X
Xstatic int
X_cache_member( name, lib, mtime )/*
X===================================
X Cache name in lib along with it's time */
Xchar *name;
Xchar *lib;
Xtime_t mtime;
X{
X register MEMPTR mp;
X register LIBPTR lp;
X
X for( lp=_cache;
X lp != NIL(LIB) && lp->lb_name != NIL(char) && lp->lb_name != lib;
X lp=lp->lb_next);
X
X if( lp == NIL(LIB) )
X {
X lp = (LIBPTR) malloc(sizeof(LIB));
X if( lp == NIL(LIB) ) No_ram();
X
X lp->lb_name = lib;
X lp->lb_members = NIL(MEM);
X lp->lb_next = _cache;
X lp->lb_valid = 0;
X _cache = lp;
X }
X
X /* On UNIX ar does not allow multiple copies of the same .o file to live
X * in the same AR file. If this is not TRUE then use the commented out
X * version to set the value of mp. */
X
X /*mp = _find_member(lp, name);*/
X mp = NIL(MEM);
X
X if( mp == NIL(MEM) )
X {
X mp = (MEMPTR) malloc(sizeof(char)*offsetof(MEM,m_name[strlen(name)+1]));
X if( mp == NIL(MEM) ) No_ram();
X
X strcpy( mp->m_name, name );
X mp->m_time = mtime;
X
X if( lp->lb_members == NIL(MEM) ) {
X mp->m_next = mp;
X lp->lb_members = mp;
X }
X else {
X mp->m_next = lp->lb_members->m_next;
X lp->lb_members->m_next = mp;
X lp->lb_members = mp;
X }
X }
X else
X mp->m_time = mtime;
X
X mp->m_valid = 1;
X
X return( lp->lb_valid );
X}
X
X
Xstatic MEMPTR
X_find_member( lp, name )
XLIBPTR lp;
Xchar *name;
X{
X register MEMPTR mp = lp->lb_members;
X
X if( mp == NIL(MEM) ) return(mp);
X
X do {
X if( !strcmp(mp->m_name, name ) ) return( mp );
X mp = mp->m_next;
X }
X while( mp != lp->lb_members );
X
X return( NIL(MEM) );
X}
X#endif
X
X
X
Xvoid
Xvoid_lcache( lib, member )/*
X============================
X Void the library cache for lib. If member is NIL(char) then nuke all
X of the members, if member is NOT NIL(char) then invalidate only that
X member. */
Xchar *lib;
Xchar *member;
X{
X#if LC
X register LIBPTR lp;
X register MEMPTR mp;
X register MEMPTR tmp;
X
X for( lp=_cache; lp != NIL(LIB) && lp->lb_name != lib; lp=lp->lb_next );
X if( lp == NIL(LIB) ) return;
X
X if( member == NIL(char) ) {
X mp = lp->lb_members;
X do {
X tmp = mp->m_next;
X (void) free( mp );
X mp = tmp;
X } while( mp != lp->lb_members );
X
X lp->lb_valid = 0;
X lp->lb_members = NIL(MEM);
X lp->lb_name = NIL(char);
X }
X else {
X mp=lp->lb_members;
X do {
X if( strcmp( member, mp->m_name) == 0 ) {
X lp->lb_members = mp->m_next;
X mp->m_valid = 0;
X }
X
X mp=mp->m_next;
X } while( mp != lp->lb_members );
X }
X#endif
X}
END_OF_FILE
if test 13319 -ne `wc -c <'dmake/tos/arlib.c'`; then
echo shar: \"'dmake/tos/arlib.c'\" unpacked with wrong size!
fi
# end of 'dmake/tos/arlib.c'
fi
if test -f 'dmake/unix/sysvr3/stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/stdlib.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/stdlib.h'\" \(564 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/stdlib.h' <<'END_OF_FILE'
X#ifndef _STDLIB_INCLUDED_
X#define _STDLIB_INCLUDED_
X
X#ifndef _AIX
Xextern /*GOTO*/ _exit();
Xextern /*GOTO*/ exit();
Xextern /*GOTO*/ abort();
Xextern int system();
Xextern char *getenv();
Xextern char *calloc();
Xextern char *malloc();
Xextern char *realloc();
X
X/* The AIX compiler dies on illegal redefinition of free */
Xextern free();
X#endif
X
X/* AIX doesn't use NAME_MAX anylonger... */
X#ifdef _AIX
X#include <unistd.h>
X#define NAME_MAX pathconf("/dev/null",_PC_NAME_MAX)
X#endif
X
Xextern int errno;
X
X#ifndef EIO
X# include <errno.h>
X#endif
X
X#endif /* _STDLIB_INCLUDED_ */
END_OF_FILE
if test 564 -ne `wc -c <'dmake/unix/sysvr3/stdlib.h'`; then
echo shar: \"'dmake/unix/sysvr3/stdlib.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/stdlib.h'
fi
echo shar: End of archive 4 \(of 27\).
cp /dev/null ark4isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/dbug/dbug.c dmake/dbug/malloc/testmem.c
# Wrapped by kent@sparky on Fri Oct 21 16:50:33 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 5 (of 27)."'
if test -f 'dmake/dbug/dbug/dbug.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/dbug/dbug.c'\"
else
echo shar: Extracting \"'dmake/dbug/dbug/dbug.c'\" \(44528 characters\)
sed "s/^X//" >'dmake/dbug/dbug/dbug.c' <<'END_OF_FILE'
X/******************************************************************************
X * *
X * N O T I C E *
X * *
X * Copyright Abandoned, 1987, Fred Fish *
X * *
X * *
X * This previously copyrighted work has been placed into the public *
X * domain by the author and may be freely used for any purpose, *
X * private or commercial. *
X * *
X * Because of the number of inquiries I was receiving about the use *
X * of this product in commercially developed works I have decided to *
X * simply make it public domain to further its unrestricted use. I *
X * specifically would be most happy to see this material become a *
X * part of the standard Unix distributions by AT&T and the Berkeley *
X * Computer Science Research Group, and a standard part of the GNU *
X * system from the Free Software Foundation. *
X * *
X * I would appreciate it, as a courtesy, if this notice is left in *
X * all copies and derivative works. Thank you. *
X * *
X * The author makes no warranty of any kind with respect to this *
X * product and explicitly disclaims any implied warranties of mer- *
X * chantability or fitness for any particular purpose. *
X * *
X ******************************************************************************
X */
X
X
X/*
X * FILE
X *
X * dbug.c runtime support routines for dbug package
X *
X * SCCS
X *
X * @(#)dbug.c 1.19 9/5/87
X *
X * DESCRIPTION
X *
X * These are the runtime support routines for the dbug package.
X * The dbug package has two main components; the user include
X * file containing various macro definitions, and the runtime
X * support routines which are called from the macro expansions.
X *
X * Externally visible functions in the runtime support module
X * use the naming convention pattern "_db_xx...xx_", thus
X * they are unlikely to collide with user defined function names.
X *
X * AUTHOR(S)
X *
X * Fred Fish (base code)
X * (Currently at Motorola Computer Division, Tempe, Az.)
X * hao!noao!mcdsun!fnf
X * (602) 438-3614
X *
X * Binayak Banerjee (profiling enhancements)
X * seismo!bpa!sjuvax!bbanerje
X */
X
X
X#include <stdio.h>
X#ifdef amiga
X#define AMIGA
X#endif
X
X#ifdef AMIGA
X#define HZ (50) /* Probably in some header somewhere */
X#endif
X
X/*
X * Manifest constants that should not require any changes.
X */
X
X#define FALSE 0 /* Boolean FALSE */
X#define TRUE 1 /* Boolean TRUE */
X#define EOS '\000' /* End Of String marker */
X
X/*
X * Manifest constants which may be "tuned" if desired.
X */
X
X#define PRINTBUF 1024 /* Print buffer size */
X#define INDENT 4 /* Indentation per trace level */
X#define MAXDEPTH 200 /* Maximum trace depth default */
X
X/*
X * The following flags are used to determine which
X * capabilities the user has enabled with the state
X * push macro.
X */
X
X#define TRACE_ON 000001 /* Trace enabled */
X#define DEBUG_ON 000002 /* Debug enabled */
X#define FILE_ON 000004 /* File name print enabled */
X#define LINE_ON 000010 /* Line number print enabled */
X#define DEPTH_ON 000020 /* Function nest level print enabled */
X#define PROCESS_ON 000040 /* Process name print enabled */
X#define NUMBER_ON 000100 /* Number each line of output */
X#define PROFILE_ON 000200 /* Print out profiling code */
X
X#define TRACING (stack -> flags & TRACE_ON)
X#define DEBUGGING (stack -> flags & DEBUG_ON)
X#define PROFILING (stack -> flags & PROFILE_ON)
X#define STREQ(a,b) (strcmp(a,b) == 0)
X
X/*
X * Typedefs to make things more obvious.
X */
X
X#define VOID void /* Can't use typedef for most compilers */
Xtypedef int BOOLEAN;
X
X/*
X * Make it easy to change storage classes if necessary.
X */
X
X#define LOCAL static /* Names not needed by outside world */
X#define IMPORT extern /* Names defined externally */
X#define EXPORT /* Allocated here, available globally */
X#define AUTO auto /* Names to be allocated on stack */
X#define REGISTER register /* Names to be placed in registers */
X
X/*
X * The following define is for the variable arguments kluge, see
X * the comments in _db_doprnt_().
X *
X * Also note that the longer this list, the less prone to failing
X * on long argument lists, but the more stuff that must be moved
X * around for each call to the runtime support routines. The
X * length may really be critical if the machine convention is
X * to pass arguments in registers.
X *
X * Note that the default define allows up to 16 integral arguments,
X * or 8 floating point arguments (doubles), on most machines.
X *
X * Someday this may be replaced with true varargs support, when
X * ANSI C has had time to take root.
X */
X
X#define ARGLIST a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15
X
X/*
X * The default file for profiling. Could also add another flag
X * (G?) which allowed the user to specify this.
X */
X
X#define PROF_FILE "dbugmon.out"
X
X/*
X * Variables which are available externally but should only
X * be accessed via the macro package facilities.
X */
X
XEXPORT FILE *_db_fp_ = stderr; /* Output stream, default stderr */
XEXPORT FILE *_db_pfp_ = (FILE *)0; /* Profile stream, 'dbugmon.out' */
XEXPORT char *_db_process_ = "dbug"; /* Pointer to process name; argv[0] */
XEXPORT BOOLEAN _db_on_ = FALSE; /* TRUE if debugging currently on */
XEXPORT BOOLEAN _db_pon_ = FALSE; /* TRUE if debugging currently on */
X
X/*
X * Externally supplied functions.
X */
X
X#ifdef unix /* Only needed for unix */
XIMPORT VOID perror (); /* Print system/library error */
XIMPORT int chown (); /* Change owner of a file */
XIMPORT int getgid (); /* Get real group id */
XIMPORT int getuid (); /* Get real user id */
XIMPORT int access (); /* Test file for access */
X#else
X#if !(AMIGA || LATTICE || __TURBOC__)
XLOCAL VOID perror (); /* Fake system/library error print routine */
X#endif
X#endif
X
X# if BSD4_3 || sun
XIMPORT int getrusage ();
X#endif
X
XIMPORT int atoi (); /* Convert ascii to integer */
XIMPORT VOID exit (); /* Terminate execution */
XIMPORT int fclose (); /* Close a stream */
XIMPORT FILE *fopen (); /* Open a stream */
X#if !defined(__BORLANDC__)
XIMPORT int fprintf (); /* Formatted print on file */
X#endif
XIMPORT VOID free ();
XIMPORT char *malloc (); /* Allocate memory */
XIMPORT int strcmp (); /* Compare strings */
XIMPORT char *strcpy (); /* Copy strings around */
XIMPORT int strlen (); /* Find length of string */
X
X#ifndef fflush /* This is sometimes a macro */
XIMPORT int fflush (); /* Flush output for stream */
X#endif
X
X
X/*
X * The user may specify a list of functions to trace or
X * debug. These lists are kept in a linear linked list,
X * a very simple implementation.
X */
X
Xstruct link {
X char *string; /* Pointer to link's contents */
X struct link *next_link; /* Pointer to the next link */
X};
X
X
X/*
X * Debugging states can be pushed or popped off of a
X * stack which is implemented as a linked list. Note
X * that the head of the list is the current state and the
X * stack is pushed by adding a new state to the head of the
X * list or popped by removing the first link.
X */
X
Xstruct state {
X int flags; /* Current state flags */
X int maxdepth; /* Current maximum trace depth */
X unsigned int delay; /* Delay after each output line */
X int level; /* Current function nesting level */
X FILE *out_file; /* Current output stream */
X FILE *prof_file; /* Current profiling stream */
X struct link *functions; /* List of functions */
X struct link *p_functions; /* List of profiled functions */
X struct link *keywords; /* List of debug keywords */
X struct link *processes; /* List of process names */
X struct state *next_state; /* Next state in the list */
X};
X
XLOCAL struct state *stack = NULL; /* Linked list of stacked states */
X
X/*
X * Local variables not seen by user.
X */
X
XLOCAL int lineno = 0; /* Current debugger output line number */
XLOCAL char *func = "?func"; /* Name of current user function */
XLOCAL char *file = "?file"; /* Name of current user file */
XLOCAL BOOLEAN init_done = FALSE;/* Set to TRUE when initialization done */
X
X/*#if unix || AMIGA || M_I86*/
XLOCAL int jmplevel; /* Remember nesting level at setjmp () */
XLOCAL char *jmpfunc; /* Remember current function for setjmp */
XLOCAL char *jmpfile; /* Remember current file for setjmp */
X/*#endif*/
X
XLOCAL struct link *ListParse ();/* Parse a debug command string */
XLOCAL char *StrDup (); /* Make a fresh copy of a string */
XLOCAL VOID OpenFile (); /* Open debug output stream */
XLOCAL VOID OpenProfile (); /* Open profile output stream */
XLOCAL VOID CloseFile (); /* Close debug output stream */
XLOCAL VOID PushState (); /* Push current debug state */
XLOCAL VOID ChangeOwner (); /* Change file owner and group */
XLOCAL BOOLEAN DoTrace (); /* Test for tracing enabled */
XLOCAL BOOLEAN Writable (); /* Test to see if file is writable */
XLOCAL unsigned long Clock (); /* Return current user time (ms) */
XLOCAL char *DbugMalloc (); /* Allocate memory for runtime support */
XLOCAL char *BaseName (); /* Remove leading pathname components */
XLOCAL VOID DoPrefix (); /* Print debugger line prefix */
XLOCAL VOID FreeList (); /* Free memory from linked list */
XLOCAL VOID Indent (); /* Indent line to specified indent */
X
X /* Supplied in Sys V runtime environ */
XLOCAL char *strtok (); /* Break string into tokens */
XLOCAL char *strrchr (); /* Find last occurance of char */
X
X/*
X * The following local variables are used to hold the state information
X * between the call to _db_pargs_() and _db_doprnt_(), during
X * expansion of the DBUG_PRINT macro. This is the only macro
X * that currently uses these variables. The DBUG_PRINT macro
X * and the new _db_doprnt_() routine replace the older DBUG_N macros
X * and their corresponding runtime support routine _db_printf_().
X *
X * These variables are currently used only by _db_pargs_() and
X * _db_doprnt_().
X */
X
XLOCAL int u_line = 0; /* User source code line number */
XLOCAL char *u_keyword = "?"; /* Keyword for current macro */
X
X/*
X * Miscellaneous printf format strings.
X */
X
X#define ERR_MISSING_RETURN "%s: missing DBUG_RETURN or DBUG_VOID_RETURN macro in function \"%s\"\n"
X#define ERR_OPEN "%s: can't open debug output stream \"%s\": "
X#define ERR_CLOSE "%s: can't close debug file: "
X#define ERR_ABORT "%s: debugger aborting because %s\n"
X#define ERR_CHOWN "%s: can't change owner/group of \"%s\": "
X#define ERR_PRINTF "%s: obsolete object file for '%s', please recompile!\n"
X
X/*
X * Macros and defines for testing file accessibility under UNIX.
X */
X
X#ifdef unix
X# define A_EXISTS 00 /* Test for file existance */
X# define A_EXECUTE 01 /* Test for execute permission */
X# define A_WRITE 02 /* Test for write access */
X# define A_READ 03 /* Test for read access */
X# define EXISTS(pathname) (access (pathname, A_EXISTS) == 0)
X# define WRITABLE(pathname) (access (pathname, A_WRITE) == 0)
X#else
X# define EXISTS(pathname) (FALSE) /* Assume no existance */
X#endif
X
X/*
X * Translate some calls among different systems.
X */
X
X#ifdef unix
X# define XDelay sleep
XIMPORT unsigned int sleep (); /* Pause for given number of seconds */
X#endif
X
X#ifdef AMIGA
XIMPORT int XDelay (); /* Pause for given number of ticks */
X#endif
X
X
X/*
X * FUNCTION
X *
X * _db_push_ push current debugger state and set up new one
X *
X * SYNOPSIS
X *
X * VOID _db_push_ (control)
X * char *control;
X *
X * DESCRIPTION
X *
X * Given pointer to a debug control string in "control", pushes
X * the current debug state, parses the control string, and sets
X * up a new debug state.
X *
X * The only attribute of the new state inherited from the previous
X * state is the current function nesting level. This can be
X * overridden by using the "r" flag in the control string.
X *
X * The debug control string is a sequence of colon separated fields
X * as follows:
X *
X * <field_1>:<field_2>:...:<field_N>
X *
X * Each field consists of a mandatory flag character followed by
X * an optional "," and comma separated list of modifiers:
X *
X * flag[,modifier,modifier,...,modifier]
X *
X * The currently recognized flag characters are:
X *
X * d Enable output from DBUG_<N> macros for
X * for the current state. May be followed
X * by a list of keywords which selects output
X * only for the DBUG macros with that keyword.
X * A null list of keywords implies output for
X * all macros.
X *
X * D Delay after each debugger output line.
X * The argument is the number of tenths of seconds
X * to delay, subject to machine capabilities.
X * I.E. -#D,20 is delay two seconds.
X *
X * f Limit debugging and/or tracing, and profiling to the
X * list of named functions. Note that a null list will
X * disable all functions. The appropriate "d" or "t"
X * flags must still be given, this flag only limits their
X * actions if they are enabled.
X *
X * F Identify the source file name for each
X * line of debug or trace output.
X *
X * g Enable profiling. Create a file called 'dbugmon.out'
X * containing information that can be used to profile
X * the program. May be followed by a list of keywords
X * that select profiling only for the functions in that
X * list. A null list implies that all functions are
X * considered.
X *
X * L Identify the source file line number for
X * each line of debug or trace output.
X *
X * n Print the current function nesting depth for
X * each line of debug or trace output.
X *
X * N Number each line of dbug output.
X *
X * p Limit debugger actions to specified processes.
X * A process must be identified with the
X * DBUG_PROCESS macro and match one in the list
X * for debugger actions to occur.
X *
X * P Print the current process name for each
X * line of debug or trace output.
X *
X * r When pushing a new state, do not inherit
X * the previous state's function nesting level.
X * Useful when the output is to start at the
X * left margin.
X *
X * t Enable function call/exit trace lines.
X * May be followed by a list (containing only
X * one modifier) giving a numeric maximum
X * trace level, beyond which no output will
X * occur for either debugging or tracing
X * macros. The default is a compile time
X * option.
X *
X * Some examples of debug control strings which might appear
X * on a shell command line (the "-#" is typically used to
X * introduce a control string to an application program) are:
X *
X * -#d:t
X * -#d:f,main,subr1:F:L:t,20
X * -#d,input,output,files:n
X *
X * For convenience, any leading "-#" is stripped off.
X *
X */
X
X
XVOID _db_push_ (control)
Xchar *control;
X{
X REGISTER char *scan;
X REGISTER struct link *temp;
X
X if (control && *control == '-') {
X if (*++control == '#') {
X control++;
X }
X }
X control = StrDup (control);
X PushState ();
X scan = strtok (control, ":");
X for (; scan != NULL; scan = strtok ((char *)NULL, ":")) {
X switch (*scan++) {
X case 'd':
X _db_on_ = TRUE;
X stack -> flags |= DEBUG_ON;
X if (*scan++ == ',') {
X stack -> keywords = ListParse (scan);
X }
X break;
X case 'D':
X stack -> delay = 0;
X if (*scan++ == ',') {
X temp = ListParse (scan);
X stack -> delay = DelayArg (atoi (temp -> string));
X FreeList (temp);
X }
X break;
X case 'f':
X if (*scan++ == ',') {
X stack -> functions = ListParse (scan);
X }
X break;
X case 'F':
X stack -> flags |= FILE_ON;
X break;
X case 'g':
X _db_pon_ = TRUE;
X OpenProfile(PROF_FILE);
X stack -> flags |= PROFILE_ON;
X if (*scan++ == ',') {
X stack -> p_functions = ListParse (scan);
X }
X break;
X case 'L':
X stack -> flags |= LINE_ON;
X break;
X case 'n':
X stack -> flags |= DEPTH_ON;
X break;
X case 'N':
X stack -> flags |= NUMBER_ON;
X break;
X case 'o':
X if (*scan++ == ',') {
X temp = ListParse (scan);
X OpenFile (temp -> string);
X FreeList (temp);
X } else {
X OpenFile ("-");
X }
X break;
X case 'p':
X if (*scan++ == ',') {
X stack -> processes = ListParse (scan);
X }
X break;
X case 'P':
X stack -> flags |= PROCESS_ON;
X break;
X case 'r':
X stack -> level = 0;
X break;
X case 't':
X stack -> flags |= TRACE_ON;
X if (*scan++ == ',') {
X temp = ListParse (scan);
X stack -> maxdepth = atoi (temp -> string);
X FreeList (temp);
X }
X break;
X }
X }
X free (control);
X}
X
X
X
X/*
X * FUNCTION
X *
X * _db_pop_ pop the debug stack
X *
X * DESCRIPTION
X *
X * Pops the debug stack, returning the debug state to its
X * condition prior to the most recent _db_push_ invocation.
X * Note that the pop will fail if it would remove the last
X * valid state from the stack. This prevents user errors
X * in the push/pop sequence from screwing up the debugger.
X * Maybe there should be some kind of warning printed if the
X * user tries to pop too many states.
X *
X */
X
XVOID _db_pop_ ()
X{
X REGISTER struct state *discard;
X
X discard = stack;
X if (discard != NULL && discard -> next_state != NULL) {
X stack = discard -> next_state;
X _db_fp_ = stack -> out_file;
X _db_pfp_ = stack -> prof_file;
X if (discard -> keywords != NULL) {
X FreeList (discard -> keywords);
X }
X if (discard -> functions != NULL) {
X FreeList (discard -> functions);
X }
X if (discard -> processes != NULL) {
X FreeList (discard -> processes);
X }
X if (discard -> p_functions != NULL) {
X FreeList (discard -> p_functions);
X }
X CloseFile (discard -> out_file);
X CloseFile (discard -> prof_file);
X free ((char *) discard);
X }
X}
X
X
X/*
X * FUNCTION
X *
X * _db_enter_ process entry point to user function
X *
X * SYNOPSIS
X *
X * VOID _db_enter_ (_func_, _file_, _line_, _sfunc_, _sfile_, _slevel_)
X * char *_func_; points to current function name
X * char *_file_; points to current file name
X * int _line_; called from source line number
X * char **_sfunc_; save previous _func_
X * char **_sfile_; save previous _file_
X * int *_slevel_; save previous nesting level
X *
X * DESCRIPTION
X *
X * Called at the beginning of each user function to tell
X * the debugger that a new function has been entered.
X * Note that the pointers to the previous user function
X * name and previous user file name are stored on the
X * caller's stack (this is why the ENTER macro must be
X * the first "executable" code in a function, since it
X * allocates these storage locations). The previous nesting
X * level is also stored on the callers stack for internal
X * self consistency checks.
X *
X * Also prints a trace line if tracing is enabled and
X * increments the current function nesting depth.
X *
X * Note that this mechanism allows the debugger to know
X * what the current user function is at all times, without
X * maintaining an internal stack for the function names.
X *
X */
X
XVOID _db_enter_ (_func_, _file_, _line_, _sfunc_, _sfile_, _slevel_)
Xchar *_func_;
Xchar *_file_;
Xint _line_;
Xchar **_sfunc_;
Xchar **_sfile_;
Xint *_slevel_;
X{
X if (!init_done) {
X _db_push_ ("");
X }
X *_sfunc_ = func;
X *_sfile_ = file;
X func = _func_;
X file = BaseName (_file_);
X stack -> level++;
X *_slevel_ = stack -> level;
X if (DoProfile ()) {
X (VOID) fprintf (_db_pfp_, "%s\tE\t%ld\n",func, Clock());
X (VOID) fflush (_db_pfp_);
X }
X if (DoTrace ()) {
X DoPrefix (_line_);
X Indent (stack -> level);
X (VOID) fprintf (_db_fp_, ">%s\n", func);
X (VOID) fflush (_db_fp_);
X (VOID) XDelay (stack -> delay);
X }
X}
X
X
X/*
X * FUNCTION
X *
X * _db_return_ process exit from user function
X *
X * SYNOPSIS
X *
X * VOID _db_return_ (_line_, _sfunc_, _sfile_, _slevel_)
X * int _line_; current source line number
X * char **_sfunc_; where previous _func_ is to be retrieved
X * char **_sfile_; where previous _file_ is to be retrieved
X * int *_slevel_; where previous level was stashed
X *
X * DESCRIPTION
X *
X * Called just before user function executes an explicit or implicit
X * return. Prints a trace line if trace is enabled, decrements
X * the current nesting level, and restores the current function and
X * file names from the defunct function's stack.
X *
X */
X
XVOID _db_return_ (_line_, _sfunc_, _sfile_, _slevel_)
Xint _line_;
Xchar **_sfunc_;
Xchar **_sfile_;
Xint *_slevel_;
X{
X if (!init_done) {
X _db_push_ ("");
X }
X if (stack -> level != *_slevel_ && (TRACING || DEBUGGING || PROFILING)) {
X (VOID) fprintf (_db_fp_, ERR_MISSING_RETURN, _db_process_, func);
X (VOID) XDelay (stack -> delay);
X } else if (DoProfile ()) {
X (VOID) fprintf (_db_pfp_, "%s\tX\t%ld\n", func, Clock());
X (VOID) XDelay (stack -> delay);
X } else if (DoTrace ()) {
X DoPrefix (_line_);
X Indent (stack -> level);
X (VOID) fprintf (_db_fp_, "<%s\n", func);
X (VOID) XDelay (stack -> delay);
X }
X (VOID) fflush (_db_fp_);
X stack -> level = *_slevel_ - 1;
X func = *_sfunc_;
X file = *_sfile_;
X}
X
X
X/*
X * FUNCTION
X *
X * _db_pargs_ log arguments for subsequent use by _db_doprnt_()
X *
X * SYNOPSIS
X *
X * VOID _db_pargs_ (_line_, keyword)
X * int _line_;
X * char *keyword;
X *
X * DESCRIPTION
X *
X * The new universal printing macro DBUG_PRINT, which replaces
X * all forms of the DBUG_N macros, needs two calls to runtime
X * support routines. The first, this function, remembers arguments
X * that are used by the subsequent call to _db_doprnt_().
X*
X */
X
XVOID _db_pargs_ (_line_, keyword)
Xint _line_;
Xchar *keyword;
X{
X u_line = _line_;
X u_keyword = keyword;
X}
X
X
X/*
X * FUNCTION
X *
X * _db_doprnt_ handle print of debug lines
X *
X * SYNOPSIS
X *
X * VOID _db_doprnt_ (format, ARGLIST)
X * char *format;
X * long ARGLIST;
X *
X * DESCRIPTION
X *
X * When invoked via one of the DBUG macros, tests the current keyword
X * set by calling _db_pargs_() to see if that macro has been selected
X * for processing via the debugger control string, and if so, handles
X * printing of the arguments via the format string. The line number
X * of the DBUG macro in the source is found in u_line.
X *
X * Note that the format string SHOULD NOT include a terminating
X * newline, this is supplied automatically.
X *
X * NOTES
X *
X * This runtime support routine replaces the older _db_printf_()
X * routine which is temporarily kept around for compatibility.
X *
X * The rather ugly argument declaration is to handle some
X * magic with respect to the number of arguments passed
X * via the DBUG macros. The current maximum is 3 arguments
X * (not including the keyword and format strings).
X *
X * The new <varargs.h> facility is not yet common enough to
X * convert to it quite yet...
X *
X */
X
X/*VARARGS1*/
XVOID _db_doprnt_ (format, ARGLIST)
Xchar *format;
Xlong ARGLIST;
X{
X if (_db_keyword_ (u_keyword)) {
X DoPrefix (u_line);
X if (TRACING) {
X Indent (stack -> level + 1);
X } else {
X (VOID) fprintf (_db_fp_, "%s: ", func);
X }
X (VOID) fprintf (_db_fp_, "%s: ", u_keyword);
X (VOID) fprintf (_db_fp_, format, ARGLIST);
X (VOID) fprintf (_db_fp_, "\n");
X (VOID) fflush (_db_fp_);
X (VOID) XDelay (stack -> delay);
X }
X}
X
X/*
X * The following routine is kept around temporarily for compatibility
X * with older objects that were compiled with the DBUG_N macro form
X * of the print routine. It will print a warning message on first
X * usage. It will go away in subsequent releases...
X */
X
X/*VARARGS3*/
XVOID _db_printf_ (_line_, keyword, format, ARGLIST)
Xint _line_;
Xchar *keyword, *format;
Xlong ARGLIST;
X{
X static BOOLEAN firsttime = TRUE;
X
X if (firsttime) {
X (VOID) fprintf (stderr, ERR_PRINTF, _db_process_, file);
X firsttime = FALSE;
X }
X _db_pargs_ (_line_, keyword);
X _db_doprnt_ (format, ARGLIST);
X}
X
X
X/*
X * FUNCTION
X *
X * ListParse parse list of modifiers in debug control string
X *
X * SYNOPSIS
X *
X * LOCAL struct link *ListParse (ctlp)
X * char *ctlp;
X *
X * DESCRIPTION
X *
X * Given pointer to a comma separated list of strings in "cltp",
X * parses the list, building a list and returning a pointer to it.
X * The original comma separated list is destroyed in the process of
X * building the linked list, thus it had better be a duplicate
X * if it is important.
X *
X * Note that since each link is added at the head of the list,
X * the final list will be in "reverse order", which is not
X * significant for our usage here.
X *
X */
X
XLOCAL struct link *ListParse (ctlp)
Xchar *ctlp;
X{
X REGISTER char *start;
X REGISTER struct link *new;
X REGISTER struct link *head;
X
X head = NULL;
X while (*ctlp != EOS) {
X start = ctlp;
X while (*ctlp != EOS && *ctlp != ',') {
X ctlp++;
X }
X if (*ctlp == ',') {
X *ctlp++ = EOS;
X }
X new = (struct link *) DbugMalloc (sizeof (struct link));
X new -> string = StrDup (start);
X new -> next_link = head;
X head = new;
X }
X return (head);
X}
X
X
X/*
X * FUNCTION
X *
X * InList test a given string for member of a given list
X *
X * SYNOPSIS
X *
X * LOCAL BOOLEAN InList (linkp, cp)
X * struct link *linkp;
X * char *cp;
X *
X * DESCRIPTION
X *
X * Tests the string pointed to by "cp" to determine if it is in
X * the list pointed to by "linkp". Linkp points to the first
X * link in the list. If linkp is NULL then the string is treated
X * as if it is in the list (I.E all strings are in the null list).
X * This may seem rather strange at first but leads to the desired
X * operation if no list is given. The net effect is that all
X * strings will be accepted when there is no list, and when there
X * is a list, only those strings in the list will be accepted.
X *
X */
X
XLOCAL BOOLEAN InList (linkp, cp)
Xstruct link *linkp;
Xchar *cp;
X{
X REGISTER struct link *scan;
X REGISTER BOOLEAN accept;
X
X if (linkp == NULL) {
X accept = TRUE;
X } else {
X accept = FALSE;
X for (scan = linkp; scan != NULL; scan = scan -> next_link) {
X if (STREQ (scan -> string, cp)) {
X accept = TRUE;
X break;
X }
X }
X }
X return (accept);
X}
X
X
X/*
X * FUNCTION
X *
X * PushState push current state onto stack and set up new one
X *
X * SYNOPSIS
X *
X * LOCAL VOID PushState ()
X *
X * DESCRIPTION
X *
X * Pushes the current state on the state stack, and initializes
X * a new state. The only parameter inherited from the previous
X * state is the function nesting level. This action can be
X * inhibited if desired, via the "r" flag.
X *
X * The state stack is a linked list of states, with the new
X * state added at the head. This allows the stack to grow
X * to the limits of memory if necessary.
X *
X */
X
XLOCAL VOID PushState ()
X{
X REGISTER struct state *new;
X
X new = (struct state *) DbugMalloc (sizeof (struct state));
X new -> flags = 0;
X new -> delay = 0;
X new -> maxdepth = MAXDEPTH;
X if (stack != NULL) {
X new -> level = stack -> level;
X } else {
X new -> level = 0;
X }
X new -> out_file = stderr;
X new -> functions = NULL;
X new -> p_functions = NULL;
X new -> keywords = NULL;
X new -> processes = NULL;
X new -> next_state = stack;
X stack = new;
X init_done = TRUE;
X}
X
X
X/*
X * FUNCTION
X *
X * DoTrace check to see if tracing is current enabled
X *
X * SYNOPSIS
X *
X * LOCAL BOOLEAN DoTrace ()
X *
X * DESCRIPTION
X *
X * Checks to see if tracing is enabled based on whether the
X * user has specified tracing, the maximum trace depth has
X * not yet been reached, the current function is selected,
X * and the current process is selected. Returns TRUE if
X * tracing is enabled, FALSE otherwise.
X *
X */
X
XLOCAL BOOLEAN DoTrace ()
X{
X REGISTER BOOLEAN trace;
X
X trace = FALSE;
X if (TRACING) {
X if (stack -> level <= stack -> maxdepth) {
X if (InList (stack -> functions, func)) {
X if (InList (stack -> processes, _db_process_)) {
X trace = TRUE;
X }
X }
X }
X }
X return (trace);
X}
X
X
X/*
X * FUNCTION
X *
X * DoProfile check to see if profiling is current enabled
X *
X * SYNOPSIS
X *
X * LOCAL BOOLEAN DoProfile ()
X *
X * DESCRIPTION
X *
X * Checks to see if profiling is enabled based on whether the
X * user has specified profiling, the maximum trace depth has
X * not yet been reached, the current function is selected,
X * and the current process is selected. Returns TRUE if
X * profiling is enabled, FALSE otherwise.
X *
X */
X
XLOCAL BOOLEAN DoProfile ()
X{
X REGISTER BOOLEAN profile;
X
X profile = FALSE;
X if (PROFILING) {
X if (stack -> level <= stack -> maxdepth) {
X if (InList (stack -> p_functions, func)) {
X if (InList (stack -> processes, _db_process_)) {
X profile = TRUE;
X }
X }
X }
X }
X return (profile);
X}
X
X
X/*
X * FUNCTION
X *
X * _db_keyword_ test keyword for member of keyword list
X *
X * SYNOPSIS
X *
X * BOOLEAN _db_keyword_ (keyword)
X * char *keyword;
X *
X * DESCRIPTION
X *
X * Test a keyword to determine if it is in the currently active
X * keyword list. As with the function list, a keyword is accepted
X * if the list is null, otherwise it must match one of the list
X * members. When debugging is not on, no keywords are accepted.
X * After the maximum trace level is exceeded, no keywords are
X * accepted (this behavior subject to change). Additionally,
X * the current function and process must be accepted based on
X * their respective lists.
X *
X * Returns TRUE if keyword accepted, FALSE otherwise.
X *
X */
X
XBOOLEAN _db_keyword_ (keyword)
Xchar *keyword;
X{
X REGISTER BOOLEAN accept;
X
X if (!init_done) {
X _db_push_ ("");
X }
X accept = FALSE;
X if (DEBUGGING) {
X if (stack -> level <= stack -> maxdepth) {
X if (InList (stack -> functions, func)) {
X if (InList (stack -> keywords, keyword)) {
X if (InList (stack -> processes, _db_process_)) {
X accept = TRUE;
X }
X }
X }
X }
X }
X return (accept);
X}
X
X
X/*
X * FUNCTION
X *
X * Indent indent a line to the given indentation level
X *
X * SYNOPSIS
X *
X * LOCAL VOID Indent (indent)
X * int indent;
X *
X * DESCRIPTION
X *
X * Indent a line to the given level. Note that this is
X * a simple minded but portable implementation.
X * There are better ways.
X *
X * Also, the indent must be scaled by the compile time option
X * of character positions per nesting level.
X *
X */
X
XLOCAL VOID Indent (indent)
Xint indent;
X{
X REGISTER int count;
X AUTO char buffer[PRINTBUF];
X
X indent *= INDENT;
X for (count = 0; (count < (indent - INDENT)) && (count < (PRINTBUF - 1)); count++) {
X if ((count % INDENT) == 0) {
X buffer[count] = '|';
X } else {
X buffer[count] = ' ';
X }
X }
X buffer[count] = EOS;
X (VOID) fprintf (_db_fp_, buffer);
X (VOID) fflush (_db_fp_);
X}
X
X
X/*
X * FUNCTION
X *
X * FreeList free all memory associated with a linked list
X *
X * SYNOPSIS
X *
X * LOCAL VOID FreeList (linkp)
X * struct link *linkp;
X *
X * DESCRIPTION
X *
X * Given pointer to the head of a linked list, frees all
X * memory held by the list and the members of the list.
X *
X */
X
XLOCAL VOID FreeList (linkp)
Xstruct link *linkp;
X{
X REGISTER struct link *old;
X
X while (linkp != NULL) {
X old = linkp;
X linkp = linkp -> next_link;
X if (old -> string != NULL) {
X free (old -> string);
X }
X free ((char *) old);
X }
X}
X
X
X/*
X * FUNCTION
X *
X * StrDup make a duplicate of a string in new memory
X *
X * SYNOPSIS
X *
X * LOCAL char *StrDup (string)
X * char *string;
X *
X * DESCRIPTION
X *
X * Given pointer to a string, allocates sufficient memory to make
X * a duplicate copy, and copies the string to the newly allocated
X * memory. Failure to allocated sufficient memory is immediately
X * fatal.
X *
X */
X
X
XLOCAL char *StrDup (string)
Xchar *string;
X{
X REGISTER char *new;
X
X new = DbugMalloc (strlen (string) + 1);
X (VOID) strcpy (new, string);
X return (new);
X}
X
X
X/*
X * FUNCTION
X *
X * DoPrefix print debugger line prefix prior to indentation
X *
X * SYNOPSIS
X *
X * LOCAL VOID DoPrefix (_line_)
X * int _line_;
X *
X * DESCRIPTION
X *
X * Print prefix common to all debugger output lines, prior to
X * doing indentation if necessary. Print such information as
X * current process name, current source file name and line number,
X * and current function nesting depth.
X *
X */
X
X
XLOCAL VOID DoPrefix (_line_)
Xint _line_;
X{
X lineno++;
X if (stack -> flags & NUMBER_ON) {
X (VOID) fprintf (_db_fp_, "%5d: ", lineno);
X }
X if (stack -> flags & PROCESS_ON) {
X (VOID) fprintf (_db_fp_, "%s: ", _db_process_);
X }
X if (stack -> flags & FILE_ON) {
X (VOID) fprintf (_db_fp_, "%14s: ", file);
X }
X if (stack -> flags & LINE_ON) {
X (VOID) fprintf (_db_fp_, "%5d: ", _line_);
X }
X if (stack -> flags & DEPTH_ON) {
X (VOID) fprintf (_db_fp_, "%4d: ", stack -> level);
X }
X (VOID) fflush (_db_fp_);
X}
X
X
X/*
X * FUNCTION
X *
X * OpenFile open new output stream for debugger output
X *
X * SYNOPSIS
X *
X * LOCAL VOID OpenFile (name)
X * char *name;
X *
X * DESCRIPTION
X *
X * Given name of a new file (or "-" for stdout) opens the file
X * and sets the output stream to the new file.
X *
X */
X
XLOCAL VOID OpenFile (name)
Xchar *name;
X{
X REGISTER FILE *fp;
X REGISTER BOOLEAN newfile;
X
X if (name != NULL) {
X if (strcmp (name, "-") == 0) {
X _db_fp_ = stdout;
X stack -> out_file = _db_fp_;
X } else {
X if (!Writable (name)) {
X (VOID) fprintf (_db_fp_, ERR_OPEN, _db_process_, name);
X perror ("");
X (VOID) fflush (_db_fp_);
X (VOID) XDelay (stack -> delay);
X } else {
X if (EXISTS (name)) {
X newfile = FALSE;
X } else {
X newfile = TRUE;
X }
X fp = fopen (name, "a");
X if (fp == NULL) {
X (VOID) fprintf (_db_fp_, ERR_OPEN, _db_process_, name);
X perror ("");
X (VOID) fflush (_db_fp_);
X (VOID) XDelay (stack -> delay);
X } else {
X _db_fp_ = fp;
X stack -> out_file = fp;
X if (newfile) {
X ChangeOwner (name);
X }
X }
X }
X }
X }
X}
X
X
X/*
X * FUNCTION
X *
X * OpenProfile open new output stream for profiler output
X *
X * SYNOPSIS
X *
X * LOCAL VOID OpenProfile (name)
X * char *name;
X *
X * DESCRIPTION
X *
X * Given name of a new file, opens the file
X * and sets the profiler output stream to the new file.
X *
X * It is currently unclear whether the prefered behavior is
X * to truncate any existing file, or simply append to it.
X * The latter behavior would be desirable for collecting
X * accumulated runtime history over a number of separate
X * runs. It might take some changes to the analyzer program
X * though, and the notes that Binayak sent with the profiling
X * diffs indicated that append was the normal mode, but this
X * does not appear to agree with the actual code. I haven't
X * investigated at this time [fnf; 24-Jul-87].
X */
X
XLOCAL VOID OpenProfile (name)
Xchar *name;
X{
X REGISTER FILE *fp;
X REGISTER BOOLEAN newfile;
X
X if (name != NULL) {
X if (!Writable (name)) {
X (VOID) fprintf (_db_fp_, ERR_OPEN, _db_process_, name);
X perror ("");
X (VOID) fflush (_db_fp_);
X (VOID) XDelay (stack -> delay);
X } else {
X if (EXISTS (name)) {
X newfile = FALSE;
X } else {
X newfile = TRUE;
X }
X fp = fopen (name, "w");
X if (fp == NULL) {
X (VOID) fprintf (_db_fp_, ERR_OPEN, _db_process_, name);
X perror ("");
X (VOID) fflush (_db_fp_);
X (VOID) XDelay (stack -> delay);
X } else {
X _db_pfp_ = fp;
X stack -> prof_file = fp;
X if (newfile) {
X ChangeOwner (name);
X }
X }
X }
X }
X}
X
X
X/*
X * FUNCTION
X *
X * CloseFile close the debug output stream
X *
X * SYNOPSIS
X *
X * LOCAL VOID CloseFile (fp)
X * FILE *fp;
X *
X * DESCRIPTION
X *
X * Closes the debug output stream unless it is standard output
X * or standard error.
X *
X */
X
XLOCAL VOID CloseFile (fp)
XFILE *fp;
X{
X if (fp != stderr && fp != stdout) {
X if (fclose (fp) == EOF) {
X (VOID) fprintf (stderr, ERR_CLOSE, _db_process_);
X perror ("");
X (VOID) fflush (stderr);
X (VOID) XDelay (stack -> delay);
X }
X }
X}
X
X
X/*
X * FUNCTION
X *
X * DbugExit print error message and exit
X *
X * SYNOPSIS
X *
X * LOCAL VOID DbugExit (why)
X * char *why;
X *
X * DESCRIPTION
X *
X * Prints error message using current process name, the reason for
X * aborting (typically out of memory), and exits with status 1.
X * This should probably be changed to use a status code
X * defined in the user's debugger include file.
X *
X */
X
XLOCAL VOID DbugExit (why)
Xchar *why;
X{
X (VOID) fprintf (stderr, ERR_ABORT, _db_process_, why);
X (VOID) fflush (stderr);
X (VOID) XDelay (stack -> delay);
X exit (1);
X}
X
X
X/*
X * FUNCTION
X *
X * DbugMalloc allocate memory for debugger runtime support
X *
X * SYNOPSIS
X *
X * LOCAL char *DbugMalloc (size)
X * int size;
X *
X * DESCRIPTION
X *
X * Allocate more memory for debugger runtime support functions.
X * Failure to to allocate the requested number of bytes is
X * immediately fatal to the current process. This may be
X * rather unfriendly behavior. It might be better to simply
X * print a warning message, freeze the current debugger state,
X * and continue execution.
X *
X */
X
XLOCAL char *DbugMalloc (size)
Xint size;
X{
X register char *new;
X
X new = malloc ( size );
X if (new == NULL) {
X DbugExit ("out of memory");
X }
X return (new);
X}
X
X
X/*
X * This function may be eliminated when strtok is available
X * in the runtime environment (missing from BSD4.1).
X */
X
XLOCAL char *strtok (s1, s2)
Xchar *s1, *s2;
X{
X static char *end = NULL;
X REGISTER char *rtnval;
X
X rtnval = NULL;
X if (s2 != NULL) {
X if (s1 != NULL) {
X end = s1;
X rtnval = strtok ((char *) NULL, s2);
X } else if (end != NULL) {
X if (*end != EOS) {
X rtnval = end;
X while (*end != *s2 && *end != EOS) {end++;}
X if (*end != EOS) {
X *end++ = EOS;
X }
X }
X }
X }
X return (rtnval);
X}
X
X
X/*
X * FUNCTION
X *
X * BaseName strip leading pathname components from name
X *
X * SYNOPSIS
X *
X * LOCAL char *BaseName (pathname)
X * char *pathname;
X *
X * DESCRIPTION
X *
X * Given pointer to a complete pathname, locates the base file
X * name at the end of the pathname and returns a pointer to
X * it.
X *
X */
X
XLOCAL char *BaseName (pathname)
Xchar *pathname;
X{
X register char *base;
X
X base = strrchr (pathname, '/');
X if (base++ == NULL) {
X base = pathname;
X }
X return (base);
X}
X
X
X/*
X * FUNCTION
X *
X * Writable test to see if a pathname is writable/creatable
X *
X * SYNOPSIS
X *
X * LOCAL BOOLEAN Writable (pathname)
X * char *pathname;
X *
X * DESCRIPTION
X *
X * Because the debugger might be linked in with a program that
X * runs with the set-uid-bit (suid) set, we have to be careful
X * about opening a user named file for debug output. This consists
X * of checking the file for write access with the real user id,
X * or checking the directory where the file will be created.
X *
X * Returns TRUE if the user would normally be allowed write or
X * create access to the named file. Returns FALSE otherwise.
X *
X */
X
XLOCAL BOOLEAN Writable (pathname)
Xchar *pathname;
X{
X REGISTER BOOLEAN granted;
X#ifdef unix
X REGISTER char *lastslash;
X#endif
X
X#ifndef unix
X granted = TRUE;
X#else
X granted = FALSE;
X if (EXISTS (pathname)) {
X if (WRITABLE (pathname)) {
X granted = TRUE;
X }
X } else {
X lastslash = strrchr (pathname, '/');
X if (lastslash != NULL) {
X *lastslash = EOS;
X } else {
X pathname = ".";
X }
X if (WRITABLE (pathname)) {
X granted = TRUE;
X }
X if (lastslash != NULL) {
X *lastslash = '/';
X }
X }
X#endif
X return (granted);
X}
X
X
X/*
X * This function may be eliminated when strrchr is available
X * in the runtime environment (missing from BSD4.1).
X * Alternately, you can use rindex() on BSD systems.
X */
X
XLOCAL char *strrchr (s, c)
Xchar *s;
Xchar c;
X{
X REGISTER char *scan;
X
X for (scan = s; *scan != EOS; scan++) {;}
X while (scan > s && *--scan != c) {;}
X if (*scan != c) {
X scan = NULL;
X }
X return (scan);
X}
X
X
X/*
X * FUNCTION
X *
X * ChangeOwner change owner to real user for suid programs
X *
X * SYNOPSIS
X *
X * LOCAL VOID ChangeOwner (pathname)
X *
X * DESCRIPTION
X *
X * For unix systems, change the owner of the newly created debug
X * file to the real owner. This is strictly for the benefit of
X * programs that are running with the set-user-id bit set.
X *
X * Note that at this point, the fact that pathname represents
X * a newly created file has already been established. If the
X * program that the debugger is linked to is not running with
X * the suid bit set, then this operation is redundant (but
X * harmless).
X *
X */
X
XLOCAL VOID ChangeOwner (pathname)
Xchar *pathname;
X{
X#ifdef unix
X if (chown (pathname, getuid (), getgid ()) == -1) {
X (VOID) fprintf (stderr, ERR_CHOWN, _db_process_, pathname);
X perror ("");
X (VOID) fflush (stderr);
X (VOID) XDelay (stack -> delay);
X }
X#endif
X}
X
X
X/*
X * FUNCTION
X *
X * _db_setjmp_ save debugger environment
X *
X * SYNOPSIS
X *
X * VOID _db_setjmp_ ()
X *
X * DESCRIPTION
X *
X * Invoked as part of the user's DBUG_SETJMP macro to save
X * the debugger environment in parallel with saving the user's
X * environment.
X *
X */
X
XVOID _db_setjmp_ ()
X{
X jmplevel = stack -> level;
X jmpfunc = func;
X jmpfile = file;
X}
X
X
X/*
X * FUNCTION
X *
X * _db_longjmp_ restore previously saved debugger environment
X *
X * SYNOPSIS
X *
X * VOID _db_longjmp_ ()
X *
X * DESCRIPTION
X *
X * Invoked as part of the user's DBUG_LONGJMP macro to restore
X * the debugger environment in parallel with restoring the user's
X * previously saved environment.
X *
X */
X
XVOID _db_longjmp_ ()
X{
X stack -> level = jmplevel;
X if (jmpfunc) {
X func = jmpfunc;
X }
X if (jmpfile) {
X file = jmpfile;
X }
X}
X
X
X/*
X * FUNCTION
X *
X * DelayArg convert D flag argument to appropriate value
X *
X * SYNOPSIS
X *
X * LOCAL int DelayArg (value)
X * int value;
X *
X * DESCRIPTION
X *
X * Converts delay argument, given in tenths of a second, to the
X * appropriate numerical argument used by the system to delay
X * that that many tenths of a second. For example, on the
X * AMIGA, there is a system call "Delay()" which takes an
X * argument in ticks (50 per second). On unix, the sleep
X * command takes seconds. Thus a value of "10", for one
X * second of delay, gets converted to 50 on the amiga, and 1
X * on unix. Other systems will need to use a timing loop.
X *
X */
X
XLOCAL int DelayArg (value)
Xint value;
X{
X int delayarg = 0;
X
X#ifdef unix
X delayarg = value / 10; /* Delay is in seconds for sleep () */
X#endif
X#ifdef AMIGA
X delayarg = (HZ * value) / 10; /* Delay in ticks for XDelay () */
X#endif
X return (delayarg);
X}
X
X
X/*
X * A dummy delay stub for systems that do not support delays.
X * With a little work, this can be turned into a timing loop.
X */
X
X#ifndef unix
X#ifndef AMIGA
XXDelay ()
X{
X}
X#endif
X#endif
X
X
X/*
X * FUNCTION
X *
X * perror perror simulation for systems that don't have it
X *
X * SYNOPSIS
X *
X * LOCAL VOID perror (s)
X * char *s;
X *
X * DESCRIPTION
X *
X * Perror produces a message on the standard error stream which
X * provides more information about the library or system error
X * just encountered. The argument string s is printed, followed
X * by a ':', a blank, and then a message and a newline.
X *
X * An undocumented feature of the unix perror is that if the string
X * 's' is a null string (NOT a NULL pointer!), then the ':' and
X * blank are not printed.
X *
X * This version just complains about an "unknown system error".
X *
X */
X
X#if !unix && !(AMIGA || LATTICE || __TURBOC__ )
XLOCAL VOID perror (s)
X#if __STDC__
Xconst char *s;
X#else
Xchar *s;
X#endif
X{
X if (s && *s != EOS) {
X (VOID) fprintf (stderr, "%s: ", s);
X }
X (VOID) fprintf (stderr, "<unknown system error>\n");
X}
X#endif /* !unix && !(AMIGA && LATTICE) */
X
X/*
X * Here we need the definitions of the clock routine. Add your
X * own for whatever system that you have.
X */
X
X#if unix
X
X# include <sys/param.h>
X# if !defined(Solaris) && (BSD4_3 || sun)
X
X/*
X * Definition of the Clock() routine for 4.3 BSD.
X */
X
X#include <sys/time.h>
X#include <sys/resource.h>
X
X
X/*
X * Returns the user time in milliseconds used by this process so
X * far.
X */
X
XLOCAL unsigned long Clock ()
X{
X struct rusage ru;
X
X (VOID) getrusage (RUSAGE_SELF, &ru);
X return ((ru.ru_utime.tv_sec * 1000) + (ru.ru_utime.tv_usec / 1000));
X}
X
X#else
X
XLOCAL unsigned long Clock ()
X{
X return (0);
X}
X
X# endif
X
X#else
X
X#if AMIGA
X
Xstruct DateStamp { /* Yes, this is a hack, but doing it right */
X long ds_Days; /* is incredibly ugly without splitting this */
X long ds_Minute; /* off into a separate file */
X long ds_Tick;
X};
X
Xstatic int first_clock = TRUE;
Xstatic struct DateStamp begin;
Xstatic struct DateStamp elapsed;
X
XLOCAL unsigned long Clock ()
X{
X register struct DateStamp *now;
X register unsigned long millisec = 0;
X extern VOID *AllocMem ();
X
X now = (struct DateStamp *) AllocMem ((long) sizeof (struct DateStamp), 0L);
X if (now != NULL) {
X if (first_clock == TRUE) {
X first_clock = FALSE;
X (VOID) DateStamp (now);
X begin = *now;
X }
X (VOID) DateStamp (now);
X millisec = 24 * 3600 * (1000 / HZ) * (now -> ds_Days - begin.ds_Days);
X millisec += 60 * (1000 / HZ) * (now -> ds_Minute - begin.ds_Minute);
X millisec += (1000 / HZ) * (now -> ds_Tick - begin.ds_Tick);
X (VOID) FreeMem (now, (long) sizeof (struct DateStamp));
X }
X return (millisec);
X}
X
X#else
X
XLOCAL unsigned long Clock ()
X{
X return (0);
X}
X
X#endif /* AMIGA */
X
X#endif /* unix */
X
X#ifdef AMIGA
XXDelay(x)
Xint x;
X{
X if (x) Delay(x); /* fix Delay bug in AmigaDOS */
X}
X#endif
X
END_OF_FILE
if test 44528 -ne `wc -c <'dmake/dbug/dbug/dbug.c'`; then
echo shar: \"'dmake/dbug/dbug/dbug.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/dbug/dbug.c'
fi
if test -f 'dmake/dbug/malloc/testmem.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/testmem.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/testmem.c'\" \(20192 characters\)
sed "s/^X//" >'dmake/dbug/malloc/testmem.c' <<'END_OF_FILE'
X/*
X * This stuff is all stolen (with permission, since it was in the public
X * domain) from Henry Spencer's string and memory library. Thanks Henry.
X */
X
X/*
X * Test program for string(3) routines.
X *
X * Note that at least one Bell Labs implementation of the string
X * routines flunks a couple of these tests -- the ones which test
X * behavior on "negative" characters.
X */
X
X#include <stdio.h>
X#include <string.h>
X
Xchar * index();
Xchar * rindex();
X
X#define STREQ(a, b) (strcmp((a), (b)) == 0)
X
Xchar *it = "<UNSET>"; /* Routine name for message routines. */
Xint waserror = 0; /* For exit status. */
X
Xchar uctest[] = "\004\203"; /* For testing signedness of chars. */
Xint charsigned; /* Result. */
X
X/*
X - check - complain if condition is not true
X */
Xvoid
Xcheck(thing, number)
Xint thing;
Xint number; /* Test number for error message. */
X{
X if (!thing) {
X printf("%s flunked test %d\n", it, number);
X waserror = 1;
X }
X}
X
X/*
X - equal - complain if first two args don't strcmp as equal
X */
Xvoid
Xequal(a, b, number)
Xchar *a;
Xchar *b;
Xint number; /* Test number for error message. */
X{
X check(a != NULL && b != NULL && STREQ(a, b), number);
X}
X
Xchar one[50];
Xchar two[50];
X
X#ifdef UNIXERR
X#define ERR 1
X#endif
X#ifdef BERKERR
X#define ERR 1
X#endif
X#ifdef ERR
Xint f;
Xextern char *sys_errlist[];
Xextern int sys_nerr;
Xextern int errno;
X#endif
X
X/* ARGSUSED */
Xmain(argc, argv)
Xint argc;
Xchar *argv[];
X{
X /*
X * First, establish whether chars are signed.
X */
X if (uctest[0] < uctest[1])
X charsigned = 0;
X else
X charsigned = 1;
X
X /*
X * Then, do the rest of the work. Split into two functions because
X * some compilers get unhappy about a single immense function.
X */
X first();
X second();
X
X exit((waserror) ? 1 : 0);
X}
X
Xfirst()
X{
X /*
X * Test strcmp first because we use it to test other things.
X */
X it = "strcmp";
X check(strcmp("", "") == 0, 1); /* Trivial case. */
X check(strcmp("a", "a") == 0, 2); /* Identity. */
X check(strcmp("abc", "abc") == 0, 3); /* Multicharacter. */
X check(strcmp("abc", "abcd") < 0, 4); /* Length mismatches. */
X check(strcmp("abcd", "abc") > 0, 5);
X check(strcmp("abcd", "abce") < 0, 6); /* Honest miscompares. */
X check(strcmp("abce", "abcd") > 0, 7);
X check(strcmp("a\203", "a") > 0, 8); /* Tricky if char signed. */
X if (charsigned) /* Sign-bit comparison. */
X check(strcmp("a\203", "a\003") < 0, 9);
X else
X check(strcmp("a\203", "a\003") > 0, 9);
X check(strcmp("a", "a\203") < 0, 10); /* Tricky if char signed. */
X
X /*
X * Test strcpy next because we need it to set up other tests.
X */
X it = "strcpy";
X check(strcpy(one, "abcd") == one, 1); /* Returned value. */
X equal(one, "abcd", 2); /* Basic test. */
X
X (void) strcpy(one, "x");
X equal(one, "x", 3); /* Writeover. */
X equal(one+2, "cd", 4); /* Wrote too much? */
X
X (void) strcpy(two, "hi there");
X (void) strcpy(one, two);
X equal(one, "hi there", 5); /* Basic test encore. */
X equal(two, "hi there", 6); /* Stomped on source? */
X
X (void) strcpy(one, "");
X equal(one, "", 7); /* Boundary condition. */
X
X /*
X * strcat
X */
X it = "strcat";
X (void) strcpy(one, "ijk");
X check(strcat(one, "lmn") == one, 1); /* Returned value. */
X equal(one, "ijklmn", 2); /* Basic test. */
X
X (void) strcpy(one, "x");
X (void) strcat(one, "yz");
X equal(one, "xyz", 3); /* Writeover. */
X equal(one+4, "mn", 4); /* Wrote too much? */
X
X (void) strcpy(one, "gh");
X (void) strcpy(two, "ef");
X (void) strcat(one, two);
X equal(one, "ghef", 5); /* Basic test encore. */
X equal(two, "ef", 6); /* Stomped on source? */
X
X (void) strcpy(one, "");
X (void) strcat(one, "");
X equal(one, "", 7); /* Boundary conditions. */
X (void) strcpy(one, "ab");
X (void) strcat(one, "");
X equal(one, "ab", 8);
X (void) strcpy(one, "");
X (void) strcat(one, "cd");
X equal(one, "cd", 9);
X
X /*
X * strncat - first test it as strcat, with big counts, then
X * test the count mechanism.
X */
X it = "strncat";
X (void) strcpy(one, "ijk");
X check(strncat(one, "lmn", 99) == one, 1); /* Returned value. */
X equal(one, "ijklmn", 2); /* Basic test. */
X
X (void) strcpy(one, "x");
X (void) strncat(one, "yz", 99);
X equal(one, "xyz", 3); /* Writeover. */
X equal(one+4, "mn", 4); /* Wrote too much? */
X
X (void) strcpy(one, "gh");
X (void) strcpy(two, "ef");
X (void) strncat(one, two, 99);
X equal(one, "ghef", 5); /* Basic test encore. */
X equal(two, "ef", 6); /* Stomped on source? */
X
X (void) strcpy(one, "");
X (void) strncat(one, "", 99);
X equal(one, "", 7); /* Boundary conditions. */
X (void) strcpy(one, "ab");
X (void) strncat(one, "", 99);
X equal(one, "ab", 8);
X (void) strcpy(one, "");
X (void) strncat(one, "cd", 99);
X equal(one, "cd", 9);
X
X (void) strcpy(one, "ab");
X (void) strncat(one, "cdef", 2);
X equal(one, "abcd", 10); /* Count-limited. */
X
X (void) strncat(one, "gh", 0);
X equal(one, "abcd", 11); /* Zero count. */
X
X (void) strncat(one, "gh", 2);
X equal(one, "abcdgh", 12); /* Count and length equal. */
X
X /*
X * strncmp - first test as strcmp with big counts, then test
X * count code.
X */
X it = "strncmp";
X check(strncmp("", "", 99) == 0, 1); /* Trivial case. */
X check(strncmp("a", "a", 99) == 0, 2); /* Identity. */
X check(strncmp("abc", "abc", 99) == 0, 3); /* Multicharacter. */
X check(strncmp("abc", "abcd", 99) < 0, 4); /* Length unequal. */
X check(strncmp("abcd", "abc", 99) > 0, 5);
X check(strncmp("abcd", "abce", 99) < 0, 6); /* Honestly unequal. */
X check(strncmp("abce", "abcd", 99) > 0, 7);
X check(strncmp("a\203", "a", 2) > 0, 8); /* Tricky if '\203' < 0 */
X if (charsigned) /* Sign-bit comparison. */
X check(strncmp("a\203", "a\003", 2) < 0, 9);
X else
X check(strncmp("a\203", "a\003", 2) > 0, 9);
X check(strncmp("abce", "abcd", 3) == 0, 10); /* Count limited. */
X check(strncmp("abce", "abc", 3) == 0, 11); /* Count == length. */
X check(strncmp("abcd", "abce", 4) < 0, 12); /* Nudging limit. */
X check(strncmp("abc", "def", 0) == 0, 13); /* Zero count. */
X
X /*
X * strncpy - testing is a bit different because of odd semantics
X */
X it = "strncpy";
X check(strncpy(one, "abc", 4) == one, 1); /* Returned value. */
X equal(one, "abc", 2); /* Did the copy go right? */
X
X (void) strcpy(one, "abcdefgh");
X (void) strncpy(one, "xyz", 2);
X equal(one, "xycdefgh", 3); /* Copy cut by count. */
X
X (void) strcpy(one, "abcdefgh");
X (void) strncpy(one, "xyz", 3); /* Copy cut just before NUL. */
X equal(one, "xyzdefgh", 4);
X
X (void) strcpy(one, "abcdefgh");
X (void) strncpy(one, "xyz", 4); /* Copy just includes NUL. */
X equal(one, "xyz", 5);
X equal(one+4, "efgh", 6); /* Wrote too much? */
X
X (void) strcpy(one, "abcdefgh");
X (void) strncpy(one, "xyz", 5); /* Copy includes padding. */
X equal(one, "xyz", 7);
X equal(one+4, "", 8);
X equal(one+5, "fgh", 9);
X
X (void) strcpy(one, "abc");
X (void) strncpy(one, "xyz", 0); /* Zero-length copy. */
X equal(one, "abc", 10);
X
X (void) strncpy(one, "", 2); /* Zero-length source. */
X equal(one, "", 11);
X equal(one+1, "", 12);
X equal(one+2, "c", 13);
X
X (void) strcpy(one, "hi there");
X (void) strncpy(two, one, 9);
X equal(two, "hi there", 14); /* Just paranoia. */
X equal(one, "hi there", 15); /* Stomped on source? */
X
X /*
X * strlen
X */
X it = "strlen";
X check(strlen("") == 0, 1); /* Empty. */
X check(strlen("a") == 1, 2); /* Single char. */
X check(strlen("abcd") == 4, 3); /* Multiple chars. */
X
X /*
X * strchr
X */
X it = "strchr";
X check(strchr("abcd", 'z') == NULL, 1); /* Not found. */
X (void) strcpy(one, "abcd");
X check(strchr(one, 'c') == one+2, 2); /* Basic test. */
X check(strchr(one, 'd') == one+3, 3); /* End of string. */
X check(strchr(one, 'a') == one, 4); /* Beginning. */
X check(strchr(one, '\0') == one+4, 5); /* Finding NUL. */
X (void) strcpy(one, "ababa");
X check(strchr(one, 'b') == one+1, 6); /* Finding first. */
X (void) strcpy(one, "");
X check(strchr(one, 'b') == NULL, 7); /* Empty string. */
X check(strchr(one, '\0') == one, 8); /* NUL in empty string. */
X
X /*
X * index - just like strchr
X */
X it = "index";
X check(index("abcd", 'z') == NULL, 1); /* Not found. */
X (void) strcpy(one, "abcd");
X check(index(one, 'c') == one+2, 2); /* Basic test. */
X check(index(one, 'd') == one+3, 3); /* End of string. */
X check(index(one, 'a') == one, 4); /* Beginning. */
X check(index(one, '\0') == one+4, 5); /* Finding NUL. */
X (void) strcpy(one, "ababa");
X check(index(one, 'b') == one+1, 6); /* Finding first. */
X (void) strcpy(one, "");
X check(index(one, 'b') == NULL, 7); /* Empty string. */
X check(index(one, '\0') == one, 8); /* NUL in empty string. */
X
X /*
X * strrchr
X */
X it = "strrchr";
X check(strrchr("abcd", 'z') == NULL, 1); /* Not found. */
X (void) strcpy(one, "abcd");
X check(strrchr(one, 'c') == one+2, 2); /* Basic test. */
X check(strrchr(one, 'd') == one+3, 3); /* End of string. */
X check(strrchr(one, 'a') == one, 4); /* Beginning. */
X check(strrchr(one, '\0') == one+4, 5); /* Finding NUL. */
X (void) strcpy(one, "ababa");
X check(strrchr(one, 'b') == one+3, 6); /* Finding last. */
X (void) strcpy(one, "");
X check(strrchr(one, 'b') == NULL, 7); /* Empty string. */
X check(strrchr(one, '\0') == one, 8); /* NUL in empty string. */
X
X /*
X * rindex - just like strrchr
X */
X it = "rindex";
X check(rindex("abcd", 'z') == NULL, 1); /* Not found. */
X (void) strcpy(one, "abcd");
X check(rindex(one, 'c') == one+2, 2); /* Basic test. */
X check(rindex(one, 'd') == one+3, 3); /* End of string. */
X check(rindex(one, 'a') == one, 4); /* Beginning. */
X check(rindex(one, '\0') == one+4, 5); /* Finding NUL. */
X (void) strcpy(one, "ababa");
X check(rindex(one, 'b') == one+3, 6); /* Finding last. */
X (void) strcpy(one, "");
X check(rindex(one, 'b') == NULL, 7); /* Empty string. */
X check(rindex(one, '\0') == one, 8); /* NUL in empty string. */
X}
X
Xsecond()
X{
X /*
X * strpbrk - somewhat like strchr
X */
X it = "strpbrk";
X check(strpbrk("abcd", "z") == NULL, 1); /* Not found. */
X (void) strcpy(one, "abcd");
X check(strpbrk(one, "c") == one+2, 2); /* Basic test. */
X check(strpbrk(one, "d") == one+3, 3); /* End of string. */
X check(strpbrk(one, "a") == one, 4); /* Beginning. */
X check(strpbrk(one, "") == NULL, 5); /* Empty search list. */
X check(strpbrk(one, "cb") == one+1, 6); /* Multiple search. */
X (void) strcpy(one, "abcabdea");
X check(strpbrk(one, "b") == one+1, 7); /* Finding first. */
X check(strpbrk(one, "cb") == one+1, 8); /* With multiple search. */
X check(strpbrk(one, "db") == one+1, 9); /* Another variant. */
X (void) strcpy(one, "");
X check(strpbrk(one, "bc") == NULL, 10); /* Empty string. */
X check(strpbrk(one, "") == NULL, 11); /* Both strings empty. */
X
X#if 0
X /*
X * strstr - somewhat like strchr
X */
X it = "strstr";
X check(strstr("abcd", "z") == NULL, 1); /* Not found. */
X check(strstr("abcd", "abx") == NULL, 2); /* Dead end. */
X (void) strcpy(one, "abcd");
X check(strstr(one, "c") == one+2, 3); /* Basic test. */
X check(strstr(one, "bc") == one+1, 4); /* Multichar. */
X check(strstr(one, "d") == one+3, 5); /* End of string. */
X check(strstr(one, "cd") == one+2, 6); /* Tail of string. */
X check(strstr(one, "abc") == one, 7); /* Beginning. */
X check(strstr(one, "abcd") == one, 8); /* Exact match. */
X check(strstr(one, "abcde") == NULL, 9); /* Too long. */
X check(strstr(one, "de") == NULL, 10); /* Past end. */
X check(strstr(one, "") == one+4, 11); /* Finding empty. */
X (void) strcpy(one, "ababa");
X check(strstr(one, "ba") == one+1, 12); /* Finding first. */
X (void) strcpy(one, "");
X check(strstr(one, "b") == NULL, 13); /* Empty string. */
X check(strstr(one, "") == one, 14); /* Empty in empty string. */
X (void) strcpy(one, "bcbca");
X check(strstr(one, "bca") == one+2, 15); /* False start. */
X (void) strcpy(one, "bbbcabbca");
X check(strstr(one, "bbca") == one+1, 16); /* With overlap. */
X#endif
X
X /*
X * strspn
X */
X it = "strspn";
X check(strspn("abcba", "abc") == 5, 1); /* Whole string. */
X check(strspn("abcba", "ab") == 2, 2); /* Partial. */
X check(strspn("abc", "qx") == 0, 3); /* None. */
X check(strspn("", "ab") == 0, 4); /* Null string. */
X check(strspn("abc", "") == 0, 5); /* Null search list. */
X
X /*
X * strcspn
X */
X it = "strcspn";
X check(strcspn("abcba", "qx") == 5, 1); /* Whole string. */
X check(strcspn("abcba", "cx") == 2, 2); /* Partial. */
X check(strcspn("abc", "abc") == 0, 3); /* None. */
X check(strcspn("", "ab") == 0, 4); /* Null string. */
X check(strcspn("abc", "") == 3, 5); /* Null search list. */
X
X /*
X * strtok - the hard one
X */
X it = "strtok";
X (void) strcpy(one, "first, second, third");
X equal(strtok(one, ", "), "first", 1); /* Basic test. */
X equal(one, "first", 2);
X equal(strtok((char *)NULL, ", "), "second", 3);
X equal(strtok((char *)NULL, ", "), "third", 4);
X check(strtok((char *)NULL, ", ") == NULL, 5);
X (void) strcpy(one, ", first, ");
X equal(strtok(one, ", "), "first", 6); /* Extra delims, 1 tok. */
X check(strtok((char *)NULL, ", ") == NULL, 7);
X (void) strcpy(one, "1a, 1b; 2a, 2b");
X equal(strtok(one, ", "), "1a", 8); /* Changing delim lists. */
X equal(strtok((char *)NULL, "; "), "1b", 9);
X equal(strtok((char *)NULL, ", "), "2a", 10);
X (void) strcpy(two, "x-y");
X equal(strtok(two, "-"), "x", 11); /* New string before done. */
X equal(strtok((char *)NULL, "-"), "y", 12);
X check(strtok((char *)NULL, "-") == NULL, 13);
X (void) strcpy(one, "a,b, c,, ,d");
X equal(strtok(one, ", "), "a", 14); /* Different separators. */
X equal(strtok((char *)NULL, ", "), "b", 15);
X equal(strtok((char *)NULL, " ,"), "c", 16); /* Permute list too. */
X equal(strtok((char *)NULL, " ,"), "d", 17);
X check(strtok((char *)NULL, ", ") == NULL, 18);
X check(strtok((char *)NULL, ", ") == NULL, 19); /* Persistence. */
X (void) strcpy(one, ", ");
X check(strtok(one, ", ") == NULL, 20); /* No tokens. */
X (void) strcpy(one, "");
X check(strtok(one, ", ") == NULL, 21); /* Empty string. */
X (void) strcpy(one, "abc");
X equal(strtok(one, ", "), "abc", 22); /* No delimiters. */
X check(strtok((char *)NULL, ", ") == NULL, 23);
X (void) strcpy(one, "abc");
X equal(strtok(one, ""), "abc", 24); /* Empty delimiter list. */
X check(strtok((char *)NULL, "") == NULL, 25);
X (void) strcpy(one, "abcdefgh");
X (void) strcpy(one, "a,b,c");
X equal(strtok(one, ","), "a", 26); /* Basics again... */
X equal(strtok((char *)NULL, ","), "b", 27);
X equal(strtok((char *)NULL, ","), "c", 28);
X check(strtok((char *)NULL, ",") == NULL, 29);
X equal(one+6, "gh", 30); /* Stomped past end? */
X equal(one, "a", 31); /* Stomped old tokens? */
X equal(one+2, "b", 32);
X equal(one+4, "c", 33);
X
X /*
X * memcmp
X */
X it = "memcmp";
X check(memcmp("a", "a", 1) == 0, 1); /* Identity. */
X check(memcmp("abc", "abc", 3) == 0, 2); /* Multicharacter. */
X check(memcmp("abcd", "abce", 4) < 0, 3); /* Honestly unequal. */
X check(memcmp("abce", "abcd", 4) > 0, 4);
X check(memcmp("alph", "beta", 4) < 0, 5);
X if (charsigned) /* Sign-bit comparison. */
X check(memcmp("a\203", "a\003", 2) < 0, 6);
X else
X check(memcmp("a\203", "a\003", 2) > 0, 6);
X check(memcmp("abce", "abcd", 3) == 0, 7); /* Count limited. */
X check(memcmp("abc", "def", 0) == 0, 8); /* Zero count. */
X
X /*
X * memchr
X */
X it = "memchr";
X check(memchr("abcd", 'z', 4) == NULL, 1); /* Not found. */
X (void) strcpy(one, "abcd");
X check(memchr(one, 'c', 4) == one+2, 2); /* Basic test. */
X check(memchr(one, 'd', 4) == one+3, 3); /* End of string. */
X check(memchr(one, 'a', 4) == one, 4); /* Beginning. */
X check(memchr(one, '\0', 5) == one+4, 5); /* Finding NUL. */
X (void) strcpy(one, "ababa");
X check(memchr(one, 'b', 5) == one+1, 6); /* Finding first. */
X check(memchr(one, 'b', 0) == NULL, 7); /* Zero count. */
X check(memchr(one, 'a', 1) == one, 8); /* Singleton case. */
X (void) strcpy(one, "a\203b");
X check(memchr(one, 0203, 3) == one+1, 9); /* Unsignedness. */
X
X /*
X * memcpy
X *
X * Note that X3J11 says memcpy must work regardless of overlap.
X * The SVID says it might fail.
X */
X it = "memcpy";
X check(memcpy(one, "abc", 4) == one, 1); /* Returned value. */
X equal(one, "abc", 2); /* Did the copy go right? */
X
X (void) strcpy(one, "abcdefgh");
X (void) memcpy(one+1, "xyz", 2);
X equal(one, "axydefgh", 3); /* Basic test. */
X
X (void) strcpy(one, "abc");
X (void) memcpy(one, "xyz", 0);
X equal(one, "abc", 4); /* Zero-length copy. */
X
X (void) strcpy(one, "hi there");
X (void) strcpy(two, "foo");
X (void) memcpy(two, one, 9);
X equal(two, "hi there", 5); /* Just paranoia. */
X equal(one, "hi there", 6); /* Stomped on source? */
X
X (void) strcpy(one, "abcdefgh");
X (void) memcpy(one+1, one, 9);
X equal(one, "aabcdefgh", 7); /* Overlap, right-to-left. */
X
X (void) strcpy(one, "abcdefgh");
X (void) memcpy(one+1, one+2, 7);
X equal(one, "acdefgh", 8); /* Overlap, left-to-right. */
X
X (void) strcpy(one, "abcdefgh");
X (void) memcpy(one, one, 9);
X equal(one, "abcdefgh", 9); /* 100% overlap. */
X
X /*
X * memccpy - first test like memcpy, then the search part
X *
X * The SVID, the only place where memccpy is mentioned, says
X * overlap might fail, so we don't try it. Besides, it's hard
X * to see the rationale for a non-left-to-right memccpy.
X */
X it = "memccpy";
X check(memccpy(one, "abc", 'q', 4) == NULL, 1); /* Returned value. */
X equal(one, "abc", 2); /* Did the copy go right? */
X
X (void) strcpy(one, "abcdefgh");
X (void) memccpy(one+1, "xyz", 'q', 2);
X equal(one, "axydefgh", 3); /* Basic test. */
X
X (void) strcpy(one, "abc");
X (void) memccpy(one, "xyz", 'q', 0);
X equal(one, "abc", 4); /* Zero-length copy. */
X
X (void) strcpy(one, "hi there");
X (void) strcpy(two, "foo");
X (void) memccpy(two, one, 'q', 9);
X equal(two, "hi there", 5); /* Just paranoia. */
X equal(one, "hi there", 6); /* Stomped on source? */
X
X (void) strcpy(one, "abcdefgh");
X (void) strcpy(two, "horsefeathers");
X check(memccpy(two, one, 'f', 9) == two+6, 7); /* Returned value. */
X equal(one, "abcdefgh", 8); /* Source intact? */
X equal(two, "abcdefeathers", 9); /* Copy correct? */
X
X (void) strcpy(one, "abcd");
X (void) strcpy(two, "bumblebee");
X check(memccpy(two, one, 'a', 4) == two+1, 10); /* First char. */
X equal(two, "aumblebee", 11);
X check(memccpy(two, one, 'd', 4) == two+4, 12); /* Last char. */
X equal(two, "abcdlebee", 13);
X (void) strcpy(one, "xyz");
X check(memccpy(two, one, 'x', 1) == two+1, 14); /* Singleton. */
X equal(two, "xbcdlebee", 15);
X
X /*
X * memset
X */
X it = "memset";
X (void) strcpy(one, "abcdefgh");
X check(memset(one+1, 'x', 3) == one+1, 1); /* Return value. */
X equal(one, "axxxefgh", 2); /* Basic test. */
X
X (void) memset(one+2, 'y', 0);
X equal(one, "axxxefgh", 3); /* Zero-length set. */
X
X (void) memset(one+5, 0, 1);
X equal(one, "axxxe", 4); /* Zero fill. */
X equal(one+6, "gh", 5); /* And the leftover. */
X
X (void) memset(one+2, 010045, 1);
X equal(one, "ax\045xe", 6); /* Unsigned char convert. */
X
X /*
X * bcopy - much like memcpy
X *
X * Berklix manual is silent about overlap, so don't test it.
X */
X it = "bcopy";
X (void) bcopy("abc", one, 4);
X equal(one, "abc", 1); /* Simple copy. */
X
X (void) strcpy(one, "abcdefgh");
X (void) bcopy("xyz", one+1, 2);
X equal(one, "axydefgh", 2); /* Basic test. */
X
X (void) strcpy(one, "abc");
X (void) bcopy("xyz", one, 0);
X equal(one, "abc", 3); /* Zero-length copy. */
X
X (void) strcpy(one, "hi there");
X (void) strcpy(two, "foo");
X (void) bcopy(one, two, 9);
X equal(two, "hi there", 4); /* Just paranoia. */
X equal(one, "hi there", 5); /* Stomped on source? */
X
X /*
X * bzero
X */
X it = "bzero";
X (void) strcpy(one, "abcdef");
X bzero(one+2, 2);
X equal(one, "ab", 1); /* Basic test. */
X equal(one+3, "", 2);
X equal(one+4, "ef", 3);
X
X (void) strcpy(one, "abcdef");
X bzero(one+2, 0);
X equal(one, "abcdef", 4); /* Zero-length copy. */
X
X /*
X * bcmp - somewhat like memcmp
X */
X it = "bcmp";
X check(bcmp("a", "a", 1) == 0, 1); /* Identity. */
X check(bcmp("abc", "abc", 3) == 0, 2); /* Multicharacter. */
X check(bcmp("abcd", "abce", 4) != 0, 3); /* Honestly unequal. */
X check(bcmp("abce", "abcd", 4) != 0, 4);
X check(bcmp("alph", "beta", 4) != 0, 5);
X check(bcmp("abce", "abcd", 3) == 0, 6); /* Count limited. */
X check(bcmp("abc", "def", 0) == 0, 8); /* Zero count. */
X
X#ifdef ERR
X /*
X * strerror - VERY system-dependent
X */
X it = "strerror";
X f = open("/", 1); /* Should always fail. */
X check(f < 0 && errno > 0 && errno < sys_nerr, 1);
X equal(strerror(errno), sys_errlist[errno], 2);
X#ifdef UNIXERR
X equal(strerror(errno), "Is a directory", 3);
X#endif
X#ifdef BERKERR
X equal(strerror(errno), "Permission denied", 3);
X#endif
X#endif
X}
END_OF_FILE
if test 20192 -ne `wc -c <'dmake/dbug/malloc/testmem.c'`; then
echo shar: \"'dmake/dbug/malloc/testmem.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/testmem.c'
fi
echo shar: End of archive 5 \(of 27\).
cp /dev/null ark5isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/readme/release dmake/rulparse.c
# dmake/unix/coherent/vfprintf.c
# Wrapped by kent@sparky on Fri Oct 21 16:50:33 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 6 (of 27)."'
if test -f 'dmake/readme/release' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/release'\"
else
echo shar: Extracting \"'dmake/readme/release'\" \(17328 characters\)
sed "s/^X//" >'dmake/readme/release' <<'END_OF_FILE'
Xdmake Version 4.0
X=================
XFULL RELEASE OF DMAKE, REPLACES VERSIONS 3.8, and 3.9 (never posted)
X
XNature: This distribution advances dmake to Version 4.0, patch level 0.
X------- The release is an attempt at addressing obscure faults in dmake
X and at providing some much needed new functionality. See below
X for details of enhancements and bug fixes.
X
X NOTE: There is one minor syntactic change to the makefile format
X See the Section "FUTURE FEATURES" below and insure that you do
X not rely on the previous semantic meaning of the construct
X whose meaning has changed.
X
XAvailability:
X-------------
X dmake is available via anonymous ftp from plg.uwaterloo.ca as:
X
X pub/dmake/dmake38.tar.gz - compressed tar archive
X pub/dmake/dmake38.zip - zip archive
X pub/dmake/dmake38-msdos-exe.zip - MSDOS executable zip archive
X pub/dmake/dmake38.shar01 - xx part shar archive
X ... (get all parts)
X pub/dmake/dmake38.sharxx
X
X and comes in several archive formats. Choose the one that best
X suits your needs.
X
X
XDONATIONS TOWARDS REFERENCE MANUAL:
X-----------------------------------
X I'm happy to announce that a new project has begun to create a
X dmake reference manual and user guide. This is being done using the
X services of a technical writer. The project's success depends to a
X large degree on support that I receive from the NET community. I have
X carefuly considered how to approach this issue and have decided to
X NOT change the status of dmake to 'shareware', but have rather decided
X to ask for voluntary donations.
X
X If you find dmake useful to your endeavours then I would appreciate
X a donation in support of the documentation project. The suggested
X donations are:
X
X $20 - if you are a private non-commercial user.
X $50 - if you are a commercial or corporate user and
X use dmake in support of your software development
X efforts.
X
X I promise to accurately track donors and will insure them first
X access to the reference manual when it is ready, which at this time
X is estimated to be the start of the second quarter in 95.
X
X If you want to support this effort then please send a cheque or money
X order in a suitable (to you), amount made out to:
X
X Dennis Vadura
X Dept. of Computer Science
X University of Waterloo
X Waterloo, Ont.
X Canada, N2L 3G1
X
X Your support will be greatly appreciated.
X
X
X
XDETAILS OF ENHANCEMENTS/TWEAKS:
X===============================
X
XBUG FIXES:
X----------
X- cleaned up the code to fully remove the notion of an initial .SETDIR target
X and macro, had some remnants still present.
X
X- If the first target in a file was a multi :: recipe then if any of the
X :: rules had no recipes an erroneous error was issued. This is now fixed and
X all of the :: targets behave in a manner consistent with non-:: targets that
X appear as the first target in the makefile.
X
X- Fixed a bug with not properly setting the value of MAKESTARTUP if it was
X given on the command line.
X
X- Specifying -u would not remove inferred prerequisites, they are now forcefully
X rebuilt and then removed if appropriate.
X
X- $ (xx) now expands to just (xx), the $ is eaten.
X
X- fixed a bug with erroneously freeing a directory string for a target.
X
X- Under MSDOS the value of DirSepStr is now used to construct temporary file
X names when $(mktmp ...) is called. TMPDIR is still taken from the
X environment only since this is what the standard UNIX versions of tempnam do.
X
X- Cleaned up -k processing in conjuction with -P#, it now behaves as expected.
X
X- under MSDOS/and related OS's surrounded the call to exec in spawn.c with
X a getcwd/setcwd pair, this way we will be cd'ed to the same place we were
X at before we ran the command. DOS is broken this way. This makes DOS scripts
X behave more like UNIX scripts. If you really want to say:
X
X cd foo
X commands...
X
X Then you will have to use a group recipe, you can do that easier by specifying
X the new .GROUP attribute.
X
X- Fixed incompatibility with Augmake special target mapping, causing
X
X $(foo:suff1=suff2)
X
X to behave oddly. It now behaves as Sun and GNU Make do. Also suff1,
X and suff2 can now be arbitrary strings not containing an '=' character.
X Both are expanded before the substitution is performed.
X
X- Macro expansion treated ':' as a modifier flag even in function macros.
X
X- Fixed a small bug when parsing makefiles containing #'s in their recipe
X texts and when -B was specified, things now work as expected.
X
X- The inference engine was incorrectly using the value of PREP, fixed.
X
X- Fixed the expansion of $(foo)/{x y z}.o to produce
X a/x.o a/y.o a/z.o
X if foo = a, and
X a b/x.o a b/y.o a b/z.o
X if foo = a b and
X a/x.o b/x.o a/y.o b/y.o a/z.o b/z.o
X if the specified expansion is stated as:
X {$(foo)}/{x y z}.o
X
X- Fixed a nasty bug in stat.c where the result of Build_path was not dupped
X when computing a new library path name.
X
X- Modified COMMAND macro expansion to properly handle the expansion of
X commands that result in new recipe line attributes.
X
X- Fixed a "feature" that prevented the correct handling of :: recipes.
X
X a.o :: a.c b.h
X echo "first recipe..."
X touch a.o
X
X a.o :: a.y b.h
X echo "second recipe..."
X
X now runs both recipes if b.h is newer than a.o. It used to run only the
X recipe for a.c. This was contrary to the documentation, and is probably
X not correct in general, in that by definition :: promisses to run all
X recipes that are out of date not just those that are out of date while the
X build continues.
X
X- Fixed a bug with improper output on -n. It now reports work
X that it thinks should get done. The actual make may however do less,
X depending on how timestamps are actually modified during the run.
X
X- Fixed a bug in detecting function macros, the following now works:
X (caused a core dump before)...
X
X bar = a b c
X foo = $(!null,$(bar:s/ /) -Lhithere)
X
X all:; echo $(foo)
X
X Thanks to "Brett M. Bergquist, brett.b...@corp.gdc.com" for pointing
X it out, and for providing the inspiration for the fix..
X
X
XNEW EXTENSIONS:
X---------------
X- added .EXIT special target to exit from parsing a makefile and ignore
X the remainder to the end. If verbose is set then a message is issued.
X
X- Made the macros DIRSEPSTR, and DIRBRKSTR user settable. The default setting
X for the MSDOS version of DIRSEPSTR is now \\, this allows it to correctly
X work for $(mktmp ...) diversions.
X
X- Added two new attributes, and a command line option.
X .GROUP when specified with a target says execute this targets recipe
X as if it were a group recipe specified in [ ... ] notation.
X
X .IGNOREGROUP is an attribute variable that when set to "yes" says
X don't assume that a recipe line beginning with '[' is a group recipe.
X This in effect turns off group recipe parsing at the granularity of
X a single target or globally if specified alone in the makefile.
X
X -g is equivalent to saying .IGNOREGROUP:=yes at the start of startup.mk
X file.
X
X- Path name construction for stat'ed targets has been modified to ignore './'
X entries and to reduce 'foo/..' sequences to NULL. That is, it makes little
X sense to have a path that cd's to a directory and then back up. This may
X result in having the value of $@ be somewhat unexpected depending on
X settings of .SOURCE and their friends. However this is infact the correct
X behaviour since the resolved pathname and the target name (as used internally)
X are not the same. dmake treats the resolved pathname as an attribute of the
X target that may infact be different from the target name itself.
X
X- dmake attempts to make targets of .INCLUDE if the name cannot be found in
X any of the subdirectories specified in .INCLUDEDIRS. Specifying .INCLUDE
X .IGNORE causes dmake to not terminate if a prerequisite of .INCLUDE cannot
X be made.
X
X- Added a .FIRST attribute for .INCLUDE special targets. Specifying .FIRST
X on a .INCLUDE line will attempt to include each named prerequisite and will
X halt after finding the first prerequisite that exists. If no prerequisite
X is successfully included and .IGNORE was not specified then an error is
X issued.
X
X- Created new variable .NAMEMAX which when set to an integer value bounds the
X maximum length of a file name component. By default it is set to the
X compiled value NAME_MAX.
X
X- $(shell,expand stuff) is a modification to $(shell ...) that causes the
X result to be expanded before it is returned. if ',expand' is not specified
X then the result is not expanded. The addition of expansion together with
X the new $(assign ...) macro allows external files to be read and to have them
X define macros as a result of the $(shell ...) execution.
X
X
XNEW FEATURES:
X-------------
X- Generalized the expansion of Dynamic prerequisites. Specification of
X $$(foo) as a prerequisite is recursively expanded until the current cell
X contains no $ signs. If the expansion results in multiple white space
X separated tokens they are inserted into the prerequisite list in place of
X the initial dynamic prerequisite. If the new list contains additional
X dynamic prerequisites then they will be expanded when they are processed.
X NOTE: there is a limit on the number of times the same prerequisite can be
X recursively dynamically expanded, it is controlled by the setting of the
X macro DYNAMICNESTINGLEVEL, and is set to 100 by default. Thus the same
X prerequisite can be expanded dynamically a 100 times before dmake gives
X up with an error.
X
X- Added -w and -W (whatif command line flags) and also significantly fixed up
X the processing for -n, to actually produce sensible output.
X
X- Added '!' macro prefix indicating that the macro assignment is to be forced.
X That is, don't complain if the macro has been previously expanded. This can
X be used for single macro assignments:
X
X foo := stuff
X foo !:= silently blow away stuff in foo
X foo !+:= add this silently to previous value of foo
X
X or in conjunction with .SILENT as in:
X
X __.SILENT !:= $(.SILENT)
X change stuff to your hearts content...
X .SILENT !:= $(__.SILENT)
X
X- Added a $(macro:e) extension for returning the suffixes of a file list
X in the macro.
X
X- Added a $(macro:u) and $(macro:l) modifiers for converting the macro value
X to all upper case and lower case respectively.
X
X- Added a $(macro:i) modifier. It returns the inferred names for targets as
X given in a $< macro. For example:
X
X .SOURCE : objs
X OBJS = x.o y.o
X
X all:$(OBJS); echo $(OBJS:i)
X
X will produce
X
X objs/x.o y.o
X
X if x.o is found in the subdirectory 'objs'. The 'i' modifier can be
X mixed with all other modifiers.
X
X
X- Added the .ROOT special target, it is the top level target that dmake builds
X when it starts to build targets. Also all user specified targets, either
X through the command line or by default in the makefile, are made prerequisites
X of the special target .TARGETS. By default dmake sets up the relationship
X that .ROOT depends on .TARGETS, and the world gets made. This allows you
X to customize within the makefile the order of building targets as well as
X which target is made first. For example the default makefiles come with
X settings for .ROOT that specify:
X
X .ROOT .PHONY .NOSTATE .SEQUENTIAL : .INIT .TARGETS .DONE
X
X with .INIT and .DONE defined as:
X
X .INIT .DONE :;
X
X which nicely emulates the behaviour of Sun's make extensions. The building
X of .ROOT's prerequisites is internally always forced to be sequential.
X
X- Added dynamic macro assignment for use in recipes and otherwise.
X $(assign string) parses string as if it were a macro assignment string.
X string must contain a valid macro assignment, otherwise an error is issued.
X
X eg. $(assign foo := fred)
X $(assign $(indirect_macro_name) +:= $(morejunk))
X
X The result of this macro assignment is the name of the macro that was
X assigned, and NULL if the expression is not a valid assignment.
X
X- Added a new macro modifier $(foo:^prefix) where prefix is either a quoted
X string "string" that is prepended to each token found in
X the value of $(foo) or prefix is a macro expression beginning with $, in
X which case prefix is expanded and the result is prepended to each token
X found in $(foo).
X
X- Added a new macro modifier $(foo:+suffix) where suffix is either a quoted
X string "string" that is appended to each token found in
X the value of $(foo) or suffix is a macro expression beginning with $, in
X which case suffix is expanded and the result is appended to each token
X found in $(foo).
X
X- You can now put $$@ into .SETDIR attribute strings, and the name of the
X target to be built is used for the attempted CD. Note that the final
X value of $@ will depend on the result of the stat search which is done
X after the change directory call forced by the .SETDIR attribute.
X
X- Added a new function macro $(nil args) that always returns "", no matter what
X its arguments are.
X
X- Added directory caching. It is enabled by default and causes dmake to
X cache the timestamps of entries in a directory the first time the directory
X is visited. Dmake tracks entries and performs actual stats as required
X to collect new timestamps, but does not perform stats on potential targets
X during inference after reading the directory contents the first time.
X
X setting .DIRCACHE=yes enables directory cache, and setting .DIRCACHE=no
X disbles it. It is on by default.
X
X- Added conditional macros.
X
X You can now say the following:
X
X target ?= MacroName MacroOp Value
X
X This creates a definition for MacroName whose value is Value
X only when target is being made. You may use a conditional macro
X assignment anywhere that a regular macro assignment may appear, including
X as the value of a $(assign ...) macro.
X
X The new definition is associated with the most recent cell definition
X for 'target'. If no prior definition exists then one is created. The
X implications of this are immediately evident in the following example:
X
X foo := hello
X
X all : cond;@echo "all done, foo=[$(foo)] bar=[$(bar)]"
X
X cond ?= bar := global decl
X
X cond .SETDIR=unix::;@echo $(foo) $(bar)
X cond ?= foo := hi
X
X cond .SETDIR=msdos::;@echo $(foo) $(bar)
X cond ?= foo := hihi
X
X The first conditional assignment creates a binding for 'bar' that is
X activated when 'cond' is made. The bindings following the :: definitions
X are activated when their respective recipe rules are built. Thus the
X first binding serves to provide a global value for 'bar' while any of the
X cond :: rules are processed, and the local bindings for 'foo' come into
X effect when their associated :: rule is processed.
X
X Conditionals for targets of .UPDATEALL are all activated before the
X target group is made. Assignments are processed in order. Note that
X the value of a conditional macro assignment is NOT AVAILABLE until the
X associated target is made, thus the construct
X
X mytarget ?= bar := hello
X mytarget ?= foo := $(bar)
X
X results in $(foo) expanding to "", if you want the result to be "hello"
X you must use:
X
X mytarget ?= bar := hello
X mytarget ?= foo = $(bar)
X
X Once a target is made any associated conditional macros are deactivated
X and their values are no longer available. Activation occurrs after all
X inference, and .SETDIR directives have been processed and after $@ is
X assigned, but before prerequisites are processed; thereby making the set
X conditional macro values available during construction of prerequisites.
X
X If a %-meta rule target has associated conditional macro assignments,
X and the rule is chosen by the inference algorithm then the conditional
X macro assignments are inferred together with the associated recipe.
X
X- Enhanced the processing of .UPDATEALL, the following constructs are now
X allowed:
X
X a b .UPDATEALL : c
X
X a b .UPDATEALL :: d
X
X A .UPDATEALL causes all targets on the left to be treated as a single target
X all are updated whenever any one of them is made. As a sideffect, such
X targets are sorted in ascending alphabetical order, when any one of the
X group is constructed the value of $@ is the one that is first in the sorted
X set.
X
X
XFUTURE FEATURES:
X----------------
XIn the future the functionality of .UPDATEALL will be extended to %-meta
Xrules as will the ability to infer multiple prerequisites. Thereby allowing
Xinference of multiple targets from multiple prerequisites. In preparation
Xfor this functionality the following change was made to the parser.
X
X %.o : %.c %.f ; recipe
X
X used to be equivalent to:
X
X %.o : %.c ; recipe
X %.o : %.f ; recipe
X
X It now means defaults to:
X
X %.o : %.c ; recipe
X
X you must specify:
X
X %.o :| %.c %.f ; recipe
X
X to get the old behaviour. This is due to the fact that construction of
X the internal target graph has been been altered but the inference engine
X has not yet been updated to utilize the new functionality (I ran out of
X time).
X
X
XACKNOWLEDGEMENTS:
X=================
X Thanks to all who submitted code for new features, suggestions for
X improvements, and bug fixes. I have tried to make sure no gotchas
X remain, if you encounter problems installing or running dmake please
X let me know. As always, I am always happy to receive e-mail.
X
X Many have contributed suggestions and bug fixes that make this
X release possible. The NET thanks you.
END_OF_FILE
if test 17328 -ne `wc -c <'dmake/readme/release'`; then
echo shar: \"'dmake/readme/release'\" unpacked with wrong size!
fi
# end of 'dmake/readme/release'
fi
if test -f 'dmake/rulparse.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/rulparse.c'\"
else
echo shar: Extracting \"'dmake/rulparse.c'\" \(43230 characters\)
sed "s/^X//" >'dmake/rulparse.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/rulparse.c,v 1.1 1994/10/06 17:42:00 dvadura Exp $
X-- SYNOPSIS -- perform semantic analysis on input
X--
X-- DESCRIPTION
X-- This code performs semantic analysis on the input, and builds
X-- the complex internal datastructure that is used to represent
X-- the user makefile.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: rulparse.c,v $
X * Revision 1.1 1994/10/06 17:42:00 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X/* prototypes for local functions */
Xstatic void _add_global_prereq ANSI((CELLPTR));
Xstatic int _add_root ANSI((CELLPTR));
Xstatic CELLPTR _build_graph ANSI((int, CELLPTR, CELLPTR));
Xstatic char* _build_meta ANSI((char*));
Xstatic int _do_magic ANSI((int, char*, CELLPTR, CELLPTR, t_attr, char*));
Xstatic void _do_special ANSI((int, int, t_attr,char*,CELLPTR,CELLPTR,int*));
Xstatic int _do_targets ANSI((int, t_attr, char*, CELLPTR, CELLPTR));
Xstatic t_attr _is_attribute ANSI((char*));
Xstatic int _is_special ANSI((char*));
Xstatic char* _is_magic ANSI((char*));
Xstatic int _is_percent ANSI((char*));
Xstatic CELLPTR _make_multi ANSI((CELLPTR));
Xstatic CELLPTR _replace_cell ANSI((CELLPTR,CELLPTR,CELLPTR));
Xstatic void _set_attributes ANSI((t_attr, char*, CELLPTR ));
Xstatic void _stick_at_head ANSI((CELLPTR, CELLPTR));
Xstatic void _set_global_attr ANSI((t_attr));
X
X
X/* static variables that must persist across invocation of Parse_rule_def */
Xstatic CELLPTR _sv_targets = NIL(CELL);
Xstatic STRINGPTR _sv_rules = NIL(STRING);
Xstatic STRINGPTR _sv_crule = NIL(STRING);
Xstatic CELLPTR _sv_edgel = NIL(CELL);
Xstatic LINKPTR _sv_glb_prq = NIL(LINK);
Xstatic int _sp_target = FALSE;
Xstatic t_attr _sv_attr;
Xstatic int _sv_flag;
Xstatic int _sv_op;
Xstatic char *_sv_setdir;
Xstatic char _sv_globprq_only = 0;
X
X/* Define for global attribute mask */
X#define A_GLOB (A_PRECIOUS | A_SILENT | A_IGNORE | A_EPILOG | A_SWAP |\
X A_SHELL | A_PROLOG | A_NOINFER | A_SEQ | A_MKSARGS )
X
X
XPUBLIC int
XParse_rule_def( state )/*
X=========================
X Parse the rule definition contained in Buffer, and modify the state
X if appropriate. The function returns 0, if the definition is found to
X be an illegal rule definition, and it returns 1 if it is a rule definition.
X */
Xint *state;
X{
X TKSTR input; /* input string struct for token search */
X CELLPTR targets; /* list of targets if any */
X CELLPTR prereq; /* list of prereq if any */
X CELLPTR prereqtail; /* tail of prerequisite list */
X CELLPTR cp; /* temporary cell pointer for list making */
X char *result; /* temporary storage for result */
X char *tok; /* temporary pointer for tokens */
X char *set_dir; /* value of setdir attribute */
X char *brk; /* break char list for Get_token */
X char *firstrcp; /* first recipe line, from ; in rule line */
X t_attr attr; /* sum of attribute flags for current tgts*/
X t_attr at; /* temp place to keep an attribute code */
X int op; /* rule operator */
X int special; /* indicate special targets in rule */
X int percent; /* indicate percent rule target */
X int mixed_glob_prq; /* indicate mixed %-rule prereq possible */
X
X DB_ENTER( "Parse_rule_def" );
X
X op = 0;
X attr = 0;
X special = 0;
X percent = 0;
X set_dir = NIL( char );
X targets = NIL(CELL);
X prereq = NIL(CELL);
X prereqtail = NIL(CELL);
X mixed_glob_prq = 0;
X
X /* Check to see if the line is of the form:
X * targets : prerequisites; first recipe line
X * If so remember the first_recipe part of the line. */
X
X firstrcp = strchr( Buffer, ';' );
X if( firstrcp != NIL( char ) ) {
X *firstrcp++ = 0;
X firstrcp = DmStrSpn( firstrcp, " \t" );
X }
X
X result = Expand( Buffer );
X for( brk=strchr(result,'\\'); brk != NIL(char); brk=strchr(brk,'\\') )
X if( brk[1] == '\n' )
X *brk = ' ';
X else
X brk++;
X
X DB_PRINT( "par", ("Scanning: [%s]", result) );
X
X SET_TOKEN( &input, result );
X brk = ":-^!|";
X Def_targets = TRUE;
X
X /* Scan the input rule line collecting targets, the operator, and any
X * prerequisites. Stop when we run out of targets and prerequisites. */
X
X while( *(tok = Get_token( &input, brk, TRUE )) != '\0' )
X if( !op ) {
X /* we are scanning targets and attributes
X * check to see if token is an operator. */
X
X op = Rule_op( tok );
X
X if( !op ) {
X /* define a new cell, or get old cell */
X cp = Def_cell( tok );
X DB_PRINT( "par", ("tg_cell [%s]", tok) );
X
X if( (at = _is_attribute(tok)) != 0 ) {
X /* Logically OR the attributes specified into one main
X * ATTRIBUTE mask. */
X
X if( at == A_SETDIR )
X if( set_dir != NIL( char ) )
X Warning( "Multiple .SETDIR attribute ignored" );
X else
X set_dir = DmStrDup( tok );
X
X attr |= at;
X }
X else {
X int tmp;
X
X tmp = _is_special( tok );
X if( _is_percent( tok ) ) percent++;
X
X if( percent )
X cp->ce_flag |= F_PERCENT;
X
X if( special )
X Fatal( "Special target must appear alone", tok );
X else if( !(cp->ce_flag & F_MARK) ) {
X /* Targets are kept in this list in lexically sorted order.
X * This allows for easy equality comparison of target
X * sets.*/
X CELLPTR prev,cur;
X for(prev=NIL(CELL),cur=targets;cur;prev=cur,cur=cur->ce_link)
X if(strcmp(cur->CE_NAME,cp->CE_NAME) > 0)
X break;
X
X cp->ce_link = cur;
X
X if (!prev)
X targets = cp;
X else
X prev->ce_link = cp;
X
X cp->ce_flag |= F_MARK | F_EXPLICIT;
X special = tmp;
X }
X else if( !(cp->ce_attr & A_LIBRARY) )
X Warning("Duplicate entry [%s] in target list",cp->CE_NAME);
X }
X }
X else {
X /* found an operator so empty out break list
X * and clear mark bits on target list, setting them all to F_USED*/
X
X brk = "";
X for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) {
X cp->ce_flag ^= F_MARK;
X cp->ce_flag |= F_USED;
X }
X
X Def_targets = FALSE;
X }
X }
X else {
X /* Scanning prerequisites so build the prerequisite list. We use
X * F_MARK flag to make certain we have only a single copy of the
X * prerequisite in the list */
X
X cp = Def_cell( tok );
X
X if( _is_percent( tok ) ) {
X if( !percent && !attr )
X Fatal( "Syntax error in %% rule, missing %% target");
X mixed_glob_prq = 1;
X }
X
X if( cp->ce_flag & F_USED ) {
X if( cp->ce_attr & A_COMPOSITE )
X continue;
X else
X Fatal( "Detected circular dependency in graph at [%s]",
X cp->CE_NAME );
X }
X else if( !(cp->ce_flag & F_MARK) ) {
X DB_PRINT( "par", ("pq_cell [%s]", tok) );
X cp->ce_flag |= F_MARK;
X
X if( prereqtail == NIL(CELL) ) /* keep prereq's in order */
X prereq = cp;
X else
X prereqtail->ce_link = cp;
X
X prereqtail = cp;
X cp->ce_link = NIL(CELL);
X }
X else if( !(cp->ce_attr & A_LIBRARY) )
X Warning("Duplicate entry [%s] in prerequisite list",cp->CE_NAME);
X }
X
X /* Check to see if we have a percent rule that has only global
X * prerequisites. If so then set the flag so that later on, we don't issue
X * an error if such targets supply an empty set of rules. */
X
X if( percent && !mixed_glob_prq && (prereq != NIL(CELL)) )
X _sv_globprq_only = 1;
X
X /* It's ok to have targets with attributes, and no prerequisites, but it's
X * not ok to have no targets and no attributes, or no operator */
X
X if( !op ) {
X CLEAR_TOKEN( &input );
X DB_PRINT( "par", ("Not a rule [%s]", Buffer) );
X DB_RETURN( 0 );
X }
X
X if( !attr && targets == NIL(CELL) ) {
X Fatal( "Missing targets or attributes in rule" );
X if( set_dir != NIL( char )) FREE( set_dir );
X DB_RETURN( 0 );
X }
X
X /* We have established we have a legal rules line, so we must process it.
X * In doing so we must handle any special targets. Special targets must
X * appear alone possibly accompanied by attributes.
X * NOTE: special != 0 ==> targets != NIL(CELL) */
X
X if( prereqtail != NIL(CELL) ) prereqtail->ce_link = NIL(CELL);
X
X /* Clear out MARK bits used in duplicate checking. I originally wanted
X * to do this as the lists get processed but that got too error prone
X * so I bit the bullit and added these two loops. */
X
X for( cp=prereq; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_MARK;
X for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_USED;
X
X /* Check to see if the previous rule line was bound if, not the call
X * Bind_rules_to_targets to go and bind the line */
X
X if( _sv_rules != NIL(STRING) ) Bind_rules_to_targets( F_DEFAULT );
X
X /* Add the first recipe line to the list */
X if( firstrcp != NIL( char ) )
X Add_recipe_to_list( firstrcp, TRUE, FALSE );
X
X /* Save these prior to calling _do_targets, since _build_graph needs the
X * _sv_setdir value for matching edges. */
X _sv_op = op;
X _sv_setdir = set_dir;
X
X if( special )
X _do_special( special, op, attr, set_dir, targets, prereq, state );
X else
X *state = _do_targets( op, attr, set_dir, targets, prereq );
X
X DB_RETURN( 1 );
X}
X
X
XPUBLIC int
XRule_op( op )/*
X================
X Check the passed in op string and map it to one of the rule operators */
Xchar *op;
X{
X int ret = 0;
X
X DB_ENTER( "rule_op" );
X
X if( *op == TGT_DEP_SEP ) {
X ret = R_OP_CL;
X op++;
X
X /* All rule operations begin with a :, but may include any one of the
X * four modifiers. In order for the rule to be properly mapped we must
X * check for each of the modifiers in turn, building up our return bit
X * string. */
X
X while( *op && ret )
X switch( *op ) {
X case ':': ret |= R_OP_DCL; op++; break;
X case '!': ret |= R_OP_BG; op++; break;
X case '^': ret |= R_OP_UP; op++; break;
X case '-': ret |= R_OP_MI; op++; break;
X case '|': ret |= R_OP_OR; op++; break;
X
X default : ret = 0; /* an invalid modifier, chuck whole string */
X }
X
X if( *op != '\0' ) ret = 0;
X }
X
X DB_RETURN( ret );
X}
X
X
XPUBLIC void
XAdd_recipe_to_list( rule, white_too, no_check )/*
X=================================================
X Take the provided string and add it to the list of recipe lines
X we are saving to be added to the list of targets we have built
X previously. If white_too == TRUE add the rule EVEN IF it contains only
X whitespace. */
Xchar *rule;
Xint white_too;
Xint no_check;
X{
X DB_ENTER( "Add_recipe_to_list" );
X
X if( rule != NIL( char ) && (*rule != '\0' || white_too) ) {
X DB_PRINT( "par", ("Adding recipe [%s]", rule) );
X _sv_crule = Def_recipe( rule, _sv_crule, white_too, no_check );
X
X if( _sv_rules == NIL(STRING) )
X _sv_rules = _sv_crule;
X }
X
X DB_VOID_RETURN;
X}
X
X
XPUBLIC void
XBind_rules_to_targets( flag )/*
X===============================
X Take the rules we have defined and bind them with proper attributes
X to the targets that were previously defined in the parse. The
X attributes that get passed here are merged with those that are were
X previously defined. (namely F_SINGLE) */
Xint flag;
X{
X CELLPTR tg; /* pointer to current target in list */
X LINKPTR lp; /* pointer to link cell */
X int magic; /* TRUE if target is .xxx.yyy form */
X int tflag; /* TRUE if we assigned targets here */
X
X DB_ENTER( "Bind_rules_to_targets" );
X
X /* This line is needed since Parse may call us twice when the last
X * GROUP rule appears at the end of file. In this case the rules
X * have already been bound and we want to ignore them. */
X
X if( _sv_targets == NIL(CELL) ) { DB_VOID_RETURN; }
X
X tflag = FALSE;
X flag |= (_sv_flag & F_SINGLE);
X flag |= ((_sv_attr & A_GROUP) ? F_GROUP : 0);
X
X for( tg = _sv_targets; tg != NIL(CELL); tg = tg->ce_link ) {
X DB_PRINT( "par", ("Binding to %s, %04x", tg->CE_NAME, tg->ce_flag) );
X magic = tg->ce_flag & F_PERCENT;
X
X#if 0
X /* Check to see if we had a rule of the form '%.o : a.h b.h ; xxx'
X * In which case we must build a NULL prq node to hold the recipe */
X if( _sv_globprq_only && (_sv_rules != NIL(STRING)) )
X _build_graph( _sv_op, tg, NIL(CELL) );
X#endif
X
X /* NOTE: For targets that are magic we ignore any previously defined
X * rules. ie. We throw away the old definition and use the new.*/
X if( !(tg->ce_flag & F_MULTI) && !magic && (tg->CE_RECIPE != NIL(STRING))
X && !_sp_target && (_sv_rules != NIL(STRING)) )
X Fatal( "Multiply defined recipe for target %s", tg->CE_NAME );
X
X if( (magic || _sp_target) && (_sv_rules == NIL(STRING)) &&
X !(tg->ce_flag & F_SPECIAL) && !_sv_globprq_only )
X Warning( "Empty recipe for special target %s", tg->CE_NAME );
X
X if( magic ) {
X CELLPTR ep;
X
X for( ep=_sv_edgel; ep != NIL(CELL); ep=ep->ce_link ) {
X _set_attributes( _sv_attr, _sv_setdir, ep );
X ep->ce_flag |= (F_TARGET|flag);
X
X if( _sv_rules != NIL(STRING) ) {
X ep->ce_recipe = _sv_rules;
X ep->ce_indprq = _sv_glb_prq;
X }
X }
X }
X else {
X tg->ce_attr |= _sv_attr;
X tg->ce_flag |= flag;
X
X if( _sv_rules != NIL(STRING) ) {
X tg->ce_recipe = _sv_rules;
X tg->ce_flag |= F_RULES | F_TARGET;
X
X /* Bind the current set of prerequisites as belonging to the
X * original recipe given for the target */
X for( lp=tg->ce_prq; lp != NIL(LINK); lp = lp->cl_next )
X if( !(lp->cl_flag & F_USED) ) lp->cl_flag |= F_TARGET;
X }
X else for( lp=tg->ce_prq; lp != NIL(LINK); lp = lp->cl_next )
X lp->cl_flag |= F_USED;
X }
X
X tflag |= _add_root(tg);
X }
X
X if( tflag ) Target = TRUE;
X if( _sv_setdir ) FREE(_sv_setdir);
X _sv_rules = NIL(STRING);
X _sv_crule = NIL(STRING);
X _sv_targets = NIL(CELL);
X _sv_glb_prq = NIL(LINK);
X _sv_edgel = NIL(CELL);
X _sp_target = FALSE;
X _sv_globprq_only = 0;
X
X DB_VOID_RETURN;
X}
X
X
X
XPUBLIC int
XSet_group_attributes( list )/*
X==============================
X Scan list looking for the standard @ and - (as in recipe line defs)
X and set the flags accordingly so that they apply when we bind the
X rules to the appropriate targets. */
Xchar *list;
X{
X int res = FALSE;
X
X if ( !((_sv_attr|Glob_attr)&A_IGNOREGROUP) ) {
X res = (*DmStrSpn(list,"@-%+ \t") == '[');
X if( res ) _sv_attr |= Rcp_attribute(list);
X }
X
X return(res);
X}
X
X
Xstatic void
X_do_special( special, op, attr, set_dir, target, prereq, state )/*
X==================================================================
X Process a special target. So far the only special targets we have
X are those recognized by the _is_special function.
X
X target is always only a single special target.
X
X NOTE: For the cases of .IMPORT, and .INCLUDE, the cells created by the
X parser are never freed. This is due to the fact that it is too much
X trouble to get them out of the hash table once they are defined, and
X if they are per chance used again it will be ok, anyway, since the
X cell is not really used by the code below. */
X
Xint special;
Xint op;
Xt_attr attr;
Xchar *set_dir;
XCELLPTR target;
XCELLPTR prereq;
Xint *state;
X{
X HASHPTR hp; /* pointer to macro def cell */
X CELLPTR cp; /* temporary pointer into cells list */
X CELLPTR dp; /* pointer to directory dir cell */
X LINKPTR lp; /* pointer at prerequisite list */
X char *dir; /* current dir to prepend */
X char *path; /* resulting path to try to read */
X char *name; /* File name for processing a .INCLUDE */
X char *tmp; /* temporary string pointer */
X FILE *fil; /* File descriptor returned by Openfile */
X
X DB_ENTER( "_do_special" );
X
X target->ce_flag = F_SPECIAL; /* mark the target as special */
X
X switch( special ) {
X case ST_EXPORT:
X for( ; prereq != NIL(CELL); prereq = prereq->ce_link ) {
X DB_PRINT( "par", ("Exporting [%s]", prereq->CE_NAME) );
X hp = GET_MACRO( prereq->CE_NAME );
X
X if( hp != NIL(HASH) ) {
X char *tmpstr = hp->ht_value;
X
X if( tmpstr == NIL(char) ) tmpstr = "";
X
X if( Write_env_string( prereq->CE_NAME, tmpstr ) != 0 )
X Warning( "Could not export %s", prereq->CE_NAME );
X }
X }
X break;
X
X /* Simply cause the parser to fail on the next input read */
X case ST_EXIT:
X Skip_to_eof = TRUE;
X break;
X
X case ST_IMPORT:
X for( ; prereq != NIL(CELL); prereq = prereq->ce_link ) {
X char *tmpstr;
X
X DB_PRINT( "par", ("Importing [%s]", prereq->CE_NAME) );
X
X if( strcmp(prereq->CE_NAME, ".EVERYTHING") == 0 ) {
X t_attr sattr = Glob_attr;
X Glob_attr |= A_SILENT;
X
X ReadEnvironment();
X
X Glob_attr = sattr;
X }
X else {
X tmpstr = Read_env_string( prereq->CE_NAME );
X
X if( tmpstr != NIL(char) )
X Def_macro( prereq->CE_NAME,tmpstr,M_EXPANDED | M_LITERAL);
X else
X if( !((Glob_attr | attr) & A_IGNORE) )
X Fatal("Imported macro `%s' not found",prereq->CE_NAME);
X }
X }
X
X attr &= ~A_IGNORE;
X break;
X
X case ST_INCLUDE:
X {
X int pushed = FALSE;
X int first = (attr & A_FIRST);
X int ignore = (((Glob_attr | attr) & A_IGNORE) != 0);
X int found = FALSE;
X LINKPTR prqlnk = NIL(LINK);
X LINKPTR prqlst = NIL(LINK);
X
X if( prereq == NIL(CELL) ) Fatal( "No .INCLUDE file(s) specified" );
X
X dp = Def_cell( ".INCLUDEDIRS" );
X
X if( (attr & A_SETDIR) && *(dir = strchr(set_dir, '=')+1) )
X pushed = Push_dir( dir, ".INCLUDE", ignore );
X
X for( cp=prereq; cp != NIL(CELL); cp = cp->ce_link ) {
X LINKPTR ltmp;
X TALLOC(ltmp, 1, LINK);
X ltmp->cl_prq = cp;
X
X if( prqlnk == NIL(LINK) )
X prqlst = ltmp;
X else
X prqlnk->cl_next = ltmp;
X
X prqlnk = ltmp;
X }
X
X for( ; prqlst != NIL(LINK); FREE(prqlst), prqlst=prqlnk ) {
X prqlnk = prqlst->cl_next;
X cp = prqlst->cl_prq;
X name = cp->CE_NAME;
X
X /* Leave this here, it ensures that prqlst gets propely free'd */
X if ( first && found )
X continue;
X
X if( *name == '<' ) {
X /* We have a file name enclosed in <....>
X * so get rid of the <> arround the file name */
X
X name++;
X if( (tmp = strrchr( name, '>' )) != NIL( char ) )
X *tmp = 0;
X
X if( If_root_path( name ) )
X fil = Openfile( name, FALSE, FALSE );
X else
X fil = NIL(FILE);
X }
X else
X fil = Openfile( name, FALSE, FALSE );
X
X if( fil == NIL(FILE) ) { /*if true ==> not found in current dir*/
X
X /* Now we must scan the list of prerequisites for .INCLUDEDIRS
X * looking for the file in each of the specified directories.
X * if we don't find it then we issue an error. The error
X * message is suppressed if the .IGNORE attribute of attr is
X * set. If a file is found we call Parse on the file to
X * perform the parse and then continue on from where we left
X * off. */
X
X for(lp=dp->CE_PRQ; lp && fil == NIL(FILE); lp=lp->cl_next) {
X dir = lp->cl_prq->CE_NAME;
X if( strchr(dir, '$') ) dir = Expand(dir);
X path = Build_path( dir, name );
X
X DB_PRINT( "par", ("Trying to include [%s]", path) );
X
X fil = Openfile( path, FALSE, FALSE );
X if( dir != lp->cl_prq->CE_NAME ) FREE(dir);
X }
X }
X
X if ( fil == NIL(FILE) ) {
X t_attr glob = Glob_attr;
X t_attr cattr = prqlst->cl_prq->ce_attr;
X
X prqlst->cl_next = NIL(LINK);
X Glob_attr |= ((attr&A_IGNORE)|A_SILENT);
X prqlst->cl_prq->ce_attr &= ~A_FRINGE;
X
X fil = TryFiles(prqlst);
X
X Glob_attr = glob;
X prqlst->cl_prq->ce_attr |= (cattr & A_FRINGE);
X }
X
X if( fil != NIL(FILE) ) {
X Parse( fil );
X found = TRUE;
X }
X else if( !(ignore || first) )
X Fatal( "Include file %s, not found", name );
X }
X
X if ( !ignore && first && !found )
X Fatal( "No include file was found" );
X
X if( pushed ) Pop_dir(FALSE);
X attr &= ~(A_IGNORE|A_SETDIR);
X }
X break;
X
X case ST_SOURCE:
X /* case ST_SUFFIXES: */
X if( prereq != NIL(CELL) )
X _do_targets( op & (R_OP_CL | R_OP_MI | R_OP_UP), attr, set_dir,
X target, prereq );
X else {
X /* The old semantics of .SOURCE were that an empty list of
X * prerequisites clears the .SOURCE list. So we must implement
X * that here as a clearout prerequisite operation. Since this is
X * a standard operation with the :- opcode we can simply call the
X * proper routine with the target cell and it should do the trick
X */
X
X if( op == R_OP_CL || (op & R_OP_MI) )
X Clear_prerequisites( target );
X }
X
X op &= ~(R_OP_MI | R_OP_UP);
X break;
X
X case ST_KEEP:
X if( Keep_state != NIL(char) ) break;
X Def_macro( ".KEEP_STATE", "_state.mk", M_EXPANDED );
X break;
X
X case ST_REST:
X /* The rest of the special targets can all take rules, as such they
X * must be able to affect the state of the parser. */
X
X {
X int s_targ = Target;
X
X Target = TRUE;
X _sp_target = TRUE;
X *state = _do_targets( op, attr, set_dir, target, prereq );
X Target = s_targ;
X
X target->ce_flag |= F_TARGET;
X
X attr = A_DEFAULT;
X op = R_OP_CL;
X }
X break;
X
X default:break;
X }
X
X if( op != R_OP_CL ) Warning( "Modifier(s) for operator ignored" );
X if( attr != A_DEFAULT ) Warning( "Extra attributes ignored" );
X
X DB_VOID_RETURN;
X}
X
X
X
Xstatic int
X_do_targets( op, attr, set_dir, targets, prereq )/*
X================================================= */
Xint op;
Xt_attr attr;
Xchar *set_dir;
XCELLPTR targets;
XCELLPTR prereq;
X{
X CELLPTR tg1; /* temporary target pointer */
X CELLPTR tp1; /* temporary prerequisite pointer */
X LINKPTR prev_cell; /* pointer for .UPDATEALL processing */
X char *p; /* temporary char pointer */
X int tflag = FALSE; /* set to TRUE if we add target to root */
X
X DB_ENTER( "_do_targets" );
X
X if( attr & A_UPDATEALL ) {
X if( targets == NIL(CELL) )
X Fatal( ".UPDATEALL attribute requires non-empty list of targets" );
X
X if (targets->ce_set == NIL(CELL)) {
X for(
X prev_cell=CeMeToo(targets),tg1=targets->ce_link;
X tg1 != NIL(CELL);
X tg1=tg1->ce_link
X ) {
X if (tg1->ce_set)
X Fatal( "Target [%s] appears on multiple .UPDATEALL lists",
X tg1->CE_NAME);
X tg1->ce_set = targets;
X TALLOC(prev_cell->cl_next, 1, LINK);
X prev_cell = prev_cell->cl_next;
X prev_cell->cl_prq = tg1;
X }
X targets->ce_set = targets;
X }
X else {
X LINKPTR ap;
X CELLPTR tp;
X
X tp = targets;
X ap = CeMeToo(targets);
X while (ap && tp && ap->cl_prq == tp && tp->ce_set == targets) {
X ap = ap->cl_next;
X tp = tp->ce_link;
X }
X if (ap || tp)
X Fatal("Inconsistent .UPDATEALL lists for target [%s]",
X targets->CE_NAME);
X }
X targets->ce_link = NIL(CELL);
X }
X
X for( tg1 = targets; tg1 != NIL(CELL); tg1 = tg1->ce_link ) {
X /* Check each target. Check for inconsistencies between :: and : rule
X * sets. :: may follow either : or :: but not the reverse.
X *
X * Any targets that contain :: rules are represented by a prerequisite
X * list hanging off the main target cell where each of the prerequisites
X * is a copy of the target cell but is not entered into the hash table.
X */
X int magic = (tg1->ce_flag & F_PERCENT) && !(tg1->ce_flag & F_MAGIC);
X
X if( !(op & R_OP_DCL ) && (tg1->ce_flag & F_MULTI) && !magic )
X Fatal( "':' vs '::' inconsistency in rules for %s", tg1->CE_NAME );
X
X if( magic ) {
X if (op & R_OP_OR)
X for(tp1=prereq; tp1; tp1=tp1->ce_link) {
X CELLPTR tmpcell = tp1->ce_link;
X tp1->ce_link = NIL(CELL);
X _build_graph(op,tg1,tp1);
X tp1->ce_link = tmpcell;
X }
X else
X prereq = _build_graph(op,tg1,prereq);
X }
X else if( !(tg1->ce_flag & F_SPECIAL) &&
X (prereq == NIL(CELL)) &&
X (p = _is_magic( tg1->CE_NAME )) != NIL(char))
X _do_magic( op, p, tg1, prereq, attr, set_dir );
X else if( op & R_OP_DCL ) {
X CELLPTR tmp_cell = _make_multi(tg1);
X tflag |= _add_root(tg1);
X targets = _replace_cell( targets, tg1, tmp_cell );
X tg1 = tmp_cell;
X }
X
X if( !magic ) _set_attributes( attr, set_dir, tg1 );
X
X /* Build the proper prerequisite list of the target. If the `-',
X * modifier was used clear the prerequisite list before adding any
X * new prerequisites. Else add them to the head/tail as appropriate.
X *
X * If the target has F_PERCENT set then no prerequisites are used. */
X
X if( !(tg1->ce_flag & F_PERCENT) ) {
X if( op & R_OP_MI ) Clear_prerequisites( tg1 );
X
X if( (op & R_OP_UP) && (tg1->ce_prq != NIL(LINK)) )
X _stick_at_head( tg1, prereq );
X else for( tp1=prereq; tp1 != NIL(CELL); tp1 = tp1->ce_link )
X Add_prerequisite( tg1, tp1, FALSE, FALSE );
X }
X else if( op & (R_OP_MI | R_OP_UP) )
X Warning( "Modifier(s) `^!' for %-meta target ignored" );
X }
X
X if(tflag)
X Target = TRUE;
X
X /* Check to see if we have NO targets but some attributes. IF so then
X * apply all of the attributes to the complete list of prerequisites.
X */
X
X if( (targets == NIL(CELL)) && attr )
X if( prereq != NIL(CELL) )
X for( tp1=prereq; tp1 != NIL(CELL); tp1 = tp1->ce_link )
X _set_attributes( attr, set_dir, tp1 );
X else
X _set_global_attr( attr );
X
X /* Now that we have built the lists of targets, the parser must parse the
X * rules if there are any. However we must start the rule list with the
X * rule specified as via the ; kludge, if there is one */
X _sv_targets = targets;
X _sv_attr = attr;
X _sv_flag = ((op & R_OP_BG) ? F_SINGLE : F_DEFAULT);
X
X DB_RETURN( RULE_SCAN );
X}
X
X
Xstatic int
X_do_magic( op, dot, target, prereq, attr, set_dir )/*
X=====================================================
X This function takes a magic target of the form .<chars>.<chars> or
X .<chars> and builds the appropriate % rules for that target.
X
X The function builds the % rule, `%.o : %.c' from .c.o, and
X `%.a :' from .a */
X
Xint op;
Xchar *dot;
XCELLPTR target;
XCELLPTR prereq;
Xt_attr attr;
Xchar *set_dir;
X{
X CELLPTR tg;
X CELLPTR prq;
X char *tmp, *tmp2;
X
X DB_ENTER( "_do_magic" );
X
X if( prereq != NIL(CELL) )
X Warning( "Ignoring prerequisites of old style meta-target" );
X
X if( dot == target->CE_NAME ) { /* its of the form .a */
X tg = Def_cell( "%" ); /* ==> no prerequisite */
X tmp = _build_meta( target->CE_NAME );
X prq = Def_cell( tmp );
X FREE( tmp );
X
X _build_graph( op, tg, prq );
X }
X else {
X tmp = _build_meta( dot );
X tg = Def_cell( tmp );
X FREE( tmp );
X
X tmp = _build_meta( tmp2 = DmSubStr( target->CE_NAME, dot ) );
X prq = Def_cell( tmp );
X FREE( tmp );
X FREE( tmp2 );
X
X _build_graph( op, tg, prq );
X }
X
X tg->ce_flag |= F_PERCENT;
X target->ce_flag |= (F_MAGIC|F_PERCENT);
X
X _set_attributes( attr, set_dir, tg );
X
X DB_RETURN(1);
X}
X
X
Xstatic CELLPTR
X_replace_cell( lst, cell, rep )
XCELLPTR lst;
XCELLPTR cell;
XCELLPTR rep;
X{
X register CELLPTR tp;
X
X if( lst == cell ) {
X rep->ce_link = lst->ce_link;
X lst = rep;
X }
X else {
X for( tp=lst; tp->ce_link != cell; tp=tp->ce_link );
X rep->ce_link = tp->ce_link->ce_link;
X tp->ce_link = rep;
X }
X
X return(lst);
X}
X
X
Xstatic char *
X_build_meta( name )/*
X=====================
X Check to see if the name is of the form .c~ if so and if Augmake
X translation is enabled then return s.%.c, else return %.suff, where if the
X suffix ends in '~' then leave it be.*/
Xchar *name;
X{
X char *tmp;
X int test = Augmake ? name[strlen(name)-1] == '~' : 0;
X
X tmp = DmStrJoin( test ? "s.%" : "%", name, -1, FALSE);
X if( test ) tmp[ strlen(tmp)-1 ] = '\0';
X
X return(tmp);
X}
X
X
Xstatic CELLPTR
X_build_graph( op, target, prereq )/*
X====================================
X This function is called to build the graph for the % rule given by
X target : prereq cell combination. This function assumes that target
X is a % target and that prereq is a single % prerequisite. R_OP_CL
X rules replace existing rules if any, only R_OP_CL works for meta-rules.
X %.o :: %.c is meaningless. If target has ce_all set then all the cells
X on the list must match in order for the match to work. If prereq->ce_link
X is not nil then all prerequisites listed by the link set must match also.
X This latter match is more difficult because in general the prerequisite
X sets may not be listed in the same order.
X
X It also assumes that target cell has F_PERCENT set already. */
Xint op;
XCELLPTR target;
XCELLPTR prereq;
X{
X LINKPTR edl;
X CELLPTR edge;
X CELLPTR tpq,cur;
X int match;
X
X DB_ENTER( "_build_graph" );
X DB_PRINT( "%", ("Building graph for [%s : %s]", target->CE_NAME,
X (prereq == NIL(CELL)) ? "" : prereq->CE_NAME) );
X
X tpq = NIL(CELL);
X for(cur=prereq;cur;cur=cur->ce_link) {
X char *name = cur->CE_NAME;
X int len = strlen(name);
X
X if( *name == '\'' && name[len-1]=='\'' ){
X _add_global_prereq( cur );
X name[len-1] = '\0';
X strcpy(name,name+1);
X }
X else {
X if (tpq)
X tpq->ce_link = cur;
X else
X prereq = cur;
X tpq = cur;
X }
X }
X if(tpq)
X tpq->ce_link=NIL(CELL);
X else
X prereq = NIL(CELL);
X
X /* Search the list of prerequisites for the current target and see if
X * any of them match the current %-meta's : prereq's pair. NOTE that
X * %-metas are built as if they were F_MULTI targets. */
X match = FALSE;
X for(edl=target->ce_prq; !match && edl != NIL(LINK); edl=edl->cl_next) {
X LINKPTR l1,l2;
X edge = edl->cl_prq;
X
X DB_PRINT("%", ("Trying to match [%s]",edge?edge->CE_NAME:"(nil)"));
X
X /* First we match the target sets, if this fails then we don't have to
X * bother with the prerequisite sets. The targets sets are sorted.
X * this makes life very simple. */
X
X l1 = CeMeToo(target);
X l2 = CeMeToo(edge);
X while(l1 && l2 && l1->cl_prq == l2->cl_prq) {
X l1=l1->cl_next;
X l2=l2->cl_next;
X }
X
X if (l1 || l2)
X continue;
X
X /* target sets match, so check prerequisites. */
X
X if( (!edge->ce_prq && !prereq)
X || ( edge->ce_prq
X && ( edge->ce_dir == _sv_setdir
X || ( edge->ce_dir
X && _sv_setdir
X && !strcmp(edge->ce_dir,strchr(_sv_setdir,'=')+1)
X )
X )
X )
X ) {
X LINKPTR prql;
X
X /* this is a really gross way to compare two sets, it's n^2 but
X * since the sets are assumed to always be tiny, it should be ok. */
X for(tpq=prereq; tpq; tpq=tpq->ce_link) {
X for(prql=edge->ce_prq;prql;prql=prql->cl_next)
X if (prql->cl_prq == tpq)
X break;
X
X if(prql == NIL(LINK))
X break;
X
X prql->cl_prq->ce_flag |= F_MARK;
X }
X
X if (tpq == NIL(CELL)) {
X for(prql=edge->ce_prq;prql;prql=prql->cl_next)
X if(!(prql->cl_prq->ce_flag & F_MARK))
X break;
X
X if(prql == NIL(LINK))
X match = TRUE;
X }
X
X /* clean up the mark bits. */
X for(prql=edge->ce_prq;prql;prql=prql->cl_next)
X prql->cl_prq->ce_flag &= ~F_MARK;
X }
X }
X
X if( match ) {
X /* match is TRUE hence, we found an edge joining the target and the
X * prerequisite so reset the new edge so that new values replace it. */
X DB_PRINT( "%", ("It's an old edge") );
X
X edge->ce_dir = NIL(char);
X edge->ce_flag &= (F_PERCENT|F_MAGIC|F_DFA);
X edge->ce_attr &= A_NOINFER;
X }
X else {
X DB_PRINT( "%", ("Adding a new edge") );
X
X edge = _make_multi(target);
X
X for(edl=CeMeToo(target);edl;edl=edl->cl_next) {
X if( !((tpq=edl->cl_prq)->ce_flag & F_DFA) ) {
X Add_nfa( tpq->CE_NAME );
X tpq->ce_flag |= F_DFA;
X }
X
X edl->cl_prq->ce_set = edge;
X }
X
X edge->ce_all = target->ce_all;
X target->ce_all.cl_next = NIL(LINK);
X target->ce_set = NIL(CELL);
X
X for(tpq=prereq; tpq; tpq=tpq->ce_link)
X Add_prerequisite(edge, tpq, FALSE, TRUE);
X }
X
X if( op & R_OP_DCL )
X Warning("'::' operator for meta-target '%s' ignored, ':' operator assumed.",
X target->CE_NAME );
X
X edge->ce_link = _sv_edgel;
X _sv_edgel = edge;
X _sv_globprq_only = 0;
X
X DB_RETURN(NIL(CELL));
X}
X
X
Xstatic CELLPTR
X_make_multi( tg )
XCELLPTR tg;
X{
X CELLPTR cp;
X CELLPTR tcp;
X
X /* This first handles the case when a : foo ; exists prior to seeing
X * a :: fee; */
X if( !(tg->ce_flag & F_MULTI) && (tg->ce_prq || tg->ce_recipe) ) {
X TALLOC(cp, 1, CELL);
X *cp = *tg;
X
X tg->ce_prq = NIL(LINK);
X tg->ce_flag |= F_RULES|F_MULTI|F_TARGET;
X tg->ce_attr |= A_SEQ;
X tg->ce_recipe = NIL(STRING);
X tg->ce_dir = NIL(char);
X cp->ce_count = ++tg->ce_index;
X cp->ce_cond = NIL(STRING);
X cp->ce_set = NIL(CELL);
X cp->ce_all.cl_prq = cp;
X CeNotMe(cp) = NIL(LINK);
X
X Add_prerequisite(tg, cp, FALSE, TRUE);
X }
X
X TALLOC(cp, 1, CELL);
X *cp = *tg;
X
X if( !(tg->ce_flag & F_MULTI) ) {
X tg->ce_prq = NIL(LINK);
X tg->ce_flag |= F_RULES|F_MULTI|F_TARGET;
X tg->ce_attr |= A_SEQ;
X tg->ce_recipe = NIL(STRING);
X tg->ce_dir = NIL(char);
X cp->ce_cond = NIL(STRING);
X }
X else {
X cp->ce_flag &= ~(F_RULES|F_MULTI);
X cp->ce_attr &= ~A_SEQ;
X cp->ce_prq = NIL(LINK);
X cp->ce_index = 0;
X cp->ce_cond = NIL(STRING);
X }
X cp->ce_count = ++tg->ce_index;
X cp->ce_flag |= F_TARGET;
X cp->ce_set = NIL(CELL);
X cp->ce_all.cl_prq = cp;
X CeNotMe(cp) = NIL(LINK);
X
X Add_prerequisite(tg, cp, FALSE, TRUE);
X return(cp);
X}
X
X
Xstatic void
X_add_global_prereq( pq )/*
X==========================
X Prerequisite is a non-% prerequisite for a %-rule target, add it to
X the target's list of global prerequsites to add on match */
XCELLPTR pq;
X{
X register LINKPTR ln;
X
X for(ln=_sv_glb_prq; ln; ln=ln->cl_next)
X if(strcmp(ln->cl_prq->CE_NAME,pq->CE_NAME) == 0)
X return;
X
X TALLOC( ln, 1, LINK );
X ln->cl_next = _sv_glb_prq;
X ln->cl_prq = pq;
X _sv_glb_prq = ln;
X}
X
X
X
Xstatic void
X_set_attributes( attr, set_dir, cp )/*
X======================================
X Set the appropriate attributes for a cell */
Xt_attr attr;
Xchar *set_dir;
XCELLPTR cp;
X{
X char *dir;
X
X DB_ENTER( "_set_attributes" );
X
X /* If .SETDIR attribute is set then we have at least .SETDIR= in the
X * set_dir string. So go and fishout what is at the end of the =.
X * If not set and not NULL then propagate it to the target cell. */
X
X if( attr & A_SETDIR ) {
X char *p;
X if( (p = strchr( set_dir, '=' )) != NULL )
X dir = p + 1;
X
X if( cp->ce_dir )
X Warning( "Multiple .SETDIR for %s ignored", cp->CE_NAME );
X else if( *dir )
X cp->ce_dir = DmStrDup(dir);
X }
X cp->ce_attr |= attr; /* set rest of attributes for target */
X
X DB_VOID_RETURN;
X}
X
X
X
Xstatic void
X_set_global_attr( attr )/*
X==========================
X Handle the setting of the global attribute functions based on
X The attribute flags set in attr. */
Xt_attr attr;
X{
X t_attr flag;
X
X /* Some compilers can't handle a switch on a long, and t_attr is now a long
X * integer on some systems. foey! */
X for( flag = MAX_ATTR; flag; flag >>= 1 )
X if( flag & attr )
X if( flag == A_PRECIOUS) Def_macro(".PRECIOUS", "y", M_EXPANDED);
X else if( flag == A_SILENT) Def_macro(".SILENT", "y", M_EXPANDED);
X else if( flag == A_IGNORE ) Def_macro(".IGNORE", "y", M_EXPANDED);
X else if( flag == A_EPILOG ) Def_macro(".EPILOG", "y", M_EXPANDED);
X else if( flag == A_PROLOG ) Def_macro(".PROLOG", "y", M_EXPANDED);
X else if( flag == A_NOINFER ) Def_macro(".NOINFER", "y", M_EXPANDED);
X else if( flag == A_SEQ ) Def_macro(".SEQUENTIAL","y", M_EXPANDED);
X else if( flag == A_SHELL ) Def_macro(".USESHELL", "y", M_EXPANDED);
X else if( flag == A_MKSARGS ) Def_macro(".MKSARGS", "y", M_EXPANDED);
X else if( flag == A_SWAP ) Def_macro(".SWAP", "y", M_EXPANDED);
X
X attr &= ~A_GLOB;
X if( attr ) Warning( "Non global attribute(s) ignored" );
X}
X
X
X
Xstatic void
X_stick_at_head( cp, pq )/*
X==========================
X Add the prerequisite list to the head of the existing prerequisite
X list */
X
XCELLPTR cp; /* cell for target node */
XCELLPTR pq; /* list of prerequisites to add */
X{
X DB_ENTER( "_stick_at_head" );
X
X if( pq->ce_link != NIL(CELL) ) _stick_at_head( cp, pq->ce_link );
X Add_prerequisite( cp, pq, TRUE, FALSE );
X
X DB_VOID_RETURN;
X}
X
X
X
Xstatic t_attr
X_is_attribute( name )/*
X=======================
X Check the passed name against the list of valid attributes and return the
X attribute index if it is, else return 0, indicating the name is not a valid
X attribute. The present attributes are defined in dmake.h as A_xxx #defines,
X with the corresponding makefile specification: (note they must be named
X exactly as defined below)
X
X Valid attributes are: .IGNORE, .SETDIR=, .SILENT, .PRECIOUS, .LIBRARY,
X .EPILOG, .PROLOG, .LIBRARYM, .SYMBOL, .UPDATEALL,
X .USESHELL, .NOINFER, .PHONY, .SWAP, .SEQUENTIAL
X .NOSTATE, .MKSARGS, .IGNOREGROUP, .GROUP, .FIRST
X
X NOTE: The strcmp's are OK since at most three are ever executed for any
X one attribute check, and that happens only when we can be fairly
X certain we have an attribute. */
Xchar *name;
X{
X t_attr attr = 0;
X
X DB_ENTER( "_is_attribute" );
X
X if( *name++ == '.' )
X switch( *name )
X {
X case 'E': attr = (strcmp(name, "EPILOG")) ? 0 : A_EPILOG; break;
X
X /* A_FIRST implies A_IGNORE, handled in ST_INCLUDE */
X case 'F':
X attr = (strcmp(name, "FIRST")) ? 0 : A_FIRST;
X break;
X
X case 'G': attr = (strcmp(name, "GROUP")) ? 0 : A_GROUP; break;
X case 'L': attr = (strcmp(name, "LIBRARY")) ? 0 : A_LIBRARY; break;
X case 'M': attr = (strcmp(name, "MKSARGS")) ? 0 : A_MKSARGS; break;
X
X case 'I':
X if( !strcmp(name, "IGNORE") ) attr = A_IGNORE;
X else if( !strcmp(name, "IGNOREGROUP")) attr = A_IGNOREGROUP;
X else attr = 0;
X break;
X
X case 'N':
X if( !strcmp(name, "NOINFER") ) attr = A_NOINFER;
X else if( !strcmp(name, "NOSTATE")) attr = A_NOSTATE;
X else attr = 0;
X break;
X
X case 'U':
X if( !strcmp(name, "UPDATEALL") ) attr = A_UPDATEALL;
X else if( !strcmp(name, "USESHELL")) attr = A_SHELL;
X else attr = 0;
X break;
X
X case 'P':
X if( !strcmp(name, "PRECIOUS") ) attr = A_PRECIOUS;
X else if( !strcmp(name, "PROLOG") ) attr = A_PROLOG;
X else if( !strcmp(name, "PHONY") ) attr = A_PHONY;
X else attr = 0;
X break;
X
X case 'S':
X if( !strncmp(name, "SETDIR=", 7) ) attr = A_SETDIR;
X else if( !strcmp(name, "SILENT") ) attr = A_SILENT;
X else if( !strcmp(name, "SYMBOL") ) attr = A_SYMBOL;
X else if( !strcmp(name, "SEQUENTIAL")) attr = A_SEQ;
X else if( !strcmp(name, "SWAP")) attr = A_SWAP;
X else attr = 0;
X break;
X }
X
X DB_RETURN( attr );
X}
X
X
X
Xstatic int
X_is_special( tg )/*
X===================
X This function returns TRUE if the name passed in represents a special
X target, otherwise it returns false. A special target is one that has
X a special meaning to dmake, and may require processing at the time that
X it is parsed.
X
X Current Special targets are:
X .GROUPPROLOG .GROUPEPILOG .INCLUDE .IMPORT
X .EXPORT .SOURCE .SUFFIXES .ERROR .EXIT
X .INCLUDEDIRS .MAKEFILES .REMOVE .KEEP_STATE
X*/
Xchar *tg;
X{
X DB_ENTER( "_is_special" );
X
X if( *tg++ != '.' ) DB_RETURN( 0 );
X
X switch( *tg )
X {
X case 'E':
X if( !strcmp( tg, "ERROR" ) ) DB_RETURN( ST_REST );
X else if( !strcmp( tg, "EXPORT" ) ) DB_RETURN( ST_EXPORT );
X else if( !strcmp( tg, "EXIT" ) ) DB_RETURN( ST_EXIT );
X break;
X
X case 'G':
X if( !strcmp( tg, "GROUPPROLOG" )) DB_RETURN( ST_REST );
X else if( !strcmp( tg, "GROUPEPILOG" )) DB_RETURN( ST_REST );
X break;
X
X case 'I':
X if( !strcmp( tg, "IMPORT" ) ) DB_RETURN( ST_IMPORT );
X else if( !strcmp( tg, "INCLUDE" ) ) DB_RETURN( ST_INCLUDE );
X else if( !strcmp( tg, "INCLUDEDIRS" )) DB_RETURN( ST_REST );
X break;
X
X case 'K':
X if( !strcmp( tg, "KEEP_STATE" ) ) DB_RETURN( ST_KEEP );
X break;
X
X case 'M':
X if( !strcmp( tg, "MAKEFILES" ) ) DB_RETURN( ST_REST );
X break;
X
X case 'R':
X if( !strcmp( tg, "REMOVE" ) ) DB_RETURN( ST_REST );
X break;
X
X case 'S':
X if( !strncmp( tg, "SOURCE", 6 ) ) DB_RETURN( ST_SOURCE );
X else if( !strncmp(tg, "SUFFIXES", 8 )) DB_RETURN( ST_SOURCE );
X break;
X }
X
X DB_RETURN( 0 );
X}
X
X
X
Xstatic int
X_is_percent( np )/*
X===================
X return TRUE if np points at a string containing a % sign */
Xchar *np;
X{
X return( (strchr(np,'%') && (*np != '\'' && np[strlen(np)-1] != '\'')) ?
X TRUE : FALSE );
X}
X
X
Xstatic char *
X_is_magic( np )/*
X=================
X return TRUE if np points at a string of the form
X .<chars>.<chars> or .<chars>
X where chars are only alpha characters.
X
X NOTE: reject target if it begins with ./ or ../ */
Xchar *np;
X{
X register char *n;
X
X n = np;
X if( *n != '.' ) return( NIL(char) );
X if (strchr(DirBrkStr, *(n+1))!=NULL || *(n+1) == '.' )
X return (NIL(char));
X
X for( n++; isgraph(*n) && (*n != '.'); n++ );
X
X if( *n != '\0' ) {
X if( *n != '.' ) return( NIL(char) );
X for( np = n++; isgraph( *n ) && (*n != '.'); n++ );
X if( *n != '\0' ) return( NIL(char) );
X }
X else if( !Augmake )
X return( NIL(char) );
X
X /* np points at the second . of .<chars>.<chars> string.
X * if the special target is of the form .<chars> then np points at the
X * first . in the token. */
X
X return( np );
X}
X
X
Xstatic int
X_add_root(tg)
XCELLPTR tg;
X{
X int res = FALSE;
X
X if(tg == Targets)
X return(TRUE);
X
X if( !Target && !(tg->ce_flag & (F_SPECIAL|F_PERCENT)) ) {
X Add_prerequisite(Targets, tg, FALSE, TRUE);
X
X tg->ce_flag |= F_TARGET;
X tg->ce_attr |= A_FRINGE;
X res = TRUE;
X }
X
X return(res);
X}
END_OF_FILE
if test 43230 -ne `wc -c <'dmake/rulparse.c'`; then
echo shar: \"'dmake/rulparse.c'\" unpacked with wrong size!
fi
# end of 'dmake/rulparse.c'
fi
if test -f 'dmake/unix/coherent/vfprintf.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/vfprintf.c'\"
else
echo shar: Extracting \"'dmake/unix/coherent/vfprintf.c'\" \(4312 characters\)
sed "s/^X//" >'dmake/unix/coherent/vfprintf.c' <<'END_OF_FILE'
X/* Portable vfprintf and vprintf by Robert A. Larson <bla...@skat.usc.edu> */
X
X/* Copyright 1989 Robert A. Larson.
X * Distribution in any form is allowed as long as the author
X * retains credit, changes are noted by their author and the
X * copyright message remains intact. This program comes as-is
X * with no warentee of fitness for any purpouse.
X *
X * Thanks to Doug Gwen, Chris Torek, and others who helped clarify
X * the ansi printf specs.
X *
X * Please send any bug fixes and improvments to bla...@skat.usc.edu .
X * The use of goto is NOT a bug.
X */
X
X/* Feb 9, 1989 blarson First usenet release */
X
X/* This code implements the vfprintf function, without relying on
X * the existance of _doprint or other system specific code.
X *
X * Define NOVOID if void * is not a supported type.
X *
X * Two compile options are available for efficency:
X * INTSPRINTF should be defined if sprintf is int and returns
X * the number of chacters formated.
X * LONGINT should be defined if sizeof(long) == sizeof(int)
X *
X * They only make the code smaller and faster, they need not be
X * defined.
X *
X * UNSIGNEDSPECIAL should be defined if unsigned is treated differently
X * than int in argument passing. If this is definded, and LONGINT is not,
X * the compiler must support the type unsingned long.
X *
X * Most quirks and bugs of the available fprintf fuction are duplicated,
X * however * in the width and precision fields will work correctly
X * even if fprintf does not support this. The %n format and the return
X * count will only work if fprintf returns the number of characters
X * formatted.
X *
X * Bad format strings, or those with very long width and precision
X * fields (including expanded * fields) will cause undesired results.
X */
X
X#ifdef OSK /* os9/68k can take advantage of both */
X#define INTSPRINTF
X#define LONGINT
X#endif
X#define NOVOID 1
X
X/* This must be a typedef not a #define! */
X#ifdef NOVOID
Xtypedef char *pointer;
X#else
Xtypedef void *pointer;
X#endif
X
X#include <stdio.h>
X
X#ifdef INTSPRINTF
X#define Sprintf(string,format,arg) (sprintf((string),(format),(arg)))
X#else
X#define Sprintf(string,format,arg) (\
X sprintf((string),(format),(arg)),\
X strlen(string)\
X)
X#endif
X
X#include <stdarg.h>
X
Xtypedef int *intp;
X
Xint vfprintf(dest, format, args)
XFILE *dest;
Xregister char *format;
Xva_list args;
X{
X register char c;
X register char *tp;
X register int count = 0;
X char tempfmt[64];
X#ifndef LONGINT
X int longflag;
X#endif
X
X tempfmt[0] = '%';
X while(c = *format++) {
X if(c=='%') {
X tp = &tempfmt[1];
X#ifndef LONGINT
X longflag = 0;
X#endif
Xcontinue_format:
X switch(c = *format++) {
X case 's':
X *tp++ = c;
X *tp = '\0';
X count += fprintf(dest, tempfmt, va_arg(args, char *));
X break;
X case 'u':
X case 'x':
X case 'o':
X case 'X':
X#ifdef UNSIGNEDSPECIAL
X *tp++ = c;
X *tp = '\0';
X#ifndef LONGINT
X if(longflag)
X count += fprintf(dest, tempfmt, va_arg(args, unsigned long));
X else
X#endif
X count += fprintf(dest, tempfmt, va_arg(args, unsigned));
X break;
X#endif
X case 'd':
X case 'c':
X case 'i':
X *tp++ = c;
X *tp = '\0';
X#ifndef LONGINT
X if(longflag)
X count += fprintf(dest, tempfmt, va_arg(args, long));
X else
X#endif
X count += fprintf(dest, tempfmt, va_arg(args, int));
X break;
X case 'f':
X case 'e':
X case 'E':
X case 'g':
X case 'G':
X *tp++ = c;
X *tp = '\0';
X count += fprintf(dest, tempfmt, va_arg(args, double));
X break;
X case 'p':
X *tp++ = c;
X *tp = '\0';
X count += fprintf(dest, tempfmt, va_arg(args, pointer));
X break;
X case '-':
X case '+':
X case '0':
X case '1':
X case '2':
X case '3':
X case '4':
X case '5':
X case '6':
X case '7':
X case '8':
X case '9':
X case '.':
X case ' ':
X case '#':
X case 'h':
X *tp++ = c;
X goto continue_format;
X case 'l':
X#ifndef LONGINT
X longflag = 1;
X *tp++ = c;
X#endif
X goto continue_format;
X case '*':
X tp += Sprintf(tp, "%d", va_arg(args, int));
X goto continue_format;
X case 'n':
X *va_arg(args, intp) = count;
X break;
X case '%':
X default:
X putc(c, dest);
X count++;
X break;
X }
X } else {
X putc(c, dest);
X count++;
X }
X }
X return count;
X}
X
Xvprintf(format, args)
Xchar *format;
Xva_list args;
X{
X return vfprintf(stdout, format, args);
X}
END_OF_FILE
if test 4312 -ne `wc -c <'dmake/unix/coherent/vfprintf.c'`; then
echo shar: \"'dmake/unix/coherent/vfprintf.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/vfprintf.c'
fi
echo shar: End of archive 6 \(of 27\).
cp /dev/null ark6isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/dbug/dbug.uue dmake/man/dmake.uue.A
# Wrapped by kent@sparky on Fri Oct 21 16:50:34 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 7 (of 27)."'
if test -f 'dmake/dbug/dbug/dbug.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/dbug/dbug.uue'\"
else
echo shar: Extracting \"'dmake/dbug/dbug/dbug.uue'\" \(22993 characters\)
sed "s/^X//" >'dmake/dbug/dbug/dbug.uue' <<'END_OF_FILE'
Xbegin 650 dbug.Z
XM'YV,"@*"&$BPH,&#" T2 2$$1!401P0FG&AP" @H<MZ<D1.F#0@B9<34.7,F
XMC9LS%\.,61/F3!F)%&/*!"$F#\R9. <:D5.&# @C:>:@"4@481($1Y,Z0;"T
XM*14$3Z-*03"UZA,$5[,20;"U:Q4$7\,.03"V;%2H4),B19H5*]:F3)D6C1F$
XM39LW<^B *&.GC)P\(.!DW-@1!!F^9=B\@=.FC!N]CNVDR>BF\6,0=][(H8,&
XM,(@W9A0@Y%QFH)N.I06_D7QX#H@Y;QJ_UJP7M.&0(TN>!&%&91HV:>CD<3&P
XMRIPZ8=BPL3D:35 0=,*L*>.:]$ SFCU^-C,PS$#5A+7?<3X&S<#G(,:$@1-&
XM#)O2VT4?'//F<4;E)E'NQ5-F3!TZ:=0WD&V?D29'8(-QU(9K8;CA4QEX=&12
XM?M"A\1)")M'AUVELO!:=AML5:.&!$/;W'X7@*3@'<2!08>$<I0D'!W4#AH90
XMBAVY=L=O'8I1&D]F^,633W2\ 4(8KD&HH1P<WB8227ZY-H=)8\1HH7P&'?:D
XM2P<^Y\8;>K&W68C6E>@?@+OAV :+1438!ASON19?<^C)"!^!6N;FUWENC,%&
XM'8<-9%T8"!!J*!D((*JH& @PZNB1#KZ&P!R33JIHHHDZVFBC3NHIQQQ8%J0:
XM:SUA%IQYUH4%%EAP-:564E@@$.NL&^ 0 P*WYKI!#I_-R!&:*,V11UYEK#D7
XM14^X49IMUJGF7K$,S@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[HJ2JI-.>008?
XM,R/SDB&E0_9/CSYEEQ<M('<"DHN#"T? 3Q%]'AXZ(OK,U!CBB%K*\<%&=1V4
XMKO/Q-"($;%[PA?Z)ONB&P@8(P 8(P 8(H!P(P 8(P 8(H!@(\ 8(\ 8(\,$(
XM, 8(, 8(D'#/=--R1OK(6(\^S&R[81VO!WD:\])@!ERR1$6_^]5XH1>7)B!U
X6JTKA=5]I *"4_\%4D\0&T1CB.!Q$ 1VO
X
Xend
END_OF_FILE
if test 22993 -ne `wc -c <'dmake/dbug/dbug/dbug.uue'`; then
echo shar: \"'dmake/dbug/dbug/dbug.uue'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/dbug/dbug.uue'
# end of 'dmake/dbug/dbug/dbug.uue'
fi
if test -f 'dmake/man/dmake.uue.A' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/man/dmake.uue.A'\"
else
echo shar: Extracting \"'dmake/man/dmake.uue.A'\" \(43356 characters\)
sed "s/^X//" >'dmake/man/dmake.uue.A' <<'END_OF_FILE'
Xbegin 640 dmake.Z
XM'YV,"@(J(-(DR)(B*."D ,&PH<.&5=S,J0,'SALY=,J0 6%$3IDR(*:\,4/G
XM3AB/#U."(&@0H4*!"IP@<!($09 F")H405!$P4,R",BT0= F#((P:Q"L*8,
XM9 L01=.XH1-&*@@X<MZ<D1.F#8BM;RC.80'B(@BI&>60*0.GC)NU4T&82<.F
XMS)R 4Q!,R8(@BTPG3Q \@8( 2MXI21 D.>S3(5"A1(TB5<H4Y)864$9T 7%Y
XMCQD^0_@LZ2.7;IG-G>_PN4*:JIPS9>B <$&[2^.&6XJ.R;IE2X@N6U0 7P%<
XM1Y<N/;X@L*,\C'(VRNLH!TG;!>H6=O:,(3.W#9T^MA]>#B)D>YDB9]"D6>,&
XM3APY<Z;0H5+'"AXLJ%W#EEW=]D $1.Q4Q&%#(#"$% A(D5@2A$%!!0)4+!C8
XM$W_=QM!C0Q5U5%)+-776'""$ 8)'+:31!AQ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4$<C-W<SA4<FDAU)RRNBQ"86<0_YGW%P)(9:>TTER+
XM0G*M&9(O;*'BIM#]K6[:)'-0J\&AKUAQ8B4"&T01[BV0$69 84UBF>;X9J'2
XM/2:Y_[6]&OC"6-;;! @@%BBW! A %B(W! @P!$V $W0<B_GS#4>E75U9S!M
XM_>:)_0OGG7LUT2?%+$V &*!<DN &0A<BU'!$F $E0<UDAU-^3^7'65"KM
XM' $>CA>\+H,"GOM?V[<YGD)[_0F7_;F$5R-=3-;;! @@%BBW! A %B)G! @
XML A@-R"G<T6 %4-0= -8^&,E52+0 AD1_#&6@6: 8R](&78UJK7=$<$?8QEH
XM!C...@FDO.HHJTEJY3%FOKSI]Y$.W&@#7%^@BSJ]JO4V &*!<DN &0A<D:
XM #4$<C-W<SA4<E<AU)JIJ'B5'4U00X6$%HZIR/__K6YZ!OJ*%7-0J[MT8B4"
XM&T1![Y8/ DU00X7$$/J*%2V0';M=0X7$22O2! @@%BBW! A %B+7! @@%B@W
XM! B0;AKW! C0-B4W%4-0= .HCB\R6AZRNM$D.&.FKU@1,_&?>1:5JT7=B"@D
END_OF_FILE
if test 43356 -ne `wc -c <'dmake/man/dmake.uue.A'`; then
echo shar: \"'dmake/man/dmake.uue.A'\" unpacked with wrong size!
elif test -f 'dmake/man/dmake.uue.B'; then
echo shar: Combining \"'dmake/man/dmake.uue'\" \(86118 characters\)
cat 'dmake/man/dmake.uue.A' 'dmake/man/dmake.uue.B' > 'dmake/man/dmake.uue'
if test 86118 -ne `wc -c <'dmake/man/dmake.uue'`; then
echo shar: \"'dmake/man/dmake.uue'\" combined with wrong size!
else
rm dmake/man/dmake.uue.A dmake/man/dmake.uue.B
fi
fi
# end of 'dmake/man/dmake.uue.A'
fi
echo shar: End of archive 7 \(of 27\).
cp /dev/null ark7isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dmake.c dmake/man/dmake.uue.B
# Wrapped by kent@sparky on Fri Oct 21 16:50:35 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 8 (of 27)."'
if test -f 'dmake/dmake.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dmake.c'\"
else
echo shar: Extracting \"'dmake/dmake.c'\" \(23132 characters\)
sed "s/^X//" >'dmake/dmake.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/dmake.c,v 1.1 1994/10/06 17:41:23 dvadura Exp $
X-- SYNOPSIS -- The main program.
X--
X-- DESCRIPTION
X--
X-- dmake [-#dbug_string] [ options ]
X-- [ macro definitions ] [ target ... ]
X--
X-- This file contains the main command line parser for the
X-- make utility. The valid flags recognized are as follows:
X--
X-- -f file - use file as the makefile
X-- -C file - duplicate console output to file (MSDOS only)
X-- -K file - .KEEP_STATE file
X-- -#dbug_string - dump out debugging info, see below
X-- -v{dfimt} - verbose, print what we are doing, as we do it.
X--
X-- options: (can be catenated, ie -irn == -i -r -n)
X--
X-- -A - enable AUGMAKE special target mapping
X-- -B - enable non-use of TABS to start recipe lines
X-- -c - use non-standard comment scanning
X-- -d - do not use directory cache
X-- -i - ignore errors
X-- -n - trace and print, do not execute commands
X-- -t - touch, update dates without executing commands
X-- -T - do not apply transitive closure on inference rules
X-- -r - don't use internal rules
X-- -s - do your work silently
X-- -S - force Sequential make, overrides -P
X-- -q - check if target is up to date. Does not
X-- do anything. Returns 0 if up to date, -1
X-- otherwise.
X-- -p - print out a version of the makefile
X-- -P# - set value of MAXPROCESS
X-- -E - define environment strings as macros
X-- -e - as -E but done after parsing makefile
X-- -u - force unconditional update of target
X-- -k - make all independent targets even if errors
X-- -V - print out this make version number
X-- -M - Microsoft make compatibility, (* disabled *)
X-- -h - print out usage info
X-- -x - export macro defs to environment
X-- -X - ignore #! lines found in makefile
X--
X-- NOTE: - #ddbug_string is only availabe for versions of dmake that
X-- have been compiled with -DDBUG switch on. Not the case for
X-- distributed versions. Any such versions must be linked
X-- together with a version of Fred Fish's debug code.
X--
X-- NOTE: - in order to compile the code the include file stddef.h
X-- must be shipped with the bundled code.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dmake.c,v $
X * Revision 1.1 1994/10/06 17:41:23 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* Set this flag to one, and the global variables in vextern.h will not
X * be defined as 'extern', instead they will be defined as global vars
X * when this module is compiled. */
X#define _DEFINE_GLOBALS_ 1
X
X#include "extern.h"
X#include "patchlvl.h"
X#include "version.h"
X
X#ifndef MSDOS
X#define USAGE \
X"Usage:\n%s [-P#] [-{f|K} file] [-{w|W} target ...] [macro[!][[*][+][:]]=value ...]\n"
X#define USAGE2 \
X"%s [-v{cdfimt}] [-ABcdeEghiknpqrsStTuVxX] [target ...]\n"
X#else
X#define USAGE \
X"Usage:\n%s [-P#] [-{f|C|K} file] [-{w|W} target ...] [macro[!][[*][+][:]]=value ...]\n"
X#define USAGE2 \
X"%s [-v{cdfimt}] [-ABcdeEghiknpqrsStTuVxX] [target ...]\n"
X#endif
X
X#if __STDC__ == 1 && !defined(__GNUC__) && !defined(_MSC_VER)
Xvoid Fatal(char *fmt, ...);
Xvoid Warning(char *fmt, ...);
X#endif
X
Xstatic char *sccid = "Copyright (c) 1990,...,1994 by Dennis Vadura";
Xstatic char _warn = TRUE; /* warnings on by default */
X
Xstatic void _do_VPATH();
Xstatic void _do_ReadEnvironment();
X#if !defined(__GNUC__)
Xstatic void _do_f_flag ANSI((char, char *, char **));
X#else
Xstatic void _do_f_flag ANSI((int, char *, char **));
X#endif
X
XPUBLIC void
Xmain(argc, argv)
Xint argc;
Xchar **argv;
X{
X#ifdef MSDOS
X char* std_fil_name = NIL(char);
X#endif
X
X char* fil_name = NIL(char);
X char* state_name = NIL(char);
X char* whatif = NIL(char);
X char* cmdmacs;
X char* targets;
X FILE* mkfil;
X int ex_val;
X int m_export;
X
X DB_ENTER("main");
X
X /* Initialize Global variables to their default values */
X Prolog(argc, argv);
X Create_macro_vars();
X Catch_signals(Quit);
X
X Def_macro( "MAKECMD", Pname, M_PRECIOUS|M_NOEXPORT );
X Pname = Basename(Pname);
X
X DB_PROCESS(Pname);
X (void) setvbuf(stdout, NULL, _IOLBF, BUFSIZ); /* stdout line buffered */
X
X Continue = FALSE;
X Comment = FALSE;
X Get_env = FALSE;
X Force = FALSE;
X Target = FALSE;
X If_expand = FALSE;
X Listing = FALSE;
X Readenv = FALSE;
X Rules = TRUE;
X Trace = FALSE;
X Touch = FALSE;
X Check = FALSE;
X Microsoft = FALSE;
X Makemkf = FALSE;
X No_exec = FALSE;
X m_export = FALSE;
X cmdmacs = NIL(char);
X targets = NIL(char);
X
X Verbose = V_NONE;
X Transitive = TRUE;
X Nest_level = 0;
X Line_number = 0;
X Suppress_temp_file = FALSE;
X Skip_to_eof = FALSE;
X
X while( --argc > 0 ) {
X register char *p;
X char *q;
X
X if( *(p = *++argv) == '-' ) {
X if( p[1] == '\0' ) Fatal("Missing option letter");
X
X /* copy options to Buffer for $(MFLAGS), strip 'f' and 'C'*/
X q = strchr(Buffer, '\0');
X while (*p != '\0') {
X char c = (*q++ = *p++);
X if( c == 'f' || c == 'C' ) q--;
X }
X
X if( *(q-1) == '-' )
X q--;
X else
X *q++ = ' ';
X
X *q = '\0';
X
X for( p = *argv+1; *p; p++) switch (*p) {
X case 'f':
X _do_f_flag( 'f', *++argv, &fil_name ); argc--;
X break;
X
X#if defined(MSDOS) && !defined(OS2)
X case 'C':
X _do_f_flag( 'C', *++argv, &std_fil_name ); argc--;
X Hook_std_writes( std_fil_name );
X break;
X#endif
X
X case 'K':
X _do_f_flag( 'K', *++argv, &state_name ); argc--;
X Def_macro(".KEEP_STATE", state_name, M_EXPANDED|M_PRECIOUS);
X break;
X
X case 'W':
X case 'w': {
X CELLPTR wif;
X _do_f_flag( 'w', *++argv, &whatif ); argc--;
X wif = Def_cell(whatif);
X wif->ce_attr |= A_WHATIF;
X whatif = NIL(char);
X
X if ( *p == 'W')
X break;
X }
X /*FALLTHRU*/
X
X case 'n':
X Trace = TRUE;
X break;
X
X case 'k': Continue = TRUE; break;
X case 'c': Comment = TRUE; break;
X case 'p': Listing = TRUE; break;
X case 'r': Rules = FALSE; break;
X case 't': Touch = TRUE; break;
X case 'q': Check = TRUE; break;
X case 'u': Force = TRUE; break;
X case 'x': m_export = TRUE; break;
X case 'X': No_exec = TRUE; break;
X case 'T': Transitive = FALSE; break;
X case 'e': Get_env = 'e'; break;
X case 'E': Get_env = 'E'; break;
X
X case 'V': Version(); Quit(NIL(CELL)); break;
X case 'A': Def_macro("AUGMAKE", "y", M_EXPANDED); break;
X case 'B': Def_macro(".NOTABS", "y", M_EXPANDED); break;
X case 'i': Def_macro(".IGNORE", "y", M_EXPANDED); break;
X case 's': Def_macro(".SILENT", "y", M_EXPANDED); break;
X case 'S': Def_macro(".SEQUENTIAL", "y", M_EXPANDED); break;
X case 'g': Def_macro(".IGNOREGROUP","y", M_EXPANDED); break;
X case 'd': Def_macro(".DIRCACHE",NIL(char),M_EXPANDED); break;
X
X case 'v':
X if( p[-1] != '-' ) Usage(TRUE);
X while( p[1] ) switch( *++p ) {
X case 'c': Verbose |= V_DIR_CACHE; break;
X case 'd': Verbose |= V_DIR_SET; break;
X case 'f': Verbose |= V_FILE_IO; break;
X case 'i': Verbose |= V_INFER; break;
X case 'm': Verbose |= V_MAKE; break;
X case 't': Verbose |= V_LEAVE_TMP; break;
X
X default: Usage(TRUE); break;
X }
X if( !Verbose ) Verbose = V_ALL;
X break;
X
X case 'P':
X if( p[1] ) {
X Def_macro( "MAXPROCESS", p+1, M_MULTI|M_EXPANDED );
X p += strlen(p)-1;
X }
X else
X Fatal( "Missing number for -P flag" );
X break;
X
X#ifdef DBUG
X case '#':
X DB_PUSH(p+1);
X p += strlen(p)-1;
X break;
X#endif
X
X case 'h': Usage(FALSE); break;
X case 0: break; /* lone - */
X default: Usage(TRUE); break;
X }
X }
X else if( (q = strchr(p, '=')) != NIL(char) ) {
X cmdmacs = DmStrAdd( cmdmacs, DmStrDup2(p), TRUE );
X Parse_macro( p, (q[-1]!='+')?M_PRECIOUS:M_DEFAULT );
X }
X else {
X register CELLPTR cp;
X targets = DmStrAdd( targets, DmStrDup(p), TRUE );
X Add_prerequisite(Targets, cp = Def_cell(p), FALSE, FALSE);
X cp->ce_flag |= F_TARGET;
X cp->ce_attr |= A_FRINGE;
X Target = TRUE;
X }
X }
X
X Def_macro( "MAKEMACROS", cmdmacs, M_PRECIOUS|M_NOEXPORT );
X Def_macro( "MAKETARGETS", targets, M_PRECIOUS|M_NOEXPORT );
X if( cmdmacs != NIL(char) ) FREE(cmdmacs);
X if( targets != NIL(char) ) FREE(targets);
X
X Def_macro( "MFLAGS", Buffer, M_PRECIOUS|M_NOEXPORT );
X Def_macro( "%", "$@", M_PRECIOUS|M_NOEXPORT );
X
X if( *Buffer ) Def_macro( "MAKEFLAGS", Buffer+1, M_PRECIOUS|M_NOEXPORT );
X
X _warn = FALSE; /* disable warnings for builtin rules */
X ex_val = Target; /* make sure we don't mark any */
X Target = TRUE; /* of the default rules as */
X Make_rules(); /* potential targets */
X _warn = TRUE;
X
X if( Rules ) {
X char *fname;
X
X if( (mkfil=Search_file("MAKESTARTUP", &fname)) != NIL(FILE) ) {
X Parse(mkfil);
X Def_macro( "MAKESTARTUP", fname, M_EXPANDED|M_MULTI|M_FORCE );
X mkfil = NIL(FILE);
X }
X else
X Fatal( "Configuration file `%s' not found", fname );
X }
X
X Target = ex_val;
X
X if( Get_env == 'E' ) _do_ReadEnvironment();
X
X if( fil_name != NIL(char) )
X mkfil = Openfile( fil_name, FALSE, TRUE );
X else {
X /* Search .MAKEFILES dependent list looking for a makefile.
X */
X register CELLPTR cp;
X
X cp = Def_cell( ".MAKEFILES" );
X mkfil = TryFiles(cp->CE_PRQ);
X }
X
X if( mkfil != NIL(FILE) ) {
X char *f = Filename();
X char *p;
X
X if( strcmp(f, "stdin") == 0 ) f = "-";
X p = DmStrAdd( "-f", f, FALSE );
X Def_macro( "MAKEFILE", p, M_PRECIOUS|M_NOEXPORT );
X Parse( mkfil );
X }
X else if( !Rules )
X Fatal( "No `makefile' present" );
X
X if( Nest_level ) Fatal( "Missing .END for .IF" );
X if( Get_env == 'e' ) _do_ReadEnvironment();
X
X _do_VPATH(); /* kludge it up with .SOURCE */
X
X if( Listing ) Dump(); /* print out the structures */
X if( Trace ) Glob_attr &= ~A_SILENT; /* make sure we see the trace */
X
X if( !Target )
X Fatal( "No target" );
X else {
X Test_circle( Root, TRUE );
X Check_circle_dfa();
X }
X
X if( m_export ) {
X int i;
X
X for( i=0; i<HASH_TABLE_SIZE; ++i ) {
X HASHPTR hp = Macs[i];
X
X while( hp ) {
X if( !(hp->ht_flag & M_NOEXPORT) && hp->ht_value != NIL(char) )
X if( Write_env_string(hp->ht_name, hp->ht_value) != 0 )
X Warning( "Could not export %s", hp->ht_name );
X hp = hp->ht_next;
X }
X }
X }
X
X if( Buffer != NIL(char) ) {FREE( Buffer ); Buffer = NIL(char);}
X if( Trace ) Def_macro(".SEQUENTIAL", "y", M_EXPANDED);
X if( Glob_attr & A_SEQ ) Def_macro( "MAXPROCESS", "1", M_EXPANDED|M_FORCE );
X
X ex_val = Make_targets();
X
X Clear_signals();
X Epilog(ex_val); /* Does not return -- EVER */
X}
X
X
Xstatic void
X_do_f_flag( flag, name, fname )
Xchar flag;
Xchar *name;
Xchar **fname;
X{
X if( *fname == NIL(char) ) {
X if( name != NIL(char) ) {
X *fname = name;
X } else
X Fatal("No file name for -%c", flag);
X } else
X Fatal("Only one `-%c file' allowed", flag);
X}
X
X
Xstatic void
X_do_ReadEnvironment()
X{
X t_attr saveattr = Glob_attr;
X
X Glob_attr |= A_SILENT;
X ReadEnvironment();
X Glob_attr = saveattr;
X}
X
X
Xstatic void
X_do_VPATH()
X{
X HASHPTR hp;
X char *_rl[2];
X extern char **Rule_tab;
X
X hp = GET_MACRO("VPATH");
X if( hp == NIL(HASH) ) return;
X
X _rl[0] = ".SOURCE :^ $(VPATH:s/:/ /)";
X _rl[1] = NIL(char);
X
X Rule_tab = _rl;
X Parse( NIL(FILE) );
X}
X
X
X/* The file table and pointer to the next FREE slot for use by both
X Openfile and Closefile. Each open stacks the new file onto the open
X file stack, and a corresponding close will close the passed file, and
X return the next file on the stack. The maximum number of nested
X include files is limited by the value of MAX_INC_DEPTH */
X
Xstatic struct {
X FILE *file; /* file pointer */
X char *name; /* name of file */
X int numb; /* line number */
X} ftab[ MAX_INC_DEPTH ];
X
Xstatic int next_file_slot = 0;
X
X/* Set the proper macro value to reflect the depth of the .INCLUDE directives
X * and the name of the file we are reading.
X */
Xstatic void
X_set_inc_depth()
X{
X char buf[10];
X sprintf( buf, "%d", next_file_slot );
X Def_macro( "INCDEPTH", buf, M_MULTI|M_NOEXPORT );
X Def_macro( "INCFILENAME",
X next_file_slot ? ftab[next_file_slot-1].name : "",
X M_MULTI|M_NOEXPORT );
X}
X
X
XPUBLIC FILE *
XOpenfile(name, mode, err)/*
X===========================
X This routine opens a file for input or output depending on mode.
X If the file name is `-' then it returns standard input.
X The file is pushed onto the open file stack. */
Xchar *name;
Xint mode;
Xint err;
X{
X FILE *fil;
X
X DB_ENTER("Openfile");
X
X if( name == NIL(char) || !*name )
X if( !err )
X DB_RETURN(NIL(FILE));
X else
X Fatal( "Openfile: NIL filename" );
X
X if( next_file_slot == MAX_INC_DEPTH )
X Fatal( "Too many open files. Max nesting level is %d.", MAX_INC_DEPTH);
X
X DB_PRINT( "io", ("Opening file [%s], in slot %d", name, next_file_slot) );
X
X if( strcmp("-", name) == 0 ) {
X name = "stdin";
X fil = stdin;
X }
X else
X fil = fopen( name, mode ? "w":"r" );
X
X if( Verbose & V_FILE_IO )
X printf( "%s: Openning [%s] for %s", Pname, name, mode?"write":"read" );
X
X if( fil == NIL(FILE) ) {
X if( Verbose & V_FILE_IO ) printf( " (fail)\n" );
X if( err )
X Fatal( mode ? "Cannot open file %s for write" : "File %s not found",
X name );
X }
X else {
X if( Verbose & V_FILE_IO ) printf( " (success)\n" );
X ftab[next_file_slot].file = fil;
X ftab[next_file_slot].numb = Line_number;
X ftab[next_file_slot++].name = DmStrDup(name);
X Line_number = 0;
X _set_inc_depth();
X }
X
X DB_RETURN(fil);
X}
X
X
XPUBLIC FILE *
XClosefile()/*
X=============
X This routine is used to close the last file opened. This forces make
X to open files in a last open first close fashion. It returns the
X file pointer to the next file on the stack, and NULL if the stack is empty.*/
X{
X DB_ENTER("Closefile");
X
X if( !next_file_slot )
X DB_RETURN( NIL(FILE) );
X
X if( ftab[--next_file_slot].file != stdin ) {
X DB_PRINT( "io", ("Closing file in slot %d", next_file_slot) );
X
X if( Verbose & V_FILE_IO )
X printf( "%s: Closing [%s]\n", Pname, ftab[next_file_slot].name );
X
X fclose( ftab[next_file_slot].file );
X FREE( ftab[next_file_slot].name );
X }
X
X _set_inc_depth();
X
X if( next_file_slot > 0 ) {
X Line_number = ftab[next_file_slot].numb;
X DB_RETURN( ftab[next_file_slot-1].file );
X }
X else
X Line_number = 0;
X
X DB_RETURN( NIL(FILE) );
X}
X
X
XPUBLIC FILE *
XSearch_file( macname, rname )
Xchar *macname;
Xchar **rname;
X{
X HASHPTR hp;
X FILE *fil = NIL(FILE);
X char *fname;
X char *ename = NIL(char);
X
X /* order of precedence is:
X *
X * MACNAME from command line (precious is marked)
X * ... via MACNAME:=filename definition.
X * MACNAME from environment
X * MACNAME from builtin rules (not precious)
X */
X
X if( (hp = GET_MACRO(macname)) != NIL(HASH) )
X ename = fname = Expand(hp->ht_value);
X
X if( hp->ht_flag & M_PRECIOUS ) fil = Openfile(fname, FALSE, FALSE);
X
X if( fil == NIL(FILE) ) {
X fname=Expand(Read_env_string(macname));
X if( (fil = Openfile(fname, FALSE, FALSE)) != NIL(FILE) ) FREE(ename);
X }
X
X if( fil == NIL(FILE) && hp != NIL(HASH) )
X fil = Openfile(fname=ename, FALSE, FALSE);
X
X if( rname ) *rname = fname;
X
X return(fil);
X}
X
X
XPUBLIC char *
XFilename()/*
X============
X Return name of file on top of stack */
X{
X return( next_file_slot==0 ? NIL(char) : ftab[next_file_slot-1].name );
X}
X
X
XPUBLIC int
XNestlevel()/*
X=============
X Return the file nesting level */
X{
X return( next_file_slot );
X}
X
X
XPUBLIC FILE *
XTryFiles(lp)
XLINKPTR lp;
X{
X FILE *mkfil = NIL(FILE);
X
X if( lp != NIL(LINK) ) {
X int s_n, s_t, s_q;
X
X s_n = Trace;
X s_t = Touch;
X s_q = Check;
X
X Trace = Touch = Check = FALSE;
X Makemkf = Wait_for_completion = TRUE;
X mkfil = NIL(FILE);
X
X for(; lp != NIL(LINK) && mkfil == NIL(FILE); lp=lp->cl_next) {
X if( lp->cl_prq->ce_attr & A_FRINGE ) continue;
X
X mkfil = Openfile( lp->cl_prq->CE_NAME, FALSE, FALSE );
X
X if( mkfil == NIL(FILE) &&
X Make(lp->cl_prq, NIL(CELL)) != -1 )
X mkfil = Openfile( lp->cl_prq->CE_NAME, FALSE, FALSE );
X }
X
X Trace = s_n;
X Touch = s_t;
X Check = s_q;
X Makemkf = Wait_for_completion = FALSE;
X }
X
X return(mkfil);
X}
X
X
X/*
X** print error message from variable arg list
X*/
X
Xstatic int errflg = TRUE;
Xstatic int warnflg = FALSE;
X
Xstatic void
Xerrargs(fmt, args)
Xchar *fmt;
Xva_list args;
X{
X int warn = _warn && warnflg && !(Glob_attr & A_SILENT);
X
X if( errflg || warn ) {
X char *f = Filename();
X
X fprintf( stderr, "%s: ", Pname );
X if( f != NIL(char) ) fprintf(stderr, "%s: line %d: ", f, Line_number);
X
X if( errflg )
X fprintf(stderr, "Error -- ");
X else if( warn )
X fprintf(stderr, "Warning -- ");
X
X vfprintf( stderr, fmt, args );
X putc( '\n', stderr );
X if( errflg && !Continue ) Quit( NIL(CELL) );
X }
X}
X
X/*
X** Print error message and abort
X*/
X#if __STDC__ == 1 && !defined(__GNUC__) && !defined(_MSC_VER)
Xvoid
XFatal(char *fmt, ...)
X#else
X#if defined(_MPW)
XFatal(char *fmt, va_alist)
Xva_dcl
X#else
Xint
XFatal(fmt, va_alist)
Xchar *fmt;
Xva_dcl;
X#endif
X#endif
X{
X va_list args;
X
X va_start(args, fmt);
X Continue = FALSE;
X errargs(fmt, args);
X va_end(args);
X}
X
X/*
X** error message and exit (unless -k)
X*/
X#if __STDC__ == 1 && !defined(__GNUC__) && !defined(_MSC_VER)
Xvoid
XError (char *fmt, ...)
X#else
X#if defined(_MPW)
XError(char *fmt, va_alist)
Xva_dcl
X#else
Xint
XError(fmt, va_alist)
Xchar* fmt;
Xva_dcl;
X#endif
X#endif
X{
X va_list args;
X
X va_start(args, fmt);
X errargs(fmt, args);
X va_end(args);
X}
X
X
X/*
X** non-fatal message
X*/
X#if __STDC__ == 1 && !defined(__GNUC__) && !defined(_MSC_VER)
Xvoid
XWarning(char *fmt, ...)
X#else
X#if defined(_MPW)
XWarning(char *fmt, va_alist)
Xva_dcl
X#else
Xint
XWarning(fmt, va_alist)
Xchar *fmt;
Xva_dcl;
X#endif
X#endif
X{
X va_list args;
X
X va_start(args, fmt);
X warnflg = TRUE;
X errflg = FALSE;
X errargs(fmt, args);
X errflg = TRUE;
X warnflg = FALSE;
X va_end(args);
X}
X
X
XPUBLIC void
XNo_ram()
X{
X Fatal( "No more memory" );
X}
X
X
XPUBLIC void
XUsage( eflag )
Xint eflag;
X{
X register char *p;
X char *fill;
X
X fill = DmStrDup(Pname);
X for(p=fill; *p; p++) *p=' ';
X
X if( eflag ) {
X fprintf(stderr, USAGE, Pname);
X fprintf(stderr, USAGE2, fill);
X }
X else {
X printf(USAGE, Pname);
X printf(USAGE2, fill);
X puts(" -P# - set max number of child processes for parallel make");
X puts(" -f file - use file as the makefile");
X#ifdef MSDOS
X puts(" -C [+]file - duplicate console output to file, ('+' => append)");
X#endif
X puts(" -K file - use file as the .KEEP_STATE file");
X puts(" -w target - show what you would do if 'target' were out of date");
X puts(" -W target - rebuild pretending that 'target' is out of date");
X puts(" -v{cdfimt} - verbose, indicate what we are doing, (-v => -vdimt)");
X puts(" c => dump directory cache info only" );
X puts(" d => dump change of directory info only" );
X puts(" f => dump file open/close info only" );
X puts(" i => dump inference information only" );
X puts(" m => dump make of target information only" );
X puts(" t => keep temporary files when done\n" );
X
X puts("Options: (can be catenated, ie -irn == -i -r -n)");
X puts(" -A - enable AUGMAKE special target mapping");
X puts(" -B - enable the use of spaces instead of tabs to start recipes");
X puts(" -c - use non standard comment scanning");
X puts(" -d - do not use directory cache");
X puts(" -E - define environment strings as macros");
X puts(" -e - same as -E but done after parsing makefile");
X puts(" -g - disable the special meaning of [ ... ] for group recipes");
X puts(" -h - print out usage info");
X puts(" -i - ignore errors");
X puts(" -k - make independent targets, even if errors");
X puts(" -n - trace and print, do not execute commands");
X puts(" -p - print out a version of the makefile");
X puts(" -q - check if target is up to date. Does not do");
X puts(" anything. Returns 0 if up to date, 1 otherwise");
X puts(" -r - don't use internal rules");
X puts(" -s - do your work silently");
X puts(" -S - disable parallel (force sequential) make, overrides -P");
X puts(" -t - touch, update time stamps without executing commands");
X puts(" -T - do not apply transitive closure on inference rules");
X puts(" -u - force unconditional update of target");
X puts(" -V - print out version number");
X puts(" -x - export macro values to environment");
X puts(" -X - ignore #! lines at start of makefile");
X }
X
X Quit(NIL(CELL));
X}
X
X
XPUBLIC void
XVersion()
X{
X extern char **Rule_tab;
X char **p;
X
X printf("%s - %s, ", Pname, sccid);
X printf("Version %s, PL %d\n\n", VERSION, PATCHLEVEL);
X
X puts("Default Configuration:");
X for (p=Rule_tab; *p != NIL(char); p++)
X printf("\t%s\n", *p);
X
X printf("\n");
Xprintf("Please read the file readme/release for the latest release notes.\n");
Xprintf("\n");
Xprintf("Please support the DMAKE Reference Manual project. See the file\n");
Xprintf("readme/release for additional information on where to send contributions.\n");
Xprintf("Or, send mail to dva...@plg.uwaterloo.ca for additional information if the\n");
Xprintf("above file is not readily available.\n");
X
X}
END_OF_FILE
if test 23132 -ne `wc -c <'dmake/dmake.c'`; then
echo shar: \"'dmake/dmake.c'\" unpacked with wrong size!
fi
# end of 'dmake/dmake.c'
fi
if test -f 'dmake/man/dmake.uue.B' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/man/dmake.uue.B'\"
else
echo shar: Extracting \"'dmake/man/dmake.uue.B'\" \(42762 characters\)
sed "s/^X//" >'dmake/man/dmake.uue.B' <<'END_OF_FILE'
XMUX2#B:YMM5C;B9Y(V[5]%3) BEYABKN-B@-5M@8%W CEBL.]M@[5MKN=W&O)
XMM9#(+$V &*!<DN &2Q<S$W<S5W<SFW<SU7<E(Q!$4W@ @4E67PADY#A@7L
XMEV\X[+VKK_@NJJL!<)EG4;E:U(V(0G+=S[6]]];;! @@%BB'!0B !5" %!0
XM<T^ $\P! B@U"+G<S[W<4R0! B@BPC0!$F $G <THDU >#^<_&&)HO51;D
XM'M'SKC."!P+DYOJ*%9C?!@0A$[V1'F4B;:L!<-9OGMB_<$!3/)D#8K>AKSI]
XM]*>)WI.B(05A- #)+"KG!!SG<2#W<6L$&$*=+T0AU]'S801>;1X- D[@<4R@
XMKUBQ49A%W\4J.XRB4W#F%^.#X[7=$=NCHLSY&.&2;5;;S2OA!!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'WQ:-;D"W+K;8K.C+
XM[.;.S,V?3@3#<1_)F@1'$ 3W@1%C$+JH<G""5/74/H0V0WETU.@&Y">>>M9B
XMP.8^OT6/=R7-7A?/GK2E1%JR&!FZA%2W5!9O .F]SP9$(XM3P;Z3LP;W<8[[
XM\B?D$6 089;SEI:?>.@4DI6? 3;$CC;@WFE3B7 $3K518T1(LJ%($3C*TP8Y
XM B8!2"%!PGQK#Q5YHXA)F!92G!7G+^X7$1KLZRFY[$19<P4(< 7(*D]2\((!
XM]8(&=;C80QY2,'!$V#8CV.:M@P+7=^IY,_*[W(\[Q+_)YSI-E+M\$I4ZHA]1
XM^Q5@@0(M0 5#*1P"901%( 4_:6Y0< 5)^;N$818OL :=DN%>BW X]#9M %/K
XM=D:MI;[F'YQ0D7<+$9U,T0*_-K!#L9'FGU4N8FZ-Q"+X(@=P<6=][[9!13@L
XMV 3. H/W09/9H1J['!T,6([D 7^TX08G,!)/7Z+$_5D3<8J)WY-L(KW+LBS+
X:LBS+LBS+LBRRPND0X:-''J1)KN2^4@,UH !/
X
Xend
END_OF_FILE
if test 42762 -ne `wc -c <'dmake/man/dmake.uue.B'`; then
echo shar: \"'dmake/man/dmake.uue.B'\" unpacked with wrong size!
elif test -f 'dmake/man/dmake.uue.A'; then
echo shar: Combining \"'dmake/man/dmake.uue'\" \(86118 characters\)
cat 'dmake/man/dmake.uue.A' 'dmake/man/dmake.uue.B' > 'dmake/man/dmake.uue'
if test 86118 -ne `wc -c <'dmake/man/dmake.uue'`; then
echo shar: \"'dmake/man/dmake.uue'\" combined with wrong size!
else
rm dmake/man/dmake.uue.A dmake/man/dmake.uue.B
fi
fi
# end of 'dmake/man/dmake.uue.B'
fi
echo shar: End of archive 8 \(of 27\).
cp /dev/null ark8isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/infer.c dmake/msdos/exec.asm
# dmake/unix/sysvr3/config.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:35 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 9 (of 27)."'
if test -f 'dmake/infer.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/infer.c'\"
else
echo shar: Extracting \"'dmake/infer.c'\" \(24669 characters\)
sed "s/^X//" >'dmake/infer.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/infer.c,v 1.1 1994/10/06 17:41:36 dvadura Exp $
X-- SYNOPSIS -- infer how to make a target.
X--
X-- DESCRIPTION
X-- This file contains the code to infer a recipe, and possibly some new
X-- prerequisites for a target which dmake does not know how to make, or
X-- has no explicit recipe.
X--
X-- The inference fails if no path through the inference graph can be
X-- found by which we can make the target.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: infer.c,v $
X * Revision 1.1 1994/10/06 17:41:36 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X/* attributes that get transfered from the % start cell to the inferred
X * cells. */
X
X#define A_TRANSFER (A_EPILOG | A_PRECIOUS | A_SILENT | A_SHELL | A_SETDIR |\
X A_SEQ | A_LIBRARY | A_IGNORE | A_PROLOG | A_SWAP |\
X A_NOSTATE )
X
X
X/* Define local static functions */
Xstatic DFALINKPTR dfa_subset ANSI((DFALINKPTR, DFASETPTR));
Xstatic void free_dfas ANSI((DFALINKPTR));
Xstatic int count_dots ANSI((char *));
Xstatic char * buildname ANSI((char *, char *, char *));
Xstatic void free_icells ANSI(());
Xstatic ICELLPTR union_iset ANSI((ICELLPTR, ICELLPTR));
Xstatic ICELLPTR add_iset ANSI((ICELLPTR,ICELLPTR,CELLPTR,DFALINKPTR,
X CELLPTR,int,int,char *,char *, int));
Xstatic ICELLPTR derive_prerequisites ANSI((ICELLPTR, ICELLPTR *));
Xstatic char * dump_inf_chain ANSI((ICELLPTR, int, int));
X
X
XPUBLIC void
XInfer_recipe( cp, setdirroot )/*
X================================
X Perform a breadth-first search of the inference graph and return if
X possible an inferred set of prerequisites for making the current target. */
XCELLPTR cp;
XCELLPTR setdirroot;
X{
X ICELLPTR nomatch, match;
X
X DB_ENTER("Infer_recipe");
X
X if( cp->ce_attr & A_NOINFER ) {DB_VOID_RETURN;}
X
X match = NIL(ICELL);
X nomatch = add_iset( NIL(ICELL), NIL(ICELL), NIL(CELL), NIL(DFALINK),
X setdirroot, Prep+count_dots(cp->CE_NAME), 0,
X DmStrDup(cp->CE_NAME), NIL(char),
X cp->ce_time != (time_t)0L);
X
X /* Make sure we try whole heartedly to infer at least one suffix */
X if( nomatch->ic_dmax == 0 ) ++nomatch->ic_dmax;
X
X DB_EXECUTE( "inf", _dump_iset("nomatch",nomatch); );
X
X while( nomatch != NIL(ICELL) ) {
X ICELLPTR new_nomatch = NIL(ICELL);
X ICELLPTR ic, pmatch, mmatch;
X CELLPTR prereq;
X int first;
X
X for( ic=nomatch; ic != NIL(ICELL); ic=ic->ic_next ) {
X int ipush = FALSE;
X
X if( ic->ic_dir ) ipush = Push_dir(ic->ic_dir, ic->ic_name, FALSE);
X match = union_iset(match, derive_prerequisites(ic, &new_nomatch));
X if( ipush ) Pop_dir(FALSE);
X }
X
X DB_EXECUTE( "inf", _dump_iset("match",match); );
X DB_EXECUTE( "inf", _dump_iset("nomatch",new_nomatch); );
X
X /* We have now deduced the two sets MATCH and NOMATCH. MATCH holds the
X * set of edges that we encountered that matched. If this set is empty
X * then we can apply transitive closure (if enabled) to the elements of
X * NOMATCH to see if we can find some other method to make the target.
X *
X * If MATCH is non-empty, we have found a method for making the target.
X * It is the shortest method for doing so (ie. uses fewest number of
X * steps). If MATCH contains more than one element then we have a
X * possible ambiguity.
X */
X if( match == NIL(ICELL) ) {
X nomatch = new_nomatch;
X if( Transitive ) continue;
X goto all_done;
X }
X
X /* Ok, we have a set of possible matches in MATCH, we should check the
X * set for ambiguity. If more than one inference path exists of the
X * same depth, then we may issue an ambiguous inference error message.
X *
X * The message is suppressed if MATCH contains two elements and one of
X * them is the empty-prerequisite-rule. In this case we ignore the
X * ambiguity and take the rule that infers the prerequisite.
X *
X * Also if there are any chains that rely on a non-existant prerequisite
X * that may get made because it has a recipe then we prefer any that
X * rely on existing final prerequisites over those that we have to make.
X */
X
X /* Split out those that have to be made from those that end in
X * prerequisites that already exist. */
X pmatch = mmatch = NIL(ICELL);
X for(; match; match = ic ) {
X ic = match->ic_next;
X match->ic_next = NIL(ICELL);
X
X if( match->ic_exists )
X pmatch = union_iset(pmatch, match);
X else
X mmatch = union_iset(mmatch, match);
X }
X
X if( pmatch )
X match = pmatch;
X else
X match = mmatch;
X
X /* Make sure it is unique */
X if( match->ic_next != NIL(ICELL) ) {
X int dump = (match->ic_next->ic_next != NIL(ICELL));
X
X /* Check for definite ambiguity */
X if( !dump )
X if( (match->ic_meta->ce_prq && match->ic_next->ic_meta->ce_prq) ||
X (!match->ic_meta->ce_prq && !match->ic_next->ic_meta->ce_prq) )
X dump = TRUE;
X else if(!match->ic_meta->ce_prq && match->ic_next->ic_meta->ce_prq )
X match = match->ic_next;
X
X if( dump ) {
X int count = 1;
X
X Continue = TRUE;
X Error( "Ambiguous inference chains for target '%s'", cp->CE_NAME );
X for( ic=match; ic; ic=ic->ic_next )
X (void) dump_inf_chain(ic, TRUE, count++);
X Fatal( "resolve ambiguity before proceeding.");
X /*NOTREACHED*/
X }
X }
X
X /* MATCH now points at the derived recipe. We must now take cp, and
X * construct the correct graph so that the make may proceed. */
X
X if( Verbose & V_INFER ) {
X char *tmp = dump_inf_chain(match, TRUE, FALSE);
X printf("%s: Inferring prerequistes and recipes using:\n%s: ... %s\n",
X Pname, Pname, tmp );
X FREE(tmp); }
X
X pmatch = NIL(ICELL);
X prereq = NIL(CELL);
X first = TRUE;
X
X while( match ) {
X CELLPTR infcell=NIL(CELL);
X
X /* Compute the inferred prerequisite first. */
X if( match->ic_name ) {
X if( match->ic_meta )
X infcell = Def_cell( match->ic_name );
X else
X infcell = cp;
X
X infcell->ce_flag |= F_TARGET;
X
X if( infcell != cp ) {
X infcell->ce_flag |= F_INFER;
X if( !first ) infcell->ce_flag |= F_REMOVE;
X }
X
X if( !match->ic_flag )
X infcell->ce_attr |= A_NOINFER;
X
X first = FALSE;
X }
X
X /* Add global prerequisites from previous rule if there are any and
X * the recipe. */
X if( pmatch ) {
X CELLPTR imeta = pmatch->ic_meta;
X LINKPTR lp;
X
X infcell->ce_per = pmatch->ic_dfa->dl_per;
X infcell->ce_attr |= (imeta->ce_attr & A_TRANSFER);
X
X if( !(infcell->ce_flag & F_RULES) ) {
X infcell->ce_flag |= (imeta->ce_flag&(F_SINGLE|F_GROUP))|F_RULES;
X infcell->ce_recipe = imeta->ce_recipe;
X }
X
X /* Add any conditional macro definitions that may be associated
X * with the inferred cell. */
X if (imeta->ce_cond != NIL(STRING)) {
X STRINGPTR sp,last;
X
X last = infcell->ce_cond;
X for(sp=imeta->ce_cond; sp; sp=sp->st_next) {
X STRINGPTR new;
X TALLOC(new, 1, STRING);
X new->st_string = DmStrDup(sp->st_string);
X if(last)
X last->st_next = new;
X else
X infcell->ce_cond = new;
X last = new;
X }
X }
X
X pmatch->ic_dfa->dl_per = NIL(char);
X
X /* If infcell already had a directory set then modify it based on
X * whether it was the original cell or some intermediary. */
X if( imeta->ce_dir )
X if( infcell->ce_dir && infcell == cp ) {
X /* cp->ce_dir was set and we have pushed the directory prior
X * to calling this routine. We should therefore pop it and
X * push the new concatenated directory required by the
X * inference. */
X infcell->ce_dir=DmStrDup(Build_path(infcell->ce_dir,
X imeta->ce_dir));
X }
X else
X infcell->ce_dir = imeta->ce_dir;
X
X for( lp=imeta->ce_indprq; lp != NIL(LINK); lp=lp->cl_next ) {
X char *name = lp->cl_prq->CE_NAME;
X CELLPTR tcp;
X
X name = buildname( cp->CE_NAME, name, infcell->ce_per );
X tcp = Def_cell( name );
X tcp->ce_flag |= F_REMOVE;
X Add_prerequisite( infcell, tcp, FALSE, FALSE );
X
X if( Verbose & V_INFER )
X printf( "%s: Inferred indirect prerequisite [%s]\n",
X Pname, name );
X FREE(name);
X }
X }
X
X /* Add the previous cell as the prerequisite */
X if( prereq )
X (Add_prerequisite(infcell,prereq,FALSE,FALSE))->cl_flag |=F_TARGET;
X
X pmatch = match;
X prereq = infcell;
X match = match->ic_parent;
X }
X
X DB_PRINT("inf", ("Terminated due to a match"));
X break;
X }
X
Xall_done:
X free_icells();
X
X DB_VOID_RETURN;
X}
X
X
Xstatic ICELLPTR
Xderive_prerequisites( ic, nnmp )/*
X===================================
X Take a cell and derive a set of prerequisites from the cell. Categorize
X them into those that MATCH (ie. those that we found in the file system),
X and those that do not match NOMATCH that we may possibly have a look at
X later. When we process the next level of the breadth-first search.
X
X Once MATCH is non-empty we will stop inserting elements into NOMATCH
X since we know that either MATCH is successful and unique or it will
X issue an ambiguity error. We will never go on to look at elements
X in NOMATCH after wards. */
XICELLPTR ic;
XICELLPTR *nnmp;
X{
X ICELLPTR match = NIL(ICELL);
X DFALINKPTR pdfa;
X DFALINKPTR dfas;
X
X DB_ENTER("derive_prerequisites");
X
X /* If none of the inference nodes match then forget about the inference.
X * The user did not tell us how to make such a target. We also stop the
X * Inference if the new set of DFA's is a proper subset of a previous
X * subset and it's PREP counts exceed the value of Prep.
X */
X dfas = dfa_subset( Match_dfa(ic->ic_name), &ic->ic_dfastack );
X
X DB_EXECUTE("inf", _dump_dfa_stack(dfas, &ic->ic_dfastack); );
X
X /* Ok, we have nothing here to work with so return an empty cell. */
X if( dfas == NIL(DFALINK) ) {
X DB_PRINT( "mem", ("%s:<- mem %ld",ic->ic_name, (long)coreleft()));
X DB_PRINT( "inf", ("<<< Exit, no dfas, cp = %04x", NIL(CELL)) );
X DB_RETURN( NIL(ICELL) );
X }
X
X /* Save the dfas, we are going to use on the stack for this cell. */
X ic->ic_dfastack.df_set = dfas;
X
X /* Run through the %-meta cells, build the prerequisite cells. For each
X * %-meta go through it's list of edges and try to use each in turn to
X * deduce a likely prerequisite. We perform a breadth-first search
X * matching the first path that results in a unique method for making the
X * target. */
X for( pdfa = dfas; pdfa != NIL(DFALINK); pdfa = pdfa->dl_next ) {
X LINK tl;
X LINKPTR edge;
X CELLPTR pmeta;
X
X pmeta = pdfa->dl_meta;
X DB_PRINT( "inf", ("Using dfa: [%s]", pmeta->CE_NAME) );
X
X /* If the %-meta is a singleton meta then deal with it differently from
X * the case when it is a bunch of %-meta's found on the original entries
X * prerequisite list. */
X if( pmeta->ce_flag & F_MULTI )
X edge = pmeta->ce_prq;
X else {
X tl.cl_prq = pmeta;
X tl.cl_next = NIL(LINK);
X edge = &tl;
X }
X
X /* Now run through the list of prerequisite edge's for the %-meta. */
X for( ; edge != NIL(LINK); edge = edge->cl_next ) {
X HASHPTR thp; /* temporary hash table pointer */
X HASH iprqh; /* hash cell for new prerequisite */
X CELL iprq; /* inferred prerequisite to look for */
X CELLPTR idirroot; /* Inferred prerequisite root */
X CELLPTR nidirroot; /* Inferred prerequisite root */
X STRINGPTR ircp; /* Inferred prerequisites recipe */
X char *idir; /* directory to CD to. */
X int ipush = 0; /* flag for push on inferred prereq */
X char *name = NIL(char); /* prerequisite name */
X CELLPTR meta = edge->cl_prq;
X int dmax_fix;
X int trans;
X int noinf;
X int exists;
X
X if( meta->ce_prq )
X name = meta->ce_prq->cl_prq->CE_NAME;
X
X DB_PRINT( "inf", ("Trying edge from [%s] to [%s] for [%s]",
X meta->CE_NAME, name?name:"(nil)", ic->ic_name) );
X
X /* Set the temp CELL used for building prerequisite candidates to
X * all zero so that we don't have to keep initializing all the
X * fields. */
X {
X register char *s = (char *) &iprq;
X register int n = sizeof(CELL);
X while( n ) { *s++ = '\0'; n--; }
X }
X
X nidirroot = idirroot = ic->ic_setdirroot;
X iprq.ce_name = &iprqh;
X
X if( name ) {
X /* Build the prerequisite name from the %-meta prerequisite given
X * for the %-meta rule. */
X iprqh.ht_name = buildname( ic->ic_name, name, pdfa->dl_per );
X if((dmax_fix = (count_dots(name)-count_dots(meta->CE_NAME))) < 0)
X dmax_fix = 0;
X
X if( !strcmp(ic->ic_name, iprqh.ht_name) ||
X (count_dots(iprqh.ht_name) > ic->ic_dmax + dmax_fix) ) {
X FREE( iprqh.ht_name );
X continue;
X }
X
X DB_PRINT( "inf", ("Checking prerequisite [%s]", iprqh.ht_name) );
X
X /* See if the prerequisite CELL has been previously defined. If
X * it has, then make a copy of it into iprq, and use it to try
X * the inference. We make the copy so that we don't modify the
X * stat of the inferred cell if the inference fails.
X */
X thp = Get_name( iprqh.ht_name, Defs, FALSE );
X if(thp != NIL(HASH)) {
X iprq = *thp->CP_OWNR;
X ircp = iprq.ce_recipe;
X }
X else
X ircp = NIL(STRING);
X }
X else
X iprqh.ht_name = NIL(char);
X
X
X /* If the %-meta has a .SETDIR set then we change to the new
X * directory prior to performing the stat of the new prerequisite.
X * If the change of directory fails then the rule is droped from
X * further consideration.
X */
X if( iprq.ce_dir ) {
X if( (ipush = Push_dir(iprq.ce_dir, iprqh.ht_name, TRUE)) != 0 ) {
X nidirroot = thp->CP_OWNR;
X idir = Pwd;
X }
X else {
X if( iprqh.ht_name ) FREE( iprqh.ht_name );
X continue;
X }
X }
X else
X idir = NIL(char);
X
X
X /* Stat the inferred prerequisite.
X */
X if( name ) {
X if( Verbose & V_INFER )
X printf( "%s: Trying prerequisite [%s] for [%s]\n", Pname,
X iprqh.ht_name, ic->ic_name );
X
X if( !(iprq.ce_flag & F_STAT) ) Stat_target(&iprq, FALSE, FALSE);
X }
X
X
X /* If the STAT succeeded or if the prerequisite has a recipe for
X * making it then it's a match and a candidate for getting infered.
X * Otherwise it is not a match, and we cannot yet tell if it is
X * going to be a successful path to follow, so we save it for
X * later consideration.
X */
X noinf = ((Glob_attr)&A_NOINFER);
X if( meta->ce_prq )
X noinf |= ((meta->ce_prq->cl_prq->ce_attr)&A_NOINFER);
X trans = Transitive || !noinf;
X exists = (iprq.ce_time != (time_t)0L);
X
X if( exists || (ircp != NIL(STRING)) || !name ) {
X match = add_iset( match, ic, meta, pdfa, idirroot, ic->ic_dmax,
X trans, iprq.ce_name->ht_name, idir, exists );
X DB_PRINT("inf",("Added to MATCH %s",iprq.ce_name->ht_name));
X }
X else if( !noinf && match == NIL(ICELL) ) {
X *nnmp = add_iset( *nnmp, ic, meta, pdfa, nidirroot, ic->ic_dmax,
X trans, iprq.ce_name->ht_name, idir, exists );
X DB_PRINT("inf",("Added to NOMATCH %s",iprq.ce_name->ht_name));
X }
X
X /* If we pushed a directory for the inferred prerequisite then
X * pop it.
X */
X if( ipush ) Pop_dir(FALSE);
X if( iprqh.ht_name ) FREE(iprqh.ht_name);
X }
X }
X
X DB_RETURN(match);
X}
X
X
Xstatic char *
Xbuildname( tg, meta, per )
Xchar *tg;
Xchar *meta;
Xchar *per;
X{
X char *name;
X
X name = Apply_edit( meta, "%", per, FALSE, FALSE );
X if( strchr(name, '$') ) {
X HASHPTR m_at;
X char *tmp;
X
X m_at = Def_macro( "@", tg, M_MULTI );
X tmp = Expand( name );
X
X if( m_at->ht_value != NIL(char) ) {
X FREE( m_at->ht_value );
X m_at->ht_value = NIL(char);
X }
X
X if( name != meta ) FREE( name );
X name = tmp;
X }
X else if( name == meta )
X name = DmStrDup( name );
X
X return(name);
X}
X
X
Xstatic DFALINKPTR
Xdfa_subset( pdfa, stack )/*
X============================
X This is the valid DFA subset computation. Whenever a CELL has a Match_dfa
X subset computed this algorithm is run to see if any of the previously
X computed sets on the DFA stack are proper subsets of the new set. If they
X are, then any elements of the matching subset whose Prep counts exceed
X the allowed maximum given by Prep are removed from the computed DFA set,
X and hence from consideration, thereby cutting off the cycle in the
X inference graph. */
XDFALINKPTR pdfa;
Xregister DFASETPTR stack;
X{
X register DFALINKPTR element;
X DFALINKPTR nelement;
X
X DB_ENTER( "dfa_subset" );
X
X DB_PRINT("inf",("Computing DFA subset, PREP = %d",Prep));
X DB_EXECUTE("inf", _dump_dfa_stack(pdfa, stack); );
X
X for(; pdfa != NIL(DFALINK) && stack != NIL(DFASET); stack = stack->df_next) {
X int subset = TRUE;
X
X for( element=stack->df_set; subset && element != NIL(DFALINK);
X element=element->dl_next ) {
X register DFALINKPTR subel;
X
X for( subel = pdfa;
X subel != NIL(DFALINK) && (subel->dl_meta != element->dl_meta);
X subel = subel->dl_next );
X
X DB_PRINT("inf",("Looking for %s, (%s)",element->dl_meta->CE_NAME,
X (subel != NIL(DFALINK))?"succ":"fail"));
X
X if( (subset = (subel != NIL(DFALINK))) != 0 )
X element->dl_member = subel;
X }
X
X if( subset )
X for( element=stack->df_set; element != NIL(DFALINK);
X element=element->dl_next ) {
X DFALINKPTR mem = element->dl_member;
X int npr = element->dl_prep + 1;
X
X if( npr > Prep )
X mem->dl_delete++;
X else
X mem->dl_prep = npr;
X }
X }
X
X for( element = pdfa; element != NIL(DFALINK); element = nelement ) {
X nelement = element->dl_next;
X
X if( element->dl_delete ) {
X /* A member of the subset has a PREP count equal to PREP, so
X * it should not be considered further in the inference, hence
X * we remove it from the doubly linked set list */
X if( element == pdfa )
X pdfa = element->dl_next;
X else
X element->dl_prev->dl_next = element->dl_next;
X
X if( element->dl_next != NIL(DFALINK) )
X element->dl_next->dl_prev = element->dl_prev;
X
X DB_PRINT("inf", ("deleting dfa [%s]", element->dl_meta->CE_NAME));
X FREE( element->dl_per );
X FREE( element );
X }
X }
X
X DB_RETURN( pdfa );
X}
X
X
X
Xstatic void
Xfree_dfas( chain )/*
X=====================
X Free the list of DFA's constructed by Match_dfa, and linked together by
X LINK cells. FREE the % value as well, as long as it isn't NIL. */
XDFALINKPTR chain;
X{
X register DFALINKPTR tl;
X
X DB_ENTER( "free_dfas" );
X
X for( tl=chain; tl != NIL(DFALINK); chain = tl ) {
X tl = tl->dl_next;
X
X DB_PRINT( "inf", ("Freeing DFA [%s], %% = [%s]", chain->dl_meta->CE_NAME,
X chain->dl_per) );
X
X if( chain->dl_per != NIL(char) ) FREE( chain->dl_per );
X FREE( chain );
X }
X
X DB_VOID_RETURN;
X}
X
X
Xstatic int
Xcount_dots( name )/*
X=====================*/
Xchar *name;
X{
X register char *p;
X register int i = 0;
X
X for( p = name; *p; p++ ) if(*p == '.') i++;
X
X return( i );
X}
X
X
Xstatic ICELLPTR _icells = NIL(ICELL);
X#ifdef DBUG
Xstatic int _icell_cost = 0;
X#endif
X
Xstatic ICELLPTR
Xadd_iset( iset, parent, meta, dfa, setdirroot, dmax, noinf, name, dir, exists)
XICELLPTR iset;
XICELLPTR parent;
XCELLPTR meta;
XDFALINKPTR dfa;
XCELLPTR setdirroot;
Xint dmax;
Xint noinf;
Xchar *name;
Xchar *dir;
Xint exists;
X{
X ICELLPTR icell;
X
X DB_ENTER("add_iset");
X TALLOC(icell, 1, ICELL);
X
X DB_EXECUTE("inf", _icell_cost+=(sizeof(ICELL)+strlen(dir?dir:"")+strlen(name?name:"")+2););
X
X icell->ic_meta = meta;
X icell->ic_dfa = dfa;
X icell->ic_setdirroot = setdirroot;
X
X if( parent ) icell->ic_dfastack.df_next = &parent->ic_dfastack;
X
X icell->ic_dmax = dmax;
X icell->ic_dir = DmStrDup(dir);
X icell->ic_name = DmStrDup(name);
X icell->ic_parent = parent;
X icell->ic_next = iset;
X icell->ic_flag = noinf;
X icell->ic_exists = exists;
X
X icell->ic_link = _icells;
X _icells = icell;
X
X DB_RETURN(icell);
X}
X
X
Xstatic void
Xfree_icells()
X{
X register ICELLPTR ic;
X
X DB_ENTER("free_icells");
X
X for( ; _icells; _icells = ic ) {
X ic = _icells->ic_link;
X
X free_dfas(_icells->ic_dfastack.df_set);
X if( _icells->ic_dir ) FREE(_icells->ic_dir);
X if( _icells->ic_name) FREE(_icells->ic_name);
X FREE(_icells);
X }
X
X DB_PRINT("inf",("Used %d memory for icells",_icell_cost));
X DB_EXECUTE("inf", _icell_cost=0; );
X
X DB_VOID_RETURN;
X}
X
X
Xstatic ICELLPTR
Xunion_iset( iset, uset )
XICELLPTR iset;
XICELLPTR uset;
X{
X register ICELLPTR ic;
X
X if( iset == NIL(ICELL) ) return(uset);
X
X for( ic=iset; ic->ic_next != NIL(ICELL); ic=ic->ic_next );
X ic->ic_next = uset;
X
X return(iset);
X}
X
X
Xstatic char *
Xdump_inf_chain( ip, flag, print )/*
X====================================*/
XICELLPTR ip;
Xint flag;
Xint print;
X{
X char *tmp;
X
X if( ip == NIL(ICELL) ) return(NIL(char));
X
X tmp = dump_inf_chain(ip->ic_parent, FALSE, FALSE);
X
X if( ip->ic_meta ) {
X tmp = DmStrJoin(tmp, "(", -1, TRUE);
X tmp = DmStrJoin(tmp, ip->ic_meta->CE_NAME, -1, TRUE);
X
X if( ip->ic_dir && !*ip->ic_dir ) {
X tmp = DmStrJoin(tmp, "[", -1, TRUE);
X if( strncmp(Makedir,ip->ic_dir, strlen(Makedir)) )
X tmp = DmStrJoin(tmp, ip->ic_dir, -1, TRUE);
X else
X tmp = DmStrJoin(tmp, ip->ic_dir+strlen(Makedir)+1, -1, TRUE);
X tmp = DmStrJoin(tmp, "]", -1, TRUE);
X }
X tmp = DmStrJoin(tmp, (ip->ic_name)?") -->":")", -1, TRUE);
X }
X
X if( ip->ic_name ) tmp = DmStrApp( tmp, ip->ic_name );
X
X if( flag && ip->ic_meta->ce_prq) {
X tmp = DmStrJoin(tmp, "(", -1, TRUE);
X tmp = DmStrJoin(tmp, ip->ic_meta->ce_prq->cl_prq->CE_NAME, -1, TRUE);
X tmp = DmStrJoin(tmp, ")", -1, TRUE);
X }
X
X if( print ) {
X fprintf( stderr, "%s: %2d. %s\n", Pname, print, tmp );
X FREE(tmp);
X tmp = NIL(char);
X }
X
X return(tmp);
X}
X
X
X#ifdef DBUG
X_dump_dfa_stack(dfas, dfa_stack)
XDFALINKPTR dfas;
XDFASETPTR dfa_stack;
X{
X register DFALINKPTR pdfa;
X char *tmp = NIL(char);
X DFASETPTR ds;
X
X for( pdfa = dfas; pdfa != NIL(DFALINK); pdfa = pdfa->dl_next )
X tmp = DmStrApp( tmp, pdfa->dl_meta->CE_NAME );
X
X tmp = DmStrApp( tmp, ":: {" );
X for( ds = dfa_stack; ds != NIL(DFASET); ds = ds->df_next ) {
X tmp = DmStrApp( tmp, "[" );
X for( pdfa = ds->df_set; pdfa != NIL(DFALINK); pdfa = pdfa->dl_next )
X tmp = DmStrApp( tmp, pdfa->dl_meta->CE_NAME );
X tmp = DmStrApp( tmp, "]" );
X }
X tmp = DmStrApp( tmp, "}" );
X
X printf( "DFA set and stack contents:\n%s\n", tmp );
X FREE(tmp);
X}
X
X
X_dump_iset( name, iset )
Xchar *name;
XICELLPTR iset;
X{
X int cell = 0;
X
X printf( "**** ISET for %s\n", name );
X for( ; iset != NIL(ICELL); iset = iset->ic_next ){
X printf( "cell %d\n", cell++ );
X if( iset->ic_meta )
X printf( "edge: %s --> %s\n", iset->ic_meta->CE_NAME,
X iset->ic_meta->ce_prq ?
X iset->ic_meta->ce_prq->cl_prq->CE_NAME :
X "(nil)" );
X else
X printf( "edge: (nil)\n" );
X
X if( iset->ic_dfa )
X printf( "dfa: %s\n", iset->ic_dfa->dl_meta->CE_NAME );
X else
X printf( "dfa: (nil)\n" );
X
X printf( "sdr: %04x\n", iset->ic_setdirroot );
X _dump_dfa_stack(iset->ic_dfastack.df_set, &iset->ic_dfastack);
X
X printf( "dmax: %d\n", iset->ic_dmax );
X printf( "name: %s\n", iset->ic_name );
X printf( "dir: %s\n", iset->ic_dir?iset->ic_dir:"(nil)" );
X
X printf( "parent: " );
X if( iset->ic_parent )
X if( iset->ic_parent->ic_meta )
X printf( "%s --> %s\n",
X iset->ic_parent->ic_meta->CE_NAME,
X iset->ic_parent->ic_meta->ce_prq ?
X iset->ic_parent->ic_meta->ce_prq->cl_prq->CE_NAME :
X "(nil)" );
X else
X printf( "(nil)\n" );
X else
X printf( "(nil)\n" );
X }
X printf( "==================================\n" );
X}
X#endif
END_OF_FILE
if test 24669 -ne `wc -c <'dmake/infer.c'`; then
echo shar: \"'dmake/infer.c'\" unpacked with wrong size!
fi
# end of 'dmake/infer.c'
fi
if test -f 'dmake/msdos/exec.asm' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/exec.asm'\"
else
echo shar: Extracting \"'dmake/msdos/exec.asm'\" \(38609 characters\)
sed "s/^X//" >'dmake/msdos/exec.asm' <<'END_OF_FILE'
X;
X; DESCRIPTION
X; This code is a model independent version of DOS exec that will swap
X; the calling process out to secondary storage prior to running the
X; child. The prototype for calling the exec function is below.
X;
X; exec( int swap, char far *program, char far *cmdtail,
X; int environment_seg, char far *tmpfilename );
X;
X;
X; To assemble this file issue the command:
X;
X; tasm /mx /t /dmmodel exec.asm
X;
X; where 'model' is one of {small, compact, medium, large}, you may
X; also use MASM 5.1 to assemble this file, in this case simply replace
X; 'tasm' with 'masm' in the above command line.
X;
X; AUTHOR
X; Dennis Vadura, dva...@watdragon.uwaterloo.ca
X; CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X;
X; COPYRIGHT
X; Copyright (c) 1990 by Dennis Vadura. All rights reserved.
X;
X; This program is free software; you can redistribute it and/or
X; modify it under the terms of the GNU General Public License
X; (version 1), as published by the Free Software Foundation, and
X; found in the file 'LICENSE' included with this distribution.
X;
X; This program is distributed in the hope that it will be useful,
X; but WITHOUT ANY WARRANTY; without even the implied warrant of
X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X; GNU General Public License for more details.
X;
X; You should have received a copy of the GNU General Public License
X; along with this program; if not, write to the Free Software
X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X;
Xifdef have286
X .286 ; define have286 with -D for 80286 processor or better
X mpusha Macro
X pusha
X Endm
X
X mpopa Macro
X popa
X Endm
X
Xelse ; 8088/8086 compatible
X mpusha Macro
X push ax
X push cx
X push dx
X push bx
X push sp
X push bp
X push si
X push di
X Endm
X
X mpopa Macro
X pop di
X pop si
X pop bp
X add sp,2
X pop bx
X pop dx
X pop cx
X pop ax
X Endm
Xendif
X
Xifdef msmall
X .model small
Xargbase equ 4
Xendif
Xifdef mcompact
X .model compact
Xargbase equ 4
Xendif
Xifdef mmedium
X .model medium
Xargbase equ 6
Xendif
Xifdef mlarge
X .model large
Xargbase equ 6
Xendif
Xa_swap equ <bp+argbase+0>
Xa_prog equ <bp+argbase+2>
Xa_tail equ <bp+argbase+6>
Xa_env equ <bp+argbase+10>
Xa_tmp equ <bp+argbase+12>
X
Xa_handle equ <bp+argbase>
X
X
X; Define all useful equ's
Xswap_xms equ 0 ; we swapped it out to xms
Xswap_ems equ 2 ; we swapped it out to ems
Xswap_file equ 4 ; we swapped it out to a file
Xseg_no_alloc equ 0 ; this is part of a segment
Xseg_alloc equ 1 ; this is a full segment header
Xseg_data equ 2 ; this is data for part of a segment
X
X
X; Define any global/external variables that we will be accessing from here.
X .data
X extrn _errno:word ; Set to dos ret code from exec
X public _Interrupted ; Set to 1 if interrupted 0
X_Interrupted dw 0 ; otherwise
X
X .code
X assume cs:@code, ds:@code, ss:@code, es:@code
X
X even
Xexecstack dw 64 dup (?) ; put the temporary exec stack right
Xexec_sp label word ; at the start.
X
Xold_ss dw ? ; save stack seg across exec
Xold_sp dw ? ; save stack ptr across exec
Xprogsize dw ? ; original size of the program
Xrootsize dw ? ; size of base root kept during swap
Xresend dw ? ; paragraph where resident code ends
Xenvseg dw ? ; paragraph of environment segment
Xpsp dw ? ; our own psp
Xswap dw ? ; swapping selection flag
Xeretcode dw ? ; return code from exec
Xinterrupted dw ? ; interrupted flag for exec
Xarenahead dw ? ; start of memory block list
Xalstr dw ? ; allocation strategy save spot
Xin_exec dw 0 ; flag, 1 ==> in exec
X
Xcmdpath db 65 dup(?) ; file to exec
Xcmdtail db 129 dup(?) ; its command tail
Xfcb db 37 dup(0) ; dummy fcb
Xtmpseg db 7 dup(?) ; block header buffer
X
Xtmpname db 65 dup(0) ; name of temporary file resource
X
X even
Xtmphandle dw ? ; handle for temporary file
Xreal_21h dd 0 ; will be DOS's 21h vector if doing -C
X
Xstd_fil_handle dw ? ; file handle for -C file
Xstd_fil_number db ? ; system file number for -C file
Xour_stdout db ? ; sys file number our stdout handle
X
Xerror_rhdr db "exec: Failure reading header block", 0DH, 0AH, '$'
Xerror_rseg db "exec: Failure reading segment data", 0DH, 0AH, '$'
Xerror_resize db "exec: Failure on resize", 0DH, 0AH, '$'
Xerror_free db "exec: Failure to free a block", 0DH, 0AH, '$'
Xerror_string db "exec: Program swap failure", 0DH, 0AH, '$'
Xerror_alloc db "exec: Memory blocks don't match", 0DH, 0AH, '$'
X
X even
Xwrite_header label word
X whdr_xms_ptr dw word ptr whdr_xms
X whdr_ems_ptr dw word ptr whdr_ems
X whdr_file_ptr dw word ptr whdr_file
X
Xwrite_seg label word
X wseg_xms_ptr dw word ptr wseg_xms
X wseg_ems_ptr dw word ptr wseg_ems
X wseg_file_ptr dw word ptr wseg_file
X
Xread_header label word
X rhdr_xms_ptr dw word ptr rhdr_xms
X rhdr_ems_ptr dw word ptr rhdr_ems
X rhdr_file_ptr dw word ptr rhdr_file
X
Xread_seg label word
X rseg_xms_ptr dw word ptr rseg_xms
X rseg_ems_ptr dw word ptr rseg_ems
X rseg_file_ptr dw word ptr rseg_file
X
Xfree_resource label word
X free_xms_ptr dw word ptr free_xms_resource
X free_ems_ptr dw word ptr free_ems_resource
X free_file_ptr dw word ptr free_file_resource
X
Xreset_resource label word
X reset_xms_ptr dw word ptr reset_xms_resource
X reset_ems_ptr dw word ptr reset_ems_resource
X reset_file_ptr dw word ptr reset_file_resource
X
Xold_ctl_brk label dword
X old_ctl_brk_off dw ?
X old_ctl_brk_seg dw ?
X
Xold_crit_err label dword
X old_crit_err_off dw ?
X old_crit_err_seg dw ?
X
Xexec_block label word
X ex_envseg dw ? ; env seg, use parent's if 0
X ex_cmdtail dd ? ; command tail for exec
X ex_fcb1 dd far ptr fcb ; fcb's aren't used by dmake
X ex_fcb2 dd far ptr fcb
X ex_ss dw ? ; saved ss for exec
X ex_sp dw ? ; saved sp for exec
X ex_error dw 0 ; error code for dos exec
X
X
X; Special 21h (DOS call) handler to tee stdout/stderr writes to the -C file.
X; Ignore 21h calls that aren't writes to 1 or 2; i.e., pass them to DOS handler.
X; If write call was from this process, it's pretty simple to duplicate it
X; to the -C file. If it's from another process, we try to write to its
X; inherited handle. Worst case is where the handle wasn't inherited: someone
X; closed it. In that instance we have to switch to dmake's PSP to do the
X; duplicate write.
X
X; Subprocesses do not get their stdout/stderr teed to the -C file if
X; their stdout/stderr no longer points to the file/device that dmake's
X; stdout points to. This is tested by looking at the process's job
X; file table, which is a table that maps process handles to DOS system file
X; table numbers. (The far pointer to the JFT is at the PSP offset 34h.)
X; The JFT is also queried to see if the -C file was inherited.
X
X; O_BINARY, O_TEXT problems are ignored here. These are fudged by the
X; C library before it calls DOS; since we're working below that level
X; we don't have to worry about it.
X
Xsimulate_21h Macro
X pushf ;; direct call to DOS
X call cs:[real_21h]
X Endm
X
X assume cs:@code, ds:nothing, es:nothing, ss:nothing
Xour_21h_handler proc far
X pushf
X cmp ah,40h ; is this a write?
X jne call_dos ; --no
X cmp bx,1 ; write on handle 1 (stdout?)
X je duplicate_it
X cmp bx,2 ; stderr?
X je duplicate_it
X
Xcall_dos:
X popf
X jmp [real_21h] ; far jump to real handler, which will do the sys call
X ; and return to the original caller
X
Xduplicate_it:
X mpusha
X push ds
X push es
X mov bp,sp
X
X mov di,std_fil_handle ; handle of the -C file
X
X If @CodeSize eq 0
X ; Small/compact models allow for quick test of us versus subprocess.
X ; False negative (it's us with a different CS) will be picked
X ; up by code just below. (Might happen due to call from C library.)
X ; False positives would be bad, but can't happen.
X mov ax,[bp+24] ; caller's CS
X cmp ax,@code ; same as us?
X je call_from_dmake
X Endif
X
X mov ah,51h ; get PSP ("undocumented version" works in DOS 2.0+)
X simulate_21h ; PSP segment returned in BX
X cmp bx,psp ; our PSP?
X je call_from_dmake ; --yes, no PSP changing needed
X
X mov es,bx ; set ES to current (caller's) PSP
X lds bx,es:[34h] ; set DS:BX pointing to caller's job file table
X
X mov si,[bp+12] ; file handle caller passed in (known to be 1 or 2)
X mov al,[bx+si] ; system file number corresponding to caller's handle
X cmp al,our_stdout ; same as our stdout?
X jne do_real_write ; no--subprocess must have redirected it
X
X mov al,[bx+di] ; see if caller has dup of -C file still open
X cmp al,std_fil_number
X je use_dup ; yes--we can write using caller's PSP
X
X ; Calling process (or some intermediate process) has closed
X ; the -C descriptor. We'll use dmake's (our) -C descriptor, but
X ; to do so we'll have to change the PSP. Disable BREAK handling
X ; so that ^break doesn't kill the wrong process.
X
X mov ax,3300h ; get BREAK flag
X simulate_21h
X mov si,dx ; save BREAK state in SI
X sub dx,dx ; now turn break flag off
X mov ax,3301h
X simulate_21h ; don't want ^Break recoginized while PSP changed
X mov bx,psp ; set dmake's PSP
X mov ah,50h
X simulate_21h
X
X mov bx,di ; handle of -C file
X ; CX still has caller's count
X mov ds,[bp+2] ; restore caller's DS
X mov dx,[bp+14] ; DS:DX again points to caller's buffer
X mov ah,40h
X simulate_21h ; write the copy
X
X mov bx,es ; caller's PSP
X mov ah,50h ; set PSP
X simulate_21h ; restore caller's PSP
X mov dx,si ; break state before we changed it
X mov ax,3301h
X simulate_21h ; restore break state
X
X jmp short do_real_write
X
Xuse_dup:
X mov ds,[bp+2] ; restore caller's DS
X mov dx,[bp+14] ; DS:DX again points to caller's buffer
X
Xcall_from_dmake:
X mov bx,di ; handle of -C file
X mov ah,40h ; write
X ; CX still has caller's count
X simulate_21h ; write to the file
X
Xdo_real_write:
X pop es
X pop ds
X mpopa
X popf
X jmp [real_21h] ; far jump to real handler, which will do the sys call
X ; and return to the original caller
Xour_21h_handler endp
X
X assume cs:@code, ds:@code, ss:@code, es:@code
X
X;-----------------------------------------------------------------------------
X; First define the critical-error and control-brk handlers.
X; The critical error handler simply pops the machine state and returns an
X; access denied result code.
Xcrit_err_handler proc far
X add sp, 6 ; ip/cs/flags ...
X pop ax
X pop bx
X pop cx
X pop dx
X pop si
X pop di
X pop bp
X pop ds
X pop es
X push bp ; fix up the return flags
X mov bp, sp
X xchg ax, [bp+6] ; get the flag byte.
X or ax, 1 ; set the carry bit
X xchg ax, [bp+6] ; put it back.
X pop bp
X mov ax, 5 ; access denied
X iret
Xcrit_err_handler endp
X
X
X;-----------------------------------------------------------------------------
X; Here we set the interrupted flag, and terminate the currently running
X; process.
Xctl_brk_handler proc far
X clc ; make sure carry is clear
X inc cs:interrupted ; set the flag
X
X; Make certain it isn't us that is going to get terminated.
X; There is a small window where the in_exec flag is set but the child is
X; not running yet, I assume that DOS doesn't test for ctl_brk at that time
X; as it is bussily creating a new process.
X cmp cs:in_exec,0
X je just_return ; note this implies CF == 0
X stc ; set CF to abort child
Xjust_return: iret
Xctl_brk_handler endp
X
X
X;-----------------------------------------------------------------------------
X; Something really nasty happened, so abort the exec call and exit.
X; This kills the calling process altogether, and is a very nasty way of
X; termination since files may still be open etc.
Xabort_exec_rhdr label near
X mov dx, offset error_rhdr
X jmp print_it
Xabort_exec_rseg label near
X mov dx, offset error_rseg
X jmp print_it
Xabort_exec_resize label near
X mov dx, offset error_resize
X jmp print_it
Xabort_exec_free label near
X mov dx, offset error_free
X jmp print_it
Xabort_exec_alloc label near
X mov dx, offset error_alloc
X jmp print_it
Xabort_exec proc near
X mov dx, offset error_string
Xprint_it: push dx
X mov bx, [swap]
X call [free_resource+bx]
X mov ax, cs
X mov ds, ax
X pop dx
X mov ah, 9
X int 21H
Xkill_program: mov ax, 04cffH ; nuke it!
X int 21H
Xabort_exec endp
X
X
X;-----------------------------------------------------------------------------
X; lodsw/stosw loop to copy data. Called only for word copy operations.
X; ds:si - point at source
X; es:di - point at destination
X; cx - count of bytes to copy.
Xcopy_data proc near
X shr cx, 1 ; convert to word count
X jnc copy_words
X movsb
Xcopy_words: rep movsw ; copy the words.
X ret
Xcopy_data endp
X
X
X
X;=============================================================================
X; THE FOLLOWING SECTION DEALS WITH ALL ROUTINES REQUIRED TO READ XMS RECORDS.
X;=============================================================================
Xrhdr_xms proc near
X ret
Xrhdr_xms endp
X
Xrseg_xms proc near
X ret
Xrseg_xms endp
X
Xreset_xms_resource proc near
X ret
Xreset_xms_resource endp
X
Xfree_xms_resource proc near
X ret
Xfree_xms_resource endp
X;=============================================================================
X
X
X
X;=============================================================================
X; THE FOLLOWING SECTION DEALS WITH ALL ROUTINES REQUIRED TO READ EMS RECORDS.
X;=============================================================================
Xrhdr_ems proc near
X ret
Xrhdr_ems endp
X
Xrseg_ems proc near
X ret
Xrseg_ems endp
X
Xreset_ems_resource proc near
X ret
Xreset_ems_resource endp
X
Xfree_ems_resource proc near
X ret
Xfree_ems_resource endp
X;=============================================================================
X
X
X
X;=============================================================================
X; THE FOLLOWING SECTION DEALS WITH ALL ROUTINES REQUIRED TO READ FILE RECORDS.
X;=============================================================================
X; This routine reads a segment header from a file.
X; The header is a seven byte record formatted as follows:
X; segment address - of data
X; offset address - of data
X; length in paragraphs - of data
X; mode - 1 => segment header (allocate seg on read)
X; 0 => subsegment, don't allocate on read.
X; The information is placed into the tmpseg data area in the code segment.
X; The routine aborts if an error is detected.
Xrhdr_file proc near
X mov dx, offset tmpseg ; read the header record out
X mov cx, 7
X mov bx, [tmphandle]
X mov ah, 03fH
X int 21H
X jnc rhdr_done ; make sure it worked
X jmp abort_exec_rhdr
X
Xrhdr_done: cmp ax, 7
X je exit_rhdr_file
X or ax, ax
X je signal_eof
X jmp abort_exec_rhdr
X
Xsignal_eof: stc
Xexit_rhdr_file: ret
Xrhdr_file endp
X
X
X;-----------------------------------------------------------------------------
X; Read a segment from the temporary file whose handle is in cs:tmphandle.
X; The routine aborts if an error is detected.
Xrseg_file proc near
X push ds
X mov ds, word ptr cs:tmpseg; Now read the whole segment
X mov dx, word ptr cs:tmpseg+2
X mov cx, word ptr cs:tmpseg+4
X mov bx, cs:tmphandle
X mov ah, 03fH
X int 21H
X pop ds
X jnc rseg_done
X jmp abort_exec_rseg
X
Xrseg_done: cmp ax, [word ptr tmpseg+4]
X je exit_rseg_file
X jmp abort_exec_rseg ; If we didn't get read full
Xexit_rseg_file: ret ; segment then abort
Xrseg_file endp
X
X
X;-----------------------------------------------------------------------------
X; Seek to the beginning of the file.
Xreset_file_resource proc near
X mov bx, [tmphandle]
X xor cx, cx
X mov dx, cx
X mov ax, 04200H ; seek to begining of file
X int 21H
X ret
Xreset_file_resource endp
X
X
X;-----------------------------------------------------------------------------
X; unlink the temporary file allocated for swapping.
X; We close the file first, and then delete it. We ignore errors here since
X; we can't do anything about them anyway.
Xfree_file_resource proc near
X mov bx, [tmphandle] ; get the file handle
X mov ah, 03eH ; close the file
X int 21H
X mov dx, offset tmpname ; Now delete the temp file
X mov ah, 041H
X int 21H
X ret
Xfree_file_resource endp
X;=============================================================================
X
X
X
X;=============================================================================
X; CODE TO SWAP THE IMAGE IN FROM SECONDARY STORAGE
X;=============================================================================
Xswap_in proc near
X mov bx, [alstr] ; get previous alloc strategy
X mov ax, 5801H ; and set it back
X int 21H
X mov bx, [swap] ; get type of resource
X call [reset_resource+bx] ; reset the resource
X mov es, [psp] ; resize the program back
X mov bx, [progsize] ; to original size
X mov ah, 04AH
X int 21H
X jnc read_seg_loop
X jmp abort_exec
X
Xread_seg_loop: mov bx, [swap] ; get type of resource
X call [read_header+bx] ; get seg header
X jc exit_swap_in ; all done
X mov al, [tmpseg+6]
X cmp al, seg_no_alloc ; see if dummy segment header
X je read_seg_loop
X cmp al, seg_alloc ; do we need to do an alloc?
X jne read_data ; nope
X
X; Allocate back the memory for a segment that is not the [psp], note that this
X; must come back to the same segment we had previously since other segments
X; may have pointers stored in their variables that point to this segment using
X; segment:offset long pointers.
X mov bx, [word ptr tmpseg+4] ; get count of paragraphs
X mov ah, 048H ; dos_alloc
X int 21H
X jc alloc_error ; oops!
X cmp ax, [word ptr tmpseg] ; did we get the same segment?
X je read_seg_loop ; yup!
Xalloc_error: jmp abort_exec_alloc
X
Xread_data: mov bx, [swap]
X call [read_seg+bx] ; this must succeed, if fail
X jmp read_seg_loop ; we never come back here
X
Xexit_swap_in: mov bx, [swap] ; all done, so free resource
X call [free_resource+bx]
X ret
Xswap_in endp
X
X
X;=============================================================================
X; CODE TO SWAP THE IMAGE OUT TO SECONDARY STORAGE
X;=============================================================================
X; This routine is called to swap the non-resident portion of the program
X; out to the resource specified by the value of [cs:swap]. If the swap out
X; fails, then appropriate routines are called to free the resources allocated
X; up to that point.
X;
X; The steps used to swap the program out are as follows:
X; - calculate new size of program to remain resident and size to swap
X; out.
X; - write out non-resident portion of current segment
X; - walk DOS allocation chain and write out all other segments owned by
X; the current program that are contiguous with the _psp segment
X; - copy the environment down to low memory
X; - resize the current _psp segment to savesize
X; - free all segments belonging to program except current _psp segment
Xswap_out proc near
X mov ax, 05800H ; get memory alocation strategy
X int 021H
X mov [alstr], ax ; and save it for future restoration.
X mov di, [psp] ; compute length of program to current
X mov bx, cs ; value of cs, and find program size
X sub bx, di ; by looking at length stored in
X mov ax, di ; arena header found in front of psp
X dec ax
X mov es, ax
X mov si, es:3 ; si is size of program in paragraphs
X mov [progsize], si ; progsize now contains the size.
X
X; Now compute length of program segment to save.
X; Length is: cs - psp + (offset overlay_code_here+15 >> 4)
X mov ax, offset overlay_code_here+15
X shr ax, 1
X shr ax, 1
X shr ax, 1
X shr ax, 1
X add bx, ax ; bx is size of program to keep
X sub si, bx ; si is # of paragraphs to save.
X add di, bx ; di is paragraph to start at
X mov rootsize, bx
X mov resend, di ; cs:resend is saved start para
X mov al, seg_no_alloc ; set no allocation for segment
X call write_segment
X jc abort_swap_out
X
X; We have now saved the portion of the program segment that will not remain
X; resident during the exec. We should now walk the DOS allocation chain and
X; write out all other segments owned by the current process.
Xsave_segments: mov ax, [psp]
X dec ax
X mov es, ax
X mov bx, offset write_segment_data
X call walk_arena_chain
X jc abort_swap_out
X
X; Now we must walk the chain of allocated memory blocks again and free
X; all those that are owned by the current process, except the one that is
X; the current process' psp.
Xfree_segments: mov ax, [psp]
X dec ax
X mov es,ax
X mov bx, offset free_dos_segment
X call walk_arena_chain
X jnc resize_program
X jmp abort_exec_free ; can't fix it up now.
X
X; We now resize the program to the size specified by cs:rootsize. This will
X; free most of the memory taken up by the current program segment.
Xresize_program: mov es, [psp] ; es is segment to resize.
X mov bx, [rootsize] ; bx is size of segment.
X mov ah, 04aH ; resize memory block
X int 21H
X jnc swap_out_ok
X jmp abort_exec_resize ; disaster
Xswap_out_ok: ret
X
X; The swap out failed for some reason, so free any allocated resources
X; and set the carry bit.
Xabort_swap_out: mov bx, [swap]
X call [free_resource+bx]
X xor ax, ax
X mov [swap], ax ; clear the swap flag
X stc
X ret
Xswap_out endp
X
X
X;=============================================================================
X; CODE TO SET-UP FOR AND EXEC THE CHILD PROCESS
X;=============================================================================
X; Actually execute the program. If cs:swap is set, this code will invoke the
X; swap-out/swap-in code as required.
Xdo_exec proc near
X cmp [swap], 0 ; does the user want to swap?
X je no_swap_out ; nope
X call init_swap ; figger out where to swap to
X jc no_swap_out ; if carry set then don't swap
X call swap_out
X
Xno_swap_out: cmp [interrupted], 0 ; were we interrupted?
X jne leave_exec ; yep, so clean up, don't exec
X
X; free passed in environment block if it is non zero.
X; This way the parent program does not need to free it.
X mov ax, [envseg]
X or ax, ax
X je setup_block
X push ax
X mov es, ax
X mov ah, 49H
X int 21H
X pop ax
X
X; set up the parameter block for the DOS exec call.
X; offset contents
X; 00 segment address of environment to be passed,
X; 0 => use parents env.
X; 02 pointer to command tail for new process.
X; 06 pointer to fcb1
X; 0a pointer to fcb2
Xsetup_block: mov ax, [envseg]
X mov [ex_envseg], ax
X mov cx, cs
X mov [word ptr ex_cmdtail], offset cmdtail
X mov [word ptr ex_cmdtail+2], cx
X
X; set up registers for exec call
X; ds:dx - pointer to pathname of program to execute
X; es:bx - pointer to above parameter block
X mov dx, offset cmdpath
X mov es, cx
X mov bx, offset exec_block
X
X; Under DOS 2.x exec is notorious for clobbering registers and guarantees
X; to preserve only cs:ip.
X push ds
X mov [ex_sp], sp
X mov [ex_ss], ss
X mov [ex_error], 0 ; clear exec error code
X inc [in_exec] ; set internal flag
X mov ax, 04b00H
X int 21H
X
X; returned from exec, so restore possibly clobbered registers.
X mov ss, cs:ex_ss
X mov sp, cs:ex_sp
X pop ds
X
X; check to make certain the exec call worked.
X jnc it_worked
X
X; exec call failed. Save return code from msdos.
X mov [ex_error], ax
X jmp leave_exec
X
Xit_worked: mov ah, 04dH ; get the return code
X int 21H
X cmp ah,1 ; check if terminated by ^C
X jnz nosigint
X inc interrupted ; yes so set flag
Xnosigint: xor ah, ah ; 8-bit return code, so clear ah
X mov [eretcode], ax
X
Xleave_exec: cmp [swap], 0 ; check swap, if non-zero swap back in
X je no_swap_in
X call swap_in
X
X; Clear the in_exec after the swap back in. This way we are guaranteed to
X; get parent in and the resources freed should a ^C be hit when we are reading
X; the image in.
Xno_swap_in: mov [in_exec], 0
X ret
Xdo_exec endp
X
X
X
X;==============================================================================
X; Everything past this point is overwriten with the environment and new
X; program after the currently executing program is swapped out.
X;==============================================================================
Xoverlay_code_here label word
X
X;-----------------------------------------------------------------------------
X; Figure out where we can swap to and initialize the resource we are going to
X; use. We try XMS, EMS, and a tempfile (if specified), in that order. We set
X; [cs:swap] to the correct value based on which of the resources exists.
X; If none can be used, then [cs:swap] is set to 0, and no swap takes place.
X; The exec code will still attempt to execute the child in this instance, but
X; may fail due to lack of resources. Each swap_out_* routine must provide
X; its own clean-up handler should it not be able to write all program
X; segments to the swap resource.
Xinit_swap proc near
X mov [swap], 0
X;call init_xms
X;jnc init_done
X;call init_ems
X;jnc init_done
X call init_file
Xinit_done: ret
Xinit_swap endp
X
X
X;-----------------------------------------------------------------------------
X; This routine is used to walk the DOS allocated memory block chain
X; starting at address supplied in the es register. For each block it
X; calls the routine specified by the bx register with the segment length
X; in si, and its address in di. It does not apply the routine to the
X; segment if the segment is the same as the current program's [cs:psp] value.
Xmemheader struc
X magic db ? ; either 'Z' for end or 'M' for allocated
X owner dw ? ; psp of owner block
X len dw ? ; length in paragraphs of segment
Xmemheader ends
X
Xwalk_arena_chain proc near
X mov si, word ptr es:3 ; get length
X mov di, es
X inc di
X mov ax, word ptr es:1
X
X; Stop the search if the block is NOT owned by us. Ignore our own psp block
X; and our environment segment block.
X cmp ax, cs:psp ; is it owned by us?
X jne walk_done ; NOPE! -- all done
X cmp di, cs:envseg ; skip our environment
X je next_block
X cmp di, cs:psp ; skip our psp
X je next_block
X
X; Now save state and call the routine pointed at by [bx].
X push di
X push si
X push bx
X call bx
X pop bx
X pop si
X pop di
X jc exit_walk ; if error then stop
X mov al, byte ptr es:0 ; check if at end
X cmp al, 'Z'
X je walk_done
X
Xnext_block: add di, si ; go on to next segment
X mov es, di
X jmp walk_arena_chain
Xwalk_done: clc
Xexit_walk: ret
Xwalk_arena_chain endp
X
X
X;-----------------------------------------------------------------------------
X; This routine takes a dos segment found in the di register and free's it.
Xfree_dos_segment proc near
X mov es, di ; free dos memory block
X mov ah, 49H
X int 21H
X ret
Xfree_dos_segment endp
X
X
X;-----------------------------------------------------------------------------
X; Called to invoke write_segment with proper values in the al register. Only
X; ever called from walk_arena_chain, and so al should be set to seg_alloc.
Xwrite_segment_data label near
X mov al, seg_alloc ; and fall through into write_segment
X;-----------------------------------------------------------------------------
X; This routine writes a segment as a block of data segments if the number of
X; paragraphs to write exceeds 0x0fff (rarely the case).
X; It stuffs the info into tmpseg, and then calls wheader and wseg to get the
X; data out.
X;
X; di:dx segment:offset of segment; offset is ALWAYS zero.
X; si number of paragraphs to write.
X; al mode of header to write
Xwrite_segment proc near
X push di
X push si
X xor dx,dx
X mov bx, [swap]
X call [write_header+bx]
X pop si
X pop di
X jc exit_wseg
X
Xdo_io_loop: cmp si, 0 ; are we done yet?
X je exit_wseg ; yup so leave.
X mov cx, si ; # of paragraphs to move
X cmp cx, 0fffH ; see if we have lots to move?
X jle do_io
X mov cx, 0fffH ; reset to max I/O size
X
Xdo_io: push cx ; save # of paragraphs we are writing
X shl cx, 1 ; shift cx by four to the left
X shl cx, 1
X shl cx, 1
X shl cx, 1
X push di ; save the start, and count left
X push si
X mov si, cx
X xor dx,dx
X mov al, seg_data
X mov bx, [swap]
X push bx
X call [write_header+bx]
X pop bx
X call [write_seg+bx]
X pop si
X pop di
X pop dx ; original paragraph count in dx
X jc exit_wseg ; it failed so exit.
X add di, dx ; adjust the pointers, and continue.
X sub si, dx
X jmp do_io_loop
Xexit_wseg: ret
Xwrite_segment endp
X
X
X;=============================================================================
X; THE FOLLOWING SECTION DEALS WITH ALL ROUTINES REQUIRED TO WRITE XMS RECORDS.
X;=============================================================================
Xinit_xms proc near
X ret
Xinit_xms endp
X
Xwhdr_xms proc near
X ret
Xwhdr_xms endp
X
Xwseg_xms proc near
X ret
Xwseg_xms endp
X;=============================================================================
X
X
X;=============================================================================
X; THE FOLLOWING SECTION DEALS WITH ALL ROUTINES REQUIRED TO WRITE EMS RECORDS.
X;=============================================================================
Xinit_ems proc near
X ret
Xinit_ems endp
X
Xwhdr_ems proc near
X ret
Xwhdr_ems endp
X
Xwseg_ems proc near
X ret
Xwseg_ems endp
X;=============================================================================
X
X
X;=============================================================================
X; THE FOLLOWING SECTION DEALS WITH ALL ROUTINES REQUIRED TO WRITE FILES.
X;=============================================================================
X;-----------------------------------------------------------------------------
X; Attempt to create a temporary file. If the tempfile name is NIL then return
X; with the cary flag set.
Xinit_file proc near
X mov al, [tmpname]
X or al, al
X je err_init_file
X mov dx, offset tmpname
X xor cx, cx
X mov ah, 03cH
X int 21H
X jc err_init_file ; if carry set then failure
X mov [tmphandle], ax ; init swapping
X mov [swap], swap_file
X jmp exit_init_file
Xerr_init_file: stc
Xexit_init_file: ret
Xinit_file endp
X
X
X;-----------------------------------------------------------------------------
X; This routine writes a segment header to a file.
X; The header is a seven byte record formatted as follows:
X; segment address - of data
X; offset address - of data
X; length in paragraphs - of data
X; mode - 1 => segment header (allocate seg on read)
X; 0 => subsegment, don't allocate on read.
X; Routine takes three arguments:
X; di:dx segment:offset of segment
X; si number of paragraphs to write.
X; al mode of header to write
Xwhdr_file proc near
X mov [word ptr tmpseg], di ; save the segment/offset
X mov [word ptr tmpseg+2], dx
X mov [word ptr tmpseg+4], si ; save the segment length
X mov [tmpseg+6], al
X mov dx, offset tmpseg ; write the header record out
X mov cx, 7
X mov bx, [tmphandle]
X mov ah, 040H
X int 21H
X jc exit_whdr_file ; make sure it worked
X cmp ax, 7
X je exit_whdr_file ; oh oh, disk is full!
Xerr_whdr_file: stc
Xexit_whdr_file: ret
Xwhdr_file endp
X
X
X;-----------------------------------------------------------------------------
X; Write a segment to the temporary file whose handle is in cs:tmphandle
X; Parameters for the write are assumed to be stored in the tmpseg data area.
X; function returns carry set if failed, carry clear otherwise.
Xwseg_file proc near
X push ds
X mov ds, word ptr cs:tmpseg ; Now write the whole segment
X mov dx, word ptr cs:tmpseg+2
X mov cx, word ptr cs:tmpseg+4
X mov bx, cs:tmphandle
X mov ah, 040H
X int 21H
X pop ds
X jc exit_wseg_file ; make sure it worked
X cmp ax, [word ptr tmpseg+4]
X je exit_wseg_file
Xerr_wseg_file: stc ; it failed (usually disk full)
Xexit_wseg_file: ret
Xwseg_file endp
X;=============================================================================
X
X
X;=============================================================================
X; _exec: THIS IS THE MAIN ENTRY ROUTINE TO THIS MODULE
X;=============================================================================
X; This is the main entry routine into the swap code and corresponds to the
X; following C function call:
X;
X; exec( int swap, char far *program, char far *cmdtail, int environment_seg,
X; char far *tmpfilename );
X;
X; Exec performs the following:
X; 1. set up the local code segment copies of arguments to the exec call.
X; 2. switch to a local stack frame so that we don't clobber the user
X; stack.
X; 3. save old interrupt vectors for ctrl-brk.
X; 4. install our own handler for the ctrl-brk interrupt, our handler
X; terminates the current running process, and returns with non-zero
X; status code.
X; 5. get our psp
X; 6. setup arguments for exec call
X; 7. exec the program, save result code on return.
X; 8. restore previous ctrl-brk and crit-error handler.
X; 9. restore previous process stack, and segment registers.
X; 10. return from exec with child result code in AX
X; and global _Interrupted flag set to true if child execution was
X; interrupted.
X
X; NOTE: When first called the segments here assume the standard segment
X; settings.
X assume cs:@code, ds:DGROUP,es:DGROUP,ss:DGROUP
X
X public _exec
X_exec proc
X push bp ; set up the stack frame
X mov bp, sp
X push si ; save registers we shouldn't step on.
X push di
X push ds
X
X; set up for copying of parameters passed in with long pointers.
X push cs ; going to use lodsb/stosb, set up es
X pop es ; as destination.
X assume es:@code ; let the assembler know :-)
X cld ; make sure direction is right
X
X; Copy all parameters into the bottom of the code segment. After doing so we
X; will immediately switch stacks, so that the user stack is preserved intact.
X mov ax, ss:[a_swap] ; save swap
X mov es:swap, ax
X mov ax, ss:[a_env] ; save env seg to use
X mov es:envseg, ax
X
X mov di, offset cs:cmdpath ; copy the command
X lds si, ss:[a_prog] ; 65 bytes worth
X mov cx, 65
X call copy_data
X
X mov di, offset cs:cmdtail ; copy the command tail
X lds si, ss:[a_tail] ; 129 bytes worth
X mov cx, 129
X call copy_data
X
X mov di, offset cs:tmpname ; copy the temp file name
X lds si, ss:[a_tmp] ; 65 bytes worth.
X mov cx, 65
X call copy_data
X
X; Now we save the current ss:sp stack pointer and swap stack to our temporary
X; stack located in the current code segment. At the same time we reset the
X; segment pointers to point into the code segment only.
Xswap_stacks: mov ax, ss
X mov es:old_ss, ax
X mov es:old_sp, sp
X mov ax, cs
X mov ds, ax
X mov ss, ax ; set ss first, ints are then
X mov sp, offset cs:exec_sp ; disabled for this instr too
X assume ds:@code, ss:@code ; let the assembler know :-)
X
X; Now we save the old control break and critical error handler addresses.
X; We replace them by our own routines found in the resident portion of the
X; swapping exec code.
Xset_handlers: mov [interrupted], 0 ; clear interrupted flag
X mov [eretcode], 0 ; clear the return code
X mov ax, 03523H ; get int 23 handler address
X int 21H
X mov cs:old_ctl_brk_off, bx
X mov cs:old_ctl_brk_seg, es
X mov dx, offset ctl_brk_handler
X mov ax, 02523H ; set int 23 handler address
X int 21H
X
X mov ax, 03524H ; get int 24 handler address
X int 21H
X mov cs:old_crit_err_off, bx
X mov cs:old_crit_err_seg, es
X mov dx, offset crit_err_handler
X mov ax, 02524H ; set int 24 handler address
X int 21H
X
X; Go and execute the child, we've set up all of its parameters. The do_exec
X; routine will attempt to perform a swap of the code if requested to do so by
X; a non-zero value in the variable cs:swap.
X mov ah, 051H ; get the psp
X int 21H
X mov cs:psp, bx
X call do_exec
X
X; We're back from the exec, so fix things up the way they were.
X; Restore the old control-break and critical-error handlers.
X lds dx, cs:old_ctl_brk
X mov ax, 02523H
X int 21H
X lds dx, cs:old_crit_err
X mov ax, 02524H
X int 21H
X
X; Restore previous program stack segment registers, and data segment.
X mov ax, cs:old_ss
X mov ss, ax ; mov into ss first, that way
X mov sp, cs:old_sp ; no interrupts in this instr.
X pop ds
X
X; Tell the assembler we have swaped segments again.
X assume ds:DGROUP,es:DGROUP,ss:DGROUP
X
X; Set the global Interrupted flag so that parent can tell it was interrupted.
X mov ax, seg DGROUP:_Interrupted
X mov es, ax
X mov ax, cs:interrupted
X mov es:_Interrupted, ax
X
X; Set the global errno value to reflect the success/failure of the DOS
X; exec call.
X mov ax, seg DGROUP:_errno
X mov es, ax
X mov ax, cs:ex_error
X mov es:_errno, ax
X
X; Fetch the child's return code, pop rest of stuff off of the stack
X; and return to the caller.
X mov ax, cs:eretcode
X pop di
X pop si
X pop bp
X ret
X_exec endp
X
X; void do_hook_std_writes(int handle);
X; This saves the 21h interrupt vector and changes it to point
X; into this code. Argument is the file handle of the -C file.
X
X public _do_hook_std_writes
X_do_hook_std_writes proc
X push bp
X mov bp,sp
X push di
X
X mov di, ss:[a_handle] ; handle of -C file
X mov std_fil_handle, di
X
X mov ah, 51h ; request our PSP
X int 21h
X mov [psp], bx ; save it
X
X mov es, bx
X les bx, es:[34h] ; pointer to job file table
X mov al, es:[bx+1] ; system file # of our stdout
X mov [our_stdout], al
X mov al, es:[bx+di] ; system file number of -C file
X mov std_fil_number, al
X
X mov ax,3521h ; request vector 21h
X int 21h ; it's returned in ES:BX
X mov word ptr [real_21h], bx
X mov word ptr [real_21h+2], es
X
X push ds
X mov ax,cs
X mov ds,ax
X lea dx,our_21h_handler ; DS:DX is the new vector
X mov ax,2521h ; set vector 21h
X int 21h
X
X pop ds
X pop di
X pop bp
X ret
X_do_hook_std_writes endp
X
X; void do_unhook_std_writes(void);
X; This restores the 21h interrupt vector.
X; The saved vector is zero if it wasn't changed (no -C option).
X
X public _do_unhook_std_writes
X_do_unhook_std_writes proc
X push ds
X
X lds dx, [real_21h] ; put saved vector into DS:DX
X mov ax, ds
X or ax, dx
X jz unhook_return ; zero means we didn't hook 21h
X
X mov ax,2521h ; set vector 21h
X simulate_21h
X
Xunhook_return: pop ds
X ret
X_do_unhook_std_writes endp
Xend
END_OF_FILE
if test 38609 -ne `wc -c <'dmake/msdos/exec.asm'`; then
echo shar: \"'dmake/msdos/exec.asm'\" unpacked with wrong size!
fi
chmod +x 'dmake/msdos/exec.asm'
# end of 'dmake/msdos/exec.asm'
fi
if test -f 'dmake/unix/sysvr3/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/config.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/config.h'\" \(2235 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/sysvr3/RCS/config.h,v 1.1 1994/10/06 17:42:20 dvadura Exp $
X-- SYNOPSIS -- Configurarion include file.
X--
X-- DESCRIPTION
X-- There is one of these for each specific machine configuration.
X-- It can be used to further tweek the machine specific sources
X-- so that they compile.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: config.h,v $
X * Revision 1.1 1994/10/06 17:42:20 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
Xextern char *getcwd ANSI((char *, int));
X
X#ifndef M_XENIX
X/* Define setvbuf, SysV doesn't have one */
X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
X#define tzset()
X#endif
X
X#ifdef M_XENIX
X#define ASCARCH 0 /* Use binary archive headers if Xenix */
X#endif
X
X/* We don't care about CONST */
X#define CONST
X
X/* some braindead compilers don't understand pointers to void. */
X#define PVOID char *
END_OF_FILE
if test 2235 -ne `wc -c <'dmake/unix/sysvr3/config.h'`; then
echo shar: \"'dmake/unix/sysvr3/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/config.h'
fi
echo shar: End of archive 9 \(of 27\).
cp /dev/null ark9isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/expand.c dmake/make.c dmake/make.cmd
# Wrapped by kent@sparky on Fri Oct 21 16:50:37 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 10 (of 27)."'
if test -f 'dmake/expand.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/expand.c'\"
else
echo shar: Extracting \"'dmake/expand.c'\" \(28595 characters\)
sed "s/^X//" >'dmake/expand.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/expand.c,v 1.1 1994/10/06 17:41:25 dvadura Exp $
X-- SYNOPSIS -- macro expansion code.
X--
X-- DESCRIPTION
X--
X-- This routine handles all the necessary junk that deals with macro
X-- expansion. It understands the following syntax. If a macro is
X-- not defined it expands to NULL, and {} are synonyms for ().
X--
X-- $$ - expands to $
X-- {{ - expands to {
X-- }} - expands to }
X-- $A - expands to whatever the macro A is defined as
X-- $(AA) - expands to whatever the macro AA is defined as
X-- $($(A)) - represents macro indirection
X-- <+...+> - get mapped to $(mktmp ...)
X--
X-- following macro is recognized
X--
X-- string1{ token_list }string2
X--
X-- and expands to string1 prepended to each element of token_list and
X-- string2 appended to each of the resulting tokens from the first
X-- operation. If string2 is of the form above then the result is
X-- the cross product of the specified (possibly modified) token_lists.
X--
X-- The folowing macro modifiers are defined and expanded:
X--
X-- $(macro:modifier_list:modifier_list:...)
X--
X-- where modifier_list a combination of:
X--
X-- D or d - Directory portion of token including separator
X-- F or f - File portion of token including suffix
X-- B or b - basename portion of token not including suffix
X-- T or t - for tokenization
X-- E or e - Suffix portion of name
X-- L or l - translate to lower case
X-- U or u - translate to upper case
X-- I or i - return inferred names
X--
X-- or a single
X-- S or s - pattern substitution (simple)
X--
X-- NOTE: Modifiers are applied once the macro value has been found.
X-- Thus the construct $($(test):s/joe/mary/) is defined and
X-- modifies the value of $($(test))
X--
X-- Also the construct $(m:d:f) is not the same as $(m:df)
X-- the first applies d to the value of $(m) and then
X-- applies f to the value of that whereas the second form
X-- applies df to the value of $(m).
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: expand.c,v $
X * Revision 1.1 1994/10/06 17:41:25 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X/* Microsoft BRAINDAMAGE ALERT!!!!
X * This #ifdef is here only to satisfy stupid bugs in MSC5.0 and MSC5.1
X * it isn't needed for anything else. It turns loop optimization off. */
X#if defined(_MSC_VER)
X#include "optoff.h"
X#endif
X
Xstatic char* _scan_macro ANSI((char*, char**, int));
Xstatic char* _scan_brace ANSI((char*, char**, int*));
Xstatic char* _cross_prod ANSI((char*, char*));
Xstatic char* _scan_ballanced_parens ANSI((char*, char));
X
X
XPUBLIC char *
XExpand( src )/*
X===============
X This is the driver routine for the expansion, it identifies non-white
X space tokens and gets the ScanToken routine to figure out if they should
X be treated in a special way. */
X
Xchar *src; /* pointer to source string */
X{
X char *tmp; /* pointer to temporary str */
X char *res; /* pointer to result string */
X char *start; /* pointer to start of token */
X
X DB_ENTER( "Expand" );
X DB_PRINT( "exp", ("Expanding [%s]", src) );
X
X res = DmStrDup( "" );
X if( src == NIL(char) ) DB_RETURN( res );
X
X while( *src ) {
X char *ks, *ke;
X
X /* Here we find the next non white space token in the string
X * and find it's end, with respect to non-significant white space. */
X
X start = DmStrSpn( src, " \t\n" );
X res = DmStrJoin( res, src, start-src, TRUE );
X if( !(*start) ) break;
X
X /* START <+...+> KLUDGE */
X if( (ks=DmStrStr(start,"<+")) != NIL(char)
X && (ke=DmStrStr(ks,"+>")) != NIL(char) ){
X char *t1, *t2;
X
X res = DmStrJoin( res, t2=Expand(t1=DmSubStr(start,ks)), -1, TRUE);
X FREE(t1); FREE(t2);
X
X t1 = DmSubStr(ks+2, ke+1); t1[ke-ks-2] = ')';
X t2 = DmStrJoin( "$(mktmp ", t1, -1,FALSE);
X FREE(t1);
X res = DmStrJoin( res, t2=Expand(t2), -1, TRUE);
X FREE(t2);
X src = ke+2;
X }
X /* END <+...+> KLUDGE */
X else {
X res = DmStrJoin( res, tmp = ScanToken(start,&src,TRUE), -1, TRUE );
X FREE( tmp );
X }
X }
X
X DB_PRINT( "exp", ("Returning [%s]", res) );
X DB_RETURN( res );
X}
X
X
XPUBLIC char *
XApply_edit( src, pat, subst, fr, anchor )/*
X===========================================
X Take the src string and apply the pattern substitution. ie. look for
X occurrences of pat in src and replace each occurrence with subst. This is
X NOT a regular expressions pattern substitution, it's just not worth it.
X
X if anchor == TRUE then the src pattern match must be at the end of a token.
X ie. this is for SYSV compatibility and is only used for substitutions of
X the caused by $(macro:pat=sub). So if src = "fre.o.k june.o" then
X $(src:.o=.a) results in "fre.o.k june.a", and $(src:s/.o/.a) results in
X "fre.a.k june.a" */
X
Xchar *src; /* the source string */
Xchar *pat; /* pattern to find */
Xchar *subst; /* substitute string */
Xint fr; /* if TRUE free src */
Xint anchor; /* if TRUE anchor */
X{
X char *res;
X char *p;
X char *s;
X int l;
X
X DB_ENTER( "Apply_edit" );
X
X if( !*pat ) DB_RETURN( src ); /* do nothing if pat is NULL */
X
X DB_PRINT( "mod", ("Source str: [%s]", src) );
X DB_PRINT( "mod", ("Replacing [%s], with [%s]", pat, subst) );
X
X s = src;
X l = strlen( pat );
X if( (p = DmStrStr( s, pat )) != NIL(char) ) {
X res = DmStrDup( "" );
X do {
X if( anchor )
X if( !*(p+l) || (strchr(" \t", *(p+l)) != NIL(char)) )
X res = DmStrJoin( DmStrJoin(res,s,p-s,TRUE), subst, -1, TRUE );
X else
X res = DmStrJoin( res, s, p+l-s, TRUE );
X else
X res = DmStrJoin( DmStrJoin(res,s,p-s,TRUE), subst, -1, TRUE );
X
X s = p + l;
X }
X while( (p = DmStrStr( s, pat )) != NIL(char) );
X
X res = DmStrJoin( res, s, -1, TRUE );
X if( fr ) FREE( src );
X }
X else
X res = src;
X
X
X DB_PRINT( "mod", ("Result [%s]", res) );
X DB_RETURN( res );
X}
X
X
XPUBLIC void
XMap_esc( tok )/*
X================
X Map an escape sequence and replace it by it's corresponding character
X value. It is assumed that tok points at the initial \, the esc
X sequence in the original string is replaced and the value of tok
X is not modified. */
Xchar *tok;
X{
X if( strchr( "\"\\vantbrf01234567", tok[1] ) ) {
X switch( tok[1] ) {
X case 'a' : *tok = 0x07; break;
X case 'b' : *tok = '\b'; break;
X case 'f' : *tok = '\f'; break;
X case 'n' : *tok = '\n'; break;
X case 'r' : *tok = '\r'; break;
X case 't' : *tok = '\t'; break;
X case 'v' : *tok = 0x0b; break;
X case '\\': *tok = '\\'; break;
X case '\"': *tok = '\"'; break;
X
X default: {
X register int i = 0;
X register int j = 0;
X for( ; i<2 && isdigit(tok[2]); i++ ) {
X j = (j << 3) + (tok[1] - '0');
X strcpy( tok+1, tok+2 );
X }
X j = (j << 3) + (tok[1] - '0');
X *tok = j;
X }
X }
X strcpy( tok+1, tok+2 );
X }
X}
X
X
XPUBLIC char*
XApply_modifiers( mod, src )/*
X=============================
X This routine applies the appropriate modifiers to the string src
X and returns the proper result string */
X
Xint mod;
Xchar *src;
X{
X char *s;
X char *e;
X TKSTR str;
X
X DB_ENTER( "Apply_modifiers" );
X
X if ( mod & INFNAME_FLAG ) {
X SET_TOKEN( &str, src );
X e = NIL(char);
X
X while( *(s = Get_token( &str, "", FALSE )) != '\0' ) {
X HASHPTR hp;
X
X if ( (hp = Get_name(s, Defs, FALSE)) != NIL(HASH)
X && hp->CP_OWNR
X && hp->CP_OWNR->ce_fname
X ) {
X e = DmStrApp(e,hp->CP_OWNR->ce_fname);
X }
X else
X e = DmStrApp(e,s);
X }
X
X FREE(src);
X src = e;
X mod &= ~INFNAME_FLAG;
X }
X
X if(mod & (TOLOWER_FLAG|TOUPPER_FLAG) ) {
X int lower;
X lower = mod & TOLOWER_FLAG;
X
X for (s=src; *s; s++)
X if ( isalpha(*s) )
X *s = ((lower) ? tolower(*s) : toupper(*s));
X
X mod &= ~(TOLOWER_FLAG|TOUPPER_FLAG);
X }
X
X if( !mod || mod == (SUFFIX_FLAG | DIRECTORY_FLAG | FILE_FLAG) )
X DB_RETURN( src );
X
X SET_TOKEN( &str, src );
X DB_PRINT( "mod", ("Source string [%s]", src) );
X
X while( *(s = Get_token( &str, "", FALSE )) != '\0' ) {
X /* search for the directory portion of the filename. If the
X * DIRECTORY_FLAG is set, then we want to keep the directory portion
X * othewise throw it away and blank out to the end of the token */
X
X if( (e = Basename(s)) != s)
X if( !(mod & DIRECTORY_FLAG) ) {
X strcpy(s, e);
X e = s+(str.tk_str-e);
X for(; e != str.tk_str; e++)
X *e = ' ';
X }
X else
X s = e;
X
X /* search for the suffix, if there is none, treat it as a NULL suffix.
X * if no file name treat it as a NULL file name. same copy op as
X * for directory case above */
X
X e = strrchr( s, '.' ); /* NULL suffix if e=0 */
X if( e == NIL(char) ) e = s+strlen(s);
X
X if( !(mod & FILE_FLAG) ) {
X strcpy( s, e );
X e = s+(str.tk_str-e);
X for( ; e != str.tk_str; e++ ) *e = ' ';
X }
X else
X s = e;
X
X /* The last and final part. This is the suffix case, if we don't want
X * it then just erase to the end of the token. */
X
X if( s != NIL(char) )
X if( !(mod & SUFFIX_FLAG) )
X for( ; s != str.tk_str; s++ ) *s = ' ';
X }
X
X /* delete the extra white space, it looks ugly */
X for( s = src, e = NIL(char); *s; s++ )
X if( *s == ' ' || *s == '\t' || *s == '\n' ) {
X if( e == NIL(char) )
X e = s;
X }
X else {
X if( e != NIL(char) ) {
X if( e+1 < s ) {
X strcpy( e+1, s );
X s = e+1;
X *e = ' ';
X }
X e = NIL(char);
X }
X }
X
X if( e != NIL(char) )
X if( e < s )
X strcpy( e, s );
X
X DB_PRINT( "mod", ("Result string [%s]", src) );
X DB_RETURN( src );
X}
X
X
XPUBLIC char*
XTokenize( src, separator, op, mapesc )/*
X========================================
X Tokenize the input of src and join each token found together with
X the next token separated by the separator string.
X
X When doing the tokenization, <sp>, <tab>, <nl>, and \<nl> all
X constitute white space. */
X
Xchar *src;
Xchar *separator;
Xchar op;
Xint mapesc;
X{
X TKSTR tokens;
X char *tok;
X char *res;
X int first = (op == 't' || op == 'T');
X
X DB_ENTER( "Tokenize" );
X
X /* map the escape codes in the separator string first */
X if ( mapesc )
X for(tok=separator; (tok = strchr(tok,ESCAPE_CHAR)) != NIL(char); tok++)
X Map_esc( tok );
X
X DB_PRINT( "exp", ("Separator [%s]", separator) );
X
X /* By default we return an empty string */
X res = DmStrDup( "" );
X
X /* Build the token list */
X SET_TOKEN( &tokens, src );
X while( *(tok = Get_token( &tokens, "", FALSE )) != '\0' ) {
X char *x;
X
X if( first ) {
X FREE( res );
X res = DmStrDup( tok );
X first = FALSE;
X }
X else if (op == '^') {
X res = DmStrAdd(res, DmStrJoin(separator, tok, -1, FALSE), TRUE);
X }
X else if (op == '+') {
X res = DmStrAdd(res, DmStrJoin(tok, separator, -1, FALSE), TRUE);
X }
X else {
X res = DmStrJoin(res, x =DmStrJoin(separator, tok, -1, FALSE),
X -1, TRUE);
X FREE( x );
X }
X
X DB_PRINT( "exp", ("Tokenizing [%s] --> [%s]", tok, res) );
X }
X
X FREE( src );
X DB_RETURN( res );
X}
X
X
Xstatic char*
X_scan_ballanced_parens(p, delim)
Xchar *p;
Xchar delim;
X{
X int pcount = 0;
X int bcount = 0;
X
X if ( p ) {
X do {
X if (delim)
X if( !(bcount || pcount) && *p == delim) {
X return(p);
X }
X
X if ( *p == '(' ) pcount++;
X else if ( *p == '{' ) bcount++;
X else if ( *p == ')' && pcount ) pcount--;
X else if ( *p == '}' && bcount ) bcount--;
X
X p++;
X }
X while (*p && (pcount || bcount || delim));
X }
X
X return(p);
X}
X
X
XPUBLIC char*
XScanToken( s, ps, doexpand )/*
X==============================
X This routine scans the token characters one at a time and identifies
X macros starting with $( and ${ and calls _scan_macro to expand their
X value. the string1{ token_list }string2 expansion is also handled.
X In this case a temporary result is maintained so that we can take it's
X cross product with any other token_lists that may possibly appear. */
X
Xchar *s; /* pointer to start of src string */
Xchar **ps; /* pointer to start pointer */
Xint doexpand;
X{
X char *res; /* pointer to result */
X char *start; /* pointer to start of prefix */
X int crossproduct = 0; /* if 1 then computing X-prod */
X
X start = s;
X res = DmStrDup( "" );
X while( 1 ) {
X switch( *s ) {
X /* Termination, We halt at seeing a space or a tab or end of string.
X * We return the value of the result with any new macro's we scanned
X * or if we were computing cross_products then we return the new
X * cross_product.
X * NOTE: Once we start computing cross products it is impossible to
X * stop. ie. the semantics are such that once a {} pair is
X * seen we compute cross products until termination. */
X
X case ' ':
X case '\t':
X case '\n':
X case '\0':
X {
X char *tmp;
X
X *ps = s;
X if( !crossproduct )
X tmp = DmStrJoin( res, start, (s-start), TRUE );
X else
X {
X tmp = DmSubStr( start, s );
X tmp = _cross_prod( res, tmp );
X }
X return( tmp );
X }
X
X case '$':
X case '{':
X {
X /* Handle if it's a macro or if it's a {} construct.
X * The results of a macro expansion are handled differently based
X * on whether we have seen a {} beforehand. */
X
X char *tmp;
X tmp = DmSubStr( start, s ); /* save the prefix */
X
X if( *s == '$' ) {
X start = _scan_macro( s+1, &s, doexpand );
X
X if( crossproduct ) {
X res = _cross_prod( res, DmStrJoin( tmp, start, -1, TRUE ) );
X }
X else {
X res = DmStrJoin(res,tmp=DmStrJoin(tmp,start,-1,TRUE),-1,TRUE);
X FREE( tmp );
X }
X FREE( start );
X }
X else if( strchr("{ \t",s[1]) == NIL(char) ){
X int ok;
X start = _scan_brace( s+1, &s, &ok );
X
X if( ok ) {
X if ( crossproduct ) {
X res = _cross_prod(res,_cross_prod(tmp,start));
X }
X else {
X char *freeres;
X res = Tokenize(start,
X freeres=DmStrJoin(res,tmp,-1,TRUE),
X '^', FALSE);
X FREE(freeres);
X FREE(tmp);
X }
X crossproduct = TRUE;
X }
X else {
X res =DmStrJoin(res,tmp=DmStrJoin(tmp,start,-1,TRUE),-1,TRUE);
X FREE( start );
X FREE( tmp );
X }
X }
X else { /* handle the {{ case */
X res = DmStrJoin( res, start, (s-start+1), TRUE );
X s += (s[1]=='{')?2:1;
X FREE( tmp );
X }
X
X start = s;
X }
X break;
X
X case '}':
X if( s[1] != '}' ) {
X /* error malformed macro expansion */
X s++;
X }
X else { /* handle the }} case */
X res = DmStrJoin( res, start, (s-start+1), TRUE );
X s += 2;
X start = s;
X }
X break;
X
X default: s++;
X }
X }
X}
X
X
Xstatic char*
X_scan_macro( s, ps, doexpand )/*
X================================
X This routine scans a macro use and expands it to the value. It
X returns the macro's expanded value and modifies the pointer into the
X src string to point at the first character after the macro use.
X The types of uses recognized are:
X
X $$ and $<sp> - expands to $
X $(name) - expands to value of name
X ${name} - same as above
X $($(name)) - recurses on macro names (any level)
X and
X $(func[,args ...] [data])
X and
X $(name:modifier_list:modifier_list:...)
X
X see comment for Expand for description of valid modifiers.
X
X NOTE that once a macro name bounded by ( or { is found only
X the appropriate terminator (ie. ( or } is searched for. */
X
Xchar *s; /* pointer to start of src string */
Xchar **ps; /* pointer to start pointer */
Xint doexpand; /* If TRUE enables macro expansion */
X{
X char sdelim; /* start of macro delimiter */
X char edelim; /* corresponding end macro delim */
X char *start; /* start of prefix */
X char *macro_name; /* temporary macro name */
X char *recurse_name; /* recursive macro name */
X char *result; /* result for macro expansion */
X int bflag = 0; /* brace flag, ==0 => $A type macro */
X int done = 0; /* != 0 => done macro search */
X int lev = 0; /* brace level */
X int mflag = 0; /* != 0 => modifiers present in mac */
X int fflag = 0; /* != 0 => GNU style function */
X HASHPTR hp; /* hash table pointer for macros */
X
X DB_ENTER( "_scan_macro" );
X
X /* Check for $ at end of line, or $ followed by white space */
X if( !*s || strchr(" \t", *s) != NIL(char)) {
X *ps = s;
X DB_RETURN( DmStrDup("") );
X }
X
X if( *s == '$' ) { /* Take care of the simple $$ case. */
X *ps = s+1;
X DB_RETURN( DmStrDup("$") );
X }
X
X sdelim = *s; /* set and remember start/end delim */
X if( sdelim == '(' )
X edelim = ')';
X else
X edelim = '}';
X
X start = s; /* build up macro name, find its end*/
X while( !done ) {
X switch( *s ) {
X case '(': /* open macro brace */
X case '{':
X if( *s == sdelim ) {
X lev++;
X bflag++;
X }
X break;
X
X case ':': /* halt at modifier */
X if( lev == 1 && !fflag && doexpand ) {
X done = TRUE;
X mflag = 1;
X }
X break;
X
X case ' ':
X case '\t':
X case '\n':
X if ( lev == 1 ) fflag = 1;
X break;
X
X case '\0': /* check for null */
X *ps = s;
X done = TRUE;
X if( lev ) {
X bflag = 0;
X s = start;
X }
X break;
X
X case ')': /* close macro brace */
X case '}':
X if( *s == edelim && lev ) --lev;
X /*FALLTHRU*/
X
X default:
X done = !lev;
X }
X s++;
X }
X
X /* Check if this is a $A type macro. If so then we have to
X * handle it a little differently. */
X if( bflag )
X macro_name = DmSubStr( start+1, s-1 );
X else
X macro_name = DmSubStr( start, s );
X
X if (!doexpand) {
X *ps = s;
X DB_RETURN(macro_name);
X }
X
X /* Check to see if the macro name contains spaces, if so then treat it
X * as a GNU style function invocation and call the function mapper to
X * deal with it. We do not call the function expander if the function
X * invocation begins with a '$' */
X if( fflag && *macro_name != '$' ) {
X result = Exec_function(macro_name);
X }
X else {
X /* Check if the macro is a recursive macro name, if so then
X * EXPAND the name before expanding the value */
X if( strchr( macro_name, '$' ) != NIL(char) ) {
X recurse_name = Expand( macro_name );
X FREE( macro_name );
X macro_name = recurse_name;
X }
X
X /* Code to do value expansion goes here, NOTE: macros whose assign bit
X is one have been evaluated and assigned, they contain no further
X expansions and thus do not need their values expanded again. */
X
X if( (hp = GET_MACRO( macro_name )) != NIL(HASH) ) {
X if( hp->ht_flag & M_MARK )
X Fatal( "Detected circular macro [%s]", hp->ht_name );
X
X if( !(hp->ht_flag & M_EXPANDED) ) {
X hp->ht_flag |= M_MARK;
X result = Expand( hp->ht_value );
X hp->ht_flag ^= M_MARK;
X }
X else if( hp->ht_value != NIL(char) )
X result = DmStrDup( hp->ht_value );
X else
X result = DmStrDup( "" );
X
X /*
X * Mark macros as used only if we are not expanding them for
X * the purpose of a .IF test, so we can warn about redef after use*/
X
X if( !If_expand ) hp->ht_flag |= M_USED;
X }
X else
X result = DmStrDup( "" );
X }
X
X if( mflag ) {
X char separator;
X int modifier_list = 0;
X int aug_mod = FALSE;
X char *pat1;
X char *pat2;
X char *p;
X
X /* Yet another brain damaged AUGMAKE kludge. We should accept the
X * AUGMAKE bullshit of $(f:pat=sub) form of macro expansion. In
X * order to do this we will forgo the normal processing if the
X * AUGMAKE solution pans out, otherwise we will try to process the
X * modifiers ala dmake.
X *
X * So we look for = in modifier string.
X * If found we process it and not do the normal stuff */
X
X for( p=s; *p && *p != '=' && *p != edelim; p++ );
X
X if( *p == '=' ) {
X char *tmp;
X
X pat1 = Expand(tmp = DmSubStr(s,p)); FREE(tmp);
X s = p+1;
X p = _scan_ballanced_parens(s+1, edelim);
X
X if ( !*p ) {
X Warning( "Incomplete macro expression [%s]", s );
X p = s+1;
X }
X pat2 = Expand(tmp = DmSubStr(s,p)); FREE(tmp);
X
X result = Apply_edit( result, pat1, pat2, TRUE, TRUE );
X FREE( pat1 );
X FREE( pat2 );
X s = p;
X aug_mod = TRUE;
X }
X
X if( !aug_mod )
X while( *s && *s != edelim ) { /* while not at end of macro */
X char switch_char;
X
X switch( switch_char = *s++ ) {
X case 'b':
X case 'B': modifier_list |= FILE_FLAG; break;
X
X case 'd':
X case 'D': modifier_list |= DIRECTORY_FLAG; break;
X
X case 'f':
X case 'F': modifier_list |= FILE_FLAG | SUFFIX_FLAG; break;
X
X case 'e':
X case 'E': modifier_list |= SUFFIX_FLAG; break;
X
X case 'l':
X case 'L': modifier_list |= TOLOWER_FLAG; break;
X
X case 'i':
X case 'I': modifier_list |= INFNAME_FLAG; break;
X
X case 'u':
X case 'U': modifier_list |= TOUPPER_FLAG; break;
X
X case 'S':
X case 's':
X if( modifier_list ) {
X Warning( "Edit modifier must appear alone, ignored");
X modifier_list = 0;
X }
X else {
X separator = *s++;
X for( p=s; *p != separator && *p != edelim; p++ );
X
X if( *p == edelim )
X Warning("Syntax error in edit pattern, ignored");
X else {
X char *t1, *t2;
X pat1 = DmSubStr( s, p );
X for(s=p=p+1; (*p != separator) && (*p != edelim); p++ );
X pat2 = DmSubStr( s, p );
X t1 = Expand(pat1); FREE(pat1);
X t2 = Expand(pat2); FREE(pat2);
X result = Apply_edit( result, t1, t2, TRUE, FALSE );
X FREE( t1 );
X FREE( t2 );
X }
X s = p;
X }
X /* find the end of the macro spec, or the start of a new
X * modifier list for further processing of the result */
X
X for( ; (*s != edelim) && (*s != ':'); s++ );
X if( *s == ':' ) s++;
X break;
X
X case 'T':
X case 't':
X case '^':
X case '+':
X if( modifier_list ) {
X Warning( "Tokenize modifier must appear alone, ignored");
X modifier_list = 0;
X }
X else {
X separator = *s++;
X
X if( separator == '$' ) {
X p = _scan_ballanced_parens(s,'\0');
X
X if ( *p ) {
X char *tmp;
X pat1 = Expand(tmp = DmSubStr(s-1,p));
X FREE(tmp);
X result = Tokenize(result, pat1, switch_char, TRUE);
X FREE(pat1);
X }
X else {
X Warning( "Incomplete macro expression [%s]", s );
X }
X s = p;
X }
X else if ( separator == '\"' ) {
X /* we change the semantics to allow $(v:t")") */
X for (p = s; *p && *p != separator; p++)
X if (*p == '\\')
X if (p[1] == '\\' || p[1] == '"')
X p++;
X
X if( *p == 0 )
X Fatal( "Unterminated separator string" );
X else {
X pat1 = DmSubStr( s, p );
X result = Tokenize( result, pat1, switch_char, TRUE);
X FREE( pat1 );
X }
X s = p;
X }
X else {
X Warning(
X "Separator must be a quoted string or macro expression");
X }
X
X /* find the end of the macro spec, or the start of a new
X * modifier list for further processing of the result */
X
X for( ; (*s != edelim) && (*s != ':'); s++ );
X if( *s == ':' ) s++;
X }
X break;
X
X case ':':
X if( modifier_list ) {
X result = Apply_modifiers( modifier_list, result );
X modifier_list = 0;
X }
X break;
X
X default:
X Warning( "Illegal modifier in macro, ignored" );
X break;
X }
X }
X
X if( modifier_list ) /* apply modifier */
X result = Apply_modifiers( modifier_list, result );
X
X s++;
X }
X
X *ps = s;
X FREE( macro_name );
X DB_RETURN( result );
X}
X
X
Xstatic char*
X_scan_brace( s, ps, flag )/*
X============================
X This routine scans for { token_list } pairs. It expands the value of
X token_list by calling Expand on it. Token_list may be anything at all.
X Note that the routine count's ballanced parentheses. This means you
X cannot have something like { fred { joe }, if that is what you really
X need the write it as { fred {{ joe }, flag is set to 1 if all ok
X and to 0 if the braces were unballanced. */
X
Xchar *s;
Xchar **ps;
Xint *flag;
X{
X char *t;
X char *start;
X char *res;
X int lev = 1;
X int done = 0;
X
X DB_ENTER( "_scan_brace" );
X
X start = s;
X while( !done )
X switch( *s++ ) {
X case '{':
X if( *s == '{' ) break; /* ignore {{ */
X lev++;
X break;
X
X case '}':
X if( *s == '}' ) break; /* ignore }} */
X if( lev )
X if( --lev == 0 ) done = TRUE;
X break;
X
X case '$':
X if( *s == '{' || *s == '}' ) {
X if( (t = strchr(s,'}')) != NIL(char) )
X s = t;
X s++;
X }
X break;
X
X case '\0':
X if( lev ) {
X done = TRUE;
X s--;
X /* error malformed macro expansion */
X }
X break;
X }
X
X start = DmSubStr( start, (lev) ? s : s-1 );
X
X if( lev ) {
X /* Braces were not ballanced so just return the string.
X * Do not expand it. */
X
X res = DmStrJoin( "{", start, -1, FALSE );
X *flag = 0;
X }
X else {
X *flag = 1;
X res = Expand( start );
X
X if( (t = DmStrSpn( res, " \t" )) != res ) strcpy( res, t );
X }
X
X FREE( start ); /* this is ok! start is assigned a DmSubStr above */
X *ps = s;
X
X DB_RETURN( res );
X}
X
X
Xstatic char*
X_cross_prod( x, y )/*
X=====================
X Given two strings x and y compute the cross-product of the tokens found
X in each string. ie. if x = "a b" and y = "c d" return "ac ad bc bd".
X
X NOTE: buf will continue to grow until it is big enough to handle
X all cross product requests. It is never freed! (maybe I
X will fix this someday) */
X
Xchar *x;
Xchar *y;
X{
X static char *buf;
X static int buf_siz = 0;
X char *brkx;
X char *brky;
X char *cy;
X char *cx;
X char *res;
X int i;
X
X if( *x && *y ) {
X res = DmStrDup( "" ); cx = x;
X while( *cx ) {
X cy = y;
X brkx = DmStrPbrk( cx, " \t\n" );
X if( (brkx-cx == 2) && *cx == '\"' && *(cx+1) == '\"' ) cx = brkx;
X
X while( *cy ) {
X brky = DmStrPbrk( cy, " \t\n" );
X if( (brky-cy == 2) && *cy == '\"' && *(cy+1) == '\"' ) cy = brky;
X i = brkx-cx + brky-cy + 2;
X
X if( i > buf_siz ) { /* grow buf to the correct size */
X if( buf != NIL(char) ) FREE( buf );
X if( (buf = MALLOC( i, char )) == NIL(char)) No_ram();
X buf_siz = i;
X }
X
X strncpy( buf, cx, (i = brkx-cx) );
X buf[i] = '\0';
X if (brky-cy > 0) strncat( buf, cy, brky-cy );
X buf[i+(brky-cy)] = '\0';
X strcat( buf, " " );
X res = DmStrJoin( res, buf, -1, TRUE );
X cy = DmStrSpn( brky, " \t\n" );
X }
X cx = DmStrSpn( brkx, " \t\n" );
X }
X
X FREE( x );
X res[ strlen(res)-1 ] = '\0';
X }
X else
X res = DmStrJoin( x, y, -1, TRUE );
X
X FREE( y );
X return( res );
X}
END_OF_FILE
if test 28595 -ne `wc -c <'dmake/expand.c'`; then
echo shar: \"'dmake/expand.c'\" unpacked with wrong size!
fi
# end of 'dmake/expand.c'
fi
if test -f 'dmake/make.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/make.c'\"
else
echo shar: Extracting \"'dmake/make.c'\" \(34747 characters\)
sed "s/^X//" >'dmake/make.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/make.c,v 1.1 1994/10/06 17:41:19 dvadura Exp $
X-- SYNOPSIS -- perform the update of all outdated targets.
X--
X-- DESCRIPTION
X-- This is where we traverse the make graph looking for targets that
X-- are out of date, and we try to infer how to make them if we can.
X-- The usual make macros are understood, as well as some new ones:
X--
X-- $$ - expands to $
X-- $@ - full target name
X-- $* - target name with no suffix, same as $(@:db)
X-- or, the value of % in % meta rule recipes
X-- $? - list of out of date prerequisites
X-- $< - all prerequisites associated with rules line
X-- $& - all prerequisites associated with target
X-- $> - library name for target (if any)
X-- $^ - out of date prerequisites taken from value of $<
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: make.c,v $
X * Revision 1.1 1994/10/06 17:41:19 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
Xstatic void _drop_mac ANSI((HASHPTR));
Xstatic void _set_recipe ANSI((char*, int));
Xstatic void _set_tmd ANSI(());
Xstatic void _append_file ANSI((STRINGPTR, FILE*, char*, int));
Xstatic LINKPTR _dup_prq ANSI((LINKPTR));
Xstatic LINKPTR _expand_dynamic_prq ANSI(( LINKPTR, LINKPTR, char * ));
Xstatic char* _prefix ANSI((char *, char *));
Xstatic char* _pool_lookup ANSI((char *));
X
X#define RP_GPPROLOG 0
X#define RP_RECIPE 1
X#define RP_GPEPILOG 2
X#define NUM_RECIPES 3
X
Xstatic STRINGPTR _recipes[ NUM_RECIPES ];
X
X
XPUBLIC int
XMake_targets()/*
X================
X Actually go and make the targets on the target list */
X{
X LINKPTR lp;
X int done = 0;
X
X DB_ENTER( "Make_targets" );
X
X Read_state();
X _set_recipe( ".GROUPPROLOG", RP_GPPROLOG );
X _set_recipe( ".GROUPEPILOG", RP_GPEPILOG );
X
X /* Prevent recipe inference for .ROOT */
X if ( Root->ce_recipe == NIL(STRING) ) {
X TALLOC( Root->ce_recipe, 1, STRING );
X Root->ce_recipe->st_string = "";
X }
X
X /* Prevent recipe inference for .TARGETS */
X if ( Targets->ce_recipe == NIL(STRING) ) {
X TALLOC( Targets->ce_recipe, 1, STRING );
X Targets->ce_recipe->st_string = "";
X }
X
X /* Make sure that user defined targets are marked as root targets */
X for( lp = Targets->ce_prq; lp != NIL(LINK); lp = lp->cl_next )
X lp->cl_prq->ce_attr |= A_ROOT;
X
X while( !done ) {
X int rval;
X
X if( (rval = Make(Root, NIL(CELL))) == -1 )
X DB_RETURN(1);
X else
X done = Root->ce_flag & F_MADE;
X
X if( !rval && !done ) Wait_for_child( FALSE, -1 );
X }
X
X for( lp = Root->ce_prq; lp != NIL(LINK); lp = lp->cl_next ) {
X CELLPTR root = lp->cl_prq;
X if( !(root->ce_attr & A_UPDATED) )
X printf( "`%s' is up to date\n", root->CE_NAME );
X }
X
X DB_RETURN( 0 );
X}
X
X
X
Xint
XMake( cp, setdirroot )/*
X======================== Make a specified target */
XCELLPTR cp;
XCELLPTR setdirroot;
X{
X register LINKPTR dp, prev,next;
X register CELLPTR tcp;
X CELLPTR nsetdirroot;
X char *name, *lib;
X HASHPTR m_at, m_q, m_b, m_g, m_l, m_bb, m_up;
X char *all = NIL(char);
X char *inf = NIL(char);
X char *outall = NIL(char);
X char *imm = NIL(char);
X int rval = 0;
X int push = 0;
X int made = F_MADE;
X int ignore;
X time_t otime = (time_t) 1L;
X time_t ttime = (time_t) 1L;
X int mark_made = FALSE;
X
X DB_ENTER( "Make" );
X DB_PRINT( "mem", ("%s:-> mem %ld", cp->CE_NAME, (long) coreleft()) );
X
X m_q = m_b = m_g = m_l = m_bb = m_up = NIL(HASH);
X
X if (cp->ce_set && cp->ce_set != cp) {
X if( Verbose & V_MAKE )
X printf( "%s: Building .UPDATEALL representative [%s]\n", Pname,
X cp->ce_set->CE_NAME );
X cp = cp->ce_set;
X }
X
X /* If we are supposed to change directories for this target then do so.
X * If we do change dir, then modify the setdirroot variable to reflect
X * that fact for all of the prerequisites that we will be making. */
X
X nsetdirroot = setdirroot;
X ignore = (((cp->ce_attr|Glob_attr)&A_IGNORE) != 0);
X m_at = Def_macro( "@", cp->ce_fname, M_MULTI );
X
X if( cp->ce_attr & A_SETDIR ) {
X /* Change directory only if the previous .SETDIR is a different
X * directory from the current one. ie. all cells with the same .SETDIR
X * attribute are assumed to come from the same directory. */
X
X if( (setdirroot == NIL(CELL) || setdirroot->ce_dir != cp->ce_dir) &&
X (push = Push_dir(cp->ce_dir,cp->CE_NAME,ignore)) != 0 )
X setdirroot = cp;
X }
X
X DB_PRINT( "mem", ("%s:-A mem %ld", cp->CE_NAME, (long) coreleft()) );
X if( cp->ce_recipe == NIL(STRING) ) {
X char *dir = cp->ce_dir;
X
X if( Verbose & V_MAKE )
X printf( "%s: Infering prerequisite(s) and recipe for [%s]\n", Pname,
X cp->CE_NAME );
X
X Infer_recipe( cp, setdirroot );
X
X /* See if the directory has changed, if it has then make sure we
X * push it. */
X if( dir != cp->ce_dir ) {
X if( push ) Pop_dir(FALSE);
X push = Push_dir( cp->ce_dir, cp->CE_NAME, ignore );
X setdirroot = cp;
X }
X }
X
X for(dp=CeMeToo(cp); dp; dp=dp->cl_next) {
X tcp = dp->cl_prq;
X if( push ) {
X if( !(tcp->ce_attr & A_POOL) && tcp->ce_dir ) FREE( tcp->ce_dir );
X tcp->ce_dir = _pool_lookup(Pwd);
X tcp->ce_attr |= A_SETDIR|A_POOL;
X }
X tcp->ce_setdir = nsetdirroot;
X }
X
X DB_PRINT( "mem", ("%s:-A mem %ld", cp->CE_NAME, (long) coreleft()) );
X /* If we have not yet statted the target then do so. */
X if( !(cp->ce_flag & F_STAT) && !(cp->ce_attr&A_PHONY) ) {
X time_t itime = cp->ce_time;
X
X if (cp->ce_parent && (cp->ce_parent->ce_flag & F_MULTI)) {
X /* Inherit the stat info from the parent. */
X cp->ce_time = cp->ce_parent->ce_time;
X cp->ce_flag |= F_STAT;
X cp->ce_attr |= cp->ce_parent->ce_attr & A_PRECIOUS;
X }
X else {
X for(dp=CeMeToo(cp); dp; dp=dp->cl_next) {
X tcp = dp->cl_prq;
X Stat_target( tcp, TRUE, FALSE );
X
X if( tcp->ce_time == (time_t)0L ) {
X if( tcp->ce_flag & F_INFER )
X tcp->ce_time = itime;
X }
X else {
X /* File exists so don't remove it later. */
X tcp->ce_attr |= A_PRECIOUS;
X }
X
X if( Verbose & V_MAKE )
X printf("%s: Time stamp of [%s] is %ld\n",Pname,tcp->CE_NAME,
X tcp->ce_time);
X }
X }
X }
X
X DB_PRINT( "make", ("(%s, %ld, 0x%08x, 0x%04x)", cp->CE_NAME,
X cp->ce_time, cp->ce_attr, cp->ce_flag) );
X
X if( !(cp->ce_flag & F_TARGET) && (cp->ce_time == (time_t) 0L) )
X if( Makemkf ) {
X rval = -1;
X goto stop_making_it;
X }
X else if(cp->ce_prq != NIL(LINK)||(Augmake && (cp->ce_flag&F_EXPLICIT)))
X /* Assume an empty recipe for a target that we have run inference on
X * but do not have a set of rules for but for which we have inferred
X * a list of prerequisites. */
X cp->ce_flag |= F_RULES;
X else
X Fatal( "`%s' not found, and can't be made", cp->CE_NAME );
X
X DB_PRINT( "mem", ("%s:-A mem %ld", cp->CE_NAME, (long) coreleft()) );
X
X /* set value of $* if we have not infered a recipe, in this case $* is
X * the same as $(@:db), this allows us to be compatible with BSD make */
X if( cp->ce_per == NIL(char) ) cp->ce_per = "$(@:db)";
X
X /* Search the prerequisite list for dynamic prerequisites and if we find
X * them copy the list of prerequisites for potential later re-use. */
X if ( cp->ce_prqorg == NIL(LINK) ) {
X for( dp = cp->ce_prq; dp != NIL(LINK); dp = dp->cl_next )
X if ( strchr(dp->cl_prq->CE_NAME, '$') != NULL )
X break;
X
X if (dp != NIL(LINK)) {
X cp->ce_prqorg = _dup_prq(cp->ce_prq);
X }
X }
X
X m_at = Def_macro("@", cp->ce_fname, M_MULTI);
X
X /* Define conditional macros if any */
X for(dp=CeMeToo(cp); dp; dp=dp->cl_next) {
X tcp=dp->cl_prq;
X if (tcp->ce_cond != NIL(STRING)) {
X STRINGPTR sp;
X
X tcp->ce_pushed = NIL(HASH);
X for(sp=tcp->ce_cond; sp; sp=sp->st_next) {
X if(Parse_macro(sp->st_string,M_MULTI|M_PUSH)) {
X HASHPTR hp;
X
X hp = GET_MACRO(LastMacName);
X hp->ht_link = tcp->ce_pushed;
X tcp->ce_pushed = hp;
X }
X else {
X Error("Invalid conditional macro expression [%s]",sp->st_string);
X }
X }
X }
X }
X
X for( prev=NULL,dp=cp->ce_prq; dp != NIL(LINK); prev=dp, dp=next ) {
X int seq;
X int nesting_count;
X
X /* Make the prerequisite, note that if the current target has the
X * .LIBRARY attribute set we pass on to the prerequisite the .LIBRARYM
X * attribute and pass on the name of the current target as the library
X * name, and we take it away when we are done. */
X next = dp->cl_next;
X
X tcp = dp->cl_prq;
X seq = (((cp->ce_attr | Glob_attr) & A_SEQ) != 0);
X
X if( tcp->ce_flag & F_VISITED )
X if( _explode_graph(tcp, dp, setdirroot) == 0 ) {
X /* didn't blow it up so see if we need to wait for it. */
X if( tcp->ce_flag & F_MADE ) {
X if( tcp->ce_time > ttime ) ttime = tcp->ce_time;
X continue;
X }
X else
X goto stop_making_it;
X }
X else
X tcp = dp->cl_prq;
X
X if( seq && !made ) goto stop_making_it;
X
X nesting_count = 0;
X while ( tcp
X && strchr(tcp->CE_NAME, '$')
X ) {
X if ( nesting_count++ > DynamicNestLevel ) {
X Fatal( "Dynamic Macro nesting level exceeded [%s]",
X cp->CE_NAME );
X }
X /* Make this prerequisite link point at the real prerequisite we
X * are after, ie figure out what the dynamic one is and point at it.*/
X
X name = Expand( tcp->CE_NAME );
X if( strcmp(name,cp->CE_NAME) == 0 )
X Fatal("Detected circular dynamic dependency; generated '%s'",name);
X
X dp = _expand_dynamic_prq( cp->ce_prq, dp, name );
X FREE( name );
X
X tcp = dp->cl_prq;
X if ( tcp ) {
X next = dp->cl_next;
X }
X }
X
X /* Dynamic expansion results in a NULL cell only when the the new
X * prerequisite is already in the prerequisite list. In this case
X * delete the cell and continue. */
X if ( tcp == NIL(CELL) ) {
X FREE(dp);
X if ( prev == NIL(LINK) ) {
X cp->ce_prq = next;
X }
X else {
X prev->cl_next = next;
X }
X continue;
X }
X
X if( cp->ce_attr & A_LIBRARY ) {
X tcp->ce_attr |= A_LIBRARYM;
X tcp->ce_lib = cp->ce_fname;
X }
X
X if( (tcp->ce_flag & (F_INFER|F_STAT))==F_INFER && cp->ce_time >= ttime )
X tcp->ce_time = cp->ce_time;
X
X /* Propagate the parent's F_REMOVE and F_INFER flags to the children.
X * Make certain to do this AFTER propagating the time, since the
X * time propagation test above uses the F_INFER flag to decide if
X * it should do so. */
X tcp->ce_flag |= cp->ce_flag & (F_REMOVE|F_INFER);
X
X /* Propagate parents A_ROOT attribute to a child if the parent is a
X * F_MULTI target. */
X if( (cp->ce_flag & F_MULTI) && (cp->ce_attr & A_ROOT) )
X tcp->ce_attr |= A_ROOT;
X
X tcp->ce_parent = cp;
X rval |= Make(tcp, setdirroot);
X
X if( cp->ce_attr & A_LIBRARY )
X tcp->ce_attr ^= A_LIBRARYM;
X
X if( rval == -1 || (seq && (rval==1)) )
X goto stop_making_it;
X
X if( tcp->ce_time > ttime ) ttime = tcp->ce_time;
X made &= tcp->ce_flag & F_MADE;
X }
X
X
X /* Do the loop again. We are most definitely going to make the current
X * cell now. NOTE: doing this loop here also results in a reduction
X * in peak memory usage by the algorithm. */
X
X for( dp = cp->ce_prq; dp != NIL(LINK); dp = dp->cl_next ) {
X int tgflg;
X tcp = dp->cl_prq;
X name = tcp->ce_fname;
X
X /* make certain that all prerequisites are made prior to advancing. */
X if( !(tcp->ce_flag & F_MADE) ) goto stop_making_it;
X
X /* If the target is a library, then check to make certain that a member
X * is newer than an object file sitting on disk. If the disk version
X * is newer then set the time stamps so that the archived member is
X * replaced. */
X if( cp->ce_attr & A_LIBRARY )
X if( tcp->ce_time < cp->ce_time ) {
X time_t mtime = Do_stat( name, tcp->ce_lib, NIL(char *), FALSE );
X if( mtime < tcp->ce_time ) tcp->ce_time = cp->ce_time+1L;
X }
X
X if( tcp->ce_time > otime ) otime = tcp->ce_time;
X
X all = DmStrApp( all, name );
X if( (tgflg = (dp->cl_flag & F_TARGET)) != 0 ) inf = DmStrApp( inf, name );
X
X if((cp->ce_time<tcp->ce_time) || ((tcp->ce_flag & F_TARGET) && Force)) {
X outall = DmStrApp( outall, name );
X if( tgflg ) imm = DmStrApp( imm, name );
X }
X }
X
X DB_PRINT( "mem", ("%s:-C mem %ld", cp->CE_NAME, (long) coreleft()) );
X DB_PRINT( "make", ("I make '%s' if %ld > %ld", cp->CE_NAME, otime,
X cp->ce_time) );
X
X if( Verbose & V_MAKE && !(cp->ce_flag & F_MULTI) ) {
X printf( "%s: >>>> Making ", Pname );
X if( cp->ce_count != 0 )
X printf( "[%s::{%d}]\n", cp->CE_NAME, cp->ce_count );
X else
X printf( "[%s]\n", cp->CE_NAME );
X }
X
X m_at = Def_macro( "@", cp->ce_fname, M_MULTI );
X m_g = Def_macro( ">", cp->ce_lib, M_MULTI|M_EXPANDED );
X m_q = Def_macro( "?", outall, M_MULTI|M_EXPANDED );
X m_b = Def_macro( "<", inf, M_MULTI|M_EXPANDED );
X m_l = Def_macro( "&", all, M_MULTI|M_EXPANDED );
X m_up = Def_macro( "^", imm, M_MULTI|M_EXPANDED );
X m_bb = Def_macro( "*", cp->ce_per, M_MULTI );
X
X _recipes[ RP_RECIPE ] = cp->ce_recipe;
X
X /* We attempt to make the target if
X * 1. it has a newer prerequisite
X * 2. It is a target and Force is set
X * 3. It's set of recipe lines has changed.
X */
X if( Check_state(cp, _recipes, NUM_RECIPES )
X || (cp->ce_time < otime)
X || ((cp->ce_flag & F_TARGET) && Force)
X ) {
X
X /* Only checking so stop as soon as we determine we will make
X * something */
X if( Check ) {
X rval = -1;
X goto stop_making_it;
X }
X
X if( Verbose & V_MAKE )
X printf( "%s: Updating [%s], (%ld > %ld)\n", Pname,
X cp->CE_NAME, otime, cp->ce_time );
X
X if( Touch ) {
X name = cp->ce_fname;
X lib = cp->ce_lib;
X
X if( (!(Glob_attr & A_SILENT) || !Trace) && !(cp->ce_attr & A_PHONY) )
X if( lib == NIL(char) )
X printf("touch(%s)", name );
X else if( cp->ce_attr & A_SYMBOL )
X printf("touch(%s((%s)))", lib, name );
X else
X printf("touch(%s(%s))", lib, name );
X
X if( !Trace && !(cp->ce_attr & A_PHONY) )
X if( Do_touch( name, lib,
X (cp->ce_attr & A_SYMBOL) ? &name : NIL(char *) ) != 0 )
X printf( " not touched - non-existant" );
X
X if( (!(Glob_attr & A_SILENT) || !Trace) && !(cp->ce_attr & A_PHONY) )
X printf( "\n" );
X
X Update_time_stamp( cp );
X }
X else if( cp->ce_recipe != NIL(STRING) ) {
X if( !(cp->ce_flag & F_SINGLE) )
X rval = Exec_commands( cp );
X else {
X TKSTR tk;
X
X _drop_mac( m_q );
X
X if( outall && *outall ) {
X SET_TOKEN( &tk, outall );
X
X Doing_bang = TRUE;
X name = Get_token( &tk, "", FALSE );
X do {
X m_q->ht_value = name;
X
X Wait_for_completion = TRUE; /* Reset in Exec_commands */
X rval = Exec_commands( cp );
X Unlink_temp_files(cp);
X }
X while( *(name = Get_token( &tk, "", FALSE )) != '\0' );
X Doing_bang = FALSE;
X }
X
X Update_time_stamp( cp );
X m_q->ht_value = NIL(char);
X }
X }
X else if( !(cp->ce_flag & F_RULES) && !(cp->ce_flag & F_STAT) &&
X (!(cp->ce_attr & A_ROOT) || !(cp->ce_flag & F_EXPLICIT)) )
X Fatal( "Don't know how to make `%s'",cp->CE_NAME );
X else {
X /* Empty recipe, set the flag as MADE and update the time stamp */
X Update_time_stamp( cp );
X }
X }
X else {
X mark_made = TRUE;
X }
X
X /* Make sure everyone gets remade if Force is set */
X for(dp=CeMeToo(cp); dp; dp=dp->cl_next) {
X tcp=dp->cl_prq;
X
X if( !(tcp->ce_flag & F_TARGET) && Force ) tcp->ce_time = Do_time();
X if( mark_made ) {
X tcp->ce_flag |= F_MADE;
X if( tcp->ce_flag & F_MULTI ) {
X LINKPTR tdp;
X for( tdp = tcp->ce_prq; tdp != NIL(LINK); tdp = tdp->cl_next )
X tcp->ce_attr |= tdp->cl_prq->ce_attr & A_UPDATED;
X }
X }
X
X tcp->ce_flag |= F_VISITED;
X
X /* Note: If the prerequisite was made using a .SETDIR= attribute
X * directory then we will include the directory in the fname
X * of the target. */
X if( push ) {
X char *dir = nsetdirroot ? nsetdirroot->ce_dir : Makedir;
X char *pref = _prefix(dir,tcp->ce_dir);
X char *nname = Build_path(pref, tcp->ce_fname);
X
X FREE(pref);
X if( (tcp->ce_attr & A_FFNAME) && (tcp->ce_fname != NIL(char)) )
X FREE( tcp->ce_fname );
X
X tcp->ce_fname = DmStrDup(nname);
X tcp->ce_attr |= A_FFNAME;
X }
X }
X
Xstop_making_it:
X _drop_mac( m_g );
X _drop_mac( m_q );
X _drop_mac( m_b );
X _drop_mac( m_l );
X _drop_mac( m_bb );
X _drop_mac( m_up );
X _drop_mac( m_at );
X
X /* undefine conditional macros if any */
X for(dp=CeMeToo(cp); dp; dp=dp->cl_next) {
X tcp=dp->cl_prq;
X
X while (tcp->ce_pushed != NIL(HASH)) {
X HASHPTR cur = tcp->ce_pushed;
X tcp->ce_pushed = cur->ht_link;
X
X Pop_macro(cur);
X FREE(cur->ht_name);
X if(cur->ht_value)
X FREE(cur->ht_value);
X FREE(cur);
X }
X }
X
X while( push-- ) Pop_dir(FALSE);
X
X if( inf != NIL(char) ) FREE( inf );
X if( all != NIL(char) ) FREE( all );
X if( imm != NIL(char) ) FREE( imm );
X if( outall != NIL(char) ) FREE( outall );
X
X DB_PRINT( "mem", ("%s:-< mem %ld", cp->CE_NAME, (long) coreleft()) );
X DB_RETURN( rval );
X}
X
X
Xstatic char *
X_prefix( pfx, pat )
Xchar *pfx;
Xchar *pat;
X{
X char *cmp1=pfx;
X char *cmp2=pat;
X char *result = DmStrDup("");
X char *up;
X
X while(*pfx && *pat) {
X pfx = DmStrSpn(cmp1, DirBrkStr);
X pat = DmStrSpn(cmp2, DirBrkStr);
X
X cmp1 = DmStrPbrk(pfx, DirBrkStr);
X cmp2 = DmStrPbrk(pat, DirBrkStr);
X
X if ( (cmp1-pfx) != (cmp2-pat) || strncmp(pfx,pat,cmp1-pfx) != 0 )
X break;
X }
X
X up = DmStrJoin("..",DirSepStr,-1,FALSE);
X cmp1 = pfx;
X while ( *(pfx=DmStrSpn(cmp1,DirBrkStr)) != '\0' ) {
X cmp1 = DmStrPbrk(pfx,DirBrkStr);
X result = DmStrJoin(result,up,-1,TRUE);
X }
X
X cmp2 = pat;
X while ( *(pat=DmStrSpn(cmp2,DirBrkStr)) != '\0' ) {
X char *tmp;
X char *x;
X cmp2 = DmStrPbrk(pat, DirBrkStr);
X tmp = DmStrDup(Build_path(result,x=DmSubStr(pat,cmp2)));
X FREE(result);
X FREE(x);
X result = tmp;
X }
X
X return(result);
X}
X
X
Xstatic LINKPTR
X_dup_prq( lp )
XLINKPTR lp;
X{
X LINKPTR tlp;
X
X if( lp == NIL(LINK) ) return(lp);
X
X TALLOC(tlp, 1, LINK);
X tlp->cl_prq = lp->cl_prq;
X tlp->cl_flag = lp->cl_flag;
X tlp->cl_next = _dup_prq( lp->cl_next );
X
X return(tlp);
X}
X
X
Xstatic LINKPTR
X_expand_dynamic_prq( head, lp, name )
XLINKPTR head;
XLINKPTR lp;
Xchar *name;
X{
X CELLPTR cur = lp->cl_prq;
X
X if ( strchr(name, ' ') == NIL(char) ) {
X CELLPTR prq = Def_cell(name);
X LINKPTR tmp;
X
X for(tmp=head;tmp != NIL(LINK) && tmp->cl_prq != prq;tmp=tmp->cl_next);
X
X if ( !tmp )
X lp->cl_prq = prq;
X }
X else {
X LINKPTR tlp = lp;
X LINKPTR next = lp->cl_next;
X TKSTR token;
X char *p;
X int first=TRUE;
X
X SET_TOKEN(&token, name);
X while (*(p=Get_token(&token, "", FALSE)) != '\0') {
X CELLPTR prq = Def_cell(p);
X LINKPTR tmp;
X
X for(tmp=head;tmp != NIL(LINK) && tmp->cl_prq != prq;tmp=tmp->cl_next);
X if ( tmp ) continue;
X
X if ( first ) {
X first = FALSE;
X }
X else {
X TALLOC(tlp->cl_next,1,LINK);
X tlp = tlp->cl_next;
X tlp->cl_flag |= F_TARGET;
X tlp->cl_next = next;
X }
X
X tlp->cl_prq = prq;
X }
X CLEAR_TOKEN( &token );
X }
X
X if ( lp->cl_prq == cur ) {
X lp->cl_prq = NIL(CELL);
X lp->cl_flag = 0;
X }
X
X return(lp);
X}
X
X
Xstatic void
X_drop_mac( hp )/*
X================ set a macro value to zero. */
XHASHPTR hp;
X{
X if( hp && hp->ht_value != NIL(char) ) {
X FREE( hp->ht_value );
X hp->ht_value = NIL(char);
X }
X}
X
X
X
Xint
X_explode_graph( cp, parent, setdirroot )/*
X==========================================
X Check to see if we have made the node already. If so then don't do
X it again, except if the cell's ce_setdir field is set to something other
X than the value of setdirroot. If they differ then, and we have made it
X already, then make it again and set the cell's stat bit to off so that
X we do the stat again. */
XCELLPTR cp;
XLINKPTR parent;
XCELLPTR setdirroot;
X{
X static CELLPTR removecell = NIL(CELL);
X
X if ( removecell == NIL(CELL) )
X removecell = Def_cell(".REMOVE");
X
X /* we may return if we made it already from the same setdir location,
X * or if it is not a library member whose lib field is non NULL. (if
X * it is such a member then we have a line of the form:
X * lib1 lib2 .LIBRARY : member_list...
X * and we have to make sure all members are up to date in both libs. */
X
X if ( setdirroot == removecell )
X return( 0 );
X
X if( cp->ce_setdir == setdirroot &&
X !((cp->ce_attr & A_LIBRARYM) && (cp->ce_lib != NIL(char))) )
X return( 0 );
X
X /* We check to make sure that we are comming from a truly different
X * directory, ie. ".SETDIR=joe : a.c b.c d.c" are all assumed to come
X * from the same directory, even though setdirroot is different when
X * making dependents of each of these targets. */
X
X if( cp->ce_setdir != NIL(CELL) &&
X setdirroot != NIL(CELL) &&
X cp->ce_dir &&
X setdirroot->ce_dir &&
X !strcmp(cp->ce_dir, setdirroot->ce_dir) )
X return( 0 );
X
X if( Max_proc > 1 ) {
X LINKPTR dp;
X
X TALLOC(parent->cl_prq, 1, CELL);
X *parent->cl_prq = *cp;
X cp = parent->cl_prq;
X cp->ce_prq = _dup_prq(cp->ce_prqorg);
X cp->ce_all.cl_prq = cp;
X CeNotMe(cp) = _dup_prq(CeNotMe(cp));
X
X for(dp=CeNotMe(cp);dp;dp=dp->cl_next) {
X CELLPTR tcp = dp->cl_prq;
X TALLOC(dp->cl_prq,1,CELL);
X *dp->cl_prq = *tcp;
X dp->cl_prq->ce_flag &= ~(F_STAT|F_VISITED|F_MADE);
X dp->cl_prq->ce_set = cp;
X }
X }
X cp->ce_flag &= ~(F_STAT|F_VISITED|F_MADE);
X
X /* Indicate that we exploded the graph and that the current node should
X * be made. */
X return(1);
X}
X
X
X
XPUBLIC int
XExec_commands( cp )/*
X=====================
X Execute the commands one at a time that are pointed to by the rules pointer
X of the target cp. If a group is indicated, then the ce_attr determines
X .IGNORE and .SILENT treatment for the group.
X
X The function returns 0, if the command is executed and has successfully
X returned, and returns 1 if the command is executing but has not yet
X returned (for parallel makes).
X
X The F_MADE bit in the cell is guaranteed set when the command has
X successfully completed. */
XCELLPTR cp;
X{
X static HASHPTR useshell = NIL(HASH);
X static HASHPTR command = NIL(HASH);
X static int read_cmnd = 0;
X register STRINGPTR rp;
X STRINGPTR orp;
X char *cmnd;
X char *groupfile;
X FILE *tmpfile;
X int do_it;
X t_attr attr;
X int group;
X int trace;
X int rval = 0;
X
X DB_ENTER( "Exec_commands" );
X
X attr = Glob_attr | cp->ce_attr;
X trace = Trace || !(attr & A_SILENT);
X group = cp->ce_flag & F_GROUP;
X
X /* Do it again here for those that call us from places other than Make()
X * above. */
X orp = _recipes[ RP_RECIPE ];
X _recipes[ RP_RECIPE ] = cp->ce_recipe;
X
X if( group ) {
X /* Leave this assignment of Current_target here. It is needed just
X * incase the user hits ^C after the tempfile for the group recipe
X * has been opened. */
X Current_target = cp;
X trace = Trace || !(attr & A_SILENT);
X
X if( !Trace ) tmpfile = Start_temp( Grp_suff, cp, &groupfile );
X if( trace ) fputs( "[\n", stdout );
X
X /* Emit group prolog */
X if( attr & A_PROLOG )
X _append_file( _recipes[RP_GPPROLOG], tmpfile, cp->CE_NAME, trace );
X }
X
X if( !useshell )
X useshell=Def_macro("USESHELL",NIL(char),M_MULTI|M_EXPANDED);
X
X if( !read_cmnd ) {
X command = GET_MACRO("COMMAND");
X read_cmnd = 1;
X }
X
X /* Process commands in recipe. If in group, merely append to file.
X * Otherwise, run them. */
X for( rp=_recipes[RP_RECIPE]; rp != NIL(STRING); rp=rp->st_next,FREE(cmnd)){
X t_attr a_attr = A_DEFAULT;
X t_attr l_attr;
X char *p;
X int new_attr = FALSE;
X int shell;
X
X /* Reset it for each recipe line otherwise tempfiles don't get removed.
X * Since processing of $(mktmp ...) depends on Current_target being
X * correctly set. */
X Current_target = cp;
X
X /* Only check for +,-,%,@ if the recipe line begins with a '$' macro
X * expansion. Otherwise there is no way it is going to find these
X * now. */
X if( *rp->st_string == '$' && !group ) {
X t_attr s_attr = Glob_attr;
X Glob_attr |= A_SILENT;
X Suppress_temp_file = TRUE;
X cmnd = Expand(rp->st_string);
X Suppress_temp_file = FALSE;
X a_attr |= Rcp_attribute(cmnd);
X FREE(cmnd);
X ++new_attr;
X Glob_attr = s_attr;
X }
X
X l_attr = attr|a_attr|rp->st_attr;
X shell = ((l_attr & A_SHELL) != 0);
X useshell->ht_value = (group||shell)?"yes":"no";
X
X cmnd = Expand( rp->st_string );
X
X if( new_attr && (p = DmStrSpn(cmnd," \t\n+-@%")) != cmnd )
X strcpy(cmnd,p);
X
X /* COMMAND macro is set to "$(CMNDNAME) $(CMNDARGS)" by default, it is
X * possible for the user to reset it to, for example
X * COMMAND = $(CMNDNAME) @$(mktmp $(CMNDARGS))
X * in order to get a different interface for his command execution. */
X if( command != NIL(HASH) && !group ) {
X char *cname = cmnd;
X
X if ( *(p=DmStrPbrk(cmnd," \t\n")) != '\0' ) {
X *p = '\0';
X (void)Def_macro("CMNDARGS",DmStrSpn(p+1," \t\n"),M_MULTI|M_EXPANDED);
X }
X else
X (void) Def_macro("CMNDARGS","",M_MULTI|M_EXPANDED);
X
X (void) Def_macro("CMNDNAME",cname,M_MULTI|M_EXPANDED);
X
X cmnd = Expand("$(COMMAND)");
X FREE(cname); /* cname == cmnd at this point. */
X
X /* Collect up any new attributes */
X l_attr |= Rcp_attribute(cmnd);
X shell = ((l_attr & A_SHELL) != 0);
X
X /* clean up the attributes that we may have just added. */
X if( (p = DmStrSpn(cmnd," \t\n+-@%")) != cmnd )
X strcpy(cmnd,p);
X }
X
X Swap_on_exec = ((l_attr & A_SWAP) != 0); /* Swapping for DOS only */
X do_it = !Trace;
X
X if( !group && Trace && DmStrStr(rp->st_string,"$(MAKE)") ) {
X Wait_for_completion |= Trace;
X do_it = TRUE;
X }
X
X if( group )
X Append_line( cmnd, TRUE, tmpfile, cp->CE_NAME, trace, 0 );
X else {
X if( *DmStrSpn(cmnd, " \t") != '\0' )
X Print_cmnd(cmnd, !(do_it && (l_attr & A_SILENT)), 0);
X else
X do_it = FALSE;
X
X rval=Do_cmnd(cmnd,FALSE,do_it,cp,(l_attr&A_IGNORE)!=0, shell,
X rp->st_next == NIL(STRING) );
X }
X }
X
X /* If it is a group then output the EPILOG if required and possibly
X * execute the command */
X if( group && !(cp->ce_attr & A_ERROR) ) {
X if( attr & A_EPILOG ) /* emit epilog */
X _append_file( _recipes[RP_GPEPILOG], tmpfile, cp->CE_NAME, trace );
X
X if( trace ) fputs("]\n", stdout);
X
X do_it = !Trace;
X if( do_it ) Close_temp( cp, tmpfile );
X rval = Do_cmnd(groupfile, TRUE, do_it, cp, (attr & A_IGNORE)!=0,
X TRUE, TRUE);
X }
X
X Wait_for_completion = FALSE;
X _recipes[ RP_RECIPE ] = orp;
X cp->ce_attr &= ~A_ERROR;
X DB_RETURN( rval );
X}
X
X
XPUBLIC void
XPrint_cmnd( cmnd, echo, map )/*
X================================
X This routine is called to print out the command to stdout. If echo is
X false the printing to stdout is supressed, but the new lines in the command
X are still deleted. */
Xchar *cmnd;
Xint echo;
Xint map;
X{
X register char *p;
X register char *n;
X char tmp[3];
X
X DB_ENTER( "Print_cmnd" );
X
X if( echo ) {
X printf( "%s\n", cmnd );
X fflush(stdout);
X }
X
X tmp[0] = ESCAPE_CHAR;
X tmp[1] = CONTINUATION_CHAR;
X tmp[2] = '\0';
X
X for( p=cmnd; *(n = DmStrPbrk(p,tmp)) != '\0'; )
X if(*n == CONTINUATION_CHAR && n[1] == '\n') {
X DB_PRINT( "make", ("fixing [%s]", p) );
X strcpy( n, n+2 );
X p = n;
X }
X else {
X if( *n == ESCAPE_CHAR && map ) Map_esc( n );
X p = n+1;
X }
X
X DB_VOID_RETURN;
X}
X
X
X
X/* These routines are used to maintain a stack of directories when making
X * the targets. If a target cd's to the directory then it is assumed that
X * it will undo it when it is finished making itself. */
X
Xstatic STRINGPTR dir_stack = NIL(STRING);
X
Xint
XPush_dir( dir, name, ignore )/*
X===============================
X Change the current working directory to dir and save the current
X working directory on the stack so that we can come back.
X
X If ignore is TRUE then do not complain about _ch_dir if not possible.*/
Xchar *dir;
Xchar *name;
Xint ignore;
X{
X STRINGPTR new_dir;
X int freedir=FALSE;
X
X DB_ENTER( "Push_dir" );
X
X if( dir == NIL(char) || *dir == '\0' ) dir = Pwd;
X if( *dir == '\'' && dir[strlen(dir)-1] == '\'' ) {
X dir = DmStrDup(dir+1);
X dir[strlen(dir)-1]='\0';
X freedir=TRUE;
X }
X else if (strchr(dir,'$') != NIL(char)) {
X dir = Expand(dir);
X freedir=TRUE;
X }
X else
X dir = DmStrDup(dir);
X
X if( Set_dir(dir) ) {
X if( !ignore )
X Fatal( "Unable to change to directory `%s', target is [%s]",
X dir, name );
X if (freedir) FREE(dir);
X DB_RETURN( 0 );
X }
X
X DB_PRINT( "dir", ("Push: [%s]", dir) );
X if( Verbose & V_DIR_SET )
X printf( "%s: Changed to directory [%s]\n", Pname, dir );
X
X if (freedir) FREE( dir );
X TALLOC( new_dir, 1, STRING );
X new_dir->st_next = dir_stack;
X dir_stack = new_dir;
X new_dir->st_string = DmStrDup( Pwd );
X
X Def_macro( "PWD", Get_current_dir(), M_MULTI | M_EXPANDED );
X _set_tmd();
X
X DB_RETURN( 1 );
X}
X
X
X
XPUBLIC void
XPop_dir(ignore)/*
X=================
X Change the current working directory to the previous saved dir. */
Xint ignore;
X{
X STRINGPTR old_dir;
X char *dir;
X
X DB_ENTER( "Pop_dir" );
X
X if( dir_stack == NIL(STRING) )
X if( ignore ) {
X DB_VOID_RETURN;
X }
X else
X Error( "Directory stack empty for return from .SETDIR" );
X
X if( Set_dir(dir = dir_stack->st_string) )
X Fatal( "Could not change to directory `%s'", dir );
X
X Def_macro( "PWD", dir, M_MULTI | M_EXPANDED );
X DB_PRINT( "dir", ("Pop: [%s]", dir) );
X if( Verbose & V_DIR_SET )
X printf( "%s: Changed back to directory [%s]\n", Pname, dir);
X
X old_dir = dir_stack;
X dir_stack = dir_stack->st_next;
X
X FREE( old_dir->st_string );
X FREE( old_dir );
X _set_tmd();
X
X DB_VOID_RETURN;
X}
X
X
X
Xstatic void
X_set_tmd()/*
X============
X Set the TWD Macro */
X{
X TKSTR md, pd;
X char *m, *p;
X char *tmd;
X int is_sep;
X int first = 1;
X
X SET_TOKEN( &md, Makedir );
X SET_TOKEN( &pd, Pwd );
X
X m = Get_token( &md, DirBrkStr, FALSE );
X (void) Get_token( &pd, DirBrkStr, FALSE );
X is_sep = (strchr(DirBrkStr, *m) != NIL(char));
X tmd = DmStrDup( "" );
X
X do {
X m = Get_token( &md, DirBrkStr, FALSE );
X p = Get_token( &pd, DirBrkStr, FALSE );
X
X if( !is_sep && strcmp(m, p) ) { /* they differ */
X char *tmp;
X if( first ) { /* They differ in the first component */
X tmd = Makedir; /* In this case use the full path */
X break;
X }
X
X if( *p ) tmp = Build_path( "..", tmd );
X if( *m ) tmp = Build_path( tmd, m );
X FREE( tmd );
X tmd = DmStrDup( tmp );
X }
X
X is_sep = 1-is_sep;
X first = 0;
X } while (*m || *p);
X
X CLEAR_TOKEN( &md );
X CLEAR_TOKEN( &pd );
X
X Def_macro( "TMD", tmd, M_MULTI | M_EXPANDED );
X if( tmd != Makedir ) FREE( tmd );
X}
X
X
Xstatic void
X_set_recipe( target, ind )/*
X============================
X Set up the _recipes static variable so that the slot passed in points
X at the rules corresponding to the target supplied. */
Xchar *target;
Xint ind;
X{
X CELLPTR cp;
X HASHPTR hp;
X
X if( (hp = Get_name(target, Defs, FALSE)) != NIL(HASH) ) {
X cp = hp->CP_OWNR;
X _recipes[ ind ] = cp->ce_recipe;
X }
X else
X _recipes[ ind ] = NIL(STRING);
X}
X
X
X
XPUBLIC void
XAppend_line( cmnd, newline, tmpfile, name, printit, map )
Xchar *cmnd;
Xint newline;
XFILE *tmpfile;
Xchar *name;
Xint printit;
Xint map;
X{
X Print_cmnd( cmnd, printit, map );
X
X if( Trace ) return;
X
X fputs(cmnd, tmpfile);
X if( newline ) fputc('\n', tmpfile);
X fflush(tmpfile);
X
X if( ferror(tmpfile) )
X Fatal("Write error on temporary file, while processing `%s'", name);
X}
X
X
X
Xstatic void
X_append_file( rp, tmpfile, name, printit )
Xregister STRINGPTR rp;
XFILE *tmpfile;
Xchar *name;
Xint printit;
X{
X char *cmnd;
X
X while( rp != NIL(STRING) ) {
X Append_line(cmnd = Expand(rp->st_string), TRUE, tmpfile, name, printit,0);
X FREE(cmnd);
X rp = rp->st_next;
X }
X}
X
X
X#define NUM_BUCKETS 20
X
Xtypedef struct strpool {
X char *string; /* a pointer to the string value */
X uint32 keyval; /* the strings hash value */
X struct strpool *next; /* hash table link pointer */
X} POOL, *POOLPTR;
X
Xstatic POOLPTR strings[ NUM_BUCKETS ];
X
Xstatic char *
X_pool_lookup( str )/*
X=====================
X Scan down the list of chained strings and see if one of them matches
X the string we are looking for. */
Xchar *str;
X{
X register POOLPTR key;
X uint32 keyval;
X uint16 hv;
X uint16 keyindex;
X char *string;
X
X DB_ENTER( "_pool_lookup" );
X
X if( str == NIL(char) ) DB_RETURN("");
X
X hv = Hash(str, &keyval);
X key = strings[ keyindex = (hv % NUM_BUCKETS) ];
X
X while( key != NIL(POOL) )
X if( (key->keyval != keyval) || strcmp(str, key->string) )
X key = key->next;
X else
X break;
X
X if( key == NIL(POOL) ) {
X DB_PRINT( "pool", ("Adding string [%s]", str) );
X TALLOC( key, 1, POOL ); /* not found so add string */
X
X key->string = string = DmStrDup(str);
X key->keyval = keyval;
X
X key->next = strings[ keyindex ];
X strings[ keyindex ] = key;
X }
X else {
X DB_PRINT( "pool", ("Found string [%s], key->string") );
X string = key->string;
X }
X
X DB_RETURN( string );
X}
END_OF_FILE
if test 34747 -ne `wc -c <'dmake/make.c'`; then
echo shar: \"'dmake/make.c'\" unpacked with wrong size!
fi
# end of 'dmake/make.c'
fi
if test -f 'dmake/make.cmd' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/make.cmd'\"
else
echo shar: Extracting \"'dmake/make.cmd'\" \(1310 characters\)
sed "s/^X//" >'dmake/make.cmd' <<'END_OF_FILE'
Xecho off
Xcls
Xrem *** This is the make command file that is used under OS/2 to make the
Xrem *** first version of dmake. It isn't pretty but it does work, assuming
Xrem *** the compilers have been correctly setup.
Xrem
Xecho Running make.cmd script to make a %1 copy of dmake.
X
Xif %0%1 == %0 goto error
Xif %1 == msc40 goto mkmsc40
Xif %1 == msc50 goto mkmsc50
Xif %1 == msc51 goto mkmsc51
Xif %1 == msc60 goto mkmsc60
Xif %1 == ibm goto mkibm
X
Xrem label the possible DOS variations for dmake here.
X:error
Xecho OS/2 INDEX: You must specify one of:
Xecho ------------------
Xecho msc40 - Microsoft C 4.0 compile.
Xecho msc50 - Microsoft C 5.0 compile.
Xecho msc51 - Microsoft C 5.1 compile.
Xecho msc60 - Microsoft C 6.0 compile.
X3cho ibm - IBM C 2.0 compile.
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 4.0
X:mkmsc40
Xos2\mscdos\mk40.cmd
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 5.0
X:mkmsc50
Xos2\mscdos\mk50.cmd
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 5.1
X:mkmsc51
Xos2\mscdos\mk51.cmd
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 6.0
X:mkmsc60
Xos2\mscdos\mk60.cmd
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 6.0
X:ibm
Xos2\ibm\mkc2.cmd
Xgoto end
X
Xrem All done!
X:end
END_OF_FILE
if test 1310 -ne `wc -c <'dmake/make.cmd'`; then
echo shar: \"'dmake/make.cmd'\" unpacked with wrong size!
fi
chmod +x 'dmake/make.cmd'
# end of 'dmake/make.cmd'
fi
echo shar: End of archive 10 \(of 27\).
cp /dev/null ark10isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dag.c dmake/getinp.c dmake/sysintf.c
# dmake/unix/arlib.c dmake/unix/solaris/make.sh
# Wrapped by kent@sparky on Fri Oct 21 16:50:38 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 11 (of 27)."'
if test -f 'dmake/dag.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dag.c'\"
else
echo shar: Extracting \"'dmake/dag.c'\" \(15325 characters\)
sed "s/^X//" >'dmake/dag.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/dag.c,v 1.1 1994/10/06 17:41:22 dvadura Exp $
X-- SYNOPSIS -- Routines to construct the internal dag.
X--
X-- DESCRIPTION
X-- This file contains all the routines that are responsible for
X-- defining and manipulating all objects used by the make facility.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dag.c,v $
X * Revision 1.1 1994/10/06 17:41:22 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X
XPUBLIC HASHPTR
XGet_name( name, tab, define )/*
X===============================
X Look to see if the name is defined, if it is then return
X a pointer to its node, if not return NIL(HASH).
X If define is TRUE and the name is not found it will be added. */
X
Xchar *name; /* name we are looking for */
XHASHPTR *tab; /* the hash table to look in */
Xint define; /* TRUE => add to table */
X{
X register HASHPTR hp;
X register char *p;
X uint16 hv;
X uint32 hash_key;
X
X DB_ENTER( "Get_name" );
X DB_PRINT( "name", ("Looking for %s", name) );
X
X hp = Search_table( tab, name, &hv, &hash_key );
X
X if( hp == NIL(HASH) && define ) {
X /* Check to make sure that CELL name contains only printable chars */
X for( p=name; *p; p++ )
X if( !isprint(*p) && !iswhite(*p) && *p != '\n' )
X Fatal( "Name contains non-printable character [0x%02x]", *p );
X
X TALLOC( hp, 1, HASH ); /* allocate a cell and add it in */
X
X hp->ht_name = DmStrDup( name );
X hp->ht_hash = hash_key;
X hp->ht_next = tab[ hv ];
X tab[ hv ] = hp;
X
X DB_PRINT( "name", ("Adding %s", name) );
X }
X
X DB_PRINT( "name",("Returning: [%s,%lu]",
X (hp == NIL(HASH)) ? "":hp->ht_name, hv) );
X DB_RETURN( hp );
X}
X
X
XPUBLIC HASHPTR
XSearch_table( tab, name, phv, phkey )
XHASHPTR *tab;
Xchar *name;
Xuint16 *phv;
Xuint32 *phkey;
X{
X HASHPTR hp;
X
X *phv = Hash( name, phkey );
X
X for( hp = tab[ *phv ]; hp != NIL(HASH); hp = hp->ht_next )
X if( hp->ht_hash == *phkey
X && !strcmp(hp->ht_name, name) )
X break;
X
X return( hp );
X}
X
X
XPUBLIC HASHPTR
XPush_macro(hp)
XHASHPTR hp;
X{
X HASHPTR cur,prev;
X uint16 hv;
X uint32 key;
X
X hv = Hash(hp->ht_name, &key);
X
X for(prev=NIL(HASH),cur=Macs[hv]; cur != NIL(HASH); prev=cur,cur=hp->ht_next)
X if( cur->ht_hash == key
X && !strcmp(cur->ht_name, hp->ht_name) )
X break;
X
X if (cur == NIL(HASH) || prev == NIL(HASH)) {
X hp->ht_next = Macs[hv];
X Macs[hv] = hp;
X }
X else {
X hp->ht_next = prev->ht_next;
X prev->ht_next = hp;
X }
X
X return(hp);
X}
X
X
XPUBLIC HASHPTR
XPop_macro(hp)
XHASHPTR hp;
X{
X HASHPTR cur,prev;
X uint16 hv;
X uint32 key;
X
X hv = Hash(hp->ht_name, &key);
X
X for(prev=NIL(HASH),cur=Macs[hv]; cur != NIL(HASH);prev=cur,cur=hp->ht_next)
X if (cur == hp)
X break;
X
X if (cur == NIL(HASH))
X return(NIL(HASH));
X
X if (prev)
X prev->ht_next = cur->ht_next;
X else
X Macs[hv] = hp->ht_next;
X hp->ht_next = NIL(HASH);
X
X return(hp);
X}
X
X
X
XPUBLIC HASHPTR
XDef_macro( name, value, flags )/*
X=================================
X This routine is used to define a macro, and it's value.
X The flags indicates if it is a permanent macro or if it's value
X can be redefined. A flags of M_PRECIOUS means it is a precious
X macro and cannot be further redefined. If the flags flag also
X contains the M_MULTI bit it means that the macro can be redefined
X multiple times and no warning of the redefinitions should be issued.
X Once a macro's VAR flags are set they are preserved through all future
X macro definitions.
X
X Macro definitions that have one of the variable bits set are treated
X specially. In each case the hash table entry var field points at the
X global variable that can be set by assigning to the macro.
X
X bit valued global vars must be computed when the macro value is changed.
X char valued global vars must have the first char of ht_value copied to
X them. string valued global vars have the same value as ht_value and should
X just have the new value of ht_value copied to them. */
X
Xchar *name; /* macro name to define */
Xchar *value; /* macro value to set */
Xint flags; /* initial ht_flags */
X{
X register HASHPTR hp;
X register char *p, *q;
X
X DB_ENTER( "Def_macro" );
X DB_PRINT( "mac", ("Defining macro %s = %s, %x", name, value, flags) );
X
X /* check to see if name is in the table, if so then just overwrite
X the previous definition. Otherwise allocate a new node, and
X stuff it in the hash table, at the front of any linked list */
X
X if( Readenv ) flags |= M_LITERAL|M_EXPANDED;
X
X hp = Get_name( name, Macs, TRUE );
X
X if ((flags & M_PUSH) && hp->ht_name != NIL(char)) {
X HASHPTR thp=hp;
X TALLOC(hp,1,HASH);
X hp->ht_name = DmStrDup(thp->ht_name);
X hp->ht_hash = thp->ht_hash;
X Push_macro(hp);
X }
X flags &= ~M_PUSH;
X
X if( (hp->ht_flag & M_PRECIOUS) && !(flags & M_FORCE) ) {
X Warning( "Macro `%s' cannot be redefined", name );
X DB_RETURN( hp );
X }
X
X /* Make sure we don't export macros whose names contain legal macro
X * assignment operators, since we can't do proper quoting in the
X * environment. */
X if( *DmStrPbrk(name, "*+:=") != '\0' ) flags |= M_NOEXPORT;
X
X if( hp->ht_value != NIL(char) ) FREE( hp->ht_value );
X
X if( (hp->ht_flag & M_USED) && !((flags | hp->ht_flag) & M_MULTI) )
X Warning( "Macro `%s' redefined after use", name );
X
X if( (value != NIL(char)) && (*value) ) {
X /* strip out any \<nl> combinations where \ is the current CONTINUATION
X * char */
X
X for( p = value; (p = strchr(p, CONTINUATION_CHAR)) != NIL(char); )
X if( p[1] == '\n' )
X strcpy( p, p+2 );
X else
X p++;
X
X if( !(flags & M_LITERAL) ) {
X p = DmStrDup( DmStrSpn(value," \t")); /* strip white space before */
X /* ... and after value */
X if( *p ) {
X for(q=p+strlen(p)-1; ((*q == ' ')||(*q == '\t')); q--);
X *++q = '\0';
X }
X flags &= ~M_LITERAL;
X }
X else
X p = DmStrDup( value ); /* take string literally */
X
X if( !*p ) { /* check if result is "" */
X FREE( p );
X p = NIL(char);
X flags |= M_EXPANDED;
X }
X else if( *DmStrPbrk( p, "${}" ) == '\0' )
X flags |= M_EXPANDED;
X
X hp->ht_value = p;
X }
X else
X hp->ht_value = NIL(char);
X
X /* Assign the hash table flag less the M_MULTI flag, it is used only
X * to silence the warning. But carry it over if it was previously
X * defined in ht_flag, as this is a permanent M_MULTI variable. */
X
X hp->ht_flag = (flags & ~(M_MULTI|M_FORCE)) |
X (hp->ht_flag & (M_VAR_MASK | M_MULTI));
X
X /* Check for macro variables and make the necessary adjustment in the
X * corresponding global variables */
X
X if( hp->ht_flag & M_VAR_MASK )
X if( !(flags & M_EXPANDED) )
X Error( "Macro variable '%s' must be assigned with :=", name );
X else switch( hp->ht_flag & M_VAR_MASK ) /* only one var type per var */
X {
X case M_VAR_STRING:
X *hp->MV_SVAR = hp->ht_value;
X break;
X
X case M_VAR_CHAR:
X *hp->MV_CVAR = (hp->ht_value == NIL(char)) ? '\0':*hp->ht_value;
X break;
X
X case M_VAR_INT: {
X int tvalue;
X if( hp->MV_IVAR == NIL(int) ) break; /* first time */
X
X tvalue = atoi(hp->ht_value);
X if( hp->MV_IVAR == &Buffer_size ) {
X /* If Buffer_size is modified then make sure you change the
X * size of the real buffer as well. */
X tvalue = (tvalue < (BUFSIZ-2)) ? BUFSIZ : tvalue+2;
X if( Buffer_size == tvalue ) break;
X if( Buffer ) FREE(Buffer);
X if((Buffer=MALLOC(tvalue, char)) == NIL(char)) No_ram();
X *Buffer = '\0';
X }
X *hp->MV_IVAR = tvalue;
X
X if( hp->MV_IVAR == &Max_proc || hp->MV_IVAR == &Max_proclmt ) {
X if( tvalue < 1 )
X Fatal( "Process limit value must be > 1" );
X
X if( Max_proc > Max_proclmt )
X Fatal( "Specified # of processes exceeds limit of [%d]",
X Max_proclmt );
X }
X } break;
X
X case M_VAR_BIT:
X /* Bit variables are set to 1 if ht_value is not NULL and 0
X * otherwise */
X
X if( hp->ht_value == NIL(char) )
X *hp->MV_BVAR &= ~hp->MV_MASK;
X else
X *hp->MV_BVAR |= hp->MV_MASK;
X break;
X }
X
X DB_RETURN( hp );
X}
X
X
X
XPUBLIC CELLPTR
XDef_cell( name )/*
X==================
X Take a string passed in and define it as a cell
X If the cell exists then return a pointer to it. */
Xchar *name;
X{
X register HASHPTR hp;
X register CELLPTR cp;
X register CELLPTR lib;
X char *member;
X char *end;
X
X DB_ENTER( "Def_cell" );
X
X /* Check to see if the cell is a member of the form lib(member) or
X * lib((symbol)) and handle the cases appropriately.
X * What we do is we look at the target, if it is of the above two
X * forms we get the lib, and add the member/symbol to the list of
X * prerequisites for the library. If this is a symbol name def'n
X * we additionally add the attribute A_SYMBOL, so that stat can
X * try to do the right thing. */
X
X if( ((member = strchr(name, '(')) != NIL(char)) &&
X ((end = strrchr(member, ')')) != NIL(char)) &&
X (member > name) && (member[-1] != '$') &&
X (end > member+1) && (end[1] == '\0') )
X {
X *member++ = *end = '\0';
X
X if( (*member == '(') && (member[strlen(member)-1] == ')') ) {
X member[ strlen(member)-1 ] = '\0';
X cp = Def_cell( member+1 );
X cp->ce_attr |= A_SYMBOL;
X }
X else
X cp = Def_cell( member );
X
X lib = Def_cell( name );
X
X Add_prerequisite( lib, cp, FALSE, FALSE );
X lib->ce_attr |= A_LIBRARY | A_COMPOSITE;
X
X if( !Def_targets ) cp = lib;
X }
X else {
X hp = Get_name( name, Defs, TRUE );/* get the name from hash table */
X
X if( hp->CP_OWNR == NIL(CELL) ) /* was it previously defined */
X { /* NO, so define a new cell */
X DB_PRINT( "cell", ("Defining cell [%s]", name) );
X
X TALLOC( cp, 1, CELL );
X hp->CP_OWNR = cp;
X cp->ce_name = hp;
X cp->ce_fname = hp->ht_name;
X cp->ce_all.cl_prq = cp;
X }
X else /* YES, so return the old cell */
X {
X DB_PRINT( "cell", ("Getting cell [%s]", hp->ht_name) );
X cp = hp->CP_OWNR;
X }
X }
X
X DB_RETURN( cp );
X}
X
X
X
X
XPUBLIC LINKPTR
XAdd_prerequisite( cell, prq, head, force )/*
X============================================
X Add a dependency node to the dag. It adds it to the prerequisites,
X if any, of the cell and makes certain they are in linear order.
X If head == 1, then add to head of the prerequisite list, else
X add to tail. */
XCELLPTR cell;
XCELLPTR prq;
Xint head;
Xint force;
X{
X register LINKPTR lp, tlp;
X
X DB_ENTER( "Add_prerequisite" );
X DB_PRINT( "cell", ("Defining prerequisite %s", prq->CE_NAME) );
X
X if( (prq->ce_flag & (F_MAGIC | F_PERCENT)) && !force )
X Fatal( "Special target [%s] cannot be a prerequisite",
X prq->CE_NAME );
X
X if( cell->ce_prq == NIL(LINK) ) { /* it's the first one */
X TALLOC( lp, 1, LINK );
X lp->cl_prq = prq;
X cell->ce_prq = lp;
X }
X else { /* search the list, checking for duplicates */
X for( lp = cell->ce_prq;
X (lp->cl_next != NIL(LINK)) && (lp->cl_prq != prq);
X lp = lp->cl_next );
X
X /* If the prq is not found and we are at the last prq in the list,
X * allocate a new prq and place it into the list, insert it at the
X * head if head == 1, else we add it to the end. */
X
X if( lp->cl_prq != prq ) {
X TALLOC( tlp, 1, LINK );
X tlp->cl_prq = prq;
X
X if( head ) {
X tlp->cl_next = cell->ce_prq;
X cell->ce_prq = tlp;
X }
X else
X lp->cl_next = tlp;
X
X lp = tlp;
X }
X }
X
X DB_RETURN( lp );
X}
X
X
X
XPUBLIC void
XClear_prerequisites( cell )/*
X=============================
X Clear out the list of prerequisites, freeing all of the LINK nodes,
X and setting the list to NULL */
XCELLPTR cell;
X{
X LINKPTR lp, tlp;
X
X DB_ENTER( "Clear_prerequisites" );
X DB_PRINT( "cell", ("Nuking prerequisites") );
X
X if( cell == NIL(CELL) ) { DB_VOID_RETURN; }
X
X for( lp=cell->ce_prq; lp != NIL(LINK); lp=tlp ) {
X tlp=lp->cl_next;
X FREE( lp );
X }
X
X cell->ce_prq = NIL(LINK);
X
X DB_VOID_RETURN;
X}
X
X
XPUBLIC int
XTest_circle( cp, fail )/*
X=========================
X Actually run through the graph */
XCELLPTR cp;
Xint fail;
X{
X register LINKPTR lp;
X int res = 0;
X
X DB_ENTER( "Test_circle" );
X DB_PRINT( "tc", ("checking [%s]", cp->CE_NAME) );
X
X if( cp->ce_flag & F_MARK )
X if( fail )
X Fatal("Detected circular dependency in graph at [%s]", cp->CE_NAME);
X else
X DB_RETURN( 1 );
X
X cp->ce_flag |= F_MARK;
X for( lp = cp->ce_prq; !res && lp != NIL(LINK); lp = lp->cl_next )
X res = Test_circle( lp->cl_prq, fail );
X cp->ce_flag ^= F_MARK;
X
X DB_RETURN( res );
X}
X
X
X
XPUBLIC STRINGPTR
XDef_recipe( rcp, sp, white_too, no_check )/*
X=============================================
X Take the recipe and add it to the list of recipes
X pointed to by sp. sp points to the last element.
X return a pointer to the new recipe. If white_too == TRUE add the
X recipe even if it contains only white space.
X If no_check is true then don't look for -@ at the start of the
X recipe line. */
Xchar *rcp;
XSTRINGPTR sp;
Xint white_too;
Xint no_check;
X{
X register STRINGPTR nsp;
X register char *rp;
X register char *dm;
X
X DB_ENTER( "Def_recipe" );
X DB_PRINT( "rul", ("Defining recipe %s", rcp) );
X
X if( !white_too ) rcp = DmStrSpn( rcp, " \t" );
X if( (rcp == NIL(char)) || (*rcp == 0 && !white_too) )
X DB_RETURN( sp ); /* return last recipe when new recipe not added */
X
X rp = no_check ? rcp : DmStrSpn( rcp, " \t@-+%" );
X
X TALLOC(nsp, 1, STRING);
X nsp->st_string = DmStrDup( rp );
X
X if( sp != NIL(STRING) ) sp->st_next = nsp;
X nsp->st_next = NIL(STRING);
X
X if( !no_check ) nsp->st_attr |= Rcp_attribute( rcp );
X
X DB_RETURN( nsp );
X}
X
X
XPUBLIC t_attr
XRcp_attribute( rp )/*
X======================
X Look at the recipe and return the set of attributes that it defines. */
Xchar *rp;
X{
X t_attr flag = A_DEFAULT;
X int done = FALSE;
X
X while( !done )
X switch( *rp++ )
X {
X case '@' : flag |= A_SILENT; break;
X case '-' : flag |= A_IGNORE; break;
X case '+' : flag |= A_SHELL; break;
X case '%' : flag |= A_SWAP; break;
X
X case ' ' :
X case '\t': break;
X
X default: done = TRUE; break;
X }
X
X return(flag);
X}
END_OF_FILE
if test 15325 -ne `wc -c <'dmake/dag.c'`; then
echo shar: \"'dmake/dag.c'\" unpacked with wrong size!
fi
# end of 'dmake/dag.c'
fi
if test -f 'dmake/getinp.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/getinp.c'\"
else
echo shar: Extracting \"'dmake/getinp.c'\" \(14667 characters\)
sed "s/^X//" >'dmake/getinp.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/getinp.c,v 1.1 1994/10/06 17:41:59 dvadura Exp $
X-- SYNOPSIS -- handle reading of input.
X--
X-- DESCRIPTION
X-- The code in this file reads the input from the specified stream
X-- into the provided buffer of size Buffer_size. In doing so it deletes
X-- comments. Comments are delimited by the #, and
X-- <nl> character sequences. An exception is \# which
X-- is replaced by # in the input. Line continuations are signalled
X-- at the end of a line and are recognized inside comments.
X-- The line continuation is always <\><nl>.
X--
X-- If the file to read is NIL(FILE) then the Get_line routine returns the
X-- next rule from the builtin rule table if there is one.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: getinp.c,v $
X * Revision 1.1 1994/10/06 17:41:59 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X#define IS_WHITE(A) ((A == ' ') || (A == '\t') || (A == '\n') || (A == '\r'))
X#define SCAN_WHITE(A) \
X while( IS_WHITE(*A) ) A++;
X
Xstatic int _is_conditional ANSI((char*));
Xstatic int _handle_conditional ANSI((int, TKSTRPTR));
X
Xstatic int rule_ind = 0; /* index of rule when reading Rule_tab */
Xstatic int skip = FALSE; /* if true the skip input */
X
X
XPUBLIC int
XGet_line( buf, fil )/*
X======================
X Read a line of input from the file stripping
X off comments. The routine returns TRUE if EOF */
Xchar *buf;
XFILE *fil;
X{
X extern char **Rule_tab;
X register char *p;
X register char *c;
X char *q;
X char *buf_org;
X static int ignore = FALSE;
X int cont = FALSE;
X int pos = 0;
X int res;
X
X DB_ENTER( "Get_line" );
X
X if( Skip_to_eof ) {
X Skip_to_eof = FALSE;
X rule_ind = 0;
X
X if( Verbose & V_MAKE )
X Warning("Ignoring remainder of file %s", Filename());
X
X DB_RETURN(TRUE);
X }
X
X if( fil == NIL(FILE) ) {
X /* Reading the internal rule table. Set the rule_index to zero.
X * This way ReadEnvironment works as expected every time. */
X
X while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) )
X /* The last test in this if '*p != '~', handles the environment
X * passing conventions used by MKS to pass arguments. We want to
X * skip those environment entries. */
X if( !Readenv || (Readenv && (strchr(p,'=') != NIL(char)) && *p!='~')){
X strcpy( buf, p );
X
X DB_PRINT( "io", ("Returning [%s]", buf) );
X DB_RETURN( FALSE );
X }
X
X rule_ind = 0;
X
X DB_PRINT( "io", ("Done Ruletab") );
X DB_RETURN( TRUE );
X }
X
X buf_org = buf;
X
Xdo_again:
X do {
X p = buf+pos;
X if(feof( fil ) || (fgets( p, Buffer_size-pos, fil ) == NIL(char)))
X DB_RETURN( TRUE );
X
X Line_number++;
X
X /* ignore input if ignore flag set and line ends in a continuation
X character. */
X q = p+strlen(p)-2;
X if( q<p ) q=p;
X
X /* ignore each RETURN at the end of a line before any further
X * processing */
X if( q[0] == '\r' && q[1] == '\n' ) {
X q[0] = '\n';
X q[1] = '\0';
X q--;
X }
X /* you also have to deal with END_OF_FILE chars to process raw
X * DOS-Files. Normally they are the last chars in file, but after
X * working on these file with vi, there is an additional NEWLINE
X * after the last END_OF_FILE. So if the second last char in the
X * actual line is END_OF_FILE, you can skip the last char. Then
X * you can search the line back until you find no more END_OF_FILE
X * and nuke each you found by string termination. */
X if( q[0] == '\032' )
X q--;
X while( q[1] == '\032' ) {
X q[1] = '\0';
X q--;
X }
X
X if( ignore ) {
X if( q[0] != CONTINUATION_CHAR || q[1] != '\n' ) ignore = FALSE;
X *p = '\0';
X continue;
X }
X
X c = Do_comment(p, &q, Group || (*buf == '\t') || (Notabs && *buf ==' '));
X
X /* Does the end of the line end in a continuation sequence? */
X
X if( (q[0] == CONTINUATION_CHAR) && (q[1] == '\n')) {
X /* If the continuation was at the end of a comment then ignore the
X * next input line, (or lines until we get one ending in just <nl>)
X * else it's a continuation, so build the input line from several
X * text lines on input. The maximum size of this is governened by
X * Buffer_size */
X if( q != p && q[-1] == CONTINUATION_CHAR ) {
X strcpy( q, q+1 );
X q--;
X cont = FALSE;
X }
X else if( c != NIL(char) )
X ignore = TRUE;
X else
X cont = TRUE;
X }
X else {
X cont = FALSE;
X }
X
X q = ( c == NIL(char) ) ? q+2 : c;
X pos += q-p;
X }
X while( (cont || !*buf) && (pos <= Buffer_size) );
X
X if( buf[ pos-1 ] == '\n' )
X buf[ --pos ] = '\0';
X else
X if( pos == Buffer_size-1 )
X Fatal( "Input line too long, increase MAXLINELENGTH" );
X
X
X /* Now that we have the next line of input to make, we should check to
X * see if it is a conditional expression. If it is then process it,
X * otherwise pass it on to the parser. */
X
X if( *(p = DmStrSpn(buf, " \t\r\n")) == CONDSTART ) {
X TKSTR token;
X
X SET_TOKEN( &token, p );
X
X p = Get_token( &token, "", FALSE );
X
X if( (res = _is_conditional(p)) != 0 ) /* ignore non control special */
X { /* targets */
X res = _handle_conditional( res, &token );
X skip = TRUE;
X }
X else {
X CLEAR_TOKEN( &token );
X res = TRUE;
X }
X }
X
X if( skip ) {
X buf = buf_org; /* ignore line just read in */
X pos = 0;
X skip = res;
X goto do_again;
X }
X
X DB_PRINT( "io", ("Returning [%s]", buf) );
X DB_RETURN( FALSE );
X}
X
X
XPUBLIC char *
XDo_comment(str, pend, keep)/*
X=============================
X Search the input string looking for comment chars. If it contains
X comment chars then NUKE the remainder of the line, if the comment
X char is preceeded by \ then shift the remainder of the line left
X by one char. */
Xchar *str;
Xchar **pend;
Xint keep;
X{
X char *c = str;
X
X while( (c = strchr(c, COMMENT_CHAR)) != NIL(char) ) {
X if( Comment || State == NORMAL_SCAN )
X if( c != str && c[-1] == ESCAPE_CHAR ) {
X strcpy( c-1, c ); /* copy it left, due to \# */
X if( pend ) (*pend)--; /* shift tail pointer left */
X }
X else {
X if( !No_exec
X && c == str
X && c[1] == '!'
X && Line_number == 1
X && Nestlevel() == 1 ) {
X char *cmnd;
X
X cmnd = Expand(c+2);
X cmnd[strlen(cmnd)-1] = '\0'; /* strip last newline */
X Current_target = Root;
X Swap_on_exec = TRUE;
X Wait_for_completion = TRUE;
X Do_cmnd(cmnd, FALSE, TRUE, Current_target, FALSE, FALSE, TRUE);
X }
X
X *c = '\0'; /* a true comment so break */
X break;
X }
X else {
X if( keep )
X c = NIL(char);
X else
X *c = '\0';
X
X break;
X }
X }
X
X return(c);
X}
X
X
XPUBLIC char *
XGet_token( string, brk, anchor )/*
X==================================
X Return the next token in string.
X Returns empty string when no more tokens in string.
X brk is a list of chars that also cause breaks in addition to space and
X tab, but are themselves returned as tokens. if brk is NULL then the
X remainder of the line is returned as a single token.
X
X anchor if 1, says break on chars in the brk list, but only if
X the entire token begins with the first char of the brk list, if
X 0 then any char of brk will cause a break to occurr.
X
X If anchor is 2, then break only seeing the first char in the break
X list allowing only chars in the break list to form the prefix. */
X
XTKSTRPTR string;
Xchar *brk;
Xint anchor;
X{
X register char *s;
X register char *curp;
X register char *t;
X int done = FALSE;
X char space[10];
X
X DB_ENTER( "Get_token" );
X
X s = string->tk_str; /* Get string parameters */
X *s = string->tk_cchar; /* ... and strip leading w/s */
X
X SCAN_WHITE( s );
X
X DB_PRINT( "tok", ("What's left [%s]", s) );
X
X if( !*s ) {
X DB_PRINT( "tok", ("Returning NULL token") );
X DB_RETURN( "" );
X }
X
X
X /* Build the space list. space contains all those chars that may possibly
X * cause breaks. This includes the brk list as well as white space. */
X
X if( brk != NIL(char) ) {
X strcpy( space, " \t\r\n" );
X strcat( space, brk );
X }
X else {
X space[0] = 0xff; /* a char we know will not show up */
X space[1] = 0;
X }
X
X
X /* Handle processing of quoted tokens. Note that this is disabled if
X * brk is equal to NIL */
X
X while( *s == '\"' && ((brk != NIL(char)) || !string->tk_quote) ) {
X s++;
X if( string->tk_quote ) {
X curp = s-1;
X do { curp = strchr( curp+1, '\"' ); }
X while( (curp != NIL(char)) && (*(curp+1) == '\"'));
X
X if( curp == NIL(char) ) Fatal( "Unmatched quote in token" );
X string->tk_quote = !string->tk_quote;
X
X /* Check for "" case, and if found ignore it */
X if( curp == s ) continue;
X goto found_token;
X }
X else
X SCAN_WHITE( s );
X
X string->tk_quote = !string->tk_quote;
X }
X
X
X /* Check for a token break character at the beginning of the token.
X * If found return the next set of break chars as a token. */
X
X if( anchor == 2 && brk != NIL(char) ) {
X curp = s;
X while( *curp && (strchr(brk,*curp)!=NIL(char)) && (*curp!=*brk) ) curp++;
X done = (*brk == *curp++);
X }
X else if( (brk != NIL(char)) && (strchr( brk, *s ) != NIL(char)) ) {
X curp = DmStrSpn( s, brk );
X done = (anchor == 0) ? TRUE :
X ((anchor == 1)?(*s == *brk) : (*brk == curp[-1]));
X }
X
X
X /* Scan for the next token in the list and return it less the break char
X * that was used to terminate the token. It will possibly be returned in
X * the next call to Get_token */
X
X if( !done ) {
X SCAN_WHITE( s );
X
X t = s;
X do {
X done = TRUE;
X curp = DmStrPbrk(t, space);
X
X if( anchor && *curp && !IS_WHITE( *curp ) )
X if( ((anchor == 1)?*curp:DmStrSpn(curp,brk)[-1]) != *brk ) {
X t++;
X done = FALSE;
X }
X }
X while( !done );
X
X if( (curp == s) && (strchr(brk, *curp) != NIL(char)) ) curp++;
X }
X
Xfound_token:
X string->tk_str = curp;
X string->tk_cchar = *curp;
X *curp = '\0';
X
X DB_PRINT( "tok", ("Returning [%s]", s) );
X DB_RETURN( s );
X}
X
X
Xstatic int
X_is_conditional( tg )/*
X=======================
X Look at tg and return it's value if it is a conditional identifier
X otherwise return 0. */
Xchar *tg;
X{
X DB_ENTER( "_is_conditional" );
X
X tg++;
X switch( *tg ) {
X case 'I': if( !strcmp( tg, "IF" )) DB_RETURN( ST_IF ); break;
X
X case 'E':
X if( !strcmp( tg, "END" )) DB_RETURN( ST_END );
X else if( !strcmp( tg, "ENDIF")) DB_RETURN( ST_END );
X else if( !strcmp( tg, "ELSE" )) DB_RETURN( ST_ELSE );
X else if( !strcmp( tg, "ELIF" )) DB_RETURN( ST_ELIF );
X break;
X }
X
X DB_RETURN( 0 );
X}
X
X
X
X#define SEEN_END 0x00
X#define SEEN_IF 0x01
X#define SEEN_ELSE 0x02
X#define SEEN_ELIF 0x04
X
X#define ACCEPT_IF 0x10
X#define ACCEPT_ELIF 0x20
X
Xstatic int
X_handle_conditional( opcode, tg )/*
X===================================
X Perform the necessary processing for .IF conditinal targets.
X Someday this should be modified to do bracketted expressions ala
X CPP... sigh */
Xint opcode;
XTKSTRPTR tg;
X{
X static short action[MAX_COND_DEPTH];
X static char ifcntl[MAX_COND_DEPTH];
X char *tok, *lhs, *rhs, *op, *expr;
X int result;
X
X DB_ENTER( "_handle_conditional" );
X
X switch( opcode ) {
X case ST_ELIF:
X if( !(ifcntl[Nest_level] & SEEN_IF) || (ifcntl[Nest_level]&SEEN_ELSE) )
X Fatal(".ELIF without a preceeding .IF" );
X /*FALLTHRU*/
X
X case ST_IF:
X if( opcode == ST_IF && (Nest_level+1) == MAX_COND_DEPTH )
X Fatal( ".IF .ELSE ... .END nesting too deep" );
X
X If_expand = TRUE;
X expr = Expand( Get_token( tg, NIL(char), FALSE ));
X If_expand = FALSE;
X lhs = DmStrSpn( expr, " \t" );
X if( !*lhs ) lhs = NIL(char);
X
X if( (op = DmStrStr( lhs, "==" )) == NIL(char) )
X op = DmStrStr( lhs, "!=" );
X
X if( op == NIL(char) )
X result = (lhs != NIL(char));
X else {
X op[1] = op[0];
X if( lhs != op ) {
X for( tok = op-1; (tok != lhs) && ((*tok == ' ')||(*tok == '\t'));
X tok-- );
X tok[1] = '\0';
X }
X else
X lhs = NIL(char);
X
X op++;
X rhs = DmStrSpn( op+1, " \t" );
X if( !*rhs ) rhs = NIL(char);
X
X if( (rhs == NIL(char)) || (lhs == NIL(char)) )
X result = (rhs == lhs) ? TRUE : FALSE;
X else {
X tok = rhs + strlen( rhs );
X for( tok=tok-1; (tok != lhs) && ((*tok == ' ')||(*tok == '\t'));
X tok--);
X tok[1] = '\0';
X
X result = (strcmp( lhs, rhs ) == 0) ? TRUE : FALSE;
X }
X
X if( *op == '!' ) result = !result;
X }
X
X if( expr != NIL(char) ) FREE( expr );
X
X if( opcode == ST_IF ) {
X Nest_level++;
X action[Nest_level] = 1;
X }
X ifcntl[Nest_level] |= (opcode==ST_IF)?SEEN_IF:SEEN_ELIF;
X
X if( result ) {
X if( !(ifcntl[Nest_level] & (ACCEPT_IF|ACCEPT_ELIF)) ) {
X action[ Nest_level ] = action[ Nest_level-1 ];
X ifcntl[Nest_level] |= (opcode==ST_IF)?ACCEPT_IF:ACCEPT_ELIF;
X }
X else
X action[Nest_level] = 1;
X }
X else
X action[Nest_level] = 1;
X break;
X
X case ST_ELSE:
X if( Nest_level <= 0 ) Fatal( ".ELSE without .IF" );
X if( ifcntl[Nest_level] & SEEN_ELSE )
X Fatal( "Missing .IF or .ELIF before .ELSE" );
X
X if( ifcntl[Nest_level] & (ACCEPT_IF|ACCEPT_ELIF) )
X action[Nest_level] = 1;
X else if( action[ Nest_level-1 ] != 1 )
X action[ Nest_level ] ^= 0x1; /* flip between 0 and 1 */
X
X ifcntl[Nest_level] |= SEEN_ELSE;
X break;
X
X case ST_END:
X ifcntl[Nest_level] = SEEN_END;
X Nest_level--;
X if( Nest_level < 0 ) Fatal( "Unmatched .END[IF]" );
X break;
X }
X
X DB_RETURN( action[ Nest_level ] );
X}
END_OF_FILE
if test 14667 -ne `wc -c <'dmake/getinp.c'`; then
echo shar: \"'dmake/getinp.c'\" unpacked with wrong size!
fi
# end of 'dmake/getinp.c'
fi
if test -f 'dmake/sysintf.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/sysintf.c'\"
else
echo shar: Extracting \"'dmake/sysintf.c'\" \(16539 characters\)
sed "s/^X//" >'dmake/sysintf.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/sysintf.c,v 1.1 1994/10/06 17:41:27 dvadura Exp $
X-- SYNOPSIS -- system independent interface
X--
X-- DESCRIPTION
X-- These are the routines constituting the system interface.
X-- The system is taken to be essentially POSIX conformant.
X-- The original code was extensively revised by T J Thompson at MKS,
X-- and the library cacheing was added by Eric Gisin at MKS. I then
X-- revised the code yet again, to improve the lib cacheing, and to
X-- make it more portable.
X--
X-- The following is a list of routines that are required by this file
X-- in order to work. These routines are provided as functions by the
X-- standard C lib of the target system or as #defines in system/sysintf.h
X-- or via appropriate C code in the system/ directory for the given
X-- system.
X--
X-- The first group must be provided by a file in the system/ directory
X-- the second group is ideally provided by the C lib. However, there
X-- are instances where the C lib implementation of the specified routine
X-- does not exist, or is incorrect. In these instances the routine
X-- must be provided by the the user in the system/ directory of dmake.
X-- (For example, the bsd/ dir contains code for putenv(), and tempnam())
X--
X-- DMAKE SPECIFIC:
X-- seek_arch()
X-- touch_arch()
X-- void_lcache()
X-- runargv()
X-- STAT()
X-- Remove_prq()
X--
X-- C-LIB SPECIFIC: (should be present in your C-lib)
X-- utime()
X-- time()
X-- getenv()
X-- putenv()
X-- getcwd()
X-- signal()
X-- chdir()
X-- tempnam()
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: sysintf.c,v $
X * Revision 1.1 1994/10/06 17:41:27 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X#include "sysintf.h"
X
X/*
X** Tries to stat the file name. Returns 0 if the file
X** does not exist. Note that if lib is not null it tries to stat
X** the name found inside lib.
X**
X** If member is NOT nil then look for the library object which defines the
X** symbol given by name. If found DmStrDup the name and return make the
X** pointer pointed at by sym point at it. Not handled for now!
X*/
Xstatic really_dostat(name, buf)
Xchar *name;
Xstruct stat *buf;
X{
X return( (STAT(name,buf)==-1 || (Augmake && (buf->st_mode & S_IFDIR)))
X ? (time_t)0L
X : (time_t) buf->st_mtime
X );
X}
X
X
XPUBLIC time_t
XDo_stat(name, lib, member, force)
Xchar *name;
Xchar *lib;
Xchar **member;
Xint force;
X{
X struct stat buf;
X time_t seek_arch();
X
X if( member != NIL(char *) )
X Fatal("Library symbol names not supported");
X
X buf.st_mtime = (time_t)0L;
X if( lib != NIL(char) )
X return( seek_arch(Basename(name), lib) );
X else if( UseDirCache && (*UseDirCache == 'y' || *UseDirCache == 'Y') )
X return(CacheStat(name,force));
X else if( strlen(Basename(name)) > NameMax )
X return((time_t)0L);
X else
X return(really_dostat(name,&buf));
X}
X
X
X/* Touch existing file to force modify time to present.
X */
XPUBLIC int
XDo_touch(name, lib, member)
Xchar *name;
Xchar *lib;
Xchar **member;
X{
X if( member != NIL(char *) )
X Fatal("Library symbol names not supported");
X
X if (lib != NIL(char))
X return( touch_arch(Basename(name), lib) );
X else
X return( utime(name, NIL(time_t)) );
X}
X
X
X
XPUBLIC void
XVoid_lib_cache( lib_name, member_name )/*
X=========================================
X Void the library cache for lib lib_name, and member member_name. */
Xchar *lib_name;
Xchar *member_name;
X{
X VOID_LCACHE( lib_name, member_name );
X}
X
X
X
X/*
X** return the current time
X*/
XPUBLIC time_t
XDo_time()
X{
X extern time_t time();
X return (time((time_t*)0));
X}
X
X
X
X/*
X** Execute the string passed in as a command and return
X** the return code. The command line arguments are
X** assumed to be separated by spaces or tabs. The first
X** such argument is assumed to be the command.
X**
X** If group is true then this is a group of commands to be fed to the
X** the shell as a single unit. In this case cmd is of the form
X** "file" indicating the file that should be read by the shell
X** in order to execute the command group.
X*/
XPUBLIC int
XDo_cmnd(cmd, group, do_it, target, ignore, shell, last)
Xchar *cmd;
Xint group;
Xint do_it;
XCELLPTR target;
Xint ignore;
Xint shell;
Xint last;
X{
X int i;
X
X if( !do_it ) {
X if( last && !Doing_bang ) {
X Update_time_stamp( target );
X }
X return(0);
X }
X
X if ( target->ce_attr & A_ERROR ) {
X if ( last ) {
X Update_time_stamp( target );
X }
X return(0);
X }
X
X if( Max_proc == 1 ) Wait_for_completion = TRUE;
X
X if( (i = runargv(target, ignore, group, last, shell, cmd)) == -1 )
X Quit();
X
X /* NOTE: runargv must return either 0 or 1, 0 ==> command executed, and
X * we waited for it to return, 1 ==> command started and is running
X * concurrently with make process. */
X return(i);
X}
X
X
X#define MINARGV 64
X/* Take a command and pack it into an argument vector to be executed. */
XPUBLIC char **
XPack_argv( group, shell, cmd )
Xint group;
Xint shell;
Xchar *cmd;
X{
X static char **av = NIL(char *);
X static int avs = 0;
X int i = 0;
X
X if( av == NIL(char *) ) {
X TALLOC(av, MINARGV, char*);
X avs = MINARGV;
X }
X av[0] = NIL(char);
X
X if (*cmd) {
X Packed_shell = shell||group||(*DmStrPbrk(cmd, Shell_metas)!='\0');
X
X if( Packed_shell ){
X char* sh = group ? GShell : Shell;
X
X if( sh != NIL(char) ) {
X av[i++] = sh;
X if( (av[i] = (group?GShell_flags:Shell_flags)) != NIL(char) ) i++;
X
X av[i++] = cmd;
X av[i] = NIL(char);
X }
X else
X Fatal("%sSHELL macro not defined", group?"GROUP":"");
X }
X else {
X do {
X while( iswhite(*cmd) ) ++cmd;
X if( *cmd ) av[i++] = cmd;
X
X while( *cmd != '\0' && !iswhite(*cmd) ) ++cmd;
X if( *cmd ) *cmd++ = '\0';
X
X if( i == avs ) {
X avs += MINARGV;
X av = (char **) realloc( av, avs*sizeof(char *) );
X }
X } while( *cmd );
X
X av[i] = NIL(char);
X }
X }
X
X return(av);
X}
X
X
X/*
X** Return the value of ename from the environment
X** if ename is not defined in the environment then
X** NIL(char) should be returned
X*/
XPUBLIC char *
XRead_env_string(ename)
Xchar *ename;
X{
X#if !defined(_MSC_VER) || _MSC_VER < 600
X extern char *getenv();
X#endif
X return( getenv(ename) );
X}
X
X
X
X/*
X** Set the value of the environment string ename to value.
X** Returns 0 if success, non-zero if failure
X*/
XPUBLIC int
XWrite_env_string(ename, value)
Xchar *ename;
Xchar *value;
X{
X extern int putenv();
X char* p;
X char* envstr = DmStrAdd(ename, value, FALSE);
X
X p = envstr+strlen(ename); /* Don't change this code, DmStrAdd does not */
X *p++ = '='; /* add the space if *value is 0, it does */
X if( !*value ) *p = '\0'; /* allocate enough memory for one though. */
X
X return( putenv(envstr) );
X}
X
X
X
XPUBLIC void
XReadEnvironment()
X{
X extern char **Rule_tab;
X#if !defined(_MSC_VER)
X extern char **environ;
X#endif
X char **rsave;
X
X#if !defined(__ZTC__) && !defined(_MPW)
X# define make_env()
X# define free_env()
X#else
X void make_env();
X void free_env();
X#endif
X
X make_env();
X
X rsave = Rule_tab;
X Rule_tab = environ;
X Readenv = TRUE;
X
X Parse( NIL(FILE) );
X
X Readenv = FALSE;
X Rule_tab = rsave;
X
X free_env();
X}
X
X
X
X/*
X** All we have to catch is SIG_INT
X*/
XPUBLIC void
XCatch_signals(fn)
Xvoid (*fn)();
X{
X if( (void (*)()) signal(SIGINT, SIG_IGN) != SIG_IGN )
X signal( SIGINT, fn );
X if( (void (*)()) signal(SIGQUIT, SIG_IGN) != SIG_IGN )
X signal( SIGQUIT, fn );
X}
X
X
X
X/*
X** Clear any previously set signals
X*/
XPUBLIC void
XClear_signals()
X{
X if( (void (*)())signal(SIGINT, SIG_IGN) != (void (*)())SIG_IGN )
X signal( SIGINT, SIG_DFL );
X if( (void (*)())signal(SIGQUIT, SIG_IGN) != (void (*)())SIG_IGN )
X signal( SIGQUIT, SIG_DFL );
X}
X
X
X
X/*
X** Set program name
X*/
XPUBLIC void
XProlog(argc, argv)
Xint argc;
Xchar* argv[];
X{
X Pname = (argc == 0) ? DEF_MAKE_PNAME : argv[0];
X Root = Def_cell( ".ROOT" );
X Targets = Def_cell( ".TARGETS" );
X Add_prerequisite(Root, Targets, FALSE, FALSE);
X
X Targets->ce_flag = Root->ce_flag = F_RULES|F_TARGET|F_STAT;
X Targets->ce_attr = Root->ce_attr = A_NOSTATE|A_PHONY;
X
X Root->ce_flag |= F_MAGIC;
X Root->ce_attr |= A_SEQ;
X
X tzset();
X}
X
X
X
X/*
X** Do any clean up for exit.
X*/
XPUBLIC void
XEpilog(ret_code)
Xint ret_code;
X{
X Write_state();
X Unlink_temp_files(Root);
X Hook_std_writes(NIL(char)); /* For MSDOS tee (-F option) */
X exit( ret_code );
X}
X
X
X
X/*
X** Use the built-in functions of the operating system to get the current
X** working directory.
X*/
XPUBLIC char *
XGet_current_dir()
X{
X static char buf[PATH_MAX+2];
X return(getcwd(buf, sizeof(buf)));
X}
X
X
X
X/*
X** change working directory
X*/
XPUBLIC int
XSet_dir(path)
Xchar* path;
X{
X return( chdir(path) );
X}
X
X
X
X/*
X** return switch char
X*/
XPUBLIC char
XGet_switch_char()
X{
X return( getswitchar() );
X}
X
X
X
X/*
X** Generate a temporary file name and open the file for writing.
X** If a name cannot be generated or the file cannot be opened
X** return -1, else return the fileno of the open file.
X** and update the source file pointer to point at the new file name.
X** Note that the new name should be freed when the file is removed.
X*/
XPUBLIC FILE*
XGet_temp(path, suff, op)
Xchar **path;
Xchar *suff;
Xint op;
X{
X extern char *tempnam();
X
X *path = DmStrJoin( tempnam(NIL(char), "mk"), suff, -1, TRUE );
X Def_macro( "TMPFILE", *path, M_MULTI|M_EXPANDED );
X
X return( op?fopen(*path, "w"):NIL(FILE) );
X}
X
X
X/*
X** Open a new temporary file and set it up for writing.
X*/
XPUBLIC FILE *
XStart_temp( suffix, cp, fname )
Xchar *suffix;
XCELLPTR cp;
Xchar **fname;
X{
X FILE *fp;
X char *tmpname;
X char *name;
X
X name = (cp != NIL(CELL))?cp->CE_NAME:"makefile text";
X
X if( (fp = Get_temp(&tmpname, suffix, TRUE)) == NIL(FILE) )
X Open_temp_error( tmpname, name );
X
X Link_temp( cp, fp, tmpname );
X *fname = tmpname;
X
X return( fp );
X}
X
X
X/*
X** Issue an error on failing to open a temporary file
X*/
XPUBLIC void
XOpen_temp_error( tmpname, name )
Xchar *tmpname;
Xchar *name;
X{
X Fatal("Cannot open temp file `%s' while processing `%s'", tmpname, name );
X}
X
X
X/*
X** Link a temp file onto the list of files.
X*/
XPUBLIC void
XLink_temp( cp, fp, fname )
XCELLPTR cp;
XFILE *fp;
Xchar *fname;
X{
X FILELISTPTR new;
X
X if( cp == NIL(CELL) ) cp = Root;
X
X TALLOC( new, 1, FILELIST );
X
X new->fl_next = cp->ce_files;
X new->fl_name = fname;
X new->fl_file = fp; /* indicates temp file is open */
X
X cp->ce_files = new;
X}
X
X
X/*
X** Close a previously used temporary file.
X*/
XPUBLIC void
XClose_temp(cp, file)
XCELLPTR cp;
XFILE *file;
X{
X FILELISTPTR fl;
X if( cp == NIL(CELL) ) cp = Root;
X
X for( fl=cp->ce_files; fl && fl->fl_file != file; fl=fl->fl_next );
X if( fl ) {
X fl->fl_file = NIL(FILE);
X fclose(file);
X }
X}
X
X
X/*
X** Clean-up, and close all temporary files associated with a target.
X*/
XPUBLIC void
XUnlink_temp_files( cp )/*
X==========================
X Unlink the tempfiles if any exist. Make sure you close the files first
X though. This ensures that under DOS there is no disk space lost. */
XCELLPTR cp;
X{
X FILELISTPTR cur, next;
X
X if( cp == NIL(CELL) || cp->ce_files == NIL(FILELIST) ) return;
X
X for( cur=cp->ce_files; cur != NIL(FILELIST); cur=next ) {
X next = cur->fl_next;
X
X if( cur->fl_file ) fclose( cur->fl_file );
X
X if( Verbose & V_LEAVE_TMP )
X fprintf( stderr, "%s: Left temp file [%s]\n", Pname, cur->fl_name );
X else
X (void) Remove_file( cur->fl_name );
X
X FREE(cur->fl_name);
X FREE(cur);
X }
X
X cp->ce_files = NIL(FILELIST);
X}
X
X
XPUBLIC void
XHandle_result(status, ignore, abort_flg, target)
Xint status;
Xint ignore;
Xint abort_flg;
XCELLPTR target;
X{
X status = ((status&0xff)==0 ? status>>8
X : (status & 0xff)==SIGTERM ? -1
X : (status & 0x7f)+128);
X
X if( status )
X if( !abort_flg ) {
X char buf[512];
X
X sprintf(buf, "%s: Error code %d, while making '%s'",
X Pname, status, target->ce_fname );
X
X if( ignore || Continue ) {
X if (!(Glob_attr & A_SILENT)) {
X strcat(buf, " (Ignored" );
X
X if ( Continue ) {
X strcat(buf,",Continuing");
X target->ce_attr |= A_ERROR;
X }
X strcat(buf,")");
X fprintf(stderr, "%s\n", buf);
X }
X }
X else {
X fprintf(stderr, "%s\n",buf);
X
X if( !(target->ce_attr & A_PRECIOUS) )
X if( Remove_file( target->ce_fname ) == 0 )
X fprintf(stderr,"%s: '%s' removed.\n", Pname,
X target->ce_fname);
X
X Quit();
X }
X }
X else if( !(target->ce_attr & A_PRECIOUS) )
X Remove_file( target->ce_fname );
X}
X
X
XPUBLIC void
XUpdate_time_stamp( cp )
XCELLPTR cp;
X{
X HASHPTR hp;
X LINKPTR dp;
X CELLPTR tcp;
X time_t phonytime = (time_t)0L;
X int phony = ((cp->ce_attr&A_PHONY) != 0);
X
X /* Compute phony time as either the current time, or the most recent time
X * from the list of prerequisites if there are any. */
X if ( cp->ce_prq != NIL(LINK) ) {
X for(dp=cp->ce_prq; dp; dp=dp->cl_next)
X if ( dp->cl_prq->ce_time > phonytime )
X phonytime = dp->cl_prq->ce_time;
X }
X else
X phonytime = Do_time();
X
X for(dp=CeMeToo(cp); dp; dp=dp->cl_next) {
X tcp=dp->cl_prq;
X
X if( tcp->ce_attr & A_LIBRARY )
X Void_lib_cache( tcp->ce_fname, NIL(char) );
X else if( !Touch && (tcp->ce_attr & A_LIBRARYM) )
X Void_lib_cache( tcp->ce_lib, tcp->ce_fname );
X
X if( phony ) {
X tcp->ce_time = phonytime;
X }
X else if (Trace) {
X tcp->ce_time = Do_time();
X }
X else {
X Stat_target(tcp, -1, TRUE);
X
X if( tcp->ce_time == (time_t) 0L )
X tcp->ce_time = Do_time();
X }
X
X if( Trace ) {
X tcp->ce_flag |= F_STAT; /* pretend we stated ok */
X }
X
X if( Verbose & V_MAKE )
X printf( "%s: <<<< Set [%s] time stamp to %ld\n",
X Pname, tcp->CE_NAME, tcp->ce_time );
X
X Unlink_temp_files( tcp );
X tcp->ce_flag |= F_MADE;
X tcp->ce_attr |= A_UPDATED;
X }
X
X /* Scan the list of prerequisites and if we find one that is
X * marked as being removable, (ie. an inferred intermediate node
X * then remove it. We remove a prerequisite by running the recipe
X * associated with the special target .REMOVE, with $< set to
X * the list of prerequisites to remove. */
X
X /* Make sure we don't try to remove prerequisites for the .REMOVE
X * target. */
X if( strcmp(cp->CE_NAME,".REMOVE") != 0 &&
X (hp = Get_name(".REMOVE", Defs, FALSE)) != NIL(HASH) ) {
X register LINKPTR dp;
X int flag = FALSE;
X int rem;
X t_attr attr;
X
X tcp = hp->CP_OWNR;
X
X tcp->ce_flag |= F_TARGET;
X Clear_prerequisites( tcp );
X
X for(dp=cp->ce_prq; dp != NIL(LINK); dp=dp->cl_next) {
X register CELLPTR prq = dp->cl_prq;
X
X attr = Glob_attr | prq->ce_attr;
X rem = (prq->ce_flag & F_REMOVE) &&
X (prq->ce_flag & F_MADE ) &&
X !(prq->ce_attr & A_PHONY) &&
X !(attr & A_PRECIOUS);
X
X if(rem) {
X LINKPTR tdp;
X
X for(tdp=CeMeToo(prq); tdp; tdp=tdp->cl_next) {
X CELLPTR tmpcell=tdp->cl_prq;
X
X (Add_prerequisite(tcp,tmpcell,FALSE,FALSE))->cl_flag|=F_TARGET;
X tmpcell->ce_flag &= ~F_REMOVE;
X }
X flag = TRUE;
X }
X }
X
X if( flag ) {
X int sv_force = Force;
X
X Force = FALSE;
X Remove_prq( tcp );
X Force = sv_force;
X
X for(dp=tcp->ce_prq; dp != NIL(LINK); dp=dp->cl_next) {
X register CELLPTR prq = dp->cl_prq;
X
X prq->ce_flag &= ~(F_MADE|F_VISITED|F_STAT);
X prq->ce_flag |= F_REMOVE;
X prq->ce_time = (time_t)0L;
X }
X }
X }
X}
X
X
XPUBLIC int
XRemove_file( name )
Xchar *name;
X{
X struct stat buf;
X
X if( stat(name, &buf) != 0 )
X return 1;
X if( (buf.st_mode & S_IFMT) == S_IFDIR )
X return 1;
X return(unlink(name));
X}
END_OF_FILE
if test 16539 -ne `wc -c <'dmake/sysintf.c'`; then
echo shar: \"'dmake/sysintf.c'\" unpacked with wrong size!
fi
# end of 'dmake/sysintf.c'
fi
if test -f 'dmake/unix/arlib.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/arlib.c'\"
else
echo shar: Extracting \"'dmake/unix/arlib.c'\" \(14629 characters\)
sed "s/^X//" >'dmake/unix/arlib.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/RCS/arlib.c,v 1.1 1994/10/06 17:42:06 dvadura Exp $
X-- SYNOPSIS -- Unix archive manipulation code.
X--
X-- DESCRIPTION
X-- Originally this code was provided by Eric Gisin of MKS. I took
X-- his code and completely rewrote it adding cacheing of lib members
X-- and other various optimizations. I kept the overal functional
X-- idea of the library routines as they are similar to those in GNU
X-- make and felt it advantageous to maintain a similar interface.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: arlib.c,v $
X * Revision 1.1 1994/10/06 17:42:06 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* Sun unix on 386i's has a broken ar.h that does not assume PORTAR format
X * by default, so we fix it here. */
X#ifdef i386
X#define PORTAR 1
X#endif
X
X#include <ar.h>
X#include "extern.h"
X#include "sysintf.h"
X
X/* By defining the defines below it is possible to configure the library
X * code for library cacheing/non-cacheing, ASCII archive headers, and a full
X * decode of the ar_hdr fields in the scan_ar function. */
X
X#ifndef ASCARCH
X#define ASCARCH 1 /* ASCII time stored in archive */
X#endif
X
X#ifndef LC
X#define LC 1 /* Turn on library cacheing */
X#endif
X
X#ifndef DECODE_ALL_AR_FIELDS
X#define DECODE_ALL_AR_FIELDS 0 /* decode only fields make needs*/
X#endif
X
X#if LC
X# define FOUND_MEMBER FALSE
X#else
X# define FOUND_MEMBER TRUE
X# define _cache_member(a, b, c)
X# define _check_cache(a, b, c, d) FALSE
X#endif
X
X#define MAXFNAME 255 /* Max length of member name */
X#define MAXMNAME 8 /* Max module name < MAXFNAME */
X
X
X/* This struct is used to pass the library and member inrmation about the
Xstatic off_t arhdroffset; /* member seek offset */
X
X if( (f = fopen(lib, "r")) == NIL(FILE) ) return( (time_t)0L );
X rv = ar_scan(f, time_function, &args );
X fclose( f );
X
X if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
X
X return( args.time );
X}
X
X
Xint
Xtouch_arch(name, lib)/*
X=======================
X Look for module 'name' inside 'lib'. If compiled with cacheing then first
X check to see if the specified lib is cached. If so then set that time
X stamp and write it into the library. Returns 0 on success, non-zero
X on failure. */
Xchar *name;
Xchar *lib;
X{
X FILE *f;
X int rv;
X struct ar_args args;
X
X /* Open the lib file and perform the scan of the members, looking
X * for our particular member. If cacheing is enabled it will be
X * taken care of automatically during the scan. */
X
X args.lib = lib;
X args.member = name;
X args.time = (time_t)0L;
X
X if( (f = fopen(lib, "r+")) == NIL(FILE) ) return( (time_t)1L );
X rv = ar_scan(f, touch_function, &args );
X fclose( f );
X
X if( rv < 0 ) Fatal("(%s): Invalid library format", lib);
X
X return( 0 );
X}
X
X
X
Xstatic int
Xtime_function(f, arp, argp)/*
X=============================
X get library member's time, if it matches than return it in argp, if
X cacheing is enabled than cache the library members also. */
XFILE *f; /* library file */
Xstruct AR *arp; /* library member header */
Xstruct ar_args *argp;
X{
X int rv = _cache_member( arp->ar_name, argp->lib, arp->ar_time );
X
X if( strcmp(argp->member, arp->ar_name) == 0 ) {
X argp->time = arp->ar_time;
X
X if( arp->ar_time == 0 && !(Glob_attr & A_SILENT) )
X Warning( "(%s): Can't extract library member timestamp; using EPOCH",
X argp->member);
X
X return( rv ); /* 1 => no cacheing, 0 => cacheing */
X }
X
X return( FALSE ); /* continue scan */
X}
X
X
X
Xstatic int
Xtouch_function(f, arp, argp)/*
X==============================
X Update library member's time stamp, and write new time value into cache
X if required. */
XFILE *f; /* library file */
Xstruct AR *arp; /* library member header */
Xstruct ar_args *argp;
X{
X extern time_t time ANSI(( time_t * ));
X time_t now = time((time_t*) NULL); /* Current time. */
X
X if( strcmp(argp->member, arp->ar_name) == 0 ) {
X _check_cache( argp->member, argp->lib, &now, TRUE );
X ar_touch(f, now );
X
X return( TRUE );
X }
X
X return( FALSE ); /* continue scan */
X}
X
X
X
X
Xstatic int
Xar_scan(f, function, arg)/*
X===========================
X Scan the opened archive, and call the given function for each member found.
X The function will be called with the file positioned at the beginning of
X the member and it can read up to arp->ar_size bytes of the archive member.
X If the function returns 1, we stop and return 1. We return 0 at the end
X of the archive, or -1 if the archive has invalid format. This interface
X is more general than required by "make", but it can be used by other
X utilities. */
Xregister FILE *f;
Xint (*function) ANSI((FILE *, struct AR *, struct ar_args *));
Xstruct ar_args *arg;
X{
X extern long atol ();
X register char *p;
X struct ar_hdr arhdr; /* archive member header */
X int nsize; /* size of member name */
X#if defined(_AIX)
X struct fl_hdr flhdr; /* archive file header */
X char magic[SAIAMAG]; /* size of magic string */
X#else
X#if ASCARCH
X char magic[SARMAG];
X#else
X unsigned short word;
X#endif
X#endif
X
X fseek( f, 0L, 0 ); /* Start at the beginning of the archive file */
X
X#if ASCARCH
X#if defined(_AIX)
X fread( (char *)&flhdr, sizeof(flhdr), 1, f );
X if( strncmp(flhdr.fl_magic,AIAMAG, SAIAMAG) != 0 ) return(-1);
X fseek(f, atol(flhdr.fl_fstmoff), 0 ); /* postition to first member */
X#else
X fread( magic, sizeof(magic), 1, f );
X if( strncmp(magic, ARMAG, SARMAG) != 0 ) return( -1 );
X#endif
X#else
X fread( (char*)&word, sizeof(word), 1, f );
X if( word != ARMAG ) return( -1 );
X#endif
X
X /* scan the library, calling `function' for each member
X */
X while( 1 ) {
X arhdroffset = ftell(f);
X#if defined(_AIX)
X if( fread((char*)&arhdr,sizeof(arhdr)-sizeof(arhdr._ar_name),1,f)!=1)
X break;
X nsize = atoi(arhdr.ar_namlen);
X fseek(f, arhdroffset+(unsigned long)(((struct ar_hdr *)0)->_ar_name.ar_name), 0);
X if( fread((char*)_ar.ar_name,nsize,1,f)!=1)
X break;
X _ar.ar_name[nsize]='\0';
X#else
X if( fread((char*) &arhdr, sizeof(arhdr), 1, f) != 1 ) break;
X strncpy(_ar.ar_name, arhdr.ar_name, nsize = sizeof(arhdr.ar_name));
X#endif
X
X for( p = &_ar.ar_name[nsize];
X --p >= _ar.ar_name && *p == ' ';);
X
X p[1] = '\0';
X if( *p == '/' ) *p = 0; /* SysV has trailing '/' */
X
X#if !defined(_AIX)
X#if ASCARCH
X if( strncmp(arhdr.ar_fmag, ARFMAG, sizeof(arhdr.ar_fmag)) != 0 )
X return( -1 );
X _ar.ar_time = atol(arhdr.ar_date);
X _ar.ar_size = atol(arhdr.ar_size);
X#else
X _ar.ar_time = arhdr.ar_date;
X _ar.ar_size = arhdr.ar_size;
X#endif
X#else
X#if ASCARCH
X _ar.ar_time = atol(arhdr.ar_date);
X _ar.ar_size = atol(arhdr.ar_nxtmem);
X#else
X _ar.ar_time = arhdr.ar_date;
X _ar.ar_size = arhdr.ar_nxtmem;
X#endif
X#endif
X
X
X#if DECODE_ALL_AR_FIELDS
X#if ASCARCH
X _ar.ar_mode = atoi(arhdr.ar_mode);
X _ar.ar_uid = atoi(arhdr.ar_uid);
X _ar.ar_gid = atoi(arhdr.ar_gid);
X#else
X _ar.ar_mode = arhdr.ar_mode;
X _ar.ar_uid = arhdr.ar_uid;
X _ar.ar_gid = arhdr.ar_gid;
X#endif
X#endif
X
X if( (*function)(f, &_ar, arg) ) return( 1 );
X#if defined(_AIX)
X if( _ar.ar_size == 0L ) break;
X fseek( f, (long) _ar.ar_size, 0 );
X#else
X fseek( f, arhdroffset + sizeof(arhdr) + (_ar.ar_size+1 & ~1L), 0 );
X#endif
X }
X
X#if !defined(_AIX)
X if( !feof(f) ) return( -1 );
X#endif
X return 0;
X}
X
X
X
Xstatic int
Xar_touch( f, now )/*
X====================
X touch module header timestamp. */
XFILE *f;
Xtime_t now;
X{
X struct ar_hdr arhdr; /* external archive header */
X
X fseek(f, arhdroffset + (unsigned long)(((struct ar_hdr *)0)->ar_date), 0);
X
X#if ASCARCH
X fprintf(f, "%lu", now);
X#else
X fwrite((char *)now, sizeof(now), 1, f);
X#endif
X
X return( ferror(f) ? 0 : 1 );
X}
X
X
X#if LC
Xtypedef struct mem {
X time_t m_time; /* modify time of member*/
X struct mem *m_next; /* next member in lib */
X char m_valid; /* valid cache entry */
X char m_name[1]; /* lib member name */
X} MEM, *MEMPTR;
X
Xtypedef struct lib {
X struct lib *lb_next; /* next library in list */
X struct mem *lb_members; /* list of lib members */
X char lb_valid; /* valid cache entry */
X char *lb_name; /* library name */
X} LIB, *LIBPTR;
X
Xstatic LIBPTR _cache = NIL(LIB);
Xstatic MEMPTR _find_member ANSI(( LIBPTR, char * ));
X
Xstatic int
X_check_cache( name, lib, pmtime, touch )/*
X==========================================
X Check to see if we have cached member in lib, if so return time in pmtime
X and return TRUE, otherwise return FALSE, if touch is TRUE then touch
X the archive member instead. */
Xchar *name;
Xchar *lib;
Xtime_t *pmtime;
Xint touch;
X{
X register MEMPTR mp;
X register LIBPTR lp;
X
X for( lp=_cache; lp != NIL(LIB) && lp->lb_name != lib; lp=lp->lb_next );
X if( lp == NIL(LIB) ) return( FALSE );
X
X mp = _find_member( lp, name );
X if( mp == NIL(MEM) || !mp->m_valid ) return( FALSE );
X
X if( touch == TRUE )
X {
X mp->m_time = *pmtime;
X mp->m_valid = 1;
X }
X else
X *pmtime = mp->m_time;
X
X lp->lb_valid = 1;
X lp->lb_members = mp;
X
X return( TRUE );
X}
X
X
X
Xstatic int
X_cache_member( name, lib, mtime )/*
X===================================
X Cache name in lib along with it's time */
Xchar *name;
Xchar *lib;
Xtime_t mtime;
X{
X register MEMPTR mp;
X register LIBPTR lp;
X
X for( lp=_cache;
X lp != NIL(LIB) && lp->lb_name != NIL(char) && lp->lb_name != lib;
X lp=lp->lb_next);
X
X }
X }
X else
X mp->m_time = mtime;
X
X mp->m_valid = 1;
X
X return( lp->lb_valid );
X}
X
X
Xstatic MEMPTR
X_find_member( lp, name )
XLIBPTR lp;
Xchar *name;
X{
X register MEMPTR mp = lp->lb_members;
X
X if( mp == NIL(MEM) ) return(mp);
X
X do {
X if( !strcmp(mp->m_name, name ) ) return( mp );
X mp = mp->m_next;
X }
X while( mp != lp->lb_members );
X
X return( NIL(MEM) );
X}
X#endif
X
X
X
X mp->m_valid = 0;
X }
X
X mp=mp->m_next;
X } while( mp != lp->lb_members );
X }
X#endif
X}
END_OF_FILE
if test 14629 -ne `wc -c <'dmake/unix/arlib.c'`; then
echo shar: \"'dmake/unix/arlib.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/arlib.c'
fi
if test -f 'dmake/unix/solaris/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/solaris/make.sh'\" \(2662 characters\)
sed "s/^X//" >'dmake/unix/solaris/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/solaris/tempnam.c
Xmv tempnam.o objects
Xcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/solaris/getcwd.c
Xmv getcwd.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o objects/tempnam.o objects/getcwd.o
Xcp unix/solaris/startup.mk startup.mk
END_OF_FILE
if test 2662 -ne `wc -c <'dmake/unix/solaris/make.sh'`; then
echo shar: \"'dmake/unix/solaris/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/solaris/make.sh'
# end of 'dmake/unix/solaris/make.sh'
fi
echo shar: End of archive 11 \(of 27\).
cp /dev/null ark11isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/malloc/malloc.c dmake/license dmake/makefile.mk
# dmake/msdos/spawn.c dmake/struct.h dmake/unix/sysvr4/config.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:39 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 12 (of 27)."'
if test -f 'dmake/dbug/malloc/malloc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/malloc.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/malloc.c'\" \(13042 characters\)
sed "s/^X//" >'dmake/dbug/malloc/malloc.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X#include <fcntl.h>
X#include "malloc.h"
X#include "tostring.h"
X
X/*
X * Function: malloc()
X *
X * Purpose: memory allocator
X *
X * Arguments: size - size of data area needed
X *
X * Returns: pointer to allocated area, or NULL if unable
X * to allocate addtional data.
X *
X * Narrative:
X *
X */
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: malloc.c,v 1.1 1994/10/06 17:43:12 dvadura Exp $";
X#endif
X
Xextern int malloc_checking;
Xchar * malloc_data_start;
Xchar * malloc_data_end;
Xstruct mlist * malloc_end;
Xint malloc_errfd = 2;
Xint malloc_errno;
Xint malloc_fatal_level = M_HANDLE_CORE;
Xstruct mlist malloc_start;
Xint malloc_warn_level;
Xvoid malloc_memset();
X
Xchar *
Xmalloc(size)
X unsigned int size;
X{
X char * func = "malloc";
X char * getenv();
X void malloc_fatal();
X void malloc_init();
X void malloc_split();
X void malloc_warning();
X unsigned int need;
X struct mlist * oldptr;
X struct mlist * ptr;
X char * sbrk();
X
X /*
X * If this is the first call to malloc...
X */
X if( malloc_data_start == (char *) 0 )
X {
X malloc_init();
X }
X
X /*
X * If malloc chain checking is on, go do it.
X */
X if( malloc_checking )
X {
X (void) malloc_chain_check(1);
X }
X
X /*
X * always make sure there is at least on extra byte in the malloc
X * area so that we can verify that the user does not overrun the
X * data area.
X */
X size++;
X
X /*
X * Now look for a free area of memory of size bytes...
X */
X oldptr = NULL;
X for(ptr = &malloc_start; ; ptr = ptr->next)
X {
X /*
X * Since the malloc chain is a forward only chain, any
X * pointer that we get should always be positioned in
X * memory following the previous pointer. If this is not
X * so, we must have a corrupted chain.
X */
X if( ptr )
X {
X if( ptr<oldptr )
X {
X malloc_errno = M_CODE_CHAIN_BROKE;
X malloc_fatal(func);
X return(NULL);
X }
X oldptr = ptr;
X }
X else if( oldptr != malloc_end )
X {
X /*
X * This should never happen. If it does, then
X * we got a real problem.
X */
X malloc_errno = M_CODE_NO_END;
X malloc_fatal(func);
X return(NULL);
X }
X
X
X /*
X * if this element is already in use...
X */
X if( ptr && ((ptr->flag & M_INUSE) != 0) )
X {
X continue;
X }
X
X /*
X * if there isn't room for this block..
X */
X if( ptr && (ptr->s.size < size) )
X {
X continue;
X }
X
X /*
X * If ptr is null, we have run out of memory and must sbrk more
X */
X if( ptr == NULL )
X {
X need = (size + M_SIZE) * (size > 10*1024 ? 1:2);
X if( need < M_BLOCKSIZE )
X {
X need = M_BLOCKSIZE;
X }
X else if( need & (M_BLOCKSIZE-1) )
X {
X need &= ~(M_BLOCKSIZE-1);
X need += M_BLOCKSIZE;
X }
X ptr = (struct mlist *) sbrk((int)need);
X if( ptr == (struct mlist *) -1 )
X {
X malloc_errno = M_CODE_NOMORE_MEM;
X malloc_fatal(func);
X }
X malloc_data_end = sbrk((int)0);
X
X ptr->prev = oldptr;
X ptr->next = (struct mlist *) 0;
X ptr->s.size = need - M_SIZE;
X ptr->flag = M_MAGIC;
X
X oldptr->next = ptr;
X malloc_end = ptr;
X
X
X } /* if( ptr ==... */
X
X /*
X * Now ptr points to a memory location that can store
X * this data, so lets go to work.
X */
X
X ptr->r_size = size; /* save requested size */
X ptr->flag |= M_INUSE;
X
X /*
X * split off unneeded data area in this block, if possible...
X */
X malloc_split(ptr);
X
X /*
X * re-adjust the requested size so that it is what the user
X * actually requested...
X */
X
X ptr->r_size--;
X
X /*
X * just to make sure that noone is misusing malloced
X * memory without initializing it, lets set it to
X * all '\01's. We call local_memset() because memset()
X * may be checking for malloc'd ptrs and this isn't
X * a malloc'd ptr yet.
X */
X malloc_memset(ptr->data,M_FILL,(int)ptr->s.size);
X
X return( ptr->data);
X
X } /* for(... */
X
X} /* malloc(... */
X
X/*
X * Function: malloc_split()
X *
X * Purpose: to split a malloc segment if there is enough room at the
X * end of the segment that isn't being used
X *
X * Arguments: ptr - pointer to segment to split
X *
X * Returns: nothing of any use.
X *
X * Narrative:
X * get the needed size of the module
X * round the size up to appropriat boundry
X * calculate amount of left over space
X * if there is enough left over space
X * create new malloc block out of remainder
X * if next block is free
X * join the two blocks together
X * fill new empty block with free space filler
X * re-adjust pointers and size of current malloc block
X *
X *
X *
X * Mod History:
X * 90/01/27 cpcahil Initial revision.
X */
Xvoid
Xmalloc_split(ptr)
X struct mlist * ptr;
X{
X extern struct mlist * malloc_end;
X void malloc_join();
X int rest;
X int size;
X struct mlist * tptr;
X
X size = ptr->r_size;
X
X /*
X * roundup size to the appropriate boundry
X */
X
X M_ROUNDUP(size);
X
X /*
X * figure out how much room is left in the array.
X * if there is enough room, create a new mlist
X * structure there.
X */
X
X if( ptr->s.size > size )
X {
X rest = ptr->s.size - size;
X }
X else
X {
X rest = 0;
X }
X
X if( rest > (M_SIZE+M_RND) )
X {
X tptr = (struct mlist *) (ptr->data+size);
X tptr->prev = ptr;
X tptr->next = ptr->next;
X tptr->flag = M_MAGIC;
X tptr->s.size = rest - M_SIZE;
X
X /*
X * If possible, join this segment with the next one
X */
X
X malloc_join(tptr, tptr->next,0,0);
X
X if( tptr->next )
X {
X tptr->next->prev = tptr;
X }
X
X malloc_memset(tptr->data,M_FREE_FILL, (int)tptr->s.size);
X
X ptr->next = tptr;
X ptr->s.size = size;
X
X if( malloc_end == ptr )
X {
X malloc_end = tptr;
X }
X }
X
X} /* malloc_split(... */
X
X/*
X * Function: malloc_join()
X *
X * Purpose: to join two malloc segments together (if possible)
X *
X * Arguments: ptr - pointer to segment to join to.
X * nextptr - pointer to next segment to join to ptr.
X *
X * Returns: nothing of any values.
X *
X * Narrative:
X *
X * Mod History:
X * 90/01/27 cpcahil Initial revision.
X */
Xvoid
Xmalloc_join(ptr,nextptr, inuse_override, fill_flag)
X struct mlist * ptr;
X struct mlist * nextptr;
X int inuse_override;
X int fill_flag;
X{
X unsigned int newsize;
X
X if( ptr && ! (inuse_override || (ptr->flag & M_INUSE)) &&
X nextptr && ! (nextptr->flag & M_INUSE) &&
X ((ptr->data+ptr->s.size) == (char *) nextptr) )
X {
X if( malloc_end == nextptr )
X {
X malloc_end = ptr;
X }
X ptr->next = nextptr->next;
X newsize = nextptr->s.size + M_SIZE;
X
X /*
X * if we are to fill and this segment is in use,
X * fill in with M_FILL newly added space...
X */
X
X if(fill_flag && (ptr->flag & M_INUSE) )
X {
X malloc_memset(ptr->data+ptr->s.size,
X M_FILL, (int)(nextptr->s.size + M_SIZE));
X }
X
X ptr->s.size += newsize;
X if( ptr->next )
X {
X ptr->next->prev = ptr;
X }
X }
X
X} /* malloc_join(... */
X
X
X/*
X * The following mess is just to ensure that the versions of these functions in
X * the current library are included (to make sure that we don't accidentaly get
X * the libc versions. (This is the lazy man's -u ld directive)
X */
X
Xvoid free();
Xint strcmp();
Xint memcmp();
Xchar * realloc();
X
Xvoid (*malloc_void_funcs[])() =
X{
X free,
X};
X
Xint (*malloc_int_funcs[])() =
X{
X strcmp,
X memcmp,
X};
X
Xchar * (*malloc_char_star_funcs[])() =
X{
X realloc,
X};
X
X/*
X * This is malloc's own memset which is used without checking the parameters.
X */
X
Xvoid
Xmalloc_memset(ptr,byte,len)
X char * ptr;
X char byte;
X int len;
X{
X
X while(len-- > 0)
X {
X *ptr++ = byte;
X }
X
X} /* malloc_memset(... */
X
X/*
X * Function: malloc_fatal()
X *
X * Purpose: to display fatal error message and take approrpriate action
X *
X * Arguments: funcname - name of function calling this routine
X *
X * Returns: nothing of any value
X *
X * Narrative:
X *
X * Notes: This routine does not make use of any libc functions to build
X * and/or disply the error message. This is due to the fact that
X * we are probably at a point where malloc is having a real problem
X * and we don't want to call any function that may use malloc.
X */
Xvoid
Xmalloc_fatal(funcname)
X char * funcname;
X{
X char errbuf[128];
X void exit();
X void malloc_err_handler();
X extern char * malloc_err_strings[];
X extern int malloc_errno;
X extern int malloc_fatal_level;
X char * s;
X char * t;
X
X s = errbuf;
X t = "Fatal error: ";
X while( *s = *t++)
X {
X s++;
X }
X t = funcname;
X while( *s = *t++)
X {
X s++;
X }
X
X t = "(): ";
X while( *s = *t++)
X {
X s++;
X }
X
X t = malloc_err_strings[malloc_errno];
X while( *s = *t++)
X {
X s++;
X }
X
X *(s++) = '\n';
X
X if( write(malloc_errfd,errbuf,(unsigned)(s-errbuf)) != (s-errbuf))
X {
X (void) write(2,"I/O error to error file\n",(unsigned)24);
X exit(110);
X }
X malloc_err_handler(malloc_fatal_level);
X
X} /* malloc_fatal(... */
X
X/*
X * Function: malloc_warning()
X *
X * Purpose: to display warning error message and take approrpriate action
X *
X * Arguments: funcname - name of function calling this routine
X *
X * Returns: nothing of any value
X *
X * Narrative:
X *
X * Notes: This routine does not make use of any libc functions to build
X * and/or disply the error message. This is due to the fact that
X * we are probably at a point where malloc is having a real problem
X * and we don't want to call any function that may use malloc.
X */
Xvoid
Xmalloc_warning(funcname)
X char * funcname;
X{
X char errbuf[128];
X void exit();
X void malloc_err_handler();
X extern char * malloc_err_strings[];
X extern int malloc_errno;
X extern int malloc_warn_level;
X char * s;
X char * t;
X
X s = errbuf;
X t = "Warning: ";
X while( *s = *t++)
X {
X s++;
X }
X t = funcname;
X while( *s = *t++)
X {
X s++;
X }
X
X t = "(): ";
X while( *s = *t++)
X {
X s++;
X }
X
X t = malloc_err_strings[malloc_errno];
X while( *s = *t++)
X {
X s++;
X }
X
X *(s++) = '\n';
X
X if( write(malloc_errfd,errbuf,(unsigned)(s-errbuf)) != (s-errbuf))
X {
X (void) write(2,"I/O error to error file\n",(unsigned)24);
X exit(110);
X }
X
X malloc_err_handler(malloc_warn_level);
X
X} /* malloc_warning(... */
X
X/*
X * Function: malloc_err_handler()
X *
X * Purpose: to take the appropriate action for warning and/or fatal
X * error conditions.
X *
X * Arguments: level - error handling level
X *
X * Returns: nothing of any value
X *
X * Narrative:
X *
X * Notes: This routine does not make use of any libc functions to build
X * and/or disply the error message. This is due to the fact that
X * we are probably at a point where malloc is having a real problem
X * and we don't want to call any function that may use malloc.
X */
Xvoid
Xmalloc_err_handler(level)
X{
X void exit();
X void malloc_dump();
X extern int malloc_errfd;
X
X if( level & M_HANDLE_DUMP )
X {
X malloc_dump(malloc_errfd);
X }
X
X switch( level & ~M_HANDLE_DUMP )
X {
X /*
X * If we are to drop a core file and exit
X */
X case M_HANDLE_ABORT:
X (void) abort();
X break;
X
X /*
X * If we are to exit..
X */
X case M_HANDLE_EXIT:
X exit(200);
X break;
X
X#ifndef __MSDOS__
X /*
X * If we are to dump a core, but keep going on our merry way
X */
X case M_HANDLE_CORE:
X {
X int pid;
X
X /*
X * fork so child can abort (and dump core)
X */
X if( (pid = fork()) == 0 )
X {
X (void) write(2,"Child dumping core\n",
X (unsigned)9);
X (void) abort();
X }
X
X /*
X * wait for child to finish dumping core
X */
X while( wait((int *)0) != pid)
X {
X }
X
X /*
X * Move core file to core.pid.cnt so
X * multiple cores don't overwrite each
X * other.
X */
X if( access("core",0) == 0 )
X {
X static int corecnt;
X char filenam[32];
X filenam[0] = 'c';
X filenam[1] = 'o';
X filenam[2] = 'r';
X filenam[3] = 'e';
X filenam[4] = '.';
X (void)tostring(filenam+5,getpid(),
X 5, B_DEC, '0');
X filenam[10] = '.';
X (void)tostring(filenam+11,corecnt++,
X 3, B_DEC, '0');
X filenam[14] = '\0';
X (void) unlink(filenam);
X if( link("core",filenam) == 0)
X {
X (void) unlink("core");
X }
X }
X }
X#endif
X
X
X /*
X * If we are to just ignore the error and keep on processing
X */
X case M_HANDLE_IGNORE:
X break;
X
X } /* switch(... */
X
X} /* malloc_err_handler(... */
X
X/*
X * $Log: malloc.c,v $
X * Revision 1.1 1994/10/06 17:43:12 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:22 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:05 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.6 90/05/11 00:13:09 cpcahil
X * added copyright statment
X *
X * Revision 1.5 90/02/25 11:01:18 cpcahil
X * added support for malloc chain checking.
X *
X * Revision 1.4 90/02/24 21:50:21 cpcahil
X * lots of lint fixes
X *
X * Revision 1.3 90/02/24 14:51:18 cpcahil
X * 1. changed malloc_fatal and malloc_warn to use malloc_errno and be passed
X * the function name as a parameter.
X * 2. Added several function headers.
X * 3. Changed uses of malloc_fatal/warning to conform to new usage.
X *
X * Revision 1.2 90/02/23 18:05:23 cpcahil
X * fixed open of error log to use append mode.
X *
X * Revision 1.1 90/02/22 23:17:43 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 13042 -ne `wc -c <'dmake/dbug/malloc/malloc.c'`; then
echo shar: \"'dmake/dbug/malloc/malloc.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/malloc.c'
fi
if test -f 'dmake/license' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/license'\"
else
echo shar: Extracting \"'dmake/license'\" \(12487 characters\)
sed "s/^X//" >'dmake/license' <<'END_OF_FILE'
X GNU GENERAL PUBLIC LICENSE
X Version 1, February 1989
X
X Copyright (C) 1989 Free Software Foundation, Inc.
X 675 Mass Ave, Cambridge, MA 02139, USA
X Everyone is permitted to copy and distribute verbatim copies
X of this license document, but changing it is not allowed.
X
X Preamble
X
X The license agreements of most software companies try to keep users
Xat the mercy of those companies. By contrast, our General Public
XLicense is intended to guarantee your freedom to share and change free
Xsoftware--to make sure the software is free for all its users. The
XGeneral Public License applies to the Free Software Foundation's
Xsoftware and to any other program whose authors commit to using it.
XYou can use it for your programs, too.
X
X When we speak of free software, we are referring to freedom, not
Xprice. Specifically, the General Public License is designed to make
Xsure that you have the freedom to give away or sell copies of free
Xsoftware, that you receive source code or can get it if you want it,
Xthat you can change the software or use pieces of it in new free
Xprograms; and that you know you can do these things.
X
X To protect your rights, we need to make restrictions that forbid
Xanyone to deny you these rights or to ask you to surrender the rights.
XThese restrictions translate to certain responsibilities for you if you
Xdistribute copies of the software, or if you modify it.
X
X For example, if you distribute copies of a such a program, whether
Xgratis or for a fee, you must give the recipients all the rights that
Xyou have. You must make sure that they, too, receive or can get the
Xsource code. And you must tell them their rights.
X
X We protect your rights with two steps: (1) copyright the software, and
X(2) offer you this license which gives you legal permission to copy,
Xdistribute and/or modify the software.
X
X Also, for each author's protection and ours, we want to make certain
Xthat everyone understands that there is no warranty for this free
Xsoftware. If the software is modified by someone else and passed on, we
Xwant its recipients to know that what they have is not the original, so
Xthat any problems introduced by others will not reflect on the original
Xauthors' reputations.
X
X The precise terms and conditions for copying, distribution and
Xmodification follow.
X
X GNU GENERAL PUBLIC LICENSE
X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
X
X 0. This License Agreement applies to any program or other work which
Xcontains a notice placed by the copyright holder saying it may be
Xdistributed under the terms of this General Public License. The
X"Program", below, refers to any such program or work, and a "work based
Xon the Program" means either the Program or any work containing the
XProgram or a portion of it, either verbatim or with modifications. Each
Xlicensee is addressed as "you".
X
X 1. You may copy and distribute verbatim copies of the Program's source
Xcode as you receive it, in any medium, provided that you conspicuously and
Xappropriately publish on each copy an appropriate copyright notice and
Xdisclaimer of warranty; keep intact all the notices that refer to this
XGeneral Public License and to the absence of any warranty; and give any
Xother recipients of the Program a copy of this General Public License
Xalong with the Program. You may charge a fee for the physical act of
Xtransferring a copy.
X
X 2. You may modify your copy or copies of the Program or any portion of
Xit, and copy and distribute such modifications under the terms of Paragraph
X1 above, provided that you also do the following:
X
X a) cause the modified files to carry prominent notices stating that
X you changed the files and the date of any change; and
X
X b) cause the whole of any work that you distribute or publish, that
X in whole or in part contains the Program or any part thereof, either
X with or without modifications, to be licensed at no charge to all
X third parties under the terms of this General Public License (except
X that you may choose to grant warranty protection to some or all
X third parties, at your option).
X
X c) If the modified program normally reads commands interactively when
X run, you must cause it, when started running for such interactive use
X in the simplest and most usual way, to print or display an
X announcement including an appropriate copyright notice and a notice
X that there is no warranty (or else, saying that you provide a
X warranty) and that users may redistribute the program under these
X conditions, and telling the user how to view a copy of this General
X Public License.
X
X d) You may charge a fee for the physical act of transferring a
X copy, and you may at your option offer warranty protection in
X exchange for a fee.
X
XMere aggregation of another independent work with the Program (or its
Xderivative) on a volume of a storage or distribution medium does not bring
Xthe other work under the scope of these terms.
X
X 3. You may copy and distribute the Program (or a portion or derivative of
Xit, under Paragraph 2) in object code or executable form under the terms of
XParagraphs 1 and 2 above provided that you also do one of the following:
X
X a) accompany it with the complete corresponding machine-readable
X source code, which must be distributed under the terms of
X Paragraphs 1 and 2 above; or,
X
X b) accompany it with a written offer, valid for at least three
X years, to give any third party free (except for a nominal charge
X for the cost of distribution) a complete machine-readable copy of the
X corresponding source code, to be distributed under the terms of
X Paragraphs 1 and 2 above; or,
X
X c) accompany it with the information you received as to where the
X corresponding source code may be obtained. (This alternative is
X allowed only for noncommercial distribution and only if you
X received the program in object code or executable form alone.)
X
XSource code for a work means the preferred form of the work for making
Xmodifications to it. For an executable file, complete source code means
Xall the source code for all modules it contains; but, as a special
Xexception, it need not include source code for modules which are standard
Xlibraries that accompany the operating system on which the executable
Xfile runs, or for standard header files or definitions files that
Xaccompany that operating system.
X
X 4. You may not copy, modify, sublicense, distribute or transfer the
XProgram except as expressly provided under this General Public License.
XAny attempt otherwise to copy, modify, sublicense, distribute or transfer
Xthe Program is void, and will automatically terminate your rights to use
Xthe Program under this License. However, parties who have received
Xcopies, or rights to use copies, from you under this General Public
XLicense will not have their licenses terminated so long as such parties
Xremain in full compliance.
X
X 5. By copying, distributing or modifying the Program (or any work based
Xon the Program) you indicate your acceptance of this license to do so,
Xand all its terms and conditions.
X
X 6. Each time you redistribute the Program (or any work based on the
XProgram), the recipient automatically receives a license from the original
Xlicensor to copy, distribute or modify the Program subject to these
Xterms and conditions. You may not impose any further restrictions on the
Xrecipients' exercise of the rights granted herein.
X
X 7. The Free Software Foundation may publish revised and/or new versions
Xof the General Public License from time to time. Such new versions will
Xbe similar in spirit to the present version, but may differ in detail to
Xaddress new problems or concerns.
X
XEach version is given a distinguishing version number. If the Program
Xspecifies a version number of the license which applies to it and "any
Xlater version", you have the option of following the terms and conditions
Xeither of that version or of any later version published by the Free
XSoftware Foundation. If the Program does not specify a version number of
Xthe license, you may choose any version ever published by the Free Software
XFoundation.
X
X 8. If you wish to incorporate parts of the Program into other free
Xprograms whose distribution conditions are different, write to the author
Xto ask for permission. For software which is copyrighted by the Free
XSoftware Foundation, write to the Free Software Foundation; we sometimes
Xmake exceptions for this. Our decision will be guided by the two goals
Xof preserving the free status of all derivatives of our free software and
Xof promoting the sharing and reuse of software generally.
X
X NO WARRANTY
X
X 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
XREPAIR OR CORRECTION.
X
X 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
XPOSSIBILITY OF SUCH DAMAGES.
X
X END OF TERMS AND CONDITIONS
X
X Appendix: How to Apply These Terms to Your New Programs
X
X If you develop a new program, and you want it to be of the greatest
Xpossible use to humanity, the best way to achieve this is to make it
Xfree software which everyone can redistribute and change under these
Xterms.
X
X To do so, attach the following notices to the program. It is safest to
Xattach them to the start of each source file to most effectively convey
Xthe exclusion of warranty; and each file should have at least the
X"copyright" line and a pointer to where the full notice is found.
X
X <one line to give the program's name and a brief idea of what it does.>
X Copyright (C) 19yy <name of author>
X
X This program is free software; you can redistribute it and/or modify
X it under the terms of the GNU General Public License as published by
X the Free Software Foundation; either version 1, or (at your option)
X any later version.
X
X This program is distributed in the hope that it will be useful,
X but WITHOUT ANY WARRANTY; without even the implied warranty of
X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X GNU General Public License for more details.
X
X You should have received a copy of the GNU General Public License
X along with this program; if not, write to the Free Software
X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X
XAlso add information on how to contact you by electronic and paper mail.
X
XIf the program is interactive, make it output a short notice like this
Xwhen it starts in an interactive mode:
X
X Gnomovision version 69, Copyright (C) 19xx name of author
X Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
X This is free software, and you are welcome to redistribute it
X under certain conditions; type `show c' for details.
X
XThe hypothetical commands `show w' and `show c' should show the
Xappropriate parts of the General Public License. Of course, the
Xcommands you use may be called something other than `show w' and `show
Xc'; they could even be mouse-clicks or menu items--whatever suits your
Xprogram.
X
XYou should also get your employer (if you work as a programmer) or your
Xschool, if any, to sign a "copyright disclaimer" for the program, if
Xnecessary. Here a sample; alter the names:
X
X Yoyodyne, Inc., hereby disclaims all copyright interest in the
X program `Gnomovision' (a program to direct compilers to make passes
X at assemblers) written by James Hacker.
X
X <signature of Ty Coon>, 1 April 1989
X Ty Coon, President of Vice
X
XThat's all there is to it!
END_OF_FILE
if test 12487 -ne `wc -c <'dmake/license'`; then
echo shar: \"'dmake/license'\" unpacked with wrong size!
fi
chmod +x 'dmake/license'
# end of 'dmake/license'
fi
if test -f 'dmake/makefile.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/makefile.mk'\"
else
echo shar: Extracting \"'dmake/makefile.mk'\" \(12963 characters\)
sed "s/^X//" >'dmake/makefile.mk' <<'END_OF_FILE'
X# //// Makefile for DMAKE. \\\\
X# The target system is characterized by the following macros imported from
X# the environment.
X#
X# OS - gives the class of operating system
X# OSRELEASE - optionally gives the particular release of the OS above.
X# OSENVIRONMENT - optionally gives the environment under which the above
X# OS is in use.
X#
X# For valid values for the above macros consult the readme/* files or type
X# 'make' by itself to get a summary of what is available.
X
X# First target in the makefile, do this so that targets declared in the
X# included files are never marked as being the first *default* target.
Xfirst : all ;
X
X#Enable keeping of state for future compiles
X.KEEP_STATE := _state.mk
X
X# Pull in the configuration macros, from the environment. OS is required,
X# OSRELEASE, and OSENVIRONMENT are optional.
X.IF $(OS) == $(NULL)
X .IMPORT : OS
X.END
X.IMPORT .IGNORE : OSRELEASE OSENVIRONMENT TMPDIR
X
X# Define $(PUBLIC)
X_osenv := $(OSENVIRONMENT)$(DIRSEPSTR)
X_osre := $(OSRELEASE)$(DIRSEPSTR)$(!null,$(OSENVIRONMENT) $(_osenv))
XENVDIR = $(OS)$(DIRSEPSTR)$(!null,$(OSRELEASE) $(_osre))
XPUBLIC = $(ENVDIR)public.h
XSTARTUP := startup.mk
X
X# Define the source files
XSRC =\
X infer.c make.c stat.c expand.c dmstring.c hash.c dag.c dmake.c\
X path.c imacs.c sysintf.c parse.c getinp.c quit.c state.c\
X dmdump.c macparse.c rulparse.c percent.c function.c
X
X# Common Include files.
XHDR = dmake.h extern.h struct.h vextern.h patchlvl.h version.h
X
X# Define the TARGET we are making, and where the OBJECT files go.
XOBJDIR := objects
XTARGET = dmake$E
XCFLAGS += -I.
X
X# Meta rule for making .o's from .c's (give our own so we can move object
X# to objects directory in a portable, compiler independent way)
X# Define it before the .INCLUDE so that different OS combinations can redefine
X# it.
X%$O : %.c
X.IF $(SHELL) == mpw
X %$(CC) $(CFLAGS) -o :$(OBJDIR:s,/,:,):$@ $<
X.ELSE
X %$(CC) -c $(CFLAGS) $<
X.IF $(SHELL) != $(COMSPEC)
X mv $(@:f) $(OBJDIR)
X.ELSE
X +copy $(@:f) $(OBJDIR)
X +del $(@:f)
X.ENDIF
X.ENDIF
X
X# Pull in the proper configuration files, based on the value of OS.
X.INCLUDE : $(OS)/config.mk
X.INCLUDE : dbug/dbug.mk
X
X# Set the .SOURCE targets so that we look for things in the right place.
X.SOURCE.c :^ .NULL
X.SOURCE.h :^ .NULL
X.SOURCE$O :^ $(OBJDIR)
X.PRECIOUS : $(HDR)
X
X# Must come after the above INCLUDE so that it gets ALL objects.
XOBJECTS := {$(ASRC:b) $(SRC:b)}$O
X
X# The main target, make sure the objects directory exists first.
X# LDARGS is defined in config.mk file of each OS/OSRELEASE combination.
Xall : $(TARGET) $(STARTUP);
X$(TARGET) : $(OBJDIR)
X$(TARGET) : $(OBJECTS);$(LD) $(LDARGS)
X.IF $(SHELL) == mpw
X$(STARTUP) : $(ENVDIR)$(STARTUP); duplicate :$(<:s,/,:,) $@
X.ELSE
X$(STARTUP) : $(ENVDIR)$(STARTUP); $(eq,$(SHELL),$(COMSPEC) +copy cp) $< $@
X.ENDIF
X
X# how to make public.h
Xpublic .PHONY : $(PUBLIC);
X$(PUBLIC) .SHELL .NOSTATE: $(SRC)
X genpub -n DMAKE $< >$@
X rcsclean $@ > /dev/null
X
X# Other obvious targets...
X.IF $(SHELL) == mpw
X$(OBJDIR):;-newfolder $@
X.ELSE
X$(OBJDIR):;-$(eq,$(SHELL),$(COMSPEC) +md mkdir) $@
X.ENDIF
X
X# remaining dependencies should be automatically generated
Xsysintf$O : $(OS)/sysintf.h
Xruletab$O : $(OS)/startup.h #khc 01NOV90 - dependency was missing
X$(OBJECTS) : $(HDR)
X
Xclean:;+- $(RM) -rf dmake$E dbdmake$E objects* $(STARTUP) _*state*.mk
X
X# Rules for making the manual pages.
Xman .SETDIR=man : dmake.nc dmake.uue ;
Xdmake.nc : dmake.p ; scriptfix < $< > $@
Xdmake.p : dmake.tf; typeset -man -Tdumb $< > $@
Xdmake.uue : dmake.p
X compress -b 12 dmake.p
X mv dmake.p.Z dmake.Z
X uuencode dmake.Z dmake.Z >dmake.uue
X /bin/rm -f dmake.Z
X
X#--------------------------------------------------------------------------
X# Make the various archives for shipping the thing around.
X#
Xarchives : zip tar shar
X $(RM) -rf src-list dmake
X
Xzip .PHONY : dmake.zip ;
Xshar .PHONY : dmake.shar;
Xtar .PHONY : dmake.tar;
X
Xdmake.zip : dir-copy
X zip -r $(@:b) $(@:b)
X
Xdmake.shar : dir-copy
X find dmake -type f -print >src-list
X xshar -vc -o$@ -L40 `cat src-list`
X
Xdmake.tar : dir-copy
X tar cf $@ dmake
X
Xdir-copy .PHONY : src-list
X[
X echo 'tmp.tar .SILENT :$$(ALLSRC) ;tar -cf tmp.tar $$(ALLSRC)' >> $<
X $(MAKECMD) -f $< tmp.tar
X mkdir dmake
X cd dmake
X tar xf ../tmp.tar; chmod -R u+rw .
X cd ..
X /bin/rm -f tmp.tar
X]
X
Xsrc-list : clean man
X echo 'ALLSRC = \' >$@
X find . -type f -print |\
X sed -e 's/RCS\///' -e 's/,v//' -e 's/$$/\\/' -e 's/^\.\// /'|\
X sort -u |\
X grep -v tst | grep -v $@ | grep -v license |\
X grep -v '\.zip' | grep -v '\.tar'| grep -v '\.shar' >> $@
X echo ' license' >> $@
X
X#--------------------------------------------------------------------------
X# This section can be used to make the necessary script files so that dmake
X# can be bootstrapped.
X#
X# dmake scripts -- makes all the script files at once.
X#
XSH_n = $(@:s/swp-/-/:s,-,/,:s/scripts/${SCRIPTFILE}/)
XMS_n = MAKESTARTUP=$(@:s/swp-/-/:s,-,/,:s/scripts/startup.mk/)
XSH = $(SH_n:s/c40d/cd/:s/c50d/cd/:s/c51d/cd/:s/c60d/cd/:s/ibmc2/ibm/)
XMS = $(MS_n:s/c40d/cd/:s/c50d/cd/:s/c51d/cd/:s/c60d/cd/:s/ibmc2/ibm/)
XFIX-SH = $(SH:s,fix/,,)
X
Xscripts: unix-scripts atari-tos-scripts msdos-scripts os2-scripts\
X apple-mac-scripts quantum-qnx-scripts;
X
X# To add a new environment for UNIX, simply create the appropriate entry
X# in the style below for the macro which contains the OS, OSRELEASE and
X# OSENVIRONMENT flags. Then add the entry as a recipe line for the target
X# unix-scripts.
X#
Xunix-bsd43-scripts-flags = OS=unix OSRELEASE=bsd43 OSENVIRONMENT=
Xunix-solaris-scripts-flags = OS=unix OSRELEASE=solaris OSENVIRONMENT=
Xunix-solaris-gcc-scripts-flags = OS=unix OSRELEASE=solaris OSENVIRONMENT=gcc
Xunix-bsd43-uw-scripts-flags= OS=unix OSRELEASE=bsd43 OSENVIRONMENT=uw
Xunix-bsd43-vf-scripts-flags= OS=unix OSRELEASE=bsd43 OSENVIRONMENT=vf
Xunix-sysvr4-scripts-flags = OS=unix OSRELEASE=sysvr4 OSENVIRONMENT=
Xunix-sysvr3-scripts-flags = OS=unix OSRELEASE=sysvr3 OSENVIRONMENT=
Xunix-sysvr3-pwd-scripts-flags = OS=unix OSRELEASE=sysvr3 OSENVIRONMENT=pwd
Xunix-xenix-scripts-flags = OS=unix OSRELEASE=xenix OSENVIRONMENT=
Xunix-xenix-pwd-scripts-flags = OS=unix OSRELEASE=xenix OSENVIRONMENT=pwd
Xunix-sysvr1-scripts-flags = OS=unix OSRELEASE=sysvr1 OSENVIRONMENT=
Xunix-386ix-scripts-flags = OS=unix OSRELEASE=386ix OSENVIRONMENT=
Xunix-coherent-scripts-flags= OS=unix OSRELEASE=coherent OSENVIRONMENT=
Xqnx--scripts-flags = OS=qnx OSRELEASE= OSENVIRONMENT=
Xtos--scripts-flags = OS=tos OSRELEASE= OSENVIRONMENT=
Xmac--scripts-flags = OS=mac OSRELEASE= OSENVIRONMENT=
X
Xunix-scripts .SWAP : clean
X $(MAKE) SCRIPTFILE=make.sh unix-bsd43-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-solaris-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-solaris-gcc-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-bsd43-uw-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-bsd43-vf-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-sysvr4-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-sysvr3-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-sysvr3-pwd-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-xenix-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-xenix-pwd-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-sysvr1-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-386ix-scripts
X $(MAKE) SCRIPTFILE=make.sh unix-coherent-scripts
X
Xunix-%-scripts .SWAP :
X $(MAKECMD) -s $($@-flags) .KEEP_STATE:= public
X $(MAKECMD) -ns .KEEP_STATE:= $(MS) $($@-flags) >/tmp/dmscr
X dfold </tmp/dmscr >$(SH)
X
Xqnx-%-scripts .SWAP :
X $(MAKECMD) -s $($@-flags) .KEEP_STATE:= public
X $(MAKECMD) -ns .KEEP_STATE:= $(MS) $($@-flags) >/tmp/dmscr
X dfold </tmp/dmscr >$(SH)
X
Xtos-%-scripts .SWAP :
X $(MAKECMD) -s $($@-flags) .KEEP_STATE:= public
X $(MAKECMD) -ns .KEEP_STATE:= $(MS) $($@-flags) >/tmp/dmscr
X dfold </tmp/dmscr >$(SH)
X
Xatari-tos-scripts .SWAP : clean
X $(MAKE) SCRIPTFILE=make.sh tos--scripts
X
Xquantum-qnx-scripts .SWAP : clean
X $(MAKE) SCRIPTFILE=make.sh qnx--scripts
X
Xapple-mac-scripts .SWAP : clean
X $(MAKE) SCRIPTFILE=make.sh mac--scripts
X
Xmac-%-scripts .SWAP :
X $(MAKECMD) -s $($@-flags) .KEEP_STATE:= public
X $(MAKECMD) -ns .KEEP_STATE:= $(MS) $($@-flags) >$(SH)
X sed 's/ mac\/\(.*\)$$/ :mac:\1/' <$(SH) | dfold >/tmp/dmscr
X /bin/mv /tmp/dmscr $(SH)
X
X# We make the standard dos scripts here, but we have to go and fix up the
X# mkXX.bat file since it contains names of temporary files for the response
X# files required by the linker. We need to also construct the response file
X# contents. These two functions are performed by the fix-msdos-%-scripts
X# meta-target.
X#
X# To add a new DOS environment just do what is described for adding a new
X# unix environment, and then make certain that the fix-msdos-%-scripts target
X# performs the correct function for the new environment.
Xmsdos-cf = OS=msdos OSENVIRONMENT=
Xmsdos-tccdos-scripts-flags = $(msdos-cf) OSRELEASE=tccdos SWAP=n
Xmsdos-tccdosswp-scripts-flags = $(msdos-cf) OSRELEASE=tccdos
Xmsdos-bccdos-scripts-flags = $(msdos-cf) OSRELEASE=bccdos SWAP=n
Xmsdos-bccdosswp-scripts-flags = $(msdos-cf) OSRELEASE=bccdos
Xmsdos-msc40dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=4.0
Xmsdos-msc40dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=4.0
Xmsdos-msc50dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.0
Xmsdos-msc50dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=5.0
Xmsdos-msc51dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.1
Xmsdos-msc51dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=5.1
Xmsdos-msc60dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=6.0
Xmsdos-msc60dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=6.0
Xmsdos-ztcdos-scripts-flags= $(msdos-cf) OSRELEASE=ztcdos SWAP=n
Xmsdos-ztcdosswp-scripts-flags= $(msdos-cf) OSRELEASE=ztcdos
X
Xmsdos-scripts: clean\
X msdos-tcc-scripts msdos-bcc-scripts\
X msdos-msc-scripts msdos-ztc-scripts;
X
Xmsdos-tcc-scripts .SWAP :
X $(MAKE) SCRIPTFILE=mk.bat msdos-tccdos-scripts
X $(MAKE) SCRIPTFILE=mkswp.bat msdos-tccdosswp-scripts
X
Xmsdos-bcc-scripts .SWAP :
X $(MAKE) SCRIPTFILE=mk.bat msdos-bccdos-scripts
X $(MAKE) SCRIPTFILE=mkswp.bat msdos-bccdosswp-scripts
X
Xmsdos-msc-scripts .SWAP :! 40 50 51 60
X $(MAKE) SCRIPTFILE=mk$?.bat msdos-msc$?dos-scripts
X $(MAKE) SCRIPTFILE=mk$?swp.bat msdos-msc$?dosswp-scripts
X
Xmsdos-ztc-scripts .SWAP :
X $(MAKE) SCRIPTFILE=mk.bat msdos-ztcdos-scripts
X $(MAKE) SCRIPTFILE=mkswp.bat msdos-ztcdosswp-scripts
X
Xmsdos-%-scripts .SWAP .SILENT:
X $(MAKE) -s $($@-flags) .KEEP_STATE:= public
X $(MAKE) -ns DIRSEPSTR:=$(DIRSEPSTR) SHELL=command.com COMSPEC=command.com .KEEP_STATE:= $(MS) $($@-flags) >$(SH)
X $(MAKE) -s $(MAKEMACROS) $(MS) $($@-flags) fix-msdos-$*-scripts
X
X
X# We make the standard OS/2 scripts here, but we have to go and fix up the
X# mkXX.cmd file since it contains names of temporary files for the response
X# files required by the linker. We need to also construct the response file
X# contents. These two functions are performed by the fix-msdos-%-scripts
X# meta-target.
X#
X# To add a new OS/2 environment just do what is described for adding a new
X# unix environment, and then make certain that the fix-msdos-%-scripts target
X# performs the correct function for the new environment.
Xos2-cf = OS=os2 OSENVIRONMENT=
Xos2-msc40dos-scripts-flags= $(os2-cf) OSRELEASE=mscdos SWAP=n MSC_VER=4.0
Xos2-msc50dos-scripts-flags= $(os2-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.0
Xos2-msc51dos-scripts-flags= $(os2-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.1
Xos2-msc60dos-scripts-flags= $(os2-cf) OSRELEASE=mscdos SWAP=n MSC_VER=6.0
Xos2-ibmc2-scripts-flags= $(os2-cf) OSRELEASE=ibm SWAP=n MSC_VER=5.1
X
Xos2-scripts: clean os2-msc-scripts os2-ibm-scripts;
X
Xos2-msc-scripts .SWAP :! 40 50 51 60
X $(MAKE) SCRIPTFILE=mk$?.cmd os2-msc$?dos-scripts
X
Xos2-ibm-scripts .SWAP :! c2
X $(MAKE) SCRIPTFILE=mk$?.cmd os2-ibm$?-scripts
X
Xos2-%-scripts .SWAP :
X $(MAKE) -s $($@-flags) .KEEP_STATE:= public
X $(MAKE) -ns DIRSEPSTR:=$(DIRSEPSTR) SHELL=cmd.exe COMSPEC=cmd.exe .KEEP_STATE:= $(MS) $($@-flags) >$(SH)
X $(MAKE) -s $(MAKEMACROS) $(MS) $($@-flags) fix-os2-$*-scripts
X
X# Signify NULL targets for the various MSC compiler versions.
Xc2 40 50 51 60:;
X
X# Go over the created script file and make sure all the '/' that are in
X# filenames are '\', and make sure the final link command line looks
X# reasonable.
XMAPOBJ = obj$(SWAP:s/y/swp/:s/n//).rsp
XMAPLIB = lib$(SWAP:s/y/swp/:s/n//).rsp
XOBJRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPOBJ},)
XLIBRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPLIB},)
XDOSOBJ = $(CSTARTUP) $(OBJDIR)/{$(OBJECTS)}
Xfix-%-scripts:
X tail -r $(FIX-SH) >tmp-sh-r
X tail +3 tmp-sh-r | sed -e 's,/,\\,g' >tmp-out
X tail -r tmp-out >$(FIX-SH)
X head -2 tmp-sh-r |\
X sed -e 's,\\tmp\\mkA[a-zA-Z0-9]*,$(OBJRSP),'\
X -e 's,\\tmp\\mkB[a-zA-Z0-9]*,$(LIBRSP),' |\
X sed -e 's,$(OS)/,$(OS)\\,g'\
X -e 's,$(OS)/$(OSRELEASE)/,$(OS)\\$(OSRELEASE)\\,g'\
X -e 's,$(OS)\\$(OSRELEASE)/,$(OS)\\$(OSRELEASE)\\,g'\
X -e 's,$(OS)/$(OSRELEASE)\\,$(OS)\\$(OSRELEASE)\\,g' >>$(FIX-SH)
X rm -f tmp-sh-r tmp-out
X mv <+$(DOSOBJ:s,/,\\,:t"+\n")\n+> $(OBJRSP)
X mv <+$(LDLIBS:s,/,\\,:t"+\n")\n+> $(LIBRSP)
END_OF_FILE
if test 12963 -ne `wc -c <'dmake/makefile.mk'`; then
echo shar: \"'dmake/makefile.mk'\" unpacked with wrong size!
fi
# end of 'dmake/makefile.mk'
fi
if test -f 'dmake/msdos/spawn.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/spawn.c'\"
else
echo shar: Extracting \"'dmake/msdos/spawn.c'\" \(13056 characters\)
sed "s/^X//" >'dmake/msdos/spawn.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/spawn.c,v 1.1 1994/10/06 17:41:42 dvadura Exp $
X-- SYNOPSIS -- spawnvpe code to emulate spawnvpe call common to DOS compilers.
X--
X-- DESCRIPTION
X-- This implementation is further integrated into dmake in that it
X-- determines the program to execute and if it's extension is either
X-- .bat or .ksh it executes it using the appropriate shell based on the
X-- setting of .MKSARGS. If .MKSARGS is set then in addition
X-- to the command tail getting built the arguments are also passed in the
X-- environment pursuant to the published MKS argument passing conventions.
X-- If the variable Swap_on_exec is set and the DOS OS supports it
X-- then the dmake executable image is swapped to secondary storage prior
X-- to running the child process. This is requested by setting the
X-- appropriate flag in the call to exec.
X--
X-- This and the exec.asm routine are derived from work that was supplied
X-- to me by Kent Williams (will...@umaxc.weeg.uiowa.edu) and by
X-- Len Reed, (..!gatech!holos0!lbr or holos0!l...@gatech.edu., Holos
X-- Software, Inc., Tucker, Ga.). I sincerely acknowledge their help since
X-- their Turbo C, and MSC 6.0 code lead directly to this combined
X-- swapping exec that hopefully works with either compiler in all memory
X-- models.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: spawn.c,v $
X * Revision 1.1 1994/10/06 17:41:42 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <stdio.h>
X#include <stdlib.h>
X
X#if defined(_MSC_VER) && _MSC_VER >= 600
X /* Ignore the MSC 6.0 library's "const"-riddled prototype
X for spawnvpe.
X */
X# define spawnvpe _ignore_msc_spawnvpe
X# include <process.h>
X# undef spawnvpe
X int spawnvpe(int, char *, char **, char **);
X#else
X# include <process.h>
X#endif
X
X#include <dos.h>
X#include <errno.h>
X#include <string.h>
X#include <alloc.h>
X#include <fcntl.h>
X#include "extern.h"
X#include "dosdta.h"
X#include "exec.h"
X#include "sysintf.h"
X
Xextern int Interrupted;
X
X/* variables and functions local to this file */
Xstatic char *_findexec ANSI((char *, int *));
Xstatic char **_getpath ANSI(());
Xstatic char far *_dos_alloc ANSI((uint16));
X
Xstatic uint16 _swap_mask;
Xstatic int _mks_args;
Xstatic char dot_com[] = ".COM",
X dot_exe[] = ".EXE",
X dot_bat[] = ".BAT",
X dot_ksh[] = ".KSH";
X
X/* Kinds of executables */
X#define SCR 1
X#define COM 2
X#define EXE 4
X#define ALL (SCR|COM|EXE)
X
X/* How to make a long pointer */
X#define CF(x) (char far *)x
X
X/* Make sure we know how to get a segment out of a long pointer */
X#ifndef FP_SEG
X#define FP_SEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
X#endif
X
X
XPUBLIC int
Xspawnvpe(mode, program, av, ep)/*
X=================================
X Spawn a process using an environment and a vector of arguments.
X The code computes a new environment, puts the MKS arguments into
X it if need be, and calls the appropriate routines to search the
X path and to invoke the process. */
Xint mode;
Xchar *program;
Xchar **av;
Xchar **ep;
X{
X char pwd[PATH_MAX+1];
X char **envp = ep; /* Cause we are going to mess with it. */
X char **argv = av; /* Same with this one. */
X char cmdtail[129];
X char far *environment;
X char *tail;
X char *swptmp;
X unsigned int envsize;
X unsigned int cmdsize;
X int cmdtailen;
X int i;
X int doswap;
X
X /* First check to see if we can find the program to execute this way we
X * don't alloc the environment and other such stuff prior to figuring out
X * we don't know how to run the program. */
Xfind_program:
X if((program = _findexec(program, &i)) == NIL(char)) {
X errno = ENOENT;
X return( -1 );
X }
X
X /* i is set to TRUE in _findexec if the exec is a shell
X * script (either .BAT or .KSH file), returns FALSE for all others. */
X if( i && !Packed_shell ) {
X /* Restore the spaces into the command line that were erased by
X * the previous call to Pack_argv. This enables us to repack the
X * command as a shell command using Pack_argv again. */
X for( i=0; argv[i] != NIL(char); i++ ) {
X int x = strlen(argv[i]);
X if( argv[i+1] != NIL(char) ) argv[i][x] = ' ';
X }
X
X argv = Pack_argv( FALSE, TRUE, *argv );
X
X /* Go and find the program again, I hate goto's but it seems silly to
X * use tail recursion here just for aesthetic purity. */
X program = *argv;
X goto find_program;
X }
X
X /* Compute size of *argv vector for passing as MKS style arguments */
X cmdsize = strlen(*argv)+2;
X
X /* So we have decided on a program to run, therefore pack the command tail
X * and build the environment to pass to the exec code. This loop packs the
X * DOS command tail, and computes the size of all arguments for the MKS
X * argument passing convention. Note that we reserve one less byte in the
X * command tail if we are not using MKS style argument passing.
X *
X * Make sure the command tail contains at leat a space. Some commands fail
X * to work if the command tail is only a \r, STUPID DOS! */
X cmdtailen = ((_mks_args = ((Glob_attr & A_MKSARGS) != 0)) != 0)?3:2;
X tail = cmdtail+1;
X
X if( argv[1] != NIL(char) )
X for( i=1; argv[i] != NIL(char); i++ ) {
X int arglen = strlen(argv[i]);
X
X cmdsize += arglen+2; /* Compute all args size for MKS */
X
X if( (cmdtailen += arglen+1) <= 128 ) {
X register char *p = argv[i];
X tail[-1] = ' '; /* put in the space */
X while( *tail++ = *p++ ); /* put in the arg */
X }
X else if( !_mks_args ) {
X errno = E2BIG; /* unless its MKS exit if arglist */
X return(-1); /* is too long. */
X }
X }
X else
X *tail++ = ' ';
X
X /* Finish the command tail set up, placing the length in the first byte,
X * and the \r \n \0 at the end for DOS, MKS and us respectively. */
X *cmdtail = tail-cmdtail-2;
X tail[-1] = '\r';
X if( _mks_args ) *tail++ = '\n';
X *tail = '\0';
X
X /* Compute size of environment, skipping any MKS arguments passed in our
X * environment */
X for(; *envp && **envp == '~'; envp++ );
X for(i=0, envsize=_mks_args?cmdsize:1; envp[i] != NIL(char); i++ )
X envsize += strlen(envp[i]) + 1;
X
X /* Check the DOS version number here. If it is < 3.0 then we don't
X * even want to think about executing the swapping code. Permanently
X * set swap to 0. */
X doswap = (_osmajor < 3) ? 0 : Swap_on_exec;
X
X /* Set up temporary file for swapping */
X swptmp = doswap?tempnam(NIL(char),"mk"):"";
X
X /* Allocate an appropriate sized environment block and align it on a
X * paragraph boundary. It will later get copied to an appropriately low
X * place in the executable image so that when we swap out the environment
X * is still present. Use
X * _dos_alloc
X * to allocate the environment segment. The segment is freed by the call
X * to exec. */
X environment = _dos_alloc( envsize = ((envsize+16)>>4) );
X
X /* First copy the arguments preceeded by ~ character if we are using
X * MKS style argument passing */
X if( _mks_args )
X for(; *argv; argv++) {
X register char *p = *argv;
X
X *environment++ = '~';
X while( *environment++ = *p++ ); /* Far dest, poss near ptr */
X }
X
X /* Now stick in the current evironment vectors. */
X for(; *envp; envp++) {
X register char *p = *envp;
X while( *environment++ = *p++ ); /* Far dest, poss near ptr */
X }
X *environment = '\0';
X
X /* Clear the interrupted flag, and exec */
X Interrupted = 0;
X
X /* Preserve the current working directory accross a spawn call
X * DOS is brain dead about this. This way we have some hope of cleaning
X * up the swapping tempfiles after we return. */
X strcpy(pwd,Get_current_dir());
X i = exec(doswap,CF(program),CF(cmdtail),FP_SEG(environment),CF(swptmp));
X Set_dir(pwd);
X
X /* Now free the temporary file name */
X if( doswap ) FREE(swptmp);
X
X /* If swap was interrupted then quit properly from dmake. */
X if( Interrupted ) Quit();
X
X return(i);
X}
X
X
XPUBLIC void
XHook_std_writes( file )
Xchar *file;
X{
X if( file!= NIL(char) ) {
X int mode = O_BINARY | O_WRONLY | O_CREAT | O_TRUNC;
X int handle;
X
X if (*file == '+') {
X ++file; /* -F +file means append to file */
X mode = O_BINARY | O_WRONLY | O_CREAT | O_APPEND;
X }
X handle = open(file, mode, S_IREAD | S_IWRITE);
X if (handle < 0) {
X Fatal( "Could not open -F file");
X }
X (void) lseek(handle, 0L, SEEK_END);
X do_hook_std_writes(handle);
X }
X else
X do_unhook_std_writes();
X}
X
X
X/*
X** _findexec finds executables on the path.
X** Note that it is pretty simple to add support for other executable types
X** shell scripts, etc.
X**
X** This follows the command.com behavior very closely.
X*/
Xstatic char *
X_findexec( s, is_shell )/*
X==========================
X Cloned closely from code provided by Kent Williams. Stripped his down to
X a reduced search since dmake doesn't need to recompute the PATH vector
X each time it does the search since it cannot alter the path vector once
X it begins to make recipes. Also modified it to use findfirst and findnext
X as provided for dirlib package that I got off the net. */
Xchar *s;
Xint *is_shell;
X{
X unsigned found_flags;
X char **pathv = NIL(char *);
X char *ext = NIL(char);
X char *buf = NIL(char);
X char *p[2];
X char *dot_scr;
X char *dot;
X
X p[0] = ""; p[1] = NIL(char);
X if( strchr("./\\", *s) || s[1] == ':' )
X pathv = p;
X else if( (pathv = _getpath()) == NIL(char *) )
X return( NIL(char) );
X
X /* Compute the extension we need if any. */
X if( (dot = strrchr(s,'.')) != NIL(char) &&
X dot > strrchr(s,'/') && dot > strrchr(s,'\\') )
X ext = dot+1;
X
X dot_scr = _mks_args ? dot_ksh : dot_bat;
X *is_shell = FALSE;
X
X for( found_flags = 0; *pathv && !found_flags; pathv++ ) {
X DTA dta;
X
X if( !ext ) {
X char *name;
X buf = Build_path( *pathv, name=DmStrJoin(s, ".???", -1, FALSE) );
X FREE(name);
X }
X else
X buf = Build_path( *pathv, s );
X
X if( findfirst((char *)strupr(buf), &dta) != NIL(DTA) ) {
X if( !ext ) {
X char *dot;
X
X /* search order is .com .exe (.ksh || .bat)
X * there has to be a '.' */
X do {
X dot = strrchr(dta.name,'.');
X if(0 == strcmp(dot,dot_com))
X found_flags |= COM;
X else if(0 == strcmp(dot,dot_exe))
X found_flags |= EXE;
X else if( 0 == strcmp(dot,dot_scr) )
X found_flags |= SCR;
X } while( found_flags != ALL && findnext(&dta) != NIL(DTA) );
X
X if(found_flags & COM) ext = dot_com;
X else if(found_flags & EXE) ext = dot_exe;
X else if(found_flags & SCR) {
X ext = dot_scr;
X *is_shell = TRUE;
X }
X
X if( found_flags ) {
X char *name;
X buf = Build_path( *pathv, name=DmStrJoin(s,ext,-1,FALSE) );
X FREE(name);
X strupr(buf);
X }
X }
X else
X found_flags++;
X }
X }
X
X return( found_flags ? buf : NIL(char) );
X}
X
X
X/*
X** getpath turns the DOS path into a char *vector, It is gotten and
X** transformed only once since dmake can't modify the value of PATH while
X** it is making targets.
X*/
Xstatic char **
X_getpath()
X{
X static char **dir = NIL(char *);
X register char *p;
X
X if( !dir ) {
X register char *t;
X int i;
X char *semi = NIL(char);
X
X if( (p = getenv("PATH")) == NIL(char) ) p = "";
X for( i=1, t=p; *t; t++ ) if( *t == ';' ) i++;
X
X TALLOC(dir, i+1, char *);
X p = DmStrDup(p);
X
X for( i=0; p; p = semi ? (semi+1):NIL(char),i++ ){
X if( (semi = strchr(p,';')) != NIL(char) ) *semi = '\0';
X dir[i] = p;
X }
X dir[i]=NIL(char);
X }
X
X return( dir );
X}
X
X
Xstatic char far *
X_dos_alloc( size )/*
X====================
X This routine allocates size paragraphs from DOS. It changes the memory
X allocation strategy to allocate from the tail and then changes it back.
X to using first fit. */
Xuint16 size;
X{
X union REGS r;
X
X r.h.ah = 0x48;
X r.x.bx = size;
X
X intdos( &r, &r );
X if( r.x.cflag ) No_ram();
X
X return( (char far *) MK_FP(r.x.ax, 0) );
X}
END_OF_FILE
if test 13056 -ne `wc -c <'dmake/msdos/spawn.c'`; then
echo shar: \"'dmake/msdos/spawn.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/spawn.c'
fi
if test -f 'dmake/struct.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/struct.h'\"
else
echo shar: Extracting \"'dmake/struct.h'\" \(10314 characters\)
sed "s/^X//" >'dmake/struct.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/struct.h,v 1.1 1994/10/06 17:42:50 dvadura Exp $
X-- SYNOPSIS -- structure definitions
X--
X-- DESCRIPTION
X-- dmake main data structure definitions. See each of the individual
X-- struct declarations for more detailed information on the defined
X-- fields and their use.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: struct.h,v $
X * Revision 1.1 1994/10/06 17:42:50 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#ifndef _STRUCT_INCLUDED_
X#define _STRUCT_INCLUDED_
X
Xtypedef uint32 t_attr;
X
X/* The following struct is the cell used in the hash table.
X * NOTE: It contains the actual hash value. This allows the hash table
X * insertion to compare hash values and to do a string compare only
X * for entries that have matching hash_key values. This elliminates
X * 99.9999% of all extraneous string compare operations when searching
X * a hash table chain for matching entries. */
X
Xtypedef struct hcell {
X struct hcell *ht_next; /* next entry in the hash table */
X struct hcell *ht_link; /* for temporary lists */
X char *ht_name; /* name of this cell */
X char *ht_value; /* cell value if any */
X uint32 ht_hash; /* actual hash_key of cell */
X int ht_flag; /* flags belonging to hash entry */
X
X /* NOTE: some macros have corresponding variables defined
X * that control program behaviour. For these macros a
X * bit of ht_flag indicates the variable value will be set, and the
X * type of the value that will be set.
X *
X * The struct below contains a mask for bit variables, and a
X * pointer to the global STATIC location for that variable.
X * String and char variables point to the same place as ht_value
X * and must be updated when ht_value changes, bit variables must
X * have their value recomputed. See Def_macro code for more
X * details.
X *
X * NOTE: Macro variables and Targets are always distinct. Thus
X * the value union contains pointers back at cells that own
X * a particular name entry. A conflict in this can never
X * arise, ie pointers at cells will never be used as
X * values for a macro variable, since the cell and macro
X * name spaces are completely distinct. */
X
X struct {
X int mv_mask; /* bit mask for bit variable */
X union {
X char** mv_svar;/* ptr to string valued glob var */
X char* mv_cvar;/* ptr to char valued glob var */
X t_attr* mv_bvar;/* ptr to bit valued glob var */
X int* mv_ivar;/* ptr to int valued glob var */
X
X struct {
X struct tcell* ht_owner;/* ptr to CELL owning name */
X struct tcell* ht_root; /* root ptr for explode */
X } ht;
X } val;
X } var; /* variable's static equivalent */
X} HASH, *HASHPTR;
X
X#define MV_MASK var.mv_mask
X#define MV_SVAR var.val.mv_svar
X#define MV_CVAR var.val.mv_cvar
X#define MV_BVAR var.val.mv_bvar
X#define MV_IVAR var.val.mv_ivar
X#define CP_OWNR var.val.ht.ht_owner
X#define CP_ROOT var.val.ht.ht_root
X
X
X
X/* This struct holds the list of temporary files that have been created.
X * It gets unlinked when Quit is called due to an execution error */
Xtypedef struct flst {
X char *fl_name; /* file name */
X FILE *fl_file; /* the open file */
X struct flst *fl_next; /* pointer to next file */
X} FILELIST, *FILELISTPTR;
X
X
X/* The next struct is used to link together prerequisite lists */
Xtypedef struct lcell {
X struct tcell *cl_prq; /* link to a prerequisite */
X struct lcell *cl_next; /* next cell on dependency list */
X int cl_flag; /* flags for link cell */
X} LINK, *LINKPTR;
X
X
X/* This is the structure of a target cell in the dag which represents the
X * graph of dependencies. Each possible target is represented as a cell.
X *
X * Each cell contains a pointer to the hash table entry for this cell.
X * The hash table entry records the name of the cell. */
X
Xtypedef struct tcell {
X struct hcell *ce_name; /* name of this cell */
X struct hcell *ce_pushed; /* local pushed macro definitions */
X
X struct lcell ce_all; /* link for grouping UPDATEALL cells*/
X struct tcell *ce_set; /* set rep. valid if ce_all != NULL */
X struct tcell *ce_setdir; /* SETDIR ROOT pointer for this cell*/
X struct tcell *ce_link; /* link for temporary list making */
X struct tcell *ce_parent; /* used by inner loop, not a static */
X
X struct lcell *ce_prq; /* list of prerequisites for cell */
X struct lcell *ce_prqorg; /* list of original prerequisites */
X struct lcell *ce_indprq; /* indirect prerequisites for % cell*/
X
X struct str *ce_recipe; /* recipe for making this cell */
X FILELISTPTR ce_files; /* list of temporary files for cell */
X struct str *ce_cond; /* conditional macro assignments */
X
X char *ce_per; /* value of % in %-meta expansion */
X char *ce_fname; /* file name associated with target */
X char *ce_lib; /* archive name, if A_LIBRARYM */
X char *ce_dir; /* value for .SETDIR attribute */
X
X int ce_count; /* value for :: recipe set */
X int ce_index; /* value of count for next :: child */
X int ce_flag; /* all kinds of goodies */
X t_attr ce_attr; /* attributes for this target */
X time_t ce_time; /* time stamp value of target if any*/
X} CELL, *CELLPTR;
X
X#define CE_NAME ce_name->ht_name
X#define CE_RECIPE ce_recipe
X#define CE_PRQ ce_prq
X#define CeMeToo(C) &((C)->ce_all)
X#define CeNotMe(C) (C)->ce_all.cl_next
X
X
X/* This struct represents that used by Get_token to return and control
X * access to a token list inside a particular string. This gives the
X * ability to access non overlapping tokens simultaneously from
X * multiple strings. */
X
Xtypedef struct {
X char *tk_str; /* the string to search for tokens */
X char tk_cchar; /* current char under *str */
X int tk_quote; /* if we are scanning a quoted str */
X} TKSTR, *TKSTRPTR;
X
X
X
X/* Below is the struct used to represent a string. It points at possibly
X * another string, since the set of rules for making a target is a collection
X * of strings. */
X
X
Xtypedef struct str {
X char *st_string; /* the string value */
X struct str *st_next; /* pointer to the next string */
X t_attr st_attr; /* attr for rule operations */
X} STRING, *STRINGPTR;
X
X
X
X/* These structs are used in processing of the % rules, and in building
X * the NFA machine that is used to match an arbitrary target string to
X * one of the % rules that is represented by each DFA */
X
Xtypedef int16 statecnt; /* limits the max number of dfa states */
X
X
X/* Each state of the DFA contains four pieces of information. */
Xtypedef struct st {
X struct st *no_match; /* state to go to if no match */
X struct st *match; /* state to go to if we do match */
X char symbol; /* symbol on which we transit */
X char action; /* action to perform if match */
X} STATE, *STATEPTR;
X
X
X/* Each DFA machine looks like this. It must have two pointers that represent
X * the value of % in the matched string, and it contains a pointer into the
X * current state, as well as the array of all states. */
Xtypedef struct {
X char *pstart; /* start of % string match */
X char *pend; /* end of % string match */
X STATEPTR c_state; /* current DFA state */
X CELLPTR node; /* % target represented by this DFA */
X STATEPTR states; /* table of states for the DFA */
X} DFA, *DFAPTR;
X
X
X/* An NFA is a collection of DFA's. For each DFA we must know it's current
X * state and where the next NFA is. */
Xtypedef struct nfa_machine {
X DFAPTR dfa; /* The DFA for this eps transition */
X char status; /* DFA state */
X struct nfa_machine *next; /* the next DFA in NFA */
X} NFA, *NFAPTR;
X
X
X
X/* The next struct is used to link together DFA nodes for inference. */
X
Xtypedef struct dfal {
X struct tcell *dl_meta; /* link to %-meta cell */
X struct dfal *dl_next; /* next cell on matched DFA list*/
X struct dfal *dl_prev; /* prev cell on matched DFA list*/
X struct dfal *dl_member; /* used during subset calc */
X char dl_delete; /* used during subset calc */
X char *dl_per; /* value of % for matched DFA */
X statecnt dl_state; /* matched state of the DFA */
X int dl_prep; /* repetion count for the cell */
X} DFALINK, *DFALINKPTR;
X
X
X/* This struct is used to store the stack of DFA sets during inference */
Xtypedef struct dfst {
X DFALINKPTR df_set; /* pointer to the set */
X struct dfst *df_next; /* next element in the stack */
X} DFASET, *DFASETPTR;
X
X
X/* We need sets of items during inference, here is the item, we form sets
X * by linking them together. */
X
Xtypedef struct ic {
X CELLPTR ic_meta; /* Edge we used to make this cell*/
X DFALINKPTR ic_dfa; /* Dfa that we matched against */
X CELLPTR ic_setdirroot; /* setdir root pointer for cell */
X DFASET ic_dfastack; /* set of dfas we're working with*/
X int ic_dmax; /* max depth of cycles in graph */
X char *ic_name; /* name of the cell to insert */
X char *ic_dir; /* dir to CD to prior to recurse */
X struct ic *ic_next; /* next pointer to link */
X struct ic *ic_link; /* link all ICELL'S together */
X struct ic *ic_parent; /* pointer to post-requisite */
X char ic_flag; /* flag, used for NOINFER only */
X char ic_exists; /* TRUE if prerequisite exists */
X} ICELL, *ICELLPTR;
X
X#endif
END_OF_FILE
if test 10314 -ne `wc -c <'dmake/struct.h'`; then
echo shar: \"'dmake/struct.h'\" unpacked with wrong size!
fi
# end of 'dmake/struct.h'
fi
if test -f 'dmake/unix/sysvr4/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr4/config.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr4/config.h'\" \(2225 characters\)
sed "s/^X//" >'dmake/unix/sysvr4/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/sysvr4/RCS/config.h,v 1.1 1994/10/06 17:42:24 dvadura Exp $
X-- SYNOPSIS -- Configurarion include file.
X--
X-- DESCRIPTION
X-- There is one of these for each specific machine configuration.
X-- It can be used to further tweek the machine specific sources
X-- so that they compile.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: config.h,v $
X * Revision 1.1 1994/10/06 17:42:24 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X#define _TYPES_
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
X#if !defined(_SVR4_SOURCE) || defined(_POSIX_SOURCE) || defined(_XOPEN_SOURCE)
Xextern char *getcwd ANSI((char *, int));
X#endif
X
X/* Define setvbuf, SysV doesn't have one */
X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
X
X/* We don't care about CONST */
X#define CONST
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2225 -ne `wc -c <'dmake/unix/sysvr4/config.h'`; then
echo shar: \"'dmake/unix/sysvr4/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr4/config.h'
fi
echo shar: End of archive 12 \(of 27\).
cp /dev/null ark12isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/malloc/string.c dmake/dbug/malloc/tostring.c
# dmake/dmake.h dmake/dmdump.c dmake/function.c dmake/mac/directry.c
# dmake/os2/runargv.c dmake/stat.c
# Wrapped by kent@sparky on Fri Oct 21 16:50:40 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 13 (of 27)."'
if test -f 'dmake/dbug/malloc/string.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/string.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/string.c'\" \(9667 characters\)
sed "s/^X//" >'dmake/dbug/malloc/string.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X
X#include <stdio.h>
X#include <string.h>
X#include <sys/types.h>
X#include "malloc.h"
X
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: string.c,v 1.1 1994/10/06 17:43:17 dvadura Exp $";
X#endif
X
Xint malloc_checking = 0;
X
Xchar *
Xstrcat(str1,str2)
X register char * str1;
X register char * str2;
X{
X char * rtn;
X int len;
X
X /*
X * check pointers agains malloc region. The malloc* functions
X * will properly handle the case where a pointer does not
X * point into malloc space.
X */
X malloc_checking = 1;
X
X len = strlen(str2);
X malloc_check_str("strcat", str2);
X
X len += strlen(str1) + 1;
X malloc_checking = 0;
X
X malloc_check_data("strcat", str1, len);
X
X rtn = str1;
X
X while( *str1 )
X {
X str1++;
X }
X
X while( (*str1 = *str2) != '\0' )
X {
X str1++;
X str2++;
X }
X
X return(rtn);
X}
X
Xchar *
Xstrdup(str1)
X register char * str1;
X{
X char * malloc();
X char * rtn;
X register char * str2;
X
X malloc_check_str("strdup", str1);
X
X rtn = str2 = malloc((unsigned)strlen(str1)+1);
X
X if( rtn != (char *) 0)
X {
X while( (*str2 = *str1) != '\0' )
X {
X str1++;
X str2++;
X }
X }
X
X return(rtn);
X}
X
Xchar *
Xstrncat(str1,str2,len)
X register char * str1;
X register char * str2;
X register int len;
X{
X int len1;
X int len2;
X char * rtn;
X
X malloc_check_strn("strncat", str2, len);
X
X malloc_checking = 1;
X
X len2 = strlen(str2) + 1;
X len1 = strlen(str1);
X
X malloc_checking = 0;
X
X
X if( (len+1) < len2 )
X {
X len1 += len + 1;
X }
X else
X {
X len1 += len2;
X }
X malloc_check_data("strncat", str1, len1);
X
X rtn = str1;
X
X while( *str1 )
X {
X str1++;
X }
X
X while( len-- && ((*str1++ = *str2++) != '\0') )
X {
X }
X
X if( ! len )
X {
X *str1 = '\0';
X }
X
X return(rtn);
X}
X
Xint
Xstrcmp(str1,str2)
X register char * str1;
X register char * str2;
X{
X malloc_check_str("strcmp", str1);
X malloc_check_str("strcmp", str2);
X
X while( *str1 && (*str1 == *str2) )
X {
X str1++;
X str2++;
X }
X
X
X /*
X * in order to deal with the case of a negative last char of either
X * string when the other string has a null
X */
X if( (*str2 == '\0') && (*str1 == '\0') )
X {
X return(0);
X }
X else if( *str2 == '\0' )
X {
X return(1);
X }
X else if( *str1 == '\0' )
X {
X return(-1);
X }
X
X return( *str1 - *str2 );
X}
X
Xint
Xstrncmp(str1,str2,len)
X register char * str1;
X register char * str2;
X register int len;
X{
X malloc_check_strn("strncmp", str1, len);
X malloc_check_strn("strncmp", str2, len);
X
X while( --len >= 0 && *str1 && (*str1 == *str2) )
X {
X str1++;
X str2++;
X }
X
X if( len < 0 )
X {
X return(0);
X }
X /*
X * in order to deal with the case of a negative last char of either
X * string when the other string has a null
X */
X if( (*str2 == '\0') && (*str1 == '\0') )
X {
X return(0);
X }
X else if( *str2 == '\0' )
X {
X return(1);
X }
X else if( *str1 == '\0' )
X {
X return(-1);
X }
X
X return( *str1 - *str2 );
X}
X
Xchar *
Xstrcpy(str1,str2)
X register char * str1;
X register char * str2;
X{
X char * rtn;
X int len;
X
X malloc_checking = 1;
X len = strlen(str2) + 1;
X malloc_checking = 0;
X
X malloc_check_data("strcpy", str1, len);
X malloc_check_data("strcpy", str2, len);
X
X rtn = str1;
X
X while( (*str1++ = *str2++) != '\0')
X {
X }
X
X return(rtn);
X}
X
Xchar *
Xstrncpy(str1,str2,len)
X register char * str1;
X register char * str2;
X register int len;
X{
X extern int malloc_checking;
X char * rtn;
X
X malloc_check_data("strncpy", str1, len);
X malloc_check_strn("strncpy", str2, len);
X
X rtn = str1;
X
X while((len-- > 0) && (*str1++ = *str2++) != '\0')
X {
X }
X while( (len-- > 0) )
X {
X *str1++ = '\0';
X }
X
X return(rtn);
X}
X
Xint
Xstrlen(str1)
X register char * str1;
X{
X register char * s;
X
X if(! malloc_checking )
X {
X malloc_check_str("strlen", str1);
X }
X
X for( s = str1; *s; s++)
X {
X }
X
X return( s - str1 );
X}
X
Xchar *
Xstrchr(str1,c)
X register char * str1;
X register int c;
X{
X malloc_check_str("strchr", str1);
X
X while( *str1 && (*str1 != (char) c) )
X {
X str1++;
X }
X
X if(*str1 != (char) c)
X {
X str1 = (char *) 0;
X }
X
X return(str1);
X}
X
Xchar *
Xstrrchr(str1,c)
X register char * str1;
X register int c;
X{
X register char * rtn = (char *) 0;
X
X malloc_check_str("strrchr", str1);
X
X while( *str1 )
X {
X if(*str1 == (char) c )
X {
X rtn = str1;
X }
X str1++;
X }
X
X if( *str1 == (char) c)
X {
X rtn = str1;
X }
X
X return(rtn);
X}
X
Xchar *
Xindex(str1,c)
X char * str1;
X char c;
X{
X return( strchr(str1,c) );
X}
X
Xchar *
Xrindex(str1,c)
X char * str1;
X char c;
X{
X return( strrchr(str1,c) );
X}
X
Xchar *
Xstrpbrk(str1,str2)
X register char * str1;
X register char * str2;
X{
X register char * tmp;
X
X malloc_check_str("strpbrk", str1);
X malloc_check_str("strpbrk", str2);
X
X while(*str1)
X {
X for( tmp=str2; *tmp && *tmp != *str1; tmp++)
X {
X }
X if( *tmp )
X {
X break;
X }
X str1++;
X }
X
X if( ! *str1 )
X {
X str1 = (char *) 0;
X }
X
X return(str1);
X}
X
Xint
Xstrspn(str1,str2)
X register char * str1;
X register char * str2;
X{
X register char * tmp;
X char * orig = str1;
X
X malloc_check_str("strspn", str1);
X malloc_check_str("strspn", str2);
X
X while(*str1)
X {
X for( tmp=str2; *tmp && *tmp != *str1; tmp++)
X {
X }
X if(! *tmp )
X {
X break;
X }
X str1++;
X }
X
X return( (int) (str1 - orig) );
X}
X
Xint
Xstrcspn(str1,str2)
X register char * str1;
X register char * str2;
X{
X register char * tmp;
X char * orig = str1;
X
X malloc_check_str("strcspn", str1);
X malloc_check_str("strcspn", str2);
X
X while(*str1)
X {
X for( tmp=str2; *tmp && *tmp != *str1; tmp++)
X {
X }
X if( *tmp )
X {
X break;
X }
X str1++;
X }
X
X return( (int) (str1 - orig) );
X}
X
X/*
X * strtok() source taken from that posted to comp.lang.c by Chris Torek
X * in Jan 1990.
X */
X
X/*
X * Copyright (c) 1989 The Regents of the University of California.
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms are permitted
X * provided that the above copyright notice and this paragraph are
X * duplicated in all such forms and that any documentation,
X * advertising materials, and other materials related to such
X * distribution and use acknowledge that the software was developed
X * by the University of California, Berkeley. The name of the
X * University may not be used to endorse or promote products derived
X * from this software without specific prior written permission.
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
X/*
X * Get next token from string s (NULL on 2nd, 3rd, etc. calls),
X * where tokens are nonempty strings separated by runs of
X * chars from delim. Writes NULs into s to end tokens. delim need not
X * remain constant from call to call.
X *
X * Modified by cpc: changed variable names to conform with naming
X * conventions used in rest of code. Added malloc pointer
X * check calls.
X */
Xchar *
Xstrtok(str1, str2)
X char * str1;
X char * str2;
X{
X static char * last;
X char * strtoken();
X
X if( str1 )
X {
X malloc_check_str("strtok", str1);
X last = str1;
X }
X malloc_check_str("strtok", str2);
X
X return (strtoken(&last, str2, 1));
X}
X
X
X/*
X * Get next token from string *stringp, where tokens are (possibly empty)
X * strings separated by characters from delim. Tokens are separated
X * by exactly one delimiter iff the skip parameter is false; otherwise
X * they are separated by runs of characters from delim, because we
X * skip over any initial `delim' characters.
X *
X * Writes NULs into the string at *stringp to end tokens.
X * delim will usually, but need not, remain constant from call to call.
X * On return, *stringp points past the last NUL written (if there might
X * be further tokens), or is NULL (if there are definitely no more tokens).
X *
X * If *stringp is NULL, strtoken returns NULL.
X */
Xchar *
Xstrtoken(stringp, delim, skip)
X register char **stringp;
X register char *delim;
X int skip;
X{
X register char *s;
X register char *spanp;
X register int c, sc;
X char *tok;
X
X if ((s = *stringp) == NULL)
X return (NULL);
X
X if (skip) {
X /*
X * Skip (span) leading delimiters (s += strspn(s, delim)).
X */
X cont:
X c = *s;
X for (spanp = delim; (sc = *spanp++) != 0;) {
X if (c == sc) {
X s++;
X goto cont;
X }
X }
X if (c == 0) { /* no token found */
X *stringp = NULL;
X return (NULL);
X }
X }
X
X /*
X * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
X * Note that delim must have one NUL; we stop if we see that, too.
X */
X for (tok = s;;) {
X c = *s++;
X spanp = delim;
X do {
X if ((sc = *spanp++) == c) {
X if (c == 0)
X s = NULL;
X else
X s[-1] = 0;
X *stringp = s;
X return (tok);
X }
X } while (sc != 0);
X }
X /* NOTREACHED */
X}
X
X/*
X * $Log: string.c,v $
X * Revision 1.1 1994/10/06 17:43:17 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:27 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:13 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.7 90/08/29 22:24:19 cpcahil
X * added new function to check on strings up to a specified length
X * and used it within several strn* functions.
X *
X * Revision 1.6 90/07/16 20:06:56 cpcahil
X * fixed several minor bugs found with Henry Spencer's string/mem function
X * tester program.
X *
X * Revision 1.5 90/06/10 14:59:49 cpcahil
X * Fixed a couple of bugs in strncpy & strdup
X *
X * Revision 1.4 90/05/11 00:13:10 cpcahil
X * added copyright statment
X *
X * Revision 1.3 90/02/24 21:50:32 cpcahil
X * lots of lint fixes
X *
X * Revision 1.2 90/02/24 17:29:40 cpcahil
X * changed $Header to $Id so full path wouldnt be included as part of rcs
X * id string
X *
X * Revision 1.1 90/02/22 23:17:44 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 9667 -ne `wc -c <'dmake/dbug/malloc/string.c'`; then
echo shar: \"'dmake/dbug/malloc/string.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/string.c'
fi
if test -f 'dmake/dbug/malloc/tostring.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/tostring.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/tostring.c'\" \(3001 characters\)
sed "s/^X//" >'dmake/dbug/malloc/tostring.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include "tostring.h"
X
X/*
X * Function: tostring()
X *
X * Purpose: to convert an integer to an ascii display string
X *
X * Arguments: buf - place to put the
X * val - integer to convert
X * len - length of output field (0 if just enough to hold data)
X * base - base for number conversion (only works for base <= 16)
X * fill - fill char when len > # digits
X *
X * Returns: length of string
X *
X * Narrative: IF fill character is non-blank
X * Determine base
X * If base is HEX
X * add "0x" to begining of string
X * IF base is OCTAL
X * add "0" to begining of string
X *
X * While value is greater than zero
X * use val % base as index into xlation str to get cur char
X * divide val by base
X *
X * Determine fill-in length
X *
X * Fill in fill chars
X *
X * Copy in number
X *
X *
X * Mod History:
X * 90/01/24 cpcahil Initial revision.
X */
X
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: tostring.c,v 1.1 1994/10/06 17:43:20 dvadura Exp $";
X#endif
X
X#define T_LEN 10
X
Xint
Xtostring(buf,val,len,base,fill)
X int base;
X char * buf;
X char fill;
X int len;
X int val;
X
X{
X char * bufstart = buf;
X int i = T_LEN;
X char * xbuf = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
X char tbuf[T_LEN];
X
X /*
X * if we are filling with non-blanks, make sure the
X * proper start string is added
X */
X if( fill != ' ' )
X {
X switch(base)
X {
X case B_HEX:
X *(buf++) = '0';
X *(buf++) = 'x';
X if( len )
X {
X len -= 2;
X }
X break;
X case B_OCTAL:
X *(buf++) = fill;
X if( len )
X {
X len--;
X }
X break;
X default:
X break;
X }
X }
X
X while( val > 0 )
X {
X tbuf[--i] = xbuf[val % base];
X val = val / base;
X }
X
X if( len )
X {
X len -= (T_LEN - i);
X
X if( len > 0 )
X {
X while(len-- > 0)
X {
X *(buf++) = fill;
X }
X }
X else
X {
X /*
X * string is too long so we must truncate
X * off some characters. We do this the easiest
X * way by just incrementing i. This means the
X * most significant digits are lost.
X */
X while( len++ < 0 )
X {
X i++;
X }
X }
X }
X
X while( i < T_LEN )
X {
X *(buf++) = tbuf[i++];
X }
X
X return( (int) (buf - bufstart) );
X
X} /* tostring(... */
X
X/*
X * $Log: tostring.c,v $
X * Revision 1.1 1994/10/06 17:43:20 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:29 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:16 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.4 90/05/11 00:13:11 cpcahil
X * added copyright statment
X *
X * Revision 1.3 90/02/24 21:50:33 cpcahil
X * lots of lint fixes
X *
X * Revision 1.2 90/02/24 17:29:42 cpcahil
X * changed $Header to $Id so full path wouldnt be included as part of rcs
X * id string
X *
X * Revision 1.1 90/02/22 23:17:44 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 3001 -ne `wc -c <'dmake/dbug/malloc/tostring.c'`; then
echo shar: \"'dmake/dbug/malloc/tostring.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/tostring.c'
fi
if test -f 'dmake/dmake.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dmake.h'\"
else
echo shar: Extracting \"'dmake/dmake.h'\" \(9136 characters\)
sed "s/^X//" >'dmake/dmake.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/dmake.h,v 1.1 1994/10/06 17:41:16 dvadura Exp $
X-- SYNOPSIS -- global defines for dmake.
X--
X-- DESCRIPTION
X-- All the interesting bits and flags that dmake uses are defined here.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dmake.h,v $
X * Revision 1.1 1994/10/06 17:41:16 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#ifndef _DMAKE_INCLUDED_
X#define _DMAKE_INCLUDED_
X
X#define MAX_INC_DEPTH 10 /* max of ten nested include files */
X#define MAX_COND_DEPTH 20 /* max nesting level of conditionals */
X#define ERROR_EXIT_VALUE 255 /* return code of aborted make */
X#define CONTINUATION_CHAR '\\' /* line continuation \<nl> */
X#define DEF_ESCAPE_CHAR '\\' /* escape char for used chars */
X#define ESCAPE_CHAR *Escape_char
X#define COMMENT_CHAR '#' /* start of comment chars */
X#define TGT_DEP_SEP ':' /* separator for targets and dependents */
X#define CONDSTART '.' /* start of conditional token eg .IF */
X#define DEF_MAKE_PNAME "dmake"/* default name to use as name of make */
X
X
X/* ............... Hashing function constants ......................... */
X#define HASH_TABLE_SIZE 200 /* See hash.c for description */
X
X
X/* Bit flags for cells and macro definitions. */
X#define M_DEFAULT 0x0000 /* default flag value */
X#define M_MARK 0x0001 /* mark for circularity checks */
X#define M_PRECIOUS 0x0002 /* keep macro, same as A_PRE... */
X#define M_MULTI 0x0004 /* multiple redefinitions ok! */
X#define M_EXPANDED 0x0008 /* macro has been assigned */
X#define M_USED 0x0010 /* macro has been expanded */
X#define M_LITERAL 0x0020 /* don't strip w/s on macro def */
X#define M_NOEXPORT 0x0040 /* don't export macro for -x */
X#define M_FORCE 0x0080 /* Force a macro redefinition */
X#define M_PUSH 0x0100 /* Push previous macro defintn */
X#define M_VAR_BIT 0x1000 /* macro bit variable */
X#define M_VAR_CHAR 0x2000 /* macro char variable */
X#define M_VAR_STRING 0x4000 /* macro string variable */
X#define M_VAR_INT 0x8000 /* macro integer variable */
X
X#define M_VAR_MASK 0xf000 /* macro variable mask */
X
X
X
X/* Global and target attribute flag definitions.
X * If you change the values of these or re-order them make appropriate changes
X * in dump.c so that the output of dmake -p matches the attribute info for a
X * target. */
X
X#define A_DEFAULT 0x00000 /* default flag value */
X#define A_PRECIOUS 0x00001 /* object is precious */
X#define A_SILENT 0x00002 /* don't echo commands */
X#define A_LIBRARY 0x00004 /* target is an archive */
X#define A_EPILOG 0x00008 /* insert shell epilog code */
X#define A_PROLOG 0x00010 /* insert shell prolog code */
X#define A_IGNORE 0x00020 /* ignore errors */
X#define A_SYMBOL 0x00040 /* lib member is a symbol */
X#define A_NOINFER 0x00080 /* no trans closure from cell */
X#define A_UPDATEALL 0x00100 /* all targets of rule modified */
X#define A_SEQ 0x00200 /* sequential make attribute */
X#define A_SETDIR 0x00400 /* cd to dir when making target */
X#define A_SHELL 0x00800 /* run the recipe using a shell */
X#define A_SWAP 0x01000 /* swap on exec. */
X#define A_MKSARGS 0x02000 /* use MKS argument swapping */
X#define A_PHONY 0x04000 /* .PHONY attribute */
X#define A_NOSTATE 0x08000 /* don't track state for me */
X#define A_IGNOREGROUP 0x10000 /* Ignore group recipe */
X#define MAX_ATTR A_IGNOREGROUP /* highest valid attribute */
X#define A_LIBRARYM 0x20000 /* target is an archive member */
X#define A_FRINGE 0x40000 /* cell is on the fringe */
X#define A_COMPOSITE 0x80000 /* member of lib(targ) name */
X#define A_FFNAME 0x100000 /* if set, free ce_fname in stat*/
X#define A_UPDATED 0x200000 /* Used to mark cell as updated */
X#define A_ROOT 0x400000 /* True if it is a root prereq */
X#define A_GROUP 0x800000 /* True if rule is to be a group*/
X#define A_WHATIF 0x01000000 /* used for WHATIF tests */
X#define A_POOL 0x02000000 /* used for directory pool */
X#define A_ERROR 0x04000000 /* used to halt construction */
X#define A_FIRST 0x08000000 /* used for .INCLUDE termination*/
X
X
X/* Global and target bit flag definitions */
X
X#define F_DEFAULT 0x0000 /* default flag value */
X#define F_MARK 0x0001 /* circularity check mark */
X#define F_MULTI 0x0002 /* multiple rules for target */
X#define F_SINGLE 0x0004 /* exec rules one/prerequisite */
X#define F_TARGET 0x0008 /* marks a target */
X#define F_RULES 0x0010 /* indicates target has rules */
X#define F_GROUP 0x0020 /* indicates that rules are to */
X /* fed to the shell as a group */
X
X#define F_TRANS 0x0040 /* same as F_STAT not used tgthr*/
X#define F_STAT 0x0040 /* target already stated */
X#define F_VISITED 0x0080 /* target scheduled for make */
X#define F_USED 0x0080 /* used in releparse.c */
X#define F_SPECIAL 0x0100 /* marks a special target */
X#define F_DFA 0x0200 /* bit for marking added DFA */
X#define F_EXPLICIT 0x0400 /* explicit target in makefile */
X#define F_PERCENT 0x0800 /* marks a target as a % rule */
X#define F_REMOVE 0x1000 /* marks an intermediate target */
X#define F_MAGIC 0x2000 /* marks a magic target */
X#define F_INFER 0x4000 /* target is result of inference*/
X#define F_MADE 0x8000 /* target is manufactured */
X
X
X/* Definitions for the Parser states */
X#define NORMAL_SCAN 0 /* normal processing state */
X#define RULE_SCAN 1 /* scan of rule text */
X
X/* definitions for macro operator types */
X#define M_OP_EQ 1 /* macro operation is '=' 0000 0001 */
X#define M_OP_CL 3 /* macro operation is ':=' 0000 0011 */
X#define M_OP_PL 5 /* macro operation is '+=' 0000 0101 */
X#define M_OP_DF 9 /* macro operation is '*=' 0000 1001 */
X#define M_OP_PLCL 7 /* macro operation is '+:=' 0000 0111 */
X#define M_OP_DFCL 11 /* macro operation is '*:=' 0000 1011 */
X#define M_OP_CM 17 /* macro operation is '?=' 0001 0001 */
X#define M_OP_SI 32 /* macro operation is '!' 0010 ---- */
X
X/* definitions for rule operator types */
X#define R_OP_CL 1 /* rule operation is ':' */
X#define R_OP_DCL 2 /* rule operation is '::' */
X#define R_OP_BG 4 /* rule operation is ':!' */
X#define R_OP_UP 8 /* rule operation is ':^' */
X#define R_OP_MI 16 /* rule operation is ':-' */
X#define R_OP_OR 32 /* rule operation is ':|' */
X
X/* definitions for modifier application in Apply_modifiers in expand.c */
X#define SUFFIX_FLAG 1 /* defines for macro modifier code */
X#define DIRECTORY_FLAG 2
X#define FILE_FLAG 4
X#define WHOLENAME_FLAGS 7
X#define TOLOWER_FLAG 8
X#define TOUPPER_FLAG 16
X#define INFNAME_FLAG 32
X
X/* special target definitions for use inside dmake */
X#define ST_IF 1
X#define ST_ELSE 2
X#define ST_END 3
X#define ST_REST 4 /* remaining special targets */
X#define ST_INCLUDE 5
X#define ST_SOURCE 7
X#define ST_EXPORT 8
X#define ST_IMPORT 9
X#define ST_ELIF 10
X#define ST_KEEP 11
X#define ST_EXIT 12
X
X/* Flags for controling use of -v switch */
X#define V_NONE 0x00
X#define V_LEAVE_TMP 0x01
X#define V_DIR_SET 0x02
X#define V_DIR_CACHE 0x04
X#define V_INFER 0x08
X#define V_MAKE 0x10
X#define V_FILE_IO 0x20
X#define V_ALL (V_LEAVE_TMP | V_DIR_SET | V_INFER | V_MAKE |\
X V_FILE_IO | V_DIR_CACHE)
X
X/* Macro definitions for use inside dmake */
X#define SET_TOKEN(A, B) (A)->tk_str = (B); (A)->tk_cchar = *(B);\
X (A)->tk_quote = 1;
X#define CLEAR_TOKEN(A) *(A)->tk_str = (A)->tk_cchar
X#define GET_MACRO(A) Get_name(A, Macs, FALSE)
X#define iswhite(C) ((C == ' ') || (C == '\t'))
X
X#endif
X
END_OF_FILE
if test 9136 -ne `wc -c <'dmake/dmake.h'`; then
echo shar: \"'dmake/dmake.h'\" unpacked with wrong size!
fi
# end of 'dmake/dmake.h'
fi
if test -f 'dmake/dmdump.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dmdump.c'\"
else
echo shar: Extracting \"'dmake/dmdump.c'\" \(7110 characters\)
sed "s/^X//" >'dmake/dmdump.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/dmdump.c,v 1.1 1994/10/06 17:42:38 dvadura Exp $
X-- SYNOPSIS -- dump the internal dag to stdout.
X--
X-- DESCRIPTION
X-- This file contains the routine that is called to dump a version of
X-- the digested makefile to the standard output. May be useful perhaps
X-- to the ordinary user, and invaluable for debugging make.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dmdump.c,v $
X * Revision 1.1 1994/10/06 17:42:38 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X#define M_TEST (M_PRECIOUS | M_VAR_MASK)
X
Xstatic void dump_name ANSI((CELLPTR, int, int));
Xstatic void dump_normal_target ANSI((CELLPTR, CELLPTR, int));
Xstatic void dump_prerequisites ANSI((LINKPTR, CELLPTR, int, int, int));
Xstatic void dump_conditionals ANSI((CELLPTR,STRINGPTR,int,int));
Xstatic void dump_macro ANSI((HASHPTR, int));
X
X
XPUBLIC void
XDump()/*
X======== Dump onto standard output the digested makefile. Note that
X the form of the dump is not representative of the contents
X of the original makefile contents at all */
X{
X HASHPTR hp;
X int i;
X
X DB_ENTER( "Dump" );
X
X puts( "# Dump of dmake macro variables:" );
X for( i=0; i<HASH_TABLE_SIZE; i++)
X for( hp=Macs[i]; hp != NIL(HASH); hp = hp->ht_next ) {
X int flag = hp->ht_flag;
X dump_macro(hp, flag);
X }
X
X puts( "\n#====================================" );
X puts( "# Dump of targets:\n" );
X
X for( i=0; i<HASH_TABLE_SIZE; i++ )
X for( hp = Defs[i]; hp != NIL(HASH); hp = hp->ht_next )
X if( !(hp->CP_OWNR->ce_flag & F_PERCENT) ) {
X if( hp->CP_OWNR == Root )
X puts( "# ******* ROOT TARGET ********" );
X if (Targets->ce_prq && hp->CP_OWNR == Targets->ce_prq->cl_prq)
X puts( "# ******* FIRST USER DEFINED TARGET ******" );
X dump_normal_target( hp->CP_OWNR,NIL(CELL),hp->CP_OWNR->ce_flag);
X }
X
X puts( "\n#====================================" );
X puts( "# Dump of inference graph\n" );
X
X for( i=0; i<HASH_TABLE_SIZE; i++ )
X for( hp = Defs[i]; hp != NIL(HASH); hp = hp->ht_next )
X if( (hp->CP_OWNR->ce_flag & F_PERCENT) &&
X !(hp->CP_OWNR->ce_flag & F_MAGIC) )
X dump_normal_target(hp->CP_OWNR,NIL(CELL),hp->CP_OWNR->ce_flag);
X
X DB_VOID_RETURN;
X}
X
X
X
XPUBLIC void
XDump_recipe( sp )/*
X===================
X Given a string pointer print the recipe line out */
XSTRINGPTR sp;
X{
X char *st;
X char *nl;
X
X if( sp == NIL(STRING) ) return;
X
X putchar( '\t' );
X if( sp->st_attr & A_SILENT ) putchar( '@' );
X if( sp->st_attr & A_IGNORE ) putchar( '-' );
X if( sp->st_attr & A_SHELL ) putchar( '+' );
X if( sp->st_attr & A_SWAP ) putchar( '%' );
X
X st = sp->st_string;
X for( nl=strchr(st,'\n'); nl != NIL( char); nl=strchr(st,'\n') ) {
X *nl = '\0';
X printf( "%s\\\n", st );
X *nl = '\n';
X st = nl+1;
X }
X printf( "%s\n", st );
X}
X
X
Xstatic char *_attrs[] = { ".PRECIOUS", ".SILENT", ".LIBRARY",
X ".EPILOG", ".PROLOG", ".IGNORE", ".SYMBOL", ".NOINFER",
X ".UPDATEALL", ".SEQUENTIAL", ".SETDIR=", ".USESHELL", ".SWAP", ".MKSARGS",
X ".PHONY", ".NOSTATE", ".IGNOREGROUP" };
X
Xstatic void
Xdump_normal_target( cp, namecp, flag )/*
X========================================
X Dump in makefile like format the dag information */
XCELLPTR cp;
XCELLPTR namecp;
Xint flag;
X{
X register STRINGPTR sp;
X t_attr attr;
X unsigned int k;
X
X DB_ENTER( "dump_normal_target" );
X
X if(!(cp->ce_flag & F_TARGET) && !cp->ce_attr && !cp->ce_prq) {
X DB_VOID_RETURN;
X }
X
X if(cp->ce_set && cp->ce_set != cp) {
X DB_VOID_RETURN;
X }
X
X if( cp->ce_flag & F_MULTI ) {
X int tflag = cp->ce_prq->cl_prq->ce_flag;
X if( !(cp->ce_flag & F_PERCENT) ) tflag |= F_MULTI;
X dump_conditionals(cp, cp->ce_cond, TRUE, TRUE);
X putchar('\n');
X dump_prerequisites(cp->ce_prq,(cp->ce_flag&F_PERCENT)?NIL(CELL):cp,
X FALSE, TRUE, tflag);
X }
X else {
X CELLPTR tcp;
X
X dump_name(namecp?namecp:cp, FALSE, TRUE );
X
X for( k=0, attr=1; attr <= MAX_ATTR; attr <<= 1, k++ )
X if( cp->ce_attr & attr ) {
X printf( "%s%s ", _attrs[k],
X (attr != A_SETDIR) ? "" : (cp->ce_dir?cp->ce_dir:"") );
X }
X
X putchar( ':' );
X
X if( flag & F_MULTI ) putchar( ':' );
X if( flag & F_SINGLE ) putchar( '!' );
X putchar( ' ' );
X
X dump_prerequisites( cp->ce_prq, NIL(CELL), FALSE, FALSE, F_DEFAULT);
X dump_prerequisites( cp->ce_indprq, NIL(CELL),TRUE, FALSE, F_DEFAULT);
X
X putchar( '\n' );
X if( cp->ce_flag & F_GROUP ) puts( "[" );
X for( sp = cp->ce_recipe; sp != NIL(STRING); sp = sp->st_next )
X Dump_recipe( sp );
X if( cp->ce_flag & F_GROUP ) {
X puts( "]" );
X putchar( '\n' );
X }
X dump_conditionals(cp, cp->ce_cond, flag&F_MULTI, FALSE);
X putchar('\n');
X }
X
X DB_VOID_RETURN;
X}
X
X
Xstatic void
Xdump_conditionals( cp, sp, multi, global )
XCELLPTR cp;
XSTRINGPTR sp;
Xint multi;
Xint global;
X{
X if (sp) {
X dump_name(cp, FALSE, TRUE);
X printf(".%sCONDITIONALS %s\n", global?"GLOBAL":"",multi?"::":":");
X
X while(sp) {
X printf("\t%s\n",sp->st_string);
X sp=sp->st_next;
X }
X }
X}
X
X
Xstatic void
Xdump_macro(hp, flag)
XHASHPTR hp;
Xint flag;
X{
X printf( "%s ", hp->ht_name );
X if(flag & M_EXPANDED)
X putchar( ':' );
X
X printf( "= " );
X if(hp->ht_value != NIL(char))
X printf( "%s",hp->ht_value );
X
X if(flag & M_PRECIOUS)
X printf( "\t # PRECIOUS " );
X
X putchar( '\n' );
X}
X
X
Xstatic void
Xdump_prerequisites( lp, namecp, quote, recurse, flag )
XLINKPTR lp;
XCELLPTR namecp;
Xint quote;
Xint recurse;
Xint flag;
X{
X for( ; lp; lp=lp->cl_next )
X if( recurse )
X dump_normal_target(lp->cl_prq, namecp, flag);
X else if( lp->cl_prq )
X dump_name(lp->cl_prq, quote, FALSE);
X}
X
X
Xstatic void
Xdump_name( cp, quote, all )/*
X=============================
X print out a name */
XCELLPTR cp;
Xint quote;
Xint all;
X{
X LINKPTR lp;
X
X for(lp=CeMeToo(cp);lp;lp=lp->cl_next) {
X if( quote ) putchar('\'');
X printf( "%s", lp->cl_prq->CE_NAME );
X if( quote ) putchar('\'');
X putchar(' ');
X if (!all) break;
X }
X}
END_OF_FILE
if test 7110 -ne `wc -c <'dmake/dmdump.c'`; then
echo shar: \"'dmake/dmdump.c'\" unpacked with wrong size!
fi
# end of 'dmake/dmdump.c'
fi
if test -f 'dmake/function.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/function.c'\"
else
echo shar: Extracting \"'dmake/function.c'\" \(9537 characters\)
sed "s/^X//" >'dmake/function.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/function.c,v 1.1 1994/10/06 17:41:24 dvadura Exp $
X-- SYNOPSIS -- GNU style functions for dmake.
X--
X-- DESCRIPTION
X-- All GNU stule functions understood by dmake are implemented in this
X-- file. Currently the only such function is $(mktmp ...) which is
X-- not part of GNU-make is an extension provided by dmake.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: function.c,v $
X * Revision 1.1 1994/10/06 17:41:24 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
Xstatic char *_exec_mktmp ANSI((char *, char *, char *));
Xstatic char *_exec_subst ANSI((char *, char *, char *));
Xstatic char *_exec_iseq ANSI((char *, char *, char *, int));
Xstatic char *_exec_sort ANSI((char *));
Xstatic char *_exec_shell ANSI((char *, char *));
Xstatic char *_exec_assign ANSI((char *));
Xstatic int _mystrcmp ANSI((CONST PVOID, CONST PVOID));
X
X
XPUBLIC char *
XExec_function(buf)/*
X====================
X Execute the function given by the value of args.
X
X So far mktmp is the only valid function, anything else elicits and error
X message. It is my hope to support the GNU style functions in this portion
X of the code at some time in the future. */
Xchar *buf;
X{
X char *fname;
X char *args;
X char *mod1;
X char *mod2 = NIL(char);
X char *res = NIL(char);
X
X /* This must succeed since the presence of ' ', \t or \n is what
X * determines if this functions is called in the first place. */
X FREE(ScanToken(buf, &args, FALSE));
X fname = DmSubStr(buf, args);
X
X if( (mod1 = strchr(fname,',')) != NIL(char) ){
X *mod1 = '\0';
X mod1++;
X
X if( (mod2 = strchr(mod1,',')) != NIL(char) ){
X *mod2 = '\0';
X mod2++;
X }
X }
X
X switch( *fname ) {
X case 'a':
X if(strncmp(fname,"assign",6) == 0)
X res = _exec_assign(args);
X break;
X
X case 'e':
X if(strncmp(fname,"eq",2) == 0) res = _exec_iseq(mod1,mod2,args,TRUE);
X break;
X
X case 'm':
X if( strncmp(fname,"mktmp", 5) == 0 ) res = _exec_mktmp(mod1,mod2,args);
X break;
X
X case 'n':
X if( strncmp(fname,"null", 4) == 0 )
X res = _exec_iseq(mod1,NIL(char),args,TRUE);
X else if (strncmp(fname,"nil",3) == 0 )
X res = DmStrDup("");
X break;
X
X case '!':
X if(strncmp(fname,"!null",5) == 0)
X res = _exec_iseq(mod1,NIL(char),args,FALSE);
X if(strncmp(fname,"!eq",3) == 0) res = _exec_iseq(mod1,mod2,args,FALSE);
X break;
X
X case 's':
X if(strncmp(fname,"sort",4) == 0)
X res = _exec_sort(args);
X else if(strncmp(fname,"shell",5)==0)
X res = _exec_shell(args,mod1);
X else if(strncmp(fname,"strip",5)==0)
X res = Tokenize(Expand(args)," ",'t',TRUE);
X else if(strncmp(fname,"subst",5)==0)
X res = _exec_subst(mod1,mod2,args);
X break;
X
X default:
X Warning( "Function '%s' not implemented at this time", fname );
X }
X
X if( res == NIL(char) ) res = DmStrDup("");
X
X FREE(fname);
X return(res);
X}
X
X
Xstatic char *
X_exec_assign( macrostring )
Xchar *macrostring;
X{
X if ( !Parse_macro(macrostring, M_MULTI|M_FORCE) ) {
X Error( "Dynamic macro assignment failed, while making [%s]\n",
X Current_target ? Current_target->CE_NAME : "NIL");
X return(DmStrDup(""));
X }
X
X return(DmStrDup(LastMacName));
X}
X
X
Xstatic char *
X_exec_mktmp( file, text, data )
Xchar *file;
Xchar *text;
Xchar *data;
X{
X register char *p;
X char *tmpname;
X char *name;
X FILE *tmpfile = NIL(FILE);
X
X /* This is only a test of the recipe line so prevent the tempfile side
X * effects. */
X if( Suppress_temp_file ) return(NIL(char));
X
X name = Current_target ? Current_target->CE_NAME:"makefile text";
X
X if( file && *file ) {
X char *newtmp;
X
X /* This call to Get_temp sets TMPFILE for subsequent expansion of file.
X * DO NOT DELETE IT! */
X Get_temp( &newtmp, "", FALSE ); FREE(newtmp);
X tmpname = Expand(file);
X
X if( *tmpname ) {
X if( (tmpfile = fopen(tmpname, "w")) == NIL(FILE) )
X Open_temp_error( tmpname, name );
X
X Def_macro("TMPFILE", tmpname, M_EXPANDED|M_MULTI);
X Link_temp( Current_target, tmpfile, tmpname );
X }
X else
X FREE(tmpname);
X }
X
X if( !tmpfile )
X tmpfile = Start_temp( "", Current_target, &tmpname );
X
X if( !text || !*text ) text = tmpname;
X data = Expand(DmStrSpn(data, " \t\n"));
X
X for(p=strchr(data,'\n'); p; p=strchr(p,'\n')) {
X char *q = DmStrSpn(++p," \t");
X strcpy(p,q);
X }
X
X Append_line( data, FALSE, tmpfile, name, FALSE, TRUE );
X Close_temp( Current_target, tmpfile );
X FREE(data);
X
X return( Expand(text) );
X}
X
X
Xstatic char *
X_exec_iseq( lhs, rhs, data, eq )
Xchar *lhs;
Xchar *rhs;
Xchar *data;
Xint eq;
X{
X char *l = Expand(lhs);
X char *r = Expand(rhs);
X char *i = DmStrSpn(data, " \t\n");
X char *e = strchr(i, ' ');
X char *res = NIL(char);
X int val = strcmp(l,r);
X
X if( (!val && eq) || (val && !eq) ) {
X if( e != NIL(char) ) *e = '\0';
X res = Expand(i);
X }
X else if( e != NIL(char) ) {
X e = DmStrSpn(e," \t\n");
X if( *e ) res = Expand(e);
X }
X
X FREE(l);
X FREE(r);
X return(res);
X}
X
X
Xstatic char *
X_exec_sort( args )
Xchar *args;
X{
X char *res = NIL(char);
X char *data = Expand(args);
X char **tokens = NIL(char *);
X char *p;
X char *white = " \t\n";
X int j;
X int i = 0;
X
X for(i=0,p=DmStrSpn(data,white);*p;p=DmStrSpn(DmStrPbrk(p,white),white),i++);
X
X if( i != 0 ) {
X TALLOC(tokens, i, char *);
X
X for( i=0,p=DmStrSpn(data,white); *p; p=DmStrSpn(p,white),i++){
X tokens[i] = p;
X p = DmStrPbrk(p,white);
X if( *p ) *p++ = '\0';
X }
X
X qsort( tokens, i, sizeof(char *), _mystrcmp );
X
X for( j=0; j<i; j++ ) res = DmStrApp(res, tokens[j]);
X FREE(data);
X FREE(tokens);
X }
X
X return(res);
X}
X
X
Xstatic int
X_mystrcmp( p, q )
XCONST PVOID p;
XCONST PVOID q;
X{
X return(strcmp(*((CONST char **)p),*((CONST char **)q)));
X}
X
X
Xstatic char *
X_exec_subst( pat, subst, data )
Xchar *pat;
Xchar *subst;
Xchar *data;
X{
X char *res;
X
X pat = Expand(pat);
X subst = Expand(subst);
X res = Apply_edit( Expand(data), pat, subst, TRUE, FALSE );
X FREE(pat);
X FREE(subst);
X
X return(res);
X}
X
X
Xstatic char *
X_exec_shell( data, mod1 )
Xchar *data;
Xchar *mod1;
X{
X extern char *tempnam();
X static int nestlevel = 0;
X static int org_out;
X static int bsize;
X static char *buffer;
X static char *tmpnm;
X static FILE *tmp;
X
X int wait = Wait_for_completion;
X uint16 vflag = Verbose;
X int tflag = Trace;
X char *res = NIL(char);
X CELL cell;
X STRING rcp;
X HASH cname;
X
X if( Suppress_temp_file ) return(NIL(char));
X
X /* Set the temp CELL used for building prerequisite candidates to
X * all zero so that we don't have to keep initializing all the
X * fields. */
X {
X register char *s = (char *) &cell;
X register int n = sizeof(CELL);
X while( n ) { *s++ = '\0'; n--; }
X }
X rcp.st_string = DmStrSpn(data, " \t+-%@");
X rcp.st_attr = Rcp_attribute( data );
X rcp.st_next = NIL(STRING);
X cname.ht_name = "Shell escape";
X cell.ce_name = &cname;
X cell.ce_all.cl_prq = &cell;
X cell.ce_all.cl_next = NIL(LINK);
X cell.ce_all.cl_flag = 0;
X cell.ce_fname = cname.ht_name;
X cell.ce_recipe = &rcp;
X cell.ce_flag = F_TARGET|F_RULES;
X cell.ce_attr = A_PHONY|A_SILENT;
X
X if( nestlevel == 0 ) {
X tmpnm = tempnam(NIL(char),"mk");
X org_out = dup(1);
X
X if( (tmp = fopen(tmpnm, "w+")) == NIL(FILE) )
X Open_temp_error( tmpnm, cname.ht_name );
X
X close(1);
X dup( fileno(tmp) );
X
X bsize = (Buffer_size < BUFSIZ)?BUFSIZ:Buffer_size;
X buffer = MALLOC(bsize,char);
X }
X
X Wait_for_completion = TRUE;
X Verbose &= V_LEAVE_TMP;
X Trace = FALSE;
X nestlevel++;
X Exec_commands( &cell );
X Unlink_temp_files( &cell );
X nestlevel--;
X Trace = tflag;
X Verbose = vflag;
X Wait_for_completion = wait;
X
X /* Now we have to read the temporary file, get the tokens and return them
X * as a string. */
X rewind(tmp);
X while( fgets(buffer, bsize, tmp) ) {
X char *p = strchr(buffer, '\n');
X
X if( p == NIL(char) )
X res = DmStrJoin(res,buffer,-1,TRUE);
X else {
X *p = '\0';
X res = DmStrApp(res,buffer);
X }
X }
X
X fclose(tmp);
X if( nestlevel == 0 ) {
X Remove_file(tmpnm);
X close(1);
X dup(org_out);
X close(org_out);
X FREE(tmpnm);
X FREE(buffer);
X }
X else {
X if( (tmp = fopen(tmpnm, "w+")) == NIL(FILE) )
X Open_temp_error( tmpnm, cname.ht_name );
X
X close(1);
X dup( fileno(tmp) );
X }
X
X if ( mod1 ) {
X mod1 = Expand(res);
X FREE(res);
X res = mod1;
X }
X
X return(res);
X}
END_OF_FILE
if test 9537 -ne `wc -c <'dmake/function.c'`; then
echo shar: \"'dmake/function.c'\" unpacked with wrong size!
fi
# end of 'dmake/function.c'
fi
if test -f 'dmake/mac/directry.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/directry.c'\"
else
echo shar: Extracting \"'dmake/mac/directry.c'\" \(8209 characters\)
sed "s/^X//" >'dmake/mac/directry.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/directry.c,v 1.1 1994/10/06 17:42:57 dvadura Exp $
X-- SYNOPSIS -- Fake directory and file functions for the Mac
X--
X-- DESCRIPTION
X-- This file contains implementations for some ANSI standard routines dmake
X-- uses which are not otherwise available for the mac.
X--
X-- Assume we are using at least 128K ROMS.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: directry.c,v $
X * Revision 1.1 1994/10/06 17:42:57 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <Errors.h>
X#include <Files.h>
X#include <OSUtils.h>
X#include <StdLib.h>
X#include <Strings.h>
X#include <SysEqu.h>
X#include "extern.h"
X
X
X
X/*
X * Implementation of stat function for dmake on the mac.
X *
X * Many fields aren't filled in, and the times are seconds from 1/1//1904,
X * but it should be enough for dmake (I think we only need st_mtime and
X * st_mode's S_IFDIR set correctly).
X */
XPUBLIC int
Xstat(pPath, pStat)
Xchar *pPath;
Xstruct stat *pStat;
X{
X CInfoPBRec infoPB;
X OSErr err;
X int retVal;
X
X pPath = Unix2MacFName (pPath);
X
X infoPB.hFileInfo.ioCompletion = NULL;
X infoPB.hFileInfo.ioNamePtr = c2pstr (pPath);
X infoPB.hFileInfo.ioVRefNum = 0;
X infoPB.hFileInfo.ioFDirIndex = 0;
X infoPB.hFileInfo.ioDirID = 0;
X err = PBGetCatInfo(&infoPB, FALSE);
X p2cstr ((StringPtr) pPath);
X
X if (err == noErr) {
X pStat->st_mtime = (time_t) infoPB.hFileInfo.ioFlMdDat;
X pStat->st_ctime = (time_t) infoPB.hFileInfo.ioFlCrDat;
X pStat->st_mode = S_IREAD | S_IEXEC;
X
X /* If it is a directory ... */
X if (infoPB.hFileInfo.ioFlAttrib & 0x10) {
X pStat->st_size = infoPB.dirInfo.ioDrNmFls;
X pStat->st_mode |= S_IFDIR;
X } else {
X pStat->st_size = infoPB.hFileInfo.ioFlLgLen;
X pStat->st_mode |= S_IFREG;
X } /* if ... else */
X
X /* If it is writeable */
X if ((infoPB.hFileInfo.ioFlAttrib & 0x1) == 0) {
X pStat->st_mode |= S_IWRITE;
X } /* if */
X
X retVal = 0;
X
X } else {
X retVal = -1;
X } /* if ... else */
X
X return (retVal);
X} /* PUBLIC int stat () */
X
X
X
X/*
X * Return the current working directory, or NULL if there is an error.
X */
XPUBLIC char *
Xgetcwd(char *pPath, size_t pathSize)
X{
X DirInfo dirInfo;
X OSErr err;
X Str255 dirName;
X char *pBeginName;
X char *pC;
X size_t len;
X size_t spaceForColon;
X
X pPath = Unix2MacFName (pPath);
X
X /* Set up the info for the PBGetCatInfo() calls */
X dirInfo.ioCompletion = NULL;
X dirInfo.ioNamePtr = dirName;
X dirInfo.ioVRefNum = 0;
X dirInfo.ioFDirIndex = -1;
X dirInfo.ioDrDirID = 0;
X pBeginName = pPath + pathSize - 1;
X spaceForColon = 0; /* Make sure we don't have an end colon on the name */
X
X /*
X * Keep going up the directory path until the end is reached or an error
X * occurs. Ideally, we would check for errors at every level and stop
X * when we received an fnfErr (File Not Found), but it appears that there
X * are some problems with network volumes. (During testing, I received
X * a paramErr (No Default Volume) beyond the top level.) Thus, to keep it
X * simple, I assume any error past the first directory indicates we have
X * seen all directories.
X */
X while (TRUE) {
X err = PBGetCatInfo ((CInfoPBPtr) &dirInfo, FALSE);
X len = ((size_t)(unsigned char) dirName[0]);
X if ((err == noErr) && (len < pBeginName - pPath)) {
X p2cstr (dirName);
X pBeginName -= len + spaceForColon;
X strcpy (pBeginName, dirName);
X /* Note that strcpy() adds the '\0' at the end of
X the first directory for us */
X if (spaceForColon == 1) {
X pBeginName[len] = ':';
X } else {
X /* The end of the string shouldn't have a ':' */
X spaceForColon = 1;
X } /* if */
X
X /* Set up for the next call to PBGetCatInfo() with
X the parent's directory ID */
X dirInfo.ioDrDirID = dirInfo.ioDrParID;
X
X } else if (spaceForColon == 1) {
X /* We got past the top-level directory */
X break;
X
X } else {
X /* We either have an error when looking at the first directory
X or have run out of room. */
X return (NULL);
X } /* if ... elses */
X } /* while */
X
X /* Now copy the directory string to the beginning of the path string.
X (It's possible the directory already starts at the beginning of the
X string, but this is unlikely and doesn't hurt anything if it does,
X so we don't bother to check for it.) */
X pC = pPath;
X while ((*(pC++) = *(pBeginName++)) != '\0')
X ;
X
X return (pPath);
X} /* PUBLIC char *getcwd () */
X
X
X
X/*
X * Change the directory to a new default directory.
X *
X * Return 0 if successful, or -1 if there is an error.
X */
XPUBLIC int
Xchdir(char *pPath)
X{
X WDPBRec WDPB;
X VolumeParam vParam;
X OSErr err;
X int result;
X char *pC;
X char c;
X
X pPath = Unix2MacFName (pPath);
X
X /* Set up the directory */
X c2pstr (pPath);
X WDPB.ioCompletion = NULL;
X WDPB.ioNamePtr = pPath;
X WDPB.ioVRefNum = 0;
X WDPB.ioWDProcID = 0;
X WDPB.ioWDDirID = 0;
X err = PBOpenWD (&WDPB, FALSE);
X /* Restore path to a C-type string in case the caller wants
X to use it after this call. */
X p2cstr (pPath);
X if (err != noErr) {
X return (-1);
X } /* if */
X
X /* Set up the volume if necessary */
X if (*pPath != ':') {
X for (pC = pPath + 1; (*pC != ':') && (*pC != '\0'); ++pC)
X ;
X c = *pC;
X *pC = '\0';
X vParam.ioCompletion = NULL;
X vParam.ioNamePtr = c2pstr (pPath);
X vParam.ioVRefNum = WDPB.ioVRefNum;
X err = PBSetVol ((ParmBlkPtr) &vParam, FALSE);
X p2cstr (pPath);
X *pC = c;
X result = ((err == noErr) ? 0 : -1);
X
X } else {
X result = 0;
X } /* if ... else */
X
X return (result);
X} /* PUBLIC int chdir () */
X
X
X
X/*
X * Change the modification time for the file to the current time.
X *
X * The normal version of utime can set the modification time to any
X * time, this function aborts the function if this is tried.
X *
X * We return 0 if the modification time was updated and -1 if there
X * was an error.
X */
XPUBLIC int
Xutime(char *pPath, time_t *pTimes)
X{
X CInfoPBRec infoPB;
X OSErr err;
X
X pPath = Unix2MacFName (pPath);
X
X if (pTimes != NULL) {
X Fatal ("SUBROUTINE SHORTCOMING: utime cannot take a utimbuf struct");
X } /* if */
X
X /* Get the old info */
X infoPB.hFileInfo.ioCompletion = NULL;
X infoPB.hFileInfo.ioNamePtr = c2pstr (pPath);
X infoPB.hFileInfo.ioVRefNum = 0;
X infoPB.hFileInfo.ioFDirIndex = 0;
X infoPB.hFileInfo.ioDirID = 0;
X err = PBGetCatInfo (&infoPB, FALSE);
X if (err != noErr) {
X p2cstr ((StringPtr) pPath);
X return (-1);
X } /* if */
X
X /* Change the modification time and set the new info */
X GetDateTime (&(infoPB.hFileInfo.ioFlMdDat));
X infoPB.hFileInfo.ioDirID = 0;
X err = PBSetCatInfo (&infoPB, FALSE);
X p2cstr ((StringPtr) pPath);
X return ((err == noErr) ? 0 : -1);
X} /* PUBLIC int utime () */
END_OF_FILE
if test 8209 -ne `wc -c <'dmake/mac/directry.c'`; then
echo shar: \"'dmake/mac/directry.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/directry.c'
fi
if test -f 'dmake/os2/runargv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/runargv.c'\"
else
echo shar: Extracting \"'dmake/os2/runargv.c'\" \(7789 characters\)
sed "s/^X//" >'dmake/os2/runargv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/os2/RCS/runargv.c,v 1.1 1994/10/06 17:42:41 dvadura Exp $
X-- SYNOPSIS -- invoke a sub process, modified unix/runargv.c for OS/2.
X--
X-- DESCRIPTION
X-- Use the standard methods of executing a sub process.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: runargv.c,v $
X * Revision 1.1 1994/10/06 17:42:41 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#define INCL_DOSPROCESS
X#include <os2.h>
X
X#include <process.h>
X#include <stdlib.h>
X#include <signal.h>
X#include "extern.h"
X#include "sysintf.h"
X
Xtypedef struct prp {
X char *prp_cmd;
X int prp_group;
X int prp_ignore;
X int prp_last;
X int prp_shell;
X struct prp *prp_next;
X} RCP, *RCPPTR;
X
Xtypedef struct pr {
X int pr_valid;
X int pr_pid;
X CELLPTR pr_target;
X int pr_ignore;
X int pr_last;
X RCPPTR pr_recipe;
X RCPPTR pr_recipe_end;
X char *pr_dir;
X} PR;
X
Xstatic PR *_procs = NIL(PR);
Xstatic int _proc_cnt = 0;
Xstatic int _abort_flg= FALSE;
Xstatic int _use_i = -1;
Xstatic int _do_upd = 0;
X
Xextern unsigned int _far _pascal DosSmSetTitle(char _far *s);
Xstatic void SetSessionTitle (char *s);
Xstatic void _add_child ANSI((int, CELLPTR, int, int));
Xstatic void _attach_cmd ANSI((char *, int, int, CELLPTR, int, int));
Xstatic void _finished_child ANSI((int, int));
Xstatic int _running ANSI((CELLPTR));
X
XPUBLIC int
Xrunargv(target, ignore, group, last, shell, cmd)
XCELLPTR target;
Xint ignore;
Xint group;
Xint last;
Xint shell;
Xchar *cmd;
X{
X int pid;
X char **argv;
X
X if( _running(target) /*&& Max_proc != 1*/ ) {
X /* The command will be executed when the previous recipe
X * line completes. */
X _attach_cmd( cmd, group, ignore, target, last, shell );
X return(1);
X }
X
X while( _proc_cnt == Max_proc )
X if( Wait_for_child(FALSE, -1) == -1 ) Fatal( "Lost a child" );
X
X#ifdef SESSTITLE
X SetSessionTitle(target->CE_NAME);
X#endif
X argv = Pack_argv( group, shell, cmd );
X
X if((pid=spawnvp((_osmode == DOS_MODE)?P_WAIT:P_NOWAIT,argv[0],argv)) == -1){
X Error("%s: %s", argv[0], sys_errlist[errno]);
X Handle_result(-1, ignore, _abort_flg, target);
X return(-1);
X }
X else if( _osmode == DOS_MODE ) {
X _add_child(4711, target, ignore, last);
X _finished_child(4711, pid);
X }
X else
X _add_child(pid, target, ignore, last);
X
X return(1);
X}
X
X
X#ifdef SESSTITLE
X/* N.B. The system call used below is undocumented and therefore possibly
X * subject to change. It sets the session title even from a full screen
X * session, so you can see which target is being built.
X * If dubious about undocumented calls simply remove it.
X */
XPUBLIC void
XSetSessionTitle(char *s)
X{
X char buff[128];
X strncpy(buff, Pname, sizeof(buff));
X buff[sizeof(buff)-1] = 0;
X strncat(buff, " - ", sizeof(buff));
X strncat(buff, s, sizeof(buff));
X buff[sizeof(buff)-1] = 0;
X DosSmSetTitle(buff);
X}
X#endif
X
X
XPUBLIC int
XWait_for_child( abort_flg, pid )
Xint abort_flg;
Xint pid;
X{
X int wid;
X int status;
X int waitchild;
X
X if( _osmode == DOS_MODE ) return(1);
X
X waitchild = (pid == -1)? FALSE : Wait_for_completion;
X
X do {
X if( (wid = wait(&status)) == -1 ) return(-1);
X
X _abort_flg = abort_flg;
X _finished_child(wid, status);
X _abort_flg = FALSE;
X }
X while( waitchild && pid != wid );
X
X return(0);
X}
X
X
XPUBLIC void
XClean_up_processes()
X{
X register int i;
X
X if( _osmode == DOS_MODE ) {
X _abort_flg = TRUE;
X _finished_child(4711, -1);
X return;
X }
X
X if( _procs != NIL(PR) ) {
X for( i=0; i<Max_proc; i++ )
X if( _procs[i].pr_valid )
X DosKillProcess(DKP_PROCESSTREE, _procs[i].pr_pid);
X
X while( Wait_for_child(TRUE, -1) != -1 );
X }
X}
X
X
Xstatic void
X_add_child( pid, target, ignore, last )
Xint pid;
XCELLPTR target;
Xint ignore;
Xint last;
X{
X register int i;
X register PR *pp;
X
X if( _procs == NIL(PR) ) {
X TALLOC( _procs, Max_proc, PR );
X }
X
X if( (i = _use_i) == -1 )
X for( i=0; i<Max_proc; i++ )
X if( !_procs[i].pr_valid )
X break;
X
X pp = _procs+i;
X
X pp->pr_valid = 1;
X pp->pr_pid = pid;
X pp->pr_target = target;
X pp->pr_ignore = ignore;
X pp->pr_last = last;
X pp->pr_dir = DmStrDup(Get_current_dir());
X
X Current_target = NIL(CELL);
X
X _proc_cnt++;
X
X if( Wait_for_completion ) Wait_for_child( FALSE, pid );
X}
X
X
Xstatic void
X_finished_child(pid, status)
Xint pid;
Xint status;
X{
X register int i;
X register PR *pp;
X char *dir;
X
X for( i=0; i<Max_proc; i++ )
X if( _procs[i].pr_valid && _procs[i].pr_pid == pid )
X break;
X
X /* Some children we didn't make esp true if using /bin/sh to execute a
X * a pipe and feed the output as a makefile into dmake. */
X if( i == Max_proc ) return;
X _procs[i].pr_valid = 0;
X _proc_cnt--;
X dir = DmStrDup(Get_current_dir());
X Set_dir( _procs[i].pr_dir );
X
X if( _procs[i].pr_recipe != NIL(RCP) && !_abort_flg ) {
X RCPPTR rp = _procs[i].pr_recipe;
X
X
X Current_target = _procs[i].pr_target;
X Handle_result( status, _procs[i].pr_ignore, FALSE, _procs[i].pr_target );
X Current_target = NIL(CELL);
X
X if ( _procs[i].pr_target->ce_attr & A_ERROR ) {
X Unlink_temp_files( _procs[i].pr_target );
X _procs[i].pr_last = TRUE;
X goto ABORT_REMAINDER_OF_RECIPE;
X }
X
X _procs[i].pr_recipe = rp->prp_next;
X
X _use_i = i;
X runargv( _procs[i].pr_target, rp->prp_ignore, rp->prp_group,
X rp->prp_last, rp->prp_shell, rp->prp_cmd );
X _use_i = -1;
X
X FREE( rp->prp_cmd );
X FREE( rp );
X
X if( _proc_cnt == Max_proc ) Wait_for_child( FALSE, -1 );
X }
X else {
X Unlink_temp_files( _procs[i].pr_target );
X Handle_result(status,_procs[i].pr_ignore,_abort_flg,_procs[i].pr_target);
X
X ABORT_REMAINDER_OF_RECIPE:
X if( _procs[i].pr_last ) {
X FREE(_procs[i].pr_dir );
X
X if( !Doing_bang ) Update_time_stamp( _procs[i].pr_target );
X }
X }
X
X Set_dir(dir);
X FREE(dir);
X}
X
X
Xstatic int
X_running( cp )
XCELLPTR cp;
X{
X register int i;
X
X if( !_procs ) return(FALSE);
X
X for( i=0; i<Max_proc; i++ )
X if( _procs[i].pr_valid &&
X _procs[i].pr_target == cp )
X break;
X
X return( i != Max_proc );
X}
X
X
Xstatic void
X_attach_cmd( cmd, group, ignore, cp, last, shell )
Xchar *cmd;
Xint group;
Xint ignore;
XCELLPTR cp;
Xint last;
Xint shell;
X{
X register int i;
X RCPPTR rp;
X
X for( i=0; i<Max_proc; i++ )
X if( _procs[i].pr_valid &&
X _procs[i].pr_target == cp )
X break;
X
X TALLOC( rp, 1, RCP );
X rp->prp_cmd = DmStrDup(cmd);
X rp->prp_group = group;
X rp->prp_ignore= ignore;
X rp->prp_last = last;
X rp->prp_shell = shell;
X
X if( _procs[i].pr_recipe == NIL(RCP) )
X _procs[i].pr_recipe = _procs[i].pr_recipe_end = rp;
X else {
X _procs[i].pr_recipe_end->prp_next = rp;
X _procs[i].pr_recipe_end = rp;
X }
X}
END_OF_FILE
if test 7789 -ne `wc -c <'dmake/os2/runargv.c'`; then
echo shar: \"'dmake/os2/runargv.c'\" unpacked with wrong size!
fi
# end of 'dmake/os2/runargv.c'
fi
if test -f 'dmake/stat.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/stat.c'\"
else
echo shar: Extracting \"'dmake/stat.c'\" \(8111 characters\)
sed "s/^X//" >'dmake/stat.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/stat.c,v 1.1 1994/10/06 17:42:01 dvadura Exp $
X-- SYNOPSIS -- bind a target name to a file.
X--
X-- DESCRIPTION
X-- This file contains the code to go and stat a target. The stat rules
X-- follow a predefined order defined in the comment for Stat_target.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: stat.c,v $
X * Revision 1.1 1994/10/06 17:42:01 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X
Xstatic int _check_dir_list ANSI((CELLPTR, CELLPTR, int, int));
X
X#ifdef DBUG
X /* Just a little ditty for debugging this thing */
X static time_t
X _do_stat( name, lib, sym, force )
X char *name;
X char *lib;
X char **sym;
X int force;
X {
X time_t res;
X DB_ENTER( "_do_stat" );
X
X res = Do_stat(name, lib, sym, force);
X DB_PRINT( "stat", ("Statted [%s,%s,%d,%ld]", name, lib, sym, res) );
X
X DB_RETURN( res );
X }
X#define DO_STAT(A,B,C,D) _do_stat(A,B,C,D)
X#else
X#define DO_STAT(A,B,C,D) Do_stat(A,B,C,D)
X#endif
X
Xstatic char *_first; /* local storage of first attempted path */
X
XPUBLIC void
XStat_target( cp, setfname, force )/*
X====================================
X Stat a target. When doing so follow the following rules, suppose
X that cp->CE_NAME points at a target called fred.o:
X
X 0. If A_SYMBOL attribute set look into the library
X then do the steps 1 thru 4 on the resulting name.
X 1. Try path's obtained by prepending any dirs found as
X prerequisites for .SOURCE.o.
X 2. If not found, do same as 2 but use .SOURCE
X 3. If not found and .LIBRARYM attribute for the target is
X set then look for it in the corresponding library.
X 4. If found in step 0 thru 3, then ce_fname points at
X file name associate with target, else ce_fname points
X at a file name built by the first .SOURCE* dir that
X applied. */
X
XCELLPTR cp;
Xint setfname;
Xint force;
X{
X register HASHPTR hp;
X static HASHPTR srchp = NIL(HASH);
X char *name;
X char *tmp;
X int res = 0;
X
X DB_ENTER( "Stat_target" );
X
X name = cp->CE_NAME;
X if( srchp == NIL(HASH) ) srchp = Get_name(".SOURCE",Defs,FALSE);
X
X /* Look for a symbol of the form lib((symbol)) the name of the symbol
X * as entered in the hash table is (symbol) so pull out symbol and try
X * to find it's module. If successful DO_STAT will return the module
X * as well as the archive member name (pointed at by tmp). We then
X * replace the symbol name with the archive member name so that we
X * have the proper name for any future refrences. */
X
X if( cp->ce_attr & A_SYMBOL ) {
X DB_PRINT( "stat", ("Binding lib symbol [%s]", name) );
X
X cp->ce_time = DO_STAT( name, cp->ce_lib, &tmp, force );
X
X if( cp->ce_time != (time_t) 0L ) {
X /* stat the new member name below note tmp must point at a string
X * returned by MALLOC... ie. the Do_stat code should use DmStrDup */
X
X if( Verbose & V_MAKE )
X printf( "%s: Mapped ((%s)) to %s(%s)\n", Pname,
X name, cp->ce_lib, tmp );
X
X FREE( name );
X name = cp->CE_NAME = tmp;
X cp->ce_attr &= ~(A_FFNAME | A_SYMBOL);
X }
X else
X { DB_VOID_RETURN; }
X }
X
X _first = NIL(char);
X tmp = DmStrJoin( ".SOURCE", Get_suffix(name), -1, FALSE);
X
X /* Check .SOURCE.xxx target */
X if( (hp = Get_name(tmp, Defs, FALSE)) != NIL(HASH) )
X res = _check_dir_list( cp, hp->CP_OWNR, setfname, force );
X
X /* Check just .SOURCE */
X if( !res && (srchp != NIL(HASH)) )
X res = _check_dir_list( cp, srchp->CP_OWNR, setfname, force );
X
X /* If libmember and we haven't found it check the library */
X if( !res && (cp->ce_attr & A_LIBRARYM) ) {
X cp->ce_time = DO_STAT(name, cp->ce_lib, NIL(char *), force);
X
X if( !cp->ce_time && Tmd && *Tmd && cp->ce_lib ) {
X char *tmplib;
X tmplib=DmStrDup(Build_path(Tmd,cp->ce_lib));
X
X if ((cp->ce_time = DO_STAT(name, tmplib, NIL(char *),force)) != (time_t)0L){
X cp->ce_lib=DmStrDup(tmplib);
X }
X }
X
X if( Verbose & V_MAKE )
X printf( "%s: Checking library '%s' for member [%s], time %ld\n",
X Pname, cp->ce_lib, name, cp->ce_time );
X }
X
X FREE( tmp );
X
X if( setfname == 1 || (setfname == -1 && cp->ce_time != (time_t)0L) ) {
X int setlib = (cp->ce_lib == cp->ce_fname);
X
X if( (cp->ce_attr & A_FFNAME) && (cp->ce_fname != NIL(char)) )
X FREE( cp->ce_fname );
X
X if( _first != NIL(char) ) {
X cp->ce_fname = _first;
X cp->ce_attr |= A_FFNAME;
X }
X else {
X cp->ce_fname = cp->CE_NAME;
X cp->ce_attr &= ~A_FFNAME;
X }
X
X if ( setlib ) cp->ce_lib = cp->ce_fname;
X }
X else if( _first )
X FREE( _first );
X
X /* set it as stated only if successful, this way, we shall try again
X * later. */
X if( cp->ce_time != (time_t)0L ) {
X cp->ce_flag |= F_STAT;
X
X /* If it is a whatif this changed scenario then return the current
X * time, but do so only if the stat was successful. */
X if ( (cp->ce_attr & A_WHATIF) && !(cp->ce_flag & F_MADE) ) {
X cp->ce_time = Do_time();
X }
X }
X
X DB_VOID_RETURN;
X}
X
X
X
Xstatic int
X_check_dir_list( cp, sp, setfname, force )/*
X============================================
X Check the list of dir's given by the prerequisite list of sp, for a
X file pointed at by cp. Returns 0 if path not bound, else returns
X 1 and replaces old name for cell with new cell name. */
X
XCELLPTR cp;
XCELLPTR sp;
Xint setfname;
Xint force;
X{
X register LINKPTR lp;
X char *dir;
X char *path;
X char *name;
X int res = 0;
X int fset = 0;
X
X DB_ENTER( "_check_dir_list" );
X DB_PRINT( "mem", ("%s:-> mem %ld", cp->CE_NAME, (long) coreleft()) );
X
X if( sp->ce_prq != NIL(LINK) ) /* check prerequisites if any */
X {
X /* Use the real name instead of basename, this prevents silly
X * loops in inference code, and is consistent with man page */
X name = cp->CE_NAME;
X
X /* Here we loop through each directory on the list, and try to stat
X * the target. We always save the first pathname we try to stat in
X * _first. If we subsequently get a match we then replace the value of
X * _first by the matched path name. */
X
X for( lp=sp->CE_PRQ; lp != NIL(LINK) && !res; lp=lp->cl_next ) {
X int nodup = 0;
X dir = lp->cl_prq->CE_NAME;
X
X if( strchr( dir, '$' ) ) dir = Expand(dir);
X if( strcmp( dir, ".NULL" ) == 0 ) {
X nodup = 1;
X path = cp->CE_NAME;
X }
X else {
X path = DmStrDup(Build_path(dir,name));
X }
X
X res = ((cp->ce_time=DO_STAT(path,NIL(char),NIL(char *),force))!=(time_t)0L);
X
X /* Have to use DmStrDup to set _first since Build_path, builds it's
X * path names inside a static buffer. */
X if( setfname )
X if( (_first == NIL(char) && !fset) || res ) {
X if( _first != NIL(char) ) FREE( _first );
X if (nodup)
X _first = NIL(char);
X else {
X _first = path;
X path = NIL(char);
X }
X fset = 1;
X }
X
X DB_PRINT( "stat", ("_first [%s], path [%s]", _first, path) );
X if( dir != lp->cl_prq->CE_NAME ) FREE(dir);
X if( path && path != cp->CE_NAME ) FREE(path);
X }
X }
X
X DB_PRINT( "mem", ("%s:-< mem %ld", cp->CE_NAME, (long) coreleft()) );
X DB_RETURN( res );
X}
END_OF_FILE
if test 8111 -ne `wc -c <'dmake/stat.c'`; then
echo shar: \"'dmake/stat.c'\" unpacked with wrong size!
fi
# end of 'dmake/stat.c'
fi
echo shar: End of archive 13 \(of 27\).
cp /dev/null ark13isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/malloc/malloc.3 dmake/dbug/malloc/mlc_chk.c
# dmake/dmstring.c dmake/mac/environ.c dmake/percent.c
# dmake/qnx/runargv.c dmake/readme/install dmake/readme/msdos
# dmake/unix/runargv.c
# Wrapped by kent@sparky on Fri Oct 21 16:50:41 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 14 (of 27)."'
if test -f 'dmake/dbug/malloc/malloc.3' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/malloc.3'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/malloc.3'\" \(6935 characters\)
sed "s/^X//" >'dmake/dbug/malloc/malloc.3' <<'END_OF_FILE'
X.TH MALLOC 3 "" "" "1.0"
X.ds ]T
X.\"/*
X.\" * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X.\" * You may copy, distribute, and use this software as long as this
X.\" * copyright statement is not removed.
X.\" */
X.\" $Id: malloc.3,v 1.3 90/08/29 22:24:44 cpcahil Exp $
X.SH NAME
Xmalloc \t- debugging malloc library
X.SH SYNOPSIS
X.ft B
X.nf
X#include <malloc.h>
X
Xchar * calloc(nelem,elsize);
Xvoid free(ptr);
Xchar * malloc(size);
Xint malloc_chain_check(flag);
Xvoid malloc_dump(fd);
Xint mallopt(cmd,val)
Xchar * realloc(ptr,size);
X
Xint cmd,fd,flag;
Xunsigned elsize,nelem,size;
Xchar * ptr;
Xunion malloptarg val;
X
X.fi
X.ft R
X.SH DESCRIPTION
XThis malloc library is a replacement for the standard library to be used
Xduring software development/debugging. See the standard malloc(3) pages
Xfor more information on the use of the following functions:
X.nf
X.in +.5i
Xcalloc(), free(), malloc(), realloc()
X.in -.5i
X.fi
X.sp
XThis library differs from the standard malloc library in the
Xfollowing ways:
X.P
X1. Each malloc segment contains a magic number so that free can
Xverify that the pointer passed points to a valid malloc segment.
X.P
X2. Each malloc segment is filled with a non-zero pattern so that code that
Xdepends upon malloc segments being null will fail.
X.P
X3. The size of each segment will be at least 1 byte larger than requested
Xand the extra bytes will be filled with a non-zero pattern. When free is
Xcalled, it will verify that you did not go beyond the number of bytes
Xyou asked for.
X.P
X4. When a segment is freed, it will be filled with a different non-zero pattern
Xto ensure that the program doesn't depend upon the use of already freed data.
X.P
X5. Whenever any of the string or memory functions (str*, b*, mem*) are
Xcalled with a pointer that is within the malloc arena, the operation is
Xchecked to verify that it does not overrun the malloced segment. A failure
Xof this check is considered a "warning level error" (described later) and
Xis handled accordingly.
X.P
X7. Run time checking can include verification of the malloc chain at each
Xand every call to one of the malloc functions or manually by calling the
Xmalloc_chain_check function.
X.P
X6. When a problem is found, the action taken is specified at runtime by
Xenvironment variables or at compile time by the use of the mallopt()
Xfunction.
X.P
XThere are two arbitrary levels of errors, warning and fatal, that this
Xlibrary will detect. They are broken down as follows:
X.P
X.nf
X.in +.25i
XWarning messages include:
X.sp
X.in +.5i
X.ti -.25i
XCalling free with a bad pointer
X.br
X.ti -.25i
XCalling a bstring/string/memory (3) function which will go beyond
Xthe end of a malloc block. Note that the library function is
Xnot modified to refuse the operation.
X.sp
X.in -.5i
XFatal errors are:
X.in +.5i
X.ti -.25i
XDetectable corruption to the malloc chain.
X.in -.5i
X.in -.25i
X.P
XThe error handling for each level (warning or fatal) are specified using
Xenvironment variables or mallopt(). The coding for the error handling is
Xas follows:
X.sp
X.nf
X.in +.5i
X.ti -.25i
X 0 - continue operations
X.ti -.25i
X 1 - drop core and exit
X.ti -.25i
X 2 - just exit
X.ti -.25i
X 3 - drop core, but continue executing. Core files will
Xbe placed into core.[PID].[counter] i.e: core.00123.001
X.ti -.25i
X128 - dump malloc chain and continue
X.ti -.25i
X129 - dump malloc chain, dump core, and exit
X.ti -.25i
X130 - dump malloc chain, exit
X.ti -.25i
X131 - dump malloc chain, dump core, continue processing
X.in -.5i
X.P
XIn addition error messages can be placed into an error file.
X.P
X\fBmalloc_opt\fP() is used to set the malloc debugging options. The
Xfollowing options can be set:
X.br
X.sp
X.in +.5i
XMALLOC_WARN - set the error handling for warning level errors. \fBval.i\fP is
Xan integer that can contain any one of the following values:
X.sp
X.in +.5i
XM_HANDLE_IGNORE - ignore error
X.br
XM_HANDLE_ABORT - drop core and exit
X.br
XM_HANDLE_EXIT - just exit (no core drop)
X.br
XM_HANDLE_CORE - drop core, but keep on going
X.br
X.in -.5i
X.sp
XIn addition, M_HANDLE_DUMP may be or'd in to cause a dump of the current
Xmalloc chain.
X.br
X.sp
XMALLOC_FATAL - set the error handling for fatal level errors. \fBval.i\fP is
Xequivalent to \fBval.i\fP for MALLOC_WARN.
X.br
X.sp
XMALLOC_ERRFILE - set the destination for malloc error messages. \fBval.str\fP
Xis a pointer to a character string containing the name of the file to be used
Xfor error messages.
X.br
X.sp
XMALLOC_CKCHAIN - set the malloc chain checking flag. If \fBval.i\fP is
Xnon-zero, chain checking at every call to malloc is turned on.
X.br
X.sp
XFor example, to set up the session to generate a core file for
Xevery malloc warning, to drop core and exit on a malloc fatal, and
Xto log all messages to the file "malloc_log" do the following:
X.sp
X.nf
X.in +.5i
X#include <malloc.h>
Xmalloc_opt(MALLOC_WARN,131);
Xmalloc_opt(MALLOC_FATAL,1);
Xmalloc_opt(MALLOC_ERRFILE,"malloc_log");
X.in -.5i
X.fi
X.in -.5i
X.sp
X\fBmalloc_opt\fP() can be used to set/alter the debugging options at any
Xtime.
X.P
X\fBmalloc_dump\fP() will dump a table of the malloc arena showing all
Xallocated/freed segments and the first few bytes of data in each segment.
X\fBfd\fP is the file descriptor to write the data to.
X.P
X\fBmalloc_chain_check\fP() will check the status of the malloc arena.
XIf \fBflag\fP is non-zero, an error found in the chain will cause a
Xfatal error. \fBmalloc_chain_check\fP() returns zero when there are no
Xproblems found in the malloc chain, non-zero otherwise.
X.SH "ENVIRONMENT VARIABLES"
XEnvironment variables can be used to control error handling, error logging
Xand malloc chain checking at run time. The following environment variables
Xare used:
X.P
XMALLOC_WARN - specifies the error handling for warning errors
X.br
XMALLOC_FATAL - specifies the error handling for fatal errors
X.br
XMALLOC_ERRFILE - specifies the error log file for error messages.
X.br
XMALLOC_CKCHAIN - if 1, turns on malloc chain checking at every call to any
Xof the malloc functions.
X.P
XFor example, to set up the session to generate a core file for
Xevery malloc warning, to drop core and exit on a malloc fatal, and
Xto log all messages to the file "malloc_log" do the following:
X.sp
X.nf
X.in +.5i
XMALLOC_WARN=131
XMALLOC_FATAL=1
XMALLOC_ERRFILE=malloc_log
X
Xexport MALLOC_WARN MALLOC_FATAL MALLOC_ERRFILE
X.in -.5i
X.fi
X.SH WARNINGS
XThis malloc library and it's associated string and memory functions are
Xmuch less efficient than the standard functions due in part to the extra
Xerror checking. You do not want to use this library when generating a
Xproduction (i.e. releasable) version of your software. It should only
Xbe used during development and testing.
X.SH SEE ALSO
Xstat(2)
X.SH AUTHOR
XConor P. Cahill
XVirtual Technologies Incorporated
X.sp
Xuunet!virtech!cpcahil
END_OF_FILE
if test 6935 -ne `wc -c <'dmake/dbug/malloc/malloc.3'`; then
echo shar: \"'dmake/dbug/malloc/malloc.3'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/malloc/malloc.3'
# end of 'dmake/dbug/malloc/malloc.3'
fi
if test -f 'dmake/dbug/malloc/mlc_chk.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/mlc_chk.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/mlc_chk.c'\" \(6587 characters\)
sed "s/^X//" >'dmake/dbug/malloc/mlc_chk.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X
X#include <stdio.h>
X#include "malloc.h"
X#include "debug.h"
X
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: mlc_chk.c,v 1.1 1994/10/06 17:43:15 dvadura Exp $";
X#endif
X
Xextern struct mlist malloc_start;
Xextern struct mlist * malloc_end;
Xextern char * malloc_data_start;
Xextern char * malloc_data_end;
X
X/*
X * Function: malloc_in_arena()
X *
X * Purpose: to verify address is within malloc arena.
X *
X * Arguments: ptr - pointer to verify
X *
X * Returns: TRUE - if pointer is within malloc area
X * FALSE - otherwise
X *
X * Narrative:
X * IF pointer is >= malloc area start AND <= malloc area end
X * return TRUE
X * ELSE
X * return FALSE
X *
X * Mod History:
X * 90/01/24 cpcahil Initial revision.
X */
Xint
Xmalloc_in_arena(ptr)
X char * ptr;
X{
X extern char * malloc_data_start;
X extern char * malloc_data_end;
X int rtn = 0;
X
X if( ptr >= malloc_data_start && ptr <= malloc_data_end )
X {
X rtn = 1;
X }
X
X return(rtn);
X}
X
X/*
X * Function: malloc_check_str()
X *
X * Arguments: func - name of function calling this routine
X * str - pointer to area to check
X *
X * Purpose: to verify that if str is within the malloc arena, the data
X * it points to does not extend beyond the applicable region.
X *
X * Returns: Nothing of any use (function is void).
X *
X * Narrative:
X * IF pointer is within malloc arena
X * determin length of string
X * call malloc_verify() to verify data is withing applicable region
X * return
X *
X * Mod History:
X * 90/01/24 cpcahil Initial revision.
X * 90/01/29 cpcahil Added code to ignore recursive calls.
X */
Xvoid
Xmalloc_check_str(func,str)
X char * func;
X char * str;
X{
X static int layers;
X register char * s;
X
X if( (layers++ == 0) && malloc_in_arena(str) )
X {
X for( s=str; *s; s++)
X {
X }
X
X malloc_verify(func,str,s-str+1);
X }
X
X layers--;
X}
X
X/*
X * Function: malloc_check_strn()
X *
X * Arguments: func - name of function calling this routine
X * str - pointer to area to check
X * len - max length of string
X *
X * Purpose: to verify that if str is within the malloc arena, the data
X * it points to does not extend beyond the applicable region.
X *
X * Returns: Nothing of any use (function is void).
X *
X * Narrative:
X * IF pointer is within malloc arena
X * determin length of string
X * call malloc_verify() to verify data is withing applicable region
X * return
X *
X * Mod History:
X * 90/01/24 cpcahil Initial revision.
X * 90/01/29 cpcahil Added code to ignore recursive calls.
X * 90/08/29 cpcahil added length (for strn* functions)
X */
Xvoid
Xmalloc_check_strn(func,str,len)
X char * func;
X char * str;
X int len;
X{
X register int i;
X static int layers;
X register char * s;
X
X if( (layers++ == 0) && malloc_in_arena(str) )
X {
X for( s=str,i=0; (i < len) && *s; s++)
X {
X }
X
X malloc_verify(func,str,s-str+1);
X }
X
X layers--;
X}
X
X/*
X * Function: malloc_check_data()
X *
X * Arguments: func - name of function calling this routine
X * ptr - pointer to area to check
X * len - length to verify
X *
X * Purpose: to verify that if ptr is within the malloc arena, the data
X * it points to does not extend beyond the applicable region.
X *
X * Returns: Nothing of any use (function is void).
X *
X * Narrative:
X * IF pointer is within malloc arena
X * call malloc_verify() to verify data is withing applicable region
X * return
X *
X * Mod History:
X * 90/01/24 cpcahil Initial revision.
X * 90/01/29 cpcahil Added code to ignore recursive calls.
X */
Xvoid
Xmalloc_check_data(func,ptr,len)
X char * func;
X char * ptr;
X int len;
X{
X static int layers;
X
X if( layers++ == 0 )
X {
X DEBUG3(40,"malloc_check_data(%s,0x%x,%d) called...",
X func,ptr,len);
X if( malloc_in_arena(ptr) )
X {
X DEBUG0(10,"pointer in malloc arena, verifying...");
X malloc_verify(func,ptr,len);
X }
X }
X
X layers--;
X}
X
X/*
X * Function: malloc_verify()
X *
X * Arguments: func - name of function calling the malloc check routines
X * ptr - pointer to area to check
X * len - length to verify
X *
X * Purpose: to verify that the data ptr points to does not extend beyond
X * the applicable malloc region. This function is only called
X * if it has been determined that ptr points into the malloc arena.
X *
X * Returns: Nothing of any use (function is void).
X *
X * Narrative:
X *
X * Mod History:
X * 90/01/24 cpcahil Initial revision.
X */
Xvoid
Xmalloc_verify(func,ptr,len)
X char * func;
X char * ptr;
X int len;
X{
X extern struct mlist * malloc_end;
X extern int malloc_errno;
X extern struct mlist malloc_start;
X struct mlist * mptr;
X
X DEBUG3(40,"malloc_verify(%s,0x%x,%d) called...", func,ptr,len);
X /*
X * Find the malloc block that includes this pointer
X */
X mptr = &malloc_start;
X while( mptr &&
X ! (((char *)mptr < ptr) && ((mptr->data+mptr->s.size) > ptr) ) )
X {
X mptr = mptr->next;
X }
X
X /*
X * if ptr was not in a malloc block, it must be part of
X * some direct sbrk() stuff, so just return.
X */
X if( ! mptr )
X {
X DEBUG1(10,"ptr (0x%x) not found in malloc search", ptr);
X return;
X }
X
X /*
X * Now we have a valid malloc block that contains the indicated
X * pointer. We must verify that it is withing the requested block
X * size (as opposed to the real block size which is rounded up to
X * allow for correct alignment).
X */
X
X DEBUG4(60,"Checking 0x%x-0x%x, 0x%x-0x%x",
X ptr, ptr+len, mptr->data, mptr->data+mptr->r_size);
X
X if( (ptr < mptr->data) || ((ptr+len) > (mptr->data+mptr->r_size)) )
X {
X DEBUG4(0,"pointer not within region 0x%x-0x%x, 0x%x-0x%x",
X ptr, ptr+len, mptr->data, mptr->data+mptr->r_size);
X
X malloc_errno = M_CODE_OUTOF_BOUNDS;
X malloc_warning(func);
X }
X
X return;
X}
X
X/*
X * $Log: mlc_chk.c,v $
X * Revision 1.1 1994/10/06 17:43:15 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:24 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:09 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.5 90/08/29 22:23:48 cpcahil
X * added new function to check on strings up to a specified length
X * and used it within several strn* functions.
X *
X * Revision 1.4 90/05/11 00:13:09 cpcahil
X * added copyright statment
X *
X * Revision 1.3 90/02/24 21:50:22 cpcahil
X * lots of lint fixes
X *
X * Revision 1.2 90/02/24 17:29:38 cpcahil
X * changed $Header to $Id so full path wouldnt be included as part of rcs
X * id string
X *
X * Revision 1.1 90/02/24 14:57:03 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 6587 -ne `wc -c <'dmake/dbug/malloc/mlc_chk.c'`; then
echo shar: \"'dmake/dbug/malloc/mlc_chk.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/mlc_chk.c'
fi
if test -f 'dmake/dmstring.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dmstring.c'\"
else
echo shar: Extracting \"'dmake/dmstring.c'\" \(6749 characters\)
sed "s/^X//" >'dmake/dmstring.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/dmstring.c,v 1.1 1994/10/06 17:42:52 dvadura Exp $
X-- SYNOPSIS -- string handling code
X--
X-- DESCRIPTION
X-- Routines to handle string manipulation. This code is not specific
X-- to dmake and has/and will be used in other programs. The string
X-- "" is considered the NULL string, if NIL(char) is received instead
X-- undefined results may occurr. (In reality NIL(char) is checked for
X-- but in general it is not safe to assume NIL(char) == NULL)
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dmstring.c,v $
X * Revision 1.1 1994/10/06 17:42:52 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC char *
XDmStrJoin( src, data, n, fr )/*
X===============================
X Join data to src according to value of n.
X
X n = -1 - return strcat( src, data )
X n >= 0 - return strncat( src, data, n )
X
X FREE original src if fr == TRUE, else leave it alone */
X
Xchar *src;
Xchar *data;
Xint n;
Xint fr;
X{
X char *t;
X int l;
X int flag = FALSE;
X
X DB_ENTER( "DmStrJoin" );
X
X if( src == NIL(char) ) { src = ""; flag = TRUE; }
X if( data == NIL(char) ) data = "";
X DB_PRINT( "str", ("Joining [%s] [%s] %d", src, data, n) );
X
X if( n == -1 ) n = strlen( data );
X
X l = strlen( src ) + n + 1;
X if( (t = MALLOC( l, char )) == NIL(char) ) No_ram();
X
X strcpy( t, src );
X if (n) strncat( t, data, n );
X t[ l-1 ] = '\0';
X
X if( !flag && fr ) FREE( src );
X
X DB_PRINT( "str", ("Result [%s]", t) );
X DB_RETURN( t );
X}
X
X
X
X
XPUBLIC char *
XDmStrAdd( src, data, fr )/*
X===========================
X append data to src with space in between if src is not NIL(char) or ""
X and free both src and data if fr == TRUE, otherwise leave them be */
X
Xchar *src;
Xchar *data;
Xint fr;
X{
X char *t;
X int l;
X int sflag;
X int dflag;
X
X DB_ENTER( "DmStrAdd" );
X
X sflag = dflag = fr;
X
X if( src == NIL(char) ) { src = ""; sflag = FALSE; }
X if( data == NIL(char) ) { data = ""; dflag = FALSE; }
X DB_PRINT( "str", ("Adding [%s] [%s] %d", src, data, fr) );
X
X l = strlen(src) + strlen(data) + 1;
X if( *src ) l++;
X
X if( (t = MALLOC( l, char )) == NIL(char) ) No_ram();
X
X strcpy( t, src );
X
X if( *data )
X {
X if( *src ) strcat( t, " " );
X strcat( t, data );
X }
X
X if( sflag ) FREE( src );
X if( dflag ) FREE( data );
X
X DB_PRINT( "str", ("Result [%s]", t) );
X DB_RETURN( t );
X}
X
X
X
XPUBLIC char *
XDmStrApp( src1, src2 )/*
X========================
X Append two strings together, and return the result with a space between
X the two strings. FREE the first string if it is not NIL and always
X leave the second string be. */
Xchar *src1;
Xchar *src2;
X{
X src2 = DmStrAdd( src1, src2, FALSE );
X if( src1 != NIL(char) ) FREE( src1 );
X return( src2 );
X}
X
X
XPUBLIC char *
XDmStrDup( str )/*
X================= Duplicate the contents of a string, by using malloc */
Xchar *str;
X{
X char *t;
X
X if( str == NIL(char) ) return( NIL(char) );
X
X if( (t = MALLOC( strlen( str )+1, char )) == NIL(char) ) No_ram();
X strcpy( t, str );
X
X return( t );
X}
X
X
X
XPUBLIC char *
XDmStrDup2( str )/*
X==================
X This function is used solely to properly quote command line arguments when
X they are reinserted int MAKEMACROS so that they can be used further in
X a processing line. */
Xchar *str;
X{
X char *t;
X size_t size;
X size_t alloced;
X char *tmp;
X char *dest;
X int seen_equal = 0;
X
X if(str == NIL(char)) return(NIL(char));
X size = strlen(str) + 1;
X alloced = size + 2; /* for two quotes */
X
X for(tmp = str; *tmp; tmp++)
X if(*tmp == '"')
X alloced++;
X
X if((t = MALLOC(alloced, char)) == NIL(char)) No_ram();
X
X for(tmp = str, dest = t; *tmp; tmp++, dest++) {
X if(*tmp == '=' && !seen_equal) {
X seen_equal = 1;
X *dest++ = *tmp;
X *dest = '"';
X continue;
X }
X if(*tmp == '"')
X *dest++ = '\\';
X *dest = *tmp;
X }
X
X if(!seen_equal)
X Fatal("DmStrDup2 invoked without argument of form x=y\n");
X
X *dest++ = '"';
X *dest = 0;
X
X return t;
X}
X
X
X
XPUBLIC char *
XDmStrPbrk( s1, s2 )/*
X====================
X find first occurence of char in s2 in string s1.
X Returns a pointer to the first occurrence. NOTE '\0' is considered part
X of s2 and a pointer to it is returned if no other chars match. */
X
Xchar *s1;
Xchar *s2;
X{
X register char *t;
X
X if( s1 == NIL(char) || s2 == NIL(char) ) return( "" );
X
X for( t=s1; *t && (strchr( s2, *t ) == NIL(char)); t++ );
X return( t );
X}
X
X
X
X
XPUBLIC char *
XDmStrSpn( s1, s2 )/*
X====================
X return pointer to first char in s1 that does not belong to s2.
X Returns the pointer if match found, else returns pointer to null char
X in s1. (ie. "" ) */
X
Xchar *s1;
Xchar *s2;
X{
X register char *t;
X
X if( s1 == NIL(char) || s2 == NIL(char) ) return( "" );
X
X for( t=s1; *t && (strchr( s2, *t ) != NIL(char)); t++ );
X return( t );
X}
X
X
X
X
XPUBLIC char *
XDmStrStr( s1, s2 )/*
X==================== find first occurrence in s1 of s2 */
Xchar *s1;
Xchar *s2;
X{
X register char *s;
X register char *p;
X register char *r;
X
X if( s1 != NIL(char) && s2 != NIL(char) )
X for( s=s1; *s; s++ )
X if( *s == *s2 )
X {
X for( r=s+1, p = s2+1; *p && (*r == *p); r++, p++ );
X if( !*p ) return( s );
X }
X
X return( NIL(char) );
X}
X
X
X
XPUBLIC char *
XDmSubStr( s, e )/*
X==================
X Return the string between the two pointers s and e, not including the
X char that e points to. NOTE: This routine assumes that s and e point
X into the same string. */
X
Xchar *s;
Xchar *e;
X{
X char save;
X int len = e-s;
X
X if( len < 0 || len > strlen(s) )
X Fatal( "Internal Error: SubStr fails consistency test" );
X
X save = *e;
X *e = '\0';
X s = DmStrDup( s );
X *e = save;
X
X return( s );
X}
END_OF_FILE
if test 6749 -ne `wc -c <'dmake/dmstring.c'`; then
echo shar: \"'dmake/dmstring.c'\" unpacked with wrong size!
fi
# end of 'dmake/dmstring.c'
fi
if test -f 'dmake/mac/environ.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/environ.c'\"
else
echo shar: Extracting \"'dmake/mac/environ.c'\" \(6950 characters\)
sed "s/^X//" >'dmake/mac/environ.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/environ.c,v 1.1 1994/10/06 17:42:58 dvadura Exp $
X-- SYNOPSIS -- Set up and free for environ
X--
X-- DESCRIPTION
X-- This file contains routines that will fill in and dispose of the
X-- list of environmental variables in the environ global variable.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: environ.c,v $
X * Revision 1.1 1994/10/06 17:42:58 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X/* The char used to replace the equal signs in environmental variable names. */
Xconst char kEqualReplace = '_';
X
X/* Maximum size of a "name=value" environmental string, including the ending '\0'.
X Larger environmental variables will be clipped before dmake sees them.
X (Caution: When I tested the program, the Mac or dmake trashed memory
X when environmental variables of >4K were read in. I looked around a bit
X and couldn't find out the exact cause, so I simply made this variable.
X The memory trashing may be related to the value for MAXLINELENGTH.) */
Xconst int kMaxEnvLen = 1024;
X
X
X/* The list of environmental variables in the form "name=value".
X (Once make_env() has been called.) */
Xchar **environ = NULL;
X
X/* Characters replaced during make_env() */
Xstruct ReplaceChar {
X char *fpPos;
X char fC;
X struct ReplaceChar *fpNext;
X}; /* struct ReplaceChar */
Xstruct ReplaceChar *gpReplaceList = NULL;
X
X
Xvoid AddReplace (char *pReplacePos);
X
X
X
X/*
X * Set up the environmental variables in a format used by
X * the environ global variable.
X *
X * environ has already been set to main's envp argument when
X * this suboroutine is called. We assume that envp is a copy
X * MPW makes for this process' use alone, so we can modify it
X * below.
X */
XPUBLIC void
Xmake_env()
X{
X char **ppCurEnv;
X char *pCurPos;
X#if 0
X char **ppMacEnv;
X char *pMacPos;
X
X if (!gMECalled) {
X gMECalled = TRUE;
X
Xenviron = MALLOC (1, char *);
X*environ = NULL;
X#endif
X#if 0
X{
X int numenv;
X int len;
X int firstnil;
X
X numenv = 1;
X ppMacEnv = environ;
X while (*(ppMacEnv++) != NULL) {
X ++numenv;
X } /* while */
X
X ppMacEnv = environ;
X if ((environ = MALLOC (numenv, char *)) == NULL) {
X No_ram ();
X } /* if */
X
Xnumenv = 80;
X for (ppCurEnv = environ; (numenv-- > 0) && (*ppMacEnv != NULL); ++ppCurEnv, ++ppMacEnv) {
X pMacPos = *ppMacEnv;
X len = strlen (pMacPos) + 1;
X len += strlen (pMacPos + len) + 1;
X#define MAXLEN 4098
Xif (len > MAXLEN) len = MAXLEN;
X if ((*ppCurEnv = MALLOC (len, char)) == NULL) {
X No_ram ();
X } /* if */
X
X firstnil = TRUE;
X for (pCurPos = *ppCurEnv; ((pCurPos - *ppCurEnv) < MAXLEN - 1); ++pCurPos, ++pMacPos) {
X if (*pMacPos == '=') {
X *pCurPos = gEqualReplace;
X
X } else if (*pMacPos == '\0') {
X if (firstnil) {
X *pCurPos = '=';
X firstnil = FALSE;
X } else {
X *pCurPos = *pMacPos;
X break;
X } /* if ... else */
X
X } else {
X *pCurPos = *pMacPos;
X } /* if ... elses */
X } /* for */
Xfirstnil = FALSE;
X } /* for */
X *ppCurEnv = NULL;
X}
X#endif
X{
X int firstnil;
X
X /* Get rid of any equal signs in any environmental name, and put
X equal signs between the names and their values */
X for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) {
X
X firstnil = TRUE;
X for (pCurPos = *ppCurEnv;
X ((pCurPos - *ppCurEnv < kMaxEnvLen - 1) &&
X ((*pCurPos != '\0') || !firstnil));
X ++pCurPos) {
X if (*pCurPos == '=') {
X AddReplace (pCurPos);
X *pCurPos = kEqualReplace;
X
X } else if (*pCurPos == '\0') {
X AddReplace (pCurPos);
X *pCurPos = '=';
X firstnil = FALSE;
X } /* if ... else if */
X } /* for */
X
X /* If the environtmental variable was too large ... */
X if (*pCurPos != '\0') {
X AddReplace (pCurPos);
X *pCurPos = '\0';
X if (firstnil) {
X AddReplace (--pCurPos);
X *pCurPos = '=';
X } /* if */
X } /* if */
X } /* for */
X}
X#if 0
X } /* if */
X#endif
X} /* PUBLIC void make_env () */
X
X
X/*
X * The character at pReplacePos is about to be replaced. Remember the
X * old value so we can restore it when we're done.
X */
Xvoid AddReplace (char *pReplacePos) {
X struct ReplaceChar *pReplaceChar;
X
X if ((pReplaceChar = MALLOC (1, struct ReplaceChar)) == NULL) {
X No_ram ();
X } /* if */
X pReplaceChar->fpPos = pReplacePos;
X pReplaceChar->fC = *pReplacePos;
X pReplaceChar->fpNext = gpReplaceList;
X gpReplaceList = pReplaceChar;
X} /* void AddReplace () */
X
X
X/*
X * Restore the old environmental variables to the way they looked before
X * the make_env() call, on the unlikely chance that something else will look
X * at our copy of the environmental variables during the program execution.
X *
X */
XPUBLIC void
Xfree_env()
X{
X struct ReplaceChar *pReplaceChar;
X
X while (gpReplaceList != NULL) {
X pReplaceChar = gpReplaceList;
X gpReplaceList = pReplaceChar->fpNext;
X
X *(pReplaceChar->fpPos) = pReplaceChar->fC;
X
X FREE (pReplaceChar);
X } /* while */
X
X#if 0
X char **ppCurEnv;
X char *pCurPos;
X
X if (!gFECalled) {
X gFECalled = TRUE;
X
X//FREE (environ);
Xenviron = NULL;
X#endif
X#if 0
X /* Restore the environment list to what it was before we
X read it in. */
X for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) {
X for (pCurPos = *ppCurEnv; *pCurPos != '='; ++pCurPos)
X ;
X *pCurPos = '\0';
X } /* for */
X } /* if */
X#endif
X} /* PUBLIC void free_env () */
END_OF_FILE
if test 6950 -ne `wc -c <'dmake/mac/environ.c'`; then
echo shar: \"'dmake/mac/environ.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/environ.c'
fi
if test -f 'dmake/percent.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/percent.c'\"
else
echo shar: Extracting \"'dmake/percent.c'\" \(7093 characters\)
sed "s/^X//" >'dmake/percent.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/percent.c,v 1.1 1994/10/06 17:42:51 dvadura Exp $
X-- SYNOPSIS -- handle building or %-rule meta-target nfa.
X--
X-- DESCRIPTION
X-- Builds the NFA used by dmake to match targets against %-meta
X-- rule constructs. The NFA is built as a set of DFA's.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: percent.c,v $
X * Revision 1.1 1994/10/06 17:42:51 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
Xstatic DFAPTR _build_dfa ANSI((char *));
Xstatic char _shift_dfa ANSI((DFAPTR, char *));
X
X
X#define NO_ACTION 0
X#define START_PERCENT 1
X#define END_PERCENT 2
X#define ACCEPT 4
X#define FAIL -1
X
Xstatic NFAPTR _nfa = NIL( NFA );
X
X
XPUBLIC DFALINKPTR
XMatch_dfa( buf )/*
X==================
X This routines runs all DFA's in parrallel and selects the one that best
X matches the string. If no match then it returns NIL( DFA ) */
Xchar *buf;
X{
X register NFAPTR nfa;
X int adv;
X DFALINKPTR dfa_list = NIL(DFALINK);
X
X DB_ENTER( "Match_dfa" );
X DB_PRINT( "dfa", ("Matching %s", buf) );
X
X /* Run each of the DFA's on the input string in parallel, we terminate
X * when all DFA's have either failed or ACCEPTED, if more than one DFA
X * accepts we build a list of all accepting DFA's sorted on states with
X * those matching in a higher numbered state heading the list. */
X
X do {
X adv = FALSE;
X
X for( nfa = _nfa; nfa != NIL( NFA ); nfa = nfa->next )
X if( nfa->status != (char) FAIL && nfa->status != (char) ACCEPT ) {
X adv++;
X nfa->status = _shift_dfa( nfa->dfa, buf );
X
X /* Construct the list of matching DFA's */
X if( nfa->status == (char) ACCEPT ) {
X DFALINKPTR dl;
X
X TALLOC( dl, 1, DFALINK );
X dl->dl_meta = nfa->dfa->node;
X dl->dl_per = DmSubStr( nfa->dfa->pstart, nfa->dfa->pend );
X dl->dl_state = nfa->dfa->states - nfa->dfa->c_state;
X
X if( dfa_list == NIL(DFALINK) )
X dfa_list = dl;
X else {
X DFALINKPTR tdli = dfa_list;
X DFALINKPTR tdlp = NIL(DFALINK);
X
X for( ; tdli != NIL(DFALINK); tdli = tdli->dl_next ) {
X if( dl->dl_state >= tdli->dl_state )
X break;
X tdlp = tdli;
X }
X
X if( tdli != NIL(DFALINK) ) {
X tdli->dl_prev = dl;
X dl->dl_next = tdli;
X }
X
X if( tdlp != NIL(DFALINK) ) {
X tdlp->dl_next = dl;
X dl->dl_prev = tdlp;
X }
X else
X dfa_list = dl;
X }
X
X DB_PRINT( "dfa", ("Matched [%s]", dl->dl_meta->CE_NAME) );
X }
X }
X
X buf++;
X }
X while ( adv );
X
X for( nfa = _nfa; nfa != NIL( NFA ); nfa = nfa->next ) {
X nfa->status = 0;
X nfa->dfa->c_state = nfa->dfa->states;
X }
X
X DB_RETURN( dfa_list );
X}
X
X
XPUBLIC void
XCheck_circle_dfa()/*
X====================
X This function is called to test for circularities in the DFA lists
X constructed from %-meta targets. */
X{
X register NFAPTR nfa;
X
X for( nfa = _nfa; nfa != NIL(NFA); nfa = nfa->next )
X if( Test_circle( nfa->dfa->node, FALSE ) )
X Fatal( "Detected circular dependency in inference graph at [%s]",
X nfa->dfa->node->CE_NAME );
X}
X
X
XPUBLIC void
XAdd_nfa( name )/*
X=================
X Given name, build a DFA and add it to the NFA. The NFA is maintained as
X a singly linked list of DFA's. */
Xchar *name;
X{
X NFAPTR nfa;
X
X TALLOC(nfa, 1, NFA);
X nfa->dfa = _build_dfa(name);
X
X if( _nfa != NIL(NFA) ) nfa->next = _nfa;
X
X _nfa = nfa;
X}
X
X
Xstatic DFAPTR
X_build_dfa( name )/*
X====================
X Construct a dfa for the passed in cell name. The routine returns a struct
X that represents a finite state machine that can recognize a regular
X expression with exactly one '%' sign in it. The '%' symbol is used as a
X wildcard character that will match anything except the character that
X immediately follows it or NUL.
X
X The Construction of DFA's is well known and can be found in Hopcroft and
X Ullman or any other book discussing formal language theory.
X A more practical treatise can be found in Compilers, Aho, Sethi and Ullman.
X*/
Xchar *name;
X{
X DFAPTR dfa;
X int nstates;
X register STATEPTR sp;
X STATEPTR per_state = NIL(STATE);
X int pcount=0;
X int end_percent=FALSE;
X
X nstates = strlen(name)+2;
X
X /* Allocate a DFA node and the right number of states. */
X TALLOC(dfa, 1, DFA);
X TALLOC(sp=dfa->c_state=dfa->states, nstates, STATE);
X dfa->node = Def_cell( name );
X
X /* Now construct the state table for the DFA */
X do {
X if( *name == '%' ) {
X if( pcount++ > 0 )
X Error( "Only one %% allowed within a %%-meta target" );
X
X sp->symbol = 0;
X sp->action = START_PERCENT;
X sp->no_match = sp->match = per_state = sp+1;
X end_percent = TRUE;
X }
X else {
X sp->symbol = *name;
X sp->no_match = per_state;
X
X if( *name == '\0' ) {
X sp->action = ACCEPT;
X sp->match = dfa->states;
X }
X else {
X sp->action = NO_ACTION;
X sp->match = sp+1;
X }
X
X if( end_percent ) {
X sp->action |= END_PERCENT;
X end_percent = FALSE;
X }
X }
X
X sp++;
X }
X while( *name++ );
X
X return(dfa);
X}
X
X
Xstatic char
X_shift_dfa( dfa, data )/*
X=========================
X Take a given dfa and advance it based on the current state, the shift
X action in that state, and the current data value. */
XDFAPTR dfa;
Xchar *data;
X{
X register STATEPTR sp = dfa->c_state;
X char c = *data;
X
X /* Check if it is a START_PERCENT action if so then we need to save
X * a pointer to the start of the string and advance to the next state. */
X if( sp->action & START_PERCENT ) {
X dfa->pstart = data;
X sp++;
X }
X
X /* Now check if the current char matches the character expected in the
X * current state. If it does then perform the specified action, otherwise
X * either shift it or fail. We fail if the next state on no-match is
X * NIL. */
X if( sp->symbol == c ) {
X if( sp->action & END_PERCENT ) dfa->pend = data;
X if( sp->action & ACCEPT ) return(ACCEPT);
X dfa->c_state = sp->match;
X }
X else if( (dfa->c_state = sp->no_match) == NIL(STATE) || !c )
X return((unsigned char) FAIL);
X
X return(NO_ACTION);
X}
END_OF_FILE
if test 7093 -ne `wc -c <'dmake/percent.c'`; then
echo shar: \"'dmake/percent.c'\" unpacked with wrong size!
fi
# end of 'dmake/percent.c'
fi
if test -f 'dmake/qnx/runargv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/runargv.c'\"
else
echo shar: Extracting \"'dmake/qnx/runargv.c'\" \(6954 characters\)
sed "s/^X//" >'dmake/qnx/runargv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/qnx/RCS/runargv.c,v 1.1 1994/10/06 17:43:22 dvadura Exp $
X-- SYNOPSIS -- invoke a sub process.
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
Xstatic void _add_child ANSI((int, CELLPTR, int, int));
Xstatic void _attach_cmd ANSI((char *, int, int, CELLPTR, int, int));
Xstatic void _finished_child ANSI((int, int));
Xstatic int _running ANSI((CELLPTR));
X
XPUBLIC int
Xrunargv(target, ignore, group, last, shell, cmd)
XCELLPTR target;
Xint ignore;
Xint group;
Xint last;
Xint shell;
Xchar *cmd;
X{
X extern int errno;
X int pid;
X char **argv;
X
X if( _running(target) /*&& Max_proc != 1*/ ) {
X /* The command will be executed when the previous recipe
X * line completes. */
X _attach_cmd( cmd, group, ignore, target, last, shell );
X return(1);
X }
X
X while( _proc_cnt == Max_proc )
X if( Wait_for_child(FALSE, -1) == -1 ) Fatal( "Lost a child %d", errno );
X
X argv = Pack_argv( group, shell, cmd );
X
X switch( pid=fork() ){
X int wid;
X int status;
X
X case -1: /* fork failed */
X Error("%s: %s", argv[0], strerror(errno));
X Handle_result(-1, ignore, _abort_flg, target);
X return(-1);
X
X case 0: /* child */
X execvp(argv[0], argv);
X Continue = TRUE; /* survive error message */
X Error("%s: %s", argv[0], strerror(errno));
X kill(getpid(), SIGTERM);
X /*NOTREACHED*/
X
X default: /* parent */
X _add_child(pid, target, ignore, last);
X }
X
X return(1);
X}
X
X
XPUBLIC int
XWait_for_child( abort_flg, pid )
Xint abort_flg;
Xint pid;
X{
X int wid;
X int status;
X int waitchild;
X
X waitchild = (pid == -1)? FALSE : Wait_for_completion;
X
X do {
X if( (wid = wait(&status)) == -1 ) return(-1);
X
X _abort_flg = abort_flg;
X _finished_child(wid, status);
X _abort_flg = FALSE;
X }
X while( waitchild && pid != wid );
X
X return(0);
X}
X
X
XPUBLIC void
XClean_up_processes()
X{
X register int i;
X
X if( _procs != NIL(PR) ) {
X for( i=0; i<Max_proc; i++ )
X if( _procs[i].pr_valid )
X kill(_procs[i].pr_pid, SIGTERM);
if test 6954 -ne `wc -c <'dmake/qnx/runargv.c'`; then
echo shar: \"'dmake/qnx/runargv.c'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/runargv.c'
fi
if test -f 'dmake/readme/install' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/install'\"
else
echo shar: Extracting \"'dmake/readme/install'\" \(6449 characters\)
sed "s/^X//" >'dmake/readme/install' <<'END_OF_FILE'
X DMAKE UNPACKING AND INSTALLATION INSTRUCTIONS
X
XDMAKE is available in several formats: a compressed tar src archive,
Xa compressed shar src archive, a pkzip src archive, or a pkzip MSDOS-executable
Xarchive. Refer to the appropriate section below for unpacking instructions.
XIn each instance the archive creates a new directory named 'dmake' and
Xextracts all relevant files to that sub-directory.
X
X
X1. UNPACKING THE DISTRIBUTION FILES
X
X OPTION 'A' (compressed tar src archive):
X --------------------------------------
X Assumption: The current directory contains the latest version of dmake in
X the file 'dmake.tar.gz' or the file 'dmake.tar.Z'.
X
X This file is a standard GNU zip compressed tar archive. To unpack the file
X issue the following command. gunzip is available for most UNIX platforms
X as well as DOS.
X
X gunzip -c dmake.tar.gz | tar xf -
X or
X zcat dmake.tar.Z | tar xf -
X
X
X OPTION 'B' (compressed shar src archive):
X -----------------------------------------
X Assumption: The current directory contains the latest version of dmake in
X the files 'dmake.shar.XX.gz'. Where XX are the sequence numbers
X for the shar files.
X
X To unpack the shar files you must uncompress them first, and then run the
X output through /bin/sh, or some other popular shar archive extraction tool.
X The following csh script should do the trick:
X
X foreach i (dmake.shar.*)
X gunzip $i
X sh < `basename $i .gz`
X end
X
X
X OPTION 'C' (src zip archive):
X -----------------------------
X Assumption: The current directory contains the latest version of DMAKE in
X the file dmake.zip.
X
X To unpack the full zip distribution simply use pkunzip with the
X following command:
X
X pkunzip dmake.zip
X or
X unzip dmake.zip
X
X
X OPTION 'D' (MSDOS-executable zip archive):
X ------------------------------------------
X Assumption: The current directory contains the latest version of the DMAKE
X MSDOS executable files in the file dmexe.zoo.
X
X To unpack the source-less MSDOS executable distribution use pkunzip
X with the following command:
X
X pkunzip dmexe.zip
X or
X unzip dmexe.zip
X
X Please skip section (2) below and go directly to Section 3 (Configuring the
X executable) for further installation instructions.
X
X
X2. BUILDING THE EXECUTABLE
X
X The only supported method for building a new executable from a fresh or
X patched distribution is to use the self building scripts rather than DMAKE
X itself. This is necessary in order to allow for the use of new DMAKE
X features and functionality in the DMAKE 'makefile' itself. Once built
X the DMAKE executable can be used to build new versions of DMAKE by setting
X the environment variables defined in Section 4 below.
X
X To determine the set of supported environments issue the following
X commands:
X
X cd src
X make
X
X The output of this command will be a set of arguments representing the
X supported environments that DMAKE can be compiled in. Choose the one
X that most closely represents your environment and issue the command:
X
X make environ_tag
X
X where 'environ_tag' is from the previous list, for example on a Solaris
X System the option is Solaris, so you would issue the command 'make Solaris'.
X
X The script runs the appropriate set of commands; upon completion the file
X 'dmake' is found in the current directory as is the file startup.mk.
X The first is the binary executable and the second is the initial DMAKE
X startup file. The startup file is read by DMAKE each time it is invoked to
X process a user makefile.
X
X Before issuing the build command read Section 3 and decide if you need
X or want to modify the precompiled value of MAKESTARTUP as described
X below.
X
X During the build it is safe to ignore any warnings that may
X get generated by the build.
X
X
X3. CONFIGURING THE EXECUTABLE
X
X Once built you must place the executable into the location where your
X system finds executables. DMAKE looks for the file 'startup.mk' before
X processing any user makefiles. To discover where DMAKE searches for this
X file issue the command:
X
X dmake -V
X
X one of the lines printed will be of the form:
X
X MAKESTARTUP=$(ROOTDIR)/.../startup.mk
X
X This is the path where DMAKE will look for the file 'startup.mk'. The
X value of ROOTDIR is imported from the environment and is assumed to be NULL
X if not set.
X
X You have three options:
X
X 1. Place the startup.mk file found in the 'src' directory into the
X path specified by the path given in the MAKESTARTUP definition.
X
X 2. Define the environment variable MAKESTARTUP to point to the path
X where 'startup.mk' may be found. For example if you place
X 'startup.mk' into the directory '/u/joe/lib' then you may define
X MAKESTARTUP in your environment to have the value:
X
X "/u/joe/lib/startup.mk"
X
X 3. Recompile DMAKE with the proper value of startup.mk hard-coded into
X the binary. In order to perform this follow these steps:
X
X a) copy the file src/unix/startup.h to the src directory
X b) edit the file and change the string definition (follow
X instructions in the file)
X c) Rebuild the executable.
X d) NOTE: If your compiler searches for include files in a
X non-sensible way this may not work and you may have to edit
X the file in-place. If you are building a DOS executable the
X startup.h file is found in the msdos, instead of the unix,
X subdirectory. The same is true for other non-unix operating
X system combinations. In the event that step c) does not work
X refer to the appropriate directory.
X
X
X4. DMAKE SPECIFIC ENVIRONMENT VARIABLES
X
X In order to use DMAKE to recompile itself you must define the following
X three environment variables in addition to MAKESTARTUP.
X
X OS - Specifies the flavour of operating system.
X OSRELEASE - Specifies the particular version of the operating
X system.
X OSENVIRONMENT - An optional configuration parameter for the operating
X system release.
X
X Specific values for these variables can be found in each of the operating
X system specific files named in the 'readme.1st' file. You should have
X to deal with this only if you are modifying DMAKE and making frequent
X changes to the source. In these circumstances you will want to recompile
X only the effected files rather than the entire source and you must set
X the value of the environment variables to reflect your environment.
END_OF_FILE
if test 6449 -ne `wc -c <'dmake/readme/install'`; then
echo shar: \"'dmake/readme/install'\" unpacked with wrong size!
fi
# end of 'dmake/readme/install'
fi
if test -f 'dmake/readme/msdos' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/msdos'\"
else
echo shar: Extracting \"'dmake/readme/msdos'\" \(7235 characters\)
sed "s/^X//" >'dmake/readme/msdos' <<'END_OF_FILE'
XMSDOS specific information for dmake. This information is provided in the
Xhope that it makes it easier to install and recompile dmake under MSDOS.
XI will be happy to hear of erroneous information and will make every effort
Xto correct it.
X
X
X1. ENVIRONMENT VARIABLE SETTINGS
X
XThere are many environment variable settings available for MSDOS. Each
Xoption is described below.
X
X OS - msdos
X
X OSRELEASE - bccdos # Borland BCC C and C++ compilers
X - tccdos # Borland Turbo-C compiler
X - ztcdos # Zortech C/C++ compilers
X - mscdos # Microsoft Compilers 4.0 and greater
X
X OSENVIRONMENT - NULL
X
X MSC_VER - 4.0 # Microsoft Compiler version if mscdos
X - 5.0 # Microsoft Compiler version if mscdos
X - 5.1 # Microsoft Compiler version if mscdos
X - 6.0 # Microsoft Compiler version if mscdos
X
XYou must set OS and OSRELEASE, and MSC_VER if OSRELEASE is "mscdos".
X
X
X2. IMPLEMENTATION NOTES
X
XBootstrapping the binary:
X-------------------------
X A make.bat file is provided to bootstrap the binary. The file contains
X several targets for bootstrapping. Invoking the batch file with no
X arguments lists the possibilities shown below.
X
X INDEX: You must specify one of:
X ** tcc - Turbo C 2.0 compile.
X ** tccswp - Turbo C 2.0 compile of swapping dmake.
X bcc - Borland C++ 2.0 compile.
X bccswp - Borland C++ 2.0 compile of swapping dmake.
X msc40 - Microsoft C 4.0 compile.
X msc50 - Microsoft C 5.0 compile.
X msc51 - Microsoft C 5.1 compile.
X msc60 - Microsoft C 6.0 compile.
X msc40swp - Microsoft C 4.0, MASM 5.1 compile of swapping dmake.
X msc50swp - Microsoft C 5.0, MASM 5.1 compile of swapping dmake.
X msc51swp - Microsoft C 5.1, MASM 5.1 compile of swapping dmake.
X msc60swp - Microsoft C 6.0, MASM 5.1 compile of swapping dmake.
X ztc - Zortech C++ 2.1 compile.
X ztcswp - Zortech C++ 2.1 compile of swapping dmake.
X
X ** dmake 4.0 seems to break when compiled with Turbo C 2.0, I am not
X sure why, but compiling with a later release of the Borland compilers
X fixes the problem. I suspect a bug in the C-libraries.
X
X Based on the compiler you have installed and whether or not you
X want the swapping version of dmake, you should select the appropriate
X target and issue 'make.bat target'.
X
X The batch file runs a second batch script that comes with the distribution
X which compiles the sources using the appropriate compiler and flags. The
X MSC Versions of the batch files should not require any further user
X intervention during the compile. The Turbo-C version, as a final step,
X invokes tlink with two response files. The second of these response files,
X named in msdos/tccdos/mk*.bat, contains absolute path names to Turbo-C
X libraries. You likely need to edit these before getting a successful binary
X is linked.
X
X By default the batch files make an executable that will run on an 8088
X cpu and up. You can change that by making the initial version and then
X editing the config.mk files found in either msdos/tccdos or msdos/mscdos
X (depending on the compiler you use), and selecting a different cpu type by
X supplying the appropriate compiler flags. You then need to remake dmake
X again but this time use dmake itself, see below.
X
X Note that the file msdos/exec.uue is a uuencoded version of a BCC++
X compiled exec.obj (from exec.asm). If you do not have an assembler
X either microsoft MASM or Borland TASM (or some other), you can uudecode
X this file and put it into the appropriate objects directory.
X
X
XUsing dmake to Make itself:
X---------------------------
X If you use dmake to make itself you must first set a number of makefile
X control variables, either through the environment or on the command line.
X
X The following variables must be set:
X
X OS - defines operating system (must be set)
X OSRELEASE - particular version of it.
X OSENVIRNOMENT - more customization
X
X These three variables should be defined in your environment. Valid values
X for MSDOS are listed above in Section 1. You must chose one setting from
X each category, so for example when using Turbo-C then the valid settings
X are:
X
X set OS=msdos
X set OSRELEASE=tccdos
X set OSENVIRONMENT=
X
X The dmake makefile has several macro variables that can be user specified
X and default to reasonable values if not set.
X
X MODEL - defines the model to compile, valid values are
X {s,c,m, or l}, defaults to 'l' (ie. large) model
X if unspecified.
X
X MSC_VER - defines the version of Microsoft C in use, should be set to
X one of 4.0, 5.0, 5.1 or 6.0; defaults to 6.0.
X
X SWAP - If set to 'y', compile the dmake swapping version of
X spawnvpe. This has the effect of turning on swapping of the
X executable to disk if the MSDOS version is made.
X
X DEBUG - If set to '1' then make the debugging version of dmake, this
X will also set MODEL to 'l'.
X
X To set the above variables you must specify them on the dmake command line
X or insert them into the makefile.mk definition.
X
X Finally, dmake searches for an initial startup file, you should set the
X environment variable MAKESTARTUP to contain the full path to the startup
X file, eg:
X
X set MAKESTARTUP=d:\usr\lib\startup.mk
X
X See the dmake man page in the src/man subdirectory for additional details
X of how dmake starts up.
X
X
XMemory Requirements and Swapping:
X---------------------------------
X The swapping code currently only swaps to DISK, I have left hooks
X in to accomodate XMS and EMS, I have some code that performs the
X necessary XMS/EMS accesses but have not incorporated it in yet.
X It appears that a ramdisk seems to work just fine. If anyone
X wishes to fill in the hooks please do and I'll be happy to include
X them in future distributions.
X
X
X^C and stopping a make:
X-----------------------
X Thanks to the efforts of Len Reed, appears to now work. I have been unable
X to hang my machine if it's swapped out and I hit ^C a couple thousand times.
X
X
XOther notes:
X------------
X dmake does not care if you are running command.com or some other command
X interpretter, you must however specify the proper values of the environment
X variables SHELL, SHELLFLAGS, GROUPSHELL, and GROUPFLAGS in order for things
X to work correctly. Read the man page FIRST, if you still have trouble
X then send email.
X
X Group recipes under DOS that use command.com as the command interpretter
X require you to set the GROUPSUFFIX macro.
X
X As shipped the startup.mk files for the DOS version try to figure out what
X command interpretter you are using and set things up appropriately.
X Two command interpretters are supported in the shipped startup.mk file,
X command.com, and the MKS Korn shell.
X
X dmake does not contain any builtin commands. It gets all commands it
X executes from an external file system. It is therefore most useful if it
X is used in conjunction with an environment similar to that provided by
X the MKS Tool Kit, or equivalent.
X
X dmake supports the MKS argument passing conventions. The facility is
X enabled by setting .MKSARGS:=1. It is set by default in the startup.mk file
X if an MKS Korn shell is detected as being the active command interpretter.
END_OF_FILE
if test 7235 -ne `wc -c <'dmake/readme/msdos'`; then
echo shar: \"'dmake/readme/msdos'\" unpacked with wrong size!
fi
# end of 'dmake/readme/msdos'
fi
if test -f 'dmake/unix/runargv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/runargv.c'\"
else
echo shar: Extracting \"'dmake/unix/runargv.c'\" \(6993 characters\)
sed "s/^X//" >'dmake/unix/runargv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/RCS/runargv.c,v 1.1 1994/10/06 17:42:20 dvadura Exp $
X-- SYNOPSIS -- invoke a sub process.
X * Revision 1.1 1994/10/06 17:42:20 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
Xstatic void _add_child ANSI((int, CELLPTR, int, int));
Xstatic void _attach_cmd ANSI((char *, int, int, CELLPTR, int, int));
Xstatic void _finished_child ANSI((int, int));
Xstatic int _running ANSI((CELLPTR));
X
XPUBLIC int
Xrunargv(target, ignore, group, last, shell, cmd)
XCELLPTR target;
Xint ignore;
Xint group;
Xint last;
Xint shell;
Xchar *cmd;
X{
X extern int errno;
X extern char *sys_errlist[];
X int pid;
X char **argv;
X
X if( _running(target) /*&& Max_proc != 1*/ ) {
X /* The command will be executed when the previous recipe
X * line completes. */
X _attach_cmd( cmd, group, ignore, target, last, shell );
X return(1);
X }
X
X while( _proc_cnt == Max_proc )
X if( Wait_for_child(FALSE, -1) == -1 ) Fatal( "Lost a child %d", errno );
X
X argv = Pack_argv( group, shell, cmd );
X
X switch( pid=fork() ){
X int wid;
X int status;
X
X case -1: /* fork failed */
X Error("%s: %s", argv[0], sys_errlist[errno]);
X Handle_result(-1, ignore, _abort_flg, target);
X return(-1);
X
X case 0: /* child */
X execvp(argv[0], argv);
X Continue = TRUE; /* survive error message */
X Error("%s: %s", argv[0], sys_errlist[errno]);
X kill(getpid(), SIGTERM);
X /*NOTREACHED*/
X
X default: /* parent */
X _add_child(pid, target, ignore, last);
X }
X
X return(1);
X}
X
X
XPUBLIC int
XWait_for_child( abort_flg, pid )
Xint abort_flg;
Xint pid;
X{
X int wid;
X int status;
X int waitchild;
X
X waitchild = (pid == -1)? FALSE : Wait_for_completion;
X
X do {
X if( (wid = wait(&status)) == -1 ) return(-1);
X
X _abort_flg = abort_flg;
X _finished_child(wid, status);
X _abort_flg = FALSE;
X }
X while( waitchild && pid != wid );
X
X return(0);
X}
X
X
XPUBLIC void
XClean_up_processes()
X{
X register int i;
X
X if( _procs != NIL(PR) ) {
X for( i=0; i<Max_proc; i++ )
X if( _procs[i].pr_valid )
X kill(_procs[i].pr_pid, SIGTERM);
if test 6993 -ne `wc -c <'dmake/unix/runargv.c'`; then
echo shar: \"'dmake/unix/runargv.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/runargv.c'
fi
echo shar: End of archive 14 \(of 27\).
cp /dev/null ark14isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/dbug/dbug.h dmake/imacs.c dmake/mac/config.mk
# dmake/mac/public.h dmake/msdos/bccdos/public.h
# dmake/msdos/tccdos/public.h dmake/msdos/ztcdos/public.h
# dmake/readme/os2 dmake/unix/solaris/getcwd.c
# dmake/unix/sysvr3/pwd/getcwd.c dmake/unix/xenix/pwd/getcwd.c
# Wrapped by kent@sparky on Fri Oct 21 16:50:42 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 15 (of 27)."'
if test -f 'dmake/dbug/dbug/dbug.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/dbug/dbug.h'\"
else
echo shar: Extracting \"'dmake/dbug/dbug/dbug.h'\" \(6259 characters\)
sed "s/^X//" >'dmake/dbug/dbug/dbug.h' <<'END_OF_FILE'
X */
X
X
X/*
X * FILE
X *
X * dbug.h user include file for programs using the dbug package
X *
X * SYNOPSIS
X *
X * #include <local/dbug.h>
X *
X * SCCS ID
X *
X * @(#)dbug.h 1.11 9/5/87
X *
X * DESCRIPTION
X *
X * Programs which use the dbug package must include this file.
X * It contains the appropriate macros to call support routines
X * in the dbug runtime library.
X *
X * To disable compilation of the macro expansions define the
X * preprocessor symbol "DBUG_OFF". This will result in null
X * macros expansions so that the resulting code will be smaller
X * and faster. (The difference may be smaller than you think
X * so this step is recommended only when absolutely necessary).
X * In general, tradeoffs between space and efficiency are
X * decided in favor of efficiency since space is seldom a
X * problem on the new machines).
X *
X * All externally visible symbol names follow the pattern
X * "_db_xxx..xx_" to minimize the possibility of a dbug package
X * symbol colliding with a user defined symbol.
X *
X * The DBUG_<N> style macros are obsolete and should not be used
X * in new code. Macros to map them to instances of DBUG_PRINT
X * are provided for compatibility with older code. They may go
X * away completely in subsequent releases.
X *
X * AUTHOR
X *
X * Fred Fish
X * (Currently employed by Motorola Computer Division, Tempe, Az.)
X * hao!noao!mcdsun!fnf
X * (602) 438-3614
X *
X */
X
X
X/*
X * Internally used dbug variables which must be global.
X */
X
X#ifndef DBUG_OFF
X extern int _db_on_; /* TRUE if debug currently enabled */
X extern FILE *_db_fp_; /* Current debug output stream */
X extern char *_db_process_; /* Name of current process */
X extern int _db_keyword_ (); /* Accept/reject keyword */
X extern void _db_push_ (); /* Push state, set up new state */
X extern void _db_pop_ (); /* Pop previous debug state */
X extern void _db_enter_ (); /* New user function entered */
X extern void _db_return_ (); /* User function return */
X extern void _db_pargs_ (); /* Remember args for line */
X extern void _db_doprnt_ (); /* Print debug output */
X extern void _db_setjmp_ (); /* Save debugger environment */
X extern void _db_longjmp_ (); /* Restore debugger environment */
X# endif
X
X
X/*
X * These macros provide a user interface into functions in the
X * dbug runtime support library. They isolate users from changes
X * in the MACROS and/or runtime support.
X *
X * The symbols "__LINE__" and "__FILE__" are expanded by the
X * preprocessor to the current source file line number and file
X * name respectively.
X *
X * WARNING --- Because the DBUG_ENTER macro allocates space on
X * the user function's stack, it must precede any executable
X * statements in the user function.
X *
X */
X
X# ifdef DBUG_OFF
X# define DBUG_ENTER(a1)
X# define DBUG_MALLOC(a1)
X# define DBUG_RETURN(a1) return(a1)
X# define DBUG_VOID_RETURN return
X# define DBUG_EXECUTE(keyword,a1)
X# define DBUG_PRINT(keyword,arglist)
X# define DBUG_2(keyword,format) /* Obsolete */
X# define DBUG_3(keyword,format,a1) /* Obsolete */
X# define DBUG_4(keyword,format,a1,a2) /* Obsolete */
X# define DBUG_5(keyword,format,a1,a2,a3) /* Obsolete */
X# define DBUG_PUSH(a1)
X# define DBUG_POP()
X# define DBUG_PROCESS(a1)
X# define DBUG_FILE (stderr)
X# define DBUG_SETJMP setjmp
X# define DBUG_LONGJMP longjmp
X# else
X# define DBUG_ENTER(a) \
X auto char *_db_func_, *_db_file_; \
X int _db_level_; \
X _db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_)
X# define DBUG_MALLOC(a) \
X auto char *_db_func_, *_db_file_; \
X int _db_level_; \
X malloc_init();\
X _db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_)
X# define DBUG_LEAVE \
X (_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_))
X# define DBUG_RETURN(a1) return (DBUG_LEAVE, (a1))
X/* define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);} Alternate form */
X# define DBUG_VOID_RETURN DBUG_LEAVE; return
X# define DBUG_EXECUTE(keyword,a1) \
X {if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}}
X# define DBUG_PRINT(keyword,arglist) \
X {if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}}
X# define DBUG_2(keyword,format) \
X DBUG_PRINT(keyword,(format)) /* Obsolete */
X# define DBUG_3(keyword,format,a1) \
X DBUG_PRINT(keyword,(format,a1)) /* Obsolete */
X# define DBUG_4(keyword,format,a1,a2) \
X DBUG_PRINT(keyword,(format,a1,a2)) /* Obsolete */
X# define DBUG_5(keyword,format,a1,a2,a3) \
X DBUG_PRINT(keyword,(format,a1,a2,a3)) /* Obsolete */
X# define DBUG_PUSH(a1) _db_push_ (a1)
X# define DBUG_POP() _db_pop_ ()
X# define DBUG_PROCESS(a1) (_db_process_ = a1)
X# define DBUG_FILE (_db_fp_)
X# define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1))
X# define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
X# endif
X
END_OF_FILE
if test 6259 -ne `wc -c <'dmake/dbug/dbug/dbug.h'`; then
echo shar: \"'dmake/dbug/dbug/dbug.h'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/dbug/dbug.h'
fi
if test -f 'dmake/imacs.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/imacs.c'\"
else
echo shar: Extracting \"'dmake/imacs.c'\" \(5945 characters\)
sed "s/^X//" >'dmake/imacs.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/imacs.c,v 1.1 1994/10/06 17:42:40 dvadura Exp $
X-- SYNOPSIS -- define default internal macros.
X--
X-- DESCRIPTION
X-- This file adds to the internal macro tables the set of default
X-- internal macros, and for those that are accessible internally via
X-- variables creates these variables, and initializes them to point
X-- at the default values of these macros.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: imacs.c,v $
X * Revision 1.1 1994/10/06 17:42:40 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
Xstatic void _set_int_var ANSI((char *, char *, int, int *));
Xstatic void _set_string_var ANSI((char *, char *, int, char **));
Xstatic void _set_bit_var ANSI((char *, char *, int));
X
X/*
X** Arrange to parse the strings stored in Rules[]
X*/
XPUBLIC void
XMake_rules()
X{
X Parse(NIL(FILE));
X}
X
X
X#define M_FLAG M_DEFAULT | M_EXPANDED
X
X/*
X** Add to the macro table all of the internal macro variables plus
X** create secondary variables which will give access to their values
X** easily, both when needed and when the macro value is modified.
X** The latter is accomplished by providing a flag in the macro and a field
X** which gives a pointer to the value if it is a char or string macro value
X** and a mask representing the bit of the global flag register that is affected
X** by this macro's value.
X*/
XPUBLIC void
XCreate_macro_vars()
X{
X static char* switchar;
X char swchar[2];
X char buf[20];
X
X swchar[0] = Get_switch_char(), swchar[1] = '\0';
X _set_string_var("SWITCHAR", swchar, M_PRECIOUS, &switchar);
X _set_string_var("DIRSEPSTR", (*swchar=='/')?"\\":"/",M_DEFAULT,&DirSepStr);
X _set_string_var("DIRBRKSTR", DirBrkStr, M_DEFAULT, &DirBrkStr);
X swchar[0] = DEF_ESCAPE_CHAR, swchar[1] = '\0';
X _set_string_var(".ESCAPE_PREFIX", swchar, M_FLAG, &Escape_char);
X
X _set_bit_var(".SILENT", "", A_SILENT );
X _set_bit_var(".IGNORE", "", A_IGNORE );
X _set_bit_var(".PRECIOUS", "", A_PRECIOUS);
X _set_bit_var(".EPILOG", "", A_EPILOG );
X _set_bit_var(".PROLOG", "", A_PROLOG );
X _set_bit_var(".NOINFER", "", A_NOINFER );
X _set_bit_var(".SEQUENTIAL","",A_SEQ );
X _set_bit_var(".USESHELL", "", A_SHELL );
X _set_bit_var(".SWAP", "", A_SWAP );
X _set_bit_var(".MKSARGS", "", A_MKSARGS );
X _set_bit_var(".IGNOREGROUP","",A_IGNOREGROUP);
X
X Glob_attr = A_DEFAULT; /* set all flags to NULL */
X
X _set_string_var("SHELL", "", M_DEFAULT, &Shell );
X _set_string_var("SHELLFLAGS", " ", M_DEFAULT, &Shell_flags );
X _set_string_var("GROUPSHELL", "", M_DEFAULT, &GShell );
X _set_string_var("GROUPFLAGS", " ", M_DEFAULT, &GShell_flags);
X _set_string_var("SHELLMETAS", "", M_DEFAULT, &Shell_metas );
X _set_string_var("GROUPSUFFIX", "", M_DEFAULT, &Grp_suff );
X _set_string_var("AUGMAKE",NIL(char), M_DEFAULT, &Augmake );
X _set_string_var(".KEEP_STATE", "", M_DEFAULT, &Keep_state );
X _set_string_var(".NOTABS", "", M_MULTI, &Notabs );
X _set_string_var(".DIRCACHE", "y", M_DEFAULT, &UseDirCache );
X
X _set_string_var("MAKEDIR",Get_current_dir(),M_PRECIOUS|M_NOEXPORT,&Makedir);
X _set_string_var("PWD", Makedir, M_DEFAULT|M_NOEXPORT, &Pwd);
X _set_string_var("TMD", "", M_DEFAULT|M_NOEXPORT, &Tmd);
X
X Def_macro("NULL", "", M_PRECIOUS|M_NOEXPORT|M_FLAG);
X
X _set_int_var( "MAXLINELENGTH", "0", M_DEFAULT|M_NOEXPORT, &Buffer_size );
X _set_int_var( "PREP", "0", M_DEFAULT, &Prep );
X (void) Def_macro("MAXLINELENGTH", "1024", M_FLAG | M_DEFAULT);
X
X /* set MAXPROCESSLIMIT high initially so that it allows MAXPROCESS to
X * change from command line. */
X _set_int_var( "MAXPROCESSLIMIT", "100", M_DEFAULT|M_NOEXPORT,&Max_proclmt );
X _set_int_var( "MAXPROCESS", "1", M_DEFAULT|M_NOEXPORT, &Max_proc );
X _set_int_var( "DYNAMICNESTINGLEVEL", "100", M_DEFAULT|M_NOEXPORT,
X &DynamicNestLevel);
X sprintf(buf,"%d",NAME_MAX);
X _set_int_var( "NAMEMAX", buf, M_DEFAULT|M_NOEXPORT, &NameMax);
X}
X
X
X/*
X** Define an integer variable value, and set up the macro.
X*/
Xstatic void
X_set_int_var(name, val, flag, var)
Xchar *name;
Xchar *val;
Xint flag;
Xint *var;
X{
X HASHPTR hp;
X
X hp = Def_macro(name, val, M_FLAG | flag);
X hp->ht_flag |= M_VAR_INT | M_MULTI;
X hp->MV_IVAR = var;
X *var = atoi(val);
X}
X
X
X/*
X** Define a string variables value, and set up the macro.
X*/
Xstatic void
X_set_string_var(name, val, flag, var)
Xchar *name;
Xchar *val;
Xint flag;
Xchar **var;
X{
X HASHPTR hp;
X
X hp = Def_macro(name, val, M_FLAG | flag);
X hp->ht_flag |= M_VAR_STRING | M_MULTI;
X hp->MV_SVAR = var;
X *var = hp->ht_value;
X}
X
X
X/*
X** Define a bit variable value, and set up the macro.
X*/
Xstatic void
X_set_bit_var(name, val, mask)
Xchar *name;
Xchar *val;
Xint mask;
X{
X HASHPTR hp;
X
X hp = Def_macro(name, val, M_FLAG);
X hp->ht_flag |= M_VAR_BIT | M_MULTI;
X hp->MV_MASK = mask;
X hp->MV_BVAR = &Glob_attr;
X}
END_OF_FILE
if test 5945 -ne `wc -c <'dmake/imacs.c'`; then
echo shar: \"'dmake/imacs.c'\" unpacked with wrong size!
fi
# end of 'dmake/imacs.c'
fi
if test -f 'dmake/mac/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/config.mk'\"
else
echo shar: Extracting \"'dmake/mac/config.mk'\" \(1234 characters\)
sed "s/^X//" >'dmake/mac/config.mk' <<'END_OF_FILE'
X# This is an OS Mac specific configuration file
X# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
X# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
X# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
X#
X
XSTARTUPFILE = :$(OS):startup.mk
X
XCPPFLAGS = $(CFLAGS)
XLDOBJS = $(CSTARTUP) :$(OBJDIR):{$(<:f)}
XLDARGS = $(LDFLAGS) -o $@ $(LDOBJS) $(LDLIBS)
X
X# Debug flags
XDB_CFLAGS = -sym on
XDB_LDFLAGS = -sym on
XDB_LDLIBS =
X
X# NO Debug flags
XNDB_CFLAGS = -sym off
XNDB_LDFLAGS = -sym off
XNDB_LDLIBS =
X
X# Local configuration modifications for CFLAGS.
XCFLAGS += -I :$(OS) -d _MPW -s $(<:b)
XLDFLAGS += -w -c 'MPS ' -t MPST
X
X# Since we writing out what files we want to execute, we can't use .SETDIR
X# to specify the files to compile in the Mac directory.
X# Instead, we copy the files to the (top-level) current directory and compile
X# them there.
X%.c : ":$(OS):%.c"
X duplicate -y $< $@
X
X# Common Mac source files.
XOS_SRC = arlib.c bogus.c dirbrk.c directry.c environ.c main.c rmprq.c \
X ruletab.c tempnam.c tomacfil.c
X.IF $(SHELL) != mwp
X .SETDIR=$(OS) : $(OS_SRC)
X.ENDIF
XSRC += $(OS_SRC)
X
X# Set source dirs so that we can find files named in this
X# config file.
X.SOURCE.h : $(OS)
END_OF_FILE
if test 1234 -ne `wc -c <'dmake/mac/config.mk'`; then
echo shar: \"'dmake/mac/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/mac/config.mk'
fi
if test -f 'dmake/mac/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/public.h'\"
else
echo shar: Extracting \"'dmake/mac/public.h'\" \(6179 characters\)
sed "s/^X//" >'dmake/mac/public.h' <<'END_OF_FILE'
X/* RCS -- $Header$
X-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
X--
X-- SYNOPSIS -- Local functions exported to be visible by others.
X--
X-- DESCRIPTION
X-- This file is generated by 'genpub'. Function declarations
X-- that appear in this file are extracted by 'genpub' from
X-- source files. Any function in the source file whose definition
X-- appears like:
X--
X-- PUBLIC return_type
X-- function( arg_list );
X-- type_expr1 arg1;
X-- ...
X--
X-- has its definition extracted and a line of the form:
X--
X-- return_type function ANSI((type_expr1,type_expr2,...));
X--
X-- entered into the output file.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log$
X*/
X
X#ifndef _DMAKE_PUBLIC_h
X#define _DMAKE_PUBLIC_h
X
X#ifdef EXTERN
X#undef EXTERN
X#endif
X#if defined(DEFINE_DMAKE_VARIABLES)
X#define EXTERN
X#else
X#define EXTERN extern
X#endif
X
X/***** genpub: Begin list of generated function headers */
Xvoid Infer_recipe ANSI((CELLPTR, CELLPTR));
Xint Make_targets ANSI(());
Xint Exec_commands ANSI((CELLPTR));
Xvoid Print_cmnd ANSI((char *, int, int));
Xvoid Pop_dir ANSI((int));
Xvoid Append_line ANSI((char *, int, FILE *, char *, int, int));
Xvoid Stat_target ANSI((CELLPTR, int, int));
Xchar *Expand ANSI((char *));
Xchar *Apply_edit ANSI((char *, char *, char *, int, int));
Xvoid Map_esc ANSI((char *));
Xchar* Apply_modifiers ANSI((int, char *));
Xchar* Tokenize ANSI((char *, char *, char, int));
Xchar* ScanToken ANSI((char *, char **, int));
Xchar *DmStrJoin ANSI((char *, char *, int, int));
Xchar *DmStrAdd ANSI((char *, char *, int));
Xchar *DmStrApp ANSI((char *, char *));
Xchar *DmStrDup ANSI((char *));
Xchar *DmStrDup2 ANSI((char *));
Xchar *DmStrPbrk ANSI((char *, char *));
Xchar *DmStrSpn ANSI((char *, char *));
Xchar *DmStrStr ANSI((char *, char *));
Xchar *DmSubStr ANSI((char *, char *));
Xuint16 Hash ANSI((char *, uint32 *));
XHASHPTR Get_name ANSI((char *, HASHPTR *, int));
XHASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
XHASHPTR Push_macro ANSI((HASHPTR));
XHASHPTR Pop_macro ANSI((HASHPTR));
XHASHPTR Def_macro ANSI((char *, char *, int));
XCELLPTR Def_cell ANSI((char *));
XLINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
Xvoid Clear_prerequisites ANSI((CELLPTR));
Xint Test_circle ANSI((CELLPTR, int));
XSTRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
Xt_attr Rcp_attribute ANSI((char *));
Xvoid main ANSI((int, char **));
XFILE *Openfile ANSI((char *, int, int));
XFILE *Closefile ANSI(());
XFILE *Search_file ANSI((char *, char **));
Xchar *Filename ANSI(());
Xint Nestlevel ANSI(());
XFILE *TryFiles ANSI((LINKPTR));
Xvoid No_ram ANSI(());
Xvoid Usage ANSI((int));
Xvoid Version ANSI(());
Xchar *Get_suffix ANSI((char *));
Xchar *Basename ANSI((char *));
Xchar *Filedir ANSI((char *));
Xchar *Build_path ANSI((char *, char *));
Xvoid Make_rules ANSI(());
Xvoid Create_macro_vars ANSI(());
Xtime_t Do_stat ANSI((char *, char *, char **, int));
Xint Do_touch ANSI((char *, char *, char **));
Xvoid Void_lib_cache ANSI((char *, char *));
Xtime_t Do_time ANSI(());
Xint Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
Xchar ** Pack_argv ANSI((int, int, char *));
Xchar *Read_env_string ANSI((char *));
Xint Write_env_string ANSI((char *, char *));
Xvoid ReadEnvironment ANSI(());
Xvoid Catch_signals ANSI((void (*)()));
Xvoid Clear_signals ANSI(());
Xvoid Prolog ANSI((int, char* []));
Xvoid Epilog ANSI((int));
Xchar *Get_current_dir ANSI(());
Xint Set_dir ANSI((char*));
Xchar Get_switch_char ANSI(());
XFILE* Get_temp ANSI((char **, char *, int));
XFILE *Start_temp ANSI((char *, CELLPTR, char **));
Xvoid Open_temp_error ANSI((char *, char *));
Xvoid Link_temp ANSI((CELLPTR, FILE *, char *));
Xvoid Close_temp ANSI((CELLPTR, FILE *));
Xvoid Unlink_temp_files ANSI((CELLPTR));
Xvoid Handle_result ANSI((int, int, int, CELLPTR));
Xvoid Update_time_stamp ANSI((CELLPTR));
Xint Remove_file ANSI((char *));
Xvoid Parse ANSI((FILE *));
Xint Get_line ANSI((char *, FILE *));
Xchar *Do_comment ANSI((char *, char **, int));
Xchar *Get_token ANSI((TKSTRPTR, char *, int));
Xvoid Quit ANSI(());
Xvoid Read_state ANSI(());
Xvoid Write_state ANSI(());
Xint Check_state ANSI((CELLPTR, STRINGPTR *, int));
Xvoid Dump ANSI(());
Xvoid Dump_recipe ANSI((STRINGPTR));
Xint Parse_macro ANSI((char *, int));
Xint Macro_op ANSI((char *));
Xint Parse_rule_def ANSI((int *));
Xint Rule_op ANSI((char *));
Xvoid Add_recipe_to_list ANSI((char *, int, int));
Xvoid Bind_rules_to_targets ANSI((int));
Xint Set_group_attributes ANSI((char *));
XDFALINKPTR Match_dfa ANSI((char *));
Xvoid Check_circle_dfa ANSI(());
Xvoid Add_nfa ANSI((char *));
Xchar *Exec_function ANSI((char *));
Xtime_t seek_arch ANSI((char*, char*));
Xint touch_arch ANSI((char*, char*));
Xvoid tzset () {}/PUBLIC int putenv (char *pEnvString) {return (0); }/ ANSI(());
Xint Wait_for_child ANSI((int ,int ));
Xvoid Clean_up_processes ANSI(());
Xint If_root_path ANSI((char *));
Xint stat ANSI((char *, struct stat *));
Xchar *getcwd ANSI((char *,size_t ));
Xint chdir ANSI((char *));
Xint utime ANSI((char *,time_t *));
Xvoid make_env ANSI(());
Xvoid free_env ANSI(());
Xvoid Remove_prq ANSI((CELLPTR));
Xchar *tempnam ANSI((char *,char *));
Xchar *Unix2MacFName ANSI((char *));
XFILE *MacFOpen ANSI((char *,char *));
X
X#endif
END_OF_FILE
if test 6179 -ne `wc -c <'dmake/mac/public.h'`; then
echo shar: \"'dmake/mac/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/mac/public.h'
fi
if test -f 'dmake/msdos/bccdos/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/public.h'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/public.h'\" \(5960 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/public.h' <<'END_OF_FILE'
X/* RCS -- $Header$
X-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
X--
X-- SYNOPSIS -- Local functions exported to be visible by others.
X--
X-- DESCRIPTION
X-- This file is generated by 'genpub'. Function declarations
X-- that appear in this file are extracted by 'genpub' from
X-- source files. Any function in the source file whose definition
X-- appears like:
X--
X-- PUBLIC return_type
X-- function( arg_list );
X-- type_expr1 arg1;
X-- ...
X--
X-- has its definition extracted and a line of the form:
X--
X-- return_type function ANSI((type_expr1,type_expr2,...));
X--
X-- entered into the output file.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log$
X*/
X
X#ifndef _DMAKE_PUBLIC_h
X#define _DMAKE_PUBLIC_h
X
X#ifdef EXTERN
X#undef EXTERN
X#endif
X#if defined(DEFINE_DMAKE_VARIABLES)
X#define EXTERN
X#else
X#define EXTERN extern
X#endif
X
X/***** genpub: Begin list of generated function headers */
Xvoid Infer_recipe ANSI((CELLPTR, CELLPTR));
Xint Make_targets ANSI(());
Xint Exec_commands ANSI((CELLPTR));
Xvoid Print_cmnd ANSI((char *, int, int));
Xvoid Pop_dir ANSI((int));
Xvoid Append_line ANSI((char *, int, FILE *, char *, int, int));
Xvoid Stat_target ANSI((CELLPTR, int, int));
Xchar *Expand ANSI((char *));
Xchar *Apply_edit ANSI((char *, char *, char *, int, int));
Xvoid Map_esc ANSI((char *));
Xchar* Apply_modifiers ANSI((int, char *));
Xchar* Tokenize ANSI((char *, char *, char, int));
Xchar* ScanToken ANSI((char *, char **, int));
Xchar *DmStrJoin ANSI((char *, char *, int, int));
Xchar *DmStrAdd ANSI((char *, char *, int));
Xchar *DmStrApp ANSI((char *, char *));
Xchar *DmStrDup ANSI((char *));
Xchar *DmStrDup2 ANSI((char *));
Xchar *DmStrPbrk ANSI((char *, char *));
Xchar *DmStrSpn ANSI((char *, char *));
Xchar *DmStrStr ANSI((char *, char *));
Xchar *DmSubStr ANSI((char *, char *));
Xuint16 Hash ANSI((char *, uint32 *));
XHASHPTR Get_name ANSI((char *, HASHPTR *, int));
XHASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
XHASHPTR Push_macro ANSI((HASHPTR));
XHASHPTR Pop_macro ANSI((HASHPTR));
XHASHPTR Def_macro ANSI((char *, char *, int));
XCELLPTR Def_cell ANSI((char *));
XLINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
Xvoid Clear_prerequisites ANSI((CELLPTR));
Xint Test_circle ANSI((CELLPTR, int));
XSTRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
Xt_attr Rcp_attribute ANSI((char *));
Xvoid main ANSI((int, char **));
XFILE *Openfile ANSI((char *, int, int));
XFILE *Closefile ANSI(());
XFILE *Search_file ANSI((char *, char **));
Xchar *Filename ANSI(());
Xint Nestlevel ANSI(());
XFILE *TryFiles ANSI((LINKPTR));
Xvoid No_ram ANSI(());
Xvoid Usage ANSI((int));
Xvoid Version ANSI(());
Xchar *Get_suffix ANSI((char *));
Xchar *Basename ANSI((char *));
Xchar *Filedir ANSI((char *));
Xchar *Build_path ANSI((char *, char *));
Xvoid Make_rules ANSI(());
Xvoid Create_macro_vars ANSI(());
Xtime_t Do_stat ANSI((char *, char *, char **, int));
Xint Do_touch ANSI((char *, char *, char **));
Xvoid Void_lib_cache ANSI((char *, char *));
Xtime_t Do_time ANSI(());
Xint Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
Xchar ** Pack_argv ANSI((int, int, char *));
Xchar *Read_env_string ANSI((char *));
Xint Write_env_string ANSI((char *, char *));
Xvoid ReadEnvironment ANSI(());
Xvoid Catch_signals ANSI((void (*)()));
Xvoid Clear_signals ANSI(());
Xvoid Prolog ANSI((int, char* []));
Xvoid Epilog ANSI((int));
Xchar *Get_current_dir ANSI(());
Xint Set_dir ANSI((char*));
Xchar Get_switch_char ANSI(());
XFILE* Get_temp ANSI((char **, char *, int));
XFILE *Start_temp ANSI((char *, CELLPTR, char **));
Xvoid Open_temp_error ANSI((char *, char *));
Xvoid Link_temp ANSI((CELLPTR, FILE *, char *));
Xvoid Close_temp ANSI((CELLPTR, FILE *));
Xvoid Unlink_temp_files ANSI((CELLPTR));
Xvoid Handle_result ANSI((int, int, int, CELLPTR));
Xvoid Update_time_stamp ANSI((CELLPTR));
Xint Remove_file ANSI((char *));
Xvoid Parse ANSI((FILE *));
Xint Get_line ANSI((char *, FILE *));
Xchar *Do_comment ANSI((char *, char **, int));
Xchar *Get_token ANSI((TKSTRPTR, char *, int));
Xvoid Quit ANSI(());
Xvoid Read_state ANSI(());
Xvoid Write_state ANSI(());
Xint Check_state ANSI((CELLPTR, STRINGPTR *, int));
Xvoid Dump ANSI(());
Xvoid Dump_recipe ANSI((STRINGPTR));
Xint Parse_macro ANSI((char *, int));
Xint Macro_op ANSI((char *));
Xint Parse_rule_def ANSI((int *));
Xint Rule_op ANSI((char *));
Xvoid Add_recipe_to_list ANSI((char *, int, int));
Xvoid Bind_rules_to_targets ANSI((int));
Xint Set_group_attributes ANSI((char *));
XDFALINKPTR Match_dfa ANSI((char *));
Xvoid Check_circle_dfa ANSI(());
Xvoid Add_nfa ANSI((char *));
Xchar *Exec_function ANSI((char *));
Xint If_root_path ANSI((char *));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xvoid Clean_up_processes ANSI(());
Xint Wait_for_child ANSI((int, int));
Xtime_t seek_arch ANSI((char*, char*));
Xint touch_arch ANSI((char*, char*));
Xint _chdir ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xvoid Hook_std_writes ANSI((char *));
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5960 -ne `wc -c <'dmake/msdos/bccdos/public.h'`; then
echo shar: \"'dmake/msdos/bccdos/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/public.h'
fi
if test -f 'dmake/msdos/tccdos/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/public.h'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/public.h'\" \(5960 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/public.h' <<'END_OF_FILE'
X/* RCS -- $Header$
X-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
X--
X-- SYNOPSIS -- Local functions exported to be visible by others.
X--
X-- DESCRIPTION
X-- This file is generated by 'genpub'. Function declarations
X-- that appear in this file are extracted by 'genpub' from
X-- source files. Any function in the source file whose definition
X-- appears like:
X--
X-- PUBLIC return_type
X-- function( arg_list );
X-- type_expr1 arg1;
X-- ...
X--
X-- has its definition extracted and a line of the form:
X--
X-- return_type function ANSI((type_expr1,type_expr2,...));
X--
X-- entered into the output file.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log$
X*/
X
X#ifndef _DMAKE_PUBLIC_h
X#define _DMAKE_PUBLIC_h
X
X#ifdef EXTERN
X#undef EXTERN
X#endif
X#if defined(DEFINE_DMAKE_VARIABLES)
X#define EXTERN
X#else
X#define EXTERN extern
X#endif
X
X/***** genpub: Begin list of generated function headers */
Xvoid Infer_recipe ANSI((CELLPTR, CELLPTR));
Xint Make_targets ANSI(());
Xint Exec_commands ANSI((CELLPTR));
Xvoid Print_cmnd ANSI((char *, int, int));
Xvoid Pop_dir ANSI((int));
Xvoid Append_line ANSI((char *, int, FILE *, char *, int, int));
Xvoid Stat_target ANSI((CELLPTR, int, int));
Xchar *Expand ANSI((char *));
Xchar *Apply_edit ANSI((char *, char *, char *, int, int));
Xvoid Map_esc ANSI((char *));
Xchar* Apply_modifiers ANSI((int, char *));
Xchar* Tokenize ANSI((char *, char *, char, int));
Xchar* ScanToken ANSI((char *, char **, int));
Xchar *DmStrJoin ANSI((char *, char *, int, int));
Xchar *DmStrAdd ANSI((char *, char *, int));
Xchar *DmStrApp ANSI((char *, char *));
Xchar *DmStrDup ANSI((char *));
Xchar *DmStrDup2 ANSI((char *));
Xchar *DmStrPbrk ANSI((char *, char *));
Xchar *DmStrSpn ANSI((char *, char *));
Xchar *DmStrStr ANSI((char *, char *));
Xchar *DmSubStr ANSI((char *, char *));
Xuint16 Hash ANSI((char *, uint32 *));
XHASHPTR Get_name ANSI((char *, HASHPTR *, int));
XHASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
XHASHPTR Push_macro ANSI((HASHPTR));
XHASHPTR Pop_macro ANSI((HASHPTR));
XHASHPTR Def_macro ANSI((char *, char *, int));
XCELLPTR Def_cell ANSI((char *));
XLINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
Xvoid Clear_prerequisites ANSI((CELLPTR));
Xint Test_circle ANSI((CELLPTR, int));
XSTRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
Xt_attr Rcp_attribute ANSI((char *));
Xvoid main ANSI((int, char **));
XFILE *Openfile ANSI((char *, int, int));
XFILE *Closefile ANSI(());
XFILE *Search_file ANSI((char *, char **));
Xchar *Filename ANSI(());
Xint Nestlevel ANSI(());
XFILE *TryFiles ANSI((LINKPTR));
Xvoid No_ram ANSI(());
Xvoid Usage ANSI((int));
Xvoid Version ANSI(());
Xchar *Get_suffix ANSI((char *));
Xchar *Basename ANSI((char *));
Xchar *Filedir ANSI((char *));
Xchar *Build_path ANSI((char *, char *));
Xvoid Make_rules ANSI(());
Xvoid Create_macro_vars ANSI(());
Xtime_t Do_stat ANSI((char *, char *, char **, int));
Xint Do_touch ANSI((char *, char *, char **));
Xvoid Void_lib_cache ANSI((char *, char *));
Xtime_t Do_time ANSI(());
Xint Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
Xchar ** Pack_argv ANSI((int, int, char *));
Xchar *Read_env_string ANSI((char *));
Xint Write_env_string ANSI((char *, char *));
Xvoid ReadEnvironment ANSI(());
Xvoid Catch_signals ANSI((void (*)()));
Xvoid Clear_signals ANSI(());
Xvoid Prolog ANSI((int, char* []));
Xvoid Epilog ANSI((int));
Xchar *Get_current_dir ANSI(());
Xint Set_dir ANSI((char*));
Xchar Get_switch_char ANSI(());
XFILE* Get_temp ANSI((char **, char *, int));
XFILE *Start_temp ANSI((char *, CELLPTR, char **));
Xvoid Open_temp_error ANSI((char *, char *));
Xvoid Link_temp ANSI((CELLPTR, FILE *, char *));
Xvoid Close_temp ANSI((CELLPTR, FILE *));
Xvoid Unlink_temp_files ANSI((CELLPTR));
Xvoid Handle_result ANSI((int, int, int, CELLPTR));
Xvoid Update_time_stamp ANSI((CELLPTR));
Xint Remove_file ANSI((char *));
Xvoid Parse ANSI((FILE *));
Xint Get_line ANSI((char *, FILE *));
Xchar *Do_comment ANSI((char *, char **, int));
Xchar *Get_token ANSI((TKSTRPTR, char *, int));
Xvoid Quit ANSI(());
Xvoid Read_state ANSI(());
Xvoid Write_state ANSI(());
Xint Check_state ANSI((CELLPTR, STRINGPTR *, int));
Xvoid Dump ANSI(());
Xvoid Dump_recipe ANSI((STRINGPTR));
Xint Parse_macro ANSI((char *, int));
Xint Macro_op ANSI((char *));
Xint Parse_rule_def ANSI((int *));
Xint Rule_op ANSI((char *));
Xvoid Add_recipe_to_list ANSI((char *, int, int));
Xvoid Bind_rules_to_targets ANSI((int));
Xint Set_group_attributes ANSI((char *));
XDFALINKPTR Match_dfa ANSI((char *));
Xvoid Check_circle_dfa ANSI(());
Xvoid Add_nfa ANSI((char *));
Xchar *Exec_function ANSI((char *));
Xint If_root_path ANSI((char *));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xvoid Clean_up_processes ANSI(());
Xint Wait_for_child ANSI((int, int));
Xtime_t seek_arch ANSI((char*, char*));
Xint touch_arch ANSI((char*, char*));
Xint _chdir ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xvoid Hook_std_writes ANSI((char *));
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5960 -ne `wc -c <'dmake/msdos/tccdos/public.h'`; then
echo shar: \"'dmake/msdos/tccdos/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/public.h'
fi
if test -f 'dmake/msdos/ztcdos/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/public.h'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/public.h'\" \(5960 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/public.h' <<'END_OF_FILE'
X/* RCS -- $Header$
X-- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
X--
X-- SYNOPSIS -- Local functions exported to be visible by others.
X--
X-- DESCRIPTION
X-- This file is generated by 'genpub'. Function declarations
X-- that appear in this file are extracted by 'genpub' from
X-- source files. Any function in the source file whose definition
X-- appears like:
X--
X-- PUBLIC return_type
X-- function( arg_list );
X-- type_expr1 arg1;
X-- ...
X--
X-- has its definition extracted and a line of the form:
X--
X-- return_type function ANSI((type_expr1,type_expr2,...));
X--
X-- entered into the output file.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log$
X*/
X
X#ifndef _DMAKE_PUBLIC_h
X#define _DMAKE_PUBLIC_h
X
X#ifdef EXTERN
X#undef EXTERN
X#endif
X#if defined(DEFINE_DMAKE_VARIABLES)
X#define EXTERN
X#else
X#define EXTERN extern
X#endif
X
X/***** genpub: Begin list of generated function headers */
Xvoid Infer_recipe ANSI((CELLPTR, CELLPTR));
Xint Make_targets ANSI(());
Xint Exec_commands ANSI((CELLPTR));
Xvoid Print_cmnd ANSI((char *, int, int));
Xvoid Pop_dir ANSI((int));
Xvoid Append_line ANSI((char *, int, FILE *, char *, int, int));
Xvoid Stat_target ANSI((CELLPTR, int, int));
Xchar *Expand ANSI((char *));
Xchar *Apply_edit ANSI((char *, char *, char *, int, int));
Xvoid Map_esc ANSI((char *));
Xchar* Apply_modifiers ANSI((int, char *));
Xchar* Tokenize ANSI((char *, char *, char, int));
Xchar* ScanToken ANSI((char *, char **, int));
Xchar *DmStrJoin ANSI((char *, char *, int, int));
Xchar *DmStrAdd ANSI((char *, char *, int));
Xchar *DmStrApp ANSI((char *, char *));
Xchar *DmStrDup ANSI((char *));
Xchar *DmStrDup2 ANSI((char *));
Xchar *DmStrPbrk ANSI((char *, char *));
Xchar *DmStrSpn ANSI((char *, char *));
Xchar *DmStrStr ANSI((char *, char *));
Xchar *DmSubStr ANSI((char *, char *));
Xuint16 Hash ANSI((char *, uint32 *));
XHASHPTR Get_name ANSI((char *, HASHPTR *, int));
XHASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
XHASHPTR Push_macro ANSI((HASHPTR));
XHASHPTR Pop_macro ANSI((HASHPTR));
XHASHPTR Def_macro ANSI((char *, char *, int));
XCELLPTR Def_cell ANSI((char *));
XLINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
Xvoid Clear_prerequisites ANSI((CELLPTR));
Xint Test_circle ANSI((CELLPTR, int));
XSTRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
Xt_attr Rcp_attribute ANSI((char *));
Xvoid main ANSI((int, char **));
XFILE *Openfile ANSI((char *, int, int));
XFILE *Closefile ANSI(());
XFILE *Search_file ANSI((char *, char **));
Xchar *Filename ANSI(());
Xint Nestlevel ANSI(());
XFILE *TryFiles ANSI((LINKPTR));
Xvoid No_ram ANSI(());
Xvoid Usage ANSI((int));
Xvoid Version ANSI(());
Xchar *Get_suffix ANSI((char *));
Xchar *Basename ANSI((char *));
Xchar *Filedir ANSI((char *));
Xchar *Build_path ANSI((char *, char *));
Xvoid Make_rules ANSI(());
Xvoid Create_macro_vars ANSI(());
Xtime_t Do_stat ANSI((char *, char *, char **, int));
Xint Do_touch ANSI((char *, char *, char **));
Xvoid Void_lib_cache ANSI((char *, char *));
Xtime_t Do_time ANSI(());
Xint Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
Xchar ** Pack_argv ANSI((int, int, char *));
Xchar *Read_env_string ANSI((char *));
Xint Write_env_string ANSI((char *, char *));
Xvoid ReadEnvironment ANSI(());
Xvoid Catch_signals ANSI((void (*)()));
Xvoid Clear_signals ANSI(());
Xvoid Prolog ANSI((int, char* []));
Xvoid Epilog ANSI((int));
Xchar *Get_current_dir ANSI(());
Xint Set_dir ANSI((char*));
Xchar Get_switch_char ANSI(());
XFILE* Get_temp ANSI((char **, char *, int));
XFILE *Start_temp ANSI((char *, CELLPTR, char **));
Xvoid Open_temp_error ANSI((char *, char *));
Xvoid Link_temp ANSI((CELLPTR, FILE *, char *));
Xvoid Close_temp ANSI((CELLPTR, FILE *));
Xvoid Unlink_temp_files ANSI((CELLPTR));
Xvoid Handle_result ANSI((int, int, int, CELLPTR));
Xvoid Update_time_stamp ANSI((CELLPTR));
Xint Remove_file ANSI((char *));
Xvoid Parse ANSI((FILE *));
Xint Get_line ANSI((char *, FILE *));
Xchar *Do_comment ANSI((char *, char **, int));
Xchar *Get_token ANSI((TKSTRPTR, char *, int));
Xvoid Quit ANSI(());
Xvoid Read_state ANSI(());
Xvoid Write_state ANSI(());
Xint Check_state ANSI((CELLPTR, STRINGPTR *, int));
Xvoid Dump ANSI(());
Xvoid Dump_recipe ANSI((STRINGPTR));
Xint Parse_macro ANSI((char *, int));
Xint Macro_op ANSI((char *));
Xint Parse_rule_def ANSI((int *));
Xint Rule_op ANSI((char *));
Xvoid Add_recipe_to_list ANSI((char *, int, int));
Xvoid Bind_rules_to_targets ANSI((int));
Xint Set_group_attributes ANSI((char *));
XDFALINKPTR Match_dfa ANSI((char *));
Xvoid Check_circle_dfa ANSI(());
Xvoid Add_nfa ANSI((char *));
Xchar *Exec_function ANSI((char *));
Xint If_root_path ANSI((char *));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xvoid Clean_up_processes ANSI(());
Xint Wait_for_child ANSI((int, int));
Xtime_t seek_arch ANSI((char*, char*));
Xint touch_arch ANSI((char*, char*));
Xint _chdir ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xvoid Hook_std_writes ANSI((char *));
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5960 -ne `wc -c <'dmake/msdos/ztcdos/public.h'`; then
echo shar: \"'dmake/msdos/ztcdos/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/public.h'
fi
if test -f 'dmake/readme/os2' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/os2'\"
else
echo shar: Extracting \"'dmake/readme/os2'\" \(6432 characters\)
sed "s/^X//" >'dmake/readme/os2' <<'END_OF_FILE'
XOS/2 specific information for dmake. This information is provided in the
Xhope that it makes it easier to install and recompile dmake in a OS/2
Xenvironment. I do not own an OS/2 machine. As a result I rely on others to
Xinsure that this version of dmake works as advertized. If you have any
Xproblems with it please fix them and send me the differences so that
XI can incorporate them into future releases and patches.
X
XNotes on the OS/2 implementation of dmake:
X==========================================
X
XAs shipped the DOS versions of dmake will run under OS/2 protected mode.
XHowever, support for a full OS/2 version is also provided. The OS/2 version
Xwill run in parallel under OS/2. The port was made possible by files supplied
Xby:
X
X Duncan Booth -- (dun...@ibmpcug.co.uk, Bix:jrichards)
X Kai Uwe Rommel -- (rom...@lan.informatik.tu-muenchen.dbp.de),
X
XFor which I am grateful. I have taken the two ports and integrated them
Xinto a single port using the structure supplied by Duncan Booth, and some
Xfiles and OS2'ism supplied by Kai Rommel.
X
XIf there are any problems with the port then please let myself or one of the
Xtwo people above know. I will then attempt to fix the problem. I do not
Xhave access to an OS/2 box to verify any problems myself.
X
X
XBootstrapping the binary:
X-------------------------
X A make.cmd file is provided to bootstrap the binary. The file contains
X several targets for bootstrapping. Invoking the batch file with no
X arguments lists the possibilities shown below.
X
X INDEX: You must specify one of:
X msc40 - Microsoft C 4.0 compile.
X msc50 - Microsoft C 5.0 compile.
X msc51 - Microsoft C 5.1 compile.
X msc60 - Microsoft C 6.0 compile.
X ibm - IBM C2 compile.
X
X Based on the compiler you have installed and whether or not you
X want the swapping version of dmake, you should select the appropriate
X target and issue 'make.cmd target'.
X
X The command file runs a second command script that comes with the
X distribution which compiles the sources using the appropriate compiler and
X flags. The MSC Versions of the batch files should not require any further
X user intervention during the compile.
X
X By default the command files make an executable that will run on an 8088
X cpu and up. You can change that by making the initial version and then
X editing the config.mk file found in os2/mscdos and selecting a diferrent
X cpu type by supplying the appropriate compiler flags.
X You then need to remake dmake again but this time use dmake itself,
X see below.
X
X
XUsing dmake to Make itself:
X---------------------------
X If you use dmake to make itself you must first set a number of makefile
X control variables, either through the environment or on the command line.
X
X The following variables must be set:
X
X OS - defines operating system (must be set)
X OSRELEASE - particular version of it.
X OSENVIRNOMENT - more customization (not needed for OS/2)
X
X These three variables should be defined in your environment. Valid values
X for them are listed in the dmake makefile.mk file. For example, if you
X are using OS/2, with Microsoft-C then the valid settings are:
X
X set OS=os2
X set OSRELEASE=mscdos
X
X The dmake makefile has several variables that can be user specified and
X default to reasonable values if not set.
X
X MODEL - defines the model to compile, valid values are
X {s,c,m, or l}, defaults to 'l' (ie. large) model
X if unspecified.
X
X MSC_VER - defines the version of Microsoft C in use, should be set to
X one of 4.0, 5.0, 5.1 or 6.0; defaults to 6.0.
X
X DEBUG - If set to '1' then make the debugging version of dmake, this
X will also set MODEL to 'l'.
X
X To set the above variables you must specify them on the dmake command line
X or insert them into the makefile.mk script.
X
X Finally, dmake searches for an initial startup file, you should set the
X environment variable MAKESTARTUP to contain the full path to the startup
X file, eg:
X
X set MAKESTARTUP=d:\init\startup.mk
X
X See the dmake man page in the src/man subdirectory for additional details
X of how dmake starts up.
X
X
XOS/2 Specifics
X--------------
X
X There is a small number of OS/2 specific features that need to be
X stated.
X
X 1. The environment variables TMP as well as TMPDIR are checked for the
X location of the directory where dmake should place any temporary files.
X TMPDIR is checked before TMP.
X
X 2. Appropriate limits are setup for MAXPROCESSES and buffer sizes etc.
X See output of 'dmake -V'.
X
X 3. By default dmake will look for the startup.mk file in the path:
X
X $(INIT)/dmake.ini
X
X This is more in keeping with OS/2 philosophy. You may still rename
X and put it anywhere else you like by defining the MAKESTARTUP
X environment variable.
X
X 4. The OS/2 directory contains files required by Kai Rommel's compiler
X shell. However you do not need the compiler shell to build dmake.
X
X 5. Swapping the dmake binary to disk is not supported under OS/2.
X
X 6. Caching directories is not supported under OS/2 if you anyone wants
X to add this grab the code in unix/cache.c and an OS/2 implementation
X of opendir/readdir/closedir and hack away. Please send me the results.
X
X
XOther notes:
X------------
X dmake does not care if you are running cmd.exe or some other command
X interpretter, you must however specify the proper values of the environment
X variables SHELL, SHELLFLAGS, GROUPSHELL, and GROUPFLAGS in order for things
X to work correctly. Read the man page first.
X
X Group recipes under OS/2 that use cmd.exe as the command interpretter
X require you to set the GROUPSUFFIX macro.
X
X As shipped the startup.mk files try to figure out what
X command interpretter you are using and set things up appropriately.
X Two command interpretters are supported in the shipped startup.mk file,
X cmd.exe (via COMSPEC), and the MKS Korn shell.
X
X dmake does not contain any builtin commands. It gets all commands it
X executes from an external file system. It is therefore most useful if it
X is used in conjunction with an environment similar to that provided by
X the MKS Tool kit, or equivalent.
X
X dmake now supports the MKS argument passing conventions. The facility is
X enabled by setting .MKSARGS:=1 and is set by default in the startup.mk file
X if an MKS Korn shell is detected as being the active command interpretter.
END_OF_FILE
if test 6432 -ne `wc -c <'dmake/readme/os2'`; then
echo shar: \"'dmake/readme/os2'\" unpacked with wrong size!
fi
# end of 'dmake/readme/os2'
fi
if test -f 'dmake/unix/solaris/getcwd.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/getcwd.c'\"
else
echo shar: Extracting \"'dmake/unix/solaris/getcwd.c'\" \(5834 characters\)
sed "s/^X//" >'dmake/unix/solaris/getcwd.c' <<'END_OF_FILE'
X/*
X getcwd -- get pathname of current working directory
X
X public-domain implementation
X
X last edit: 03-Nov-1990 Gw...@BRL.MIL
X
X complies with the following standards:
X IEEE Std 1003.1-1988
X SVID Issue 3
X X/Open Portability Guide Issue 2 (when "XPG2" is defined)
X X/Open Portability Guide Issue 3
X
X This implementation of getcwd() can be used to replace the UNIX
X System V library routine (which uses popen() to capture the output of
X the "pwd" command). Once that is done, "pwd" can be reimplemented as
X just puts(getcwd((char*)0,0)), assuming "XPG2" is defined below.
X
X This implementation depends on every directory having entries for
X "." and "..". It also depends on the internals of the <dirent.h>
X data structures to some degree.
X
X I considered using chdir() to ascend the hierarchy, followed by a
X final chdir() to the path being returned by getcwd() to restore the
X location, but decided that error recovery was too difficult that way.
X The algorithm I settled on was inspired by my rewrite of the "pwd"
X utility, combined with the dotdots[] array trick from the SVR2 shell.
X*/
X#define XPG2 /* define to support obsolete XPG2-mandated feature */
X
X
X#include <sys/types.h>
X#include <sys/stat.h>
X
X#ifdef M_XENIX
X# include <sys/ndir.h>
X# define dirent direct
X#else
X# include <dirent.h>
X#endif
X
X#include <errno.h>
X#include <string.h>
X
Xtypedef char *pointer; /* (void *) if you have it */
X
Xextern void free();
Xextern pointer malloc();
Xextern int fstat(), stat();
X
Xextern int errno; /* normally done by <errno.h> */
X
X#ifndef NULL
X#define NULL 0 /* amorphous null pointer constant */
X#endif
X
X#ifndef NAME_MAX
X#define NAME_MAX 255 /* maximum directory entry size */
X#endif
X
X
Xchar *
Xgetcwd( buf, size ) /* returns pointer to CWD pathname */
X char *buf; /* where to put name (NULL to malloc) */
X int size; /* size of buf[] or malloc()ed memory */
X {
X static char dotdots[] =
X"../../../../../../../../../../../../../../../../../../../../../../../../../..";
X char *dotdot; /* -> dotdots[.], right to left */
X DIR *dirp; /* -> parent directory stream */
X struct dirent *dir; /* -> directory entry */
X struct stat stat1,
X stat2; /* info from stat() */
X struct stat *d = &stat1; /* -> info about "." */
X struct stat *dd = &stat2; /* -> info about ".." */
X register char *buffer; /* local copy of buf, or malloc()ed */
X char *bufend; /* -> buffer[size] */
X register char *endp; /* -> end of reversed string */
X register char *dname; /* entry name ("" for root) */
X int serrno = errno; /* save entry errno */
X
X if ( buf != NULL && size <= 0
X#ifndef XPG2
X || buf == NULL
X#endif
X ) {
X errno = EINVAL; /* invalid argument */
X return NULL;
X }
X
X buffer = buf;
X#ifdef XPG2
X if ( buf == NULL /* wants us to malloc() the string */
X && (buffer = (char *) malloc( (unsigned) size )) == NULL
X /* XXX -- actually should probably not pay attention to "size" arg */
X ) {
X errno = ENOMEM; /* cannot malloc() specified size */
X return NULL;
X }
X#endif
X
X if ( stat( ".", dd ) != 0 ) /* prime the pump */
X goto error; /* errno already set */
X
X endp = buffer; /* initially, empty string */
X bufend = &buffer[size];
X
X for ( dotdot = &dotdots[sizeof dotdots]; dotdot != dotdots; )
X {
X dotdot -= 3; /* include one more "/.." section */
X /* (first time is actually "..") */
X
X /* swap stat() info buffers */
X {
X register struct stat *temp = d;
X
X d = dd; /* new current dir is old parent dir */
X dd = temp;
X }
X
X if ( (dirp = opendir( dotdot )) == NULL ) /* new parent */
X goto error; /* errno already set */
X
X if ( fstat( dirp->dd_fd, dd ) != 0 )
X {
X serrno = errno; /* set by fstat() */
X (void)closedir( dirp );
X errno = serrno; /* in case closedir() clobbered it */
X goto error;
X }
X
X if ( d->st_dev == dd->st_dev )
X { /* not crossing a mount point */
X if ( d->st_ino == dd->st_ino )
X { /* root directory */
X dname = "";
X goto append;
X }
X
X do
X if ( (dir = readdir( dirp )) == NULL )
X {
X (void)closedir( dirp );
X errno = ENOENT; /* missing entry */
X goto error;
X }
X while ( dir->d_ino != d->st_ino );
X }
X else { /* crossing a mount point */
X struct stat t; /* info re. test entry */
X char name[sizeof dotdots + 1 + NAME_MAX];
X
X (void)strcpy( name, dotdot );
X dname = &name[strlen( name )];
X *dname++ = '/';
X
X do {
X if ( (dir = readdir( dirp )) == NULL )
X {
X (void)closedir( dirp );
X errno = ENOENT; /* missing entry */
X goto error;
X }
X
X (void)strcpy( dname, dir->d_name );
X /* must fit if NAME_MAX is not a lie */
X }
X while ( stat( name, &t ) != 0
X || t.st_ino != d->st_ino
X || t.st_dev != d->st_dev
X );
X }
X
X dname = dir->d_name;
X
X /* append "/" and reversed dname string onto buffer */
X append:
X if ( endp != buffer /* avoid trailing / in final name */
X || dname[0] == '\0' /* but allow "/" when CWD is root */
X )
X *endp++ = '/';
X
X {
X register char *app; /* traverses dname string */
X
X for ( app = dname; *app != '\0'; ++app )
X ;
X
X if ( app - dname >= bufend - endp )
X {
X (void)closedir( dirp );
X errno = ERANGE; /* won't fit allotted space */
X goto error;
X }
X
X while ( app != dname )
X *endp++ = *--app;
X }
X
X (void)closedir( dirp );
X
X if ( dname[0] == '\0' ) /* reached root; wrap it up */
X {
X register char *startp; /* -> buffer[.] */
X
X *endp = '\0'; /* plant null terminator */
X
X /* straighten out reversed pathname string */
X for ( startp = buffer; --endp > startp; ++startp )
X {
X char temp = *endp;
X
X *endp = *startp;
X *startp = temp;
X }
X
X errno = serrno; /* restore entry errno */
X /* XXX -- if buf==NULL, realloc here? */
X return buffer;
X }
X }
X
X errno = ENOMEM; /* actually, algorithm failure */
X
X error:
X if ( buf == NULL )
X free( (pointer)buffer );
X
X return NULL;
X }
X
END_OF_FILE
if test 5834 -ne `wc -c <'dmake/unix/solaris/getcwd.c'`; then
echo shar: \"'dmake/unix/solaris/getcwd.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/getcwd.c'
fi
if test -f 'dmake/unix/sysvr3/pwd/getcwd.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/pwd/getcwd.c'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/pwd/getcwd.c'\" \(5834 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/pwd/getcwd.c' <<'END_OF_FILE'
X/*
X getcwd -- get pathname of current working directory
X
X public-domain implementation
X
X last edit: 03-Nov-1990 Gw...@BRL.MIL
X
X complies with the following standards:
X IEEE Std 1003.1-1988
X SVID Issue 3
X X/Open Portability Guide Issue 2 (when "XPG2" is defined)
X X/Open Portability Guide Issue 3
X
X This implementation of getcwd() can be used to replace the UNIX
X System V library routine (which uses popen() to capture the output of
X the "pwd" command). Once that is done, "pwd" can be reimplemented as
X just puts(getcwd((char*)0,0)), assuming "XPG2" is defined below.
X
X This implementation depends on every directory having entries for
X "." and "..". It also depends on the internals of the <dirent.h>
X data structures to some degree.
X
X I considered using chdir() to ascend the hierarchy, followed by a
X final chdir() to the path being returned by getcwd() to restore the
X location, but decided that error recovery was too difficult that way.
X The algorithm I settled on was inspired by my rewrite of the "pwd"
X utility, combined with the dotdots[] array trick from the SVR2 shell.
X*/
X#define XPG2 /* define to support obsolete XPG2-mandated feature */
X
X
X#include <sys/types.h>
X#include <sys/stat.h>
X
X#ifdef M_XENIX
X# include <sys/ndir.h>
X# define dirent direct
X#else
X# include <dirent.h>
X#endif
X
X#include <errno.h>
X#include <string.h>
X
Xtypedef char *pointer; /* (void *) if you have it */
X
Xextern void free();
Xextern pointer malloc();
Xextern int fstat(), stat();
X
Xextern int errno; /* normally done by <errno.h> */
X
X#ifndef NULL
X#define NULL 0 /* amorphous null pointer constant */
X#endif
X
X#ifndef NAME_MAX
X#define NAME_MAX 255 /* maximum directory entry size */
X#endif
X
X
Xchar *
Xgetcwd( buf, size ) /* returns pointer to CWD pathname */
X char *buf; /* where to put name (NULL to malloc) */
X int size; /* size of buf[] or malloc()ed memory */
X {
X static char dotdots[] =
X"../../../../../../../../../../../../../../../../../../../../../../../../../..";
X char *dotdot; /* -> dotdots[.], right to left */
X DIR *dirp; /* -> parent directory stream */
X struct dirent *dir; /* -> directory entry */
X struct stat stat1,
X stat2; /* info from stat() */
X struct stat *d = &stat1; /* -> info about "." */
X struct stat *dd = &stat2; /* -> info about ".." */
X register char *buffer; /* local copy of buf, or malloc()ed */
X char *bufend; /* -> buffer[size] */
X register char *endp; /* -> end of reversed string */
X register char *dname; /* entry name ("" for root) */
X int serrno = errno; /* save entry errno */
X
X if ( buf != NULL && size <= 0
X#ifndef XPG2
X || buf == NULL
X#endif
X ) {
X errno = EINVAL; /* invalid argument */
X return NULL;
X }
X
X buffer = buf;
X#ifdef XPG2
X if ( buf == NULL /* wants us to malloc() the string */
X && (buffer = (char *) malloc( (unsigned) size )) == NULL
X /* XXX -- actually should probably not pay attention to "size" arg */
X ) {
X errno = ENOMEM; /* cannot malloc() specified size */
X return NULL;
X }
X#endif
X
X if ( stat( ".", dd ) != 0 ) /* prime the pump */
X goto error; /* errno already set */
X
X endp = buffer; /* initially, empty string */
X bufend = &buffer[size];
X
X for ( dotdot = &dotdots[sizeof dotdots]; dotdot != dotdots; )
X {
X dotdot -= 3; /* include one more "/.." section */
X /* (first time is actually "..") */
X
X /* swap stat() info buffers */
X {
X register struct stat *temp = d;
X
X d = dd; /* new current dir is old parent dir */
X dd = temp;
X }
X
X if ( (dirp = opendir( dotdot )) == NULL ) /* new parent */
X goto error; /* errno already set */
X
X if ( fstat( dirp->dd_fd, dd ) != 0 )
X {
X serrno = errno; /* set by fstat() */
X (void)closedir( dirp );
X errno = serrno; /* in case closedir() clobbered it */
X goto error;
X }
X
X if ( d->st_dev == dd->st_dev )
X { /* not crossing a mount point */
X if ( d->st_ino == dd->st_ino )
X { /* root directory */
X dname = "";
X goto append;
X }
X
X do
X if ( (dir = readdir( dirp )) == NULL )
X {
X (void)closedir( dirp );
X errno = ENOENT; /* missing entry */
X goto error;
X }
X while ( dir->d_ino != d->st_ino );
X }
X else { /* crossing a mount point */
X struct stat t; /* info re. test entry */
X char name[sizeof dotdots + 1 + NAME_MAX];
X
X (void)strcpy( name, dotdot );
X dname = &name[strlen( name )];
X *dname++ = '/';
X
X do {
X if ( (dir = readdir( dirp )) == NULL )
X {
X (void)closedir( dirp );
X errno = ENOENT; /* missing entry */
X goto error;
X }
X
X (void)strcpy( dname, dir->d_name );
X /* must fit if NAME_MAX is not a lie */
X }
X while ( stat( name, &t ) != 0
X || t.st_ino != d->st_ino
X || t.st_dev != d->st_dev
X );
X }
X
X dname = dir->d_name;
X
X /* append "/" and reversed dname string onto buffer */
X append:
X if ( endp != buffer /* avoid trailing / in final name */
X || dname[0] == '\0' /* but allow "/" when CWD is root */
X )
X *endp++ = '/';
X
X {
X register char *app; /* traverses dname string */
X
X for ( app = dname; *app != '\0'; ++app )
X ;
X
X if ( app - dname >= bufend - endp )
X {
X (void)closedir( dirp );
X errno = ERANGE; /* won't fit allotted space */
X goto error;
X }
X
X while ( app != dname )
X *endp++ = *--app;
X }
X
X (void)closedir( dirp );
X
X if ( dname[0] == '\0' ) /* reached root; wrap it up */
X {
X register char *startp; /* -> buffer[.] */
X
X *endp = '\0'; /* plant null terminator */
X
X /* straighten out reversed pathname string */
X for ( startp = buffer; --endp > startp; ++startp )
X {
X char temp = *endp;
X
X *endp = *startp;
X *startp = temp;
X }
X
X errno = serrno; /* restore entry errno */
X /* XXX -- if buf==NULL, realloc here? */
X return buffer;
X }
X }
X
X errno = ENOMEM; /* actually, algorithm failure */
X
X error:
X if ( buf == NULL )
X free( (pointer)buffer );
X
X return NULL;
X }
X
END_OF_FILE
if test 5834 -ne `wc -c <'dmake/unix/sysvr3/pwd/getcwd.c'`; then
echo shar: \"'dmake/unix/sysvr3/pwd/getcwd.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/pwd/getcwd.c'
fi
if test -f 'dmake/unix/xenix/pwd/getcwd.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/pwd/getcwd.c'\"
else
echo shar: Extracting \"'dmake/unix/xenix/pwd/getcwd.c'\" \(5834 characters\)
sed "s/^X//" >'dmake/unix/xenix/pwd/getcwd.c' <<'END_OF_FILE'
X/*
X getcwd -- get pathname of current working directory
X
X public-domain implementation
X
X last edit: 03-Nov-1990 Gw...@BRL.MIL
X
X complies with the following standards:
X IEEE Std 1003.1-1988
X SVID Issue 3
X X/Open Portability Guide Issue 2 (when "XPG2" is defined)
X X/Open Portability Guide Issue 3
X
X This implementation of getcwd() can be used to replace the UNIX
X System V library routine (which uses popen() to capture the output of
X the "pwd" command). Once that is done, "pwd" can be reimplemented as
X just puts(getcwd((char*)0,0)), assuming "XPG2" is defined below.
X
X This implementation depends on every directory having entries for
X "." and "..". It also depends on the internals of the <dirent.h>
X data structures to some degree.
X
X I considered using chdir() to ascend the hierarchy, followed by a
X final chdir() to the path being returned by getcwd() to restore the
X location, but decided that error recovery was too difficult that way.
X The algorithm I settled on was inspired by my rewrite of the "pwd"
X utility, combined with the dotdots[] array trick from the SVR2 shell.
X*/
X#define XPG2 /* define to support obsolete XPG2-mandated feature */
X
X
X#include <sys/types.h>
X#include <sys/stat.h>
X
X#ifdef M_XENIX
X# include <sys/ndir.h>
X# define dirent direct
X#else
X# include <dirent.h>
X#endif
X
X#include <errno.h>
X#include <string.h>
X
Xtypedef char *pointer; /* (void *) if you have it */
X
Xextern void free();
Xextern pointer malloc();
Xextern int fstat(), stat();
X
Xextern int errno; /* normally done by <errno.h> */
X
X#ifndef NULL
X#define NULL 0 /* amorphous null pointer constant */
X#endif
X
X#ifndef NAME_MAX
X#define NAME_MAX 255 /* maximum directory entry size */
X#endif
X
X
Xchar *
Xgetcwd( buf, size ) /* returns pointer to CWD pathname */
X char *buf; /* where to put name (NULL to malloc) */
X int size; /* size of buf[] or malloc()ed memory */
X {
X static char dotdots[] =
X"../../../../../../../../../../../../../../../../../../../../../../../../../..";
X char *dotdot; /* -> dotdots[.], right to left */
X DIR *dirp; /* -> parent directory stream */
X struct dirent *dir; /* -> directory entry */
X struct stat stat1,
X stat2; /* info from stat() */
X struct stat *d = &stat1; /* -> info about "." */
X struct stat *dd = &stat2; /* -> info about ".." */
X register char *buffer; /* local copy of buf, or malloc()ed */
X char *bufend; /* -> buffer[size] */
X register char *endp; /* -> end of reversed string */
X register char *dname; /* entry name ("" for root) */
X int serrno = errno; /* save entry errno */
X
X if ( buf != NULL && size <= 0
X#ifndef XPG2
X || buf == NULL
X#endif
X ) {
X errno = EINVAL; /* invalid argument */
X return NULL;
X }
X
X buffer = buf;
X#ifdef XPG2
X if ( buf == NULL /* wants us to malloc() the string */
X && (buffer = (char *) malloc( (unsigned) size )) == NULL
X /* XXX -- actually should probably not pay attention to "size" arg */
X ) {
X errno = ENOMEM; /* cannot malloc() specified size */
X return NULL;
X }
X#endif
X
X if ( stat( ".", dd ) != 0 ) /* prime the pump */
X goto error; /* errno already set */
X
X endp = buffer; /* initially, empty string */
X bufend = &buffer[size];
X
X for ( dotdot = &dotdots[sizeof dotdots]; dotdot != dotdots; )
X {
X dotdot -= 3; /* include one more "/.." section */
X /* (first time is actually "..") */
X
X /* swap stat() info buffers */
X {
X register struct stat *temp = d;
X
X d = dd; /* new current dir is old parent dir */
X dd = temp;
X }
X
X if ( (dirp = opendir( dotdot )) == NULL ) /* new parent */
X goto error; /* errno already set */
X
X if ( fstat( dirp->dd_fd, dd ) != 0 )
X {
X serrno = errno; /* set by fstat() */
X (void)closedir( dirp );
X errno = serrno; /* in case closedir() clobbered it */
X goto error;
X }
X
X if ( d->st_dev == dd->st_dev )
X { /* not crossing a mount point */
X if ( d->st_ino == dd->st_ino )
X { /* root directory */
X dname = "";
X goto append;
X }
X
X do
X if ( (dir = readdir( dirp )) == NULL )
X {
X (void)closedir( dirp );
X errno = ENOENT; /* missing entry */
X goto error;
X }
X while ( dir->d_ino != d->st_ino );
X }
X else { /* crossing a mount point */
X struct stat t; /* info re. test entry */
X char name[sizeof dotdots + 1 + NAME_MAX];
X
X (void)strcpy( name, dotdot );
X dname = &name[strlen( name )];
X *dname++ = '/';
X
X do {
X if ( (dir = readdir( dirp )) == NULL )
X {
X (void)closedir( dirp );
X errno = ENOENT; /* missing entry */
X goto error;
X }
X
X (void)strcpy( dname, dir->d_name );
X /* must fit if NAME_MAX is not a lie */
X }
X while ( stat( name, &t ) != 0
X || t.st_ino != d->st_ino
X || t.st_dev != d->st_dev
X );
X }
X
X dname = dir->d_name;
X
X /* append "/" and reversed dname string onto buffer */
X append:
X if ( endp != buffer /* avoid trailing / in final name */
X || dname[0] == '\0' /* but allow "/" when CWD is root */
X )
X *endp++ = '/';
X
X {
X register char *app; /* traverses dname string */
X
X for ( app = dname; *app != '\0'; ++app )
X ;
X
X if ( app - dname >= bufend - endp )
X {
X (void)closedir( dirp );
X errno = ERANGE; /* won't fit allotted space */
X goto error;
X }
X
X while ( app != dname )
X *endp++ = *--app;
X }
X
X (void)closedir( dirp );
X
X if ( dname[0] == '\0' ) /* reached root; wrap it up */
X {
X register char *startp; /* -> buffer[.] */
X
X *endp = '\0'; /* plant null terminator */
X
X /* straighten out reversed pathname string */
X for ( startp = buffer; --endp > startp; ++startp )
X {
X char temp = *endp;
X
X *endp = *startp;
X *startp = temp;
X }
X
X errno = serrno; /* restore entry errno */
X /* XXX -- if buf==NULL, realloc here? */
X return buffer;
X }
X }
X
X errno = ENOMEM; /* actually, algorithm failure */
X
X error:
X if ( buf == NULL )
X free( (pointer)buffer );
X
X return NULL;
X }
X
END_OF_FILE
if test 5834 -ne `wc -c <'dmake/unix/xenix/pwd/getcwd.c'`; then
echo shar: \"'dmake/unix/xenix/pwd/getcwd.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/pwd/getcwd.c'
fi
echo shar: End of archive 15 \(of 27\).
cp /dev/null ark15isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/mac/bogus.c dmake/msdos/mscdos/public.h
# dmake/os2/ibm/public.h dmake/os2/mscdos/public.h
# dmake/unix/bsd43/uw/public.h dmake/unix/bsd43/vf/public.h
# dmake/unix/coherent/public.h dmake/unix/solaris/gcc/public.h
# dmake/unix/solaris/public.h dmake/unix/sysvr3/pwd/public.h
# dmake/unix/xenix/pwd/public.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:43 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 16 (of 27)."'
if test -f 'dmake/mac/bogus.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/bogus.c'\"
else
echo shar: Extracting \"'dmake/mac/bogus.c'\" \(2796 characters\)
sed "s/^X//" >'dmake/mac/bogus.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/bogus.c,v 1.1 1994/10/06 17:42:55 dvadura Exp $
X-- SYNOPSIS -- Write the shell of subroutines we can't or don't
X-- need to implement
X--
X-- DESCRIPTION
X-- dmake uses a couple of functions which I am either unable to figure out
X-- how to implement or which are not needed. The shells of these routines
X-- are in this file.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: bogus.c,v $
X * Revision 1.1 1994/10/06 17:42:55 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X
X
X/*
X * tzset() is a Microsoft "extension" to ANSI C. It sets global
X * variables telling if we are in dayling savings time, the time
X * zone, and difference between the current time and GMT.
X * None of these globals are used by dmake, so this routine is
X * not needed
X */
XPUBLIC void
Xtzset ()
X{
X}
X
X
X
X/*
X * Add an environmental variable that child processes can use.
X * Since MPW currently doesn't allow child processes, this isn't
X * needed.
X */
XPUBLIC int
Xputenv (char *pEnvString)
X{
X return (0);
X}
X
X
X
X/*
X * Execute a child process. This may be able to be done with
X * the MPW system() call someday, but cannot be done currently.
X */
XPUBLIC int
Xrunargv (CELLPTR target, int ignore, int,
X int last, int shell, char *pCmd)
X{
X static int warned = FALSE;
X
X if (!warned && !(Glob_attr & A_SILENT)) {
X warned = TRUE;
X Fatal ("Can't execute any targets: use '-n' option.");
X } /* if */
X
X return (0);
X} /* int runargv () */
X
X
X
X/*
X * Wait for the child process to complete. Only needed to be implemented
X * if we could executing multiple processes at once.
X */
XPUBLIC int
XWait_for_child(int abort_flg, int pid)
X{
X return (1);
X}
X
X
X
X/*
X * Do any cleanup for any processes when we quit.
X */
XPUBLIC void
XClean_up_processes()
X{
X}
END_OF_FILE
if test 2796 -ne `wc -c <'dmake/mac/bogus.c'`; then
echo shar: \"'dmake/mac/bogus.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/bogus.c'
fi
if test -f 'dmake/msdos/mscdos/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/public.h'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/public.h'\" \(5960 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/public.h' <<'END_OF_FILE'
if test 5960 -ne `wc -c <'dmake/msdos/mscdos/public.h'`; then
echo shar: \"'dmake/msdos/mscdos/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/public.h'
fi
if test -f 'dmake/os2/ibm/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/public.h'\"
else
echo shar: Extracting \"'dmake/os2/ibm/public.h'\" \(5922 characters\)
sed "s/^X//" >'dmake/os2/ibm/public.h' <<'END_OF_FILE'
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xvoid SetSessionTitle ANSI((char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xint _chdir ANSI((char *));
Xint If_root_path ANSI((char *));
Xtime_t seek_arch ANSI((char*, char*));
Xint touch_arch ANSI((char*, char*));
Xvoid Remove_prq ANSI((CELLPTR));
X
X#endif
END_OF_FILE
if test 5922 -ne `wc -c <'dmake/os2/ibm/public.h'`; then
echo shar: \"'dmake/os2/ibm/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/public.h'
fi
if test -f 'dmake/os2/mscdos/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/public.h'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/public.h'\" \(5922 characters\)
sed "s/^X//" >'dmake/os2/mscdos/public.h' <<'END_OF_FILE'
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xvoid SetSessionTitle ANSI((char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xint _chdir ANSI((char *));
Xint If_root_path ANSI((char *));
Xtime_t seek_arch ANSI((char*, char*));
Xint touch_arch ANSI((char*, char*));
Xvoid Remove_prq ANSI((CELLPTR));
X
X#endif
END_OF_FILE
if test 5922 -ne `wc -c <'dmake/os2/mscdos/public.h'`; then
echo shar: \"'dmake/os2/mscdos/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/public.h'
fi
if test -f 'dmake/unix/bsd43/uw/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/uw/public.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/uw/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/bsd43/uw/public.h' <<'END_OF_FILE'
Xtime_t seek_arch ANSI((char *, char *));
Xint If_root_path ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5861 -ne `wc -c <'dmake/unix/bsd43/uw/public.h'`; then
echo shar: \"'dmake/unix/bsd43/uw/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/uw/public.h'
fi
if test -f 'dmake/unix/bsd43/vf/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/vf/public.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/vf/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/bsd43/vf/public.h' <<'END_OF_FILE'
Xtime_t seek_arch ANSI((char *, char *));
Xint If_root_path ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5861 -ne `wc -c <'dmake/unix/bsd43/vf/public.h'`; then
echo shar: \"'dmake/unix/bsd43/vf/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/vf/public.h'
fi
if test -f 'dmake/unix/coherent/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/public.h'\"
else
echo shar: Extracting \"'dmake/unix/coherent/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/coherent/public.h' <<'END_OF_FILE'
Xtime_t seek_arch ANSI((char *, char *));
Xint If_root_path ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5861 -ne `wc -c <'dmake/unix/coherent/public.h'`; then
echo shar: \"'dmake/unix/coherent/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/public.h'
fi
if test -f 'dmake/unix/solaris/gcc/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/gcc/public.h'\"
else
echo shar: Extracting \"'dmake/unix/solaris/gcc/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/solaris/gcc/public.h' <<'END_OF_FILE'
Xtime_t seek_arch ANSI((char *, char *));
Xint If_root_path ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5861 -ne `wc -c <'dmake/unix/solaris/gcc/public.h'`; then
echo shar: \"'dmake/unix/solaris/gcc/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/gcc/public.h'
fi
if test -f 'dmake/unix/solaris/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/public.h'\"
else
echo shar: Extracting \"'dmake/unix/solaris/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/solaris/public.h' <<'END_OF_FILE'
Xtime_t seek_arch ANSI((char *, char *));
Xint If_root_path ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5861 -ne `wc -c <'dmake/unix/solaris/public.h'`; then
echo shar: \"'dmake/unix/solaris/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/public.h'
fi
if test -f 'dmake/unix/sysvr3/pwd/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/pwd/public.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/pwd/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/pwd/public.h' <<'END_OF_FILE'
Xtime_t seek_arch ANSI((char *, char *));
Xint If_root_path ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5861 -ne `wc -c <'dmake/unix/sysvr3/pwd/public.h'`; then
echo shar: \"'dmake/unix/sysvr3/pwd/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/pwd/public.h'
fi
if test -f 'dmake/unix/xenix/pwd/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/pwd/public.h'\"
else
echo shar: Extracting \"'dmake/unix/xenix/pwd/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/xenix/pwd/public.h' <<'END_OF_FILE'
Xtime_t seek_arch ANSI((char *, char *));
Xint If_root_path ANSI((char *));
Xvoid Remove_prq ANSI((CELLPTR));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
X
X#endif
END_OF_FILE
if test 5861 -ne `wc -c <'dmake/unix/xenix/pwd/public.h'`; then
echo shar: \"'dmake/unix/xenix/pwd/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/pwd/public.h'
fi
echo shar: End of archive 16 \(of 27\).
cp /dev/null ark16isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/os2/mscdos/mk51.cmd dmake/qnx/public.h
# dmake/readme/unix dmake/state.c dmake/tos/public.h
# dmake/unix/386ix/public.h dmake/unix/bsd43/public.h
# dmake/unix/sysvr1/public.h dmake/unix/sysvr3/public.h
# dmake/unix/sysvr4/public.h dmake/unix/xenix/public.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:44 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 17 (of 27)."'
if test -f 'dmake/os2/mscdos/mk51.cmd' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/mk51.cmd'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/mk51.cmd'\" \(3388 characters\)
sed "s/^X//" >'dmake/os2/mscdos/mk51.cmd' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs make.c
Xcopy make.obj objects
Xdel make.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs path.c
Xcopy path.obj objects
Xdel path.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs state.c
Xcopy state.obj objects
Xdel state.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs function.c
Xcopy function.obj objects
Xdel function.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs os2\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs os2\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs os2\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs os2\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs unix\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=510 -Osl -Gs os2\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy os2\mscdos\startup.mk startup.mk
Xlink /stack:8192 /exe /packc /batch @os2\mscdos\obj.rsp,dmake.exe,NUL.MAP,,os2\dmake.def;
END_OF_FILE
if test 3388 -ne `wc -c <'dmake/os2/mscdos/mk51.cmd'`; then
echo shar: \"'dmake/os2/mscdos/mk51.cmd'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/mscdos/mk51.cmd'
# end of 'dmake/os2/mscdos/mk51.cmd'
fi
if test -f 'dmake/qnx/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/public.h'\"
else
echo shar: Extracting \"'dmake/qnx/public.h'\" \(5896 characters\)
sed "s/^X//" >'dmake/qnx/public.h' <<'END_OF_FILE'
Xint Wait_for_child ANSI((int, int));
Xvoid Clean_up_processes ANSI(());
Xtime_t CacheStat ANSI((char *, int));
Xvoid Remove_prq ANSI((CELLPTR));
Xint If_root_path ANSI((char *));
Xtime_t seek_arch ANSI((char*, char*));
Xint touch_arch ANSI((char*, char*));
X
X#endif
END_OF_FILE
if test 5896 -ne `wc -c <'dmake/qnx/public.h'`; then
echo shar: \"'dmake/qnx/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/public.h'
fi
if test -f 'dmake/readme/unix' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/unix'\"
else
echo shar: Extracting \"'dmake/readme/unix'\" \(5776 characters\)
sed "s/^X//" >'dmake/readme/unix' <<'END_OF_FILE'
XUNIX specific information for dmake. This information is provided in the
Xhope that it makes it easier to install and recompile dmake under UNIX.
XI will be happy to hear of erroneous information and will make every effort
Xto correct it.
X
X
X1. ENVIRONMENT VARIABLE SETTINGS
X
XThere are many environment variable settings available for UNIX. Each
Xoption is described below.
X
X OS - unix
X
X OSRELEASE - bsd43 # generic BSD 4.3
X - solaris # Solaris environments
X - sysvr1 # System V R1
X - sysvr3 # System V R3
X - sysvr4 # System V R4
X - xenix # Xenix
X - 386ix # Sun IPX 386 boxen
X - coherent # Coherent...
X - qnx # QNX
X
X OSENVIRONMENT - uw # U of Waterloo mfcf environment for BSD4.3
X - vf # for environments needing vfprintf
X - pwd # for environments needing new pwd
X - gcc # for GCC compiles with Solaris2.3 and greater
X
X
XThe table below lists valid combinations for settings of OS, OSRELEASE, and
XOSENVIRONMENT.
X
X OS OSRELEASE OSENVIRONMENT
X -- --------- -------------
X unix bsd43
X unix bsd43 uw
X unix bsd43 vf
X unix solaris
X unix solaris gcc
X unix sysvr1
X unix sysvr3
X unix sysvr3 pwd
X unix sysvr4
X unix xenix
X unix xenix pwd
X unix 386ix
X unix coherent
X unix qnx
X
XYou must set OS and OSRELEASE, OSENVIRONMENT to correspond to one of the
Xconfigurations in the above table.
X
X
X2. IMPLEMENTATION NOTES
X
XBootstrapping the binary:
X-------------------------
X A 'makefile' file is provided to bootstrap the binary. The file contains
X many targets for bootstrapping. Issuing 'make' will provide the list of
X possible targets that can be built. A restricted sample is shown below:
X
X INDEX: You must specify 'make target' where target is one of:
X -------------
X make bsd43 - Generic BSD 4.3 System
X make bsd43uw - Generic BSD 4.3 at U of Waterloo
X make bsd43vf - Generic BSD 4.3 that needs vfprintf
X make sysvr4 - Generic SysV R4 UNIX System
X make sysvr3 - Generic SysV R3 UNIX System
X make sysvr3pwd - Generic SysV R3 UNIX System, our PWD
X make sysvr1 - Generic SysV R1 UNIX System
X make dynix - Sequent DYNIX System
X make linux - Linux
X make ultrix - Ultrix 3.0 System
X make mips - Any MIPS System
X make coherent - Any Coherent System
X make hpux - HP Unix
X make 386ix - 386/ix (SysV R3) System
X make xenix - 386 Xenix System
X make xenixpwd - 386 Xenix System, our PWD
X make aix - IBM RS6000/AIX System
X make Solaris - SUN Solaris 1.0 to 2.0
X make Solaris2.1 - SUN Solaris 2.1 or greater
X make gccSolaris2.1 - SUN Solaris 2.1 or greater with gcc
X
X The above shows only the possible builds for UNIX like operating systems.
X Choose the one that best suits your needs and issue the command
X
X 'make target'
X
X
XUsing dmake to Make itself:
X---------------------------
X If you use dmake to make itself you must first set a number of makefile
X control variables, either through the environment or on the command line.
X
X The following variables must be set:
X
X OS - defines operating system (must be set)
X OSRELEASE - particular version of it.
X OSENVIRNOMENT - more customization
X
X These three variables should be defined in your environment. Valid values
X for UNIX are listed above in Section 1. You must chose one a setting from
X the table that best matches your system.
X
X
X.NAMEMAX and length fo file names:
X----------------------------------
Xdmake assumes that no file name component has a name longer than .NAMEMAX
X(an user-settable variable, see the man page). Files whose basename is
Xlonger than .NAMEMAX return a timestamp of 0 when statted. The reason for
Xthis test is to handle broken versions of stat that return non-zero times
Xfor stating files that are longer than the legal file name length but for
Xwhich a file whose name is the legal maximum file name length and is a prefix
Xof the longer name exists. This used to cause infinite loops in the inference
Xengine.
X
XAs a result the value of .NAMEMAX is important. dmake attempts to determine
Xit at from your system header files when compiled however sometimes even these
Xmay be erroneous thus as a result as of dmake 4.0 users may set the value of
X.NAMEMAX to any value they wish.
X
X
XLibrary Name Length:
X--------------------
XBy default the maximum length of library member names is defined in the the
Xar.h header file and is usually 14. Sun has extensions to this that allow
Xfor arbitrarily long member names. Currently dmake does not support this
Xextension, although it will do so in the next release.
X
X
XUNIX Sysv R3 and getcwd:
X------------------------
XSome versions of UNIX SysV R3 and Xenix use the popen call to capture the
Xoutput of pwd when invoking the C library function getcwd(). These versions
Xof the function cause dmake to terminate with the "lost a child" message
Xdue to the fact that the parent dmake process may catch the pwd and not
Xrecognize it as a child. For systems that have this problem use the version
Xof dmake that supplies its own getcwd function. The settings are:
X
X OS = unix
X OSRELEASE = sysvr3
X OSENVIRONMENT = pwd
X
XIt is directly available through the 'makefile' by typing one of:
X
X make sysvr3pwd
X make xenixpwd
X
Xboth include the getcwd code but the xenixpwd target compiles for a Xenix
Xsystem.
X
X
XUNIX and "limits.h":
X--------------------
XSome compilers do not yet provide the "limits.h" file, if yours is one of
Xthese then simply copy the file "namemax.h" in the source root directory to
X"limits.h". Make sure the length of a file name is correctly set in
X"limits.h" as it is processed prior to "namemax.h".
X
X
END_OF_FILE
if test 5776 -ne `wc -c <'dmake/readme/unix'`; then
echo shar: \"'dmake/readme/unix'\" unpacked with wrong size!
fi
# end of 'dmake/readme/unix'
fi
if test -f 'dmake/state.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/state.c'\"
else
echo shar: Extracting \"'dmake/state.c'\" \(5819 characters\)
sed "s/^X//" >'dmake/state.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/state.c,v 1.1 1994/10/06 17:41:25 dvadura Exp $
X-- SYNOPSIS -- .KEEP_STATE state file management
X--
X-- DESCRIPTION
X-- Three routines to interface to the .KEEP_STATE state file.
X--
X-- Read_state() - reads the state file if any.
X-- Write_state() - writes the state file.
X--
X-- Check_state(cp,how) - checks an entry returns 0 or 1
X-- and updates the entry.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: state.c,v $
X * Revision 1.1 1994/10/06 17:41:25 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
Xtypedef struct se {
X char *st_name; /* name of cell */
X uint32 st_nkey; /* name hash key */
X int st_count; /* how count for how */
X uint32 st_dkey; /* directory hash key */
X uint32 st_key; /* hash key */
X struct se *st_next;
X} KSTATE, *KSTATEPTR;
X
Xstatic KSTATEPTR _st_head = NIL(KSTATE);
Xstatic KSTATEPTR _st_tail = NIL(KSTATE);
Xstatic int _st_upd = FALSE;
Xstatic char *_st_file = NIL(char);
X
Xstatic int _my_fgets ANSI((char *, int, FILE *));
X
XPUBLIC void
XRead_state()
X{
X char *buf;
X char sizeb[20];
X int size;
X FILE *fp;
X KSTATEPTR sp;
X
X if( (fp = Search_file(".KEEP_STATE", &_st_file)) != NIL(FILE) ) {
X if( _my_fgets( sizeb, 20, fp ) ) {
X size = atol(sizeb);
X buf = MALLOC(size+2, char);
X
X while( _my_fgets(buf, size, fp) ) {
X TALLOC(sp, 1, KSTATE);
X sp->st_name = DmStrDup(buf);
X (void) Hash(buf, &sp->st_nkey);
X
X if( _my_fgets(buf, size, fp) ) sp->st_count = atoi(buf);
X if( _my_fgets(buf, size, fp) ) sp->st_dkey = (uint32) atol(buf);
X
X if( _my_fgets(buf, size, fp) )
X sp->st_key = (uint32) atol(buf);
X else {
X FREE(sp);
X break;
X }
X
X if( _st_head == NIL(KSTATE) )
X _st_head = sp;
X else
X _st_tail->st_next = sp;
X
X _st_tail = sp;
X }
X
X FREE(buf);
X }
X
X Closefile();
X }
X}
X
X
XPUBLIC void
XWrite_state()
X{
X static int in_write = 0;
X register KSTATEPTR sp;
X FILE *fp;
X
X if( !_st_upd || !_st_file || (_st_file && !*_st_file) ||
X Trace || in_write ) return;
X
X in_write++;
X if( (fp = Openfile(_st_file, TRUE, TRUE)) != NIL(FILE) ) {
X int maxlen = 0;
X int tmplen;
X
X for( sp = _st_head; sp; sp=sp->st_next )
X if( (tmplen = strlen(sp->st_name)+2) > maxlen )
X maxlen = tmplen;
X
X /* A nice arbitrary minimum size */
X if( maxlen < 20 ) maxlen = 20;
X fprintf( fp, "%d\n", maxlen );
X
X for( sp = _st_head; sp; sp=sp->st_next ) {
X uint16 hv;
X uint32 hk;
X
X if( Search_table(Defs, sp->st_name, &hv, &hk) ) {
X fprintf( fp, "%s\n", sp->st_name );
X fprintf( fp, "%d\n", sp->st_count );
X fprintf( fp, "%lu\n", sp->st_dkey );
X fprintf( fp, "%lu\n", sp->st_key );
X }
X }
X
X Closefile();
X }
X else
X Fatal("Cannot open STATE file %s", _st_file);
X
X in_write = 0;
X}
X
X
XPUBLIC int
XCheck_state( cp, recipes, maxrcp )
XCELLPTR cp;
XSTRINGPTR *recipes;
Xint maxrcp;
X{
X KSTATEPTR st;
X STRINGPTR sp;
X int i;
X uint32 thkey;
X uint32 hkey;
X uint32 nkey;
X uint32 dkey;
X int update = FALSE;
X
X if( !_st_file || (_st_file && !*_st_file) || Trace )
X return(FALSE);
X
X if( strcmp(cp->CE_NAME,".REMOVE") == 0
X || (cp->ce_attr & (A_PHONY|A_NOSTATE)) )
X return(FALSE);
X
X (void) Hash( cp->CE_NAME, &nkey ); thkey = nkey + (uint32) cp->ce_count;
X (void) Hash( Pwd, &dkey ); thkey += dkey;
X
X Suppress_temp_file = TRUE;
X for( i=0 ; i<maxrcp; i++ )
X for(sp=recipes[i]; sp != NIL(STRING); sp=sp->st_next ) {
X CELLPTR svct = Current_target;
X char *cmnd;
X t_attr silent = (Glob_attr & A_SILENT);
X
X Current_target = cp;
X Glob_attr |= A_SILENT;
X cmnd = Expand(sp->st_string);
X Glob_attr = (Glob_attr & ~A_SILENT)|silent;
X Current_target = svct;
X
X (void) Hash(cmnd, &hkey); thkey += hkey;
X FREE(cmnd);
X }
X Suppress_temp_file = FALSE;
X
X for( st=_st_head; st != NIL(KSTATE); st=st->st_next ) {
X if( st->st_nkey == nkey
X && st->st_dkey == dkey
X && st->st_count == cp->ce_count
X && !strcmp(cp->CE_NAME, st->st_name) )
X break;
X }
X
X if( st == NIL(KSTATE) ) {
X KSTATEPTR nst;
X
X TALLOC(nst, 1, KSTATE);
X nst->st_name = cp->CE_NAME;
X nst->st_nkey = nkey;
X nst->st_dkey = dkey;
X nst->st_key = thkey;
X nst->st_count = cp->ce_count;
X
X if( _st_head == NIL(KSTATE) )
X _st_head = nst;
X else
X _st_tail->st_next = nst;
X
X _st_tail = nst;
X _st_upd = TRUE;
X }
X else if( st->st_key != thkey ) {
X st->st_key = thkey;
X _st_upd = update = TRUE;
X }
X
X return(st != NIL(KSTATE) && update);
X}
X
X
Xstatic int
X_my_fgets(buf, size, fp)
Xchar *buf;
Xint size;
XFILE *fp;
X{
X char *p;
X
X if( fgets(buf, size, fp) == NULL ) return(0);
X
X if( (p=strrchr(buf,'\n')) != NIL(char) ) *p='\0';
X return(1);
X}
END_OF_FILE
if test 5819 -ne `wc -c <'dmake/state.c'`; then
echo shar: \"'dmake/state.c'\" unpacked with wrong size!
fi
# end of 'dmake/state.c'
fi
if test -f 'dmake/tos/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/public.h'\"
else
echo shar: Extracting \"'dmake/tos/public.h'\" \(5862 characters\)
sed "s/^X//" >'dmake/tos/public.h' <<'END_OF_FILE'
Xint touch_arch ANSI((char *, char *));
Xint runargv ANSI((CELLPTR, int, int, int, int, char *));
Xvoid Clean_up_processes ANSI(());
Xint Wait_for_child ANSI((int, int));
Xvoid Remove_prq ANSI((CELLPTR));
Xint If_root_path ANSI((char *));
X
X#endif
END_OF_FILE
if test 5862 -ne `wc -c <'dmake/tos/public.h'`; then
echo shar: \"'dmake/tos/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/tos/public.h'
fi
if test -f 'dmake/unix/386ix/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/public.h'\"
else
echo shar: Extracting \"'dmake/unix/386ix/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/386ix/public.h' <<'END_OF_FILE'
if test 5861 -ne `wc -c <'dmake/unix/386ix/public.h'`; then
echo shar: \"'dmake/unix/386ix/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/public.h'
fi
if test -f 'dmake/unix/bsd43/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/public.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/bsd43/public.h' <<'END_OF_FILE'
if test 5861 -ne `wc -c <'dmake/unix/bsd43/public.h'`; then
echo shar: \"'dmake/unix/bsd43/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/public.h'
fi
if test -f 'dmake/unix/sysvr1/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/public.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/public.h' <<'END_OF_FILE'
if test 5861 -ne `wc -c <'dmake/unix/sysvr1/public.h'`; then
echo shar: \"'dmake/unix/sysvr1/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/public.h'
fi
if test -f 'dmake/unix/sysvr3/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/public.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/public.h' <<'END_OF_FILE'
if test 5861 -ne `wc -c <'dmake/unix/sysvr3/public.h'`; then
echo shar: \"'dmake/unix/sysvr3/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/public.h'
fi
if test -f 'dmake/unix/sysvr4/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr4/public.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr4/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/sysvr4/public.h' <<'END_OF_FILE'
if test 5861 -ne `wc -c <'dmake/unix/sysvr4/public.h'`; then
echo shar: \"'dmake/unix/sysvr4/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr4/public.h'
fi
if test -f 'dmake/unix/xenix/public.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/public.h'\"
else
echo shar: Extracting \"'dmake/unix/xenix/public.h'\" \(5861 characters\)
sed "s/^X//" >'dmake/unix/xenix/public.h' <<'END_OF_FILE'
if test 5861 -ne `wc -c <'dmake/unix/xenix/public.h'`; then
echo shar: \"'dmake/unix/xenix/public.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/public.h'
fi
echo shar: End of archive 17 \(of 27\).
cp /dev/null ark17isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/malloc/_readme dmake/dbug/malloc/free.c
# dmake/dbug/malloc/realloc.c dmake/dbug/malloc/testmlc.c
# dmake/macparse.c dmake/make.bat dmake/makefile
# dmake/msdos/dirlib.c dmake/os2/mscdos/dmake.ini dmake/parse.c
# dmake/path.c dmake/unix/sysvr1/putenv.c dmake/vextern.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:45 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 18 (of 27)."'
if test -f 'dmake/dbug/malloc/_readme' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/_readme'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/_readme'\" \(4891 characters\)
sed "s/^X//" >'dmake/dbug/malloc/_readme' <<'END_OF_FILE'
X# (c) Copyright 1990 Conor P. Cahill. (uunet!virtech!cpcahil)
X# You may copy, distribute, and use this software as long as this
X# copyright statement is not removed.
X
XThis package is a collection of routines which are a drop-in replacement
Xfor the malloc(3), memory(3), string(3), and bstring(3) library functions.
X
XThe purpose of these programs is to aid the development and/or debugging
Xof programs using these functions by providing a high level of consistancy
Xchecking whenever a malloc pointer is used. Due to this increased
Xlevel of consistancy checking, these functions have a considerably larger
Xoverhead than the standard functions, but the extra checking should be
Xwell worth it in a development environment.
X
XTo use these functions all you need to do is compile the library and
Xinclude it on your loader command line. You do not need to recompile
Xyour code, only a relink is necessary.
X
XFeatures of this library:
X
X 1. The malloced area returned from each call to malloc is filled with
X non-null bytes. This should catch any use of uninitialized malloc
X area. The fill pattern for malloced area is 0x01.
X
X 2. When free is called numerous validity checks are made on the
X pointer it is passed. In addition, the data in the malloc block
X beyound the size requested on the initial malloc is checked to
X verify that it is still filled with the original fill characters.
X
X This is usefull for catching things like:
X
X ptr = malloc(5);
X ptr[5] = '\0';
X
X /*
X * You should not that this will be caught when it is
X * freed not when it is done
X */
X
X And finally, the freed block is filled with a different fill pattern
X so that you can easily determine if you are still using free'd space.
X The fill pattern for free'd areas is 0x02.
X
X This is usefull for catching things like:
X
X ptr = malloc(20);
X
X bptr = ptr+10;
X
X /* do something usefule with bptr */
X
X free(ptr);
X
X /*
X * now try to do something useful with bptr, it should
X * be trashed enough that it would cause real problems
X * and when you went to debug the problem it would be
X * filled with 0x02's and you would then know to look
X * for something free'ing what bptr points to.
X */
X
X
X 3. Whenever a bstring(3)/string(3)/memory(3) function is called, it's
X parameters are checked as follows:
X
X If they point somewhere in the malloc arena
X If the operation goes beyond requested malloc space
X call malloc_warning()
X
X This is usefull for catching things like:
X
X ptr = malloc(5);
X strcpy(ptr,"abcde");
X
X
X 4. Malloc_warning() and malloc_fatal() are used when an error condition
X is detected. If the error is severe, malloc_fatal is called.
X Malloc_warning is used otherwise. The decision about what is fatal
X and what is a warning was made somewhat arbitrarily.
X
X Warning messages include:
X
X Calling free with a bad pointer
X Calling a bstring/string/memory (3) function which will go beyond
X the end of a malloc block (Note that the library function is
X not modified to refuse the operation. If malloc warnings are
X in the default IGNORE case, the operation will continue and
X at some point cause a real problem).
X
X Fatal errors are:
X
X Detectable corruption to the malloc chain.
X
X
X 5. The operations to perform when an error is detected are specified at
X run time by the use of environment variables.
X
X MALLOC_WARN - specifies the warning error message handling
X MALLOC_FATAL - specifies the fatal error handling
X
X
X When one of these error conditions occur you will get an error
X message and the handler will execute based upon what setting
X is in the environment variables. Currently understood settings
X are as follows:
X
X 0 - continue operations
X 1 - drop core and exit
X 2 - just exit
X 3 - drop core, but continue executing. Core files will
X be placed into core.[PID].[counter] i.e: core.00123.001
X 128 - dump malloc chain and continue
X 129 - dump malloc chain, dump core, and exit
X 130 - dump malloc chain, exit
X 131 - dump malloc chain, dump core, continue processing
X
X
X There is an additional environment variable MALLOC_ERRFILE which
X is used to indicate the name of the file for error message output.
X
X For example, to set up the session to generate a core file for
X every malloc warning, to drop core and exit on a malloc fatal, and
X to log all messages to the file "malloc_log" do the following:
X
X MALLOC_WARN=131
X MALLOC_FATAL=1
X MALLOC_ERRFILE=malloc_log
X
X export MALLOC_WARN MALLOC_FATAL MALLOC_ERRFILE
X
X 6. The function malloc_dump() is available to dump the malloc chain whenever
X you might want. It's only argument is a file descriptor to use to write
X the data. Review the code if you need to know what data is printed.
END_OF_FILE
if test 4891 -ne `wc -c <'dmake/dbug/malloc/_readme'`; then
echo shar: \"'dmake/dbug/malloc/_readme'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/malloc/_readme'
# end of 'dmake/dbug/malloc/_readme'
fi
if test -f 'dmake/dbug/malloc/free.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/free.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/free.c'\" \(4798 characters\)
sed "s/^X//" >'dmake/dbug/malloc/free.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X#include "malloc.h"
X#include "debug.h"
X
X/*
X * Function: free()
X *
X * Purpose: to deallocate malloced data
X *
X * Arguments: ptr - pointer to data area to deallocate
X *
X * Returns: nothing of any value
X *
X * Narrative:
X * verify pointer is within malloc region
X * get mlist pointer from passed address
X * verify magic number
X * verify inuse flag
X * verify pointer connections with surrounding segments
X * turn off inuse flag
X * verify no data overrun into non-malloced area at end of segment
X * IF possible join segment with next segment
X * IF possible join segment with previous segment
X * Clear all data in segment (to make sure it isn't reused)
X *
X */
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: free.c,v 1.1 1994/10/06 17:43:10 dvadura Exp $";
X#endif
X
Xvoid
Xfree(cptr)
X char * cptr;
X{
X char * func = "free";
X int i;
X extern int malloc_checking;
X extern struct mlist * malloc_end;
X extern int malloc_errno;
X extern char * malloc_data_end;
X extern char * malloc_data_start;
X void malloc_join();
X void malloc_memset();
X struct mlist * oldptr;
X struct mlist * ptr;
X
X /*
X * IF malloc chain checking is on, go do it.
X */
X if( malloc_checking )
X {
X (void) malloc_chain_check(1);
X }
X
X /*
X * verify that cptr is within the malloc region...
X */
X if( cptr < malloc_data_start || cptr > malloc_data_end )
X {
X malloc_errno = M_CODE_BAD_PTR;
X malloc_warning(func);
X return;
X }
X
X /*
X * convert pointer to mlist struct pointer. To do this we must
X * move the pointer backwards the correct number of bytes...
X */
X
X ptr = (struct mlist *) (cptr - M_SIZE);
X
X if( (ptr->flag&M_MAGIC) != M_MAGIC )
X {
X malloc_errno = M_CODE_BAD_MAGIC;
X malloc_warning(func);
X return;
X }
X
X if( ! (ptr->flag & M_INUSE) )
X {
X malloc_errno = M_CODE_NOT_INUSE;
X malloc_warning(func);
X return;
X }
X
X if( (ptr->prev && (ptr->prev->next != ptr) ) ||
X (ptr->next && (ptr->next->prev != ptr) ) ||
X ((ptr->next == NULL) && (ptr->prev == NULL)) )
X {
X malloc_errno = M_CODE_BAD_CONNECT;
X malloc_warning(func);
X return;
X }
X
X ptr->flag &= ~M_INUSE;
X
X /*
X * verify that the user did not overrun the requested number of bytes.
X */
X for(i=ptr->r_size; i < ptr->s.size; i++)
X {
X if( ptr->data[i] != M_FILL )
X {
X malloc_errno = M_CODE_OVERRUN;
X malloc_warning(func);
X break;
X }
X }
X
X DEBUG3(10,"pointers: prev: 0x%.7x, ptr: 0x%.7x, next: 0x%.7x",
X ptr->prev, ptr, ptr->next);
X
X DEBUG3(10,"size: prev: %9d, ptr: %9d, next: %9d",
X ptr->prev->s.size, ptr->s.size, ptr->next->s.size);
X
X DEBUG3(10,"flags: prev: 0x%.7x, ptr: 0x%.7x, next: 0x%.7x",
X ptr->prev->flag, ptr->flag, ptr->next->flag);
X
X /*
X * check to see if this block can be combined with the next and/or
X * previous block. Since it may be joined with the previous block
X * we will save a pointer to the previous block and test to verify
X * if it is joined (it's next ptr will no longer point to ptr).
X */
X malloc_join(ptr,ptr->next,0,0);
X
X oldptr = ptr->prev;
X
X malloc_join(ptr->prev, ptr,0,0);
X
X if( oldptr->next != ptr )
X {
X DEBUG0(10,"Oldptr was changed");
X ptr = oldptr;
X }
X
X /*
X * fill this block with '\02's to ensure that nobody is using a
X * pointer to already freed data...
X */
X malloc_memset(ptr->data,M_FREE_FILL,(int)ptr->s.size);
X
X}
X
X/*
X * $Log: free.c,v $
X * Revision 1.1 1994/10/06 17:43:10 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:19 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:02 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.9 90/08/29 21:22:48 cpcahil
X * miscellaneous lint fixes
X *
X * Revision 1.8 90/05/11 00:13:08 cpcahil
X * added copyright statment
X *
X * Revision 1.7 90/02/25 11:00:18 cpcahil
X * added support for malloc chain checking.
X *
X * Revision 1.6 90/02/24 21:50:18 cpcahil
X * lots of lint fixes
X *
X * Revision 1.5 90/02/24 17:29:13 cpcahil
X * changed $Header to $Id so full path wouldnt be included as part of rcs
X * id string
X *
X * Revision 1.4 90/02/24 15:15:32 cpcahil
X * 1. changed ALREADY_FREE errno to NOT_INUSE so that the same errno could
X * be used by both free and realloc (since it was the same error).
X * 2. fixed coding bug
X *
X * Revision 1.3 90/02/24 14:23:45 cpcahil
X * fixed malloc_warning calls
X *
X * Revision 1.2 90/02/24 13:59:10 cpcahil
X * added function header.
X * Modified calls to malloc_warning/malloc_fatal to use new code error messages
X * Added support for malloc_errno setting of error codes.
X *
X * Revision 1.1 90/02/22 23:17:43 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 4798 -ne `wc -c <'dmake/dbug/malloc/free.c'`; then
echo shar: \"'dmake/dbug/malloc/free.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/free.c'
fi
if test -f 'dmake/dbug/malloc/realloc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/realloc.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/realloc.c'\" \(4944 characters\)
sed "s/^X//" >'dmake/dbug/malloc/realloc.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X#include "malloc.h"
X
X/*
X * Function: realloc()
X *
X * Purpose: to re-allocate a data area.
X *
X * Arguments: cptr - pointer to area to reallocate
X * size - size to change area to
X *
X * Returns: pointer to new area (may be same area)
X *
X * Narrative: verify pointer is within malloc region
X * obtain mlist pointer from cptr
X * verify magic number is correct
X * verify inuse flag is set
X * verify connection to adjoining segments is correct
X * save requested size
X * round-up size to appropriate boundry
X * IF size is bigger than what is in this segment
X * try to join next segment to this segment
X * IF size is less than what is is this segment
X * determine leftover amount of space
X * ELSE
X * allocate new segment of size bites
X * IF allocation failed
X * return NULL
X * copy previous data to new segment
X * free previous segment
X * return new pointer
X * split of extra space in this segment (if any)
X * clear bytes beyound what they had before
X * return pointer to data
X */
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: realloc.c,v 1.1 1994/10/06 17:43:17 dvadura Exp $";
X#endif
X
Xchar *
Xrealloc(cptr,size)
X char * cptr;
X unsigned int size;
X{
X void free();
X char * func = "realloc";
X int i;
X char * malloc();
X extern int malloc_checking;
X extern struct mlist * malloc_end;
X extern int malloc_errno;
X extern char * malloc_data_end;
X extern char * malloc_data_start;
X void malloc_join();
X void malloc_memset();
X void malloc_split();
X char * memcpy();
X char * new_cptr;
X struct mlist * ptr;
X int r_size;
X
X /*
X * IF malloc chain checking is on, go do it.
X */
X if( malloc_checking )
X {
X (void) malloc_chain_check(1);
X }
X
X /*
X * verify that cptr is within the malloc region...
X */
X if( cptr < malloc_data_start || cptr > malloc_data_end )
X {
X malloc_errno = M_CODE_BAD_PTR;
X malloc_warning(func);
X return (NULL);
X }
X
X /*
X * convert pointer to mlist struct pointer. To do this we must
X * move the pointer backwards the correct number of bytes...
X */
X
X ptr = (struct mlist *) (cptr - M_SIZE);
X
X if( (ptr->flag&M_MAGIC) != M_MAGIC )
X {
X malloc_errno = M_CODE_BAD_MAGIC;
X malloc_warning(func);
X return(NULL);
X }
X
X if( ! (ptr->flag & M_INUSE) )
X {
X malloc_errno = M_CODE_NOT_INUSE ;
X malloc_warning(func);
X return(NULL);
X }
X
X if( (ptr->prev && (ptr->prev->next != ptr) ) ||
X (ptr->next && (ptr->next->prev != ptr) ) ||
X ((ptr->next == NULL) && (ptr->prev == NULL)) )
X {
X malloc_errno = M_CODE_BAD_CONNECT;
X malloc_warning(func);
X return(NULL);
X }
X
X r_size = ++size;
X
X M_ROUNDUP(size);
X
X if( size > ptr->s.size )
X {
X malloc_join(ptr,ptr->next,1,1);
X }
X
X if( size > ptr->s.size )
X {
X /*
X * else we can't combine it, so lets allocate a new chunk,
X * copy the data and free the old chunk...
X */
X new_cptr = malloc(size);
X
X if( new_cptr == (char *) 0)
X {
X return(new_cptr);
X }
X
X if( r_size < ptr->r_size )
X {
X i = r_size;
X }
X else
X {
X i = ptr->r_size;
X }
X (void)memcpy(new_cptr,ptr->data,i);
X free(cptr);
X return(new_cptr);
X
X } /* else... */
X
X /*
X * save amount of real data in new segment (this will be used in the
X * memset later) and then save requested size of this segment.
X */
X
X if( ptr->r_size < r_size )
X {
X i = ptr->r_size;
X }
X else
X {
X i = r_size;
X }
X
X ptr->r_size = r_size;
X
X /*
X * split off extra free space at end of this segment, if possible...
X */
X
X malloc_split(ptr);
X
X malloc_memset( ptr->data+i, M_FILL, (int) (ptr->s.size - i));
X
X return(ptr->data);
X
X} /* realloc(... */
X
X
X/*
X * $Log: realloc.c,v $
X * Revision 1.1 1994/10/06 17:43:17 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:26 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:11 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.8 90/08/29 21:22:52 cpcahil
X * miscellaneous lint fixes
X *
X * Revision 1.7 90/05/11 00:13:10 cpcahil
X * added copyright statment
X *
X * Revision 1.6 90/02/25 11:01:20 cpcahil
X * added support for malloc chain checking.
X *
X * Revision 1.5 90/02/24 21:50:31 cpcahil
X * lots of lint fixes
X *
X * Revision 1.4 90/02/24 17:29:39 cpcahil
X * changed $Header to $Id so full path wouldnt be included as part of rcs
X * id string
X *
X * Revision 1.3 90/02/24 17:20:00 cpcahil
X * attempt to get rid of full path in rcs header.
X *
X * Revision 1.2 90/02/24 15:14:20 cpcahil
X * 1. added function header
X * 2. changed calls to malloc_warning to conform to new usage
X * 3. added setting of malloc_errno
X * 4. broke up bad pointer determination so that errno's would be more
X * descriptive
X *
X * Revision 1.1 90/02/22 23:17:43 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 4944 -ne `wc -c <'dmake/dbug/malloc/realloc.c'`; then
echo shar: \"'dmake/dbug/malloc/realloc.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/realloc.c'
fi
if test -f 'dmake/dbug/malloc/testmlc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/testmlc.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/testmlc.c'\" \(3971 characters\)
sed "s/^X//" >'dmake/dbug/malloc/testmlc.c' <<'END_OF_FILE'
X/* NOT copyright by SoftQuad Inc. -- msb, 1988 */
X#ifndef lint
Xstatic char *SQ_SccsId = "@(#)mtest3.c 1.2 88/08/25";
X#endif
X#include <stdio.h>
X/*
X** looptest.c -- intensive allocator tester
X**
X** Usage: looptest
X**
X** History:
X** 4-Feb-1987 rtech!daveb
X*/
X
X# ifdef SYS5
X# define random rand
X# else
X# include <sys/vadvise.h>
X# endif
X
X# include <stdio.h>
X# include <signal.h>
X# include <setjmp.h>
X
X# define MAXITER 1000000 /* main loop iterations */
X# define MAXOBJS 1000 /* objects in pool */
X# define BIGOBJ 90000 /* max size of a big object */
X# define TINYOBJ 80 /* max size of a small object */
X# define BIGMOD 100 /* 1 in BIGMOD is a BIGOBJ */
X# define STATMOD 10000 /* interation interval for status */
X
Xmain( argc, argv )
Xint argc;
Xchar **argv;
X{
X register int **objs; /* array of objects */
X register int *sizes; /* array of object sizes */
X register int n; /* iteration counter */
X register int i; /* object index */
X register int size; /* object size */
X register int r; /* random number */
X
X int objmax; /* max size this iteration */
X int cnt; /* number of allocated objects */
X int nm = 0; /* number of mallocs */
X int nre = 0; /* number of reallocs */
X int nal; /* number of allocated objects */
X int nfre; /* number of free list objects */
X long alm; /* memory in allocated objects */
X long frem; /* memory in free list */
X long startsize; /* size at loop start */
X long endsize; /* size at loop exit */
X long maxiter = 0; /* real max # iterations */
X
X extern char end; /* memory before heap */
X char *calloc();
X char *malloc();
X char *sbrk();
X long atol();
X
X# ifndef SYS5
X /* your milage may vary... */
X vadvise( VA_ANOM );
X# endif
X
X if (argc > 1)
X maxiter = atol (argv[1]);
X if (maxiter <= 0)
X maxiter = MAXITER;
X
X printf("MAXITER %d MAXOBJS %d ", maxiter, MAXOBJS );
X printf("BIGOBJ %d, TINYOBJ %d, nbig/ntiny 1/%d\n",
X BIGOBJ, TINYOBJ, BIGMOD );
X fflush( stdout );
X
X if( NULL == (objs = (int **)calloc( MAXOBJS, sizeof( *objs ) ) ) )
X {
X fprintf(stderr, "Can't allocate memory for objs array\n");
X exit(1);
X }
X
X if( NULL == ( sizes = (int *)calloc( MAXOBJS, sizeof( *sizes ) ) ) )
X {
X fprintf(stderr, "Can't allocate memory for sizes array\n");
X exit(1);
X }
X
X /* as per recent discussion on net.lang.c, calloc does not
X ** necessarily fill in NULL pointers...
X */
X for( i = 0; i < MAXOBJS; i++ )
X objs[ i ] = NULL;
X
X startsize = sbrk(0) - &end;
X printf( "Memory use at start: %d bytes\n", startsize );
X fflush(stdout);
X
X printf("Starting the test...\n");
X fflush(stdout);
X for( n = 0; n < maxiter ; n++ )
X {
X if( !(n % STATMOD) )
X {
X printf("%d iterations\n", n);
X fflush(stdout);
X }
X
X /* determine object of interst and it's size */
X
X r = random();
X objmax = ( r % BIGMOD ) ? TINYOBJ : BIGOBJ;
X size = r % objmax;
X i = r % (MAXOBJS - 1);
X
X /* either replace the object of get a new one */
X
X if( objs[ i ] == NULL )
X {
X objs[ i ] = (int *)malloc( size );
X nm++;
X }
X else
X {
X /* don't keep bigger objects around */
X if( size > sizes[ i ] )
X {
X objs[ i ] = (int *)realloc( objs[ i ], size );
X nre++;
X }
X else
X {
X free( objs[ i ] );
X objs[ i ] = (int *)malloc( size );
X nm++;
X }
X }
X
X sizes[ i ] = size;
X if( objs[ i ] == NULL )
X {
X printf("\nCouldn't allocate %d byte object!\n",
X size );
X break;
X }
X } /* for() */
X
X printf( "\n" );
X cnt = 0;
X for( i = 0; i < MAXOBJS; i++ )
X if( objs[ i ] )
X cnt++;
X
X printf( "Did %d iterations, %d objects, %d mallocs, %d reallocs\n",
X n, cnt, nm, nre );
X printf( "Memory use at end: %d bytes\n", sbrk(0) - &end );
X fflush( stdout );
X
X /* free all the objects */
X for( i = 0; i < MAXOBJS; i++ )
X if( objs[ i ] != NULL )
X free( objs[ i ] );
X
X endsize = sbrk(0) - &end;
X printf( "Memory use after free: %d bytes\n", endsize );
X fflush( stdout );
X
X if( startsize != endsize )
X printf("startsize %d != endsize %d\n", startsize, endsize );
X
X free( objs );
X free( sizes );
X
X malloc_dump(2);
X exit( 0 );
X}
X
END_OF_FILE
if test 3971 -ne `wc -c <'dmake/dbug/malloc/testmlc.c'`; then
echo shar: \"'dmake/dbug/malloc/testmlc.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/testmlc.c'
fi
if test -f 'dmake/macparse.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/macparse.c'\"
else
echo shar: Extracting \"'dmake/macparse.c'\" \(5372 characters\)
sed "s/^X//" >'dmake/macparse.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/macparse.c,v 1.1 1994/10/06 17:41:57 dvadura Exp $
X-- SYNOPSIS -- parse a macro definition
X--
X-- DESCRIPTION
X-- This file contains the code that parses a macro definition
X-- stored in a buffer. If the string in buffer is not a valid
X-- macro definition the routie Parse_macro returns 0, otherwise it
X-- returns 1 to indicate success.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: macparse.c,v $
X * Revision 1.1 1994/10/06 17:41:57 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC int
XParse_macro( buffer, flag )/*
X=============================
X Parse the string in buffer and define it as a macro if it is a valid macro.
X Note especially the string .SETDIR= since it is an attribute, but looks a
X lot like a macro definition. This would not be a problem if make used
X white space as token separators, since this is not the case we must do
X something about it. */
Xchar *buffer;
Xint flag;
X{
X char *result; /* temporary pointer for strings */
X TKSTR input; /* place to scan the buffer from */
X HASHPTR hv; /* pointer to hash table value */
X int operator; /* what macro operator do we have */
X char *tok1; /* temporary place to keep a token */
X char *tok2; /* temporary place to keep a token */
X
X DB_ENTER( "Parse_macro" );
X
X SET_TOKEN( &input, buffer );
X tok1 = Get_token( &input, "=+:*!?", 0 );
X
X operator=Macro_op(tok1);
X if( operator ) {
X Error( "No macro name" );
X CLEAR_TOKEN( &input );
X DB_RETURN( 1 );
X }
X
X tok1 = DmStrDup(tok1);
X tok2 = Get_token( &input, "=+:*!?", 2 );
X if( !(operator = Macro_op(tok2)) || !strcmp(tok1,".SETDIR") ) {
X CLEAR_TOKEN( &input );
X FREE( tok1 );
X DB_RETURN( 0 );
X }
X
X tok2 = Expand(tok1); FREE(tok1); tok1 = tok2;
X tok2 = Get_token( &input, NIL( char ), FALSE );
X
X /* Make sure we can force the assignment. */
X if ( operator & M_OP_SI ) {
X flag |= M_FORCE|M_MULTI;
X operator &= ~M_OP_SI;
X }
X
X switch( operator ) {
X case M_OP_PLCL:
X tok2 = Expand( tok2 );
X /* Fall thru */
X
X case M_OP_PL:
X /* Add to an existing macro, if it is not defined, though, then
X * just define a new macro */
X
X if( (hv = GET_MACRO(tok1)) == NIL(HASH) || hv->ht_value == NIL(char) )
X Def_macro( tok1, tok2, flag );
X else {
X result = DmStrAdd( hv->ht_value, tok2, FALSE );
X Def_macro( tok1, result, flag );
X FREE( result );
X }
X if( operator == M_OP_PLCL ) FREE(tok2);
X break;
X
X case M_OP_DF:
X if( (hv = GET_MACRO(tok1)) != NIL(HASH) )
X break;
X /* else FALLTHRU */
X
X case M_OP_EQ:
X Def_macro( tok1, tok2, flag );
X break;
X
X case M_OP_DFCL:
X if( (hv = GET_MACRO(tok1)) != NIL(HASH) )
X break;
X /* else FALLTHRU */
X
X case M_OP_CL:
X tok2 = Expand( tok2 );
X Def_macro( tok1, tok2, M_EXPANDED | flag );
X FREE( tok2 );
X break;
X
X case M_OP_CM:{
X CELLPTR cp;
X STRINGPTR sp;
X
X if (flag & M_PUSH) {
X Error("Nested conditional definition [%s ?= %s] ignored",
X tok1, tok2);
X }
X else {
X cp = Def_cell(tok1);
X if (cp->ce_flag & F_MULTI) {
X LINKPTR lp;
X for(lp=cp->ce_prq; lp->cl_next; lp=lp->cl_next);
X cp = lp->cl_prq;
X }
X TALLOC(sp,1,STRING);
X sp->st_string = DmStrDup(tok2);
X sp->st_next = cp->ce_cond;
X cp->ce_cond = sp;
X
X tok1 = NIL(char);
X }
X }
X break;
X }
X
X if (tok1) {
X if ( LastMacName != NIL(char) )
X FREE( LastMacName );
X
X LastMacName = tok1;
X }
X
X DB_RETURN( 1 );
X}
X
X
X
XPUBLIC int
XMacro_op( op )/*
X================
X Check the passed in op string and map it to one of the macro operators */
Xchar *op;
X{
X int ret = 0;
X DB_ENTER( "macro_op" );
X
X if ( *op == '!' ) {
X ret = M_OP_SI;
X op++;
X }
X
X switch( *op ) {
X case '=': ret |= M_OP_EQ; break;
X case ':': ret |= M_OP_CL; op++; break;
X
X case '+':
X op++;
X if( *op == ':' ) {
X ret |= M_OP_PLCL;
X op++;
X }
X else {
X ret |= M_OP_PL;
X }
X break;
X
X case '*':
X op++;
X if( *op == ':' ) {
X ret |= M_OP_DFCL;
X op++;
X }
X else {
X ret |= M_OP_DF;
X }
X break;
X
X case '?':
X ret |= M_OP_CM;
X op++;
X break;
X }
X
X if( *op != '=' )
X ret = 0;
X else {
X op++;
X
X if( *op != '\0' )
X ret = 0;
X }
X
X DB_RETURN( ret );
X}
END_OF_FILE
if test 5372 -ne `wc -c <'dmake/macparse.c'`; then
echo shar: \"'dmake/macparse.c'\" unpacked with wrong size!
fi
# end of 'dmake/macparse.c'
fi
if test -f 'dmake/make.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/make.bat'\"
else
echo shar: Extracting \"'dmake/make.bat'\" \(5283 characters\)
sed "s/^X//" >'dmake/make.bat' <<'END_OF_FILE'
Xecho off
Xcls
Xrem *** This is the make batchfile that is used under MSDOS to make the
Xrem *** first version of dmake. It isn't pretty but it does work, assuming
Xrem *** the compilers have been correctly setup. See the warning below
Xrem *** concerning tlink, if you are making the Turbo C version.
Xrem
X
Xif %0%1 == %0 goto error
Xif %1 == tcc goto mktcc
Xif %1 == tccswp goto mktccswp
Xif %1 == bcc goto mkbcc
Xif %1 == bccswp goto mkbccswp
Xif %1 == msc40 goto mkmsc40
Xif %1 == msc40swp goto mkmsc40swp
Xif %1 == msc50 goto mkmsc50
Xif %1 == msc50swp goto mkmsc50swp
Xif %1 == msc51 goto mkmsc51
Xif %1 == msc51swp goto mkmsc51swp
Xif %1 == msc60 goto mkmsc60
Xif %1 == msc60swp goto mkmsc60swp
Xif %1 == ztc goto mkztc
Xif %1 == ztcswp goto mkztcswp
X
Xrem label the possible DOS variations for dmake here.
X:error
Xecho MSDOS: You must specify 'make target' where target is one of:
Xecho -------------
Xecho ** tcc - Turbo C 2.0 compile.
Xecho ** tccswp - Turbo C 2.0 compile of swapping dmake.
Xecho ** Seem to be broken for dmake release 4.0 (not sure why) use Borland C++
Xecho bcc - Borland C++ 2.0,3.0,4.0 compile.
Xecho bccswp - Borland C++ 2.0,3.0,4.0 compile of swapping dmake.
Xecho msc40 - Microsoft C 4.0 compile.
Xecho msc50 - Microsoft C 5.0 compile.
Xecho msc51 - Microsoft C 5.1 compile.
Xecho msc60 - Microsoft C 6.0 compile.
Xecho msc40swp - Microsoft C 4.0, MASM 5.1 compile of swapping dmake.
Xecho msc50swp - Microsoft C 5.0, MASM 5.1 compile of swapping dmake.
Xecho msc51swp - Microsoft C 5.1, MASM 5.1 compile of swapping dmake.
Xecho msc60swp - Microsoft C 6.0, MASM 5.1 compile of swapping dmake.
Xecho ztc - Zortech C++ 2.1 compile.
Xecho ztcswp - Zortech C++ 2.1 compile of swapping dmake.
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 4.0
X:mkmsc40
Xmsdos\mscdos\mk40.bat
Xgoto end
X
X:mkmsc40swp
Xmsdos\mscdos\mk40swp.bat
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 5.0
X:mkmsc50
Xmsdos\mscdos\mk50.bat
Xgoto end
X
X:mkmsc50swp
Xmsdos\mscdos\mk50swp.bat
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 5.1
X:mkmsc51
Xmsdos\mscdos\mk51.bat
Xgoto end
X
X:mkmsc51swp
Xmsdos\mscdos\mk51swp.bat
Xgoto end
X
Xrem This is the script that makes dmake using Microsoft C 6.0
X:mkmsc60
Xmsdos\mscdos\mk60.bat
Xgoto end
X
X:mkmsc60swp
Xmsdos\mscdos\mk60swp.bat
Xgoto end
X
Xrem This is the script that makes dmake using Zortech C++ 2.1
X:mkztc
Xmsdos\ztcdos\mk.bat
Xgoto end
X
X:mkztcswp
Xmsdos\ztcdos\mkswp.bat
Xgoto end
X
Xrem This is the script that makes dmake using Turbo C 2.0 or higher.
X:mktcc
Xcls
Xecho WARNING:
Xecho The default response files:
Xecho msdos\tccdos\obj.rsp
Xecho msdos\tccdos\lib.rsp
Xecho contain absolute paths to TURBO-C runtime startup objects, and to
Xecho the standard libraries. You should check that these files contain
Xecho the correct path names for your installation of Turbo-C before
Xecho proceeding further. Also check that the mkdir command at the start
Xecho of the response file and the copy command at the end of the response
Xecho file will work on your system.
Xecho --
Xecho Continue if ok, or abort and edit the response files.
Xpause
Xmsdos\tccdos\mk.bat
Xgoto end
X
X:mktccswp
Xcls
Xecho WARNING:
Xecho The default response files:
Xecho msdos\tccdos\objswp.rsp
Xecho msdos\tccdos\libswp.rsp
Xecho contain absolute paths to TURBO-C runtime startup objects, and to
Xecho the standard libraries. You should check that these files contain
Xecho the correct path names for your installation of Turbo-C before
Xecho proceeding further. Also check that the mkdir command at the start
Xecho of the response file and the copy command at the end of the response
Xecho file will work on your system.
Xecho --
Xecho Continue if ok, or abort and edit the response files.
Xpause
Xmsdos\tccdos\mkswp.bat
Xgoto end
X
Xrem This is the script that makes dmake using Turbo C++ 2.0.
X:mkbcc
Xcls
Xecho WARNING:
Xecho The default response files:
Xecho msdos\bccdos\obj.rsp
Xecho msdos\bccdos\lib.rsp
Xecho contain absolute paths to Borland C++ runtime startup objects, and to
Xecho the standard libraries. You should check that these files contain
Xecho the correct path names for your installation of Borland C++ before
Xecho proceeding further. Also check that the mkdir command at the start
Xecho of the response file and the copy command at the end of the response
Xecho file will work on your system.
Xecho --
Xecho Continue if ok, or abort and edit the response files.
Xpause
Xmsdos\bccdos\mk.bat
Xgoto end
X
X:mkbccswp
Xcls
Xecho WARNING:
Xecho The default response files:
Xecho msdos\bccdos\objswp.rsp
Xecho msdos\bccdos\libswp.rsp
Xecho contain absolute paths to Borland C++ runtime startup objects, and to
Xecho the standard libraries. You should check that these files contain
Xecho the correct path names for your installation of Borland C++ before
Xecho proceeding further. Also check that the mkdir command at the start
Xecho of the response file and the copy command at the end of the response
Xecho file will work on your system.
Xecho --
Xecho Continue if ok, or abort and edit the response files.
Xpause
Xmsdos\bccdos\mkswp.bat
Xgoto end
X
Xrem All done!
X:end
END_OF_FILE
if test 5283 -ne `wc -c <'dmake/make.bat'`; then
echo shar: \"'dmake/make.bat'\" unpacked with wrong size!
fi
# end of 'dmake/make.bat'
fi
if test -f 'dmake/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/makefile'\"
else
echo shar: Extracting \"'dmake/makefile'\" \(4252 characters\)
sed "s/^X//" >'dmake/makefile' <<'END_OF_FILE'
X# Default makefile for the various versions of dmake that we
X# have available. This is a bootstrap version and uses /bin/sh to
X# execute a script which compiles dmake.
X#
X# Note the DOS commands actually invoke command.com to run the .bat file
X# to make the script.
X
Xall :
X @-echo ""; clear; exit 0
X @echo "INDEX: You must specify 'make target' where target is one of:"
X @echo "-------------"
X @echo " make bsd43 - Generic BSD 4.3 System"
X @echo " make bsd43uw - Generic BSD 4.3 at U of Waterloo"
X @echo " make bsd43vf - Generic BSD 4.3 that needs vfprintf"
X @echo " make sysvr4 - Generic SysV R4 UNIX System"
X @echo " make sysvr3 - Generic SysV R3 UNIX System"
X @echo " make sysvr3pwd - Generic SysV R3 UNIX System, our PWD"
X @echo " make sysvr1 - Generic SysV R1 UNIX System"
X @echo " make dynix - Sequent DYNIX System"
X @echo " make linux - Linux"
X @echo " make ultrix - Ultrix 3.0 System"
X @echo " make mips - Any MIPS System"
X @echo " make irix - Any IRIX System"
X @echo " make osf1 - OSF/1 UNIX System"
X @echo " make coherent - Any Coherent System"
X @echo " make hpux - HP Unix"
X @echo " make 386ix - 386/ix (SysV R3) System"
X @echo " make xenix - 386 Xenix System"
X @echo " make xenixpwd - 386 Xenix System, our PWD"
X @echo " make aix - IBM RS6000/AIX System"
X @echo " make Solaris - SUN Solaris 1.0 to 2.0"
X @echo " make Solaris2.1 - SUN Solaris 2.1 or greater"
X @echo " make qnxwcc - QNX 4.2 or later with Watcom-C"
X @echo " make gccSolaris2.1 - SUN Solaris 2.1 or greater with gcc"
X @echo " make os2msc40 - OS/2 using MSC 4.0 compiler"
X @echo " make os2msc50 - OS/2 using MSC 5.0 compiler"
X @echo " make os2msc51 - OS/2 using MSC 5.1 compiler"
X @echo " make os2msc60 - OS/2 using MSC 6.0 compiler"
X @echo " make os2ibm - OS/2 using IBM C 2.0 compiler"
X @echo " make tos - Atari-ST TOS using GCC as compiler"
X @echo " make tcc - DOS with Turbo C 2.0"
X @echo " make bcc - DOS with Borland C++ 3.0"
X @echo " make tccswp - swapping DOS version with Turbo C 2.0"
X @echo " make bccswp - swapping DOS version with Borland C++ 3.0"
X @echo " make msc40 - DOS with MSC 4.0"
X @echo " make msc50 - DOS with MSC 5.0"
X @echo " make msc51 - DOS with MSC 5.1"
X @echo " make msc60 - DOS with MSC 6.0"
X @echo " make msc40swp - swapping DOS version with MSC 4.0"
X @echo " make msc50swp - swapping DOS version with MSC 5.0"
X @echo " make msc51swp - swapping DOS version with MSC 5.1"
X @echo " make msc60swp - swapping DOS version with MSC 6.0"
X @echo " make ztc - DOS with Zortech C++ 2.1"
X @echo " make ztcswp - swapping DOS version with Zortech C++ 2.1"
X @echo " make mpwmac - Macintosh under MPW"
X
Xultrix aix linux: sysvr3;
XSolaris : bsd43;
Xhpux : sysvr3pwd;
Xirix osf1 : sysvr4;
X
Xsysvr1 sysvr3 sysvr4 bsd43 386ix :; /bin/sh -x < unix/$@/make.sh
X
Xbsd43uw :; /bin/sh -x < unix/bsd43/uw/make.sh
Xbsd43vf dynix mips :; /bin/sh -x < unix/bsd43/vf/make.sh
Xcoherent :; /bin/sh -x < unix/coherent/make.sh
Xxenix :; /bin/sh -x < unix/xenix/make.sh
Xxenixpwd :; /bin/sh -x < unix/xenix/pwd/make.sh
Xsysvr3pwd :; /bin/sh -x < unix/sysvr3/pwd/make.sh
XSolaris2.1 :; /bin/sh -x < unix/solaris/make.sh
XgccSolaris2.1 :; /bin/sh -x < unix/solaris/gcc/make.sh
Xtos :; sh -x tos/make.sh
Xmpwmac :; :mac:make.sh
X
X# Greg Yahchuks make ... sigh
Xqnxwcc :
X /bin/sh -x < qnx/make.sh
X
X# Various OS/2 targets.
XOS2_VER = os2msc40 os2msc50 os2msc51 os2msc60 os2ibm
X$(OS2_VER) :
X make.cmd $(@:s/os2//)
X
X# DOS with some form of make and sh
X# Note if you do not have a 'make and/or sh' program under MSDOS then
X# typing 'make' in the dmake distribution directory will invoke the make.bat
X# batch file which will issue the appropriate instructions.
XDOS_VER = tcc msc40 msc50 msc51 msc60 \
X tccswp msc40swp msc50swp msc51swp msc60swp \
X bcc bccswp ztc ztcswp
X$(DOS_VER) :; make.bat $@
END_OF_FILE
if test 4252 -ne `wc -c <'dmake/makefile'`; then
echo shar: \"'dmake/makefile'\" unpacked with wrong size!
fi
chmod +x 'dmake/makefile'
# end of 'dmake/makefile'
fi
if test -f 'dmake/msdos/dirlib.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/dirlib.c'\"
else
echo shar: Extracting \"'dmake/msdos/dirlib.c'\" \(5588 characters\)
sed "s/^X//" >'dmake/msdos/dirlib.c' <<'END_OF_FILE'
X/*
X DIRLIB for MS-DOS
X -----------------
X
XEnclosed is an implementation of the `dirlib' package for MS-DOS.
XThe implementation is targeted for MS-C, although any reasonably
Xcompetent C compiler should manage. The package consists of:
X
X dir.h the header file
X dir.c the functions
X testdir.c a q&d test program
X
XThe package tries to view directory naming in a Un*x light; in particular,
Xdirectories such as '/.' and '/..' (as well as `.' and `..' if your
Xcurrent directory is root) are understood. Indefinite paths like
X`/../.././../..' will correctly refer to the root (of the particular disk).
XNames such as `a:////./../' are okay too.
X
XI've tried to be as sensible about DTA's as possible, since you never
Xknow who will be using one; they are set before use, and reset afterwards.
X
XThere is some cruft in the package, namely the way `seekdir' and
X`telldir' are done. The code was derived from a little experimentation,
Xand may not work after a certain point (although I believe the 2.x version
Xto be solid). Caveat utilitor.
X
XDocumentation for the package is available in the public domain; the
Xpackage's functionality was derived from this documentation.
X
XBug reports and comments are welcome. Enjoy!
X
X - Matt
X
X-------
XUUCP: {ucbvax,ihnp4,randvax,trwrb!trwspp,ism780}!ucla-cs!matt
XARPA: ma...@LOCUS.UCLA.EDU
XPh: (213) 825-2756
X
X--------
XModified for use in dmake by Dennis Vadura. Mostly just clean up and an
Xeffort to make correctly typed objects are passed to functions in find.c.
XAlso deleted all dos version 2.0 specific code. It is not required any
Xmore.
X*/
X
X/*
X * revision history:
X *
X * VER MM/DD/YY COMMENTS
X * ---- -------- --------
X * 0.99 02/24/86 Beta release to INTERNET
X */
X
X#include <stdlib.h>
X#include <ctype.h>
X#include <errno.h>
X#include <string.h>
X#include <dos.h>
X
X#include "dirent.h"
X
Xstatic int _err;
X
X
Xstatic char *
Xgetdcwd(drive)
Xint drive;
X{
X union REGS r;
X struct SREGS s;
X static char xcwd[64];
X char far *cwd = xcwd;
X
X r.h.ah = 0x47;
X r.h.dl = drive;
X r.x.si = FP_OFF(cwd);
X s.ds = FP_SEG(cwd);
X intdosx(&r, &r, &s);
X _err = r.x.ax;
X if (r.x.cflag)
X return (char *) 0;
X return xcwd;
X}
X
X
X
X/*
X * opendir
X */
X
X#define SUFFIX "\\*.*"
X#define SLASH "\\"
X#define streq(a,b) (strcmp(a,b)==0)
X
XDIR *
Xopendir(name)
Xchar *name;
X{
X register DIR *nd;
X char *cwd;
X char drive[3];
X int atroot = 0;
X int rooted = 0;
X
X /*
X * hack off drive designator if present
X */
X
X if (name[1] == ':') {
X cwd = getdcwd(toupper(name[0]) - 'A' + 1);
X drive[0] = name[0]; drive[1] = ':'; drive[2] = '\0';
X name += 2;
X }
X else {
X cwd = getdcwd(0);
X drive[0] = '\0';
X }
X
X /* is the name 'rooted'? */
X if ((*name == '/') || (*name == '\\')) ++rooted;
X
X /* see if we are at the root directory for this device */
X if (!*cwd) ++atroot;
X
X /*
X * MSDOS '/' doesn't have a '.' or '..'
X * also, double '/' sequences don't make sense.
X * many ported programs expect them to work, so we fix it up...
X */
X
X /* chop off leading . and .. if at root */
X if (atroot && (*name == '.')) {
X switch (*++name) {
X case '\0':
X case '/':
X case '\\':
X break;
X
X case '.':
X switch (*++name) {
X case '\0':
X case '/':
X case '\\':
X break;
X default:
X --name;
X --name;
X }
X break;
X
X default:
X --name;
X }
X }
X
X /* chop off leading /'s, /.'s and /..'s to make naming sensible */
X while (*name && ((*name == '/') || (*name == '\\'))) {
X if (*++name == '.') {
X switch (*++name) {
X case '\0':
X case '/':
X case '\\':
X break;
X
X case '.':
X switch (*++name) {
X case '\0':
X case '/':
X case '\\':
X break;
X
X default:
X --name;
X --name;
X }
X break;
X
X default:
X --name;
X }
X }
X }
X
X
X /*
X * name should now look like: path/path/path
X * we must now construct name based on whether or not it
X * was 'rooted' (started with a /)
X */
X
X if (rooted) cwd = "";
X
X /* construct DIR */
X if (!(nd = (DIR *)malloc(
X sizeof(DIR)+strlen(drive)+strlen(cwd)+strlen(SLASH)+
X strlen(name)+strlen(SUFFIX))))
X return (DIR *) 0;
X
X /* create long name */
X strcpy(nd->dd_name, drive);
X if (*cwd) {
X strcat(nd->dd_name, SLASH);
X strcat(nd->dd_name, cwd);
X }
X if (*name) {
X strcat(nd->dd_name, SLASH);
X strcat(nd->dd_name, name);
X }
X strcat(nd->dd_name, SUFFIX);
X
X /* search */
X if (!findfirst(&nd->dd_name[0], &nd->dd_dta)) {
X free((char *)nd);
X errno = ENOENT;
X return (DIR *) 0;
X }
X nd->dd_stat = 0;
X return nd;
X}
X
X
Xstruct dirent *
Xreaddir(dirp)
XDIR *dirp;
X{
X static struct dirent dir;
X
X if (dirp->dd_stat)
X return (struct dirent *) 0;
X
X /* format structure */
X dir.d_ino = 0; /* not valid for DOS */
X dir.d_reclen = 0;
X strcpy(dir.d_name, dirp->dd_dta.name);
X dir.d_namlen = strlen(dir.d_name);
X strlwr(dir.d_name); /* DOSism */
X
X /* read ahead */
X if (findnext(&dirp->dd_dta))
X dirp->dd_stat = 0;
X else
X dirp->dd_stat = _err;
X
X return &dir;
X}
X
X
Xvoid
Xclosedir(dirp)
XDIR *dirp;
X{
X free((char *)dirp);
X}
X
X
Xvoid
Xseekdir(dirp, pos)
XDIR *dirp;
Xlong pos;
X{
X /*
X * check against DOS limits
X */
X
X if ((pos < 0) || (pos > 4095)) {
X dirp->dd_stat = 1;
X return;
X }
X
X *(short *)&dirp->dd_dta.fcb[13] = pos + 1;
X
X /* read ahead */
X if (findnext(&dirp->dd_dta))
X dirp->dd_stat = 0;
X else
X dirp->dd_stat = _err;
X}
X
X
Xlong
Xtelldir(dirp)
XDIR *dirp;
X{
X return (long) (*(short *)&dirp->dd_dta.fcb[13] - 2);
X}
END_OF_FILE
if test 5588 -ne `wc -c <'dmake/msdos/dirlib.c'`; then
echo shar: \"'dmake/msdos/dirlib.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/dirlib.c'
fi
if test -f 'dmake/os2/mscdos/dmake.ini' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/dmake.ini'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/dmake.ini'\" \(3999 characters\)
sed "s/^X//" >'dmake/os2/mscdos/dmake.ini' <<'END_OF_FILE'
X# MSDOS DMAKE startup file. Customize to suit your needs.
X# Assumes MKS toolkit for the tool commands, and Microsoft C. Change as req'd.
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT := $(.SILENT)
X.SILENT := yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .lib # Libraries
XE := .exe # Executables
XF := .for # Fortran
XO := .obj # Objects
XP := .pas # Pascal
XS := .asm # Assembler sources
XV := # RCS suffix
X
X# See if these are defined
XTMPDIR := $(ROOTDIR)/tmp
X.IMPORT .IGNORE : TMPDIR SHELL COMSPEC
X
X# Recipe execution configurations
X# First set SHELL, If it is not defined, use COMSPEC, otherwise
X# it is assumed to be MKS Korn SHELL.
X.IF $(SHELL) == $(NULL)
X.IF $(COMSPEC) == $(NULL)
X SHELL := $(ROOTDIR)/bin/sh$E
X.ELSE
X SHELL := $(COMSPEC)
X.END
X.END
XGROUPSHELL := $(SHELL)
X
X# Now set remaining arguments depending on which SHELL we
X# are going to use. COMSPEC (assumed to be cmd.exe) or
X# MKS Korn Shell.
X.IF $(SHELL)==$(COMSPEC)
X SHELLFLAGS := $(SWITCHAR)c
X GROUPFLAGS := $(SHELLFLAGS)
X SHELLMETAS := *"?<>|&
X GROUPSUFFIX := .cmd
X DIRSEPSTR := \\
X DIVFILE = $(TMPFILE:s,/,\)
X.ELSE
X SHELLFLAGS := -c
X GROUPFLAGS :=
X SHELLMETAS := *"?<>|()&][$$\#`'
X GROUPSUFFIX := .ksh
X .MKSARGS := yes
X DIVFILE = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
X DIVSEP_shell_yes := \\\
X DIVSEP_shell_no := \\
X.END
X
X# Standard C-language command names and flags
X CC := cl # C-compiler and flags
X CFLAGS +=
X
X AS := masm # Assembler and flags
X ASFLAGS +=
X
X LD = link # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) $(MFLAGS)
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := ytab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex_yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := any_pc # pascal compiler
X RC := anyf77 # ratfor compiler
X FC := anyf77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A :
X[
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X]
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT := $(__.SILENT)
X
X# Local init file if any, gets parsed before user makefile
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3999 -ne `wc -c <'dmake/os2/mscdos/dmake.ini'`; then
echo shar: \"'dmake/os2/mscdos/dmake.ini'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/mscdos/dmake.ini'
# end of 'dmake/os2/mscdos/dmake.ini'
fi
if test -f 'dmake/parse.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/parse.c'\"
else
echo shar: Extracting \"'dmake/parse.c'\" \(5306 characters\)
sed "s/^X//" >'dmake/parse.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/parse.c,v 1.1 1994/10/06 17:41:20 dvadura Exp $
X-- SYNOPSIS -- parse the input, and perform semantic analysis
X--
X-- DESCRIPTION
X-- This file contains the routines that parse the input makefile and
X-- call the appropriate routines to perform the semantic analysis and
X-- build the internal dag.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: parse.c,v $
X * Revision 1.1 1994/10/06 17:41:20 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X
XPUBLIC void
XParse( fil )/*
X============== Parse the makefile input */
XFILE *fil;
X{
X int rule = FALSE; /* have seen a recipe line */
X char *p; /* termporary pointer into Buffer */
X
X DB_ENTER( "Parse" );
X
X State = NORMAL_SCAN;
X Group = FALSE; /* true if scanning a group rcpe */
X while( TRUE ) {
X if( Get_line( Buffer, fil ) ) {
X if( fil != NIL( FILE ) ) /* end of parsable input */
X Closefile();
X
X Bind_rules_to_targets( F_DEFAULT );
X if( Group ) Fatal( "Incomplete rule recipe group detected" );
X
X DB_VOID_RETURN;
X }
X else {
X switch( State ) {
X case RULE_SCAN:
X
X /* Check for the `[' that starts off a group rule definition. It
X * must appear as the first non-white space
X * character in the line. */
X
X p = DmStrSpn( Buffer, " \t\r\n" );
X if( Set_group_attributes( p ) ) {
X if( rule && Group )
X Fatal( "Cannot mix single and group recipe lines" );
X else
X Group = TRUE;
X
X rule = TRUE;
X
X break; /* ignore the group start */
X }
X
X if( Group ) {
X if( *p != ']' ) {
X Add_recipe_to_list( Buffer, TRUE, TRUE );
X rule = TRUE;
X }
X else
X State = NORMAL_SCAN;
X }
X else {
X if( *Buffer == '\t'
X || (Notabs && *Buffer == ' ') ) {
X Add_recipe_to_list( Buffer, FALSE, FALSE );
X rule = TRUE;
X }
X else if( *p == ']' )
X Fatal( "Found unmatched ']'" );
X else if( *Buffer && *p || (Notabs && !*Buffer && !*p))
X State = NORMAL_SCAN;
X }
X
X if( State == RULE_SCAN ) break; /* ie. keep going */
X
X Bind_rules_to_targets( (Group) ? F_GROUP: F_DEFAULT );
X
X rule = FALSE;
X if( Group ) {
X Group = FALSE;
X break;
X }
X /*FALLTRHOUGH*/
X
X /* In this case we broke out of the rule scan because we do not
X * have a recipe line that begins with a <TAB>, so lets
X * try to scan the thing as a macro or rule definition. */
X
X
X case NORMAL_SCAN:
X if( !*Buffer ) continue; /* we have null input line */
X
X /* STUPID AUGMAKE uses "include" at the start of a line as
X * a signal to include a new file, so let's look for it.
X * if we see it replace it by .INCLUDE: and stick this back
X * into the buffer. */
X if( !strncmp( "include", Buffer, 7 ) &&
X (Buffer[7] == ' ' || Buffer[7] == '\t') )
X {
X char *tmp;
X
X tmp = DmStrJoin( ".INCLUDE:", Buffer+7, -1, FALSE );
X strcpy( Buffer, tmp );
X FREE( tmp );
X }
X
X /* look for a macro definition, they all contain an = sign
X * if we fail to recognize it as a legal macro op then try to
X * parse the same line as a rule definition, it's one or the
X * other */
X
X if( Parse_macro(Buffer, M_DEFAULT) ) break;/* it's a macro def */
X if( Parse_rule_def( &State ) ) break;/* it's a rule def */
X
X /* if just blank line then ignore it */
X if( *DmStrSpn( Buffer, " \t\r\n" ) == '\0' ) break;
X
X /* otherwise assume it was a line of unrecognized input, or a
X * recipe line out of place so print a message */
X
X Fatal( "Expecting macro or rule defn, found neither" );
X break;
X
X default:
X Fatal( "Internal -- UNKNOWN Parser state %d", State );
X }
X }
X }
X}
X
END_OF_FILE
if test 5306 -ne `wc -c <'dmake/parse.c'`; then
echo shar: \"'dmake/parse.c'\" unpacked with wrong size!
fi
# end of 'dmake/parse.c'
fi
if test -f 'dmake/path.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/path.c'\"
else
echo shar: Extracting \"'dmake/path.c'\" \(3976 characters\)
sed "s/^X//" >'dmake/path.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/path.c,v 1.1 1994/10/06 17:41:58 dvadura Exp $
X-- SYNOPSIS -- pathname manipulation code
X--
X-- DESCRIPTION
X-- Pathname routines to handle building and pulling appart
X-- pathnames.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: path.c,v $
X * Revision 1.1 1994/10/06 17:41:58 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X
X/*
X** Return the suffix portion of a filename, assumed to begin with a `.'.
X*/
XPUBLIC char *
XGet_suffix(name)
Xchar *name;
X{
X char *suff;
X
X if(name == NIL(char) || (suff = strrchr(name, '.')) == NIL(char))
X suff = ".NULL";
X
X return (suff);
X}
X
X
XPUBLIC char *
XBasename(path)
Xchar *path;
X{
X char *p;
X char *q;
X
X if( path && *(q = path) ) {
X for(; *(p=DmStrPbrk(q, DirBrkStr)) != '\0'; q = p+1 );
X if( !*q ) {
X for( p=q-1; p != path; --p )
X if( strchr( DirBrkStr, *p ) == NIL(char) ) return( p+1 );
X return( strchr(DirBrkStr, *p)?path:(p+1) );
X }
X path = q;
X }
X return( path );
X}
X
X
XPUBLIC char *
XFiledir(path)
Xchar *path;
X{
X char *p;
X char *q;
X
X if( path && *(q = path) ) {
X for(; *(p=DmStrPbrk(q,DirBrkStr)) != '\0'; q=p+1 );
X
X if (q == path) return("");
X
X for(p=q-1; p!=path; --p)
X if( strchr(DirBrkStr,*p) == NIL(char) )
X break;
X
X p[1] = '\0';
X }
X
X return(path);
X}
X
X
X
X/*
X** Take dir and name, and return a path which has dir as the directory
X** and name afterwards.
X**
X** N.B. Assumes that the dir separator string is in DirSepStr.
X** Return path is built in a static buffer, if you need to use it
X** again you must strdup the result returned by Build_path.
X*/
XPUBLIC char *
XBuild_path(dir, name)
Xchar *dir;
Xchar *name;
X{
X register char *p;
X register char *q;
X static char *path = NIL(char);
X static unsigned buflen = 0;
X int plen = 0;
X int dlen = 0;
X int len;
X
X if( dir != NIL(char) ) dlen = strlen( dir );
X if( name != NIL(char) ) plen = strlen( name );
X len = plen+dlen+strlen(DirSepStr)+1;
X
X if( len > buflen ) {
X buflen = (len+16) & ~0xf; /* buf is always multiple of 16 */
X
X if( path == NIL(char) )
X path = MALLOC( buflen, char );
X else
X path = realloc( path, (unsigned) (buflen*sizeof(char)) );
X }
X
X *path = '\0';
X
X if( dlen ) {
X strcpy( path, dir );
X if( *path && strchr(DirBrkStr, dir[dlen-1]) == NIL(char) )
X strcat( path, DirSepStr );
X }
X
X if ( plen ) {
X while ( *name && strchr(DirBrkStr,*name) != 0 ) name++;
X strcat( path, name );
X }
X
X q=path;
X while( *q ) {
X char *t;
X
X p=DmStrPbrk(q,DirBrkStr);
X t=DmStrPbrk(p+1,DirBrkStr);
X if( !*p || !*t ) break;
X
X if ( p-q == 1 && *q == '.' ) {
X strcpy(q,DmStrSpn(p,DirBrkStr));
X q = path;
X }
X else if (
X !(p-q == 2 && strncmp(q,"..",2) == 0)
X && (t-p-1 == 2 && strncmp(p+1,"..",2) == 0)
X ) {
X strcpy(q,DmStrSpn(t,DirBrkStr));
X q = path;
X }
X else
X q = p+1;
X }
X
X return( path );
X}
END_OF_FILE
if test 3976 -ne `wc -c <'dmake/path.c'`; then
echo shar: \"'dmake/path.c'\" unpacked with wrong size!
fi
# end of 'dmake/path.c'
fi
if test -f 'dmake/unix/sysvr1/putenv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/putenv.c'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/putenv.c'\" \(2956 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/putenv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/sysvr1/RCS/putenv.c,v 1.1 1994/10/06 17:42:17 dvadura Exp $
X-- SYNOPSIS -- my own putenv for BSD like systems.
X--
X-- DESCRIPTION
X-- This originally came from MKS, but I rewrote it to fix a bug with
X-- replacing existing strings, probably never happened but the code
X-- was wrong nonetheless.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: putenv.c,v $
X * Revision 1.1 1994/10/06 17:42:17 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <stdio.h>
X#include <string.h>
X
Xint
Xputenv( str )/*
X===============
X Take a string of the form NAME=value and stick it into the environment.
X We do this by allocating a new set of pointers if we have to add a new
X string and by replacing an existing pointer if the value replaces the value
X of an existing string. */
Xchar *str;
X{
X extern char **environ; /* The current environment. */
X static char **ourenv = NULL; /* A new environment */
X register char **p;
X register char *q;
X int size;
X
X /* First search the current environment and see if we can replace a
X * string. */
X for( p=environ; *p; p++ ) {
X register char *s = str;
X
X for( q = *p; *q && *s && *s == *q; q++, s++ )
X if( *s == '=' ) {
X *p = str;
X return(0); /* replaced it so go away */
X }
X }
X
X /* Ok, can't replace a string so need to grow the environment. */
X size = p - environ + 2; /* size of new environment */
X /* size of old is size-1 */
X
X /* It's the first time, so allocate a new environment since we don't know
X * where the old one is comming from. */
X if( ourenv == NULL ) {
X if( (ourenv = (char **) malloc( sizeof(char *)*size )) == NULL )
X return(1);
X
X memcpy( (char *)ourenv, (char *)environ, (size-2)*sizeof(char *) );
X }
X else if( (ourenv = (char **)realloc( ourenv, size*sizeof(char *))) == NULL )
X return(1);
X
X ourenv[--size] = NULL;
X ourenv[--size] = str;
X
X environ = ourenv;
X return(0);
X}
END_OF_FILE
if test 2956 -ne `wc -c <'dmake/unix/sysvr1/putenv.c'`; then
echo shar: \"'dmake/unix/sysvr1/putenv.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/putenv.c'
fi
if test -f 'dmake/vextern.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/vextern.h'\"
else
echo shar: Extracting \"'dmake/vextern.h'\" \(5132 characters\)
sed "s/^X//" >'dmake/vextern.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/vextern.h,v 1.1 1994/10/06 17:41:35 dvadura Exp $
X-- SYNOPSIS -- global variable declarations.
X--
X-- DESCRIPTION
X-- Leave _DEFINE_GLOBALS_ undefined and the following declarations
X-- will be defined as global variables, otherwise you get the
X-- external declarations to the same global variables.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: vextern.h,v $
X * Revision 1.1 1994/10/06 17:41:35 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* These two are defined in dir/ruletab.c and dir/dirbrk.c, and are always
X * imported as externals by the other code. Their defining modules do not
X * #include this file. */
Xextern char* DirBrkStr; /* pointer to value of macro DIRBRKSTR */
Xextern char** Rule_tab; /* Builtin rules */
X
X#ifndef _DEFINE_GLOBALS_
X#define EXTERN extern
X#else
X#define EXTERN
X#endif
X
XEXTERN int Line_number; /* Current line number in make file parse */
XEXTERN t_attr Glob_attr; /* Global attrs to control global ops */
XEXTERN char* Makedir; /* pointer to macro value for MAKEDIR */
XEXTERN char* Shell; /* pointer to macro value for SHELL */
XEXTERN char* Shell_flags; /* pointer to macro value for SHELLFLAGS */
XEXTERN char* GShell; /* pointer to macro value for GROUPSHELL */
XEXTERN char* GShell_flags; /* pointer to macro value for GROUPFLAGS */
XEXTERN char* Shell_metas; /* pointer to macro value for SHELLMETAS */
XEXTERN char* Grp_suff; /* pointer to macro value for GROUPSUFFIX */
XEXTERN char* DirSepStr; /* pointer to macro value for DIRSEPSTR */
XEXTERN char* Pname; /* dmake process invoke name */
XEXTERN char* Pwd; /* current working dir, value of PWD */
XEXTERN char* Tmd; /* path to directory where dmake started */
XEXTERN char* Keep_state; /* current .KEEP_STATE file */
XEXTERN char* Escape_char; /* Current escape character */
XEXTERN char* LastMacName; /* Last macro successfully parsed */
XEXTERN char* UseDirCache; /* The value of .DIRCACHE */
XEXTERN int Target; /* TRUE if target found in makefile */
XEXTERN int If_expand; /* TRUE if calling Expand from getinp.c */
XEXTERN int Suppress_temp_file;/* TRUE if doing a test in _exec_recipe*/
XEXTERN int Readenv; /* TRUE if defining macro from environment*/
XEXTERN int Makemkf; /* TRUE if making makefile(s) */
XEXTERN int Nest_level; /* Nesting level for .IF .ELSE .END ... */
XEXTERN int Prep; /* Value of macro PREP */
XEXTERN int Def_targets; /* TRUE if defining targets */
XEXTERN int Skip_to_eof; /* TRUE if asked to skip to eof on input */
XEXTERN int DynamicNestLevel;/* Value of DYNAMICNESTINGLEVEL macro */
XEXTERN int NameMax; /* The value of NAMEMAX */
X
XEXTERN CELLPTR Root; /* Root of the make graph */
XEXTERN CELLPTR Targets; /* Targets in makefile */
X
XEXTERN CELLPTR Current_target; /* cell of current target being made */
XEXTERN int Wait_for_completion;
XEXTERN int Doing_bang;
XEXTERN int Packed_shell; /* TRUE if packed args to use a shell */
XEXTERN int Swap_on_exec; /* TRUE if going to swap on exec call */
XEXTERN int State; /* parser state */
XEXTERN int Group; /* parsing a group recipe ==> TRUE */
X
X/* Command line option flags are defined here. They correspond one-for one
X * with the flags defined in dmake.c */
X
XEXTERN char *Augmake; /* -A */
XEXTERN char Comment; /* -c */
XEXTERN char Get_env; /* -e or -E */
XEXTERN char* Notabs; /* -B */
XEXTERN int Continue; /* -k */
XEXTERN int Force; /* -u */
XEXTERN int Listing; /* -p */
XEXTERN int Rules; /* -r */
XEXTERN int Trace; /* -n */
XEXTERN int Touch; /* -t */
XEXTERN int Check; /* -q */
XEXTERN uint16 Verbose; /* -v */
XEXTERN int Microsoft; /* -M */
XEXTERN int Transitive; /* -T */
XEXTERN int No_exec; /* -X */
X
XEXTERN HASHPTR Defs[HASH_TABLE_SIZE];
XEXTERN HASHPTR Macs[HASH_TABLE_SIZE];
X
XEXTERN char *Buffer; /* a general purpose buffer */
XEXTERN int Buffer_size;
XEXTERN int Max_proclmt; /* limit of max # of conc procs */
XEXTERN int Max_proc; /* max # of conc procs */
END_OF_FILE
if test 5132 -ne `wc -c <'dmake/vextern.h'`; then
echo shar: \"'dmake/vextern.h'\" unpacked with wrong size!
fi
# end of 'dmake/vextern.h'
fi
echo shar: End of archive 18 \(of 27\).
cp /dev/null ark18isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/malloc/memory.c dmake/mac/dompwmak
# dmake/mac/eold.c dmake/mac/tomacfil.c dmake/msdos/bccdos/mkswp.bat
# dmake/msdos/bccdos/startup.mk dmake/msdos/exec.uue
# dmake/msdos/mscdos/mk50swp.bat dmake/msdos/mscdos/mk51swp.bat
# dmake/msdos/mscdos/startup.mk dmake/msdos/tccdos/mkswp.bat
# dmake/msdos/tccdos/startup.mk dmake/msdos/ztcdos/config.h
# dmake/msdos/ztcdos/startup.mk dmake/os2/ibm/dmake.ini
# dmake/unix/rmprq.c
# Wrapped by kent@sparky on Fri Oct 21 16:50:46 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 19 (of 27)."'
if test -f 'dmake/dbug/malloc/memory.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/memory.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/memory.c'\" \(3790 characters\)
sed "s/^X//" >'dmake/dbug/malloc/memory.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: memory.c,v 1.1 1994/10/06 17:43:14 dvadura Exp $";
X#endif
X
Xvoid malloc_check_data();
X
Xchar *
Xmemccpy(ptr1, ptr2, ch, len)
X register char * ptr1;
X register char * ptr2;
X int len;
X int ch;
X{
X int check;
X register int i;
X char * rtn;
X
X /*
X * I know that the assignment could be done in the following, but
X * I wanted to perform a check before any assignment, so first I
X * determine the length, check the pointers and then do the assignment.
X */
X for( i=0; (i < len) && (ptr2[i] != ch); i++)
X {
X }
X if( ptr2[i] == ch )
X {
X check = i+1;
X }
X else
X {
X check = len;
X }
X
X malloc_check_data("memccpy", ptr1, check);
X malloc_check_data("memccpy", ptr2, check);
X
X /*
X * if we found the character...
X */
X
X if( i < len )
X {
X rtn = ptr1+i+1;
X i++;
X }
X else
X {
X rtn = (char *) 0;
X }
X
X while( i-- )
X {
X *(ptr1++) = *(ptr2++);
X }
X
X return(rtn);
X}
X
Xchar *
Xmemchr(ptr1,ch,len)
X register char * ptr1;
X register int ch;
X int len;
X{
X int i;
X
X for( i=0; (i < len) && (ptr1[i] != (char) ch); i++)
X {
X }
X
X malloc_check_data("memchr", ptr1, i);
X
X if( i < len )
X {
X return( ptr1+i );
X }
X else
X {
X return( (char *) 0);
X }
X}
X
Xchar *
Xmemcpy(ptr1, ptr2, len)
X register char * ptr1;
X register char * ptr2;
X register int len;
X{
X char * rtn = ptr1;
X
X malloc_check_data("memcpy", ptr1, len);
X malloc_check_data("memcpy", ptr2, len);
X
X /*
X * while the normal memcpy does not guarrantee that it will
X * handle overlapping memory correctly, we will try...
X */
X if( ptr1 > ptr2 && ptr1 < (ptr2+len))
X {
X ptr1 += (len-1);
X ptr2 += (len-1);
X while( len-- > 0 )
X {
X *(ptr1--) = *(ptr2--);
X }
X }
X else
X {
X while( len-- > 0 )
X {
X *(ptr1++) = *(ptr2++);
X }
X }
X
X return(rtn);
X}
X
Xint
Xmemcmp(ptr1, ptr2, len)
X register char * ptr1;
X register char * ptr2;
X register int len;
X{
X malloc_check_data("memcpy", ptr1, len);
X malloc_check_data("memcpy", ptr2, len);
X
X while( --len >= 0 && (*ptr1 == *ptr2) )
X {
X ptr1++;
X ptr2++;
X }
X
X /*
X * If stopped by len, return zero
X */
X if( len < 0 )
X {
X return(0);
X }
X
X return( *ptr1 - *ptr2 );
X}
X
Xchar *
Xmemset(ptr1, ch, len)
X register char * ptr1;
X register int ch;
X register int len;
X{
X char * rtn = ptr1;
X
X malloc_check_data("memcpy", ptr1, len);
X
X while( len-- )
X {
X *(ptr1++) = ch;
X }
X
X return(rtn);
X}
X
Xchar *
Xbcopy(ptr2,ptr1,len)
X char * ptr2;
X char * ptr1;
X int len;
X{
X return(memcpy(ptr1,ptr2,len));
X}
X
Xchar *
Xbzero(ptr1,len)
X char * ptr1;
X int len;
X{
X return(memset(ptr1,'\0',len));
X}
X
Xint
Xbcmp(ptr2, ptr1, len)
X char * ptr1;
X char * ptr2;
X int len;
X{
X return( memcmp(ptr1,ptr2,len) );
X}
X
X/*
X * $Log: memory.c,v $
X * Revision 1.1 1994/10/06 17:43:14 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:23 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:08 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.7 90/08/29 21:27:58 cpcahil
X * fixed value of check in memccpy when character was not found.
X *
X * Revision 1.6 90/07/16 20:06:26 cpcahil
X * fixed several minor bugs found with Henry Spencer's string/mem tester
X * program.
X *
X *
X * Revision 1.5 90/05/11 15:39:36 cpcahil
X * fixed bug in memccpy().
X *
X * Revision 1.4 90/05/11 00:13:10 cpcahil
X * added copyright statment
X *
X * Revision 1.3 90/02/24 21:50:29 cpcahil
X * lots of lint fixes
X *
X * Revision 1.2 90/02/24 17:29:41 cpcahil
X * changed $Header to $Id so full path wouldnt be included as part of rcs
X * id string
X *
X * Revision 1.1 90/02/22 23:17:43 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 3790 -ne `wc -c <'dmake/dbug/malloc/memory.c'`; then
echo shar: \"'dmake/dbug/malloc/memory.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/memory.c'
fi
if test -f 'dmake/mac/dompwmak' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/dompwmak'\"
else
echo shar: Extracting \"'dmake/mac/dompwmak'\" \(3932 characters\)
sed "s/^X//" >'dmake/mac/dompwmak' <<'END_OF_FILE'
Xnewfolder objects
Xc -I. -I :mac -d _MPW -s infer -sym off -o :objects:infer.c.o infer.c
Xc -I. -I :mac -d _MPW -s make -sym off -o :objects:make.c.o make.c
Xc -I. -I :mac -d _MPW -s stat -sym off -o :objects:stat.c.o stat.c
Xc -I. -I :mac -d _MPW -s expand -sym off -o :objects:expand.c.o expand.c
Xc -I. -I :mac -d _MPW -s dmstring -sym off -o :objects:dmstring.c.o dmstring.c
Xc -I. -I :mac -d _MPW -s hash -sym off -o :objects:hash.c.o hash.c
Xc -I. -I :mac -d _MPW -s dag -sym off -o :objects:dag.c.o dag.c
Xc -I. -I :mac -d _MPW -s dmake -sym off -o :objects:dmake.c.o dmake.c
Xc -I. -I :mac -d _MPW -s path -sym off -o :objects:path.c.o path.c
Xc -I. -I :mac -d _MPW -s imacs -sym off -o :objects:imacs.c.o imacs.c
Xc -I. -I :mac -d _MPW -s sysintf -sym off -o :objects:sysintf.c.o sysintf.c
Xc -I. -I :mac -d _MPW -s parse -sym off -o :objects:parse.c.o parse.c
Xc -I. -I :mac -d _MPW -s getinp -sym off -o :objects:getinp.c.o getinp.c
Xc -I. -I :mac -d _MPW -s quit -sym off -o :objects:quit.c.o quit.c
Xc -I. -I :mac -d _MPW -s state -sym off -o :objects:state.c.o state.c
Xc -I. -I :mac -d _MPW -s basename -sym off -o :objects:basename.c.o basename.c
Xc -I. -I :mac -d _MPW -s dmdump -sym off -o :objects:dmdump.c.o dmdump.c
Xc -I. -I :mac -d _MPW -s macparse -sym off -o :objects:macparse.c.o macparse.c
Xc -I. -I :mac -d _MPW -s rulparse -sym off -o :objects:rulparse.c.o rulparse.c
Xc -I. -I :mac -d _MPW -s percent -sym off -o :objects:percent.c.o percent.c
Xc -I. -I :mac -d _MPW -s function -sym off -o :objects:function.c.o function.c
Xduplicate -y :mac:arlib.c arlib.c
Xc -I. -I :mac -d _MPW -s arlib -sym off -o :objects:arlib.c.o arlib.c
Xdelete arlib.c
Xduplicate -y :mac:bogus.c bogus.c
Xc -I. -I :mac -d _MPW -s bogus -sym off -o :objects:bogus.c.o bogus.c
Xdelete bogus.c
Xduplicate -y :mac:dirbrk.c dirbrk.c
Xc -I. -I :mac -d _MPW -s dirbrk -sym off -o :objects:dirbrk.c.o dirbrk.c
Xdelete dirbrk.c
Xduplicate -y :mac:directry.c directry.c
Xc -I. -I :mac -d _MPW -s directry -sym off -o :objects:directry.c.o directry.c
Xdelete directry.c
Xduplicate -y :mac:environ.c environ.c
Xc -I. -I :mac -d _MPW -s environ -sym off -o :objects:environ.c.o environ.c
Xdelete environ.c
Xduplicate -y :mac:main.c main.c
Xc -I. -I :mac -d _MPW -s main -sym off -o :objects:main.c.o main.c
Xdelete main.c
Xduplicate -y :mac:rmprq.c rmprq.c
Xc -I. -I :mac -d _MPW -s rmprq -sym off -o :objects:rmprq.c.o rmprq.c
Xdelete rmprq.c
Xduplicate -y :mac:ruletab.c ruletab.c
Xc -I. -I :mac -d _MPW -s ruletab -sym off -o :objects:ruletab.c.o ruletab.c
Xdelete ruletab.c
Xduplicate -y :mac:tempnam.c tempnam.c
Xc -I. -I :mac -d _MPW -s tempnam -sym off -o :objects:tempnam.c.o tempnam.c
Xdelete tempnam.c
Xduplicate -y :mac:tomacfil.c tomacfil.c
Xc -I. -I :mac -d _MPW -s tomacfil -sym off -o :objects:tomacfil.c.o tomacfil.c
Xdelete tomacfil.c
XSet p1 ":objects:infer.c.o :objects:make.c.o :objects:stat.c.o :objects:expand.c.o"
XSet p2 ":objects:dmstring.c.o :objects:hash.c.o :objects:dag.c.o :objects:dmake.c.o"
XSet p3 ":objects:path.c.o :objects:imacs.c.o :objects:sysintf.c.o :objects:parse.c.o"
XSet p4 ":objects:getinp.c.o :objects:quit.c.o :objects:state.c.o :objects:basename.c.o"
XSet p5 ":objects:dmdump.c.o :objects:macparse.c.o :objects:rulparse.c.o"
XSet p6 ":objects:percent.c.o :objects:function.c.o :objects:arlib.c.o :objects:bogus.c.o"
XSet p7 ":objects:dirbrk.c.o :objects:directry.c.o :objects:environ.c.o :objects:main.c.o"
XSet p8 ":objects:rmprq.c.o :objects:ruletab.c.o :objects:tempnam.c.o"
XSet p9 ":objects:tomacfil.c.o Micah:MPW:Libraries:CLibraries:CSANELib.o"
XSet p10 "Micah:MPW:Libraries:CLibraries:Math.o"
XSet p11 "Micah:MPW:Libraries:CLibraries:StdCLib.o"
XSet p12 "Micah:MPW:Libraries:Libraries:Runtime.o"
XSet p13 "Micah:MPW:Libraries:Libraries:Interface.o Micah:MPW:Libraries:Libraries:Toollibs.o"
Xlink -w -c 'MPS ' -t MPST -sym off -o dmake {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8} {p9} {p10} {p11} {p12} {p13}
Xduplicate :mac:startup.mk startup.mk
END_OF_FILE
if test 3932 -ne `wc -c <'dmake/mac/dompwmak'`; then
echo shar: \"'dmake/mac/dompwmak'\" unpacked with wrong size!
fi
chmod +x 'dmake/mac/dompwmak'
# end of 'dmake/mac/dompwmak'
fi
if test -f 'dmake/mac/eold.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/eold.c'\"
else
echo shar: Extracting \"'dmake/mac/eold.c'\" \(3826 characters\)
sed "s/^X//" >'dmake/mac/eold.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/eold.c,v 1.1 1994/10/06 17:42:58 dvadura Exp $
X-- SYNOPSIS -- Set up and free for environ
X--
X-- DESCRIPTION
X-- This file contains routines that will fill in and dispose of the
X-- list of environmental variables in the environ global variable.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: eold.c,v $
X * Revision 1.1 1994/10/06 17:42:58 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X
X/*
X * Keep track of any environmental variables that have '='s in their
X * name.
X */
Xstruct EqualPos {
X char *fpPos;
X struct equalsign *fpNext;
X} /* struct EqualPos */
X
Xstruct EqualPos *gpEqualList;
X
X/*
X * The character used to replae the equal signs.
X */
Xconst char gEqualReplace = '_';
X
X
X
X/*
X * Set up the environmental variables in a format used by
X * the environ global variable.
X *
X * environ has already been set to main's envp argument when
X * this suboroutine is called.
X */
Xvoid main_env () {
X char **ppCurEnv;
X char *pCurPos;
X struct equalpos *pNewEqual;
X
X gpEqualList = NULL;
X
X for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) {
X for (pCurPos = *ppCurEnv; *pCurPos != '\0'; ++pCurPos) {
X if (*pCurPos == '=') {
X if ((pNewEqual =
X (struct EqualPos *) malloc (sizeof (struct EqualPos))) ==
X NULL) {
X fputs ("Out of Memory", stderr);
X exit (EXIT_FAILURE);
X } /* if */
X pNewEqual->fpPos = pCurPos;
X pNewEqual->fpNext = gpEqualList;
X gpEqualList = pNewEqual;
X
X *pCurPos = gEqualReplace;
X } /* if */
X } /* for */
X
X *pCurPos = '=';
X } /* for */
X} /* void main_env () */
X
X
X
X/*
X * Reset the environmental variables so they look like they did
X * before the main_env() call.
X *
X * environ has already been set to main's envp argument when
X * this suboroutine is called.
X */
Xvoid main_env () {
X char **ppCurEnv;
X char *pCurPos;
X struct equalpos *pNewEqual;
X
X gpEqualList = NULL;
X
X for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) {
X for (pCurPos = *ppCurEnv; *pCurPos != '\0'; ++pCurPos) {
X if (*pCurPos == '=') {
X if ((pNewEqual =
X (struct EqualPos *) malloc (sizeof (struct EqualPos))) ==
X NULL) {
X fputs ("Out of Memory", stderr);
X exit (EXIT_FAILURE);
X } /* if */
X pNewEqual->fpPos = pCurPos;
X pNewEqual->fpNext = gpEqualList;
X gpEqualList = pNewEqual;
X
X *pCurPos = gEqualReplace;
X } /* if */
X } /* for */
X
X *pCurPos = '=';
X } /* for */
X} /* void main_env () */
END_OF_FILE
if test 3826 -ne `wc -c <'dmake/mac/eold.c'`; then
echo shar: \"'dmake/mac/eold.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/eold.c'
fi
if test -f 'dmake/mac/tomacfil.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/tomacfil.c'\"
else
echo shar: Extracting \"'dmake/mac/tomacfil.c'\" \(3720 characters\)
sed "s/^X//" >'dmake/mac/tomacfil.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/tomacfil.c,v 1.1 1994/10/06 17:43:04 dvadura Exp $
X-- SYNOPSIS -- Routines to change unix file names to mac file names
X--
X-- DESCRIPTION
X-- Dmake sometimes assumes that files have '/' as a directory parameter in some makefiles.
X-- This works, even on DOS, but not on the Mac. In fact, on the Mac, you can't even do a
X-- a simple switch of ':' for '/' because all other the Mac has decided to reverse the use
X-- of a first-character directory delimiter to mean a relative path rather than absolute path.
X-- (i.e., ':test:b' means directory test is relative to the current directory, rather than
X-- a top-level directory. Thus, this file attempts to do the directory conversion behind
X-- the back of the rest of the program.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: tomacfil.c,v $
X * Revision 1.1 1994/10/06 17:43:04 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
Xint IsUnixFName (char *pFileName);
X
X
X
X/*
X * Convert a file that may be in unix format to mac format.
X *
X * The returned name is either the untouched pUnixName, or a static buffer.
X */
XPUBLIC char *
XUnix2MacFName(char *pUnixName)
X{
X static char MacName[256];
X char *pCurMac;
X
X if (IsUnixFName (pUnixName)) {
X if (strlen (pUnixName) + (*pUnixName == '/' ? -1 : 1) >= sizeof (MacName)) {
X Fatal ("File name '%s' is too long and will cause a buffer overflow", pUnixName);
X } /* if */
X
X /* Set up relative or absolute path */
X pCurMac = MacName;
X if (*pUnixName == '/') {
X ++pUnixName;
X } else {
X *(pCurMac++) = ':';
X } /* if ... else */
X
X /* Convert the rest of the name */
X while (*pUnixName != '\0') {
X if (*pUnixName == '/') {
X *(pCurMac++) = ':';
X pUnixName++;
X
X } else {
X *(pCurMac++) = *(pUnixName++);
X } /* if ... else */
X } /* while */
X
X *pCurMac = '\0';
X return (MacName);
X
X } else {
X return (pUnixName);
X } /* if ... else */
X} /* PUBLIC char *Unix2MacFName() */
X
X
X
X/*
X * Is this file name in UNIX format?
X * (We assume it is if there are any slashes in its name.)
X */
Xint IsUnixFName (char *pFileName) {
X
X for ( ; *pFileName != '\0'; ++pFileName) {
X if (*pFileName == '/') {
X return (TRUE);
X } /* if */
X } /* while */
X
X return (FALSE);
X} /* int IsUnixFName () */
X
X
X
X/*
X * Call the real fopen() from this override of the function
X * that the rest of the program uses.
X */
X#undef fopen
XPUBLIC FILE *
XMacFOpen(char *pFName, char *pMode)
X{
X return (fopen (Unix2MacFName (pFName), pMode));
X} /* PUBLIC FILE *MacFOpen () */
END_OF_FILE
if test 3720 -ne `wc -c <'dmake/mac/tomacfil.c'`; then
echo shar: \"'dmake/mac/tomacfil.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/tomacfil.c'
fi
if test -f 'dmake/msdos/bccdos/mkswp.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/mkswp.bat'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/mkswp.bat'\" \(3679 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/mkswp.bat' <<'END_OF_FILE'
Xmd objects
Xtasm -t -mx -dmlarge msdos\exec.asm;
Xmv exec.obj objects
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml make.c
Xcopy make.obj objects
Xdel make.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml path.c
Xcopy path.obj objects
Xdel path.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml state.c
Xcopy state.obj objects
Xdel state.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml function.c
Xcopy function.obj objects
Xdel function.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\find.c
Xcopy find.obj objects
Xdel find.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\spawn.c
Xcopy spawn.obj objects
Xdel spawn.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\bccdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\bccdos\utime.c
Xcopy utime.obj objects
Xdel utime.obj
Xcopy msdos\bccdos\startup.mk startup.mk
Xtlink @msdos\bccdos\objswp.rsp,dmake.exe,NUL.MAP,@msdos\bccdos\libswp.rsp
END_OF_FILE
if test 3679 -ne `wc -c <'dmake/msdos/bccdos/mkswp.bat'`; then
echo shar: \"'dmake/msdos/bccdos/mkswp.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/mkswp.bat'
fi
if test -f 'dmake/msdos/bccdos/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/startup.mk'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/startup.mk'\" \(3856 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/startup.mk' <<'END_OF_FILE'
X# MSDOS DMAKE startup file. Customize to suit your needs.
X# Assumes MKS toolkit for the tool commands, and Turbo-C. Change as req'd.
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X# are going to use. COMSPEC (assumed to be command.com) or
X# MKS Korn Shell.
X.IF $(SHELL)==$(COMSPEC)
X SHELLFLAGS := $(SWITCHAR)c
X GROUPFLAGS := $(SHELLFLAGS)
X SHELLMETAS := *"?<>
X GROUPSUFFIX := .bat
X DIRSEPSTR := \\\
X DIVFILE = $(TMPFILE:s,/,\)
X.ELSE
X SHELLFLAGS := -c
X GROUPFLAGS :=
X SHELLMETAS := *"?<>|()&][$$\#`'
X GROUPSUFFIX := .ksh
X .MKSARGS := yes
X DIVFILE = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
X DIVSEP_shell_yes := \\\
X DIVSEP_shell_no := \\
X.END
X
X# Standard C-language command names and flags
X CC := bcc # C-compiler and flags
X CFLAGS +=
X
X AS := tasm # Assembler and flags
X ASFLAGS +=
X
X LD = tlink # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := ytab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex_yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := tpc # pascal compiler
X RC := anyf77 # ratfor compiler
X FC := anyf77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O .SWAP: %.c ; $(CC) $(CFLAGS) -c $<
X %$O .SWAP: %$P ; $(PC) $(PFLAGS) -c $<
X %$O .SWAP: %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
X %$O : %.cl ; class -c $<
X %$O .SWAP:| %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E .SWAP: %$O ; $(CC) $(LDFLAGS) -e$@ $<
X
X# lex and yacc rules
X %.c .SWAP: %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c .SWAP: %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .SWAP .GROUP:
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local init file if any, gets parsed before user makefile
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3856 -ne `wc -c <'dmake/msdos/bccdos/startup.mk'`; then
echo shar: \"'dmake/msdos/bccdos/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/startup.mk'
fi
if test -f 'dmake/msdos/exec.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/exec.uue'\"
else
echo shar: Extracting \"'dmake/msdos/exec.uue'\" \(3800 characters\)
sed "s/^X//" >'dmake/msdos/exec.uue' <<'END_OF_FILE'
Xbegin 777 exec.obj
XM@! #DU31$]37&5X96,N87-M;(@@ '%1U<F)O($%S<V5M8FQE<B @5F5R
XM<VEO;B S+C";B!8 0.DJ<T$=#DU31$]37&5X96,N87-M.H@# $#I3)8" !H
XMB , 0*&4EA "45814-?5$585 1#3T1%:9@' $@:" (# ?&6# %7T1!5$$$
XM1$%40<*8!P!( @ $!0$-E@@ !D1'4D]54(N:! &_P);C D !E]E<G)N;P#@
XMD!, 0(,7TEN=&5R<G5P=&5D 69 < !%5]D;U]U;FAO;VM?<W1D7W=R
XM:71E<P,( &>0# 05?97AE8^$& '.0&@ 1-?9&]?:&]O:U]S=&1?=W)I
XM=&5SN < FH@$ $"B 9&@!@ !F ,&B#@ !7 $E $ 0 $ RJ(. &(
XM 4$ 0 ! 0""H@X <D! 0 ! $ ! (&@" !S $ BJ#' '4
XM 65X96,Z($9A:6QU<F4@<F5A9&EN9R!H96%D97(@8FQO8VL-"B1E>&5C.B!&
XM86EL=7)E(')E861I;F<@<V5G;65N="!D871A#0HD97AE8SH@1F%I;'5R92!O
XM;B!R97-I>F4-"B1E>&5C.B!&86EL=7)E('1O(&9R964@82!B;&]C:PT*)&5X
XM96,Z(%!R;V=R86T@<W=A<"!F86EL=7)E#0HD97AE8SH@365M;W)Y(&)L;V-K
XM<R!D;VX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A4
XM <>-5 ''HE0!QZE4 <>T5 ''N%0!Q\-4 <?'5 $%H'\! 9\&B3:% :*' ;J!
XM ;D' (L>R@&T0,TA<@8]!P!T ?G#'BZ.'H$!+HL6@P$NBPZ% 2Z+'LH!M$#-
XM(1]R!SL&A0%T ?G#58OL5E<>#@?\BT8&)J.. (M&$":CB@"_F@#%=@BY00#H
XM]_R_VP#%=@RY@0#HZ_R_B '%=A*Y00#HW_R,T":C@ FB2:" (S(CMB.T+R
XM ,<&D@ ,<&D +@C-<TA+HD>O (NC :^ KJS [@C)<TAN"0US2$NB1[
XM BZ,!L("NI8#N"0ES2&T4<TA+HD>C #HU?TNQ1:\ K@C)<TA+L46P *X)"7-
XM(2ZA@ ".T"Z+)H( '[@ ([ +J&2 ":C "X ".P"ZAU@(FHP +J&0 %]>
XM7<M5B^Q7BWX&+HD^T &T4<TA+HD>C ".PR;$'C0 )HI' 2ZBTP$FB@$NHM(!
XMN"$US2$NB1[, 2Z,!LX!'HS(CMBZV *X(27-(1]?7<L>+L46S &,V O"= FX
XM(26<+O\>S $?RPJ<O0#$ E0!Q 54 <0(5 '$#U0!Q")4 <0G5 '$+%0!Q#%4
XM <0\5 '$4%0!Q%=4 <1:5 '$9E0!Q')4 <2!5 '$AE0!Q(]4 <235 '$F50!
XMQ*54 <2J5 '$K50!Q+Q4 <3!5 '$Q%0!Q-)4 <3:5 '$Y%0!Q.U4 <3T5 '(
XM^!0! L3^5 '% A0! LD%%@$!Q0M4 <4/%@$!Q1-4 <4C5 '%+%0!Q3M4 <5"
XE5 '%3%0!Q5%4 <595 '%:%0!Q7=4 ?6@!@ " %B* @ =%0!
X
Xend
END_OF_FILE
if test 3800 -ne `wc -c <'dmake/msdos/exec.uue'`; then
echo shar: \"'dmake/msdos/exec.uue'\" unpacked with wrong size!
fi
chmod +x 'dmake/msdos/exec.uue'
# end of 'dmake/msdos/exec.uue'
fi
if test -f 'dmake/msdos/mscdos/mk50swp.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk50swp.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk50swp.bat'\" \(3762 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk50swp.bat' <<'END_OF_FILE'
Xmd objects
Xmasm -t -mx -Dmlarge msdos\exec.asm;
Xmv exec.obj objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs make.c
Xcopy make.obj objects
Xdel make.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs path.c
Xcopy path.obj objects
Xdel path.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs state.c
Xcopy state.obj objects
Xdel state.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs function.c
Xcopy function.obj objects
Xdel function.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\find.c
Xcopy find.obj objects
Xdel find.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\spawn.c
Xcopy spawn.obj objects
Xdel spawn.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 /exe /packc /batch @msdos\mscdos\objswp.rsp,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3762 -ne `wc -c <'dmake/msdos/mscdos/mk50swp.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk50swp.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk50swp.bat'
fi
if test -f 'dmake/msdos/mscdos/mk51swp.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk51swp.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk51swp.bat'\" \(3764 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk51swp.bat' <<'END_OF_FILE'
Xmd objects
Xmasm -t -mx -Dmlarge msdos\exec.asm;
Xmv exec.obj objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs make.c
Xcopy make.obj objects
Xdel make.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs path.c
Xcopy path.obj objects
Xdel path.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs state.c
Xcopy state.obj objects
Xdel state.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs function.c
Xcopy function.obj objects
Xdel function.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\find.c
Xcopy find.obj objects
Xdel find.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\spawn.c
Xcopy spawn.obj objects
Xdel spawn.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 /exe /packc /batch @msdos\mscdos\objswp.rsp_F,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3764 -ne `wc -c <'dmake/msdos/mscdos/mk51swp.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk51swp.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk51swp.bat'
fi
if test -f 'dmake/msdos/mscdos/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/startup.mk'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/startup.mk'\" \(3859 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/startup.mk' <<'END_OF_FILE'
X# MSDOS DMAKE startup file. Customize to suit your needs.
X# Assumes MKS toolkit for the tool commands, and Microsoft C. Change as req'd.
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X# are going to use. COMSPEC (assumed to be command.com) or
X# MKS Korn Shell.
X.IF $(SHELL)==$(COMSPEC)
X SHELLFLAGS := $(SWITCHAR)c
X GROUPFLAGS := $(SHELLFLAGS)
X SHELLMETAS := *"?<>
X GROUPSUFFIX := .bat
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := ytab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex_yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := any_pc # pascal compiler
X RC := anyf77 # ratfor compiler
X FC := anyf77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := rm # remove a file command
X RMFLAGS +=
X
X%$A .SWAP .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local init file if any, gets parsed before user makefile
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3859 -ne `wc -c <'dmake/msdos/mscdos/startup.mk'`; then
echo shar: \"'dmake/msdos/mscdos/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/startup.mk'
fi
if test -f 'dmake/msdos/tccdos/mkswp.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/mkswp.bat'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/mkswp.bat'\" \(3780 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/mkswp.bat' <<'END_OF_FILE'
Xmd objects
Xtasm -t -mx -dmlarge msdos\exec.asm;
Xmv exec.obj objects
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml make.c
Xcopy make.obj objects
Xdel make.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml path.c
Xcopy path.obj objects
Xdel path.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml state.c
Xcopy state.obj objects
Xdel state.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml function.c
Xcopy function.obj objects
Xdel function.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\find.c
Xcopy find.obj objects
Xdel find.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\spawn.c
Xcopy spawn.obj objects
Xdel spawn.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\tccdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\tccdos\utime.c
Xcopy utime.obj objects
Xdel utime.obj
Xcopy msdos\tccdos\startup.mk startup.mk
Xtlink @msdos\tccdos\objswp.rsp,dmake.exe,NUL.MAP,@msdos\tccdos\libswp.rsp/c
END_OF_FILE
if test 3780 -ne `wc -c <'dmake/msdos/tccdos/mkswp.bat'`; then
echo shar: \"'dmake/msdos/tccdos/mkswp.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/mkswp.bat'
fi
if test -f 'dmake/msdos/tccdos/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/startup.mk'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/startup.mk'\" \(3832 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/startup.mk' <<'END_OF_FILE'
X# MSDOS DMAKE startup file. Customize to suit your needs.
X# Assumes MKS toolkit for the tool commands, and Turbo-C. Change as req'd.
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X# are going to use. COMSPEC (assumed to be command.com) or
X# MKS Korn Shell.
X.IF $(SHELL)==$(COMSPEC)
X SHELLFLAGS := $(SWITCHAR)c
X GROUPFLAGS := $(SHELLFLAGS)
X SHELLMETAS := *"?<>
X GROUPSUFFIX := .bat
X DIRSEPSTR := \\\
X DIVFILE = $(TMPFILE:s,/,\)
X.ELSE
X SHELLFLAGS := -c
X GROUPFLAGS :=
X SHELLMETAS := *"?<>|()&][$$\#`'
X GROUPSUFFIX := .ksh
X .MKSARGS := yes
X DIVFILE = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
X DIVSEP_shell_yes := \\\
X DIVSEP_shell_no := \\
X.END
X
X# Standard C-language command names and flags
X CC := tcc # C-compiler and flags
X CFLAGS +=
X
X AS := tasm # Assembler and flags
X ASFLAGS +=
X
X LD = tlink # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := ytab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex_yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := tpc # pascal compiler
X RC := anyf77 # ratfor compiler
X FC := anyf77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .SWAP .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local init file if any, gets parsed before user makefile
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3832 -ne `wc -c <'dmake/msdos/tccdos/startup.mk'`; then
echo shar: \"'dmake/msdos/tccdos/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/startup.mk'
fi
if test -f 'dmake/msdos/ztcdos/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/config.h'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/config.h'\" \(1932 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/ztcdos/RCS/config.h,v 1.1 1994/10/06 17:41:53 dvadura Exp $
X-- SYNOPSIS -- Configurarion include file.
X--
X-- DESCRIPTION
X-- There is one of these for each specific machine configuration.
X-- It can be used to further tweek the machine specific sources
X-- so that they compile.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: config.h,v $
X * Revision 1.1 1994/10/06 17:41:53 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* in sysintf.c: SIGQUIT is used, this is not defined in ZTC */
X#ifndef SIGQUIT
X# define SIGQUIT SIGTERM
X#endif
X
X/* in sysintf.c: tzset is not supported by ZTC */
X#define tzset()
X
X/* ZTC uses it's own swapping spawn. */
X#define spawnvpe(a,b,c,d) spawnvp(a,b,c)
X
X#ifndef CONST
X# define CONST const
X#endif
X
X#ifndef MSDOS
X# define MSDOS 1
X#endif
X
Xextern unsigned _psp;
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 1932 -ne `wc -c <'dmake/msdos/ztcdos/config.h'`; then
echo shar: \"'dmake/msdos/ztcdos/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/config.h'
fi
if test -f 'dmake/msdos/ztcdos/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/startup.mk'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/startup.mk'\" \(3898 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/startup.mk' <<'END_OF_FILE'
X# MSDOS DMAKE startup file. Customize to suit your needs.
X# Assumes MKS toolkit for the tool commands, and Zortech C. Change as req'd.
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X# are going to use. COMSPEC (assumed to be command.com) or
X# MKS Korn Shell.
X.IF $(SHELL)==$(COMSPEC)
X SHELLFLAGS := $(SWITCHAR)c
X GROUPFLAGS := $(SHELLFLAGS)
X SHELLMETAS := *"?<>
X GROUPSUFFIX := .bat
X DIRSEPSTR := \\\
X DIVFILE = $(TMPFILE:s,/,\)
X.ELSE
X SHELLFLAGS := -c
X GROUPFLAGS :=
X SHELLMETAS := *"?<>|()&][$$\#`'
X GROUPSUFFIX := .ksh
X .MKSARGS := yes
X DIVFILE = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
X DIVSEP_shell_yes := \\\
X DIVSEP_shell_no := \\
X.END
X
X# Standard C-language command names and flags
X CC := ztc # C-compiler and flags
X CFLAGS +=
X
X AS := masm # Assembler and flags
X ASFLAGS +=
X
X LD = blink # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := ytab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex_yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := any_pc # pascal compiler
X RC := anyf77 # ratfor compiler
X FC := anyf77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %.cpp ; $(CC) $(CFLAGS) -c $<
X%$A .SWAP .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local init file if any, gets parsed before user makefile
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3898 -ne `wc -c <'dmake/msdos/ztcdos/startup.mk'`; then
echo shar: \"'dmake/msdos/ztcdos/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/startup.mk'
fi
if test -f 'dmake/os2/ibm/dmake.ini' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/dmake.ini'\"
else
echo shar: Extracting \"'dmake/os2/ibm/dmake.ini'\" \(3826 characters\)
sed "s/^X//" >'dmake/os2/ibm/dmake.ini' <<'END_OF_FILE'
X RMFLAGS +=
X
X@F = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X<B = $(<:b)
X<D = $(<:d)
X<F = $(<:f)
X?B = $(?:b)
X?F = $(?:f)
X?D = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT := $(__.SILENT)
X
X# Local init file if any, gets parsed before user makefile
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3826 -ne `wc -c <'dmake/os2/ibm/dmake.ini'`; then
echo shar: \"'dmake/os2/ibm/dmake.ini'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/ibm/dmake.ini'
# end of 'dmake/os2/ibm/dmake.ini'
fi
if test -f 'dmake/unix/rmprq.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/rmprq.c'\"
else
echo shar: Extracting \"'dmake/unix/rmprq.c'\" \(3648 characters\)
sed "s/^X//" >'dmake/unix/rmprq.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/RCS/rmprq.c,v 1.1 1994/10/06 17:42:19 dvadura Exp $
X-- SYNOPSIS -- remove prerequisites code.
X--
X-- DESCRIPTION
X-- This code is different for DOS and for UNIX and parallel make
X-- architectures since the parallel case requires the rm's to be
X-- run in parallel, whereas DOS guarantees to run them sequentially.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: rmprq.c,v $
X * Revision 1.1 1994/10/06 17:42:19 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC void
XRemove_prq( tcp )
XCELLPTR tcp;
X{
X static LINKPTR rlp = NIL(LINK);
X static flag = 0;
X static HASHPTR m_at, m_q, m_b, m_g, m_l, m_bb, m_up;
X char *m_at_s, *m_g_s, *m_q_s, *m_b_s, *m_l_s, *m_bb_s, *m_up_s;
X LINKPTR tlp;
X
X tcp->ce_flag &= ~(F_MADE|F_VISITED);
X tcp->ce_time = 0L;
X
X for( tlp=rlp; tlp !=NIL(LINK); tlp=tlp->cl_next )
X if( (tlp->cl_prq->ce_flag & (F_VISITED|F_MADE)) != F_VISITED )
X break;
X
X if( tlp == NIL(LINK) ) {
X TALLOC(tlp, 1, LINK);
X TALLOC(tlp->cl_prq, 1, CELL);
X tlp->cl_next = rlp;
X rlp = tlp;
X }
X
X *tlp->cl_prq = *tcp;
X
X /* We save the dynamic macro values here, as it is possible that the
X * .REMOVE recipe is getting executed for a target while some other target
X * is in the middle of executing it's list of recipe lines, in this case
X * the values of $@ etc, must be preserved so that when we return to
X * complete the other recipe we must make certain that the values of it's
X * dynamic macros are unmodified. */
X
X if( !flag ) {
X /* Do the getting of the macros only once. */
X flag = 1;
X m_at = Get_name("@", Macs, TRUE);
X m_g = Get_name(">", Macs, TRUE);
X m_q = Get_name("?", Macs, TRUE);
X m_b = Get_name("<", Macs, TRUE);
X m_l = Get_name("&", Macs, TRUE);
X m_bb = Get_name("*", Macs, TRUE);
X m_up = Get_name("^", Macs, TRUE);
X }
X
X m_at_s = m_at->ht_value; m_at->ht_value = NIL(char);
X m_g_s = m_g->ht_value; m_g->ht_value = NIL(char);
X m_q_s = m_q->ht_value; m_q->ht_value = NIL(char);
X m_b_s = m_b->ht_value; m_b->ht_value = NIL(char);
X m_l_s = m_l->ht_value; m_l->ht_value = NIL(char);
X m_bb_s = m_bb->ht_value; m_bb->ht_value = NIL(char);
X m_up_s = m_up->ht_value; m_up->ht_value = NIL(char);
X
X Make( tlp->cl_prq, tcp );
X if( tlp->cl_prq->ce_dir ){
X FREE(tlp->cl_prq->ce_dir);
X tlp->cl_prq->ce_dir=NIL(char);
X }
X
X m_at->ht_value = m_at_s;
X m_g->ht_value = m_g_s;
X m_q->ht_value = m_q_s;
X m_b->ht_value = m_b_s;
X m_l->ht_value = m_l_s;
X m_bb->ht_value = m_bb_s;
X m_up->ht_value = m_up_s;
X}
END_OF_FILE
if test 3648 -ne `wc -c <'dmake/unix/rmprq.c'`; then
echo shar: \"'dmake/unix/rmprq.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/rmprq.c'
fi
echo shar: End of archive 19 \(of 27\).
cp /dev/null ark19isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/malloc/dump.c dmake/dbug/malloc/mlc_chn.c
# dmake/mac/startup.mk dmake/msdos/bccdos/mk.bat
# dmake/msdos/mscdos/mk40swp.bat dmake/msdos/mscdos/mk50.bat
# dmake/msdos/mscdos/mk51.bat dmake/msdos/tccdos/mk.bat
# dmake/msdos/ztcdos/mk.bat dmake/msdos/ztcdos/mkswp.bat
# dmake/os2/mscdos/mk40.cmd dmake/os2/mscdos/mk50.cmd
# dmake/unix/dcache.c dmake/unix/sysvr1/startup.mk
# dmake/unix/sysvr3/startup.mk dmake/unix/sysvr4/startup.mk
# dmake/unix/xenix/startup.mk
# Wrapped by kent@sparky on Fri Oct 21 16:50:48 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 20 (of 27)."'
if test -f 'dmake/dbug/malloc/dump.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/dump.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/dump.c'\" \(3464 characters\)
sed "s/^X//" >'dmake/dbug/malloc/dump.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X#include "malloc.h"
X#include "tostring.h"
X
X/*
X * Function: malloc_dump()
X *
X * Purpose: to dump a printed copy of the malloc chain and
X * associated data elements
X *
X * Arguments: fd - file descriptor to write data to
X *
X * Returns: nothing of any use
X *
X * Narrative: Just print out all the junk
X *
X * Notes: This function is implemented using low level calls because
X * of the likelyhood that the malloc tree is damaged when it
X * is called. (Lots of things in the c library use malloc and
X * we don't want to get into a catch-22).
X *
X */
X
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: dump.c,v 1.1 1994/10/06 17:43:09 dvadura Exp $";
X#endif
X
X
X#define ERRSTR "I/O Error on malloc dump file descriptor\n"
X
X#define WRITEOUT(fd,str,len) if( write(fd,str,(unsigned)len) != len ) \
X { \
X (void) write(2,ERRSTR,\
X (unsigned)strlen(ERRSTR));\
X exit(120); \
X }
X
Xvoid
Xmalloc_dump(fd)
X int fd;
X{
X char buffer[512];
X void exit();
X int i;
X extern char * malloc_data_end;
X extern char * malloc_data_start;
X extern struct mlist * malloc_end;
X extern struct mlist malloc_start;
X struct mlist * ptr;
X
X WRITEOUT(fd,"MALLOC CHAIN:\n",14);
X WRITEOUT(fd,"-------------------- START ----------------\n",44);
X
X for(i=0; i < 80; i++)
X {
X buffer[i] = ' ';
X }
X
X for(ptr = &malloc_start; ptr; ptr = ptr->next)
X {
X (void) tostring(buffer, (int)ptr, 8, B_HEX, '0');
X (void) tostring(buffer+9, (int)ptr->next, 8, B_HEX, '0');
X (void) tostring(buffer+18, (int)ptr->prev, 8, B_HEX, '0');
X (void) tostring(buffer+27, (int)ptr->flag, 10, B_HEX, '0');
X (void) tostring(buffer+38, (int)ptr->s.size, 8, B_DEC, ' ');
X (void) tostring(buffer+47, (int)ptr->s.size, 8, B_HEX, '0');
X (void) tostring(buffer+57, (int)ptr->data, 8, B_HEX, '0');
X buffer[46] = '(';
X buffer[55] = ')';
X buffer[65] = '\n';
X WRITEOUT(fd,buffer,66);
X }
X WRITEOUT(fd,"-------------------- DONE -----------------\n",44);
X
X WRITEOUT(fd,"Malloc start: ",19);
X (void) tostring(buffer, (int) &malloc_start, 8, B_HEX, '0');
X buffer[8] = '\n';
X WRITEOUT(fd,buffer,9);
X
X WRITEOUT(fd,"Malloc end: ", 19);
X (void) tostring(buffer, (int) malloc_end, 8, B_HEX, '0');
X buffer[8] = '\n';
X WRITEOUT(fd,buffer,9);
X
X WRITEOUT(fd,"Malloc data start: ", 19);
X (void) tostring(buffer, (int) malloc_data_start, 8, B_HEX, '0');
X buffer[8] = '\n';
X WRITEOUT(fd,buffer,9);
X
X WRITEOUT(fd,"Malloc data end: ", 19);
X (void) tostring(buffer, (int) malloc_data_end, 8, B_HEX, '0');
X buffer[8] = '\n';
X WRITEOUT(fd,buffer,9);
X
X} /* malloc_dump(... */
X
X
X/*
X * $Log: dump.c,v $
X * Revision 1.1 1994/10/06 17:43:09 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:19 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:01 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.5 90/08/29 21:22:37 cpcahil
X * miscellaneous lint fixes
X *
X * Revision 1.4 90/05/11 00:13:08 cpcahil
X * added copyright statment
X *
X * Revision 1.3 90/02/24 21:50:07 cpcahil
X * lots of lint fixes
X *
X * Revision 1.2 90/02/24 17:27:48 cpcahil
X * changed $header to $Id to remove full path from rcs id string
X *
X * Revision 1.1 90/02/22 23:17:43 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 3464 -ne `wc -c <'dmake/dbug/malloc/dump.c'`; then
echo shar: \"'dmake/dbug/malloc/dump.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/dump.c'
fi
if test -f 'dmake/dbug/malloc/mlc_chn.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/mlc_chn.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/mlc_chn.c'\" \(3448 characters\)
sed "s/^X//" >'dmake/dbug/malloc/mlc_chn.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X#include <fcntl.h>
X#include "malloc.h"
X
X/*
X * Function: malloc_chain_check()
X *
X * Purpose: to verify malloc chain is intact
X *
X * Arguments: todo - 0 - just check and return status
X * 1 - call malloc_warn if error detected
X *
X * Returns: 0 - malloc chain intact & no overflows
X * other - problems detected in malloc chain
X *
X * Narrative:
X *
X * Notes: If todo is non-zero the malloc_warn function, when called
X * may not return (i.e. it may exit)
X *
X */
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: mlc_chn.c,v 1.1 1994/10/06 17:43:16 dvadura Exp $";
X#endif
X
X
Xint
Xmalloc_chain_check(todo)
X int todo;
X{
X char * func = "malloc_chain_check";
X int i;
X extern char * malloc_data_start;
X extern char * malloc_data_end;
X extern struct mlist * malloc_end;
X extern int malloc_errno;
X extern struct mlist malloc_start;
X struct mlist * oldptr;
X struct mlist * ptr;
X int rtn = 0;
X
X oldptr = &malloc_start;
X for(ptr = malloc_start.next; ; ptr = ptr->next)
X {
X /*
X * Since the malloc chain is a forward only chain, any
X * pointer that we get should always be positioned in
X * memory following the previous pointer. If this is not
X * so, we must have a corrupted chain.
X */
X if( ptr )
X {
X if(ptr < oldptr )
X {
X malloc_errno = M_CODE_CHAIN_BROKE;
X if( todo )
X {
X malloc_fatal(func);
X }
X rtn++;
X break;
X }
X oldptr = ptr;
X }
X else
X {
X if( oldptr != malloc_end )
X {
X /*
X * This should never happen. If it does, then
X * we got a real problem.
X */
X malloc_errno = M_CODE_NO_END;
X if( todo )
X {
X malloc_fatal(func);
X }
X rtn++;
X }
X break;
X }
X
X /*
X * verify that ptr is within the malloc region...
X * since we started within the malloc chain this should never
X * happen.
X */
X
X if( ((char *)ptr < malloc_data_start) ||
X ((char *)ptr > malloc_data_end) )
X {
X malloc_errno = M_CODE_BAD_PTR;
X if( todo )
X {
X malloc_fatal(func);
X }
X rtn++;
X break;
X }
X
X /*
X * verify magic flag is set
X */
X
X if( (ptr->flag&M_MAGIC) != M_MAGIC )
X {
X malloc_errno = M_CODE_BAD_MAGIC;
X if( todo )
X {
X malloc_warning(func);
X }
X rtn++;
X continue;
X }
X
X /*
X * verify segments are correctly linked together
X */
X
X if( (ptr->prev && (ptr->prev->next != ptr) ) ||
X (ptr->next && (ptr->next->prev != ptr) ) ||
X ((ptr->next == NULL) && (ptr->prev == NULL)) )
X {
X malloc_errno = M_CODE_BAD_CONNECT;
X if( todo )
X {
X malloc_warning(func);
X }
X rtn++;
X continue;
X }
X
X /*
X * If this segment is allocated
X */
X
X if( (ptr->flag & M_INUSE) != 0 )
X {
X /*
X * verify no overflow of data area
X */
X
X for(i=ptr->r_size; i < ptr->s.size; i++)
X {
X if( ptr->data[i] != M_FILL )
X {
X malloc_errno = M_CODE_OVERRUN;
X if( todo )
X {
X malloc_warning(func);
X }
X rtn++;
X break;
X }
X }
X }
X else /* it's not allocated so */
X {
X /*
X * verify no reuse of freed data blocks
X */
X
X for(i=0; i < ptr->s.size; i++)
X {
X if( ptr->data[i] != M_FREE_FILL )
X {
X malloc_errno = M_CODE_REUSE;
X if( todo )
X {
X malloc_warning(func);
X }
X rtn++;
X break;
X }
X }
X }
X
X } /* for(... */
X
X return(rtn);
X
X} /* malloc_chain_check(... */
END_OF_FILE
if test 3448 -ne `wc -c <'dmake/dbug/malloc/mlc_chn.c'`; then
echo shar: \"'dmake/dbug/malloc/mlc_chn.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/mlc_chn.c'
fi
if test -f 'dmake/mac/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/startup.mk'\"
else
echo shar: Extracting \"'dmake/mac/startup.mk'\" \(3532 characters\)
sed "s/^X//" >'dmake/mac/startup.mk' <<'END_OF_FILE'
X# MPW Mac startup file. Customize to suit your needs.
X# Assumes MPW C. Change as req'd.
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .lib # Libraries
XC := .c # C
XE := # Executables
XF := .f # Fortran
XO := .c.o # Object files: Assume they are created from C files
XP := .p # Pascal
XS := .a # Assembler sources
XV := v # RCS suffix
X
X# See if these are defined
XTMPDIR := $(MPW)/tmp
X.IMPORT .IGNORE : TMPDIR
X.IMPORT .IGNORE : CLibraries Libraries
X
X# Set arguments for the SHELL. Since we can't execute sub-processes,
X# these variables are not important, except for some makefiles that check
X# for some values to determine the platform.
XSHELL := mpw
XSHELLFLAGS :=
XGROUPFLAGS :=
XSHELLMETAS :=
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CC := c # C-compiler and flags
X CFLAGS +=
X
X AS := asm # Assembler and flags
X ASFLAGS +=
X
X LD = link # Loader and flags
X LDFLAGS +=
X LDLIBS = "$(CLibraries)CSANELib.o" "$(CLibraries)Math.o" \
X "$(CLibraries)StdCLib.o" "$(Libraries)Runtime.o" \
X "$(Libraries)Interface.o" "$(Libraries)Toollibs.o"
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := ytab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex_yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := any_pc # pascal compiler
X RC := anyf77 # ratfor compiler
X FC := anyf77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X RM := delete # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$C.o : %$C ; $(CC) $(CFLAGS) -c $<
X %$P.o : %$P ; $(PC) $(PFLAGS) -c $<
X %$S.o : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
X %$F.o : %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables rules should go here. However, on the Mac, there is not
X# executable suffix (such as ".exe") and thus we end up with rules like
X# "% : %.c.o", which cause circular-dependency errors. Thus, it's easier
X# just to avoid specifiying any default rule for executables.
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $@
X .NOINFER : s.%
X.END
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local init file if any, gets parsed before user makefile
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3532 -ne `wc -c <'dmake/mac/startup.mk'`; then
echo shar: \"'dmake/mac/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/mac/startup.mk'
fi
if test -f 'dmake/msdos/bccdos/mk.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/mk.bat'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/mk.bat'\" \(3506 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/mk.bat' <<'END_OF_FILE'
Xmd objects
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\tee.c
Xcopy tee.obj objects
Xdel tee.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\bccdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xbcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml msdos\bccdos\utime.c
Xcopy utime.obj objects
Xdel utime.obj
Xcopy msdos\bccdos\startup.mk startup.mk
Xtlink @msdos\bccdos\obj.rsp,dmake.exe,NUL.MAP,@msdos\bccdos\lib.rsp
END_OF_FILE
if test 3506 -ne `wc -c <'dmake/msdos/bccdos/mk.bat'`; then
echo shar: \"'dmake/msdos/bccdos/mk.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/mk.bat'
fi
if test -f 'dmake/msdos/mscdos/mk40swp.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk40swp.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk40swp.bat'\" \(3296 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk40swp.bat' <<'END_OF_FILE'
Xmd objects
Xmasm -t -mx -Dmlarge msdos\exec.asm;
Xmv exec.obj objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 make.c
Xcopy make.obj objects
Xdel make.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 path.c
Xcopy path.obj objects
Xdel path.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 state.c
Xcopy state.obj objects
Xdel state.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 function.c
Xcopy function.obj objects
Xdel function.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\find.c
Xcopy find.obj objects
Xdel find.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\spawn.c
Xcopy spawn.obj objects
Xdel spawn.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 @msdos\mscdos\objswp.rsp_,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3296 -ne `wc -c <'dmake/msdos/mscdos/mk40swp.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk40swp.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk40swp.bat'
fi
if test -f 'dmake/msdos/mscdos/mk50.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk50.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk50.bat'\" \(3586 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk50.bat' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\tee.c
Xcopy tee.obj objects
Xdel tee.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=500 -Oscl -Gs msdos\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 /exe /packc /batch @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3586 -ne `wc -c <'dmake/msdos/mscdos/mk50.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk50.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk50.bat'
fi
if test -f 'dmake/msdos/mscdos/mk51.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk51.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk51.bat'\" \(3586 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk51.bat' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\tee.c
Xcopy tee.obj objects
Xdel tee.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D_MSC_VER=510 -Oscl -Gs msdos\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 /exe /packc /batch @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3586 -ne `wc -c <'dmake/msdos/mscdos/mk51.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk51.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk51.bat'
fi
if test -f 'dmake/msdos/tccdos/mk.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/mk.bat'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/mk.bat'\" \(3604 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/mk.bat' <<'END_OF_FILE'
Xmd objects
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\tee.c
Xcopy tee.obj objects
Xdel tee.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\tccdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xtcc -c -I. -Imsdos -Imsdos\tccdos -f- -d -O -N -w-nod -ml msdos\tccdos\utime.c
Xcopy utime.obj objects
Xdel utime.obj
Xcopy msdos\tccdos\startup.mk startup.mk
Xtlink @msdos\tccdos\obj.rsp,dmake.exe,NUL.MAP,@msdos\tccdos\lib.rsp/c
END_OF_FILE
if test 3604 -ne `wc -c <'dmake/msdos/tccdos/mk.bat'`; then
echo shar: \"'dmake/msdos/tccdos/mk.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/mk.bat'
fi
if test -f 'dmake/msdos/ztcdos/mk.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/mk.bat'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/mk.bat'\" \(3338 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/mk.bat' <<'END_OF_FILE'
Xmd objects
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\infer.obj infer.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\make.obj make.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\stat.obj stat.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\expand.obj expand.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmstring.obj dmstring.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\hash.obj hash.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dag.obj dag.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmake.obj dmake.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\path.obj path.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\imacs.obj imacs.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\sysintf.obj sysintf.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\parse.obj parse.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\getinp.obj getinp.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\quit.obj quit.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\state.obj state.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmdump.obj dmdump.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\macparse.obj macparse.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\rulparse.obj rulparse.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\percent.obj percent.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\function.obj function.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\ruletab.obj msdos\ruletab.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dirbrk.obj msdos\dirbrk.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\runargv.obj msdos\runargv.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\arlib.obj msdos\arlib.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\_chdir.obj msdos\_chdir.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\switchar.obj msdos\switchar.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\rmprq.obj msdos\rmprq.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\tee.obj msdos\tee.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dirlib.obj msdos\dirlib.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dcache.obj unix\dcache.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\tempnam.obj msdos\ztcdos\tempnam.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\environ.obj msdos\ztcdos\environ.c
Xcopy msdos\ztcdos\startup.mk startup.mk
Xblink @msdos\ztcdos\obj.rsp,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3338 -ne `wc -c <'dmake/msdos/ztcdos/mk.bat'`; then
echo shar: \"'dmake/msdos/ztcdos/mk.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/mk.bat'
fi
if test -f 'dmake/msdos/ztcdos/mkswp.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/mkswp.bat'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/mkswp.bat'\" \(3341 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/mkswp.bat' <<'END_OF_FILE'
Xmd objects
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\infer.obj infer.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\make.obj make.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\stat.obj stat.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\expand.obj expand.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmstring.obj dmstring.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\hash.obj hash.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dag.obj dag.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmake.obj dmake.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\path.obj path.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\imacs.obj imacs.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\sysintf.obj sysintf.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\parse.obj parse.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\getinp.obj getinp.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\quit.obj quit.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\state.obj state.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dmdump.obj dmdump.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\macparse.obj macparse.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\rulparse.obj rulparse.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\percent.obj percent.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\function.obj function.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\ruletab.obj msdos\ruletab.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dirbrk.obj msdos\dirbrk.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\runargv.obj msdos\runargv.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\arlib.obj msdos\arlib.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\_chdir.obj msdos\_chdir.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\switchar.obj msdos\switchar.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\rmprq.obj msdos\rmprq.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\tee.obj msdos\tee.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dirlib.obj msdos\dirlib.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\dcache.obj unix\dcache.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\tempnam.obj msdos\ztcdos\tempnam.c
Xztc -c -I. -Imsdos -Imsdos\ztcdos -mL -DM_I86=1 -DMSDOS -b -mi -p -o -oobjects\environ.obj msdos\ztcdos\environ.c
Xcopy msdos\ztcdos\startup.mk startup.mk
Xblink @msdos\ztcdos\objswp.rsp,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3341 -ne `wc -c <'dmake/msdos/ztcdos/mkswp.bat'`; then
echo shar: \"'dmake/msdos/ztcdos/mkswp.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/mkswp.bat'
fi
if test -f 'dmake/os2/mscdos/mk40.cmd' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/mk40.cmd'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/mk40.cmd'\" \(3369 characters\)
sed "s/^X//" >'dmake/os2/mscdos/mk40.cmd' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 make.c
Xcopy make.obj objects
Xdel make.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 path.c
Xcopy path.obj objects
Xdel path.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 state.c
Xcopy state.obj objects
Xdel state.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 function.c
Xcopy function.obj objects
Xdel function.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 os2\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 os2\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 os2\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 os2\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 unix\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -mL -DM_I86=1 -D__STDC__=1 os2\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy os2\mscdos\startup.mk startup.mk
Xlink /stack:8192 @os2\mscdos\obj.rsp,dmake.exe,NUL.MAP,,os2\dmake.def;
END_OF_FILE
if test 3369 -ne `wc -c <'dmake/os2/mscdos/mk40.cmd'`; then
echo shar: \"'dmake/os2/mscdos/mk40.cmd'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/mscdos/mk40.cmd'
# end of 'dmake/os2/mscdos/mk40.cmd'
fi
if test -f 'dmake/os2/mscdos/mk50.cmd' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/mk50.cmd'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/mk50.cmd'\" \(3388 characters\)
sed "s/^X//" >'dmake/os2/mscdos/mk50.cmd' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs make.c
Xcopy make.obj objects
Xdel make.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs path.c
Xcopy path.obj objects
Xdel path.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs state.c
Xcopy state.obj objects
Xdel state.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs function.c
Xcopy function.obj objects
Xdel function.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs os2\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs os2\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs os2\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs os2\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs unix\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D_MSC_VER=500 -Osl -Gs os2\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy os2\mscdos\startup.mk startup.mk
Xlink /stack:8192 /exe /packc /batch @os2\mscdos\obj.rsp,dmake.exe,NUL.MAP,,os2\dmake.def;
END_OF_FILE
if test 3388 -ne `wc -c <'dmake/os2/mscdos/mk50.cmd'`; then
echo shar: \"'dmake/os2/mscdos/mk50.cmd'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/mscdos/mk50.cmd'
# end of 'dmake/os2/mscdos/mk50.cmd'
fi
if test -f 'dmake/unix/dcache.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/dcache.c'\"
else
echo shar: Extracting \"'dmake/unix/dcache.c'\" \(3320 characters\)
sed "s/^X//" >'dmake/unix/dcache.c' <<'END_OF_FILE'
X#include "extern.h"
X#include <dirent.h>
X#include "sysintf.h"
X
X
Xtypedef struct ent {
X char *name;
X time_t mtime;
X int isdir;
X struct ent *next;
X} Entry, *EntryPtr;
X
X
Xtypedef struct mydir {
X char *path;
X uint32 hkey;
X EntryPtr entries;
X struct mydir *next;
X} DirEntry, *DirEntryPtr;
X
Xstatic DirEntryPtr dtab[HASH_TABLE_SIZE];
X
X
X/* Stat a path using the directory cache.
X *
X * We build a cannonical representation of the path using either an absolute
X * path name if that is what 'path' is or the relative path name constructed
X * from 'path' and the present value of Pwd.
X *
X * The present value of Pwd then gives a directory path that we search for
X * in our cache using a hash lookup. If the directory component is located
X * then we search the basename component of the path and return the result of
X * the search: 0L if the component is not in the cache and it's time stamp
X * otherwise.
X *
X * If the directory is not in our cache we insert it into the cache by
X * openning the directory and reading all of the files within. Once read
X * then we return the result of the above search.
X *
X * Optionally, if force is TRUE, and we did NOT read the directory to provide
X * the result then stat the file anyway and update the internal cache.
X */
X
XPUBLIC time_t
XCacheStat(path, force)
Xchar *path;
Xint force;
X{
X struct stat stbuf;
X DirEntryPtr dp;
X EntryPtr ep;
X uint32 hkey;
X uint16 hv;
X char *fpath;
X char *comp;
X char *dir;
X int loaded=FALSE;
X
X if (If_root_path(path))
X fpath = path;
X else
X fpath = Build_path(Pwd,path);
X
X dir = Filedir(DmStrDup(fpath));
X comp = DmStrDup(Basename(fpath));
X
X hv = Hash(dir,&hkey);
X
X for(dp=dtab[hv]; dp; dp=dp->next)
X if (hkey == dp->hkey && strcmp(dp->path,dir) == 0)
X break;
X
X if (!dp) {
X DIR *dirp;
X struct dirent *direntp;
X
X if( Verbose & V_DIR_CACHE )
X printf( "%s: Caching directory [%s]\n", Pname, dir );
X
X /* Load the directory, we have the right hash position already */
X loaded = TRUE;
X
X TALLOC(dp,1,DirEntry);
X dp->next = dtab[hv];
X dtab[hv] = dp;
X dp->path = DmStrDup(dir);
X dp->hkey = hkey;
X
X if (Set_dir(dir) == 0) {
X if((dirp=opendir(dir)) != NIL(DIR)) {
X while((direntp=readdir(dirp)) != NULL) {
X TALLOC(ep,1,Entry);
X ep->name = DmStrDup(direntp->d_name);
X ep->next = dp->entries;
X dp->entries = ep;
X STAT(direntp->d_name,&stbuf);
X ep->isdir = (stbuf.st_mode & S_IFDIR);
X ep->mtime = stbuf.st_mtime;
X }
X closedir(dirp);
X }
X Set_dir(Pwd);
X }
X }
X
X if (dp) {
X for(ep=dp->entries; ep; ep=ep->next)
X if(strcmp(ep->name,comp) == 0)
X break;
X }
X else
X ep = NULL;
X
X if( force && !loaded) {
X if( Verbose & V_DIR_CACHE )
X printf("%s: Updating dir cache entry for [%s]\n", Pname, fpath);
X
X if (strlen(comp) > NameMax || STAT(fpath,&stbuf) != 0) {
X if(ep)
X ep->mtime = 0L;
X }
X else {
X if (!ep) {
X TALLOC(ep,1,Entry);
X ep->name = DmStrDup(comp);
X ep->next = dp->entries;
X ep->isdir = (stbuf.st_mode & S_IFDIR);
X dp->entries = ep;
X }
X
X ep->mtime = stbuf.st_mtime;
X }
X }
X
X FREE(dir);
X FREE(comp);
X return((!ep || (Augmake && ep->isdir)) ? 0L : ep->mtime);
X}
END_OF_FILE
if test 3320 -ne `wc -c <'dmake/unix/dcache.c'`; then
echo shar: \"'dmake/unix/dcache.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/dcache.c'
fi
if test -f 'dmake/unix/sysvr1/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/startup.mk'\" \(3308 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS =
X
X AS := as # Assembler and flags
X ASFLAGS =
X
X LD = $(CC) # Loader and flags
X LDFLAGS =
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lp
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS =
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS =
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS := -q
X
X AR := ar # archiver
X ARFLAGS = -rv
X
X RM := /bin/rm # remove a file command
X RMFLAGS =
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) -o $@ $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.f %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
X %$E : %.sh; cp $< $@; chmod 0777 $@
X
X# lex and yacc rules
X %.c : %.y %.Y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l %.L ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X GET = get
X GFLAGS =
X % : s.% ; $(GET) $(GFLAGS) $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3308 -ne `wc -c <'dmake/unix/sysvr1/startup.mk'`; then
echo shar: \"'dmake/unix/sysvr1/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/startup.mk'
fi
if test -f 'dmake/unix/sysvr3/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/startup.mk'\" \(3308 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS =
X
X AS := as # Assembler and flags
X ASFLAGS =
X
X LD = $(CC) # Loader and flags
X LDFLAGS =
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lp
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS =
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS =
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS := -q
X
X AR := ar # archiver
X ARFLAGS = -rv
X
X RM := /bin/rm # remove a file command
X RMFLAGS =
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) -o $@ $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.f %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
X %$E : %.sh; cp $< $@; chmod 0777 $@
X
X# lex and yacc rules
X %.c : %.y %.Y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l %.L ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X GET = get
X GFLAGS =
X % : s.% ; $(GET) $(GFLAGS) $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3308 -ne `wc -c <'dmake/unix/sysvr3/startup.mk'`; then
echo shar: \"'dmake/unix/sysvr3/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/startup.mk'
fi
if test -f 'dmake/unix/sysvr4/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr4/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr4/startup.mk'\" \(3308 characters\)
sed "s/^X//" >'dmake/unix/sysvr4/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS =
X
X AS := as # Assembler and flags
X ASFLAGS =
X
X LD = $(CC) # Loader and flags
X LDFLAGS =
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lp
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS =
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS =
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS := -q
X
X AR := ar # archiver
X ARFLAGS = -rv
X
X RM := /bin/rm # remove a file command
X RMFLAGS =
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) -o $@ $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.f %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
X %$E : %.sh; cp $< $@; chmod 0777 $@
X
X# lex and yacc rules
X %.c : %.y %.Y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l %.L ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X GET = get
X GFLAGS =
X % : s.% ; $(GET) $(GFLAGS) $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3308 -ne `wc -c <'dmake/unix/sysvr4/startup.mk'`; then
echo shar: \"'dmake/unix/sysvr4/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr4/startup.mk'
fi
if test -f 'dmake/unix/xenix/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/xenix/startup.mk'\" \(3308 characters\)
sed "s/^X//" >'dmake/unix/xenix/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS =
X
X AS := as # Assembler and flags
X ASFLAGS =
X
X LD = $(CC) # Loader and flags
X LDFLAGS =
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lp
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS =
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS =
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS := -q
X
X AR := ar # archiver
X ARFLAGS = -rv
X
X RM := /bin/rm # remove a file command
X RMFLAGS =
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) -o $@ $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.f %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
X %$E : %.sh; cp $< $@; chmod 0777 $@
X
X# lex and yacc rules
X %.c : %.y %.Y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l %.L ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X GET = get
X GFLAGS =
X % : s.% ; $(GET) $(GFLAGS) $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3308 -ne `wc -c <'dmake/unix/xenix/startup.mk'`; then
echo shar: \"'dmake/unix/xenix/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/startup.mk'
fi
echo shar: End of archive 20 \(of 27\).
cp /dev/null ark20isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/msdos/mscdos/mk40.bat dmake/msdos/mscdos/mk60.bat
# dmake/msdos/mscdos/mk60swp.bat dmake/os2/ibm/mkc2.cmd
# dmake/qnx/startup.mk dmake/readme/srcorg dmake/tos/startup.mk
# dmake/unix/386ix/startup.mk dmake/unix/bsd43/startup.mk
# dmake/unix/bsd43/uw/startup.mk dmake/unix/bsd43/vf/make.sh
# dmake/unix/bsd43/vf/startup.mk dmake/unix/coherent/startup.mk
# dmake/unix/solaris/gcc/startup.mk dmake/unix/solaris/startup.mk
# dmake/unix/sysvr3/pwd/make.sh dmake/unix/sysvr3/pwd/startup.mk
# dmake/unix/xenix/pwd/startup.mk
# Wrapped by kent@sparky on Fri Oct 21 16:50:49 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 21 (of 27)."'
if test -f 'dmake/msdos/mscdos/mk40.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk40.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk40.bat'\" \(3133 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk40.bat' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\tee.c
Xcopy tee.obj objects
Xdel tee.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\dirlib.c
Xcopy dirlib.obj objects
Xdel dirlib.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 unix\dcache.c
Xcopy dcache.obj objects
Xdel dcache.obj
Xcl -c -I. -Imsdos -Imsdos\mscdos -mL -DM_I86=1 msdos\mscdos\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 @msdos\mscdos\obj.rsp,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3133 -ne `wc -c <'dmake/msdos/mscdos/mk40.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk40.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk40.bat'
fi
if test -f 'dmake/msdos/mscdos/mk60.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk60.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk60.bat'\" \(3069 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk60.bat' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\infer.obj infer.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\make.obj make.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\stat.obj stat.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\expand.obj expand.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmstring.obj dmstring.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\hash.obj hash.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dag.obj dag.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmake.obj dmake.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\path.obj path.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\imacs.obj imacs.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\sysintf.obj sysintf.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\parse.obj parse.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\getinp.obj getinp.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\quit.obj quit.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\state.obj state.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmdump.obj dmdump.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\macparse.obj macparse.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\rulparse.obj rulparse.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\percent.obj percent.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\function.obj function.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\ruletab.obj msdos\ruletab.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dirbrk.obj msdos\dirbrk.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\runargv.obj msdos\runargv.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\arlib.obj msdos\arlib.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\_chdir.obj msdos\_chdir.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\switchar.obj msdos\switchar.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\rmprq.obj msdos\rmprq.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\tee.obj msdos\tee.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dirlib.obj msdos\dirlib.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dcache.obj unix\dcache.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\tempnam.obj msdos\mscdos\tempnam.c
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 /exe /packc /batch @msdos\mscdos\obj.rsp_r,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3069 -ne `wc -c <'dmake/msdos/mscdos/mk60.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk60.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk60.bat'
fi
if test -f 'dmake/msdos/mscdos/mk60swp.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/mk60swp.bat'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/mk60swp.bat'\" \(3228 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/mk60swp.bat' <<'END_OF_FILE'
Xmd objects
Xmasm -t -mx -Dmlarge msdos\exec.asm;
Xmv exec.obj objects
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\infer.obj infer.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\make.obj make.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\stat.obj stat.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\expand.obj expand.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmstring.obj dmstring.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\hash.obj hash.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dag.obj dag.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmake.obj dmake.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\path.obj path.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\imacs.obj imacs.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\sysintf.obj sysintf.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\parse.obj parse.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\getinp.obj getinp.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\quit.obj quit.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\state.obj state.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmdump.obj dmdump.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\macparse.obj macparse.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\rulparse.obj rulparse.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\percent.obj percent.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\function.obj function.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\ruletab.obj msdos\ruletab.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dirbrk.obj msdos\dirbrk.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\runargv.obj msdos\runargv.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\arlib.obj msdos\arlib.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\_chdir.obj msdos\_chdir.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\switchar.obj msdos\switchar.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\rmprq.obj msdos\rmprq.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\find.obj msdos\find.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\spawn.obj msdos\spawn.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dirlib.obj msdos\dirlib.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dcache.obj unix\dcache.c
Xcl -c -I. -Imsdos -Imsdos\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\tempnam.obj msdos\mscdos\tempnam.c
Xcopy msdos\mscdos\startup.mk startup.mk
Xlink /stack:4096 /exe /packc /batch @msdos\mscdos\objswp.rsp.U,dmake.exe,NUL.MAP;
END_OF_FILE
if test 3228 -ne `wc -c <'dmake/msdos/mscdos/mk60swp.bat'`; then
echo shar: \"'dmake/msdos/mscdos/mk60swp.bat'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/mk60swp.bat'
fi
if test -f 'dmake/os2/ibm/mkc2.cmd' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/mkc2.cmd'\"
else
echo shar: Extracting \"'dmake/os2/ibm/mkc2.cmd'\" \(3295 characters\)
sed "s/^X//" >'dmake/os2/ibm/mkc2.cmd' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs infer.c
Xcopy infer.obj objects
Xdel infer.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs make.c
Xcopy make.obj objects
Xdel make.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs stat.c
Xcopy stat.obj objects
Xdel stat.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs expand.c
Xcopy expand.obj objects
Xdel expand.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dmstring.c
Xcopy dmstring.obj objects
Xdel dmstring.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs hash.c
Xcopy hash.obj objects
Xdel hash.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dag.c
Xcopy dag.obj objects
Xdel dag.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dmake.c
Xcopy dmake.obj objects
Xdel dmake.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs path.c
Xcopy path.obj objects
Xdel path.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs imacs.c
Xcopy imacs.obj objects
Xdel imacs.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs sysintf.c
Xcopy sysintf.obj objects
Xdel sysintf.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs parse.c
Xcopy parse.obj objects
Xdel parse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs getinp.c
Xcopy getinp.obj objects
Xdel getinp.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs quit.c
Xcopy quit.obj objects
Xdel quit.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs state.c
Xcopy state.obj objects
Xdel state.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs dmdump.c
Xcopy dmdump.obj objects
Xdel dmdump.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs macparse.c
Xcopy macparse.obj objects
Xdel macparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs rulparse.c
Xcopy rulparse.obj objects
Xdel rulparse.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs percent.c
Xcopy percent.obj objects
Xdel percent.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs function.c
Xcopy function.obj objects
Xdel function.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\ruletab.c
Xcopy ruletab.obj objects
Xdel ruletab.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\runargv.c
Xcopy runargv.obj objects
Xdel runargv.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\_chdir.c
Xcopy _chdir.obj objects
Xdel _chdir.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\switchar.c
Xcopy switchar.obj objects
Xdel switchar.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs msdos\dirbrk.c
Xcopy dirbrk.obj objects
Xdel dirbrk.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs msdos\arlib.c
Xcopy arlib.obj objects
Xdel arlib.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs unix\rmprq.c
Xcopy rmprq.obj objects
Xdel rmprq.obj
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\ibm -AL -D_MSC_VER=510 -Osl -Gs os2\ibm\tempnam.c
Xcopy tempnam.obj objects
Xdel tempnam.obj
Xcopy os2\ibm\startup.mk startup.mk
Xlink /stack:8192 /exe /packc /batch @os2\ibm\obj.rsp,dmake.exe,NUL.MAP,,os2\dmake.def;
END_OF_FILE
if test 3295 -ne `wc -c <'dmake/os2/ibm/mkc2.cmd'`; then
echo shar: \"'dmake/os2/ibm/mkc2.cmd'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/ibm/mkc2.cmd'
# end of 'dmake/os2/ibm/mkc2.cmd'
fi
if test -f 'dmake/qnx/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/startup.mk'\"
else
echo shar: Extracting \"'dmake/qnx/startup.mk'\" \(3308 characters\)
sed "s/^X//" >'dmake/qnx/startup.mk' <<'END_OF_FILE'
if test 3308 -ne `wc -c <'dmake/qnx/startup.mk'`; then
echo shar: \"'dmake/qnx/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/startup.mk'
fi
if test -f 'dmake/readme/srcorg' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/srcorg'\"
else
echo shar: Extracting \"'dmake/readme/srcorg'\" \(3359 characters\)
sed "s/^X//" >'dmake/readme/srcorg' <<'END_OF_FILE'
XSOURCE CODE ORGANIZATION:
X-------------------------
XThe source code is organized as follows:
X
X dmake [source for all common functions]
X |
X |
X ----------------------------
X | | | | |
X unix tos qnx os2 msdos [source for OS specific functions]
X | | |
X -------------------- | -------------------
X | | | | | | |
X386ix bsd43 sysvr[134] | tccdos bccdos mscdos [source for OSRELEASE
X | | specific functions]
X | ---------
X | | |
X | ibm mscdos
X |
X |
X |
X --------
X | |
X uw vf [source for OSENVIRONMENT specific functions]
X
X
XEach of the directories (eg. bsd43, mscdos, tccdos, and sysvr3) contain source
Xthat is specific to that release of the OS (and possibly C-library)
X
X
XCREATING A NEW VERSION:
X-----------------------
XTo create yet another version of dmake you should follow the following steps.
X
XThe sysvr3 version as sent is the base version, all dmake versions must provide
Xthe equivalent of the functions defined in the sysvr3 directory, and MUST
Xprovide the same semantics (MSDOS archive lib searches are an exception since
Xwe cannot search libraries for timestamps in MSDOS, Actually the MKS version
Xof dmake does this, I don't have the inclination to add this code though).
X
X1. Create a new directory for the version you will be making at the level
X that is appropriate. If it is a new OS then add the dir at the top level,
X if it is a new version of UNIX then add it below the unix directory.
X
X2. Copy the files from the unix and unix/sysvr3 directories to the new dir.
X (Or from any other directory sub-tree that is more appropriate)
X
X3. Not all OS/OSRELEASE combinations are compatible so in order to make
X dmake on each, the particular directory may contain C-source for functions
X present in the SVID SysV R3 distribution which are used by dmake but are
X not supplied by the C-library in the target system. For example the bsd43
X directory contains source for tempnam.c since it is not provided with
X the BSD C-library. Before writing a new version of the source file
X check the other directories to see if one already exists.
X
X4. Under some systems the standard include files may be missing or incorrect.
X eg. under BSD stdarg.h and string.h. If this is the case
X you should create the proper .h file in the proper directory.
X This works as expected as the compile line includes the flag -Idir
X where dir is the configuration dir, (bsd43 for example) and any
X standard include files will be searched for in dir before the compiler
X looks in the normal places (if you have a sane compiler :-).
X
X5. Modify dmake.sh to contain the appropriate C compiler flags and link command
X and to include any specific C files that you have had to add for this
X version of dmake, and run the result through the shell.
X (make the same changes to config.mk so that once you have a working copy of
X dmake you can use it to bring itself up to date)
X
X6. Send me the changes :-) so that I can incorporate them into future
X distributions.
X
X7. This should be all that you require to create a new version of dmake.
X If you have any questions send e-mail to dva...@plg.uwaterloo.ca
END_OF_FILE
if test 3359 -ne `wc -c <'dmake/readme/srcorg'`; then
echo shar: \"'dmake/readme/srcorg'\" unpacked with wrong size!
fi
# end of 'dmake/readme/srcorg'
fi
if test -f 'dmake/tos/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/startup.mk'\"
else
echo shar: Extracting \"'dmake/tos/startup.mk'\" \(3260 characters\)
sed "s/^X//" >'dmake/tos/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := # yes => RCS is installed.
X_HAVE_SCCS := # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .olb # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS :=
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX := .bat
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /gnu/lib/cpp # C-preprocessor
X CC := gcc # C-compiler and flags
X CFLAGS +=
X
X AS := /gnu/lib/as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := gar # archiver
X ARFLAGS+= ruv
X
X RM := /gnu/bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3260 -ne `wc -c <'dmake/tos/startup.mk'`; then
echo shar: \"'dmake/tos/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/tos/startup.mk'
fi
if test -f 'dmake/unix/386ix/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/386ix/startup.mk'\" \(3248 characters\)
sed "s/^X//" >'dmake/unix/386ix/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3248 -ne `wc -c <'dmake/unix/386ix/startup.mk'`; then
echo shar: \"'dmake/unix/386ix/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/startup.mk'
fi
if test -f 'dmake/unix/bsd43/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/startup.mk'\" \(3248 characters\)
sed "s/^X//" >'dmake/unix/bsd43/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3248 -ne `wc -c <'dmake/unix/bsd43/startup.mk'`; then
echo shar: \"'dmake/unix/bsd43/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/startup.mk'
fi
if test -f 'dmake/unix/bsd43/uw/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/uw/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/uw/startup.mk'\" \(3266 characters\)
sed "s/^X//" >'dmake/unix/bsd43/uw/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) -o $@ $(CFLAGS) -c $<
X %$O : %$P ; $(PC) -o $@ $(PFLAGS) -c $<
X %$O : %$S ; $(AS) -o $@ $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3266 -ne `wc -c <'dmake/unix/bsd43/uw/startup.mk'`; then
echo shar: \"'dmake/unix/bsd43/uw/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/uw/startup.mk'
fi
if test -f 'dmake/unix/bsd43/vf/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/vf/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/vf/make.sh'\" \(3209 characters\)
sed "s/^X//" >'dmake/unix/bsd43/vf/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/putenv.c
Xmv putenv.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/tempnam.c
Xmv tempnam.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/utime.c
Xmv utime.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/setvbuf.c
Xmv setvbuf.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/vf/memcpy.c
Xmv memcpy.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/vf/vfprintf.c
Xmv vfprintf.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o \
Xobjects/dcache.o objects/putenv.o objects/tempnam.o objects/utime.o objects/setvbuf.o objects/memcpy.o objects/vfprintf.o
Xcp unix/bsd43/vf/startup.mk startup.mk
END_OF_FILE
if test 3209 -ne `wc -c <'dmake/unix/bsd43/vf/make.sh'`; then
echo shar: \"'dmake/unix/bsd43/vf/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/bsd43/vf/make.sh'
# end of 'dmake/unix/bsd43/vf/make.sh'
fi
if test -f 'dmake/unix/bsd43/vf/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/vf/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/vf/startup.mk'\" \(3248 characters\)
sed "s/^X//" >'dmake/unix/bsd43/vf/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3248 -ne `wc -c <'dmake/unix/bsd43/vf/startup.mk'`; then
echo shar: \"'dmake/unix/bsd43/vf/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/vf/startup.mk'
fi
if test -f 'dmake/unix/coherent/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/coherent/startup.mk'\" \(3248 characters\)
sed "s/^X//" >'dmake/unix/coherent/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3248 -ne `wc -c <'dmake/unix/coherent/startup.mk'`; then
echo shar: \"'dmake/unix/coherent/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/startup.mk'
fi
if test -f 'dmake/unix/solaris/gcc/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/gcc/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/solaris/gcc/startup.mk'\" \(3249 characters\)
sed "s/^X//" >'dmake/unix/solaris/gcc/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := gcc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3249 -ne `wc -c <'dmake/unix/solaris/gcc/startup.mk'`; then
echo shar: \"'dmake/unix/solaris/gcc/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/gcc/startup.mk'
fi
if test -f 'dmake/unix/solaris/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/solaris/startup.mk'\" \(3248 characters\)
sed "s/^X//" >'dmake/unix/solaris/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3248 -ne `wc -c <'dmake/unix/solaris/startup.mk'`; then
echo shar: \"'dmake/unix/solaris/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/startup.mk'
fi
if test -f 'dmake/unix/sysvr3/pwd/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/pwd/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/pwd/make.sh'\" \(2750 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/pwd/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -Iunix/sysvr3/pwd -O unix/sysvr3/pwd/getcwd.c
Xmv getcwd.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o objects/getcwd.o
Xcp unix/sysvr3/pwd/startup.mk startup.mk
END_OF_FILE
if test 2750 -ne `wc -c <'dmake/unix/sysvr3/pwd/make.sh'`; then
echo shar: \"'dmake/unix/sysvr3/pwd/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/sysvr3/pwd/make.sh'
# end of 'dmake/unix/sysvr3/pwd/make.sh'
fi
if test -f 'dmake/unix/sysvr3/pwd/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/pwd/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/pwd/startup.mk'\" \(3248 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/pwd/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3248 -ne `wc -c <'dmake/unix/sysvr3/pwd/startup.mk'`; then
echo shar: \"'dmake/unix/sysvr3/pwd/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/pwd/startup.mk'
fi
if test -f 'dmake/unix/xenix/pwd/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/pwd/startup.mk'\"
else
echo shar: Extracting \"'dmake/unix/xenix/pwd/startup.mk'\" \(3248 characters\)
sed "s/^X//" >'dmake/unix/xenix/pwd/startup.mk' <<'END_OF_FILE'
X# Generic UNIX DMAKE startup file. Customize to suit your needs.
X# Should work for both SYSV, and BSD 4.3
X# See the documentation for a description of internally defined macros.
X#
X# Disable warnings for macros redefined here that were given
X# on the command line.
X__.SILENT !:= $(.SILENT)
X.SILENT !:= yes
X
X# Configuration parameters for DMAKE startup.mk file
X# Set these to NON-NULL if you wish to turn the parameter on.
X_HAVE_RCS := yes # yes => RCS is installed.
X_HAVE_SCCS := yes # yes => SCCS is installed.
X
X# Applicable suffix definitions
XA := .a # Libraries
XE := # Executables
XF := .f # Fortran
XO := .o # Objects
XP := .p # Pascal
XS := .s # Assembler sources
XV := ,v # RCS suffix
X
X# Recipe execution configurations
XSHELL := /bin/sh
XSHELLFLAGS := -ce
XGROUPSHELL := $(SHELL)
XGROUPFLAGS :=
XSHELLMETAS := |();&<>?*][$$:\\#`'"
XGROUPSUFFIX :=
XDIVFILE = $(TMPFILE)
X
X# Standard C-language command names and flags
X CPP := /lib/cpp # C-preprocessor
X CC := cc # C-compiler and flags
X CFLAGS +=
X
X AS := as # Assembler and flags
X ASFLAGS +=
X
X LD = $(CC) # Loader and flags
X LDFLAGS +=
X LDLIBS =
X
X# Definition of $(MAKE) macro for recursive makes.
X MAKE = $(MAKECMD) -S $(MFLAGS)
X
X# Definition of Print command for this system.
X PRINT = lpr
X
X# Language and Parser generation Tools and their flags
X YACC := yacc # standard yacc
X YFLAGS +=
X YTAB := y.tab # yacc output files name stem.
X
X LEX := lex # standard lex
X LFLAGS +=
X LEXYY := lex.yy # lex output file
X
X# Other Compilers, Tools and their flags
X PC := pc # pascal compiler
X RC := f77 # ratfor compiler
X FC := f77 # fortran compiler
X
X CO := co # check out for RCS
X COFLAGS += -q
X
X AR := ar # archiver
X ARFLAGS+= ruv
X
X RM := /bin/rm # remove a file command
X RMFLAGS +=
X
X# Implicit generation rules for making inferences.
X# We don't provide .yr or .ye rules here. They're obsolete.
X# Rules for making *$O
X %$O : %.c ; $(CC) $(CFLAGS) -c $<
X %$O : %$P ; $(PC) $(PFLAGS) -c $<
X %$O : %$S ; $(AS) $(ASFLAGS) $<
X %$O : %.cl ; class -c $<
X %$O :| %.e %.r %.F %$F
X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
X
X# Executables
X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
X
X# lex and yacc rules
X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
X
X# This rule tells how to make *.out from it's immediate list of prerequisites
X# UNIX only.
X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
X
X# RCS support
X.IF $(_HAVE_RCS)
X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
X.END
X
X# SCCS support
X.IF $(_HAVE_SCCS)
X % : s.% ; get $<
X .NOINFER : s.%
X.END
X
X# Recipe to make archive files.
X%$A .GROUP :
X $(AR) $(ARFLAGS) $@ $?
X $(RM) $(RMFLAGS) $?
X ranlib $@
X
X# DMAKE uses this recipe to remove intermediate targets
X.REMOVE :; $(RM) -f $<
X
X# AUGMAKE extensions for SYSV compatibility
X"@B" = $(@:b)
X"@D" = $(@:d)
X"@F" = $(@:f)
X"*B" = $(*:b)
X"*D" = $(*:d)
X"*F" = $(*:f)
X"<B" = $(<:b)
X"<D" = $(<:d)
X"<F" = $(<:f)
X"?B" = $(?:b)
X"?F" = $(?:f)
X"?D" = $(?:d)
X
X# Turn warnings back to previous setting.
X.SILENT !:= $(__.SILENT)
X
X# Local startup file if any
X.INCLUDE .IGNORE: "_startup.mk"
END_OF_FILE
if test 3248 -ne `wc -c <'dmake/unix/xenix/pwd/startup.mk'`; then
echo shar: \"'dmake/unix/xenix/pwd/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/pwd/startup.mk'
fi
echo shar: End of archive 21 \(of 27\).
cp /dev/null ark21isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/db.h dmake/dbug/malloc/debug.h
# dmake/dbug/malloc/malloc.h dmake/dbug/malloc/mallopt.c
# dmake/mac/config.h dmake/mac/make.sh dmake/msdos/bccdos/objswp.rsp
# dmake/msdos/mscdos/config.h dmake/msdos/runargv.c
# dmake/os2/ibm/config.h dmake/os2/mscdos/config.h
# dmake/os2/mscdos/mk60.cmd dmake/readme/apple.mac
# dmake/readme/intro dmake/tos/putenv.c dmake/tos/runargv.c
# dmake/unix/bsd43/putenv.c dmake/unix/bsd43/uw/make.sh
# dmake/unix/coherent/make.sh dmake/unix/solaris/gcc/make.sh
# dmake/unix/xenix/pwd/make.sh
# Wrapped by kent@sparky on Fri Oct 21 16:50:51 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 22 (of 27)."'
if test -f 'dmake/db.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/db.h'\"
else
echo shar: Extracting \"'dmake/db.h'\" \(2717 characters\)
sed "s/^X//" >'dmake/db.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/db.h,v 1.1 1994/10/06 17:42:39 dvadura Exp $
X-- SYNOPSIS -- front end to DBUG macros.
X--
X-- DESCRIPTION
X-- This is a front end to Fred Fish's DBUG macros. The intent was
X-- to provide an interface so that if you don't have the DBUG code
X-- you can still compile dmake, by undefining DBUG, if you do have
X-- the code then you can use Fred Fish's DBUG package. Originally
X-- the DBUG stuff was copyrighted, it is now in the public domain
X-- so the need for this is not as apparent.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: db.h,v $
X * Revision 1.1 1994/10/06 17:42:39 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#ifndef DB_h
X#define DB_h
X
X#ifdef DBUG
X
X# include "dbug.h"
X
X# define DB_ENTER(a1) DBUG_ENTER(a1)
X# define DB_RETURN(a1) DBUG_RETURN(a1)
X# define DB_VOID_RETURN DBUG_VOID_RETURN
X# define DB_EXECUTE(keyword, a1) DBUG_EXECUTE(keyword,a1)
X# define DB_PRINT(keyword,arglist) DBUG_PRINT(keyword,arglist)
X# define DB_PUSH(a1) DBUG_PUSH(a1)
X# define DB_POP() DBUG_POP()
X# define DB_PROCESS(a1) DBUG_PROCESS(a1)
X# define DB_FILE(file) DBUG_FILE(file)
X# define DB_SETJMP DBUG_SETJMP
X# define DB_LONGJMP DBUG_LONGJMP
X
X#else
X
X# define DB_ENTER(a1)
X# define DB_RETURN(a1) return (a1)
X# define DB_VOID_RETURN return
X# define DB_EXECUTE(keyword, a1)
X# define DB_PRINT(keyword,arglist)
X# define DB_PUSH(a1)
X# define DB_POP()
X# define DB_PROCESS(a1)
X# define DB_FILE(file)
X# define DB_SETJMP setjmp
X# define DB_LONGJMP longjmp
X
X#endif
X#endif
X
END_OF_FILE
if test 2717 -ne `wc -c <'dmake/db.h'`; then
echo shar: \"'dmake/db.h'\" unpacked with wrong size!
fi
# end of 'dmake/db.h'
fi
if test -f 'dmake/dbug/malloc/debug.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/debug.h'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/debug.h'\" \(2913 characters\)
sed "s/^X//" >'dmake/dbug/malloc/debug.h' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X/************************************************************************/
X/* */
X/* this include sets up some macro functions which can be used while */
X/* debugging the program, and then left in the code, but turned of by */
X/* just not defining "DEBUG". This way your production version of */
X/* the program will not be filled with bunches of debugging junk */
X/* */
X/************************************************************************/
X/*
X * $Id: debug.h,v 1.1 1994/10/06 17:43:09 dvadura Exp $
X */
X
X#ifdef DEBUG
X
X#if DEBUG == 1 /* if default level */
X#undef DEBUG
X#define DEBUG 100 /* use level 100 */
X#endif
X
X#include <stdio.h>
X
X#define DEBUG0(val,str)\
X {\
X if( DEBUG > val ) \
X fprintf(stderr,"%s(%d): %s\n",\
X __FILE__,__LINE__,str);\
X }
X#define DEBUG1(val,str,a1)\
X {\
X char _debugbuf[100];\
X if( DEBUG > val )\
X {\
X sprintf(_debugbuf,str,a1);\
X fprintf(stderr,"%s(%d): %s\n",\
X __FILE__,__LINE__,_debugbuf);\
X }\
X }
X
X#define DEBUG2(val,str,a1,a2)\
X {\
X char _debugbuf[100];\
X if( DEBUG > val )\
X {\
X sprintf(_debugbuf,str,a1,a2);\
X fprintf(stderr,"%s(%d): %s\n",\
X __FILE__,__LINE__,_debugbuf);\
X }\
X }
X
X#define DEBUG3(val,str,a1,a2,a3)\
X {\
X char _debugbuf[100];\
X if( DEBUG > val )\
X {\
X sprintf(_debugbuf,str,a1,a2,a3);\
X fprintf(stderr,"%s(%d): %s\n",\
X __FILE__,__LINE__,_debugbuf);\
X }\
X }
X
X#define DEBUG4(val,str,a1,a2,a3,a4)\
X {\
X char _debugbuf[100];\
X if( DEBUG > val )\
X {\
X sprintf(_debugbuf,str,a1,a2,a3,a4);\
X fprintf(stderr,"%s(%d): %s\n",\
X __FILE__,__LINE__,_debugbuf);\
X }\
X }
X
X#define DEBUG5(val,str,a1,a2,a3,a4,a5)\
X {\
X char _debugbuf[100];\
X if( DEBUG > val )\
X {\
X sprintf(_debugbuf,str,a1,a2,a3,a4,a5);\
X fprintf(stderr,"%s(%d): %s\n",\
X __FILE__,__LINE__,_debugbuf);\
X }\
X }
X
X#else
X
X#define DEBUG0(val,s)
X#define DEBUG1(val,s,a1)
X#define DEBUG2(val,s,a1,a2)
X#define DEBUG3(val,s,a1,a2,a3)
X#define DEBUG4(val,s,a1,a2,a3,a4)
X#define DEBUG5(val,s,a1,a2,a3,a4,a5)
X
X#endif /* DEBUG */
X
X
X/*
X * $Log: debug.h,v $
X * Revision 1.1 1994/10/06 17:43:09 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:18 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:28:59 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.2 90/05/11 00:13:08 cpcahil
X * added copyright statment
X *
X * Revision 1.1 90/02/23 07:09:01 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 2913 -ne `wc -c <'dmake/dbug/malloc/debug.h'`; then
echo shar: \"'dmake/dbug/malloc/debug.h'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/debug.h'
fi
if test -f 'dmake/dbug/malloc/malloc.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/malloc.h'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/malloc.h'\" \(2772 characters\)
sed "s/^X//" >'dmake/dbug/malloc/malloc.h' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X/*
X * $Id: malloc.h,v 1.1 1994/10/06 17:43:13 dvadura Exp $
X */
Xstruct mlist
X{
X struct mlist * next; /* next entry in chain */
X struct mlist * prev; /* prev entry in chain */
X int flag; /* inuse flag */
X unsigned int r_size; /* requested size */
X union
X {
X unsigned int size; /* actual size */
X double unused_just_for_alignment;
X } s;
X char data[4];
X};
X
X#define M_SIZE ((int)(char *)((struct mlist *)0)->data)
X#define M_RND 0x08
X
X#define M_INUSE 0x01
X#define M_MAGIC 0x03156100
X
X#define M_BLOCKSIZE (1024*8)
X
X#define M_FILL '\01'
X#define M_FREE_FILL '\02'
X
X#define M_ROUNDUP(size) {\
X if( size & (M_RND-1) ) \
X { \
X size &= ~(M_RND-1); \
X size += M_RND; \
X } \
X }
X
X/*
X * Malloc warning/fatal error handler defines...
X */
X#define M_HANDLE_DUMP 0x80 /* 128 */
X#define M_HANDLE_IGNORE 0
X#define M_HANDLE_ABORT 1
X#define M_HANDLE_EXIT 2
X#define M_HANDLE_CORE 3
X
X/*
X * Mallopt commands and defaults
X */
X
X#define MALLOC_WARN 1 /* set malloc warning handling */
X#define MALLOC_FATAL 2 /* set malloc fatal handling */
X#define MALLOC_ERRFILE 3 /* specify malloc error file */
X#define MALLOC_CKCHAIN 4 /* turn on chain checking */
Xunion malloptarg
X{
X int i;
X char * str;
X};
X
X/*
X * Malloc warning/fatal error codes
X */
X
X#define M_CODE_CHAIN_BROKE 1 /* malloc chain is broken */
X#define M_CODE_NO_END 2 /* chain end != endptr */
X#define M_CODE_BAD_PTR 3 /* pointer not in malloc area */
X#define M_CODE_BAD_MAGIC 4 /* bad magic number in header */
X#define M_CODE_BAD_CONNECT 5 /* chain poingers corrupt */
X#define M_CODE_OVERRUN 6 /* data overrun in malloc seg */
X#define M_CODE_REUSE 7 /* reuse of freed area */
X#define M_CODE_NOT_INUSE 8 /* pointer is not in use */
X#define M_CODE_NOMORE_MEM 9 /* no more memory available */
X#define M_CODE_OUTOF_BOUNDS 10 /* gone beyound bounds */
X
Xvoid malloc_warning();
Xvoid malloc_fatal();
Xvoid malloc_check_data();
Xvoid malloc_check_str();
Xvoid malloc_verify();
X
X/*
X * $Log: malloc.h,v $
X * Revision 1.1 1994/10/06 17:43:13 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:22 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:06 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.4 90/08/29 22:23:38 cpcahil
X * fixed mallopt to use a union as an argument.
X *
X * Revision 1.3 90/05/11 11:04:10 cpcahil
X * took out some extraneous lines
X *
X * Revision 1.2 90/05/11 00:13:09 cpcahil
X * added copyright statment
X *
X * Revision 1.1 90/02/23 07:09:03 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 2772 -ne `wc -c <'dmake/dbug/malloc/malloc.h'`; then
echo shar: \"'dmake/dbug/malloc/malloc.h'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/malloc.h'
fi
if test -f 'dmake/dbug/malloc/mallopt.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/mallopt.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/mallopt.c'\" \(2566 characters\)
sed "s/^X//" >'dmake/dbug/malloc/mallopt.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X#include <fcntl.h>
X#include "malloc.h"
X
X/*
X * Function: mallopt()
X *
X * Purpose: to set options for the malloc debugging library
X *
X * Arguments: none
X *
X * Returns: nothing of any value
X *
X * Narrative:
X *
X */
X
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: mallopt.c,v 1.1 1994/10/06 17:43:14 dvadura Exp $";
X#endif
X
Xint
Xmallopt(cmd,value)
X int cmd;
X union malloptarg value;
X{
X int i;
X extern int malloc_checking;
X extern char * malloc_data_start;
X extern int malloc_errfd;
X extern int malloc_fatal_level;
X void malloc_init();
X extern int malloc_warn_level;
X register char * s;
X
X /*
X * If not initialized...
X */
X if( malloc_data_start == (char *) 0)
X {
X malloc_init();
X }
X
X
X switch(cmd)
X {
X case MALLOC_WARN:
X malloc_warn_level = value.i;
X break;
X
X case MALLOC_FATAL:
X malloc_fatal_level = value.i;
X break;
X
X case MALLOC_CKCHAIN:
X malloc_checking = value.i;
X break;
X
X case MALLOC_ERRFILE:
X
X i = open(value.str,O_CREAT|O_APPEND|O_WRONLY,0666);
X if( i == -1 )
X {
X (void) write(2,
X "Unable to open malloc error file: ",
X (unsigned) 34);
X for(s=value.str; *s; s++)
X {
X /* do nothing */;
X }
X (void) write(2,value.str,
X (unsigned)(s-value.str));
X (void) write(2,"\n",(unsigned)1);
X }
X else
X {
X if( malloc_errfd != 2 )
X {
X (void) close(malloc_errfd);
X }
X malloc_errfd = i;
X }
X
X break;
X
X default:
X return(1);
X }
X
X return(0);
X}
X
X/*
X * $Log: mallopt.c,v $
X * Revision 1.1 1994/10/06 17:43:14 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:23 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:07 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.6 90/08/29 22:23:36 cpcahil
X * fixed mallopt to use a union as an argument.
X *
X * Revision 1.5 90/08/29 21:22:51 cpcahil
X * miscellaneous lint fixes
X *
X * Revision 1.4 90/05/11 00:13:10 cpcahil
X * added copyright statment
X *
X * Revision 1.3 90/02/25 11:03:26 cpcahil
X * changed to return int so that it agrees with l libmalloc.a's mallopt()
X *
X * Revision 1.2 90/02/25 11:01:21 cpcahil
X * added support for malloc chain checking.
X *
X * Revision 1.1 90/02/24 21:50:24 cpcahil
X * Initial revision
X *
X * Revision 1.1 90/02/24 17:10:53 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 2566 -ne `wc -c <'dmake/dbug/malloc/mallopt.c'`; then
echo shar: \"'dmake/dbug/malloc/mallopt.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/mallopt.c'
fi
if test -f 'dmake/mac/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/config.h'\"
else
echo shar: Extracting \"'dmake/mac/config.h'\" \(2992 characters\)
sed "s/^X//" >'dmake/mac/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/config.h,v 1.1 1994/10/06 17:42:55 dvadura Exp $
X-- SYNOPSIS -- Configurarion include file for the Macintosh.
X-- $Log: config.h,v $
X * Revision 1.1 1994/10/06 17:42:55 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* Definitions left out of StdArg.h */
X#define va_alist ...
X#define va_dcl
X
X#define CONST const
X
X#define FALSE 0
X#define TRUE 1
X
X/* signal extensions */
X#define SIGQUIT SIGTERM
X
X
X/* Mac doesn't have a stat function or structure so we have to add one in. */
Xtypedef long off_t;
Xstruct stat {
X unsigned short st_mode;
X off_t st_size;
X time_t st_mtime;
X time_t st_ctime;
X /* struct stat has lots of other fields, but we don't need them for dmake */
X}; /* struct stat */
X#define S_IFDIR 0040000 /* directory */
X#define S_IFREG 0100000 /* regular */
X#define S_IFMT (S_IFDIR | S_IFREG) /* Format */
X#define S_IREAD 0000400 /* read owner permission */
X#define S_IWRITE 0000200 /* write owner permission */
X#define S_IEXEC 0000100 /* execute owner permission */
X
X
X/* Global for environmental variables */
Xextern char **environ;
X
X
X/* We really want main to be in the mac directory
X so that we get the envp argument */
X#define main(argc, argv) dmakemain(argc, argv)
X
X/* Directory/file info. and directory moving */
Xint stat (char *pPath, struct stat *pStat);
Xchar *getcwd (char *pPath, size_t pathSize);
Xint chdir (char *pPath);
Xint utime (char *pPath, time_t *pTimes);
X
X/* Routines to handle conversion from Unix file names to Mac file names */
Xchar *Unix2MacFName(char *pUnixName);
XFILE *MacFOpen (char *pName, char *pMode);
X#define fopen(pFName, pMode) MacFOpen(pFName, pMode)
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2992 -ne `wc -c <'dmake/mac/config.h'`; then
echo shar: \"'dmake/mac/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/mac/config.h'
fi
if test -f 'dmake/mac/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/make.sh'\"
else
echo shar: Extracting \"'dmake/mac/make.sh'\" \(3036 characters\)
sed "s/^X//" >'dmake/mac/make.sh' <<'END_OF_FILE'
Xnewfolder objects
Xc -I. -I :mac -d _MPW -s infer -sym off -o :objects:infer.c.o infer.c
Xc -I. -I :mac -d _MPW -s make -sym off -o :objects:make.c.o make.c
Xc -I. -I :mac -d _MPW -s stat -sym off -o :objects:stat.c.o stat.c
Xc -I. -I :mac -d _MPW -s expand -sym off -o :objects:expand.c.o expand.c
Xc -I. -I :mac -d _MPW -s dmstring -sym off -o :objects:dmstring.c.o dmstring.c
Xc -I. -I :mac -d _MPW -s hash -sym off -o :objects:hash.c.o hash.c
Xc -I. -I :mac -d _MPW -s dag -sym off -o :objects:dag.c.o dag.c
Xc -I. -I :mac -d _MPW -s dmake -sym off -o :objects:dmake.c.o dmake.c
Xc -I. -I :mac -d _MPW -s path -sym off -o :objects:path.c.o path.c
Xc -I. -I :mac -d _MPW -s imacs -sym off -o :objects:imacs.c.o imacs.c
Xc -I. -I :mac -d _MPW -s sysintf -sym off -o :objects:sysintf.c.o sysintf.c
Xc -I. -I :mac -d _MPW -s parse -sym off -o :objects:parse.c.o parse.c
Xc -I. -I :mac -d _MPW -s getinp -sym off -o :objects:getinp.c.o getinp.c
Xc -I. -I :mac -d _MPW -s quit -sym off -o :objects:quit.c.o quit.c
Xc -I. -I :mac -d _MPW -s state -sym off -o :objects:state.c.o state.c
Xc -I. -I :mac -d _MPW -s dmdump -sym off -o :objects:dmdump.c.o dmdump.c
Xc -I. -I :mac -d _MPW -s macparse -sym off -o :objects:macparse.c.o macparse.c
Xc -I. -I :mac -d _MPW -s rulparse -sym off -o :objects:rulparse.c.o rulparse.c
Xc -I. -I :mac -d _MPW -s percent -sym off -o :objects:percent.c.o percent.c
Xc -I. -I :mac -d _MPW -s function -sym off -o :objects:function.c.o function.c
Xc -I. -I :mac -d _MPW -s arlib -sym off -o :objects:arlib.c.o :mac:arlib.c
Xc -I. -I :mac -d _MPW -s bogus -sym off -o :objects:bogus.c.o :mac:bogus.c
Xc -I. -I :mac -d _MPW -s dirbrk -sym off -o :objects:dirbrk.c.o :mac:dirbrk.c
Xc -I. -I :mac -d _MPW -s directry -sym off -o :objects:directry.c.o :mac:directry.c
Xc -I. -I :mac -d _MPW -s environ -sym off -o :objects:environ.c.o :mac:environ.c
Xc -I. -I :mac -d _MPW -s main -sym off -o :objects:main.c.o :mac:main.c
Xc -I. -I :mac -d _MPW -s rmprq -sym off -o :objects:rmprq.c.o :mac:rmprq.c
Xc -I. -I :mac -d _MPW -s ruletab -sym off -o :objects:ruletab.c.o :mac:ruletab.c
Xc -I. -I :mac -d _MPW -s tempnam -sym off -o :objects:tempnam.c.o :mac:tempnam.c
Xc -I. -I :mac -d _MPW -s tomacfil -sym off -o :objects:tomacfil.c.o :mac:tomacfil.c
Xlink -w -c 'MPS ' -t MPST -sym off -o dmake :objects:infer.c.o \
X:objects:make.c.o :objects:stat.c.o :objects:expand.c.o :objects:dmstring.c.o \
X:objects:hash.c.o :objects:dag.c.o :objects:dmake.c.o :objects:path.c.o \
X:objects:imacs.c.o :objects:sysintf.c.o :objects:parse.c.o :objects:getinp.c.o \
X:objects:quit.c.o :objects:state.c.o :objects:dmdump.c.o :objects:macparse.c.o \
X:objects:rulparse.c.o :objects:percent.c.o :objects:function.c.o \
X:objects:arlib.c.o :objects:bogus.c.o :objects:dirbrk.c.o :objects:directry.c.o \
X:objects:environ.c.o :objects:main.c.o :objects:rmprq.c.o :objects:ruletab.c.o \
X:objects:tempnam.c.o :objects:tomacfil.c.o "CSANELib.o" "Math.o" \
X"StdCLib.o" "Runtime.o" "Interface.o" "Toollibs.o"
Xduplicate :mac:startup.mk startup.mk
END_OF_FILE
if test 3036 -ne `wc -c <'dmake/mac/make.sh'`; then
echo shar: \"'dmake/mac/make.sh'\" unpacked with wrong size!
fi
# end of 'dmake/mac/make.sh'
fi
if test -f 'dmake/msdos/bccdos/objswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/objswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/objswp.rsp'\" \(691 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/objswp.rsp' <<'END_OF_FILE'
Xd:\cc\bcc\lib\c0l.obj+
Xobjects\exec.obj+
Xobjects\infer.obj+
Xobjects\make.obj+
Xobjects\stat.obj+
Xobjects\expand.obj+
Xobjects\dmstring.obj+
Xobjects\hash.obj+
Xobjects\dag.obj+
Xobjects\dmake.obj+
Xobjects\path.obj+
Xobjects\imacs.obj+
Xobjects\sysintf.obj+
Xobjects\parse.obj+
Xobjects\getinp.obj+
Xobjects\quit.obj+
Xobjects\state.obj+
Xobjects\dmdump.obj+
Xobjects\macparse.obj+
Xobjects\rulparse.obj+
Xobjects\percent.obj+
Xobjects\function.obj+
Xobjects\ruletab.obj+
Xobjects\dirbrk.obj+
Xobjects\runargv.obj+
Xobjects\arlib.obj+
Xobjects\_chdir.obj+
Xobjects\switchar.obj+
Xobjects\rmprq.obj+
Xobjects\find.obj+
Xobjects\spawn.obj+
Xobjects\dirlib.obj+
Xobjects\dcache.obj+
Xobjects\tempnam.obj+
Xobjects\utime.obj
END_OF_FILE
if test 691 -ne `wc -c <'dmake/msdos/bccdos/objswp.rsp'`; then
echo shar: \"'dmake/msdos/bccdos/objswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/objswp.rsp'
fi
if test -f 'dmake/msdos/mscdos/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/config.h'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/config.h'\" \(2653 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/mscdos/RCS/config.h,v 1.1 1994/10/06 17:41:38 dvadura Exp $
X-- $Log: config.h,v $
X * Revision 1.1 1994/10/06 17:41:38 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#if defined (_MSC_VER)
X# if _MSC_VER < 500
X Force a compile-time blowup.
X Do not define define _MSC_VER for MSC compilers ealier than 5.0.
X# endif
X#endif
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* MSC Version 4.0 doesn't understand SIGTERM, later versions do. */
X#ifndef SIGTERM
X# define SIGTERM SIGINT
X#endif
X
X/* Fixes unimplemented line buffering for MSC 5.x and 6.0.
X * MSC _IOLBF is the same as _IOFBF
X */
X#if defined(MSDOS) && defined (_MSC_VER)
X# undef _IOLBF
X# define _IOLBF _IONBF
X#endif
X
X/* in alloc.h: size_t is redefined
X * defined in stdio.h which is included by alloc.h
X */
X#if defined(MSDOS) && defined (_MSC_VER)
X# define _TYPES_
X#endif
X
X/* in sysintf.c: SIGQUIT is used, this is not defined in MSC */
X#ifndef SIGQUIT
X# define SIGQUIT SIGTERM
X#endif
X
X/* MSC doesn't seem to care about CONST */
X#define CONST
X
X#ifndef MSDOS
X# define MSDOS 1
X#endif
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2653 -ne `wc -c <'dmake/msdos/mscdos/config.h'`; then
echo shar: \"'dmake/msdos/mscdos/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/config.h'
fi
if test -f 'dmake/msdos/runargv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/runargv.c'\"
else
echo shar: Extracting \"'dmake/msdos/runargv.c'\" \(2638 characters\)
sed "s/^X//" >'dmake/msdos/runargv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/runargv.c,v 1.1 1994/10/06 17:41:45 dvadura Exp $
X-- SYNOPSIS -- run a sub process.
X--
X-- DESCRIPTION
X-- Use spawn to run a subprocess.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: runargv.c,v $
X * Revision 1.1 1994/10/06 17:41:45 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <process.h>
X#include <errno.h>
X#include "extern.h"
X#include "sysintf.h"
X
Xstatic int _abort_flg = FALSE;
Xstatic void _add_child ANSI((CELLPTR, int));
Xstatic void _finished_child ANSI((int));
X
XPUBLIC int
Xrunargv(target, ignore, group, last, shell, cmd)
XCELLPTR target;
Xint ignore;
Xint group;
Xint last;
Xint shell;
Xchar *cmd;
X{
X#if ! defined(_MSC_VER)
X extern char **environ;
X#endif
X int status;
X char **argv;
X
X argv = Pack_argv( group, shell, cmd );
X _add_child(target, ignore);
X
X status = spawnvpe(P_WAIT, *argv, argv, environ);
X
X if( status == -1 ) Error("%s: %s", argv[0], strerror(errno));
X _finished_child(status);
X if( last && !Doing_bang ) Update_time_stamp( target );
X
X return( 0 );
X}
X
X
XPUBLIC void
XClean_up_processes()
X{
X _abort_flg = TRUE;
X _finished_child(-1);
X}
X
X
XPUBLIC int
XWait_for_child( abort_flg, pid )
Xint abort_flg;
Xint pid;
X{
X return(1);
X}
X
X
Xstatic int _valid = -1;
Xstatic CELLPTR _tg;
Xstatic int _ignore;
X
Xstatic void
X_add_child( target, ignore )
XCELLPTR target;
Xint ignore;
X{
X _tg = target;
X _ignore = ignore;
X _valid = 0;
X
X Current_target = NIL(CELL);
X}
X
X
Xstatic void
X_finished_child(status)
Xint status;
X{
X if( _valid == -1 ) return;
X Unlink_temp_files( _tg );
X _valid = -1;
X Handle_result( status, _ignore, _abort_flg, _tg );
X}
END_OF_FILE
if test 2638 -ne `wc -c <'dmake/msdos/runargv.c'`; then
echo shar: \"'dmake/msdos/runargv.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/runargv.c'
fi
if test -f 'dmake/os2/ibm/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/config.h'\"
else
echo shar: Extracting \"'dmake/os2/ibm/config.h'\" \(2583 characters\)
sed "s/^X//" >'dmake/os2/ibm/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/os2/ibm/RCS/config.h,v 1.1 1994/10/06 17:42:47 dvadura Exp $
X-- $Log: config.h,v $
X * Revision 1.1 1994/10/06 17:42:47 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#if defined (_MSC_VER)
X# if _MSC_VER < 500
X Force a compile-time blowup.
X Do not define define _MSC_VER for MSC compilers ealier than 5.0.
X# endif
X#endif
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* MSC Version 4.0 doesn't understand SIGTERM, later versions do. */
X#ifndef SIGTERM
X# define SIGTERM SIGINT
X#endif
X
X/* This should already be defined under C6.0, also for OS/2 we want buffering
X * to minimise the mess during parallel makes.
X */
X#ifndef _IOLBF
X# define _IOLBF _IOFBF
X#endif
X
X/* in alloc.h: size_t is redefined
X * defined in stdio.h which is included by alloc.h
X */
X#if defined(MSDOS) && defined (_MSC_VER)
X# define _TYPES_
X#endif
X
X/* Don't need this one either */
X#define CONST
X
X/* in sysintf.c: SIGQUIT is used, this is not defined in MSC */
X#ifndef SIGQUIT
X# define SIGQUIT SIGTERM
X#endif
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2583 -ne `wc -c <'dmake/os2/ibm/config.h'`; then
echo shar: \"'dmake/os2/ibm/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/config.h'
fi
if test -f 'dmake/os2/mscdos/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/config.h'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/config.h'\" \(2586 characters\)
sed "s/^X//" >'dmake/os2/mscdos/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/os2/mscdos/RCS/config.h,v 1.1 1994/10/06 17:42:45 dvadura Exp $
X-- $Log: config.h,v $
X * Revision 1.1 1994/10/06 17:42:45 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#if defined (_MSC_VER)
X# if _MSC_VER < 500
X Force a compile-time blowup.
X Do not define define _MSC_VER for MSC compilers ealier than 5.0.
X# endif
X#endif
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* MSC Version 4.0 doesn't understand SIGTERM, later versions do. */
X#ifndef SIGTERM
X# define SIGTERM SIGINT
X#endif
X
X/* This should already be defined under C6.0, also for OS/2 we want buffering
X * to minimise the mess during parallel makes.
X */
X#ifndef _IOLBF
X# define _IOLBF _IOFBF
X#endif
X
X/* in alloc.h: size_t is redefined
X * defined in stdio.h which is included by alloc.h
X */
X#if defined(MSDOS) && defined (_MSC_VER)
X# define _TYPES_
X#endif
X
X/* Don't need this one either */
X#define CONST
X
X/* in sysintf.c: SIGQUIT is used, this is not defined in MSC */
X#ifndef SIGQUIT
X# define SIGQUIT SIGTERM
X#endif
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2586 -ne `wc -c <'dmake/os2/mscdos/config.h'`; then
echo shar: \"'dmake/os2/mscdos/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/config.h'
fi
if test -f 'dmake/os2/mscdos/mk60.cmd' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/mk60.cmd'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/mk60.cmd'\" \(2945 characters\)
sed "s/^X//" >'dmake/os2/mscdos/mk60.cmd' <<'END_OF_FILE'
Xmd objects
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\infer.obj infer.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\make.obj make.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\stat.obj stat.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\expand.obj expand.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmstring.obj dmstring.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\hash.obj hash.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dag.obj dag.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmake.obj dmake.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\path.obj path.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\imacs.obj imacs.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\sysintf.obj sysintf.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\parse.obj parse.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\getinp.obj getinp.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\quit.obj quit.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\state.obj state.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dmdump.obj dmdump.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\macparse.obj macparse.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\rulparse.obj rulparse.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\percent.obj percent.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\function.obj function.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\ruletab.obj os2\ruletab.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\runargv.obj os2\runargv.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\_chdir.obj os2\_chdir.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\switchar.obj os2\switchar.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\dirbrk.obj msdos\dirbrk.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\arlib.obj msdos\arlib.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\rmprq.obj unix\rmprq.c
Xcl -c -I. -Ios2 -DOS2 -G2 -Ios2\mscdos -AL -D__STDC__=1 -Osecgl -Gs -Foobjects\tempnam.obj os2\mscdos\tempnam.c
Xcopy os2\mscdos\startup.mk startup.mk
Xlink /stack:8192 /exe /packc /batch @os2\mscdos\obj.rsp,dmake.exe,NUL.MAP,,os2\dmake.def;
END_OF_FILE
if test 2945 -ne `wc -c <'dmake/os2/mscdos/mk60.cmd'`; then
echo shar: \"'dmake/os2/mscdos/mk60.cmd'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/mscdos/mk60.cmd'
# end of 'dmake/os2/mscdos/mk60.cmd'
fi
if test -f 'dmake/readme/apple.mac' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/apple.mac'\"
else
echo shar: Extracting \"'dmake/readme/apple.mac'\" \(2593 characters\)
sed "s/^X//" >'dmake/readme/apple.mac' <<'END_OF_FILE'
XMAC specific information for dmake. This information is provided in the
Xhope that it makes it easier to install and recompile dmake in a MAC
Xenvironment. I do not own a Mac (and never wish to). As a result I rely
Xon others to insure that this version of dmake works as advertized. If you
Xhave any problems with it please fix them and send me the differences so that
XI can incorporate them into future releases and patches.
X
X
X1. ENVIRONMENT VARIABLE SETTINGS
X
XOnly a single set of settings is available for the macintosh. There are no
Xsub-selections for specific OS release and/or environment.
X
X OS - mac
X OSRELEASE - NULL
X OSENVIRONMENT - NULL
X
X
X2. IMPLEMENTATION NOTES
X
XThis port for the Macintosh is specifically designed to be run
Xunder MPW.
X
XI had to make a couple of changes to dmake in order to get it to work
Xon the Mac. First, MPW provides no documented way to run a
Xsubprocess, so when you use dmake, you MUST use the -n option and
Xexecute the output. Typically, you will probably want to write a
Xsimple script file to do these operations for you.
X
XI added some code so that the Macintosh version of dmake can
Xuse UNIX-style directories to specify include paths and target
Xand dependency file names. I.e., if you specify a file "/dir/file",
Xdmake will look at the file "dir:file". However, Mac dmake does not
Xdo any translation from files specified by UNIX-style directories
Xin the recipe line that gets executed. If you need to translate,
Xyou can use substitution commands. (For example,
X":$(RELATIVEUNIXFILE:s,/,:,)".) This code was added so one could
Xexecute dmake's makefile, and also so one would have an easier time
Xporting other UNIX makefiles. I would suggest you stick with
XMacintosh-style directories for all other makefiles.
X
XI was getting memory trashing errors when I was reading in
Xenvironmental variables >4K with the -e option. I had trouble
Xtracking down exactly what was causing the problem, so decided it
Xwas easier to just clip the length before sending it to the dmake
Xparser. I arbitrarily picked 1K as the maximum length, figuring
Xit was highly unlikely anyone really needed a variable longer than
Xthat from within a makefile. (This error may be related to the
Xvalue you set for MAXLINELENGTH, so to be safe, you should keep
Xit >1K.)
X
XIn order to run dmake, you must set (and export) the environmental
Xvariable "OS" to "mac".
X
XFinally, dmake looks for the file startup.mk in
X"{MPW}tools:{DMSTARTUPDIR}". "DMSTARTUPDIR" can be defined if you
Xwant to override the default tools directory location.
X
XMicah Doyle
Xmi...@leland.Stanford.EDU
END_OF_FILE
if test 2593 -ne `wc -c <'dmake/readme/apple.mac'`; then
echo shar: \"'dmake/readme/apple.mac'\" unpacked with wrong size!
fi
# end of 'dmake/readme/apple.mac'
fi
if test -f 'dmake/readme/intro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/intro'\"
else
echo shar: Extracting \"'dmake/readme/intro'\" \(2952 characters\)
sed "s/^X//" >'dmake/readme/intro' <<'END_OF_FILE'
XDMAKE
X-----
X
XThis is the full DMAKE source distribution. DMAKE is a Make like tool that
Xhas been written by me and has been used by individuals at the University of
XWaterloo. This release replaces all previous releases; which are no longer
Xsupported. Please read the file 'readme/release' which accompanies
Xthis distribution and describes details of this release.
X
Xdmake is available for anonymous ftp from plg.uwaterloo.ca.
XIt is in the pub/dmake directory, set your mode to binary, and copy the
Xdistribution format that suits your target environment the best.
X
X README - Identifies the dmake version in the
X pub/dmake directory.
X dmake.tar.gz - GNU Zip compressed tar archive
X dmake.tar.Z - Lempel-Ziv compressed tar archive
X dmake.zip - pkzip archive
X dmake-msdos-exe.zip - MSDOS executalbe zip archive
X
X dmake.shar01 - xx part shar archive, get all parts
X ...
X dmake.sharxx
X
X dmake.patchY - Patch Y for dmake
X
XNote that all archives are created on a UNIX system. This means that the
Xdistributions heading for DOS-land need to have the <lf> turned into a
X<cr><lf>. There exist a number of filters for doing this (sed comes to mind),
Xeach is easily run over the file tree using a UNIX shell script. Thus I don't
Xprovide two different versions of the archives.
X
Xdmake is different from other versions of Make in that it supports significant
Xenhancements (See the man page). A short summary of the more important
Xfeatures follows:
X
X . support for portable makefiles
X . runs on many platforms (DOS, generic unix [sysv and bsd4.3],
X apollo, OS/2, Atari, MAC, and many others)
X . significantly enhanced macro facilities
X . sophisticated inference algorithm supporting transitive closure
X on the inference graph
X . support for traversing the file sytem both during making of targets
X and during inference
X . %-meta rules for specifying rules to be used for inferring
X prerequisites
X . conditional macros
X . proper support for libraries
X . parallel making of targets on architectures that support it
X . attributed targets
X . text diversions
X . group recipes
X . swapping itself to DISK under MSDOS
X . supports MKS extended argument passing convention
X . highly configurable
X
XOnce you have downloaded and unpacked the source distribution please read
Xthe instructions found in the files contained in the 'readme' sub-directory.
X
XAll code found in this distribution is original and written by me except where
Xnoted in the source and the following:
X
X- dbug/dbug package from Fred Fish (dmake DEBUG=1, to make a debugging version
X of dmake)
X
X- malloc.c package in dbug/malloc from the NET, see the directory for
X attribution.
X
X-dennis
X-------------------------------------------------------------------------------
X If you have time to complain about being |Dennis Vadura
X tired then you don't have enough to do!! |dva...@plg.uwaterloo.ca
X===============================================================================
END_OF_FILE
if test 2952 -ne `wc -c <'dmake/readme/intro'`; then
echo shar: \"'dmake/readme/intro'\" unpacked with wrong size!
fi
# end of 'dmake/readme/intro'
fi
if test -f 'dmake/tos/putenv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/putenv.c'\"
else
echo shar: Extracting \"'dmake/tos/putenv.c'\" \(2948 characters\)
sed "s/^X//" >'dmake/tos/putenv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/tos/RCS/putenv.c,v 1.1 1994/10/06 17:41:33 dvadura Exp $
X-- SYNOPSIS -- my own putenv for BSD like systems.
X--
X-- DESCRIPTION
X-- This originally came from MKS, but I rewrote it to fix a bug with
X-- replacing existing strings, probably never happened but the code
X-- was wrong nonetheless.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: putenv.c,v $
X * Revision 1.1 1994/10/06 17:41:33 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X }
X }
X
X /* Ok, can't replace a string so need to grow the environment. */
X size = p - environ + 2; /* size of new environment */
X /* size of old is size-1 */
X
X /* It's the first time, so allocate a new environment since we don't know
X * where the old one is comming from. */
X if( ourenv == NULL ) {
X if( (ourenv = (char **) malloc( sizeof(char *)*size )) == NULL )
X return(1);
X
X memcpy( (char *)ourenv, (char *)environ, (size-2)*sizeof(char *) );
X }
X else if( (ourenv = (char **)realloc( ourenv, size*sizeof(char *))) == NULL )
X return(1);
X
X ourenv[--size] = NULL;
X ourenv[--size] = str;
X
X environ = ourenv;
X return(0);
X}
END_OF_FILE
if test 2948 -ne `wc -c <'dmake/tos/putenv.c'`; then
echo shar: \"'dmake/tos/putenv.c'\" unpacked with wrong size!
fi
# end of 'dmake/tos/putenv.c'
fi
if test -f 'dmake/tos/runargv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/runargv.c'\"
else
echo shar: Extracting \"'dmake/tos/runargv.c'\" \(2725 characters\)
sed "s/^X//" >'dmake/tos/runargv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/tos/RCS/runargv.c,v 1.1 1994/10/06 17:41:30 dvadura Exp $
X-- SYNOPSIS -- run a sub process.
X--
X-- DESCRIPTION
X-- Use spawn to run a subprocess.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: runargv.c,v $
X * Revision 1.1 1994/10/06 17:41:30 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <process.h>
X#include <errno.h>
X#include "extern.h"
X#include "sysintf.h"
X
Xstatic int _abort_flg = FALSE;
Xstatic void _add_child ANSI((CELLPTR, int));
Xstatic void _finished_child ANSI((int));
X
XPUBLIC int
Xrunargv(target, ignore, group, last, shell, cmd)
XCELLPTR target;
Xint ignore;
Xint group;
Xint last;
Xint shell;
Xchar *cmd;
X{
X int status;
X char **argv;
X char path[MAX_PATH_LEN+1];
X
X argv = Pack_argv( group, shell, cmd );
X _add_child(target, ignore);
X
X /* save and restore current working directory across a spawn call */
X strcpy(path, Get_current_dir());
X status = spawnvp(P_WAIT, *argv, argv);
X Set_dir(path);
X
X if( status == -1 ) Error("%s: %s", argv[0], strerror(errno));
X _finished_child(status);
X if( last && !Doing_bang ) Update_time_stamp( target );
X
X return( 0 );
X}
X
X
XPUBLIC void
XClean_up_processes()
X{
X _abort_flg = TRUE;
X _finished_child(-1);
X}
X
X
XPUBLIC int
XWait_for_child( abort_flg, pid )
Xint abort_flg;
Xint pid;
X{
X return(1);
X}
X
X
Xstatic int _valid = -1;
Xstatic CELLPTR _tg;
Xstatic int _ignore;
X
Xstatic void
X_add_child( target, ignore )
XCELLPTR target;
Xint ignore;
X{
X _tg = target;
X _ignore = ignore;
X _valid = 0;
X
X Current_target = NIL(CELL);
X}
X
X
Xstatic void
X_finished_child(status)
Xint status;
X{
X if( _valid == -1 ) return;
X Unlink_temp_files( _tg );
X _valid = -1;
X Handle_result( status, _ignore, _abort_flg, _tg );
X}
END_OF_FILE
if test 2725 -ne `wc -c <'dmake/tos/runargv.c'`; then
echo shar: \"'dmake/tos/runargv.c'\" unpacked with wrong size!
fi
# end of 'dmake/tos/runargv.c'
fi
if test -f 'dmake/unix/bsd43/putenv.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/putenv.c'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/putenv.c'\" \(2955 characters\)
sed "s/^X//" >'dmake/unix/bsd43/putenv.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/bsd43/RCS/putenv.c,v 1.1 1994/10/06 17:42:08 dvadura Exp $
X-- SYNOPSIS -- my own putenv for BSD like systems.
X--
X-- DESCRIPTION
X-- This originally came from MKS, but I rewrote it to fix a bug with
X-- replacing existing strings, probably never happened but the code
X-- was wrong nonetheless.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: putenv.c,v $
X * Revision 1.1 1994/10/06 17:42:08 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X }
X }
X
X /* Ok, can't replace a string so need to grow the environment. */
X size = p - environ + 2; /* size of new environment */
X /* size of old is size-1 */
X
X /* It's the first time, so allocate a new environment since we don't know
X * where the old one is comming from. */
X if( ourenv == NULL ) {
X if( (ourenv = (char **) malloc( sizeof(char *)*size )) == NULL )
X return(1);
X
X memcpy( (char *)ourenv, (char *)environ, (size-2)*sizeof(char *) );
X }
X else if( (ourenv = (char **)realloc( ourenv, size*sizeof(char *))) == NULL )
X return(1);
X
X ourenv[--size] = NULL;
X ourenv[--size] = str;
X
X environ = ourenv;
X return(0);
X}
END_OF_FILE
if test 2955 -ne `wc -c <'dmake/unix/bsd43/putenv.c'`; then
echo shar: \"'dmake/unix/bsd43/putenv.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/putenv.c'
fi
if test -f 'dmake/unix/bsd43/uw/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/uw/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/uw/make.sh'\" \(2990 characters\)
sed "s/^X//" >'dmake/unix/bsd43/uw/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/putenv.c
Xmv putenv.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/tempnam.c
Xmv tempnam.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/utime.c
Xmv utime.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/setvbuf.c
Xmv setvbuf.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o \
Xobjects/dcache.o objects/putenv.o objects/tempnam.o objects/utime.o objects/setvbuf.o -luw
Xcp unix/bsd43/uw/startup.mk startup.mk
END_OF_FILE
if test 2990 -ne `wc -c <'dmake/unix/bsd43/uw/make.sh'`; then
echo shar: \"'dmake/unix/bsd43/uw/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/bsd43/uw/make.sh'
# end of 'dmake/unix/bsd43/uw/make.sh'
fi
if test -f 'dmake/unix/coherent/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/coherent/make.sh'\" \(2724 characters\)
sed "s/^X//" >'dmake/unix/coherent/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/coherent/vfprintf.c
Xmv vfprintf.o objects
Xcc -c -I. -Iunix -Iunix/coherent -Dvoid=int -O unix/coherent/getcwd.c
Xmv getcwd.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o objects/vfprintf.o objects/getcwd.o
Xcp unix/coherent/startup.mk startup.mk
END_OF_FILE
if test 2724 -ne `wc -c <'dmake/unix/coherent/make.sh'`; then
echo shar: \"'dmake/unix/coherent/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/coherent/make.sh'
# end of 'dmake/unix/coherent/make.sh'
fi
if test -f 'dmake/unix/solaris/gcc/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/gcc/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/solaris/gcc/make.sh'\" \(2695 characters\)
sed "s/^X//" >'dmake/unix/solaris/gcc/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O infer.c
Xmv infer.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O make.c
Xmv make.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O stat.c
Xmv stat.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O expand.c
Xmv expand.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dmstring.c
Xmv dmstring.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O hash.c
Xmv hash.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dag.c
Xmv dag.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dmake.c
Xmv dmake.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O path.c
Xmv path.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O imacs.c
Xmv imacs.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O sysintf.c
Xmv sysintf.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O parse.c
Xmv parse.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O getinp.c
Xmv getinp.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O quit.c
Xmv quit.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O state.c
Xmv state.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O dmdump.c
Xmv dmdump.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O macparse.c
Xmv macparse.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O rulparse.c
Xmv rulparse.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O percent.c
Xmv percent.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O function.c
Xmv function.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/arlib.c
Xmv arlib.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/dirbrk.c
Xmv dirbrk.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/rmprq.c
Xmv rmprq.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/ruletab.c
Xmv ruletab.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/runargv.c
Xmv runargv.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/dcache.c
Xmv dcache.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/solaris/tempnam.c
Xmv tempnam.o objects
Xgcc -c -I. -Iunix -Iunix/solaris -DSolaris -O unix/solaris/getcwd.c
Xmv getcwd.o objects
Xgcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o objects/tempnam.o objects/getcwd.o
Xcp unix/solaris/gcc/startup.mk startup.mk
END_OF_FILE
if test 2695 -ne `wc -c <'dmake/unix/solaris/gcc/make.sh'`; then
echo shar: \"'dmake/unix/solaris/gcc/make.sh'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/gcc/make.sh'
fi
if test -f 'dmake/unix/xenix/pwd/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/pwd/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/xenix/pwd/make.sh'\" \(2968 characters\)
sed "s/^X//" >'dmake/unix/xenix/pwd/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -Iunix/xenix/pwd -O unix/xenix/pwd/getcwd.c
Xmv getcwd.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o objects/getcwd.o -lx
Xcp unix/xenix/pwd/startup.mk startup.mk
END_OF_FILE
if test 2968 -ne `wc -c <'dmake/unix/xenix/pwd/make.sh'`; then
echo shar: \"'dmake/unix/xenix/pwd/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/xenix/pwd/make.sh'
# end of 'dmake/unix/xenix/pwd/make.sh'
fi
echo shar: End of archive 22 \(of 27\).
cp /dev/null ark22isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/alloc.h dmake/dbug/malloc/m_init.c
# dmake/dbug/malloc/m_perror.c dmake/extern.h dmake/hash.c
# dmake/mac/tempnam.c dmake/msdos/find.c dmake/msdos/tccdos/config.h
# dmake/os2/ibm/config.mk dmake/os2/mscdos/config.mk
# dmake/os2/ruletab.c dmake/qnx/config.h dmake/quit.c
# dmake/unix/386ix/config.h dmake/unix/386ix/make.sh
# dmake/unix/bsd43/config.h dmake/unix/bsd43/make.sh
# dmake/unix/solaris/config.h dmake/unix/sysvr1/config.h
# dmake/unix/sysvr1/make.sh dmake/unix/sysvr1/vfprintf.c
# dmake/unix/sysvr3/make.sh dmake/unix/sysvr4/make.sh
# dmake/unix/xenix/config.h dmake/unix/xenix/make.sh
# Wrapped by kent@sparky on Fri Oct 21 16:50:52 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 23 (of 27)."'
if test -f 'dmake/alloc.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/alloc.h'\"
else
echo shar: Extracting \"'dmake/alloc.h'\" \(2331 characters\)
sed "s/^X//" >'dmake/alloc.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/alloc.h,v 1.1 1994/10/06 17:41:21 dvadura Exp $
X-- SYNOPSIS -- macros for allocating memory.
X--
X-- DESCRIPTION
X-- A somewhat nicer interface to malloc and calloc.
X-- Here we standardise the calling convention with a common macro
X-- interface.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: alloc.h,v $
X * Revision 1.1 1994/10/06 17:41:21 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#ifndef ALLOC_h
X#define ALLOC_h
X
X/* DO NOT CHANGE these! These are the definitions that the make source
X * uses for allocating memory. They must be defined for make to compile
X * properly.
X */
X
X/* This is the only place that we define size_t now. This should be more
X * than enough! */
X#if __STDC__
X#else
X# if !defined(_TYPES_) && !defined(M_XENIX) && !defined(atarist) && !defined(_MPW) && !defined(_SIZE_T) && !defined(_SIZE_T_)
X# if defined(MSDOS) || defined(__MSDOS__)
X# undef size_t
X typedef unsigned size_t;
X# else
X typedef long size_t;
X# endif
X# endif
X#endif
X
X#define usizeof(t) (size_t)sizeof(t)
X
X#define FREE(p) free((char*)(p))
X#define MALLOC(n, t) (t*) malloc((unsigned int)(n)*usizeof(t))
X#define CALLOC(n, t) (t*) calloc((unsigned int)(n), usizeof(t))
X
X#define TALLOC(p, n, t) if ((p = CALLOC(n, t)) == (t*)0) {No_ram();}
X
X#endif
X
END_OF_FILE
if test 2331 -ne `wc -c <'dmake/alloc.h'`; then
echo shar: \"'dmake/alloc.h'\" unpacked with wrong size!
fi
# end of 'dmake/alloc.h'
fi
if test -f 'dmake/dbug/malloc/m_init.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/m_init.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/m_init.c'\" \(2307 characters\)
sed "s/^X//" >'dmake/dbug/malloc/m_init.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X#include "malloc.h"
X
X/*
X * Function: malloc_init()
X *
X * Purpose: to initialize the pointers and variables use by the
X * malloc() debugging library
X *
X * Arguments: none
X *
X * Returns: nothing of any value
X *
X * Narrative: Just initialize all the needed variables. Use mallopt
X * to set options taken from the environment.
X *
X */
X#ifndef lint
Xstatic
Xchar rcs_hdr[] = "$Id: m_init.c,v 1.1 1994/10/06 17:43:11 dvadura Exp $";
X#endif
X
Xvoid
Xmalloc_init()
X{
X char * cptr;
X char * getenv();
X union malloptarg m;
X extern char * malloc_data_end;
X extern char * malloc_data_start;
X extern struct mlist * malloc_end;
X extern struct mlist malloc_start;
X char * sbrk();
X
X /*
X * If already initialized...
X */
X if( malloc_data_start != (char *) 0)
X {
X return;
X }
X
X
X malloc_data_start = sbrk(0);
X malloc_data_end = malloc_data_start;
X malloc_start.s.size = 0;
X malloc_end = &malloc_start;
X
X if( (cptr=getenv("MALLOC_WARN")) != NULL )
X {
X m.i = atoi(cptr);
X (void) mallopt(MALLOC_WARN,m);
X }
X
X if( (cptr=getenv("MALLOC_FATAL")) != NULL)
X {
X m.i = atoi(cptr);
X (void) mallopt(MALLOC_FATAL,m);
X }
X
X if( (cptr=getenv("MALLOC_CKCHAIN")) != NULL)
X {
X m.i = atoi(cptr);
X (void) mallopt(MALLOC_CKCHAIN,m);
X }
X
X if( (cptr=getenv("MALLOC_ERRFILE")) != NULL)
X {
X m.str = cptr;
X (void) mallopt(MALLOC_ERRFILE,m);
X }
X
X}
X
X/*
X * $Log: m_init.c,v $
X * Revision 1.1 1994/10/06 17:43:11 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:20 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:03 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.6 90/08/29 22:23:21 cpcahil
X * fixed mallopt to use a union as an argument.
X *
X * Revision 1.5 90/08/29 21:22:50 cpcahil
X * miscellaneous lint fixes
X *
X * Revision 1.4 90/05/11 15:53:35 cpcahil
X * fixed bug in initialization code.
X *
X * Revision 1.3 90/05/11 00:13:08 cpcahil
X * added copyright statment
X *
X * Revision 1.2 90/02/24 21:50:20 cpcahil
X * lots of lint fixes
X *
X * Revision 1.1 90/02/24 17:10:53 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 2307 -ne `wc -c <'dmake/dbug/malloc/m_init.c'`; then
echo shar: \"'dmake/dbug/malloc/m_init.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/m_init.c'
fi
if test -f 'dmake/dbug/malloc/m_perror.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/m_perror.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/m_perror.c'\" \(2258 characters\)
sed "s/^X//" >'dmake/dbug/malloc/m_perror.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X
X#ifndef lint
Xstatic
Xchar rcsid[] = "$Id: m_perror.c,v 1.1 1994/10/06 17:43:12 dvadura Exp $";
X#endif
X
X/*
X * malloc errno error strings...
X */
X
Xchar *malloc_err_strings[] =
X{
X "No errors",
X "Malloc chain is corrupted, pointers out of order",
X "Malloc chain is corrupted, end before end pointer",
X "Pointer is not within malloc area",
X "Malloc region does not have valid magic number in header",
X "Pointers between this segment and ajoining segments are invalid",
X "Data has overrun beyond requested number of bytes",
X "Data in free'd area has been modified",
X "Data are is not in use (can't be freed or realloced)",
X "Unable to get additional memory from the system",
X "Pointer within malloc region, but outside of malloc data bounds",
X (char *) 0
X};
X
X/*
X * Function: malloc_perror()
X *
X * Purpose: to print malloc_errno error message
X *
X * Arguments: str - string to print with error message
X *
X * Returns: nothing of any value
X *
X * Narrative:
X */
Xvoid
Xmalloc_perror(str)
X char * str;
X{
X extern int malloc_errno;
X register char * s;
X register char * t;
X
X if( str && *str)
X {
X for(s=str; *s; s++)
X {
X /* do nothing */;
X }
X
X (void) write(2,str,(unsigned)(s-str));
X (void) write(2,": ",(unsigned)2);
X }
X
X t = malloc_err_strings[malloc_errno];
X
X for(s=t; *s; s++)
X {
X /* do nothing */;
X }
X
X (void) write(2,t,(unsigned)(s-t));
X
X (void) write(2,"\n",(unsigned)1);
X}
X
X/*
X * $Log: m_perror.c,v $
X * Revision 1.1 1994/10/06 17:43:12 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:21 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:04 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.5 90/08/29 21:25:08 cpcahil
X * added additional error message that was missing (and
X * caused a core dump)
X *
X * Revision 1.4 90/05/11 00:13:08 cpcahil
X * added copyright statment
X *
X * Revision 1.3 90/02/24 21:50:21 cpcahil
X * lots of lint fixes
X *
X * Revision 1.2 90/02/24 17:39:55 cpcahil
X * 1. added function header
X * 2. added rcs id and log strings.
X *
X */
END_OF_FILE
if test 2258 -ne `wc -c <'dmake/dbug/malloc/m_perror.c'`; then
echo shar: \"'dmake/dbug/malloc/m_perror.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/m_perror.c'
fi
if test -f 'dmake/extern.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/extern.h'\"
else
echo shar: Extracting \"'dmake/extern.h'\" \(2225 characters\)
sed "s/^X//" >'dmake/extern.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/extern.h,v 1.1 1994/10/06 17:41:20 dvadura Exp $
X-- SYNOPSIS -- external declarations for dmake functions.
X--
X-- DESCRIPTION
X-- ANSI is a macro that allows the proper handling of ANSI style
X-- function declarations.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: extern.h,v $
X * Revision 1.1 1994/10/06 17:41:20 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#ifndef EXTERN_h
X#define EXTERN_h
X
X/* Define this for the RS/6000 if it breaks something then we have to put a
X * #ifdef around it. */
X#if defined(rs6000)
X#define _POSIX_SOURCE
X#endif
X
X#include <limits.h>
X#include <stdio.h>
X#include <string.h>
X#include <ctype.h>
X#include <stdlib.h>
X#include <stdarg.h>
X#if defined (_MPW)
X# include <types.h>
X# include <time.h>
X#else
X# include <sys/types.h>
X# include <sys/stat.h>
X#endif
X#include <signal.h>
X#include "itypes.h"
X#include "stdmacs.h"
X#include "alloc.h"
X#include "db.h"
X#include "dmake.h"
X#include "struct.h"
X#include "vextern.h"
X#include "public.h"
X
X/* Include this last as it invalidates some functions that are defined
X * externally above and turns them into no-ops. Have to do this after
X * the extern declarations however. */
X#include "config.h"
X#include "posix.h"
X
X#endif
END_OF_FILE
if test 2225 -ne `wc -c <'dmake/extern.h'`; then
echo shar: \"'dmake/extern.h'\" unpacked with wrong size!
fi
# end of 'dmake/extern.h'
fi
if test -f 'dmake/hash.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/hash.c'\"
else
echo shar: Extracting \"'dmake/hash.c'\" \(2349 characters\)
sed "s/^X//" >'dmake/hash.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/hash.c,v 1.1 1994/10/06 17:41:26 dvadura Exp $
X-- SYNOPSIS -- hashing function for hash tables.
X--
X-- DESCRIPTION
X-- Hash an identifier. The hashing function works by computing the sum
X-- of each char and the previous hash value multiplied by 129. Finally the
X-- length of the identifier is added in. This way the hash depends on the
X-- chars as well as the length, and appears to be sufficiently unique,
X-- and is FAST to COMPUTE, unlike the previous hash function...
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: hash.c,v $
X * Revision 1.1 1994/10/06 17:41:26 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC uint16
XHash( id, phv )/*
X=================
X This function computes the identifier's hash value and returns the hash
X value modulo the key size as well as the full hash value. The reason
X for returning both is so that hash table searches can be sped up. You
X compare hash keys instead and compare strings only for those whose 32-bit
X hash keys match. (not many) */
X
Xchar *id;
Xuint32 *phv;
X{
X register char *p = id;
X register uint32 hash = (uint32) 0;
X
X while( *p ) hash = (hash << 7) + hash + (uint32) (*p++);
X *phv = hash = hash + (uint32) (p-id);
X
X return( (uint16) (hash % HASH_TABLE_SIZE) );
X}
X
END_OF_FILE
if test 2349 -ne `wc -c <'dmake/hash.c'`; then
echo shar: \"'dmake/hash.c'\" unpacked with wrong size!
fi
# end of 'dmake/hash.c'
fi
if test -f 'dmake/mac/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/tempnam.c'\"
else
echo shar: Extracting \"'dmake/mac/tempnam.c'\" \(2292 characters\)
sed "s/^X//" >'dmake/mac/tempnam.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/tempnam.c,v 1.1 1994/10/06 17:43:04 dvadura Exp $
X-- SYNOPSIS -- Fake tempnam function for the mac
X--
X-- DESCRIPTION
X-- Get a temporary file name.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: tempnam.c,v $
X * Revision 1.1 1994/10/06 17:43:04 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X
X#include "extern.h"
X#include <StdIO.h>
X#include <String.h>
X
X
X
X/*
X * Try to open a temporary file in the given directory (if non-NULL)
X * with the given prefix (if non-NULL).
X *
X * We ignore the directory argument.
X */
XPUBLIC char *
Xtempnam(char *pDir, char * pPrefix)
X{
X char *pName;
X char *pFullName;
X
X pName = tmpnam ((char *) NULL);
X
X /* Assume that if the name returned by tmpnam is not being used,
X the name with the prefix is also not being used. */
X pFullName = MALLOC (((pPrefix != NULL) ? strlen (pPrefix) : 0) +
X strlen (pName) + 1, char);
X
X /* Copy in the name if we successfully allocated space for it. */
X if (pFullName != NULL) {
X if (pPrefix != NULL) {
X strcpy (pFullName, pPrefix);
X } else {
X *pFullName = '\0';
X } /* if ... else */
X
X strcat (pFullName, pName);
X } /* if */
X
X return (pFullName);
X} /* PUBLIC char *tempnam () */
END_OF_FILE
if test 2292 -ne `wc -c <'dmake/mac/tempnam.c'`; then
echo shar: \"'dmake/mac/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/tempnam.c'
fi
if test -f 'dmake/msdos/find.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/find.c'\"
else
echo shar: Extracting \"'dmake/msdos/find.c'\" \(2081 characters\)
sed "s/^X//" >'dmake/msdos/find.c' <<'END_OF_FILE'
X/*
X Directory Access Library
X
X FIND.C taken from DIRLIB.C by M. J. Weinstein
X Released to public domain 1-Jan-89
X
X The author may be contacted at:
X ma...@cs.ucla.edu -or- POB 84524, L.A., CA 90073
X
X Modified by dva...@watdragon.edu to work with dmake.
X (nuked the DOS version 2 code, since dmake needs version
X 3.0 or greater to function).
X */
X
X
X/*
X * revision history:
X *
X * VER MM/DD/YY COMMENTS
X * ---- -------- --------
X * 0.99 02/24/86 Beta release to INTERNET
X */
X
X#include <stdlib.h>
X#include <ctype.h>
X#include <errno.h>
X#include <string.h>
X#include <alloc.h>
X#include <dos.h>
X#include "dosdta.h"
X
X#ifndef MK_FP
X#define MK_FP(seg,ofs) ((void far *) \
X (((unsigned long)(seg) << 16) | (unsigned)(ofs)))
X#endif
X#ifndef FP_SEG
X#define FP_SEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
X#endif
X#ifndef FP_OFF
X#define FP_OFF(fp) ((unsigned)(fp))
X#endif
X
Xint _err;
X
X/*
X * get/set dta address
X */
X
Xstatic DTA far *
X_getsetdta(newdta)
XDTA far *newdta;
X{
X DTA far *olddta;
X union REGS r;
X struct SREGS s;
X
X /* get old dta */
X r.h.ah = 0x2f;
X intdos(&r, &r);
X segread(&s);
X olddta = (DTA far *) MK_FP(s.es, r.x.bx);
X
X /* conditionally set new dta */
X if (newdta) {
X r.h.ah = 0x1a;
X s.ds = FP_SEG(newdta);
X r.x.dx = FP_OFF(newdta);
X intdosx(&r, &r, &s);
X }
X
X return olddta;
X}
X
X/*
X * dos findfirst
X */
X
XDTA *
Xfindfirst(name, dta)
Xchar *name;
XDTA *dta;
X{
X union REGS r;
X struct SREGS s;
X DTA far *dtasave;
X char far *nmp = (char far *)name;
X
X dtasave = _getsetdta((DTA far *)dta);
X
X /* do directory lookup */
X segread(&s);
X r.h.ah = 0x4e;
X r.x.cx = 0x10;
X r.x.dx = FP_OFF(nmp);
X s.ds = FP_SEG(nmp);
X intdosx(&r, &r, &s);
X /* restore dta */
X _getsetdta(dtasave);
X _err = r.x.ax;
X if (r.x.cflag)
X return (DTA *) 0;
X
X return dta;
X}
X
X/*
X * dos findnext
X */
X
XDTA *
Xfindnext(dta)
XDTA *dta;
X{
X union REGS r;
X DTA far *dtasave;
X
X dtasave = _getsetdta((DTA far *)dta);
X
X /* do directory lookup */
X r.h.ah = 0x4f;
X intdos(&r, &r);
X /* restore old dta */
X _getsetdta(dtasave);
X _err = r.x.ax;
X if (r.x.cflag)
X return (DTA *) 0;
X
X return dta;
X}
END_OF_FILE
if test 2081 -ne `wc -c <'dmake/msdos/find.c'`; then
echo shar: \"'dmake/msdos/find.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/find.c'
fi
if test -f 'dmake/msdos/tccdos/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/config.h'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/config.h'\" \(2025 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/tccdos/RCS/config.h,v 1.1 1994/10/06 17:41:43 dvadura Exp $
X * Revision 1.1 1994/10/06 17:41:43 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X/*#define coreleft() 0L*/
Xextern unsigned int coreleft();
X
X#define SIGQUIT SIGTERM /* turbo C doesn't understand SIGQUIT */
X
X/* Turbo-C understands const declarations. */
X#define CONST const
X
X#ifndef MSDOS
X# define MSDOS 1
X#endif
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2025 -ne `wc -c <'dmake/msdos/tccdos/config.h'`; then
echo shar: \"'dmake/msdos/tccdos/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/config.h'
fi
if test -f 'dmake/os2/ibm/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/config.mk'\"
else
echo shar: Extracting \"'dmake/os2/ibm/config.mk'\" \(2395 characters\)
sed "s/^X//" >'dmake/os2/ibm/config.mk' <<'END_OF_FILE'
X# This is the MSC 4.0 and higher OS/2 configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# Definition of macros for library, and C startup code.
X
X# The following sources are required for MSC
XOSR_SRC = tempnam.c
X.SETDIR=$(osrdir) : $(OSR_SRC)
X
XSRC += $(OSR_SRC)
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS
X# OS/2 always has at least a 286 so this is enabled by default:
XCFLAGS += -G2
X
XSET_STACK = /stack:8192
XNDB_LDFLAGS += $(SET_STACK)
X
X# Microsoft C doesn't need tail but needs head
XLDTAIL = $(OS)$(DIRSEPSTR)$(TARGET:b).def;
XLDHEAD = $(LDFLAGS)
X
X# Debugging libraries
XDB_LDFLAGS += /co /li /map $(SET_STACK)
XDB_LDLIBS +=
X
X# NO Debug MSC flags:
X# Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
X# to get these by default when you make dmake using 'dmake'.
X#
X# Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
X# and sets the flags appropriately.
X
X.IMPORT .IGNORE : MSC_VER
XMSC_VER *= 6.0 # If unset, assume 6.0 by default.
X
X.IF $(MSC_VER) == 4.0
X CFLAGS += -I$(osrdir) $(C_$(MODEL):s/A/m/)
X CFLAGS += -DM_I86=1 # 5.0+ define this automatically
X CFLAGS += -D__STDC__=1 # 5.0, 5.1, but not 6.0 do this automatically
X NDB_CFLAGS +=
X DB_CFLAGS += -Zi
X.ELSE
X DB_CFLAGS += -Zi
X CFLAGS += -I$(osrdir) $(C_$(MODEL))
X .IF $(MSC_VER) != 6.0
X # For 5.0 and 5.1, we define _MSC_VER=500 or 510
X CFLAGS += -D_MSC_VER=$(MSC_VER:s,.,,)0
X NDB_CFLAGS += -Osl -Gs
X .ELSE
X # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
X CFLAGS += -D__STDC__=1 # incredibly not auto done by 6.0
X NDB_CFLAGS += -Osecgl -Gs
X
X # Redefine rule for making our objects, we don't need mv
X %$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
X .END
X NDB_LDFLAGS += /exe /packc /batch
X NDB_LDLIBS += /NOD:LLIBCE LLIBCEP
X.END
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
X
XC_s =
XC_m = -AM
XC_c = -AC
XC_l = -AL
X
XS_s = -Dmsmall
XS_m = -Dmmedium
XS_c = -Dmcompact
XS_l = -Dmlarge
END_OF_FILE
if test 2395 -ne `wc -c <'dmake/os2/ibm/config.mk'`; then
echo shar: \"'dmake/os2/ibm/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/config.mk'
fi
if test -f 'dmake/os2/mscdos/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/config.mk'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/config.mk'\" \(2395 characters\)
sed "s/^X//" >'dmake/os2/mscdos/config.mk' <<'END_OF_FILE'
X# This is the MSC 4.0 and higher OS/2 configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# Definition of macros for library, and C startup code.
X
X# The following sources are required for MSC
XOSR_SRC = tempnam.c
X.SETDIR=$(osrdir) : $(OSR_SRC)
X
XSRC += $(OSR_SRC)
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS
X# OS/2 always has at least a 286 so this is enabled by default:
XCFLAGS += -G2
X
XSET_STACK = /stack:8192
XNDB_LDFLAGS += $(SET_STACK)
X
X# Microsoft C doesn't need tail but needs head
XLDTAIL = $(OS)$(DIRSEPSTR)$(TARGET:b).def;
XLDHEAD = $(LDFLAGS)
X
X# Debugging libraries
XDB_LDFLAGS += /co /li /map $(SET_STACK)
XDB_LDLIBS +=
X
X# NO Debug MSC flags:
X# Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
X# to get these by default when you make dmake using 'dmake'.
X#
X# Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
X# and sets the flags appropriately.
X
X.IMPORT .IGNORE : MSC_VER
XMSC_VER *= 6.0 # If unset, assume 6.0 by default.
X
X.IF $(MSC_VER) == 4.0
X CFLAGS += -I$(osrdir) $(C_$(MODEL):s/A/m/)
X CFLAGS += -DM_I86=1 # 5.0+ define this automatically
X CFLAGS += -D__STDC__=1 # 5.0, 5.1, but not 6.0 do this automatically
X NDB_CFLAGS +=
X DB_CFLAGS += -Zi
X.ELSE
X DB_CFLAGS += -Zi
X CFLAGS += -I$(osrdir) $(C_$(MODEL))
X .IF $(MSC_VER) != 6.0
X # For 5.0 and 5.1, we define _MSC_VER=500 or 510
X CFLAGS += -D_MSC_VER=$(MSC_VER:s,.,,)0
X NDB_CFLAGS += -Osl -Gs
X .ELSE
X # Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
X CFLAGS += -D__STDC__=1 # incredibly not auto done by 6.0
X NDB_CFLAGS += -Osecgl -Gs
X
X # Redefine rule for making our objects, we don't need mv
X %$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
X .END
X NDB_LDFLAGS += /exe /packc /batch
X NDB_LDLIBS += /NOD:LLIBCE LLIBCEP
X.END
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
X
XC_s =
XC_m = -AM
XC_c = -AC
XC_l = -AL
X
XS_s = -Dmsmall
XS_m = -Dmmedium
XS_c = -Dmcompact
XS_l = -Dmlarge
END_OF_FILE
if test 2395 -ne `wc -c <'dmake/os2/mscdos/config.mk'`; then
echo shar: \"'dmake/os2/mscdos/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/config.mk'
fi
if test -f 'dmake/os2/ruletab.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ruletab.c'\"
else
echo shar: Extracting \"'dmake/os2/ruletab.c'\" \(2123 characters\)
sed "s/^X//" >'dmake/os2/ruletab.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/os2/RCS/ruletab.c,v 1.1 1994/10/06 17:42:41 dvadura Exp $
X-- SYNOPSIS -- Default initial configuration of dmake.
X--
X-- DESCRIPTION
X-- Define here the initial set of rules that are defined before
X-- dmake performs any processing.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: ruletab.c,v $
X * Revision 1.1 1994/10/06 17:42:41 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* These are control macros for dmake that MUST be defined at some point
X * if they are NOT dmake will not work! These are default definitions. They
X * may be overridden inside the .STARTUP makefile, they are here
X * strictly so that dmake can parse the STARTUP makefile */
X/*
X * For OS/2 these are close to the Unix definitions in terms of limits.
X * We dont need the two different cases of Makefile, so only keep the
X * pretty one.
X */
Xstatic char *_rules[] = {
X "MAXLINELENGTH := 2046",
X "MAXPROCESSLIMIT := 16",
X ".IMPORT .IGNORE: ROOTDIR INIT",
X ".MAKEFILES : makefile.mk Makefile",
X ".SOURCE : .NULL",
X#include "startup.h"
X 0 };
X
Xchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
X
END_OF_FILE
if test 2123 -ne `wc -c <'dmake/os2/ruletab.c'`; then
echo shar: \"'dmake/os2/ruletab.c'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ruletab.c'
fi
if test -f 'dmake/qnx/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/config.h'\"
else
echo shar: Extracting \"'dmake/qnx/config.h'\" \(2382 characters\)
sed "s/^X//" >'dmake/qnx/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/qnx/RCS/config.h,v 1.1 1994/10/06 17:43:25 dvadura Exp $
X * Revision 1.1 1994/10/06 17:43:25 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
Xextern char *getcwd ANSI((char *, int));
X
X#ifndef M_XENIX
X/* Define setvbuf, SysV doesn't have one */
X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
X#define tzset()
X#endif
X
X#ifdef M_XENIX
X#define ASCARCH 0 /* Use binary archive headers if Xenix */
X#endif
X
X/* We don't care about CONST */
X#define CONST
X
X/* some braindead compilers don't understand pointers to void. */
X#define PVOID char *
X
X#define void_lcache(A,B)
X
X/* To keep the compiler happy */
Xextern void Fatal(char *,...);
Xextern void Error(char *,...);
Xextern void Warning(char *,...);
END_OF_FILE
if test 2382 -ne `wc -c <'dmake/qnx/config.h'`; then
echo shar: \"'dmake/qnx/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/config.h'
fi
if test -f 'dmake/quit.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/quit.c'\"
else
echo shar: Extracting \"'dmake/quit.c'\" \(2208 characters\)
sed "s/^X//" >'dmake/quit.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/quit.c,v 1.1 1994/10/06 17:41:57 dvadura Exp $
X-- SYNOPSIS -- end the dmake session.
X--
X-- DESCRIPTION
X-- Handles dmake termination.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: quit.c,v $
X * Revision 1.1 1994/10/06 17:41:57 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
Xstatic void _handle_quit ANSI((char*));
Xstatic int _dont_quit = 0;
X
X
XPUBLIC void
XQuit()/*
X======== Error or quit */
X{
X if( _dont_quit ) return;
X
X while( Closefile() != NIL( FILE ) );
X Clean_up_processes();
X
X if( Current_target != NIL(CELL) )
X Unlink_temp_files(Current_target);
X
X if( _dont_quit == 0 ) _handle_quit( ".ERROR" );
X
X Set_dir( Makedir ); /* No Error message if we can't do it */
X Epilog( ERROR_EXIT_VALUE );
X}
X
X
Xstatic void
X_handle_quit( err_target )/*
X============================
X Called by quit and the others to handle the execution of termination code
X from within make */
Xchar *err_target;
X{
X HASHPTR hp;
X CELLPTR cp;
X
X if( (hp = Get_name(err_target, Defs, FALSE)) != NIL(HASH) ) {
X cp = hp->CP_OWNR;
X Glob_attr |= A_IGNORE;
X
X _dont_quit = 1;
X cp->ce_flag |= F_TARGET;
X Make( cp, NIL(CELL) );
X }
X}
END_OF_FILE
if test 2208 -ne `wc -c <'dmake/quit.c'`; then
echo shar: \"'dmake/quit.c'\" unpacked with wrong size!
fi
# end of 'dmake/quit.c'
fi
if test -f 'dmake/unix/386ix/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/config.h'\"
else
echo shar: Extracting \"'dmake/unix/386ix/config.h'\" \(2122 characters\)
sed "s/^X//" >'dmake/unix/386ix/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/386ix/RCS/config.h,v 1.1 1994/10/06 17:42:03 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:03 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
Xextern char *getcwd ANSI((char *, int));
X
X/* Define setvbuf, SysV doesn't have one */
X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
X
X/* We don't care about CONST */
X#define CONST
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2122 -ne `wc -c <'dmake/unix/386ix/config.h'`; then
echo shar: \"'dmake/unix/386ix/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/config.h'
fi
if test -f 'dmake/unix/386ix/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/386ix/make.sh'\" \(2137 characters\)
sed "s/^X//" >'dmake/unix/386ix/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/386ix -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/386ix -O unix/dcache.c
Xmv dcache.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o
Xcp unix/386ix/startup.mk startup.mk
END_OF_FILE
if test 2137 -ne `wc -c <'dmake/unix/386ix/make.sh'`; then
echo shar: \"'dmake/unix/386ix/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/386ix/make.sh'
# end of 'dmake/unix/386ix/make.sh'
fi
if test -f 'dmake/unix/bsd43/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/config.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/config.h'\" \(2117 characters\)
sed "s/^X//" >'dmake/unix/bsd43/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/bsd43/RCS/config.h,v 1.1 1994/10/06 17:42:06 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:06 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
Xextern char* getwd ANSI((char*));
X#define getcwd(buf,siz) getwd(buf)
X
X/* We don't care about CONST */
X#define CONST
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
X
X/* Sequent dynix doesn't have tzset() Arrrrgh! */
X#define tzset()
END_OF_FILE
if test 2117 -ne `wc -c <'dmake/unix/bsd43/config.h'`; then
echo shar: \"'dmake/unix/bsd43/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/config.h'
fi
if test -f 'dmake/unix/bsd43/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/make.sh'\" \(2502 characters\)
sed "s/^X//" >'dmake/unix/bsd43/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/putenv.c
Xmv putenv.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/tempnam.c
Xmv tempnam.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/utime.c
Xmv utime.o objects
Xcc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/setvbuf.c
Xmv setvbuf.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o \
Xobjects/dcache.o objects/putenv.o objects/tempnam.o objects/utime.o objects/setvbuf.o
Xcp unix/bsd43/startup.mk startup.mk
END_OF_FILE
if test 2502 -ne `wc -c <'dmake/unix/bsd43/make.sh'`; then
echo shar: \"'dmake/unix/bsd43/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/bsd43/make.sh'
# end of 'dmake/unix/bsd43/make.sh'
fi
if test -f 'dmake/unix/solaris/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/config.h'\"
else
echo shar: Extracting \"'dmake/unix/solaris/config.h'\" \(2213 characters\)
sed "s/^X//" >'dmake/unix/solaris/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/solaris/RCS/config.h,v 1.1 1994/10/06 17:42:35 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:35 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
X/*extern char* getwd ANSI((char*));
X#define getcwd(buf,siz) getwd(buf)*/
X
X/* We don't care about CONST */
X#define CONST const
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
X
X/* Sequent dynix doesn't have tzset() Arrrrgh! */
X#define tzset()
X
X#ifdef _POSIX_NAME_MAX
X#undef _POSIX_NAME_MAX
X#define _POSIX_NAME_MAX 255
X#endif
END_OF_FILE
if test 2213 -ne `wc -c <'dmake/unix/solaris/config.h'`; then
echo shar: \"'dmake/unix/solaris/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/config.h'
fi
if test -f 'dmake/unix/sysvr1/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/config.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/config.h'\" \(2123 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/sysvr1/RCS/config.h,v 1.1 1994/10/06 17:42:14 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:14 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
Xextern char *getcwd ANSI((char *, int));
X
X/* Define setvbuf, SysV doesn't have one */
X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
X
X/* We don't care about CONST */
X#define CONST
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2123 -ne `wc -c <'dmake/unix/sysvr1/config.h'`; then
echo shar: \"'dmake/unix/sysvr1/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/config.h'
fi
if test -f 'dmake/unix/sysvr1/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/make.sh'\" \(2262 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iunix -Iunix/sysvr1 -O unix/sysvr1/vfprintf.c
Xmv vfprintf.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o objects/vfprintf.o
Xcp unix/sysvr1/startup.mk startup.mk
END_OF_FILE
if test 2262 -ne `wc -c <'dmake/unix/sysvr1/make.sh'`; then
echo shar: \"'dmake/unix/sysvr1/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/sysvr1/make.sh'
# end of 'dmake/unix/sysvr1/make.sh'
fi
if test -f 'dmake/unix/sysvr1/vfprintf.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/vfprintf.c'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/vfprintf.c'\" \(934 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/vfprintf.c' <<'END_OF_FILE'
X/* From:
X * John Limpert jo...@gronk.UUCP uunet!n3dmc!gronk!johnl
X */
X
X#include <stdio.h>
X#include <varargs.h>
X
X#ifndef BUFSIZ
X#include <stdio.h>
X#endif
X
X#ifndef va_dcl
X#include <varargs.h>
X#endif
X
Xint
Xvsprintf(str, fmt, ap)
X char *str, *fmt;
X va_list ap;
X{
X FILE f;
X int len;
X
X f._flag = _IOWRT+_IOMYBUF;
X f._ptr = (char *)str; /* My copy of BSD stdio.h has this as (char *)
X * with a comment that it should be
X * (unsigned char *). Since this code is
X * intended for use on a vanilla BSD system,
X * we'll stick with (char *) for now.
X */
X f._cnt = 32767;
X len = _doprnt(fmt, ap, &f);
X *f._ptr = 0;
X return (len);
X}
X
Xint
Xvfprintf(iop, fmt, ap)
X FILE *iop;
X char *fmt;
X va_list ap;
X{
X int len;
X
X len = _doprnt(fmt, ap, iop);
X return (ferror(iop) ? EOF : len);
X}
X
Xint
Xvprintf(fmt, ap)
X char *fmt;
X va_list ap;
X{
X int len;
X
X len = _doprnt(fmt, ap, stdout);
X return (ferror(stdout) ? EOF : len);
X}
END_OF_FILE
if test 934 -ne `wc -c <'dmake/unix/sysvr1/vfprintf.c'`; then
echo shar: \"'dmake/unix/sysvr1/vfprintf.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/vfprintf.c'
fi
if test -f 'dmake/unix/sysvr3/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/make.sh'\" \(2164 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/sysvr3 -O unix/dcache.c
Xmv dcache.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o
Xcp unix/sysvr3/startup.mk startup.mk
END_OF_FILE
if test 2164 -ne `wc -c <'dmake/unix/sysvr3/make.sh'`; then
echo shar: \"'dmake/unix/sysvr3/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/sysvr3/make.sh'
# end of 'dmake/unix/sysvr3/make.sh'
fi
if test -f 'dmake/unix/sysvr4/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr4/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/sysvr4/make.sh'\" \(2164 characters\)
sed "s/^X//" >'dmake/unix/sysvr4/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/sysvr4 -O unix/dcache.c
Xmv dcache.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o
Xcp unix/sysvr4/startup.mk startup.mk
END_OF_FILE
if test 2164 -ne `wc -c <'dmake/unix/sysvr4/make.sh'`; then
echo shar: \"'dmake/unix/sysvr4/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/sysvr4/make.sh'
# end of 'dmake/unix/sysvr4/make.sh'
fi
if test -f 'dmake/unix/xenix/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/config.h'\"
else
echo shar: Extracting \"'dmake/unix/xenix/config.h'\" \(2229 characters\)
sed "s/^X//" >'dmake/unix/xenix/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/xenix/RCS/config.h,v 1.1 1994/10/06 17:42:30 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:30 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
Xextern char *getcwd ANSI((char *, int));
X
X#ifndef M_XENIX
X/* Define setvbuf, SysV doesn't have one */
X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
X#endif
X
X#ifdef M_XENIX
X#define ASCARCH 0 /* Use binary archive headers if Xenix */
X#endif
X
X/* We don't care about CONST */
X#define CONST
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2229 -ne `wc -c <'dmake/unix/xenix/config.h'`; then
echo shar: \"'dmake/unix/xenix/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/config.h'
fi
if test -f 'dmake/unix/xenix/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/make.sh'\"
else
echo shar: Extracting \"'dmake/unix/xenix/make.sh'\" \(2397 characters\)
sed "s/^X//" >'dmake/unix/xenix/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O make.c
Xmv make.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O path.c
Xmv path.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O state.c
Xmv state.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O function.c
Xmv function.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O unix/arlib.c
Xmv arlib.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O unix/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O unix/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iunix -Iunix/xenix -DM_XENIX -O unix/dcache.c
Xmv dcache.o objects
Xcc -O -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o \
Xobjects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o \
Xobjects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o \
Xobjects/quit.o objects/state.o objects/dmdump.o objects/macparse.o \
Xobjects/rulparse.o objects/percent.o objects/function.o objects/arlib.o \
Xobjects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o
Xcp unix/xenix/startup.mk startup.mk
END_OF_FILE
if test 2397 -ne `wc -c <'dmake/unix/xenix/make.sh'`; then
echo shar: \"'dmake/unix/xenix/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/unix/xenix/make.sh'
# end of 'dmake/unix/xenix/make.sh'
fi
echo shar: End of archive 23 \(of 27\).
cp /dev/null ark23isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/dbug.mk dmake/dbug/malloc/calloc.c
# dmake/mac/arlib.c dmake/mac/ruletab.c dmake/msdos/_chdir.c
# dmake/msdos/arlib.c dmake/msdos/bccdos/config.h
# dmake/msdos/bccdos/tempnam.c dmake/msdos/config.mk
# dmake/msdos/dirbrk.c dmake/msdos/mscdos/tempnam.c
# dmake/msdos/ruletab.c dmake/msdos/tccdos/tempnam.c
# dmake/msdos/ztcdos/config.mk dmake/msdos/ztcdos/tempnam.c
# dmake/os2/ibm/tempnam.c dmake/os2/mscdos/tempnam.c dmake/posix.h
# dmake/qnx/make.sh dmake/qnx/ruletab.c dmake/stdmacs.h
# dmake/tos/config.h dmake/tos/dirbrk.c dmake/tos/ruletab.c
# dmake/unix/coherent/config.h dmake/unix/dirbrk.c
# dmake/unix/ruletab.c dmake/unix/sysvr4/stdarg.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:54 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 24 (of 27)."'
if test -f 'dmake/dbug/dbug.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/dbug.mk'\"
else
echo shar: Extracting \"'dmake/dbug/dbug.mk'\" \(1964 characters\)
sed "s/^X//" >'dmake/dbug/dbug.mk' <<'END_OF_FILE'
X# Set the proper macros based on whether we are making the debugging version
X# or not. The valid parameters to this file are:
X#
X# DEBUG=1 ==> enable the making of the DBUG version
X# DBMALLOC=1 ==> enable DBUG version with extensive MALLOC checking
X#
X# DB_CFLAGS ==> CFLAGS is set to this value at the end if DEBUG=1
X# DB_LDFLAGS ==> LDFLAGS is set to this at the end if DEBUG=1
X# DB_LDLIBS ==> LDLIBS is set to this at end if DEBUG=1
X#
X# The non debug versions of the above three macros are:
X#
X# NDB_CFLAGS
X# NDB_LDFLAGS
X# NDB_LDLIBS
X#
X# One of the set of three should have values set appropriately prior to
X# sourcing this file.
X
X.IF $(DEBUG)
X DBUG_SRC += dbug.c
X DB_CFLAGS += -Idbug/dbug
X
X .SETDIR=dbug/dbug : $(DBUG_SRC)
X
X # If DBMALLOC is requested (ie non-NULL) then include the sources for
X # compilation. BSD 4.3 needs the getwd.c source compiled in due to a bug
X # in the clib getwd routine.
X .IF $(DBMALLOC)
X # Serious bug in bsd43 getwd.c would free a string and then use its
X # value. The DBMALLOC code clears a string when it is free'd so the
X # value was no longer valid and the returned path for the current
X # directory was now completely wrong.
X .IF $(OSRELEASE) == bsd43
X GETWD_SRC += getwd.c
X .SETDIR=dbug : $(GETWD_SRC)
X .END
X
X MLC_SRC += malloc.c free.c realloc.c calloc.c string.c\
X mlc_chk.c mlc_chn.c memory.c tostring.c m_perror.c\
X m_init.c mallopt.c dump.c
X
X .SETDIR=dbug/malloc : $(MLC_SRC)
X
X DB_CFLAGS += -Idbug/malloc
X .END
X
X SRC += $(DBUG_SRC) $(MLC_SRC) $(GETWD_SRC)
X HDR += db.h
X
X LDFLAGS += $(DB_LDFLAGS)
X LDLIBS += $(DB_LDLIBS)
X
X __.SILENT !:= $(.SILENT)
X .SILENT !:= yes
X TARGET := db$(TARGET)
X OBJDIR := $(OBJDIR).dbg
X .SILENT !:= $(__.SILENT)
X
X CFLAGS += $(DB_CFLAGS)
X .KEEP_STATE := _dbstate.mk
X.ELSE
X CFLAGS += $(NDB_CFLAGS)
X LDFLAGS += $(NDB_LDFLAGS)
X LDLIBS += $(NDB_LDLIBS)
X.END
END_OF_FILE
if test 1964 -ne `wc -c <'dmake/dbug/dbug.mk'`; then
echo shar: \"'dmake/dbug/dbug.mk'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/dbug.mk'
fi
if test -f 'dmake/dbug/malloc/calloc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/calloc.c'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/calloc.c'\" \(1766 characters\)
sed "s/^X//" >'dmake/dbug/malloc/calloc.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X#include <stdio.h>
X
X/*
X * Function: calloc()
X *
X * Purpose: to allocate and nullify a data area
X *
X * Arguments: nelem - number of elements
X * elsize - size of each element
X *
X * Returns: NULL - if malloc fails
X * or pointer to allocated space
X *
X * Narrative: determine size of area to malloc
X * malloc area.
X * if malloc succeeds
X * fill area with nulls
X * return ptr to malloc'd region
X */
X#ifndef lint
Xstatic char rcs_header[] = "$Id: calloc.c,v 1.1 1994/10/06 17:43:08 dvadura Exp $";
X#endif
X
Xchar *
Xcalloc(nelem,elsize)
X unsigned int nelem;
X unsigned int elsize;
X{
X char * malloc();
X char * memset();
X char * ptr;
X unsigned int size;
X
X size = elsize * nelem;
X
X if( (ptr = malloc(size)) != NULL)
X {
X (void) memset(ptr,'\0',(int)size);
X }
X
X return(ptr);
X}
X
X
X/*
X * $Log: calloc.c,v $
X * Revision 1.1 1994/10/06 17:43:08 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:17 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:28:58 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.6 90/05/11 00:13:07 cpcahil
X * added copyright statment
X *
X * Revision 1.5 90/02/24 20:41:57 cpcahil
X * lint changes.
X *
X * Revision 1.4 90/02/24 17:25:47 cpcahil
X * changed $header to $id so full path isn't included.
X *
X * Revision 1.3 90/02/24 13:32:24 cpcahil
X * added function header. moved log to end of file.
X *
X * Revision 1.2 90/02/22 23:08:26 cpcahil
X * fixed rcs_header line
X *
X * Revision 1.1 90/02/22 23:07:38 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 1766 -ne `wc -c <'dmake/dbug/malloc/calloc.c'`; then
echo shar: \"'dmake/dbug/malloc/calloc.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/calloc.c'
fi
if test -f 'dmake/mac/arlib.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/arlib.c'\"
else
echo shar: Extracting \"'dmake/mac/arlib.c'\" \(1975 characters\)
sed "s/^X//" >'dmake/mac/arlib.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/arlib.c,v 1.1 1994/10/06 17:42:54 dvadura Exp $
X-- SYNOPSIS -- Library access code.
X--
X-- DESCRIPTION
X-- This implementation uses the library timestamp inplace of the
X-- library member timestamp.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: arlib.c,v $
X * Revision 1.1 1994/10/06 17:42:54 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC time_t
Xseek_arch(name, lib)
Xchar* name;
Xchar* lib;
X{
X static int warned = FALSE;
X
X if (!warned && !(Glob_attr&A_SILENT))
X warned = TRUE,
X Warning("Can't extract library member timestamp;\n\
X using library timestamp instead.");
X return (Do_stat(lib, NULL, NULL, TRUE));
X}
X
XPUBLIC int
Xtouch_arch(name, lib)
Xchar* name;
Xchar* lib;
X{
X static int warned = FALSE;
X
X if (!warned && !(Glob_attr&A_SILENT))
X warned = TRUE,
X Warning("Can't update library member timestamp;\n\
X touching library instead.");
X return (Do_touch(lib, NULL, NULL));
X}
X
END_OF_FILE
if test 1975 -ne `wc -c <'dmake/mac/arlib.c'`; then
echo shar: \"'dmake/mac/arlib.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/arlib.c'
fi
if test -f 'dmake/mac/ruletab.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/ruletab.c'\"
else
echo shar: Extracting \"'dmake/mac/ruletab.c'\" \(2005 characters\)
sed "s/^X//" >'dmake/mac/ruletab.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/ruletab.c,v 1.1 1994/10/06 17:43:00 dvadura Exp $
X * Revision 1.1 1994/10/06 17:43:00 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* These are control macros for dmake that MUST be defined at some point
X * if they are NOT dmake will not work! These are default definitions. They
X * may be overridden inside the .STARTUP makefile, they are here
X * strictly so that dmake can parse the STARTUP makefile */
X
Xstatic char *_rules[] = {
X "MAXLINELENGTH := 4094",
X "MAXPROCESSLIMIT := 1",
X "MAXPROCESS := 1",
X ".IMPORT .IGNORE: MPW DMSTARTUPDIR",
X ".MAKEFILES : makefile.mk makefile",
X ".SOURCE : .NULL",
X#include "startup.h"
X 0 };
X
Xchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
X
END_OF_FILE
if test 2005 -ne `wc -c <'dmake/mac/ruletab.c'`; then
echo shar: \"'dmake/mac/ruletab.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/ruletab.c'
fi
if test -f 'dmake/msdos/_chdir.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/_chdir.c'\"
else
echo shar: Extracting \"'dmake/msdos/_chdir.c'\" \(2010 characters\)
sed "s/^X//" >'dmake/msdos/_chdir.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/_chdir.c,v 1.1 1994/10/06 17:41:38 dvadura Exp $
X-- SYNOPSIS -- Change directory.
X--
X-- DESCRIPTION
X-- Under DOS change the current drive as well as the current directory.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: _chdir.c,v $
X * Revision 1.1 1994/10/06 17:41:38 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <dos.h>
X#include "extern.h"
X
XPUBLIC int
X_chdir(path)
Xchar *path;
X{
X int res;
X
X res = chdir(path);
X
X#if defined(OS2)
X if (res != -1 && path[1] == ':') {
X unsigned new_drive;
X unsigned max_drives;
X
X /* for OS2 we must change drive without using intdos() */
X new_drive = (*path & ~0x20) - 'A' + 1;
X _dos_setdrive(new_drive, &max_drives);
X }
X#else
X if (res != -1 && path[1] == ':') {
X union REGS reg;
X
X /* we must change the logged drive, since the chdir worked. */
X reg.h.ah = 0x0E;
X reg.h.dl = (*path & ~0x20) - 'A';
X intdos(®, ®);
X }
X#endif /* OS2 */
X return (res);
X}
X
END_OF_FILE
if test 2010 -ne `wc -c <'dmake/msdos/_chdir.c'`; then
echo shar: \"'dmake/msdos/_chdir.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/_chdir.c'
fi
if test -f 'dmake/msdos/arlib.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/arlib.c'\"
else
echo shar: Extracting \"'dmake/msdos/arlib.c'\" \(1977 characters\)
sed "s/^X//" >'dmake/msdos/arlib.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/arlib.c,v 1.1 1994/10/06 17:41:37 dvadura Exp $
X-- SYNOPSIS -- Library access code.
X--
X-- DESCRIPTION
X-- This implementation uses the library timestamp inplace of the
X-- library member timestamp.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: arlib.c,v $
X * Revision 1.1 1994/10/06 17:41:37 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC time_t
Xseek_arch(name, lib)
Xchar* name;
Xchar* lib;
X{
X static int warned = FALSE;
X
X if (!warned && !(Glob_attr&A_SILENT))
X warned = TRUE,
X Warning("Can't extract library member timestamp;\n\
X using library timestamp instead.");
X return (Do_stat(lib, NULL, NULL, TRUE));
X}
X
XPUBLIC int
Xtouch_arch(name, lib)
Xchar* name;
Xchar* lib;
X{
X static int warned = FALSE;
X
X if (!warned && !(Glob_attr&A_SILENT))
X warned = TRUE,
X Warning("Can't update library member timestamp;\n\
X touching library instead.");
X return (Do_touch(lib, NULL, NULL));
X}
X
END_OF_FILE
if test 1977 -ne `wc -c <'dmake/msdos/arlib.c'`; then
echo shar: \"'dmake/msdos/arlib.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/arlib.c'
fi
if test -f 'dmake/msdos/bccdos/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/config.h'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/config.h'\" \(2025 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/bccdos/RCS/config.h,v 1.1 1994/10/06 17:41:50 dvadura Exp $
X * Revision 1.1 1994/10/06 17:41:50 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X/*#define coreleft() 0L*/
Xextern unsigned int coreleft();
X
X#define SIGQUIT SIGTERM /* turbo C doesn't understand SIGQUIT */
X
X/* Turbo-C understands const declarations. */
X#define CONST const
X
X#ifndef MSDOS
X# define MSDOS 1
X#endif
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2025 -ne `wc -c <'dmake/msdos/bccdos/config.h'`; then
echo shar: \"'dmake/msdos/bccdos/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/config.h'
fi
if test -f 'dmake/msdos/bccdos/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/tempnam.c'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/tempnam.c'\" \(1782 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include <dos.h>
X
X#if defined(max)
X# undef max
X#endif
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern char *mktemp();
Xextern int access();
Xint _access();
X
X/* Turbo C stdio.h doesn't define P_tmpdir, so let's do it here */
X/* Under DOS leave the default tmpdir pointing here! */
X#ifndef P_tmpdir
Xstatic char *P_tmpdir = "";
X#endif
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X static int count = 0;
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X char buf[30];
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
X if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
X if( _access( strcpy(p, P_tmpdir), 0) != 0 )
X if( !prefix )
X prefix = "tp";
X
X if(prefix)
X {
X *(p+strlen(p)+2) = '\0';
X (void)strncat(p, prefix, 2);
X }
X
X sprintf( buf, "%08x", _psp );
X buf[6]='\0';
X (void)strcat(p, buf );
X sprintf( buf, "%04d", count++ );
X q=p+strlen(p)-6;
X *q++ = buf[0]; *q++ = buf[1];
X *q++ = buf[2]; *q++ = buf[3];
X
X if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
X
X return(p);
X}
X
X
X
X_access( name, flag )
Xchar *name;
Xint flag;
X{
X extern char *DirSepStr;
X char *p;
X int r;
X
X if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
X r = access( name, flag );
X p = name+strlen(name)-1;
X
X if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
X
X return( r );
X}
END_OF_FILE
if test 1782 -ne `wc -c <'dmake/msdos/bccdos/tempnam.c'`; then
echo shar: \"'dmake/msdos/bccdos/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/tempnam.c'
fi
if test -f 'dmake/msdos/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/config.mk'\"
else
echo shar: Extracting \"'dmake/msdos/config.mk'\" \(1880 characters\)
sed "s/^X//" >'dmake/msdos/config.mk' <<'END_OF_FILE'
X# This is an OS specific configuration file
X# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
X# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
X# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
X#
X
X# Memory model to compile for
X# set to s - small, m - medium, c - compact, l - large
X# Need large model now, dmake has grown up :-)
XMODEL = l
X
XSTARTUPFILE = $(OS)/startup.mk
X
XCPPFLAGS = $(CFLAGS)
XLDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
XLDARGS = $(LDHEAD) @$(LDTMPOBJ),$(TARGET),NUL.MAP$(LDTAIL)
XLDTAIL = $(_libs)$(LDFLAGS:s/ //)
X_libs = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
XLDTMPOBJ = $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
XLDTMPLIB = $(mktmp,,$(DIVFILE) $(LDLIBS:s,/,\\,:t"+\n")\n)
X
X# Debug flags
XDB_CFLAGS = -DDBUG
XDB_LDFLAGS =
XDB_LDLIBS =
X
X# NO Debug flags
XNDB_CFLAGS =
XNDB_LDFLAGS =
XNDB_LDLIBS =
X
X# Local configuration modifications for CFLAGS.
XCFLAGS += -I$(OS)
X
X# Common MSDOS source files.
X# Define SWAP to anything but 'y' for the swap code to be excluded on making.
X# Swapping for DOS versions is enabled by default.
X# Note: swapping is handled specially for ZTC in msdos/ztcdos/config.mk.
XSWAP *= y
X.IF $(OSRELEASE) != ztcdos
X .IF $(SWAP) == y
X SWP_SRC = find.c spawn.c
X ASRC += exec.asm
X .ELSE
X SWP_SRC = tee.c
X .END
X.ELSE
X SWP_SRC = tee.c
X.END
X
XOS_SRC += ruletab.c dirbrk.c runargv.c arlib.c _chdir.c switchar.c rmprq.c\
X $(SWP_SRC) dirlib.c
XUNIXSRC := dcache.c
XSRC += $(OS_SRC) $(UNIXSRC)
X.SETDIR=$(OS) : $(ASRC) $(OS_SRC)
X.SETDIR=unix : $(UNIXSRC)
X
X# Provide our own %$O : %$S rule.
X%$O : %$S
X $(AS) $(ASFLAGS) $(<:s,/,\,);
X mv $(@:f) $(OBJDIR)
X
X# Set source dirs so that we can find files named in this
X# config file.
X.SOURCE.h : $(OS)
X
X# See if we modify anything in the lower levels.
X.IF $(OSRELEASE) != $(NULL)
X .INCLUDE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 1880 -ne `wc -c <'dmake/msdos/config.mk'`; then
echo shar: \"'dmake/msdos/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/config.mk'
fi
if test -f 'dmake/msdos/dirbrk.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/dirbrk.c'\"
else
echo shar: Extracting \"'dmake/msdos/dirbrk.c'\" \(1801 characters\)
sed "s/^X//" >'dmake/msdos/dirbrk.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/dirbrk.c,v 1.1 1994/10/06 17:41:41 dvadura Exp $
X-- SYNOPSIS -- define the directory separator string.
X--
X-- DESCRIPTION
X-- Define this string for any character that may appear in a path name
X-- and can be used as a directory separator.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dirbrk.c,v $
X * Revision 1.1 1994/10/06 17:41:41 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X/* dos uses /, \, and : */
Xchar* DirBrkStr = "/\\:";
X
X/*
X** Return TRUE if the name is the full specification of a path name to a file
X** starting at the root of the file system, otherwise return FALSE
X*/
XPUBLIC int
XIf_root_path(name)
Xchar *name;
X{
X return( (strchr(DirBrkStr, *name) != NIL(char)) ||
X (isalpha(*name) && name[1] == ':') );
X}
END_OF_FILE
if test 1801 -ne `wc -c <'dmake/msdos/dirbrk.c'`; then
echo shar: \"'dmake/msdos/dirbrk.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/dirbrk.c'
fi
if test -f 'dmake/msdos/mscdos/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/tempnam.c'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/tempnam.c'\" \(1787 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include <dos.h>
X
X#if defined(max)
X# undef max
X#endif
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern char *mktemp();
Xextern int access();
Xint _access();
X
X/* MSC stdio.h defines P_tmpdir, so let's undo it here */
X/* Under DOS leave the default tmpdir pointing here! */
X#ifdef P_tmpdir
X#undef P_tmpdir
X#endif
Xstatic char *P_tmpdir = "";
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X static int count = 0;
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X char buf[30];
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
X if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
X if( _access( strcpy(p, P_tmpdir), 0) != 0 )
X if( !prefix )
X prefix = "tp";
X
X if(prefix)
X {
X *(p+strlen(p)+2) = '\0';
X (void)strncat(p, prefix, 2);
X }
X
X sprintf( buf, "%08x", _psp );
X buf[6]='\0';
X (void)strcat(p, buf );
X sprintf( buf, "%04d", count++ );
X q=p+strlen(p)-6;
X *q++ = buf[0]; *q++ = buf[1];
X *q++ = buf[2]; *q++ = buf[3];
X
X if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
X
X return(p);
X}
X
X
X
X_access( name, flag )
Xchar *name;
Xint flag;
X{
X extern char *DirSepStr;
X char *p;
X int r;
X
X if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
X r = access( name, flag );
X p = name+strlen(name)-1;
X if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
X
X return( r );
X}
END_OF_FILE
if test 1787 -ne `wc -c <'dmake/msdos/mscdos/tempnam.c'`; then
echo shar: \"'dmake/msdos/mscdos/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/tempnam.c'
fi
if test -f 'dmake/msdos/ruletab.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ruletab.c'\"
else
echo shar: Extracting \"'dmake/msdos/ruletab.c'\" \(2007 characters\)
sed "s/^X//" >'dmake/msdos/ruletab.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/ruletab.c,v 1.1 1994/10/06 17:41:48 dvadura Exp $
X * Revision 1.1 1994/10/06 17:41:48 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* These are control macros for dmake that MUST be defined at some point
X * if they are NOT dmake will not work! These are default definitions. They
X * may be overridden inside the .STARTUP makefile, they are here
X * strictly so that dmake can parse the STARTUP makefile */
X
X#include <stdio.h>
X
Xstatic char *_rules[] = {
X "MAXLINELENGTH := 2046",
X "MAXPROCESSLIMIT := 1",
X "MAXPROCESS := 1",
X ".IMPORT .IGNORE: ROOTDIR",
X ".MAKEFILES : makefile.mk makefile",
X ".SOURCE : .NULL",
X#include "startup.h"
X (char *)NULL };
X
Xchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
X
END_OF_FILE
if test 2007 -ne `wc -c <'dmake/msdos/ruletab.c'`; then
echo shar: \"'dmake/msdos/ruletab.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ruletab.c'
fi
if test -f 'dmake/msdos/tccdos/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/tempnam.c'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/tempnam.c'\" \(1757 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include <dos.h>
X
X#if defined(max)
X# undef max
X#endif
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern char *mktemp();
Xextern int access();
Xint _access();
X
X/* Turbo C stdio.h doesn't define P_tmpdir, so let's do it here */
X/* Under DOS leave the default tmpdir pointing here! */
Xstatic char *P_tmpdir = "";
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X static int count = 0;
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X char buf[30];
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
X if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
X if( _access( strcpy(p, P_tmpdir), 0) != 0 )
X if( !prefix )
X prefix = "tp";
X
X if(prefix)
X {
X *(p+strlen(p)+2) = '\0';
X (void)strncat(p, prefix, 2);
X }
X
X sprintf( buf, "%08x", _psp );
X buf[6]='\0';
X (void)strcat(p, buf );
X sprintf( buf, "%04d", count++ );
X q=p+strlen(p)-6;
X *q++ = buf[0]; *q++ = buf[1];
X *q++ = buf[2]; *q++ = buf[3];
X
X if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
X
X return(p);
X}
X
X
X
X_access( name, flag )
Xchar *name;
Xint flag;
X{
X extern char *DirSepStr;
X char *p;
X int r;
X
X if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
X r = access( name, flag );
X p = name+strlen(name)-1;
X if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
X
X return( r );
X}
END_OF_FILE
if test 1757 -ne `wc -c <'dmake/msdos/tccdos/tempnam.c'`; then
echo shar: \"'dmake/msdos/tccdos/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/tempnam.c'
fi
if test -f 'dmake/msdos/ztcdos/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/config.mk'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/config.mk'\" \(1990 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/config.mk' <<'END_OF_FILE'
X# This is the ZTC DOS configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
XTMPDIR :=
X.EXPORT : TMPDIR
X
X# Definition of macros for library, and C startup code.
X# Swapping for DOS versions is enabled by default. ZTC will automatically
X# perform swapping to XMS, EMS or disk by including _swapl.obj at link time.
X# To be most effective, _swapl.obj should be the first file linked so we
X# assign it to CSTARTUP if needed.
X.IF $(SWAP) == y
X CSTARTUP = _swapl.obj
X.END
X
X# The following sources are required for ZTC
X# The tempnam supplied with ZTC doesn't handle a NULL dir.
XOSR_SRC = tempnam.c environ.c
X.SETDIR=$(osrdir) : $(OSR_SRC)
X
XSRC += $(OSR_SRC)
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS
X# If you have a 286, you can use -2 or appropriate to get better code,
X# in that case uncomment the line below. (You can also simply set
X# it in the CL environment variable.)
X#CFLAGS += -2
XASFLAGS += -t -mx $(S_$(MODEL))
X
X# Redefine this, it isn't needed!
XLDTAIL = ;
X
X# Debugging libraries
XDB_LDFLAGS += -g
XDB_LDLIBS +=
X
X# NO Debug ZTC flags:
X#
X
XCFLAGS += -I$(osrdir) $(C_$(MODEL))
XCFLAGS += -DM_I86=1 -DMSDOS
XCFLAGS += -b # use large compiler
X#CFLAGS += -w # no warnings
XCFLAGS += -mi # integer only
XCFLAGS += -p # no auto-prototyping
XNDB_CFLAGS += -o
XDB_CFLAGS += -g
X
X# Redefine rule for making our objects, we don't need mv
X%$O : %.c ;% $(CC) -c $(CFLAGS) -o$@ $<
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
X
XC_s =
XC_m = -mM
XC_c = -mC
XC_l = -mL
X
XS_s = -Dmsmall
XS_m = -Dmmedium
XS_c = -Dmcompact
XS_l = -Dmlarge
END_OF_FILE
if test 1990 -ne `wc -c <'dmake/msdos/ztcdos/config.mk'`; then
echo shar: \"'dmake/msdos/ztcdos/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/config.mk'
fi
if test -f 'dmake/msdos/ztcdos/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/tempnam.c'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/tempnam.c'\" \(1771 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include <dos.h>
X
X#if defined(max)
X# undef max
X#endif
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern char *mktemp();
Xextern int access();
Xint _access();
X
X/* Zortech C stdio.h doesn't define P_tmpdir, so let's do it here */
X/* Under DOS leave the default tmpdir pointing here! */
Xstatic char *P_tmpdir = "";
X
Xchar *
Xtempnam(dir, prefix)
Xconst char *dir; /* use this directory please (if non-NULL) */
Xconst char *prefix; /* use this (if non-NULL) as filename prefix */
X{
X static int count = 0;
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X char buf[30];
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
X if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
X if( _access( strcpy(p, P_tmpdir), 0) != 0 )
X if( !prefix )
X prefix = "tp";
X
X if(prefix)
X {
X *(p+strlen(p)+2) = '\0';
X (void)strncat(p, prefix, 2);
X }
X
X sprintf( buf, "%08x", _psp );
X buf[6]='\0';
X (void)strcat(p, buf );
X sprintf( buf, "%04d", count++ );
X q=p+strlen(p)-6;
X *q++ = buf[0]; *q++ = buf[1];
X *q++ = buf[2]; *q++ = buf[3];
X
X if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
X
X return(p);
X}
X
X
X
X_access( name, flag )
Xchar *name;
Xint flag;
X{
X extern char *DirSepStr;
X char *p;
X int r;
X
X if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
X r = access( name, flag );
X p = name+strlen(name)-1;
X if(*p != '/' && *p != '\\') strcat( p, DirSepStr );
X
X return( r );
X}
END_OF_FILE
if test 1771 -ne `wc -c <'dmake/msdos/ztcdos/tempnam.c'`; then
echo shar: \"'dmake/msdos/ztcdos/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/tempnam.c'
fi
if test -f 'dmake/os2/ibm/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/tempnam.c'\"
else
echo shar: Extracting \"'dmake/os2/ibm/tempnam.c'\" \(1919 characters\)
sed "s/^X//" >'dmake/os2/ibm/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include <dos.h>
X
X#if defined(max)
X# undef max
X#endif
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern int access();
Xint _access();
X
X/* MSC stdio.h defines P_tmpdir, so let's undo it here */
X/* Under DOS leave the default tmpdir pointing here! */
X#ifdef P_tmpdir
X#undef P_tmpdir
X#endif
Xstatic char *P_tmpdir = "";
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X static int count = 0;
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X char buf[30];
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL )
X tl = strlen(tmpdir);
X else if( (tmpdir = getenv("TMP")) != NULL )
X tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
X if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
X if( _access( strcpy(p, P_tmpdir), 0) != 0 )
X if( !prefix )
X prefix = "tp";
X
X if(prefix)
X {
X *(p+strlen(p)+2) = '\0';
X (void)strncat(p, prefix, 2);
X }
X
X#ifdef OS2
X sprintf( buf, "%08x", getpid() );
X#else
X sprintf( buf, "%08x", _psp );
X#endif
X buf[6]='\0';
X (void)strcat(p, buf );
X sprintf( buf, "%04d", count++ );
X q=p+strlen(p)-6;
X *q++ = buf[0]; *q++ = buf[1];
X *q++ = buf[2]; *q++ = buf[3];
X
X if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
X
X return strlwr(p);
X}
X
X
X
X_access( name, flag )
Xchar *name;
Xint flag;
X{
X char *p;
X int r;
X
X if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
X p = name+strlen(name)-1;
X if(*p == ':' ) strcat( p++, "\\" );
X r = access( name, flag );
X if(*p != '/' && *p != '\\') strcat( p, "\\" );
X
X return( r );
X}
END_OF_FILE
if test 1919 -ne `wc -c <'dmake/os2/ibm/tempnam.c'`; then
echo shar: \"'dmake/os2/ibm/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/tempnam.c'
fi
if test -f 'dmake/os2/mscdos/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/tempnam.c'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/tempnam.c'\" \(1919 characters\)
sed "s/^X//" >'dmake/os2/mscdos/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include <dos.h>
X
X#if defined(max)
X# undef max
X#endif
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern int access();
Xint _access();
X
X/* MSC stdio.h defines P_tmpdir, so let's undo it here */
X/* Under DOS leave the default tmpdir pointing here! */
X#ifdef P_tmpdir
X#undef P_tmpdir
X#endif
Xstatic char *P_tmpdir = "";
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X static int count = 0;
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X char buf[30];
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL )
X tl = strlen(tmpdir);
X else if( (tmpdir = getenv("TMP")) != NULL )
X tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (_access( strcpy(p, tmpdir), 0) != 0) )
X if( (dl == 0) || (_access( strcpy(p, dir), 0) != 0) )
X if( _access( strcpy(p, P_tmpdir), 0) != 0 )
X if( !prefix )
X prefix = "tp";
X
X if(prefix)
X {
X *(p+strlen(p)+2) = '\0';
X (void)strncat(p, prefix, 2);
X }
X
X#ifdef OS2
X sprintf( buf, "%08x", getpid() );
X#else
X sprintf( buf, "%08x", _psp );
X#endif
X buf[6]='\0';
X (void)strcat(p, buf );
X sprintf( buf, "%04d", count++ );
X q=p+strlen(p)-6;
X *q++ = buf[0]; *q++ = buf[1];
X *q++ = buf[2]; *q++ = buf[3];
X
X if( (q = strrchr(p,'.')) != NULL ) *q = '\0';
X
X return strlwr(p);
X}
X
X
X
X_access( name, flag )
Xchar *name;
Xint flag;
X{
X char *p;
X int r;
X
X if( name == NULL || !*name ) return(1); /* NULL dir means current dir */
X p = name+strlen(name)-1;
X if(*p == ':' ) strcat( p++, "\\" );
X r = access( name, flag );
X if(*p != '/' && *p != '\\') strcat( p, "\\" );
X
X return( r );
X}
END_OF_FILE
if test 1919 -ne `wc -c <'dmake/os2/mscdos/tempnam.c'`; then
echo shar: \"'dmake/os2/mscdos/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/tempnam.c'
fi
if test -f 'dmake/posix.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/posix.h'\"
else
echo shar: Extracting \"'dmake/posix.h'\" \(2093 characters\)
sed "s/^X//" >'dmake/posix.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/posix.h,v 1.1 1994/10/06 17:42:53 dvadura Exp $
X-- SYNOPSIS -- Definition for POSIX conforming defines in dmake.
X--
X-- DESCRIPTION
X-- This file is intended to make certain that defines used within dmake
X-- for file name lengths, and number of children processes are defined.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: posix.h,v $
X * Revision 1.1 1994/10/06 17:42:53 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* Define the minimum values that each system requires, and do so only if
X * we have not defined these includes elsewhere. These should already be
X * defined in <limits.h> if you have a C compiler that is POSIX compliant.
X */
X#ifndef _POSIX_NAME_MAX
X#define _POSIX_NAME_MAX 14
X#endif
X
X#ifndef _POSIX_PATH_MAX
X#define _POSIX_PATH_MAX 64
X#endif
X
X#ifndef _POSIX_CHILD_MAX
X#define _POSIX_CHILD_MAX 1
X#endif
X
X/* Now define the actual manifests used in the code. */
X#ifndef NAME_MAX
X#define NAME_MAX _POSIX_NAME_MAX
X#endif
X
X#ifndef PATH_MAX
X#define PATH_MAX _POSIX_PATH_MAX
X#endif
X
X#ifndef CHILD_MAX
X#define CHILD_MAX _POSIX_CHILD_MAX
X#endif
END_OF_FILE
if test 2093 -ne `wc -c <'dmake/posix.h'`; then
echo shar: \"'dmake/posix.h'\" unpacked with wrong size!
fi
# end of 'dmake/posix.h'
fi
if test -f 'dmake/qnx/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/make.sh'\"
else
echo shar: Extracting \"'dmake/qnx/make.sh'\" \(1950 characters\)
sed "s/^X//" >'dmake/qnx/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xcc -c -I. -Iqnx -ml -O infer.c
Xmv infer.o objects
Xcc -c -I. -Iqnx -ml -O make.c
Xmv make.o objects
Xcc -c -I. -Iqnx -ml -O stat.c
Xmv stat.o objects
Xcc -c -I. -Iqnx -ml -O expand.c
Xmv expand.o objects
Xcc -c -I. -Iqnx -ml -O dmstring.c
Xmv dmstring.o objects
Xcc -c -I. -Iqnx -ml -O hash.c
Xmv hash.o objects
Xcc -c -I. -Iqnx -ml -O dag.c
Xmv dag.o objects
Xcc -c -I. -Iqnx -ml -O dmake.c
Xmv dmake.o objects
Xcc -c -I. -Iqnx -ml -O path.c
Xmv path.o objects
Xcc -c -I. -Iqnx -ml -O imacs.c
Xmv imacs.o objects
Xcc -c -I. -Iqnx -ml -O sysintf.c
Xmv sysintf.o objects
Xcc -c -I. -Iqnx -ml -O parse.c
Xmv parse.o objects
Xcc -c -I. -Iqnx -ml -O getinp.c
Xmv getinp.o objects
Xcc -c -I. -Iqnx -ml -O quit.c
Xmv quit.o objects
Xcc -c -I. -Iqnx -ml -O state.c
Xmv state.o objects
Xcc -c -I. -Iqnx -ml -O dmdump.c
Xmv dmdump.o objects
Xcc -c -I. -Iqnx -ml -O macparse.c
Xmv macparse.o objects
Xcc -c -I. -Iqnx -ml -O rulparse.c
Xmv rulparse.o objects
Xcc -c -I. -Iqnx -ml -O percent.c
Xmv percent.o objects
Xcc -c -I. -Iqnx -ml -O function.c
Xmv function.o objects
Xcc -c -I. -Iqnx -ml -O qnx/ruletab.c
Xmv ruletab.o objects
Xcc -c -I. -Iqnx -ml -O qnx/runargv.c
Xmv runargv.o objects
Xcc -c -I. -Iqnx -ml -O qnx/tempnam.c
Xmv tempnam.o objects
Xcc -c -I. -Iqnx -ml -O unix/dcache.c
Xmv dcache.o objects
Xcc -c -I. -Iqnx -ml -O unix/rmprq.c
Xmv rmprq.o objects
Xcc -c -I. -Iqnx -ml -O unix/dirbrk.c
Xmv dirbrk.o objects
Xcc -c -I. -Iqnx -ml -O msdos/arlib.c
Xmv arlib.o objects
Xcc -N 8192 -o dmake objects/infer.o objects/make.o objects/stat.o \
Xobjects/expand.o objects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o \
Xobjects/path.o objects/imacs.o objects/sysintf.o objects/parse.o \
Xobjects/getinp.o objects/quit.o objects/state.o objects/dmdump.o \
Xobjects/macparse.o objects/rulparse.o objects/percent.o objects/function.o \
Xobjects/ruletab.o objects/runargv.o objects/tempnam.o objects/dcache.o objects/rmprq.o objects/dirbrk.o objects/arlib.o
Xcp qnx/startup.mk startup.mk
END_OF_FILE
if test 1950 -ne `wc -c <'dmake/qnx/make.sh'`; then
echo shar: \"'dmake/qnx/make.sh'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/make.sh'
fi
if test -f 'dmake/qnx/ruletab.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/ruletab.c'\"
else
echo shar: Extracting \"'dmake/qnx/ruletab.c'\" \(1963 characters\)
sed "s/^X//" >'dmake/qnx/ruletab.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/qnx/RCS/ruletab.c,v 1.1 1994/10/06 17:43:22 dvadura Exp $
Xstatic char *_rules[] = {
X "MAXPROCESSLIMIT := 10",
X "MAXLINELENGTH := 8190",
X ".IMPORT .IGNORE: ROOTDIR",
X ".MAKEFILES : makefile.mk Makefile makefile",
X ".SOURCE : .NULL",
X#include "startup.h"
X 0 };
X
Xchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
END_OF_FILE
if test 1963 -ne `wc -c <'dmake/qnx/ruletab.c'`; then
echo shar: \"'dmake/qnx/ruletab.c'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/ruletab.c'
fi
if test -f 'dmake/stdmacs.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/stdmacs.h'\"
else
echo shar: Extracting \"'dmake/stdmacs.h'\" \(1997 characters\)
sed "s/^X//" >'dmake/stdmacs.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/stdmacs.h,v 1.1 1994/10/06 17:42:51 dvadura Exp $
X-- SYNOPSIS -- general use macros.
X--
X-- DESCRIPTION
X-- ANSI macro relies on the fact that it can be replaced by (), or by
X-- its value, where the value is one value due to the preprocessors
X-- handling of arguments that are surrounded by ()'s as a single
X-- argument.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: stdmacs.h,v $
X * Revision 1.1 1994/10/06 17:42:51 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#ifndef MACROS_h
X#define MACROS_h
X
X/* stupid AIX and Mac MPW define __STDC__ as special, but defined(__STDC__) is false, and
X * it's value is nothing */
X#if !defined(__STDC__) && !defined(_AIX) && !defined(_MPW)
X#define __STDC__ 0
X#endif
X
X#if __STDC__ || defined(__TURBOC__)
X#define ANSI(x) x
X#else
X#define ANSI(x) ()
X#endif
X
X#define NIL(p) ((p*)NULL)
X
X#if !defined(atarist)
X#define offsetof(type,id) ((size_t)&((type*)NULL)->id)
X#endif
X
X#define FALSE 0
X#define TRUE 1
X
X#define PUBLIC
X
X#endif
X
END_OF_FILE
if test 1997 -ne `wc -c <'dmake/stdmacs.h'`; then
echo shar: \"'dmake/stdmacs.h'\" unpacked with wrong size!
fi
# end of 'dmake/stdmacs.h'
fi
if test -f 'dmake/tos/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/config.h'\"
else
echo shar: Extracting \"'dmake/tos/config.h'\" \(2045 characters\)
sed "s/^X//" >'dmake/tos/config.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/tos/RCS/config.h,v 1.1 1994/10/06 17:41:32 dvadura Exp $
X * Revision 1.1 1994/10/06 17:41:32 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <osbind.h>
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() Malloc(-1L)
X
X/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
Xextern char *getcwd ANSI((char *, int));
X
X/* Don't need the const decl */
X#define CONST
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 2045 -ne `wc -c <'dmake/tos/config.h'`; then
echo shar: \"'dmake/tos/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/tos/config.h'
fi
if test -f 'dmake/tos/dirbrk.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/dirbrk.c'\"
else
echo shar: Extracting \"'dmake/tos/dirbrk.c'\" \(1906 characters\)
sed "s/^X//" >'dmake/tos/dirbrk.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/tos/RCS/dirbrk.c,v 1.1 1994/10/06 17:41:29 dvadura Exp $
X-- SYNOPSIS -- define the directory separator string.
X--
X-- DESCRIPTION
X-- Define this string for any character that may appear in a path name
X-- and can be used as a directory separator. Also provide a function
X-- to indicate if a given path begins at the root of the file system.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dirbrk.c,v $
X * Revision 1.1 1994/10/06 17:41:29 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X#include <ctype.h>
X
X/* tos uses /, \, and : */
Xchar* DirBrkStr = "/\\:";
X
X/*
X** Return TRUE if the name is the full specification of a path name to a file
X** starting at the root of the file system, otherwise return FALSE
X*/
Xint
XIf_root_path(name)
Xchar *name;
X{
X return( (strchr(DirBrkStr, *name) != NIL(char)) ||
X (isalpha(*name) && name[1] == ':') );
X}
END_OF_FILE
if test 1906 -ne `wc -c <'dmake/tos/dirbrk.c'`; then
echo shar: \"'dmake/tos/dirbrk.c'\" unpacked with wrong size!
fi
# end of 'dmake/tos/dirbrk.c'
fi
if test -f 'dmake/tos/ruletab.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/ruletab.c'\"
else
echo shar: Extracting \"'dmake/tos/ruletab.c'\" \(1982 characters\)
sed "s/^X//" >'dmake/tos/ruletab.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/tos/RCS/ruletab.c,v 1.1 1994/10/06 17:41:30 dvadura Exp $
X * Revision 1.1 1994/10/06 17:41:30 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* These are control macros for dmake that MUST be defined at some point
X * if they are NOT dmake will not work! These are default definitions. They
X * may be overridden inside the .STARTUP makefile, they are here
X * strictly so that dmake can parse the STARTUP makefile */
X
Xstatic char *_rules[] = {
X "MAXPROCESSLIMIT := 1",
X "MAXPROCESS := 1",
X "MAXLINELENGTH := 8190",
X ".IMPORT .IGNORE: ROOTDIR",
X ".MAKEFILES : makefile.mk Makefile makefile",
X ".SOURCE : .NULL",
X#include "startup.h"
X 0 };
X
Xchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
END_OF_FILE
if test 1982 -ne `wc -c <'dmake/tos/ruletab.c'`; then
echo shar: \"'dmake/tos/ruletab.c'\" unpacked with wrong size!
fi
# end of 'dmake/tos/ruletab.c'
fi
if test -f 'dmake/unix/coherent/config.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/config.h'\"
else
echo shar: Extracting \"'dmake/unix/coherent/config.h'\" \(1985 characters\)
sed "s/^X//" >'dmake/unix/coherent/config.h' <<'END_OF_FILE'
X/*
X-- COHERENT config.h
X * Revision 1.1 1994/10/06 17:42:26 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* define this for configurations that don't have the coreleft function
X * so that the code compiles. To my knowledge coreleft exists only on
X * Turbo C, but it is needed here since the function is used in many debug
X * macros. */
X#define coreleft() 0L
X
Xextern char *getcwd ();
X
X/* Define setvbuf, SysV doesn't have one */
X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
X#define tzset settz
X
X/* We don't care about CONST */
X#define CONST
X#define void int
Xtypedef paddr_t off_t;
X
X/* options. . . */
X#define ASCARCH 0
X
X/* a small problem with pointer to voids on some unix machines needs this */
X#define PVOID void *
END_OF_FILE
if test 1985 -ne `wc -c <'dmake/unix/coherent/config.h'`; then
echo shar: \"'dmake/unix/coherent/config.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/config.h'
fi
if test -f 'dmake/unix/dirbrk.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/dirbrk.c'\"
else
echo shar: Extracting \"'dmake/unix/dirbrk.c'\" \(1837 characters\)
sed "s/^X//" >'dmake/unix/dirbrk.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/RCS/dirbrk.c,v 1.1 1994/10/06 17:42:18 dvadura Exp $
X-- SYNOPSIS -- define the directory separator string.
X--
X-- DESCRIPTION
X-- Define this string for any character that may appear in a path name
X-- and can be used as a directory separator. Also provide a function
X-- to indicate if a given path begins at the root of the file system.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: dirbrk.c,v $
X * Revision 1.1 1994/10/06 17:42:18 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X/* Unix only uses / */
Xchar* DirBrkStr = "/";
X
X/*
X** Return TRUE if the name is the full specification of a path name to a file
X** starting at the root of the file system, otherwise return FALSE
X*/
XPUBLIC int
XIf_root_path(name)
Xchar *name;
X{
X return( strchr(DirBrkStr, *name) != NIL(char) );
X}
END_OF_FILE
if test 1837 -ne `wc -c <'dmake/unix/dirbrk.c'`; then
echo shar: \"'dmake/unix/dirbrk.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/dirbrk.c'
fi
if test -f 'dmake/unix/ruletab.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/ruletab.c'\"
else
echo shar: Extracting \"'dmake/unix/ruletab.c'\" \(1964 characters\)
sed "s/^X//" >'dmake/unix/ruletab.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/RCS/ruletab.c,v 1.1 1994/10/06 17:42:19 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:19 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X/* These are control macros for dmake that MUST be defined at some point
X * if they are NOT dmake will not work! These are default definitions. They
X * may be overridden inside the .STARTUP makefile, they are here
X * strictly so that dmake can parse the STARTUP makefile */
X
Xstatic char *_rules[] = {
X "MAXPROCESSLIMIT := 10",
X "MAXLINELENGTH := 8190",
X ".IMPORT .IGNORE: ROOTDIR",
X ".MAKEFILES : makefile.mk Makefile makefile",
X ".SOURCE : .NULL",
X#include "startup.h"
X 0 };
X
Xchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
END_OF_FILE
if test 1964 -ne `wc -c <'dmake/unix/ruletab.c'`; then
echo shar: \"'dmake/unix/ruletab.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/ruletab.c'
fi
if test -f 'dmake/unix/sysvr4/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr4/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr4/stdarg.h'\" \(932 characters\)
sed "s/^X//" >'dmake/unix/sysvr4/stdarg.h' <<'END_OF_FILE'
X/* Some V.4 systems aren't ansi, just to make matters ugly.
X If the dmake sources used another name for this include file,
X then this wouldn't be quite so awful. */
X#if defined(__STDC__) || defined(_VA_LIST)
X#include </usr/include/stdarg.h>
X#ifdef va_dcl
X#undef va_dcl
X#endif
X#define va_dcl int va_alist
X#else
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
Xtypedef char *va_list;
X
X#if defined(sparc)
X# define va_alist __builtin_va_alist
X#endif
X# define va_start(list,v) list = (char *)&va_alist
X# define va_end(list) list = NULL
X#if defined(mips)
X#define va_arg(list, mode) ((mode *)(list = \
X (char *) (sizeof(mode) > 4 ? ((int)list + 2*8 - 1) & -8 \
X : ((int)list + 2*4 - 1) & -4)))[-1]
X#else
X# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
X#endif
X
X#ifndef va_dcl
X# define va_dcl int va_alist
X#endif
X#endif
X
END_OF_FILE
if test 932 -ne `wc -c <'dmake/unix/sysvr4/stdarg.h'`; then
echo shar: \"'dmake/unix/sysvr4/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr4/stdarg.h'
fi
echo shar: End of archive 24 \(of 27\).
cp /dev/null ark24isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/dbug/malloc/makefile dmake/dbug/malloc/tostring.h
# dmake/itypes.h dmake/mac/dirbrk.c dmake/mac/rmprq.c
# dmake/msdos/bccdos/config.mk dmake/msdos/bccdos/utime.c
# dmake/msdos/dirent.h dmake/msdos/rmprq.c dmake/msdos/switchar.c
# dmake/msdos/tccdos/config.mk dmake/msdos/tccdos/utime.c
# dmake/msdos/tee.c dmake/os2/_chdir.c dmake/os2/config.mk
# dmake/os2/switchar.c dmake/qnx/config.mk dmake/qnx/tempnam.c
# dmake/readme/atari.tos dmake/readme/readme.1st dmake/tos/config.mk
# dmake/tos/make.sh dmake/tos/rmprq.c dmake/tos/tempnam.c
# dmake/unix/386ix/config.mk dmake/unix/bsd43/config.mk
# dmake/unix/bsd43/setvbuf.c dmake/unix/bsd43/tempnam.c
# dmake/unix/bsd43/utime.c dmake/unix/bsd43/vf/ctype.h
# dmake/unix/bsd43/vf/vfprintf.c dmake/unix/coherent/config.mk
# dmake/unix/config.mk dmake/unix/solaris/config.mk
# dmake/unix/solaris/tempnam.c dmake/unix/sysvr1/config.mk
# dmake/unix/sysvr3/config.mk dmake/unix/sysvr4/config.mk
# dmake/unix/xenix/config.mk
# Wrapped by kent@sparky on Fri Oct 21 16:50:56 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 25 (of 27)."'
if test -f 'dmake/dbug/malloc/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/makefile'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/makefile'\" \(1442 characters\)
sed "s/^X//" >'dmake/dbug/malloc/makefile' <<'END_OF_FILE'
X#
X# (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X# You may copy, distribute, and use this software as long as this
X# copyright statement is not removed.
X#
X#
X# This is the Makefile for the malloc debugging library
X#
X# $Id: Makefile,v 1.5 90/08/29 22:34:27 cpcahil Exp $
X#
XCC=cc
X# for System V systems use this CFLAGS
X#CFLAGS=-g -DSYS5
X# else for BSD use:
X#CFLAGS=-g
XLINT=lint
XSHARCMD=shar -o mallocshar -l50 -x -a -n Malloclib
XSHELL=/bin/sh
X
XLIB=libmalloc.a
X
XSRCS= malloc.c \
X free.c \
X realloc.c \
X calloc.c \
X string.c \
X mlc_chk.c \
X mlc_chn.c \
X memory.c \
X tostring.c \
X m_perror.c \
X m_init.c \
X mallopt.c \
X dump.c
X
XOBJS= malloc.o \
X free.o \
X realloc.o \
X calloc.o \
X string.o \
X mlc_chk.o \
X mlc_chn.o \
X memory.o \
X tostring.o \
X m_perror.o \
X m_init.o \
X mallopt.o \
X dump.o
X
XTESTS=testmlc testmem
X
Xall: $(LIB) $(TESTS)
X
Xclean:
X rm -f $(TESTS) pgm $(LIB) *.o *.ln
X
Xsharfile:
X $(SHARCMD) Makefile README patchlevel *.[ch3]
X
X$(LIB): $(OBJS)
X ar ru $(LIB) $(OBJS)
X -if test -s /bin/ranlib; then /bin/ranlib $(LIB); else exit 0; fi
X -if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(LIB); else exit 0; fi
X
Xtestmlc: $(LIB) testmlc.o
X $(CC) -o $@ testmlc.o $(LIB)
X
Xtestmem: $(LIB) testmem.o
X $(CC) -o $@ testmem.o $(LIB)
X
Xlint:
X $(LINT) $(CFLAGS) $(SRCS) testmlc.c testmem.c
X
X
X$(OBJS): malloc.h
X
Xtostring.o malloc.o dump.o: tostring.h
END_OF_FILE
if test 1442 -ne `wc -c <'dmake/dbug/malloc/makefile'`; then
echo shar: \"'dmake/dbug/malloc/makefile'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/malloc/makefile'
# end of 'dmake/dbug/malloc/makefile'
fi
if test -f 'dmake/dbug/malloc/tostring.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/tostring.h'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/tostring.h'\" \(776 characters\)
sed "s/^X//" >'dmake/dbug/malloc/tostring.h' <<'END_OF_FILE'
X/*
X * (c) Copyright 1990 Conor P. Cahill (uunet!virtech!cpcahil).
X * You may copy, distribute, and use this software as long as this
X * copyright statement is not removed.
X */
X/*
X * $Id: tostring.h,v 1.1 1994/10/06 17:43:20 dvadura Exp $
X */
X#define B_BIN 2
X#define B_DEC 10
X#define B_HEX 16
X#define B_OCTAL 8
X
X/*
X * $Log: tostring.h,v $
X * Revision 1.1 1994/10/06 17:43:20 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1994/10/06 03:45:30 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X * Revision 1.1 1992/01/24 03:29:17 dvadura
X * dmake Version 3.8, Initial revision
X *
X * Revision 1.2 90/05/11 00:13:11 cpcahil
X * added copyright statment
X *
X * Revision 1.1 90/02/23 07:09:05 cpcahil
X * Initial revision
X *
X */
END_OF_FILE
if test 776 -ne `wc -c <'dmake/dbug/malloc/tostring.h'`; then
echo shar: \"'dmake/dbug/malloc/tostring.h'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/malloc/tostring.h'
fi
if test -f 'dmake/itypes.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/itypes.h'\"
else
echo shar: Extracting \"'dmake/itypes.h'\" \(1834 characters\)
sed "s/^X//" >'dmake/itypes.h' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/RCS/itypes.h,v 1.1 1994/10/06 17:42:53 dvadura Exp $
X-- SYNOPSIS -- type declarations for common types
X--
X-- DESCRIPTION
X-- portable type declarations.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: itypes.h,v $
X * Revision 1.1 1994/10/06 17:42:53 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X
X#ifndef ITYPES_h
X#define ITYPES_h
X
X#if defined(M_I86) || defined(MC68000)
Xtypedef char int8; /* typedefs for right size ints */
Xtypedef int int16;
Xtypedef long int32;
Xtypedef unsigned char uint8;
Xtypedef unsigned int uint16;
Xtypedef unsigned long uint32;
X#else
Xtypedef char int8; /* typedefs for right size ints */
Xtypedef short int16;
Xtypedef long int32;
Xtypedef unsigned char uint8;
Xtypedef unsigned short uint16;
Xtypedef unsigned long uint32;
X#endif
X
X#endif
X
END_OF_FILE
if test 1834 -ne `wc -c <'dmake/itypes.h'`; then
echo shar: \"'dmake/itypes.h'\" unpacked with wrong size!
fi
# end of 'dmake/itypes.h'
fi
if test -f 'dmake/mac/dirbrk.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/dirbrk.c'\"
else
echo shar: Extracting \"'dmake/mac/dirbrk.c'\" \(1803 characters\)
sed "s/^X//" >'dmake/mac/dirbrk.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/dirbrk.c,v 1.1 1994/10/06 17:42:56 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:56 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
X/* mac only uses ':' */
Xchar* DirBrkStr = ":";
X
X/*
X** Return TRUE if the name is the full specification of a path name to a file
X** starting at the root of the file system, otherwise return FALSE
X*/
XPUBLIC int
XIf_root_path(name)
Xchar *name;
X{
X name = Unix2MacFName (name);
X return( (strchr(name, ':') != NIL(char)) &&
X (name[0] != ':') );
X}
END_OF_FILE
if test 1803 -ne `wc -c <'dmake/mac/dirbrk.c'`; then
echo shar: \"'dmake/mac/dirbrk.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/dirbrk.c'
fi
if test -f 'dmake/mac/rmprq.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/rmprq.c'\"
else
echo shar: Extracting \"'dmake/mac/rmprq.c'\" \(1657 characters\)
sed "s/^X//" >'dmake/mac/rmprq.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/rmprq.c,v 1.1 1994/10/06 17:43:00 dvadura Exp $
X-- SYNOPSIS -- remove prerequisites code.
X--
X-- DESCRIPTION
X-- This code is different for The Mac and for UNIX and parallel make
X-- architectures since the parallel case requires the rm's to be
X-- run in parallel, whereas The Mac guarantees to run them sequentially.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: rmprq.c,v $
X * Revision 1.1 1994/10/06 17:43:00 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC void
XRemove_prq( tcp )
XCELLPTR tcp;
X{
X tcp->ce_flag &= ~(F_MADE|F_VISITED);
X tcp->ce_time = 0L;
X
X Make( tcp, tcp );
X}
END_OF_FILE
if test 1657 -ne `wc -c <'dmake/mac/rmprq.c'`; then
echo shar: \"'dmake/mac/rmprq.c'\" unpacked with wrong size!
fi
# end of 'dmake/mac/rmprq.c'
fi
if test -f 'dmake/msdos/bccdos/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/config.mk'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/config.mk'\" \(1400 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/config.mk' <<'END_OF_FILE'
X# This is the Turbo C++ 2.0 DOS configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# Definition of macros for library, and C startup code.
XLDLIBS = d:/cc/bcc/lib/c$(MODEL)
XCSTARTUP = d:/cc/bcc/lib/c0$(MODEL).obj
X
X# The following sources are required for TURBO C++ 2.0
XOSR_SRC = tempnam.c utime.c
X.SETDIR=$(osrdir) : $(OSR_SRC)
X
XSRC += $(OSR_SRC)
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS. Make sure your turboc.cfg
X# file contains a -D__STDC__=1 and -DM_I86=1, if not then uncomment the line
X# below!
X#CFLAGS += -DM_I86=1 -D__STDC__=1
X
X# You can get a smaller executable still, buy adding a -1 to the list of
X# flags below, but then you can't run this on an 8086/88 cpu.
X#CFLAGS += -1
XCFLAGS += -I$(osrdir) -d -O -N- -w-nod $(C_$(MODEL))
XASFLAGS += -t -mx $(S_$(MODEL))
X
X# Debugging information for Turbo-C
XDB_CFLAGS += -v
XDB_LDFLAGS += /v
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
X
XC_s =
XC_m = -mm
XC_c = -mc
XC_l = -ml
X
XS_s = -dmsmall
XS_m = -dmmedium
XS_c = -dmcompact
XS_l = -dmlarge
END_OF_FILE
if test 1400 -ne `wc -c <'dmake/msdos/bccdos/config.mk'`; then
echo shar: \"'dmake/msdos/bccdos/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/config.mk'
fi
if test -f 'dmake/msdos/bccdos/utime.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/utime.c'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/utime.c'\" \(767 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/utime.c' <<'END_OF_FILE'
X/*
X** change access and modify times of file
X*/
X#include <sys/stat.h>
X#include <fcntl.h>
X#include <time.h>
X
Xint
Xutime(name, timep)/*
X====================
X Broken for turbo C it only sets the file time to the current time by
X touching a character in the file */
Xchar* name;
Xtime_t timep[2];
X{
X struct stat buf;
X int fil;
X char data;
X
X if (stat(name, &buf) != 0)
X return (-1);
X if (buf.st_size != 0) {
X if ((fil = open(name, O_RDWR, S_IWRITE)) < 0)
X return (-1);
X if (read(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X lseek(fil, 0L, 0);
X if (write(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X close(fil);
X return (0);
X } else if ((fil = creat(name, S_IWRITE)) < 0) {
X return (-1);
X } else {
X close(fil);
X return (0);
X }
X}
END_OF_FILE
if test 767 -ne `wc -c <'dmake/msdos/bccdos/utime.c'`; then
echo shar: \"'dmake/msdos/bccdos/utime.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/utime.c'
fi
if test -f 'dmake/msdos/dirent.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/dirent.h'\"
else
echo shar: Extracting \"'dmake/msdos/dirent.h'\" \(876 characters\)
sed "s/^X//" >'dmake/msdos/dirent.h' <<'END_OF_FILE'
X/* DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89 */
X
X#ifndef _DIRLIB_h_
X#define _DIRLIB_h_
X
X#include <stdio.h>
X#include "stdmacs.h"
X#include "dosdta.h"
X
X#define MAXNAMLEN 15
X
Xstruct dirent {
X long d_ino;
X unsigned short d_reclen;
X unsigned short d_namlen;
X char d_name[MAXNAMLEN+1];
X};
X
Xtypedef struct {
X DTA dd_dta; /* disk transfer area for this dir. */
X short dd_stat; /* status return from last lookup */
X char dd_name[1]; /* full name of file -- struct is extended */
X} DIR;
X
Xextern DIR *opendir ANSI((char *));
Xextern struct dirent *readdir ANSI((DIR *));
Xextern long telldir ANSI((DIR *));
Xextern void seekdir ANSI((DIR *, long));
Xextern void closedir ANSI((DIR *));
X
X#define rewinddir(dirp) seekdir(dirp,0L)
X#endif
END_OF_FILE
if test 876 -ne `wc -c <'dmake/msdos/dirent.h'`; then
echo shar: \"'dmake/msdos/dirent.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/dirent.h'
fi
if test -f 'dmake/msdos/rmprq.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/rmprq.c'\"
else
echo shar: Extracting \"'dmake/msdos/rmprq.c'\" \(1649 characters\)
sed "s/^X//" >'dmake/msdos/rmprq.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/rmprq.c,v 1.1 1994/10/06 17:41:42 dvadura Exp $
X-- SYNOPSIS -- remove prerequisites code.
X--
X-- DESCRIPTION
X-- This code is different for DOS and for UNIX and parallel make
X-- architectures since the parallel case requires the rm's to be
X-- run in parallel, whereas DOS guarantees to run them sequentially.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: rmprq.c,v $
X * Revision 1.1 1994/10/06 17:41:42 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC void
XRemove_prq( tcp )
XCELLPTR tcp;
X{
X tcp->ce_flag &= ~(F_MADE|F_VISITED);
X tcp->ce_time = 0L;
X
X Make( tcp, tcp );
X}
END_OF_FILE
if test 1649 -ne `wc -c <'dmake/msdos/rmprq.c'`; then
echo shar: \"'dmake/msdos/rmprq.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/rmprq.c'
fi
if test -f 'dmake/msdos/switchar.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/switchar.c'\"
else
echo shar: Extracting \"'dmake/msdos/switchar.c'\" \(926 characters\)
sed "s/^X//" >'dmake/msdos/switchar.c' <<'END_OF_FILE'
X/*
X** return switch char
X*/
X#if defined(OS2) || defined(_MSC_VER)
X#include <stdlib.h>
X#endif
X#if !defined(OS2)
X#include <dos.h>
X#endif /* !OS2 */
X#include <stdio.h>
X#include "stdmacs.h"
X
Xgetswitchar()/*
X===============
X Try the environment first. If you don't find SWITCHAR there, then use
X the DOS call. The call is undocumented, and doesn't work for DOS versions
X 4.0 and up, so the check of the environment will fix that. */
X{
X#if defined(__MSDOS__) || defined(M_I86)
X#if !defined(OS2)
X union REGS rg;
X#endif /* ! OS2 */
X static char *_env_switchar = NIL(char);
X
X if( _env_switchar != NIL(char) ||
X (_env_switchar = (char *)getenv("SWITCHAR")) != NIL(char) )
X return(*_env_switchar);
X
X#if !defined(OS2)
X rg.h.ah = 0x37; /* switch char request */
X rg.h.al = 0; /* get (not set) */
X
X intdos(&rg, &rg);
X return (rg.h.dl);
X#endif /* ! OS2 */
X#endif /* M_I86 */
X
X return ('-');
X}
END_OF_FILE
if test 926 -ne `wc -c <'dmake/msdos/switchar.c'`; then
echo shar: \"'dmake/msdos/switchar.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/switchar.c'
fi
if test -f 'dmake/msdos/tccdos/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/config.mk'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/config.mk'\" \(1514 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/config.mk' <<'END_OF_FILE'
X# This is the Turbo C 2.0 DOS configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# Definition of macros for library, and C startup code.
XLDLIBS = d:/cc/tcc/lib/c$(MODEL)
XCSTARTUP = d:/cc/tcc/lib/c0$(MODEL).obj
X
X# The following sources are required for TURBO C 2.0
XOSR_SRC = tempnam.c utime.c
X.SETDIR=$(osrdir) : $(OSR_SRC)
X
XSRC += $(OSR_SRC)
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS. Make sure your turboc.cfg
X# file contains a -D__STDC__=1 and -DM_I86=1, if not then uncomment the line
X# below!
X#CFLAGS += -DM_I86=1 -D__STDC__=1
X
X# You can get a smaller executable still, buy adding a -1 to the list of
X# flags below, but then you can't run this on an 8086/88 cpu.
X#CFLAGS += -1
X#CFLAGS += -I$(osrdir) -f- -d -O -N- -w-nod $(C_$(MODEL))
XCFLAGS += -I$(osrdir) -f- -d -O -N -w-nod $(C_$(MODEL))
XASFLAGS += -t -mx $(S_$(MODEL))
X
X# Debugging information for Turbo-C
XDB_CFLAGS += -v
XDB_LDFLAGS += /v
X
X# Case of identifiers is significant
XNDB_LDFLAGS += /c
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
X
XC_s =
XC_m = -mm
XC_c = -mc
XC_l = -ml
X
XS_s = -dmsmall
XS_m = -dmmedium
XS_c = -dmcompact
XS_l = -dmlarge
END_OF_FILE
if test 1514 -ne `wc -c <'dmake/msdos/tccdos/config.mk'`; then
echo shar: \"'dmake/msdos/tccdos/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/config.mk'
fi
if test -f 'dmake/msdos/tccdos/utime.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/utime.c'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/utime.c'\" \(767 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/utime.c' <<'END_OF_FILE'
X/*
X** change access and modify times of file
X*/
X#include <sys/stat.h>
X#include <fcntl.h>
X#include <time.h>
X
Xint
Xutime(name, timep)/*
X====================
X Broken for turbo C it only sets the file time to the current time by
X touching a character in the file */
Xchar* name;
Xtime_t timep[2];
X{
X struct stat buf;
X int fil;
X char data;
X
X if (stat(name, &buf) != 0)
X return (-1);
X if (buf.st_size != 0) {
X if ((fil = open(name, O_RDWR, S_IWRITE)) < 0)
X return (-1);
X if (read(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X lseek(fil, 0L, 0);
X if (write(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X close(fil);
X return (0);
X } else if ((fil = creat(name, S_IWRITE)) < 0) {
X return (-1);
X } else {
X close(fil);
X return (0);
X }
X}
END_OF_FILE
if test 767 -ne `wc -c <'dmake/msdos/tccdos/utime.c'`; then
echo shar: \"'dmake/msdos/tccdos/utime.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/utime.c'
fi
if test -f 'dmake/msdos/tee.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tee.c'\"
else
echo shar: Extracting \"'dmake/msdos/tee.c'\" \(1399 characters\)
sed "s/^X//" >'dmake/msdos/tee.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/msdos/RCS/tee.c,v 1.1 1994/10/06 17:41:47 dvadura Exp $
X-- SYNOPSIS -- Hook_std_writes() dummy call for non swapping MSDOS versions.
X--
X-- DESCRIPTION
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: tee.c,v $
X * Revision 1.1 1994/10/06 17:41:47 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X
XPUBLIC void
XHook_std_writes( file )
Xchar *file;
X{
X}
END_OF_FILE
if test 1399 -ne `wc -c <'dmake/msdos/tee.c'`; then
echo shar: \"'dmake/msdos/tee.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tee.c'
fi
if test -f 'dmake/os2/_chdir.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/_chdir.c'\"
else
echo shar: Extracting \"'dmake/os2/_chdir.c'\" \(1754 characters\)
sed "s/^X//" >'dmake/os2/_chdir.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/os2/RCS/_chdir.c,v 1.1 1994/10/06 17:42:43 dvadura Exp $
X * Revision 1.1 1994/10/06 17:42:43 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <dos.h>
X#include <os2.h>
X#include "extern.h"
X
XPUBLIC int
X_chdir(path)
Xchar *path;
X{
X int res;
X
X res = chdir(path);
X
X if (res == 0 && path[1] == ':')
X#ifdef OS2
X DosSelectDisk((*path & ~0x20) - '@');
X#else
X unsigned new_drive;
X unsigned max_drives;
X
X new_drive = (*path & ~0x20) - 'A' + 1;
X _dos_setdrive(new_drive, &max_drives);
X#endif
X
X return (res);
X}
END_OF_FILE
if test 1754 -ne `wc -c <'dmake/os2/_chdir.c'`; then
echo shar: \"'dmake/os2/_chdir.c'\" unpacked with wrong size!
fi
# end of 'dmake/os2/_chdir.c'
fi
if test -f 'dmake/os2/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/config.mk'\"
else
echo shar: Extracting \"'dmake/os2/config.mk'\" \(1555 characters\)
sed "s/^X//" >'dmake/os2/config.mk' <<'END_OF_FILE'
X# This is an OS specific configuration file
X# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
X# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
X# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
X#
XOSRELEASE *= mscdos
X# Memory model to compile for
X# set to s - small, m - medium, c - compact, l - large
X# Use only large model now.
XMODEL = l
X
XSTARTUPFILE = $(OS)/startup.mk
X
XCPPFLAGS = $(CFLAGS)
XLDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
XLDARGS = $(LDHEAD) @$(LDTMPOBJ),$(TARGET),NUL.MAP,,$(LDTAIL)
XLDTAIL = $(_libs)$(LDFLAGS:s/ //)
X_libs = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
XLDTMPOBJ = $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
XLDTMPLIB = $(mktmp,,$(DIVFILE) $(LDLIBS)\n)
X
X# Debug flags
XDB_CFLAGS = -DDBUG
XDB_LDFLAGS =
XDB_LDLIBS =
X
X# NO Debug flags
XNDB_CFLAGS =
XNDB_LDFLAGS =
XNDB_LDLIBS =
X
X# Local configuration modifications for CFLAGS.
XCFLAGS += -I$(OS) -DOS2
X
X# OS2 does not have a swap version. The operating system will
X# handle all swapping.
X# To save copying unchanged files in from elsewhere, I shall use them in situ.
XOS_SRC += ruletab.c runargv.c _chdir.c switchar.c
XDOS_SRC = dirbrk.c arlib.c
XUNIX_SRC = rmprq.c
X
XSRC += $(OS_SRC) $(DOS_SRC) $(UNIX_SRC)
X.SETDIR=$(OS) : $(ASRC) $(OS_SRC)
X.SETDIR=msdos : $(DOS_SRC)
X.SETDIR=unix : $(UNIX_SRC)
X
X# Set source dirs so that we can find files named in this
X# config file.
X.SOURCE.h : $(OS)
X
X# See if we modify anything in the lower levels.
X.IF $(OSRELEASE) != $(NULL)
X .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 1555 -ne `wc -c <'dmake/os2/config.mk'`; then
echo shar: \"'dmake/os2/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/os2/config.mk'
fi
if test -f 'dmake/os2/switchar.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/switchar.c'\"
else
echo shar: Extracting \"'dmake/os2/switchar.c'\" \(904 characters\)
sed "s/^X//" >'dmake/os2/switchar.c' <<'END_OF_FILE'
X/*
X** return switch char
X*/
X#if defined(OS2) || defined(_MSC_VER)
X#include <stdlib.h>
X#endif
X#if !defined(OS2)
X#include <dos.h>
X#endif /* !OS2 */
X#include <stdio.h>
X#include "stdmacs.h"
X
Xgetswitchar()/*
X===============
X Try the environment first. If you don't find SWITCHAR there, then use
X the DOS call. The call is undocumented, and doesn't work for DOS versions
X 4.0 and up, so the check of the environment will fix that. */
X{
X#if defined(M_I86)
X#if !defined(OS2)
X union REGS rg;
X#endif /* ! OS2 */
X static char *_env_switchar = NIL(char);
X
X if( _env_switchar != NIL(char) ||
X (_env_switchar = (char *)getenv("SWITCHAR")) != NIL(char) )
X return(*_env_switchar);
X
X#if !defined(OS2)
X rg.h.ah = 0x37; /* switch char request */
X rg.h.al = 0; /* get (not set) */
X
X intdos(&rg, &rg);
X return (rg.h.dl);
X#endif /* ! OS2 */
X#endif /* M_I86 */
X
X return ('/');
X}
END_OF_FILE
if test 904 -ne `wc -c <'dmake/os2/switchar.c'`; then
echo shar: \"'dmake/os2/switchar.c'\" unpacked with wrong size!
fi
# end of 'dmake/os2/switchar.c'
fi
if test -f 'dmake/qnx/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/config.mk'\"
else
echo shar: Extracting \"'dmake/qnx/config.mk'\" \(1156 characters\)
sed "s/^X//" >'dmake/qnx/config.mk' <<'END_OF_FILE'
X# This is an OS specific configuration file
X# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
X# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
X# PRINTER, PRINTFLAGS
X# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
X#
XPRINTER = hw
XPRINTFLAGS = -P$(PRINTER)
XSTARTUPFILE = $(OS)/startup.mk
XCPPFLAGS = $(CFLAGS)
XLDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
XLDARGS = $(LDFLAGS) -o $@ $(LDOBJS) $(LDLIBS)
X
X# Debug flags
XDB_CFLAGS = -g -DDBUG
XDB_LDFLAGS = -g
XDB_LDLIBS =
X
X# NO Debug flags
XNDB_CFLAGS = -O
XNDB_LDFLAGS = -N 8192
XNDB_LDLIBS =
X
X# Local configuration modifications for CFLAGS.
XCFLAGS += -I$(OS) -ml
X
X# Sources that must be defined for each different version
XOSSRC := ruletab.c runargv.c tempnam.c
XUNIXSRC := dcache.c rmprq.c dirbrk.c
XDOSSRC := arlib.c
XSRC += $(OSSRC) $(UNIXSRC) $(DOSSRC)
X.SETDIR=$(OS) : $(OSSRC)
X.SETDIR=unix : $(UNIXSRC)
X.SETDIR=msdos : $(DOSSRC)
X
X# Set source dirs so that we can find files named in this
X# config file.
X.SOURCE.h : $(OS)
X
X# See if we modify anything in the lower levels.
X.IF $(OSRELEASE) != $(NULL)
X .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 1156 -ne `wc -c <'dmake/qnx/config.mk'`; then
echo shar: \"'dmake/qnx/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/config.mk'
fi
if test -f 'dmake/qnx/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/tempnam.c'\"
else
echo shar: Extracting \"'dmake/qnx/tempnam.c'\" \(1485 characters\)
sed "s/^X//" >'dmake/qnx/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern int access();
X
Xstatic char *cpdir();
Xstatic char seed[4]="AAA";
X
X/* BSD stdio.h doesn't define P_tmpdir, so let's do it here */
X#ifndef P_tmpdir
Xstatic char *P_tmpdir = "/tmp";
X#endif
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+16))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (access( cpdir(p, tmpdir), 3) != 0) )
X if( (dl == 0) || (access( cpdir(p, dir), 3) != 0) )
X if( access( cpdir(p, P_tmpdir), 3) != 0 )
X if( access( cpdir(p, "/tmp"), 3) != 0 )
X return(NULL);
X
X (void) strcat(p, "/");
X if(prefix)
X {
X *(p+strlen(p)+5) = '\0';
X (void)strncat(p, prefix, 5);
X }
X
X (void)strcat(p, seed);
X (void)strcat(p, "XXXXXX");
X
X q = seed;
X while(*q == 'Z') *q++ = 'A';
X ++*q;
X
X if(*tmpnam(p) == '\0') return(NULL);
X return(p);
X}
X
X
X
Xstatic char *
Xcpdir(buf, str)
Xchar *buf;
Xchar *str;
X{
X char *p;
X
X if(str != NULL)
X {
X (void) strcpy(buf, str);
X p = buf - 1 + strlen(buf);
X if(*p == '/') *p = '\0';
X }
X
X return(buf);
X}
END_OF_FILE
if test 1485 -ne `wc -c <'dmake/qnx/tempnam.c'`; then
echo shar: \"'dmake/qnx/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/tempnam.c'
fi
if test -f 'dmake/readme/atari.tos' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/atari.tos'\"
else
echo shar: Extracting \"'dmake/readme/atari.tos'\" \(1238 characters\)
sed "s/^X//" >'dmake/readme/atari.tos' <<'END_OF_FILE'
XAtari TOS specific information for dmake. This information is provided in the
Xhope that it makes it easier to install and recompile dmake in a TOS
Xenvironment. I do not own an ST. As a result I rely on others to insure that
Xthis version of dmake works as advertized. If you have any problems with it
Xplease fix them and send me the differences so that I can incorporate them
Xinto future releases and patches.
X
X
X1. ENVIRONMENT VARIABLE SETTINGS
X
XOnly a single set of settings is available for Atari TOS. There are no
Xsub-selections for specific OS release and/or environment.
X
X OS - tos
X OSRELEASE - NULL
X OSENVIRONMENT - NULL
X
X
X2. IMPLEMENTATION NOTES
X
XThe code to compile on an Atari-ST using GCC was supplied by Edgar Roeder
X(roe...@cs.uni-sb.de). I do not have an ST on which to verify the
Xdistribution sources but I have no reason to believe them to not work.
XIf there are any problems please let Edgar or myself know.
X
XI know of no bugs or limitation to the Atari-ST implementation. Note that
Xit is similar to the DOS version but it does not swap itself out. This does
Xnot appear to be as much of a problem on the Atari as it is on MSDOS boxes :-).
XSee the msdos specific info file for further information.
X
X-dennis
END_OF_FILE
if test 1238 -ne `wc -c <'dmake/readme/atari.tos'`; then
echo shar: \"'dmake/readme/atari.tos'\" unpacked with wrong size!
fi
# end of 'dmake/readme/atari.tos'
fi
if test -f 'dmake/readme/readme.1st' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/readme.1st'\"
else
echo shar: Extracting \"'dmake/readme/readme.1st'\" \(1491 characters\)
sed "s/^X//" >'dmake/readme/readme.1st' <<'END_OF_FILE'
XThis directory contains a number of files. Here is a short description of
Xwhat each file contains so that you do not need to search as much. There is
Xalso a recommended order for reading them.
X
X readme.1st - index of files found in the readme directory.
X intro - short note describing what 'dmake' is and where to
X get it from.
X release - changes from previous release, and release specific
X notes.
X install - installation instructions.
X ../man - directory containg DMAKE manual page.
X
X patchX - release notes for patchX to the current release.
X
XThe next group of files provides additional information for specific
Xplatforms.
X
X apple.mac - information for macintosh users
X atari.tos - information for ATARI TOS users
X msdos - information for MSDOS users
X os2 - information for OS/2 users
X unix - information for UNIX users
X qnx - information for QNX users
X srcorg - information on the source code organization
X
XYou should read the information in the first group of files. The second
Xgroup of files contains platform specific configuration, and information
Xon building dmake on the related target system. You need to read the
Xrelevant file only if you are building the dmake executable from the source
Xdistribution using 'dmake' itself, or if you want to create a new version
Xof dmake.
X
XI can be reached at: dva...@plg.uwaterloo.ca
X
X Dennis Vadura
X Dept of Computer Science
X University of Waterloo
X Waterloo, Ont. N2L 3G1
X (519) 885-1211 x3501
END_OF_FILE
if test 1491 -ne `wc -c <'dmake/readme/readme.1st'`; then
echo shar: \"'dmake/readme/readme.1st'\" unpacked with wrong size!
fi
# end of 'dmake/readme/readme.1st'
fi
if test -f 'dmake/tos/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/config.mk'\"
else
echo shar: Extracting \"'dmake/tos/config.mk'\" \(1262 characters\)
sed "s/^X//" >'dmake/tos/config.mk' <<'END_OF_FILE'
X# This is an OS specific configuration file
X# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
X# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
X# PRINTER, PRINTFLAGS
X# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
X#
XPRINTER = hw
XPRINTFLAGS = -P$(PRINTER)
XSTARTUPFILE = $(OS)/startup.mk
XCPPFLAGS = $(CFLAGS)
XLDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
XLDARGS = $(LDFLAGS) -o $@ $(OBJDIR)/*$O
XLDFLAGS += -s
XLD = $(CC)
X
X# Debug flags
XDB_CFLAGS = -g -DDBUG
XDB_LDFLAGS = -g
XDB_LDLIBS =
X
X# NO Debug flags
XNDB_CFLAGS = -O
XNDB_LDFLAGS =
XNDB_LDLIBS =
X
X# Local configuration modifications for CFLAGS.
XCFLAGS += -I$(OS)
X
X# Sources that must be defined for each different version
XOS_SRC += arlib.c ruletab.c runargv.c
XDOS_SRC = rmprq.c runargv.c dirbrk.c rmprq.c
XUNIX_SRC = arlib.c
XBSD_SRC = putenv.c tempnam.c
X
X.SETDIR=$(OS) : $(OS_SRC)
X.SETDIR=msdos : $(DOS_SRC)
X.SETDIR=unix : $(UNIX_SRC)
X.SETDIR=unix/bsd43 : $(BSD_SRC)
X
XSRC += $(OS_SRC) $(DOS_SRC) $(UNIX_SRC) $(BSD_SRC)
X
X# Set source dirs so that we can find files named in this
X# config file.
X.SOURCE.h : $(OS)
X
X# See if we modify anything in the lower levels.
X.IF $(OSRELEASE) != $(NULL)
X .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 1262 -ne `wc -c <'dmake/tos/config.mk'`; then
echo shar: \"'dmake/tos/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/tos/config.mk'
fi
if test -f 'dmake/tos/make.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/make.sh'\"
else
echo shar: Extracting \"'dmake/tos/make.sh'\" \(1427 characters\)
sed "s/^X//" >'dmake/tos/make.sh' <<'END_OF_FILE'
Xmkdir objects
Xgcc -c -I. -Itos -O infer.c
Xmv infer.o objects
Xgcc -c -I. -Itos -O make.c
Xmv make.o objects
Xgcc -c -I. -Itos -O stat.c
Xmv stat.o objects
Xgcc -c -I. -Itos -O expand.c
Xmv expand.o objects
Xgcc -c -I. -Itos -O dmstring.c
Xmv dmstring.o objects
Xgcc -c -I. -Itos -O hash.c
Xmv hash.o objects
Xgcc -c -I. -Itos -O dag.c
Xmv dag.o objects
Xgcc -c -I. -Itos -O dmake.c
Xmv dmake.o objects
Xgcc -c -I. -Itos -O path.c
Xmv path.o objects
Xgcc -c -I. -Itos -O imacs.c
Xmv imacs.o objects
Xgcc -c -I. -Itos -O sysintf.c
Xmv sysintf.o objects
Xgcc -c -I. -Itos -O parse.c
Xmv parse.o objects
Xgcc -c -I. -Itos -O getinp.c
Xmv getinp.o objects
Xgcc -c -I. -Itos -O quit.c
Xmv quit.o objects
Xgcc -c -I. -Itos -O state.c
Xmv state.o objects
Xgcc -c -I. -Itos -O dmdump.c
Xmv dmdump.o objects
Xgcc -c -I. -Itos -O macparse.c
Xmv macparse.o objects
Xgcc -c -I. -Itos -O rulparse.c
Xmv rulparse.o objects
Xgcc -c -I. -Itos -O percent.c
Xmv percent.o objects
Xgcc -c -I. -Itos -O function.c
Xmv function.o objects
Xgcc -c -I. -Itos -O tos/arlib.c
Xmv arlib.o objects
Xgcc -c -I. -Itos -O tos/ruletab.c
Xmv ruletab.o objects
Xgcc -c -I. -Itos -O tos/runargv.c
Xmv runargv.o objects
Xgcc -c -I. -Itos -O msdos/rmprq.c
Xmv rmprq.o objects
Xgcc -c -I. -Itos -O msdos/dirbrk.c
Xmv dirbrk.o objects
Xgcc -c -I. -Itos -O unix/bsd43/putenv.c
Xmv putenv.o objects
Xgcc -c -I. -Itos -O unix/bsd43/tempnam.c
Xmv tempnam.o objects
Xgcc -s -o dmake objects/*.o
Xcp tos/startup.mk startup.mk
END_OF_FILE
if test 1427 -ne `wc -c <'dmake/tos/make.sh'`; then
echo shar: \"'dmake/tos/make.sh'\" unpacked with wrong size!
fi
chmod +x 'dmake/tos/make.sh'
# end of 'dmake/tos/make.sh'
fi
if test -f 'dmake/tos/rmprq.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/rmprq.c'\"
else
echo shar: Extracting \"'dmake/tos/rmprq.c'\" \(1674 characters\)
sed "s/^X//" >'dmake/tos/rmprq.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/tos/RCS/rmprq.c,v 1.1 1994/10/06 17:41:33 dvadura Exp $
X-- SYNOPSIS -- remove prerequisites code.
X--
X-- DESCRIPTION
X-- This code is different for DOS and for UNIX and parallel make
X-- architectures since the parallel case requires the rm's to be
X-- run in parallel, whereas DOS guarantees to run them sequentially.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: rmprq.c,v $
X * Revision 1.1 1994/10/06 17:41:33 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include "extern.h"
X#include "alloc.h"
X
Xvoid
XRemove_prq( tcp )
XCELLPTR tcp;
X{
X tcp->ce_flag &= ~(F_MADE|F_VISITED);
X tcp->ce_time = 0L;
X
X Make( tcp, tcp );
X}
END_OF_FILE
if test 1674 -ne `wc -c <'dmake/tos/rmprq.c'`; then
echo shar: \"'dmake/tos/rmprq.c'\" unpacked with wrong size!
fi
# end of 'dmake/tos/rmprq.c'
fi
if test -f 'dmake/tos/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/tempnam.c'\"
else
echo shar: Extracting \"'dmake/tos/tempnam.c'\" \(1506 characters\)
sed "s/^X//" >'dmake/tos/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern char *mktemp();
Xextern int access();
X
Xstatic char *cpdir();
Xstatic char *seed="AAA";
X
X/* BSD stdio.h doesn't define P_tmpdir, so let's do it here */
X#ifndef P_tmpdir
Xstatic char *P_tmpdir = "/tmp";
X#endif
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+16))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (access( cpdir(p, tmpdir), 3) != 0) )
X if( (dl == 0) || (access( cpdir(p, dir), 3) != 0) )
X if( access( cpdir(p, P_tmpdir), 3) != 0 )
X if( access( cpdir(p, "/tmp"), 3) != 0 )
X return(NULL);
X
X (void) strcat(p, "/");
X if(prefix)
X {
X *(p+strlen(p)+5) = '\0';
X (void)strncat(p, prefix, 5);
X }
X
X (void)strcat(p, seed);
X (void)strcat(p, "XXXXXX");
X
X q = seed;
X while(*q == 'Z') *q++ = 'A';
X ++*q;
X
X if(*mktemp(p) == '\0') return(NULL);
X return(p);
X}
X
X
X
Xstatic char *
Xcpdir(buf, str)
Xchar *buf;
Xchar *str;
X{
X char *p;
X
X if(str != NULL)
X {
X (void) strcpy(buf, str);
X p = buf - 1 + strlen(buf);
X if(*p == '/') *p = '\0';
X }
X
X return(buf);
X}
END_OF_FILE
if test 1506 -ne `wc -c <'dmake/tos/tempnam.c'`; then
echo shar: \"'dmake/tos/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/tos/tempnam.c'
fi
if test -f 'dmake/unix/386ix/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/386ix/config.mk'\" \(745 characters\)
sed "s/^X//" >'dmake/unix/386ix/config.mk' <<'END_OF_FILE'
X# This is the 386IX UNIX configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following are required sources
XOSDSRC :=
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osrdir)
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 745 -ne `wc -c <'dmake/unix/386ix/config.mk'`; then
echo shar: \"'dmake/unix/386ix/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/config.mk'
fi
if test -f 'dmake/unix/bsd43/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/config.mk'\" \(796 characters\)
sed "s/^X//" >'dmake/unix/bsd43/config.mk' <<'END_OF_FILE'
X# This is the BSD 4.3 UNIX configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following sources are required for BSD4.3
XOSDSRC := putenv.c tempnam.c utime.c setvbuf.c
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local BSD includes
X# too.
XCFLAGS += -I$(osrdir)
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 796 -ne `wc -c <'dmake/unix/bsd43/config.mk'`; then
echo shar: \"'dmake/unix/bsd43/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/config.mk'
fi
if test -f 'dmake/unix/bsd43/setvbuf.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/setvbuf.c'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/setvbuf.c'\" \(1606 characters\)
sed "s/^X//" >'dmake/unix/bsd43/setvbuf.c' <<'END_OF_FILE'
X/* RCS -- $Header: /u5/dvadura/src/public/dmake/src/unix/bsd43/RCS/setvbuf.c,v 1.1 1994/10/06 17:42:08 dvadura Exp $
X-- SYNOPSIS -- setvbuf for BSD
X--
X-- DESCRIPTION
X-- A sysv call, standard BSD doesn't have this.
X--
X-- AUTHOR
X-- Dennis Vadura, dva...@watdragon.uwaterloo.ca
X-- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
X--
X-- COPYRIGHT
X-- Copyright (c) 1992,1994 by Dennis Vadura. All rights reserved.
X--
X-- This program is free software; you can redistribute it and/or
X-- modify it under the terms of the GNU General Public License
X-- (version 1), as published by the Free Software Foundation, and
X-- found in the file 'LICENSE' included with this distribution.
X--
X-- This program is distributed in the hope that it will be useful,
X-- but WITHOUT ANY WARRANTY; without even the implied warrant of
X-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X-- GNU General Public License for more details.
X--
X-- You should have received a copy of the GNU General Public License
X-- along with this program; if not, write to the Free Software
X-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X--
X-- LOG
X-- $Log: setvbuf.c,v $
X * Revision 1.1 1994/10/06 17:42:08 dvadura
X * dmake Release Version 4.0, Initial revision
X *
X*/
X
X#include <stdio.h>
X
Xsetvbuf(fp, bp, type, len_unused)
XFILE* fp;
Xchar* bp;
Xint type;
Xint len_unused;
X{
X switch (type) {
X case _IOLBF: setlinebuf(fp); return;
X case _IONBF: setbuf(fp, NULL); return;
X default: setbuf(fp, bp); return;
X }
X}
X
END_OF_FILE
if test 1606 -ne `wc -c <'dmake/unix/bsd43/setvbuf.c'`; then
echo shar: \"'dmake/unix/bsd43/setvbuf.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/setvbuf.c'
fi
if test -f 'dmake/unix/bsd43/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/tempnam.c'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/tempnam.c'\" \(1508 characters\)
sed "s/^X//" >'dmake/unix/bsd43/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern char *mktemp();
Xextern int access();
X
Xstatic char *cpdir();
Xstatic char seed[4]="AAA";
X
X/* BSD stdio.h doesn't define P_tmpdir, so let's do it here */
X#ifndef P_tmpdir
Xstatic char *P_tmpdir = "/tmp";
X#endif
X
Xchar *
Xtempnam(dir, prefix)
Xchar *dir; /* use this directory please (if non-NULL) */
Xchar *prefix; /* use this (if non-NULL) as filename prefix */
X{
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+16))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (access( cpdir(p, tmpdir), 3) != 0) )
X if( (dl == 0) || (access( cpdir(p, dir), 3) != 0) )
X if( access( cpdir(p, P_tmpdir), 3) != 0 )
X if( access( cpdir(p, "/tmp"), 3) != 0 )
X return(NULL);
X
X (void) strcat(p, "/");
X if(prefix)
X {
X *(p+strlen(p)+5) = '\0';
X (void)strncat(p, prefix, 5);
X }
X
X (void)strcat(p, seed);
X (void)strcat(p, "XXXXXX");
X
X q = seed;
X while(*q == 'Z') *q++ = 'A';
X ++*q;
X
X if(*mktemp(p) == '\0') return(NULL);
X return(p);
X}
X
X
X
Xstatic char *
Xcpdir(buf, str)
Xchar *buf;
Xchar *str;
X{
X char *p;
X
X if(str != NULL)
X {
X (void) strcpy(buf, str);
X p = buf - 1 + strlen(buf);
X if(*p == '/') *p = '\0';
X }
X
X return(buf);
X}
END_OF_FILE
if test 1508 -ne `wc -c <'dmake/unix/bsd43/tempnam.c'`; then
echo shar: \"'dmake/unix/bsd43/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/tempnam.c'
fi
if test -f 'dmake/unix/bsd43/utime.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/utime.c'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/utime.c'\" \(808 characters\)
sed "s/^X//" >'dmake/unix/bsd43/utime.c' <<'END_OF_FILE'
X/*
X** change access and modify times of file
X*/
X#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/stat.h>
X#include <sys/file.h>
X
Xint
Xutime(name, timep)
Xchar* name;
Xtime_t timep[2];
X{
X struct timeval tv[2], *tvp;
X struct stat buf;
X int fil;
X char data;
X
X if (timep!=0)
X {
X tvp = tv, tv[0].tv_sec = timep[0], tv[1].tv_sec = timep[1];
X if (utimes(name, tvp)==0)
X return (0);
X }
X
X if (stat(name, &buf) != 0)
X return (-1);
X if (buf.st_size != 0) {
X if ((fil = open(name, O_RDWR, 0666)) < 0)
X return (-1);
X if (read(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X lseek(fil, 0L, 0);
X if (write(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X close(fil);
X return (0);
X } else if ((fil = creat(name, 0666)) < 0) {
X return (-1);
X } else {
X close(fil);
X return (0);
X }
X}
END_OF_FILE
if test 808 -ne `wc -c <'dmake/unix/bsd43/utime.c'`; then
echo shar: \"'dmake/unix/bsd43/utime.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/utime.c'
fi
if test -f 'dmake/unix/bsd43/vf/ctype.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/vf/ctype.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/vf/ctype.h'\" \(782 characters\)
sed "s/^X//" >'dmake/unix/bsd43/vf/ctype.h' <<'END_OF_FILE'
X/* ctype.h 4.2 85/09/04 */
X
X#define _U 01
X#define _L 02
X#define _N 04
X#define _S 010
X#define _P 020
X#define _C 040
X#define _X 0100
X#define _B 0200
X
Xextern char _ctype_[];
X
X#define isalpha(c) ((_ctype_+1)[c]&(_U|_L))
X#define isupper(c) ((_ctype_+1)[c]&_U)
X#define islower(c) ((_ctype_+1)[c]&_L)
X#define isdigit(c) ((_ctype_+1)[c]&_N)
X#define isxdigit(c) ((_ctype_+1)[c]&(_N|_X))
X#define isspace(c) ((_ctype_+1)[c]&_S)
X#define ispunct(c) ((_ctype_+1)[c]&_P)
X#define isalnum(c) ((_ctype_+1)[c]&(_U|_L|_N))
X#define isprint(c) ((_ctype_+1)[c]&(_P|_U|_L|_N|_B))
X#define isgraph(c) ((_ctype_+1)[c]&(_P|_U|_L|_N))
X#define iscntrl(c) ((_ctype_+1)[c]&_C)
X#define isascii(c) ((unsigned)(c)<=0177)
X#define toupper(c) ((c)-'a'+'A')
X#define tolower(c) ((c)-'A'+'a')
X#define toascii(c) ((c)&0177)
END_OF_FILE
if test 782 -ne `wc -c <'dmake/unix/bsd43/vf/ctype.h'`; then
echo shar: \"'dmake/unix/bsd43/vf/ctype.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/vf/ctype.h'
fi
if test -f 'dmake/unix/bsd43/vf/vfprintf.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/vf/vfprintf.c'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/vf/vfprintf.c'\" \(1409 characters\)
sed "s/^X//" >'dmake/unix/bsd43/vf/vfprintf.c' <<'END_OF_FILE'
X/*
X * Copyright (c) 1988 Regents of the University of California.
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms are permitted
X * provided that the above copyright notice and this paragraph are
X * duplicated in all such forms and that any documentation,
X * advertising materials, and other materials related to such
X * distribution and use acknowledge that the software was developed
X * by the University of California, Berkeley. The name of the
X * University may not be used to endorse or promote products derived
X * from this software without specific prior written permission.
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
X * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
X#if defined(LIBC_SCCS) && !defined(lint)
Xstatic char sccsid[] = "@(#)vfprintf.c 5.2 (Berkeley) 6/27/88";
X#endif /* LIBC_SCCS and not lint */
X
X#include <stdio.h>
X#include <varargs.h>
X
Xint
Xvfprintf(iop, fmt, ap)
X FILE *iop;
X char *fmt;
X va_list ap;
X{
X int len;
X char localbuf[BUFSIZ];
X
X if (iop->_flag & _IONBF) {
X iop->_flag &= ~_IONBF;
X iop->_ptr = iop->_base = localbuf;
X len = _doprnt(fmt, ap, iop);
X (void) fflush(iop);
X iop->_flag |= _IONBF;
X iop->_base = NULL;
X iop->_bufsiz = 0;
X iop->_cnt = 0;
X } else
X len = _doprnt(fmt, ap, iop);
X
X return (ferror(iop) ? EOF : len);
X}
X
END_OF_FILE
if test 1409 -ne `wc -c <'dmake/unix/bsd43/vf/vfprintf.c'`; then
echo shar: \"'dmake/unix/bsd43/vf/vfprintf.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/vf/vfprintf.c'
fi
if test -f 'dmake/unix/coherent/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/coherent/config.mk'\" \(776 characters\)
sed "s/^X//" >'dmake/unix/coherent/config.mk' <<'END_OF_FILE'
X# This is the COHERENT configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following are required sources
XOSDSRC := vfprintf.c getcwd.c
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osrdir) -Dvoid=int
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 776 -ne `wc -c <'dmake/unix/coherent/config.mk'`; then
echo shar: \"'dmake/unix/coherent/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/config.mk'
fi
if test -f 'dmake/unix/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/config.mk'\" \(1043 characters\)
sed "s/^X//" >'dmake/unix/config.mk' <<'END_OF_FILE'
X# This is an OS specific configuration file
X# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
X# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
X# PRINTER, PRINTFLAGS
X# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
X#
XPRINTER = hw
XPRINTFLAGS = -P$(PRINTER)
XSTARTUPFILE = $(OS)/startup.mk
XCPPFLAGS = $(CFLAGS)
XLDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
XLDARGS = $(LDFLAGS) -o $@ $(LDOBJS) $(LDLIBS)
X
X# Debug flags
XDB_CFLAGS = -g -DDBUG
XDB_LDFLAGS = -g
XDB_LDLIBS =
X
X# NO Debug flags
XNDB_CFLAGS = -O
XNDB_LDFLAGS = -O
XNDB_LDLIBS =
X
X# Local configuration modifications for CFLAGS.
XCFLAGS += -I$(OS)
X
X# Sources that must be defined for each different version
XOSSRC := arlib.c dirbrk.c rmprq.c ruletab.c runargv.c dcache.c
XSRC += $(OSSRC)
X.SETDIR=$(OS) : $(OSSRC)
X
X# Set source dirs so that we can find files named in this
X# config file.
X.SOURCE.h : $(OS)
X
X# See if we modify anything in the lower levels.
X.IF $(OSRELEASE) != $(NULL)
X .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 1043 -ne `wc -c <'dmake/unix/config.mk'`; then
echo shar: \"'dmake/unix/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/config.mk'
fi
if test -f 'dmake/unix/solaris/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/solaris/config.mk'\" \(804 characters\)
sed "s/^X//" >'dmake/unix/solaris/config.mk' <<'END_OF_FILE'
X# This is the BSD 4.3 UNIX configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following sources are required for Solaris 2.1 or greater
XOSDSRC := tempnam.c getcwd.c
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local BSD includes
X# too.
XCFLAGS += -I$(osrdir) -DSolaris
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 804 -ne `wc -c <'dmake/unix/solaris/config.mk'`; then
echo shar: \"'dmake/unix/solaris/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/config.mk'
fi
if test -f 'dmake/unix/solaris/tempnam.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/tempnam.c'\"
else
echo shar: Extracting \"'dmake/unix/solaris/tempnam.c'\" \(1520 characters\)
sed "s/^X//" >'dmake/unix/solaris/tempnam.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X
X#define max(A,B) (((A)<(B))?(B):(A))
X
Xextern char *mktemp();
Xextern int access();
X
Xstatic char *cpdir();
Xstatic char seed[4]="AAA";
X
X/* BSD stdio.h doesn't define P_tmpdir, so let's do it here */
X#ifndef P_tmpdir
Xstatic char *P_tmpdir = "/tmp";
X#endif
X
Xchar *
Xtempnam(dir, prefix)
Xconst char *dir; /* use this directory please (if non-NULL) */
Xconst char *prefix; /* use this (if non-NULL) as filename prefix */
X{
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+16))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (access( cpdir(p, tmpdir), 3) != 0) )
X if( (dl == 0) || (access( cpdir(p, dir), 3) != 0) )
X if( access( cpdir(p, P_tmpdir), 3) != 0 )
X if( access( cpdir(p, "/tmp"), 3) != 0 )
X return(NULL);
X
X (void) strcat(p, "/");
X if(prefix)
X {
X *(p+strlen(p)+5) = '\0';
X (void)strncat(p, prefix, 5);
X }
X
X (void)strcat(p, seed);
X (void)strcat(p, "XXXXXX");
X
X q = seed;
X while(*q == 'Z') *q++ = 'A';
X ++*q;
X
X if(*mktemp(p) == '\0') return(NULL);
X return(p);
X}
X
X
X
Xstatic char *
Xcpdir(buf, str)
Xchar *buf;
Xchar *str;
X{
X char *p;
X
X if(str != NULL)
X {
X (void) strcpy(buf, str);
X p = buf - 1 + strlen(buf);
X if(*p == '/') *p = '\0';
X }
X
X return(buf);
X}
END_OF_FILE
if test 1520 -ne `wc -c <'dmake/unix/solaris/tempnam.c'`; then
echo shar: \"'dmake/unix/solaris/tempnam.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/tempnam.c'
fi
if test -f 'dmake/unix/sysvr1/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/config.mk'\" \(761 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/config.mk' <<'END_OF_FILE'
X# This is the SysV R3 UNIX configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following are required sources
XOSDSRC := vfprintf.c
X
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osrdir)
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 761 -ne `wc -c <'dmake/unix/sysvr1/config.mk'`; then
echo shar: \"'dmake/unix/sysvr1/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/config.mk'
fi
if test -f 'dmake/unix/sysvr3/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/config.mk'\" \(750 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/config.mk' <<'END_OF_FILE'
X# This is the SysV R3 UNIX configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following are required sources
XOSDSRC :=
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osrdir)
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 750 -ne `wc -c <'dmake/unix/sysvr3/config.mk'`; then
echo shar: \"'dmake/unix/sysvr3/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/config.mk'
fi
if test -f 'dmake/unix/sysvr4/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr4/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr4/config.mk'\" \(750 characters\)
sed "s/^X//" >'dmake/unix/sysvr4/config.mk' <<'END_OF_FILE'
X# This is the SysV R4 UNIX configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following are required sources
XOSDSRC :=
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osrdir)
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 750 -ne `wc -c <'dmake/unix/sysvr4/config.mk'`; then
echo shar: \"'dmake/unix/sysvr4/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr4/config.mk'
fi
if test -f 'dmake/unix/xenix/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/xenix/config.mk'\" \(760 characters\)
sed "s/^X//" >'dmake/unix/xenix/config.mk' <<'END_OF_FILE'
X# This is the SysV R3 UNIX configuration file for DMAKE
X# It simply modifies the values of SRC, and checks to see if
X# OSENVIRONMENT is defined. If so it includes the appropriate
X# config.mk file.
X#
X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
X# directory.
X#
Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
X# The following are required sources
XOSDSRC :=
X.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
X.END
X
X.SOURCE.h : $(osrdir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osrdir) -DM_XENIX
X
X# See if we modify anything in the lower levels.
X.IF $(OSENVIRONMENT) != $(NULL)
X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
X.END
END_OF_FILE
if test 760 -ne `wc -c <'dmake/unix/xenix/config.mk'`; then
echo shar: \"'dmake/unix/xenix/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/config.mk'
fi
echo shar: End of archive 25 \(of 27\).
cp /dev/null ark25isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/_install dmake/dbug/dbug/readme dmake/dbug/getwd.c
# dmake/dbug/malloc/_changes dmake/dbug/malloc/patchlev
# dmake/dbug/readme dmake/mac/startup.h dmake/mac/sysintf.h
# dmake/man/README dmake/msdos/bccdos/lib.rsp
# dmake/msdos/bccdos/libswp.rsp dmake/msdos/bccdos/obj.rsp
# dmake/msdos/dosdta.h dmake/msdos/exec.h dmake/msdos/mscdos/lib.rsp
# dmake/msdos/mscdos/libswp.rsp dmake/msdos/mscdos/obj.rsp
# dmake/msdos/mscdos/objswp.rsp dmake/msdos/mscdos/optoff.h
# dmake/msdos/startup.h dmake/msdos/stdarg.h dmake/msdos/sysintf.h
# dmake/msdos/tccdos/lib.rsp dmake/msdos/tccdos/libswp.rsp
# dmake/msdos/tccdos/obj.rsp dmake/msdos/tccdos/objswp.rsp
# dmake/msdos/ztcdos/environ.c dmake/msdos/ztcdos/lib.rsp
# dmake/msdos/ztcdos/libswp.rsp dmake/msdos/ztcdos/obj.rsp
# dmake/msdos/ztcdos/objswp.rsp dmake/os2/dmake.cs
# dmake/os2/dmake.def dmake/os2/ibm/obj.rsp dmake/os2/ibm/optoff.h
# dmake/os2/ibm/startup.mk dmake/os2/ibm/stdarg.h
# dmake/os2/mscdos/lib.rsp dmake/os2/mscdos/obj.rsp
# dmake/os2/mscdos/optoff.h dmake/os2/mscdos/startup.mk
# dmake/os2/optoff.h dmake/os2/startup.h dmake/os2/sysintf.h
# dmake/patchlvl.h dmake/qnx/startup.h dmake/qnx/stdlib.h
# dmake/qnx/sysintf.h dmake/qnx/time.h dmake/readme/qnx
# dmake/startup.h dmake/tos/startup.h dmake/tos/sysintf.h
# dmake/unix/386ix/ar.h dmake/unix/386ix/stdarg.h
# dmake/unix/386ix/stdlib.h dmake/unix/386ix/time.h
# dmake/unix/bsd43/limits.h dmake/unix/bsd43/stdarg.h
# dmake/unix/bsd43/stdlib.h dmake/unix/bsd43/string.h
# dmake/unix/bsd43/uw/config.mk dmake/unix/bsd43/vf/config.mk
# dmake/unix/bsd43/vf/memcpy.c dmake/unix/coherent/getcwd.c
# dmake/unix/coherent/stdarg.h dmake/unix/coherent/stdlib.h
# dmake/unix/coherent/time.h dmake/unix/solaris/gcc/config.mk
# dmake/unix/solaris/stdarg.h dmake/unix/startup.h
# dmake/unix/sysintf.h dmake/unix/sysvr1/stdarg.h
# dmake/unix/sysvr1/stdlib.h dmake/unix/sysvr1/time.h
# dmake/unix/sysvr3/pwd/config.mk dmake/unix/sysvr3/stdarg.h
# dmake/unix/sysvr3/time.h dmake/unix/xenix/pwd/config.mk
# dmake/unix/xenix/stdarg.h dmake/unix/xenix/stdlib.h
# dmake/unix/xenix/time.h
# Wrapped by kent@sparky on Fri Oct 21 16:50:59 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 26 (of 27)."'
if test -f 'dmake/_install' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/_install'\"
else
echo shar: Extracting \"'dmake/_install'\" \(186 characters\)
sed "s/^X//" >'dmake/_install' <<'END_OF_FILE'
XAll installation and configuration information has been moved to the
Xreadme directory, please refer to the files found there for more information.
X
XRead the file "readme.1st" first :-).
END_OF_FILE
if test 186 -ne `wc -c <'dmake/_install'`; then
echo shar: \"'dmake/_install'\" unpacked with wrong size!
fi
chmod +x 'dmake/_install'
# end of 'dmake/_install'
fi
if test -f 'dmake/dbug/dbug/readme' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/dbug/readme'\"
else
echo shar: Extracting \"'dmake/dbug/dbug/readme'\" \(141 characters\)
sed "s/^X//" >'dmake/dbug/dbug/readme' <<'END_OF_FILE'
XTo unpack the DBUG manual page please issue the following sequence of
Xcommands:
X
X uudecode dbug.uue
X uncompress dbug.Z
X mv dbug dbug.p
END_OF_FILE
if test 141 -ne `wc -c <'dmake/dbug/dbug/readme'`; then
echo shar: \"'dmake/dbug/dbug/readme'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/dbug/readme'
# end of 'dmake/dbug/dbug/readme'
fi
if test -f 'dmake/dbug/getwd.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/getwd.c'\"
else
echo shar: Extracting \"'dmake/dbug/getwd.c'\" \(106 characters\)
sed "s/^X//" >'dmake/dbug/getwd.c' <<'END_OF_FILE'
Xchar *
Xgetwd(pathname)
Xchar *pathname;
X{
X return("delete this code if your getwd.c works correctly");
X}
END_OF_FILE
if test 106 -ne `wc -c <'dmake/dbug/getwd.c'`; then
echo shar: \"'dmake/dbug/getwd.c'\" unpacked with wrong size!
fi
# end of 'dmake/dbug/getwd.c'
fi
if test -f 'dmake/dbug/malloc/_changes' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/_changes'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/_changes'\" \(378 characters\)
sed "s/^X//" >'dmake/dbug/malloc/_changes' <<'END_OF_FILE'
XI made the following changes to the malloc package as found in
Xcomp.sources.unix:
X
X 1. created this file _changes.
X 2. moved README to _readme (facilitates transfer to DOS and back to
X unix)
X 3. renamed testmalloc.c, malloc_chk.c, and malloc_chn.c to testmlc.c,
X mlc_chk.c, and mlc_chn.c respectively. Again DOS has trouble with
X long basenames in filenames.
END_OF_FILE
if test 378 -ne `wc -c <'dmake/dbug/malloc/_changes'`; then
echo shar: \"'dmake/dbug/malloc/_changes'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/malloc/_changes'
# end of 'dmake/dbug/malloc/_changes'
fi
if test -f 'dmake/dbug/malloc/patchlev' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/malloc/patchlev'\"
else
echo shar: Extracting \"'dmake/dbug/malloc/patchlev'\" \(3 characters\)
sed "s/^X//" >'dmake/dbug/malloc/patchlev' <<'END_OF_FILE'
X3
END_OF_FILE
if test 3 -ne `wc -c <'dmake/dbug/malloc/patchlev'`; then
echo shar: \"'dmake/dbug/malloc/patchlev'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/malloc/patchlev'
# end of 'dmake/dbug/malloc/patchlev'
fi
if test -f 'dmake/dbug/readme' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/dbug/readme'\"
else
echo shar: Extracting \"'dmake/dbug/readme'\" \(473 characters\)
sed "s/^X//" >'dmake/dbug/readme' <<'END_OF_FILE'
XThis directory contains two public domain debugging packages.
X
X 1. Fred Fishes DEBUG macros.
X 2. Connor P. Cahills malloc library.
X
XDescriptions of both can be found in their respective sub-directories. dbug
Xfor the DEBUG macros and malloc for the malloc library. I have left the
Xmalloc distribution intact as it comes from the net except for the changes
Xnoted in the _changes file.
X
XI thank the authors for making them available for others to use.
X
X-dennis
END_OF_FILE
if test 473 -ne `wc -c <'dmake/dbug/readme'`; then
echo shar: \"'dmake/dbug/readme'\" unpacked with wrong size!
fi
chmod +x 'dmake/dbug/readme'
# end of 'dmake/dbug/readme'
fi
if test -f 'dmake/mac/startup.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/startup.h'\"
else
echo shar: Extracting \"'dmake/mac/startup.h'\" \(403 characters\)
sed "s/^X//" >'dmake/mac/startup.h' <<'END_OF_FILE'
X/* This file contains the default value of the DMMAKESTARTUP variable.
X * You must set the quoted string below to the default path to the startup
X * variable, so that it gets compiled in. LEAVE DMSTARTUPDIR in
X * the path. This allows the user to customize his environment for dmake
X * by setting up a new DMSTARTUPDIR environment variable. */
X
X"MAKESTARTUP := $(MPW)tools:$(DMSTARTUPDIR)startup.mk",
END_OF_FILE
if test 403 -ne `wc -c <'dmake/mac/startup.h'`; then
echo shar: \"'dmake/mac/startup.h'\" unpacked with wrong size!
fi
# end of 'dmake/mac/startup.h'
fi
if test -f 'dmake/mac/sysintf.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/mac/sysintf.h'\"
else
echo shar: Extracting \"'dmake/mac/sysintf.h'\" \(432 characters\)
sed "s/^X//" >'dmake/mac/sysintf.h' <<'END_OF_FILE'
X/*
X** assorted bits of system interface, for common routines inside dmake.
X** System specific code can be found in the config.h files for each
X** of the system specifications.
X*/
X#define STAT stat
X#define VOID_LCACHE(l,m)
X#define Hook_std_writes(A)
X#define GETPID 1
X
X/* for directory cache */
X#define CacheStat(A,B) really_dostat(A,&buf)
X
X/*
X** standard C items
X*/
X
X/*
X** Mac interface standard items
X*/
X#define getswitchar() '-'
END_OF_FILE
if test 432 -ne `wc -c <'dmake/mac/sysintf.h'`; then
echo shar: \"'dmake/mac/sysintf.h'\" unpacked with wrong size!
fi
# end of 'dmake/mac/sysintf.h'
fi
if test -f 'dmake/man/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/man/README'\"
else
echo shar: Extracting \"'dmake/man/README'\" \(607 characters\)
sed "s/^X//" >'dmake/man/README' <<'END_OF_FILE'
XThis directory contains the DMAKE manual page. The typeset version of the
Xmanual is compressed and uuencoded as this is the only reasonable method of
Xshipping the control-character filled manpage around.
X
XTo unpack the typeset manual page please issue the following sequence of
Xcommands:
X
X uudecode dmake.uue
X uncompress dmake.Z
X mv dmake dmake.p
X
XNOTE: You only need to do this if you cannot typeset the manual page
X yourself.
X
XThe other two files found here are:
X
X dmake.tf - troff source for the manual page
X dmake.nc - a typeset version of the manual page containing
X no control characters.
END_OF_FILE
if test 607 -ne `wc -c <'dmake/man/README'`; then
echo shar: \"'dmake/man/README'\" unpacked with wrong size!
fi
# end of 'dmake/man/README'
fi
if test -f 'dmake/msdos/bccdos/lib.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/lib.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/lib.rsp'\" \(17 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/lib.rsp' <<'END_OF_FILE'
Xd:\cc\bcc\lib\cl
END_OF_FILE
if test 17 -ne `wc -c <'dmake/msdos/bccdos/lib.rsp'`; then
echo shar: \"'dmake/msdos/bccdos/lib.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/lib.rsp'
fi
if test -f 'dmake/msdos/bccdos/libswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/libswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/libswp.rsp'\" \(17 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/libswp.rsp' <<'END_OF_FILE'
Xd:\cc\bcc\lib\cl
END_OF_FILE
if test 17 -ne `wc -c <'dmake/msdos/bccdos/libswp.rsp'`; then
echo shar: \"'dmake/msdos/bccdos/libswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/libswp.rsp'
fi
if test -f 'dmake/msdos/bccdos/obj.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/bccdos/obj.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/bccdos/obj.rsp'\" \(653 characters\)
sed "s/^X//" >'dmake/msdos/bccdos/obj.rsp' <<'END_OF_FILE'
Xd:\cc\bcc\lib\c0l.obj+
Xobjects\tee.obj+
Xobjects\dirlib.obj+
Xobjects\dcache.obj+
Xobjects\tempnam.obj+
Xobjects\utime.obj
END_OF_FILE
if test 653 -ne `wc -c <'dmake/msdos/bccdos/obj.rsp'`; then
echo shar: \"'dmake/msdos/bccdos/obj.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/bccdos/obj.rsp'
fi
if test -f 'dmake/msdos/dosdta.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/dosdta.h'\"
else
echo shar: Extracting \"'dmake/msdos/dosdta.h'\" \(275 characters\)
sed "s/^X//" >'dmake/msdos/dosdta.h' <<'END_OF_FILE'
X#ifndef _DOSDTA_
X#define _DOSDTA_
X
X#include "stdmacs.h"
Xtypedef struct {
X char fcb[21];
X char attr;
X short time;
X short date;
X long size;
X char name[13];
X} DTA;
X
Xextern DTA *findfirst ANSI((char *, DTA *));
Xextern DTA *findnext ANSI((DTA *));
X#endif
END_OF_FILE
if test 275 -ne `wc -c <'dmake/msdos/dosdta.h'`; then
echo shar: \"'dmake/msdos/dosdta.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/dosdta.h'
fi
if test -f 'dmake/msdos/exec.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/exec.h'\"
else
echo shar: Extracting \"'dmake/msdos/exec.h'\" \(351 characters\)
sed "s/^X//" >'dmake/msdos/exec.h' <<'END_OF_FILE'
X#ifndef _EXEC_h_
X#define _EXEC_h_
X
X#ifndef ANSI
X#if defined(__STDC__) || defined(__TURBOC__)
X#define ANSI(x) x
X#else
X#define ANSI(x) ()
X#endif
X#endif
X
Xextern int exec ANSI((int, char far *, char far *, unsigned int, char far *));
X
X#ifndef MK_FP
X#define MK_FP(seg,ofs) \
X ((void far *) (((unsigned long)(seg) << 16) | (unsigned)(ofs)))
X#endif
X
X#endif
END_OF_FILE
if test 351 -ne `wc -c <'dmake/msdos/exec.h'`; then
echo shar: \"'dmake/msdos/exec.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/exec.h'
fi
if test -f 'dmake/msdos/mscdos/lib.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/lib.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/lib.rsp'\" \(1 character\)
sed "s/^X//" >'dmake/msdos/mscdos/lib.rsp' <<'END_OF_FILE'
X
END_OF_FILE
if test 1 -ne `wc -c <'dmake/msdos/mscdos/lib.rsp'`; then
echo shar: \"'dmake/msdos/mscdos/lib.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/lib.rsp'
fi
if test -f 'dmake/msdos/mscdos/libswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/libswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/libswp.rsp'\" \(1 character\)
sed "s/^X//" >'dmake/msdos/mscdos/libswp.rsp' <<'END_OF_FILE'
X
END_OF_FILE
if test 1 -ne `wc -c <'dmake/msdos/mscdos/libswp.rsp'`; then
echo shar: \"'dmake/msdos/mscdos/libswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/libswp.rsp'
fi
if test -f 'dmake/msdos/mscdos/obj.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/obj.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/obj.rsp'\" \(611 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/obj.rsp' <<'END_OF_FILE'
Xobjects\tee.obj+
Xobjects\dirlib.obj+
Xobjects\dcache.obj+
Xobjects\tempnam.obj
END_OF_FILE
if test 611 -ne `wc -c <'dmake/msdos/mscdos/obj.rsp'`; then
echo shar: \"'dmake/msdos/mscdos/obj.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/obj.rsp'
fi
if test -f 'dmake/msdos/mscdos/objswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/objswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/objswp.rsp'\" \(649 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/objswp.rsp' <<'END_OF_FILE'
END_OF_FILE
if test 649 -ne `wc -c <'dmake/msdos/mscdos/objswp.rsp'`; then
echo shar: \"'dmake/msdos/mscdos/objswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/objswp.rsp'
fi
if test -f 'dmake/msdos/mscdos/optoff.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/mscdos/optoff.h'\"
else
echo shar: Extracting \"'dmake/msdos/mscdos/optoff.h'\" \(49 characters\)
sed "s/^X//" >'dmake/msdos/mscdos/optoff.h' <<'END_OF_FILE'
X#if _MSC_VER < 600
X# pragma loop_opt(off)
X#endif
END_OF_FILE
if test 49 -ne `wc -c <'dmake/msdos/mscdos/optoff.h'`; then
echo shar: \"'dmake/msdos/mscdos/optoff.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/mscdos/optoff.h'
fi
if test -f 'dmake/msdos/startup.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/startup.h'\"
else
echo shar: Extracting \"'dmake/msdos/startup.h'\" \(392 characters\)
sed "s/^X//" >'dmake/msdos/startup.h' <<'END_OF_FILE'
X/* This file contains the default value of the MAKESTARTUP variable.
X * You must set the quoted string below to the default path to the startup
X * variable, so that it gets compiled in. LEAVE ROOTDIR at the front of
X * the path. This allows the user to customize his environment for dmake
X * by setting up a new ROOTDIR environment variable. */
X
X"MAKESTARTUP := $(ROOTDIR)/etc/startup.mk",
END_OF_FILE
if test 392 -ne `wc -c <'dmake/msdos/startup.h'`; then
echo shar: \"'dmake/msdos/startup.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/startup.h'
fi
if test -f 'dmake/msdos/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/stdarg.h'\"
else
echo shar: Extracting \"'dmake/msdos/stdarg.h'\" \(417 characters\)
sed "s/^X//" >'dmake/msdos/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
X#if !defined(__STDARG)
X#define __STDARG
X
X#if !defined(ZTC)
X#define __ss
X#endif
X
Xtypedef char __ss *va_list;
X
X#define va_dcl int va_alist
X#define va_start(ap,v) ap = (va_list)&va_alist
X#define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
X#define va_end(ap) ap = NULL
X#endif
END_OF_FILE
if test 417 -ne `wc -c <'dmake/msdos/stdarg.h'`; then
echo shar: \"'dmake/msdos/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/stdarg.h'
fi
if test -f 'dmake/msdos/sysintf.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/sysintf.h'\"
else
echo shar: Extracting \"'dmake/msdos/sysintf.h'\" \(438 characters\)
sed "s/^X//" >'dmake/msdos/sysintf.h' <<'END_OF_FILE'
X/*
X** assorted bits of system interface
X*/
X
X#define STAT stat
X#define VOID_LCACHE(l,m)
X#define GETPID _psp
X
Xextern char * tempnam();
Xextern char * getcwd();
X
X/*
X** standard C items
X*/
X
X/*
X** DOS interface standard items
X*/
X#define chdir(p) _chdir(p)
X
X/*
X** make parameters
X*/
X#ifdef _POSIX_NAME_MAX
X#undef _POSIX_NAME_MAX
X#endif
X#define _POSIX_NAME_MAX 12
X
X#ifdef _POSIX_PATH_MAX
X#undef _POSIX_PATH_MAX
X#endif
X#define _POSIX_PATH_MAX 64
END_OF_FILE
if test 438 -ne `wc -c <'dmake/msdos/sysintf.h'`; then
echo shar: \"'dmake/msdos/sysintf.h'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/sysintf.h'
fi
if test -f 'dmake/msdos/tccdos/lib.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/lib.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/lib.rsp'\" \(17 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/lib.rsp' <<'END_OF_FILE'
Xd:\cc\tcc\lib\cl
END_OF_FILE
if test 17 -ne `wc -c <'dmake/msdos/tccdos/lib.rsp'`; then
echo shar: \"'dmake/msdos/tccdos/lib.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/lib.rsp'
fi
if test -f 'dmake/msdos/tccdos/libswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/libswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/libswp.rsp'\" \(17 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/libswp.rsp' <<'END_OF_FILE'
Xd:\cc\tcc\lib\cl
END_OF_FILE
if test 17 -ne `wc -c <'dmake/msdos/tccdos/libswp.rsp'`; then
echo shar: \"'dmake/msdos/tccdos/libswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/libswp.rsp'
fi
if test -f 'dmake/msdos/tccdos/obj.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/obj.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/obj.rsp'\" \(653 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/obj.rsp' <<'END_OF_FILE'
Xd:\cc\tcc\lib\c0l.obj+
Xobjects\tee.obj+
Xobjects\dirlib.obj+
Xobjects\dcache.obj+
Xobjects\tempnam.obj+
Xobjects\utime.obj
END_OF_FILE
if test 653 -ne `wc -c <'dmake/msdos/tccdos/obj.rsp'`; then
echo shar: \"'dmake/msdos/tccdos/obj.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/obj.rsp'
fi
if test -f 'dmake/msdos/tccdos/objswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/tccdos/objswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/tccdos/objswp.rsp'\" \(691 characters\)
sed "s/^X//" >'dmake/msdos/tccdos/objswp.rsp' <<'END_OF_FILE'
Xd:\cc\tcc\lib\c0l.obj+
END_OF_FILE
if test 691 -ne `wc -c <'dmake/msdos/tccdos/objswp.rsp'`; then
echo shar: \"'dmake/msdos/tccdos/objswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/tccdos/objswp.rsp'
fi
if test -f 'dmake/msdos/ztcdos/environ.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/environ.c'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/environ.c'\" \(473 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/environ.c' <<'END_OF_FILE'
X/*LINTLIBRARY*/
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X#include "alloc.h"
X
X/* ZTC++ doesn't have environ, so we have to create one. */
X
Xextern char *_envptr;
Xchar **environ = { NULL };
X
Xvoid
Xmake_env()
X{
X int i;
X char *cp;
X
X for (i = 0, cp = _envptr; *cp; i++, cp += strlen(cp)+1)
X ;
X
X TALLOC(environ, i+1, char*);
X
X for (i = 0, cp = _envptr; *cp; i++, cp += strlen(cp)+1)
X environ[i] = cp;
X
X return;
X}
X
Xvoid
Xfree_env()
X{
X FREE(environ);
X
X return;
X}
END_OF_FILE
if test 473 -ne `wc -c <'dmake/msdos/ztcdos/environ.c'`; then
echo shar: \"'dmake/msdos/ztcdos/environ.c'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/environ.c'
fi
if test -f 'dmake/msdos/ztcdos/lib.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/lib.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/lib.rsp'\" \(1 character\)
sed "s/^X//" >'dmake/msdos/ztcdos/lib.rsp' <<'END_OF_FILE'
X
END_OF_FILE
if test 1 -ne `wc -c <'dmake/msdos/ztcdos/lib.rsp'`; then
echo shar: \"'dmake/msdos/ztcdos/lib.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/lib.rsp'
fi
if test -f 'dmake/msdos/ztcdos/libswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/libswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/libswp.rsp'\" \(1 character\)
sed "s/^X//" >'dmake/msdos/ztcdos/libswp.rsp' <<'END_OF_FILE'
X
END_OF_FILE
if test 1 -ne `wc -c <'dmake/msdos/ztcdos/libswp.rsp'`; then
echo shar: \"'dmake/msdos/ztcdos/libswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/libswp.rsp'
fi
if test -f 'dmake/msdos/ztcdos/obj.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/obj.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/obj.rsp'\" \(632 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/obj.rsp' <<'END_OF_FILE'
Xobjects\tee.obj+
Xobjects\dirlib.obj+
Xobjects\dcache.obj+
Xobjects\tempnam.obj+
Xobjects\environ.obj
END_OF_FILE
if test 632 -ne `wc -c <'dmake/msdos/ztcdos/obj.rsp'`; then
echo shar: \"'dmake/msdos/ztcdos/obj.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/obj.rsp'
fi
if test -f 'dmake/msdos/ztcdos/objswp.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/msdos/ztcdos/objswp.rsp'\"
else
echo shar: Extracting \"'dmake/msdos/ztcdos/objswp.rsp'\" \(644 characters\)
sed "s/^X//" >'dmake/msdos/ztcdos/objswp.rsp' <<'END_OF_FILE'
X_swapl.obj+
Xobjects\tee.obj+
Xobjects\dirlib.obj+
Xobjects\dcache.obj+
Xobjects\tempnam.obj+
Xobjects\environ.obj
END_OF_FILE
if test 644 -ne `wc -c <'dmake/msdos/ztcdos/objswp.rsp'`; then
echo shar: \"'dmake/msdos/ztcdos/objswp.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/msdos/ztcdos/objswp.rsp'
fi
if test -f 'dmake/os2/dmake.cs' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/dmake.cs'\"
else
echo shar: Extracting \"'dmake/os2/dmake.cs'\" \(408 characters\)
sed "s/^X//" >'dmake/os2/dmake.cs' <<'END_OF_FILE'
X(-I. -Ios2 -Ios2\mscdos -DOS2 -D__STDC__=1 -W1
Xinfer.c make.c stat.c expand.c dmstring.c hash.c dag.c dmake.c
Xpath.c imacs.c sysintf.c parse.c getinp.c quit.c state.c
Xbasename.c dmdump.c macparse.c rulparse.c percent.c function.c
Xos2\ruletab.c os2\runargv.c os2\_chdir.c os2\switchar.c
Xmsdos\dirbrk.c msdos\arlib.c unix\rmprq.c os2\mscdos\tempnam.c
X)
X
Xdmake.exe
Xos2\dmake.def
Xos2\dmake.bad
X
X-AL -LB -S0x2000
END_OF_FILE
if test 408 -ne `wc -c <'dmake/os2/dmake.cs'`; then
echo shar: \"'dmake/os2/dmake.cs'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/dmake.cs'
# end of 'dmake/os2/dmake.cs'
fi
if test -f 'dmake/os2/dmake.def' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/dmake.def'\"
else
echo shar: Extracting \"'dmake/os2/dmake.def'\" \(121 characters\)
sed "s/^X//" >'dmake/os2/dmake.def' <<'END_OF_FILE'
XNAME DMAKE WINDOWCOMPAT NEWFILES
XDESCRIPTION 'DMAKE Version 3.8 - for MS-DOS and OS/2'
X
X; IMPORTS
X; SESMGR.DOSSMSETTITLE
END_OF_FILE
if test 121 -ne `wc -c <'dmake/os2/dmake.def'`; then
echo shar: \"'dmake/os2/dmake.def'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/dmake.def'
# end of 'dmake/os2/dmake.def'
fi
if test -f 'dmake/os2/ibm/obj.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/obj.rsp'\"
else
echo shar: Extracting \"'dmake/os2/ibm/obj.rsp'\" \(554 characters\)
sed "s/^X//" >'dmake/os2/ibm/obj.rsp' <<'END_OF_FILE'
Xobjects\infer.obj+
Xobjects\make.obj+
Xobjects\stat.obj+
Xobjects\expand.obj+
Xobjects\dmstring.obj+
Xobjects\hash.obj+
Xobjects\dag.obj+
Xobjects\dmake.obj+
Xobjects\path.obj+
Xobjects\imacs.obj+
Xobjects\sysintf.obj+
Xobjects\parse.obj+
Xobjects\getinp.obj+
Xobjects\quit.obj+
Xobjects\state.obj+
Xobjects\dmdump.obj+
Xobjects\macparse.obj+
Xobjects\rulparse.obj+
Xobjects\percent.obj+
Xobjects\function.obj+
Xobjects\ruletab.obj+
Xobjects\runargv.obj+
Xobjects\_chdir.obj+
Xobjects\switchar.obj+
Xobjects\dirbrk.obj+
Xobjects\arlib.obj+
Xobjects\rmprq.obj+
Xobjects\tempnam.obj
END_OF_FILE
if test 554 -ne `wc -c <'dmake/os2/ibm/obj.rsp'`; then
echo shar: \"'dmake/os2/ibm/obj.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/obj.rsp'
fi
if test -f 'dmake/os2/ibm/optoff.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/optoff.h'\"
else
echo shar: Extracting \"'dmake/os2/ibm/optoff.h'\" \(49 characters\)
sed "s/^X//" >'dmake/os2/ibm/optoff.h' <<'END_OF_FILE'
X#if _MSC_VER < 600
X# pragma loop_opt(off)
X#endif
END_OF_FILE
if test 49 -ne `wc -c <'dmake/os2/ibm/optoff.h'`; then
echo shar: \"'dmake/os2/ibm/optoff.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/optoff.h'
fi
if test -f 'dmake/os2/ibm/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/startup.mk'\"
else
echo shar: Extracting \"'dmake/os2/ibm/startup.mk'\" \(132 characters\)
sed "s/^X//" >'dmake/os2/ibm/startup.mk' <<'END_OF_FILE'
X#NOTE: startup.mk file is called dmake.ini for OS/2
X# and is found in os2/mscdos/dmake.ini
X.INCLUDE : "os2/mscdos/dmake.ini"
END_OF_FILE
if test 132 -ne `wc -c <'dmake/os2/ibm/startup.mk'`; then
echo shar: \"'dmake/os2/ibm/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/startup.mk'
fi
if test -f 'dmake/os2/ibm/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/stdarg.h'\"
else
echo shar: Extracting \"'dmake/os2/ibm/stdarg.h'\" \(373 characters\)
sed "s/^X//" >'dmake/os2/ibm/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
X#if !defined(__STDARG)
X#define __STDARG
X
Xtypedef char *va_list;
X
X#define va_dcl int va_alist
X#define va_start(ap,v) ap = (va_list)&va_alist
X#define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
X#define va_end(ap) ap = NULL
X#endif
END_OF_FILE
if test 373 -ne `wc -c <'dmake/os2/ibm/stdarg.h'`; then
echo shar: \"'dmake/os2/ibm/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/stdarg.h'
fi
if test -f 'dmake/os2/mscdos/lib.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/lib.rsp'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/lib.rsp'\" \(21 characters\)
sed "s/^X//" >'dmake/os2/mscdos/lib.rsp' <<'END_OF_FILE'
X\NOD:LLIBCE+
XLLIBCEP
END_OF_FILE
if test 21 -ne `wc -c <'dmake/os2/mscdos/lib.rsp'`; then
echo shar: \"'dmake/os2/mscdos/lib.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/lib.rsp'
fi
if test -f 'dmake/os2/mscdos/obj.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/obj.rsp'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/obj.rsp'\" \(554 characters\)
sed "s/^X//" >'dmake/os2/mscdos/obj.rsp' <<'END_OF_FILE'
Xobjects\infer.obj+
Xobjects\make.obj+
Xobjects\stat.obj+
Xobjects\expand.obj+
Xobjects\dmstring.obj+
Xobjects\hash.obj+
Xobjects\dag.obj+
Xobjects\dmake.obj+
Xobjects\path.obj+
Xobjects\imacs.obj+
Xobjects\sysintf.obj+
Xobjects\parse.obj+
Xobjects\getinp.obj+
Xobjects\quit.obj+
Xobjects\state.obj+
Xobjects\dmdump.obj+
Xobjects\macparse.obj+
Xobjects\rulparse.obj+
Xobjects\percent.obj+
Xobjects\function.obj+
Xobjects\ruletab.obj+
Xobjects\runargv.obj+
Xobjects\_chdir.obj+
Xobjects\switchar.obj+
Xobjects\dirbrk.obj+
Xobjects\arlib.obj+
Xobjects\rmprq.obj+
Xobjects\tempnam.obj
END_OF_FILE
if test 554 -ne `wc -c <'dmake/os2/mscdos/obj.rsp'`; then
echo shar: \"'dmake/os2/mscdos/obj.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/obj.rsp'
fi
if test -f 'dmake/os2/mscdos/optoff.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/optoff.h'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/optoff.h'\" \(49 characters\)
sed "s/^X//" >'dmake/os2/mscdos/optoff.h' <<'END_OF_FILE'
X#if _MSC_VER < 600
X# pragma loop_opt(off)
X#endif
END_OF_FILE
if test 49 -ne `wc -c <'dmake/os2/mscdos/optoff.h'`; then
echo shar: \"'dmake/os2/mscdos/optoff.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/optoff.h'
fi
if test -f 'dmake/os2/mscdos/startup.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/mscdos/startup.mk'\"
else
echo shar: Extracting \"'dmake/os2/mscdos/startup.mk'\" \(132 characters\)
sed "s/^X//" >'dmake/os2/mscdos/startup.mk' <<'END_OF_FILE'
X#NOTE: startup.mk file is called dmake.ini for OS/2
X# and is found in os2/mscdos/dmake.ini
X.INCLUDE : "os2/mscdos/dmake.ini"
END_OF_FILE
if test 132 -ne `wc -c <'dmake/os2/mscdos/startup.mk'`; then
echo shar: \"'dmake/os2/mscdos/startup.mk'\" unpacked with wrong size!
fi
# end of 'dmake/os2/mscdos/startup.mk'
fi
if test -f 'dmake/os2/optoff.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/optoff.h'\"
else
echo shar: Extracting \"'dmake/os2/optoff.h'\" \(49 characters\)
sed "s/^X//" >'dmake/os2/optoff.h' <<'END_OF_FILE'
X#if _MSC_VER < 600
X# pragma loop_opt(off)
X#endif
END_OF_FILE
if test 49 -ne `wc -c <'dmake/os2/optoff.h'`; then
echo shar: \"'dmake/os2/optoff.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/optoff.h'
fi
if test -f 'dmake/os2/startup.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/startup.h'\"
else
echo shar: Extracting \"'dmake/os2/startup.h'\" \(384 characters\)
sed "s/^X//" >'dmake/os2/startup.h' <<'END_OF_FILE'
X/* This file contains the default value of the MAKESTARTUP variable.
X * You must set the quoted string below to the default path to the startup
X * variable, so that it gets compiled in. LEAVE ROOTDIR at the front of
X * the path. This allows the user to customize his environment for dmake
X * by setting up a new ROOTDIR environment variable. */
X
X"MAKESTARTUP := $(INIT)/dmake.ini",
END_OF_FILE
if test 384 -ne `wc -c <'dmake/os2/startup.h'`; then
echo shar: \"'dmake/os2/startup.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/startup.h'
fi
if test -f 'dmake/os2/sysintf.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/sysintf.h'\"
else
echo shar: Extracting \"'dmake/os2/sysintf.h'\" \(544 characters\)
sed "s/^X//" >'dmake/os2/sysintf.h' <<'END_OF_FILE'
X/*
X** assorted bits of system interface
X*/
X
X#define STAT stat
X#define VOID_LCACHE(l,m)
X#define Hook_std_writes(A)
X#define GETPID getpid()
X
Xextern char * tempnam();
Xextern char * getcwd();
X
X
X/* for directory cache */
X#define CacheStat(A,B) really_dostat(A,&buf)
X
X
X/*
X** standard C items
X*/
X
X/*
X** DOS interface standard items
X*/
X#define chdir(p) _chdir(p)
X
X/*
X** make parameters
X*/
X#ifdef _POSIX_NAME_MAX
X#undef _POSIX_NAME_MAX
X#endif
X#define _POSIX_NAME_MAX 12
X
X#ifdef _POSIX_PATH_MAX
X#undef _POSIX_PATH_MAX
X#endif
X#define _POSIX_PATH_MAX 255
END_OF_FILE
if test 544 -ne `wc -c <'dmake/os2/sysintf.h'`; then
echo shar: \"'dmake/os2/sysintf.h'\" unpacked with wrong size!
fi
# end of 'dmake/os2/sysintf.h'
fi
if test -f 'dmake/patchlvl.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/patchlvl.h'\"
else
echo shar: Extracting \"'dmake/patchlvl.h'\" \(88 characters\)
sed "s/^X//" >'dmake/patchlvl.h' <<'END_OF_FILE'
X/* dmake patch level, reset to 0 for each new version release. */
X
X#define PATCHLEVEL 0
END_OF_FILE
if test 88 -ne `wc -c <'dmake/patchlvl.h'`; then
echo shar: \"'dmake/patchlvl.h'\" unpacked with wrong size!
fi
# end of 'dmake/patchlvl.h'
fi
if test -f 'dmake/qnx/startup.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/startup.h'\"
else
echo shar: Extracting \"'dmake/qnx/startup.h'\" \(402 characters\)
sed "s/^X//" >'dmake/qnx/startup.h' <<'END_OF_FILE'
X/* This file contains the default value of the MAKESTARTUP variable.
X * You must set the quoted string below to the default path to the startup
X * variable, so that it gets compiled in. LEAVE ROOTDIR at the front of
X * the path. This allows the user to customize his environment for dmake
X * by setting up a new ROOTDIR environment variable. */
X
X"MAKESTARTUP := $(ROOTDIR)/usr/local/lib/startup.mk",
END_OF_FILE
if test 402 -ne `wc -c <'dmake/qnx/startup.h'`; then
echo shar: \"'dmake/qnx/startup.h'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/startup.h'
fi
if test -f 'dmake/qnx/stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/stdlib.h'\"
else
echo shar: Extracting \"'dmake/qnx/stdlib.h'\" \(428 characters\)
sed "s/^X//" >'dmake/qnx/stdlib.h' <<'END_OF_FILE'
X#ifndef _STDLIB_INCLUDED_
X#define _STDLIB_INCLUDED_
X
Xextern /*GOTO*/ _exit();
Xextern /*GOTO*/ exit();
Xextern /*GOTO*/ abort();
Xextern int system();
Xextern char *getenv();
Xextern char *calloc();
Xextern char *malloc();
Xextern char *realloc();
X
X#ifndef _AIX
X/* The AIX compiler dies on illegal redefinition of free */
Xextern free();
X#endif
X
Xextern int errno;
X
X#ifndef EIO
X# include <errno.h>
X#endif
X
X#endif /* _STDLIB_INCLUDED_ */
END_OF_FILE
if test 428 -ne `wc -c <'dmake/qnx/stdlib.h'`; then
echo shar: \"'dmake/qnx/stdlib.h'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/stdlib.h'
fi
if test -f 'dmake/qnx/sysintf.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/sysintf.h'\"
else
echo shar: Extracting \"'dmake/qnx/sysintf.h'\" \(391 characters\)
sed "s/^X//" >'dmake/qnx/sysintf.h' <<'END_OF_FILE'
X/*
X** assorted bits of system interface, for common routines inside dmake.
X** System specific code can be found in the config.h files for each
X** of the system specifications.
X*/
X#define STAT stat
X#define VOID_LCACHE(l,m)
X#define Hook_std_writes(A)
X#define GETPID getpid()
X
X/*
X** standard C items
X*/
X
X/*
X** DOS interface standard items
X*/
X#define getswitchar() '-'
X
X/*
X** make parameters
X*/
END_OF_FILE
if test 391 -ne `wc -c <'dmake/qnx/sysintf.h'`; then
echo shar: \"'dmake/qnx/sysintf.h'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/sysintf.h'
fi
if test -f 'dmake/qnx/time.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/qnx/time.h'\"
else
echo shar: Extracting \"'dmake/qnx/time.h'\" \(133 characters\)
sed "s/^X//" >'dmake/qnx/time.h' <<'END_OF_FILE'
X/*
X** Berkeley get this wrong!
X*/
X#ifndef TIME_h
X#define TIME_h
X
Xtypedef long time_t; /* this is the thing we use */
X
X#endif TIME_h
X
END_OF_FILE
if test 133 -ne `wc -c <'dmake/qnx/time.h'`; then
echo shar: \"'dmake/qnx/time.h'\" unpacked with wrong size!
fi
# end of 'dmake/qnx/time.h'
fi
if test -f 'dmake/readme/qnx' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/readme/qnx'\"
else
echo shar: Extracting \"'dmake/readme/qnx'\" \(309 characters\)
sed "s/^X//" >'dmake/readme/qnx' <<'END_OF_FILE'
XQNX differs from UNIX only in that the library format is that of MSDOS and
Xas such the normal stating of library members does not work. QNX versions of
Xdmake stat the library instead of the members (as does the MSDOS
Ximplementation). Otherwise see the readme/unix file for further unix related
Xinformation.
END_OF_FILE
if test 309 -ne `wc -c <'dmake/readme/qnx'`; then
echo shar: \"'dmake/readme/qnx'\" unpacked with wrong size!
fi
# end of 'dmake/readme/qnx'
fi
if test -f 'dmake/startup.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/startup.h'\"
else
echo shar: Extracting \"'dmake/startup.h'\" \(408 characters\)
sed "s/^X//" >'dmake/startup.h' <<'END_OF_FILE'
X/* This file contains the default value of the MAKESTARTUP variable.
X * You must set the quoted string below to the default path to the startup
X * variable, so that it gets compiled in. LEAVE ROOTDIR at the front of
X * the path. This allows the user to customize his environment for dmake
X * by setting up a new ROOTDIR environment variable. */
X
X"MAKESTARTUP := $(ROOTDIR)/usr/local/lib/dmake/startup.mk",
END_OF_FILE
if test 408 -ne `wc -c <'dmake/startup.h'`; then
echo shar: \"'dmake/startup.h'\" unpacked with wrong size!
fi
# end of 'dmake/startup.h'
fi
if test -f 'dmake/tos/startup.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/startup.h'\"
else
echo shar: Extracting \"'dmake/tos/startup.h'\" \(392 characters\)
sed "s/^X//" >'dmake/tos/startup.h' <<'END_OF_FILE'
X/* This file contains the default value of the MAKESTARTUP variable.
X * You must set the quoted string below to the default path to the startup
X * variable, so that it gets compiled in. LEAVE ROOTDIR at the front of
X * the path. This allows the user to customize his environment for dmake
X * by setting up a new ROOTDIR environment variable. */
X
X"MAKESTARTUP := $(ROOTDIR)/etc/startup.mk",
END_OF_FILE
if test 392 -ne `wc -c <'dmake/tos/startup.h'`; then
echo shar: \"'dmake/tos/startup.h'\" unpacked with wrong size!
fi
# end of 'dmake/tos/startup.h'
fi
if test -f 'dmake/tos/sysintf.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/tos/sysintf.h'\"
else
echo shar: Extracting \"'dmake/tos/sysintf.h'\" \(487 characters\)
sed "s/^X//" >'dmake/tos/sysintf.h' <<'END_OF_FILE'
X/*
X** assorted bits of system interface, for common routines inside dmake.
X** System specific code can be found in the config.h files for each
X** of the system specifications.
X*/
X#define STAT stat
X#define VOID_LCACHE(l,m) (void) void_lcache(l,m)
X#define Hook_std_writes(A)
X#define GETPID getpid()
X
X/* for directory cache */
X#define CacheStat(A,B) really_dostat(A,&buf)
X
X/*
X** standard C items
X*/
X
X/*
X** DOS interface standard items
X*/
X#define getswitchar() '-'
X
X/*
X** make parameters
X*/
END_OF_FILE
if test 487 -ne `wc -c <'dmake/tos/sysintf.h'`; then
echo shar: \"'dmake/tos/sysintf.h'\" unpacked with wrong size!
fi
# end of 'dmake/tos/sysintf.h'
fi
if test -f 'dmake/unix/386ix/ar.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/ar.h'\"
else
echo shar: Extracting \"'dmake/unix/386ix/ar.h'\" \(46 characters\)
sed "s/^X//" >'dmake/unix/386ix/ar.h' <<'END_OF_FILE'
X#define PORTAR 1
X#include "/usr/include/ar.h"
END_OF_FILE
if test 46 -ne `wc -c <'dmake/unix/386ix/ar.h'`; then
echo shar: \"'dmake/unix/386ix/ar.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/ar.h'
fi
if test -f 'dmake/unix/386ix/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/386ix/stdarg.h'\" \(373 characters\)
sed "s/^X//" >'dmake/unix/386ix/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
X#if !defined(__STDARG)
X#define __STDARG
X
Xtypedef char *va_list;
X
X#define va_dcl int va_alist
X#define va_start(ap,v) ap = (va_list)&va_alist
X#define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
X#define va_end(ap) ap = NULL
X#endif
END_OF_FILE
if test 373 -ne `wc -c <'dmake/unix/386ix/stdarg.h'`; then
echo shar: \"'dmake/unix/386ix/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/stdarg.h'
fi
if test -f 'dmake/unix/386ix/stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/stdlib.h'\"
else
echo shar: Extracting \"'dmake/unix/386ix/stdlib.h'\" \(346 characters\)
sed "s/^X//" >'dmake/unix/386ix/stdlib.h' <<'END_OF_FILE'
X#ifndef _STDLIB_INCLUDED_
X#define _STDLIB_INCLUDED_
X
Xextern /*GOTO*/ _exit();
Xextern /*GOTO*/ exit();
Xextern /*GOTO*/ abort();
Xextern int system();
Xextern char *getenv();
Xextern char *calloc();
Xextern char *malloc();
Xextern char *realloc();
Xextern free();
Xextern int errno;
X
X#ifndef EIO
X# include <errno.h>
X#endif
X
X#endif /* _STDLIB_INCLUDED_ */
END_OF_FILE
if test 346 -ne `wc -c <'dmake/unix/386ix/stdlib.h'`; then
echo shar: \"'dmake/unix/386ix/stdlib.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/stdlib.h'
fi
if test -f 'dmake/unix/386ix/time.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/386ix/time.h'\"
else
echo shar: Extracting \"'dmake/unix/386ix/time.h'\" \(133 characters\)
sed "s/^X//" >'dmake/unix/386ix/time.h' <<'END_OF_FILE'
X/*
X** Berkeley get this wrong!
X*/
X#ifndef TIME_h
X#define TIME_h
X
Xtypedef long time_t; /* this is the thing we use */
X
X#endif TIME_h
X
END_OF_FILE
if test 133 -ne `wc -c <'dmake/unix/386ix/time.h'`; then
echo shar: \"'dmake/unix/386ix/time.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/386ix/time.h'
fi
if test -f 'dmake/unix/bsd43/limits.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/limits.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/limits.h'\" \(149 characters\)
sed "s/^X//" >'dmake/unix/bsd43/limits.h' <<'END_OF_FILE'
X#include <sys/types.h>
X#include <sys/dirent.h>
X#include <sys/param.h>
X
X#define NAME_MAX MAXNAMLEN
X#define PATH_MAX MAXPATHLEN
X#define CHILD_MAX 20
END_OF_FILE
if test 149 -ne `wc -c <'dmake/unix/bsd43/limits.h'`; then
echo shar: \"'dmake/unix/bsd43/limits.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/limits.h'
fi
if test -f 'dmake/unix/bsd43/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/stdarg.h'\" \(408 characters\)
sed "s/^X//" >'dmake/unix/bsd43/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
Xtypedef char *va_list;
X
X#if defined(sparc)
X# define va_alist __builtin_va_alist
X#endif
X# define va_dcl int va_alist
X# define va_start(list,v) list = (char *)&va_alist
X# define va_end(list) list = NULL
X# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
END_OF_FILE
if test 408 -ne `wc -c <'dmake/unix/bsd43/stdarg.h'`; then
echo shar: \"'dmake/unix/bsd43/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/stdarg.h'
fi
if test -f 'dmake/unix/bsd43/stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/stdlib.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/stdlib.h'\" \(346 characters\)
sed "s/^X//" >'dmake/unix/bsd43/stdlib.h' <<'END_OF_FILE'
X#ifndef _STDLIB_INCLUDED_
X#define _STDLIB_INCLUDED_
X
Xextern /*GOTO*/ _exit();
Xextern /*GOTO*/ exit();
Xextern /*GOTO*/ abort();
Xextern int system();
Xextern char *getenv();
Xextern char *calloc();
Xextern char *malloc();
Xextern char *realloc();
Xextern free();
Xextern int errno;
X
X#ifndef EIO
X# include <errno.h>
X#endif
X
X#endif /* _STDLIB_INCLUDED_ */
END_OF_FILE
if test 346 -ne `wc -c <'dmake/unix/bsd43/stdlib.h'`; then
echo shar: \"'dmake/unix/bsd43/stdlib.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/stdlib.h'
fi
if test -f 'dmake/unix/bsd43/string.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/string.h'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/string.h'\" \(292 characters\)
sed "s/^X//" >'dmake/unix/bsd43/string.h' <<'END_OF_FILE'
X/*
X** BSD does this wrong
X*/
X#include <strings.h>
X
X#include "stdmacs.h"
Xextern char* strpbrk ANSI((char* src, char* any));
X
X#ifndef DBUG
X#define strchr(str,c) index(str,c)
X#define strrchr(str,c) rindex(str,c)
X#else
Xchar *strchr ANSI((char*, char));
Xchar *strrchr ANSI((char*, char));
X#endif
X
END_OF_FILE
if test 292 -ne `wc -c <'dmake/unix/bsd43/string.h'`; then
echo shar: \"'dmake/unix/bsd43/string.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/string.h'
fi
if test -f 'dmake/unix/bsd43/uw/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/uw/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/uw/config.mk'\" \(521 characters\)
sed "s/^X//" >'dmake/unix/bsd43/uw/config.mk' <<'END_OF_FILE'
X# This is the BSD 4.3 University of Waterloo (uw) UNIX configuration file
X# for DMAKE
X# It simply modifies the values of LDLIBS to include libuw.a
X# so that vfprintf can be found.
X#
X
XLDLIBS += -luw
Xosredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
XCFLAGS += -I$(osredir)
X
X# install script for UW's /usr/software hierarchy...
Xinstall:
X mkdir ../bin; strip ./dmake; mv ./dmake ../bin
X chmod a+rx ../bin/dmake ../bin
X mkdir ../lib; chmod a+rx ../lib
X cp $(STARTUPFILE) ../lib
X chmod a+r ../lib/startup.mk
END_OF_FILE
if test 521 -ne `wc -c <'dmake/unix/bsd43/uw/config.mk'`; then
echo shar: \"'dmake/unix/bsd43/uw/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/uw/config.mk'
fi
if test -f 'dmake/unix/bsd43/vf/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/vf/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/vf/config.mk'\" \(317 characters\)
sed "s/^X//" >'dmake/unix/bsd43/vf/config.mk' <<'END_OF_FILE'
X# This config file adds vfprintf.c and memcpy.c for those systems that
X# do not have it.
X#
X
Xosredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
XCFLAGS += -I$(osredir)
X
X# The following sources are required for BSD4.3
XOSDESRC := memcpy.c vfprintf.c
XSRC += $(OSDESRC)
X.SETDIR=$(osredir) : $(OSDESRC)
END_OF_FILE
if test 317 -ne `wc -c <'dmake/unix/bsd43/vf/config.mk'`; then
echo shar: \"'dmake/unix/bsd43/vf/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/vf/config.mk'
fi
if test -f 'dmake/unix/bsd43/vf/memcpy.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/bsd43/vf/memcpy.c'\"
else
echo shar: Extracting \"'dmake/unix/bsd43/vf/memcpy.c'\" \(137 characters\)
sed "s/^X//" >'dmake/unix/bsd43/vf/memcpy.c' <<'END_OF_FILE'
Xchar *
Xmemcpy(t, f, n)
Xregister char *t, *f;
Xregister n;
X{
X register char *p = t;
X
X while( --n >= 0 ) *t++ = *f++;
X
X return (p);
X}
END_OF_FILE
if test 137 -ne `wc -c <'dmake/unix/bsd43/vf/memcpy.c'`; then
echo shar: \"'dmake/unix/bsd43/vf/memcpy.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/bsd43/vf/memcpy.c'
fi
if test -f 'dmake/unix/coherent/getcwd.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/getcwd.c'\"
else
echo shar: Extracting \"'dmake/unix/coherent/getcwd.c'\" \(306 characters\)
sed "s/^X//" >'dmake/unix/coherent/getcwd.c' <<'END_OF_FILE'
X#if __STDC__
Xchar *getcwd(char *buffer, int length)
X#else
Xchar *getcwd (buffer, length)
Xchar *buffer;
Xint length;
X#endif
X{
X extern char *getwd();
X
X char *dir;
X dir = getwd();
X if (dir)
X {
X strncpy(buffer,dir,length);
X return buffer;
X }
X else
X {
X *buffer = 0;
X return (char *) 0;
X }
X}
X
END_OF_FILE
if test 306 -ne `wc -c <'dmake/unix/coherent/getcwd.c'`; then
echo shar: \"'dmake/unix/coherent/getcwd.c'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/getcwd.c'
fi
if test -f 'dmake/unix/coherent/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/coherent/stdarg.h'\" \(469 characters\)
sed "s/^X//" >'dmake/unix/coherent/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
X#if !defined(__STDARG_H__)
X#define __STDARG_H__
X
X#if !defined(_VA_LIST_) && !defined(_VA_LIST)
X#define _VA_LIST_
X#define _VA_LIST
Xtypedef char *va_list;
X#endif
X
X#define va_dcl int va_alist
X#define va_start(ap,v) ap = (va_list)&va_alist
X#define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
X#define va_end(ap) ap = NULL
X#endif
END_OF_FILE
if test 469 -ne `wc -c <'dmake/unix/coherent/stdarg.h'`; then
echo shar: \"'dmake/unix/coherent/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/stdarg.h'
fi
if test -f 'dmake/unix/coherent/stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/stdlib.h'\"
else
echo shar: Extracting \"'dmake/unix/coherent/stdlib.h'\" \(346 characters\)
sed "s/^X//" >'dmake/unix/coherent/stdlib.h' <<'END_OF_FILE'
X#ifndef _STDLIB_INCLUDED_
X#define _STDLIB_INCLUDED_
X
Xextern /*GOTO*/ _exit();
Xextern /*GOTO*/ exit();
Xextern /*GOTO*/ abort();
Xextern int system();
Xextern char *getenv();
Xextern char *calloc();
Xextern char *malloc();
Xextern char *realloc();
Xextern free();
Xextern int errno;
X
X#ifndef EIO
X# include <errno.h>
X#endif
X
X#endif /* _STDLIB_INCLUDED_ */
END_OF_FILE
if test 346 -ne `wc -c <'dmake/unix/coherent/stdlib.h'`; then
echo shar: \"'dmake/unix/coherent/stdlib.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/stdlib.h'
fi
if test -f 'dmake/unix/coherent/time.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/coherent/time.h'\"
else
echo shar: Extracting \"'dmake/unix/coherent/time.h'\" \(133 characters\)
sed "s/^X//" >'dmake/unix/coherent/time.h' <<'END_OF_FILE'
X/*
X** Berkeley get this wrong!
X*/
X#ifndef TIME_h
X#define TIME_h
X
Xtypedef long time_t; /* this is the thing we use */
X
X#endif TIME_h
X
END_OF_FILE
if test 133 -ne `wc -c <'dmake/unix/coherent/time.h'`; then
echo shar: \"'dmake/unix/coherent/time.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/coherent/time.h'
fi
if test -f 'dmake/unix/solaris/gcc/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/gcc/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/solaris/gcc/config.mk'\" \(107 characters\)
sed "s/^X//" >'dmake/unix/solaris/gcc/config.mk' <<'END_OF_FILE'
X# This is the Solaris gcc configuration file for DMAKE
X# It modifies the value of CC to be gcc
X#
X
XCC = gcc
END_OF_FILE
if test 107 -ne `wc -c <'dmake/unix/solaris/gcc/config.mk'`; then
echo shar: \"'dmake/unix/solaris/gcc/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/gcc/config.mk'
fi
if test -f 'dmake/unix/solaris/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/solaris/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/solaris/stdarg.h'\" \(408 characters\)
sed "s/^X//" >'dmake/unix/solaris/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
Xtypedef char *va_list;
X
X#if defined(sparc)
X# define va_alist __builtin_va_alist
X#endif
X# define va_dcl int va_alist
X# define va_start(list,v) list = (char *)&va_alist
X# define va_end(list) list = NULL
X# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
END_OF_FILE
if test 408 -ne `wc -c <'dmake/unix/solaris/stdarg.h'`; then
echo shar: \"'dmake/unix/solaris/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/solaris/stdarg.h'
fi
if test -f 'dmake/unix/startup.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/startup.h'\"
else
echo shar: Extracting \"'dmake/unix/startup.h'\" \(408 characters\)
sed "s/^X//" >'dmake/unix/startup.h' <<'END_OF_FILE'
X/* This file contains the default value of the MAKESTARTUP variable.
X * You must set the quoted string below to the default path to the startup
X * variable, so that it gets compiled in. LEAVE ROOTDIR at the front of
X * the path. This allows the user to customize his environment for dmake
X * by setting up a new ROOTDIR environment variable. */
X
X"MAKESTARTUP := $(ROOTDIR)/usr/local/lib/dmake/startup.mk",
END_OF_FILE
if test 408 -ne `wc -c <'dmake/unix/startup.h'`; then
echo shar: \"'dmake/unix/startup.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/startup.h'
fi
if test -f 'dmake/unix/sysintf.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysintf.h'\"
else
echo shar: Extracting \"'dmake/unix/sysintf.h'\" \(415 characters\)
sed "s/^X//" >'dmake/unix/sysintf.h' <<'END_OF_FILE'
X/*
X** assorted bits of system interface, for common routines inside dmake.
X** System specific code can be found in the config.h files for each
X** of the system specifications.
X*/
X#define STAT stat
X#define VOID_LCACHE(l,m) (void) void_lcache(l,m)
X#define Hook_std_writes(A)
X#define GETPID getpid()
X
X/*
X** standard C items
X*/
X
X/*
X** DOS interface standard items
X*/
X#define getswitchar() '-'
X
X/*
X** Make parameters
X*/
END_OF_FILE
if test 415 -ne `wc -c <'dmake/unix/sysintf.h'`; then
echo shar: \"'dmake/unix/sysintf.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysintf.h'
fi
if test -f 'dmake/unix/sysvr1/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/stdarg.h'\" \(430 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
X#if !defined(__STDARG_H__)
X#define __STDARG_H__
X
X#if !defined(_VA_LIST_)
X#define _VA_LIST_
Xtypedef char *va_list;
X#endif
X
X#define va_dcl int va_alist
X#define va_start(ap,v) ap = (va_list)&va_alist
X#define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
X#define va_end(ap) ap = NULL
X#endif
END_OF_FILE
if test 430 -ne `wc -c <'dmake/unix/sysvr1/stdarg.h'`; then
echo shar: \"'dmake/unix/sysvr1/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/stdarg.h'
fi
if test -f 'dmake/unix/sysvr1/stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/stdlib.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/stdlib.h'\" \(346 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/stdlib.h' <<'END_OF_FILE'
X#ifndef _STDLIB_INCLUDED_
X#define _STDLIB_INCLUDED_
X
Xextern /*GOTO*/ _exit();
Xextern /*GOTO*/ exit();
Xextern /*GOTO*/ abort();
Xextern int system();
Xextern char *getenv();
Xextern char *calloc();
Xextern char *malloc();
Xextern char *realloc();
Xextern free();
Xextern int errno;
X
X#ifndef EIO
X# include <errno.h>
X#endif
X
X#endif /* _STDLIB_INCLUDED_ */
END_OF_FILE
if test 346 -ne `wc -c <'dmake/unix/sysvr1/stdlib.h'`; then
echo shar: \"'dmake/unix/sysvr1/stdlib.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/stdlib.h'
fi
if test -f 'dmake/unix/sysvr1/time.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr1/time.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr1/time.h'\" \(133 characters\)
sed "s/^X//" >'dmake/unix/sysvr1/time.h' <<'END_OF_FILE'
X/*
X** Berkeley get this wrong!
X*/
X#ifndef TIME_h
X#define TIME_h
X
Xtypedef long time_t; /* this is the thing we use */
X
X#endif TIME_h
X
END_OF_FILE
if test 133 -ne `wc -c <'dmake/unix/sysvr1/time.h'`; then
echo shar: \"'dmake/unix/sysvr1/time.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr1/time.h'
fi
if test -f 'dmake/unix/sysvr3/pwd/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/pwd/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/pwd/config.mk'\" \(559 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/pwd/config.mk' <<'END_OF_FILE'
X# This is the Sys VR3 PWD configuration file. It configures SysvR3 unix
X# versions of dmake to use a provided version of getcwd rather than the
X# standard library version that uses popen to capture the output of pwd.
X#
X
Xosredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
X
X# The following are required sources
XOSRESRC := getcwd.c
X
X.IF $(OSRESRC)
X SRC += $(OSRESRC)
X .SETDIR=$(osredir) : $(OSRESRC)
X.END
X
X.SOURCE.h : $(osredir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osredir)
END_OF_FILE
if test 559 -ne `wc -c <'dmake/unix/sysvr3/pwd/config.mk'`; then
echo shar: \"'dmake/unix/sysvr3/pwd/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/pwd/config.mk'
fi
if test -f 'dmake/unix/sysvr3/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/stdarg.h'\" \(578 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
X#if !defined(__STDARG_H__)
X#define __STDARG_H__
X
X#ifdef _AIX
X#define _ANSI_C_SOURCE
X#include </usr/include/stdarg.h>
X#define va_dcl int va_alist
X#else
X#if !defined(_VA_LIST_) && !defined(_VA_LIST)
X#define _VA_LIST_
X#define _VA_LIST
Xtypedef char *va_list;
X#endif
X
X#define va_dcl int va_alist
X#define va_start(ap,v) ap = (va_list)&va_alist
X#define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
X#define va_end(ap) ap = NULL
X#endif
X#endif
END_OF_FILE
if test 578 -ne `wc -c <'dmake/unix/sysvr3/stdarg.h'`; then
echo shar: \"'dmake/unix/sysvr3/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/stdarg.h'
fi
if test -f 'dmake/unix/sysvr3/time.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/sysvr3/time.h'\"
else
echo shar: Extracting \"'dmake/unix/sysvr3/time.h'\" \(133 characters\)
sed "s/^X//" >'dmake/unix/sysvr3/time.h' <<'END_OF_FILE'
X/*
X** Berkeley get this wrong!
X*/
X#ifndef TIME_h
X#define TIME_h
X
Xtypedef long time_t; /* this is the thing we use */
X
X#endif TIME_h
X
END_OF_FILE
if test 133 -ne `wc -c <'dmake/unix/sysvr3/time.h'`; then
echo shar: \"'dmake/unix/sysvr3/time.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/sysvr3/time.h'
fi
if test -f 'dmake/unix/xenix/pwd/config.mk' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/pwd/config.mk'\"
else
echo shar: Extracting \"'dmake/unix/xenix/pwd/config.mk'\" \(623 characters\)
sed "s/^X//" >'dmake/unix/xenix/pwd/config.mk' <<'END_OF_FILE'
X# This is the Sys VR3 PWD configuration file. It configures SysvR3 unix
X# versions of dmake to use a provided version of getcwd rather than the
X# standard library version that uses popen to capture the output of pwd.
X#
X
Xosredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
X
X# The following are required sources
XOSRESRC := getcwd.c
X
X.IF $(OSRESRC)
X SRC += $(OSRESRC)
X .SETDIR=$(osredir) : $(OSRESRC)
X.END
X
X.SOURCE.h : $(osredir)
X
X# Local configuration modifications for CFLAGS, there's local SysV includes
X# too.
XCFLAGS += -I$(osredir)
X
X# Xenix needs -lx in order to link successfully.
XLDLIBS += -lx
END_OF_FILE
if test 623 -ne `wc -c <'dmake/unix/xenix/pwd/config.mk'`; then
echo shar: \"'dmake/unix/xenix/pwd/config.mk'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/pwd/config.mk'
fi
if test -f 'dmake/unix/xenix/stdarg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/stdarg.h'\"
else
echo shar: Extracting \"'dmake/unix/xenix/stdarg.h'\" \(469 characters\)
sed "s/^X//" >'dmake/unix/xenix/stdarg.h' <<'END_OF_FILE'
X/*
X * stdarg.h
X *
X * defines ANSI style macros for accessing arguments of a function which takes
X * a variable number of arguments
X *
X */
X
X#if !defined(__STDARG_H__)
X#define __STDARG_H__
X
X#if !defined(_VA_LIST_) && !defined(_VA_LIST)
X#define _VA_LIST_
X#define _VA_LIST
Xtypedef char *va_list;
X#endif
X
X#define va_dcl int va_alist
X#define va_start(ap,v) ap = (va_list)&va_alist
X#define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
X#define va_end(ap) ap = NULL
X#endif
END_OF_FILE
if test 469 -ne `wc -c <'dmake/unix/xenix/stdarg.h'`; then
echo shar: \"'dmake/unix/xenix/stdarg.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/stdarg.h'
fi
if test -f 'dmake/unix/xenix/stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/stdlib.h'\"
else
echo shar: Extracting \"'dmake/unix/xenix/stdlib.h'\" \(428 characters\)
sed "s/^X//" >'dmake/unix/xenix/stdlib.h' <<'END_OF_FILE'
X#ifndef _STDLIB_INCLUDED_
X#define _STDLIB_INCLUDED_
X
Xextern /*GOTO*/ _exit();
Xextern /*GOTO*/ exit();
Xextern /*GOTO*/ abort();
Xextern int system();
Xextern char *getenv();
Xextern char *calloc();
Xextern char *malloc();
Xextern char *realloc();
X
X#ifndef _AIX
X/* The AIX compiler dies on illegal redefinition of free */
Xextern free();
X#endif
X
Xextern int errno;
X
X#ifndef EIO
X# include <errno.h>
X#endif
X
X#endif /* _STDLIB_INCLUDED_ */
END_OF_FILE
if test 428 -ne `wc -c <'dmake/unix/xenix/stdlib.h'`; then
echo shar: \"'dmake/unix/xenix/stdlib.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/stdlib.h'
fi
if test -f 'dmake/unix/xenix/time.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/unix/xenix/time.h'\"
else
echo shar: Extracting \"'dmake/unix/xenix/time.h'\" \(133 characters\)
sed "s/^X//" >'dmake/unix/xenix/time.h' <<'END_OF_FILE'
X/*
X** Berkeley get this wrong!
X*/
X#ifndef TIME_h
X#define TIME_h
X
Xtypedef long time_t; /* this is the thing we use */
X
X#endif TIME_h
X
END_OF_FILE
if test 133 -ne `wc -c <'dmake/unix/xenix/time.h'`; then
echo shar: \"'dmake/unix/xenix/time.h'\" unpacked with wrong size!
fi
# end of 'dmake/unix/xenix/time.h'
fi
echo shar: End of archive 26 \(of 27\).
cp /dev/null ark26isdone
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: dmake/os2/dmake.bad dmake/os2/ibm/lib.rsp dmake/version.h
# Wrapped by kent@sparky on Fri Oct 21 16:51:02 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 27 (of 27)."'
if test -f 'dmake/os2/dmake.bad' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/dmake.bad'\"
else
echo shar: Extracting \"'dmake/os2/dmake.bad'\" \(24 characters\)
sed "s/^X//" >'dmake/os2/dmake.bad' <<'END_OF_FILE'
XDOSCWAIT
XDOSKILLPROCESS
END_OF_FILE
if test 24 -ne `wc -c <'dmake/os2/dmake.bad'`; then
echo shar: \"'dmake/os2/dmake.bad'\" unpacked with wrong size!
fi
chmod +x 'dmake/os2/dmake.bad'
# end of 'dmake/os2/dmake.bad'
fi
if test -f 'dmake/os2/ibm/lib.rsp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/os2/ibm/lib.rsp'\"
else
echo shar: Extracting \"'dmake/os2/ibm/lib.rsp'\" \(21 characters\)
sed "s/^X//" >'dmake/os2/ibm/lib.rsp' <<'END_OF_FILE'
X\NOD:LLIBCE+
XLLIBCEP
END_OF_FILE
if test 21 -ne `wc -c <'dmake/os2/ibm/lib.rsp'`; then
echo shar: \"'dmake/os2/ibm/lib.rsp'\" unpacked with wrong size!
fi
# end of 'dmake/os2/ibm/lib.rsp'
fi
if test -f 'dmake/version.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dmake/version.h'\"
else
echo shar: Extracting \"'dmake/version.h'\" \(53 characters\)
sed "s/^X//" >'dmake/version.h' <<'END_OF_FILE'
X/* dmake version number. */
X
X#define VERSION "4.00"
END_OF_FILE
if test 53 -ne `wc -c <'dmake/version.h'`; then
echo shar: \"'dmake/version.h'\" unpacked with wrong size!
fi
# end of 'dmake/version.h'
fi
echo shar: End of archive 27 \(of 27\).
cp /dev/null ark27isdone