[comp.sources.misc] v19i042: dmake - dmake version 3.7, Part21/37

dvadura@watdragon.waterloo.edu (Dennis Vadura) (05/12/91)

Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
Posting-number: Volume 19, Issue 42
Archive-name: dmake/part21
Supersedes: dmake-3.6: Volume 15, Issue 52-77

---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is dmake.shar.21 (part 21 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file dmake/man/dmake.tf continued
#
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 21; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
if test -f _shar_wnt_.tmp; then
sed 's/^X//' << 'SHAR_EOF' >> 'dmake/man/dmake.tf' &&
as expected if AUGMAKE special target handling is enabled.  For example:
.sp
.nf
\tFRC:
\tmyprog.o : myprog.c $(FRC) ; ...
.fi
.sp
Works as expected if you issue the command
.sp
\t'\fBdmake\fP -A FRC=FRC'
.sp
but fails with a 'don't know how to make FRC'
error message if you do not specify AUGMAKE special target handling via
the -A flag (or by setting AUGMAKE:=yes internally).
.RE
.SH "LIMITS"
In some environments the length of an argument string is restricted.
(e.g. MSDOS command line arguments cannot be longer than 128 bytes if you are
using the standard command.com command interpreter as your shell,
.B dmake
text diversions may help in these situations.)
.SH "PORTABILITY"
To write makefiles that can be moved from one environment to another requires
some forethought.  In particular you must define as macros all those things
that may be different in the new environment.
.B dmake
has two facilities that help to support writing portable makefiles, recursive
macros and conditional expressions.  The recursive macros, allow one to define
environment configurations that allow different environments for similar types
of operating systems.  For example the same make script can be used for SYSV and
BSD but with different macro definitions.
.PP
To write a makefile that is portable between UNIX and MSDOS requires both
features since in almost all cases you will need to define new recipes for
making targets.  The recipes will probably be quite different since the
capabilities of the tools on each machine are different.  Different
macros will be needed to help handle the smaller differences in the two
environments.
.PP
NOTE:  Unlike UNIX, MSDOS \fBdoes\fP maintain cd requests
cross single recipe lines.
This is not portable, and your makefiles will not work the same way if you
depend on it.  Use the .IF ... .ELSE ... .END conditionals to supply different
make scripts as necessary.
.SH FILES
Makefile, makefile, startup.mk (use dmake -V to tell you where the startup
file is)
.SH "SEE ALSO"
sh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
.br
S.I. Feldman  \fIMake - A Program for Maintaining Computer Programs\fP
.SH "AUTHOR"
Dennis Vadura, CS Dept. University of Waterloo. dvadura@watdragon.uwaterloo.ca
.br
Many thanks to Carl Seger for his helpful suggestions,
and to Trevor John Thompson for his many excellent ideas and
informative bug reports.
.SH BUGS
Some system commands return non-zero status inappropriately.
Use
.B \-i
(`\-' within the makefile) to overcome the difficulty.
.PP
Some systems do not have easily accessible
time stamps for library members (MSDOS, AMIGA, etc)
for these \fBdmake\fR uses the time stamp of the library instead and prints
a warning the first time it does so.  This is almost always ok, except when
multiple makefiles update a single library file.  In these instances it is
possible to miss an update if one is not careful.
.PP
This man page is way too long.
SHAR_EOF
chmod 0640 dmake/man/dmake.tf ||
echo 'restore of dmake/man/dmake.tf failed'
Wc_c="`wc -c < 'dmake/man/dmake.tf'`"
test 97989 -eq "$Wc_c" ||
	echo 'dmake/man/dmake.tf: original size 97989, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/_chdir.c ==============
if test ! -d 'dmake/msdos'; then
    mkdir 'dmake/msdos'
fi
if test -f 'dmake/msdos/_chdir.c' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/_chdir.c (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/_chdir.c' &&
/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/_chdir.c,v 1.1 91/05/06 15:25:28 dvadura Exp $
-- SYNOPSIS -- Change directory.
-- 
-- DESCRIPTION
--	Under DOS change the current drive as well as the current directory.
--
-- AUTHOR
--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
--
-- COPYRIGHT
--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
-- 
--      This program is free software; you can redistribute it and/or
--      modify it under the terms of the GNU General Public License
--      (version 1), as published by the Free Software Foundation, and
--      found in the file 'LICENSE' included with this distribution.
-- 
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warrant of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
-- 
--      You should have received a copy of the GNU General Public License
--      along with this program;  if not, write to the Free Software
--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
--
-- LOG
--     $Log:	_chdir.c,v $
X * Revision 1.1  91/05/06  15:25:28  dvadura
X * dmake Release Version 3.7
X * 
*/
X
#include <dos.h>
#include "extern.h"
X
PUBLIC int
_chdir(path)
char *path;
{
X   int   res;
X
X   res = chdir(path);
X
#if defined(OS2)
X   if (res != -1 && path[1] == ':' && *path != *Pwd) {
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   }
#else
X   if (res != -1 && path[1] == ':' && *path != *Pwd) {
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(&reg, &reg);
X   }
#endif /* OS2 */
X   return (res);
}
X
SHAR_EOF
chmod 0640 dmake/msdos/_chdir.c ||
echo 'restore of dmake/msdos/_chdir.c failed'
Wc_c="`wc -c < 'dmake/msdos/_chdir.c'`"
test 2019 -eq "$Wc_c" ||
	echo 'dmake/msdos/_chdir.c: original size 2019, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/arlib.c ==============
if test -f 'dmake/msdos/arlib.c' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/arlib.c (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/arlib.c' &&
/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/arlib.c,v 1.1 91/05/06 15:25:29 dvadura Exp $
-- SYNOPSIS -- Library access code.
-- 
-- DESCRIPTION
--	This implementation uses the library timestamp inplace of the
--	library member timestamp.
--
-- AUTHOR
--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
--
-- COPYRIGHT
--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
-- 
--      This program is free software; you can redistribute it and/or
--      modify it under the terms of the GNU General Public License
--      (version 1), as published by the Free Software Foundation, and
--      found in the file 'LICENSE' included with this distribution.
-- 
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warrant of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
-- 
--      You should have received a copy of the GNU General Public License
--      along with this program;  if not, write to the Free Software
--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
--
-- LOG
--     $Log:	arlib.c,v $
X * Revision 1.1  91/05/06  15:25:29  dvadura
X * dmake Release Version 3.7
X * 
*/
X
#include "extern.h"
X
PUBLIC time_t
seek_arch(name, lib)
char*	name;
char*	lib;
{
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));
}
X
PUBLIC int
touch_arch(name, lib)
char*	name;
char*	lib;
{
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
SHAR_EOF
chmod 0640 dmake/msdos/arlib.c ||
echo 'restore of dmake/msdos/arlib.c failed'
Wc_c="`wc -c < 'dmake/msdos/arlib.c'`"
test 1946 -eq "$Wc_c" ||
	echo 'dmake/msdos/arlib.c: original size 1946, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/config.h ==============
if test ! -d 'dmake/msdos/bccdos'; then
    mkdir 'dmake/msdos/bccdos'
fi
if test -f 'dmake/msdos/bccdos/config.h' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/config.h (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/config.h' &&
/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/bccdos/RCS/config.h,v 1.1 91/05/06 15:26:22 dvadura Exp $
-- SYNOPSIS -- Configurarion include file.
-- 
-- DESCRIPTION
-- 	There is one of these for each specific machine configuration.
--	It can be used to further tweek the machine specific sources
--	so that they compile.
--
-- AUTHOR
--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
--
-- COPYRIGHT
--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
-- 
--      This program is free software; you can redistribute it and/or
--      modify it under the terms of the GNU General Public License
--      (version 1), as published by the Free Software Foundation, and
--      found in the file 'LICENSE' included with this distribution.
-- 
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warrant of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
-- 
--      You should have received a copy of the GNU General Public License
--      along with this program;  if not, write to the Free Software
--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
--
-- LOG
--     $Log:	config.h,v $
X * Revision 1.1  91/05/06  15:26:22  dvadura
X * dmake Release Version 3.7
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. */
/*#define coreleft() 0L*/
extern unsigned int coreleft();
X
#define SIGQUIT	SIGTERM		/* turbo C doesn't understand SIGQUIT */
X
/* Turbo-C understands const declarations. */
#define CONST const
X
#ifndef MSDOS
#   define MSDOS 1
#endif
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/config.h ||
echo 'restore of dmake/msdos/bccdos/config.h failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/config.h'`"
test 1901 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/config.h: original size 1901, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/config.mk ==============
if test -f 'dmake/msdos/bccdos/config.mk' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/config.mk (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/config.mk' &&
# This is the Turbo C++ 2.0 DOS configuration file for DMAKE
#	It simply modifies the values of SRC, and checks to see if
#	OSENVIRONMENT is defined.  If so it includes the appropriate
#	config.mk file.
#
# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
# directory.
#
osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
X
# Definition of macros for library, and C startup code.
LDLIBS	        = d:/cc/bcc/lib/c$(MODEL)
CSTARTUP	= d:/cc/bcc/lib/c0$(MODEL).obj
X
# The following sources are required for TURBO C++ 2.0
OSR_SRC = tempnam.c utime.c
.SETDIR=$(osrdir) : $(OSR_SRC)
X
SRC += $(OSR_SRC)
.SOURCE.h : $(osrdir)
X
# Local configuration modifications for CFLAGS.  Make sure your turboc.cfg
# file contains a -D__STDC__=1 and -DM_I86=1, if not then uncomment the line
# below!
#CFLAGS += -DM_I86=1 -D__STDC__=1
X
# You can get a smaller executable still, buy adding a -1 to the list of
# flags below, but then you can't run this on an 8086/88 cpu.
#CFLAGS += -1
CFLAGS  += -I$(osrdir) -d -O -N- -w-nod $(C_$(MODEL))
ASFLAGS += -t -mx $(S_$(MODEL))
X
# Debugging information for Turbo-C
DB_CFLAGS  += -v
DB_LDFLAGS += /v
X
# See if we modify anything in the lower levels.
.IF $(OSENVIRONMENT) != $(NULL)
X   .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
.END
X
C_s =
C_m = -mm
C_c = -mc
C_l = -ml
X
S_s = -dmsmall
S_m = -dmmedium
S_c = -dmcompact
S_l = -dmlarge
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/config.mk ||
echo 'restore of dmake/msdos/bccdos/config.mk failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/config.mk'`"
test 1400 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/config.mk: original size 1400, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/lib.rsp ==============
if test -f 'dmake/msdos/bccdos/lib.rsp' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/lib.rsp (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/lib.rsp' &&
d:\cc\bcc\lib\cl
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/lib.rsp ||
echo 'restore of dmake/msdos/bccdos/lib.rsp failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/lib.rsp'`"
test 17 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/lib.rsp: original size 17, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/libswp.rsp ==============
if test -f 'dmake/msdos/bccdos/libswp.rsp' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/libswp.rsp (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/libswp.rsp' &&
d:\cc\bcc\lib\cl
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/libswp.rsp ||
echo 'restore of dmake/msdos/bccdos/libswp.rsp failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/libswp.rsp'`"
test 17 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/libswp.rsp: original size 17, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/mk.bat ==============
if test -f 'dmake/msdos/bccdos/mk.bat' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/mk.bat (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/mk.bat' &&
md objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  infer.c
mv infer.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  make.c
mv make.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  stat.c
mv stat.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  expand.c
mv expand.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dmstring.c
mv dmstring.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  hash.c
mv hash.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dag.c
mv dag.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dmake.c
mv dmake.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  path.c
mv path.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  imacs.c
mv imacs.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  sysintf.c
mv sysintf.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  parse.c
mv parse.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  getinp.c
mv getinp.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  quit.c
mv quit.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  state.c
mv state.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  basename.c
mv basename.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dmdump.c
mv dmdump.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  macparse.c
mv macparse.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  rulparse.c
mv rulparse.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  percent.c
mv percent.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  function.c
mv function.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\ruletab.c
mv ruletab.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\dirbrk.c
mv dirbrk.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\runargv.c
mv runargv.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\arlib.c
mv arlib.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\_chdir.c
mv _chdir.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\switchar.c
mv switchar.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\rmprq.c
mv rmprq.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\tee.c
mv tee.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\bccdos\tempnam.c
mv tempnam.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\bccdos\utime.c
mv utime.obj objects
tlink @\tmp\mkAAA010420,dmake.exe,NUL.MAP,@\tmp\mkBAA010420
copy msdos\bccdos\startup.mk startup.mk
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/mk.bat ||
echo 'restore of dmake/msdos/bccdos/mk.bat failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/mk.bat'`"
test 2868 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/mk.bat: original size 2868, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/mkswp.bat ==============
if test -f 'dmake/msdos/bccdos/mkswp.bat' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/mkswp.bat (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/mkswp.bat' &&
md objects
tasm -t -mx -dmlarge msdos\exec.asm;
mv exec.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  infer.c
mv infer.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  make.c
mv make.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  stat.c
mv stat.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  expand.c
mv expand.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dmstring.c
mv dmstring.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  hash.c
mv hash.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dag.c
mv dag.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dmake.c
mv dmake.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  path.c
mv path.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  imacs.c
mv imacs.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  sysintf.c
mv sysintf.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  parse.c
mv parse.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  getinp.c
mv getinp.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  quit.c
mv quit.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  state.c
mv state.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  basename.c
mv basename.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  dmdump.c
mv dmdump.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  macparse.c
mv macparse.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  rulparse.c
mv rulparse.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  percent.c
mv percent.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  function.c
mv function.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\ruletab.c
mv ruletab.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\dirbrk.c
mv dirbrk.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\runargv.c
mv runargv.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\arlib.c
mv arlib.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\_chdir.c
mv _chdir.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\switchar.c
mv switchar.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\rmprq.c
mv rmprq.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\find.c
mv find.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\spawn.c
mv spawn.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\bccdos\tempnam.c
mv tempnam.obj objects
tcc -c -I. -Imsdos -Imsdos\bccdos -d -O -N- -w-nod -ml  msdos\bccdos\utime.c
mv utime.obj objects
tlink @\tmp\mkAAA010450,dmake.exe,NUL.MAP,@\tmp\mkBAA010450
copy msdos\bccdos\startup.mk startup.mk
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/mkswp.bat ||
echo 'restore of dmake/msdos/bccdos/mkswp.bat failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/mkswp.bat'`"
test 3018 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/mkswp.bat: original size 3018, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/obj.rsp ==============
if test -f 'dmake/msdos/bccdos/obj.rsp' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/obj.rsp (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/obj.rsp' &&
d:\cc\bcc\lib\c0l.obj+
objects\infer.obj+
objects\make.obj+
objects\stat.obj+
objects\expand.obj+
objects\dmstring.obj+
objects\hash.obj+
objects\dag.obj+
objects\dmake.obj+
objects\path.obj+
objects\imacs.obj+
objects\sysintf.obj+
objects\parse.obj+
objects\getinp.obj+
objects\quit.obj+
objects\state.obj+
objects\basename.obj+
objects\dmdump.obj+
objects\macparse.obj+
objects\rulparse.obj+
objects\percent.obj+
objects\function.obj+
objects\ruletab.obj+
objects\dirbrk.obj+
objects\runargv.obj+
objects\arlib.obj+
objects\_chdir.obj+
objects\switchar.obj+
objects\rmprq.obj+
objects\tee.obj+
objects\tempnam.obj+
objects\utime.obj
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/obj.rsp ||
echo 'restore of dmake/msdos/bccdos/obj.rsp failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/obj.rsp'`"
test 635 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/obj.rsp: original size 635, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/objswp.rsp ==============
if test -f 'dmake/msdos/bccdos/objswp.rsp' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/objswp.rsp (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/objswp.rsp' &&
d:\cc\bcc\lib\c0l.obj+
objects\exec.obj+
objects\infer.obj+
objects\make.obj+
objects\stat.obj+
objects\expand.obj+
objects\dmstring.obj+
objects\hash.obj+
objects\dag.obj+
objects\dmake.obj+
objects\path.obj+
objects\imacs.obj+
objects\sysintf.obj+
objects\parse.obj+
objects\getinp.obj+
objects\quit.obj+
objects\state.obj+
objects\basename.obj+
objects\dmdump.obj+
objects\macparse.obj+
objects\rulparse.obj+
objects\percent.obj+
objects\function.obj+
objects\ruletab.obj+
objects\dirbrk.obj+
objects\runargv.obj+
objects\arlib.obj+
objects\_chdir.obj+
objects\switchar.obj+
objects\rmprq.obj+
objects\find.obj+
objects\spawn.obj+
objects\tempnam.obj+
objects\utime.obj
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/objswp.rsp ||
echo 'restore of dmake/msdos/bccdos/objswp.rsp failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/objswp.rsp'`"
test 673 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/objswp.rsp: original size 673, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/public.h ==============
if test -f 'dmake/msdos/bccdos/public.h' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/public.h (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/public.h' &&
/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/bccdos/RCS/public.h,v 1.1 91/05/06 15:26:27 dvadura Exp Locker: dvadura $
-- WARNING  -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
--
-- SYNOPSIS -- Local functions exported to be visible by others.
--
-- DESCRIPTION
--      This file is generated by 'genpub'.  Function declarations
--      that appear in this file are extracted by 'genpub' from
--      source files.  Any function in the source file whose definition
--      appears like:
--
--          PUBLIC return_type
--          function( arg_list );
--          type_expr1 arg1;
--          ...
--
--      has its definition extracted and a line of the form:
--
--          return_type function ANSI((type_expr1,type_expr2,...));
--
--      entered into the output file.
--
-- AUTHOR
--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
--
-- COPYRIGHT
--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
-- 
--      This program is free software; you can redistribute it and/or
--      modify it under the terms of the GNU General Public License
--      (version 1), as published by the Free Software Foundation, and
--      found in the file 'LICENSE' included with this distribution.
-- 
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warrant of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
-- 
--      You should have received a copy of the GNU General Public License
--      along with this program;  if not, write to the Free Software
--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
--
-- LOG
--     $Log:	public.h,v $
X * Revision 1.1  91/05/06  15:26:27  dvadura
X * dmake Release Version 3.7
X * 
*/
X
#ifndef _DMAKE_PUBLIC_h
#define _DMAKE_PUBLIC_h
X
void Infer_recipe ANSI((CELLPTR, CELLPTR));
int Make_targets ANSI(());
int Exec_commands ANSI((CELLPTR));
void Pop_dir ANSI((int));
void Append_line ANSI((char *, int, FILE *, char *, int, int));
void Stat_target ANSI((CELLPTR, int));
char * Expand ANSI((char *));
char * Apply_edit ANSI((char *, char *, char *, int, int));
void Map_esc ANSI((char *));
char* Apply_modifiers ANSI((int, char *));
char* Tokenize ANSI((char *, char *));
char * _strjoin ANSI((char *, char *, int, int));
char * _stradd ANSI((char *, char *, int));
char * _strapp ANSI((char *, char *));
char * _strdup ANSI((char *));
char * _strpbrk ANSI((char *, char *));
char * _strspn ANSI((char *, char *));
char * _strstr ANSI((char *, char *));
char * _substr ANSI((char *, char *));
uint16 Hash ANSI((char *, uint32 *));
HASHPTR Get_name ANSI((char *, HASHPTR *, int));
HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
HASHPTR Def_macro ANSI((char *, char *, int));
CELLPTR Def_cell ANSI((char *));
LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
void Clear_prerequisites ANSI((CELLPTR));
int Test_circle ANSI((CELLPTR, int));
STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
t_attr Rcp_attribute ANSI((char *));
int main ANSI((int, char **));
FILE * Openfile ANSI((char *, int, int));
FILE * Closefile ANSI(());
FILE * Search_file ANSI((char *, char **));
char * Filename ANSI(());
void No_ram ANSI(());
int Usage ANSI((int));
int Version ANSI(());
char * Get_suffix ANSI((char *));
char * Build_path ANSI((char *, char *));
void Make_rules ANSI(());
void Create_macro_vars ANSI(());
time_t Do_stat ANSI((char *, char *, char **));
int Do_touch ANSI((char *, char *, char **));
void Void_lib_cache ANSI((char *, char *));
time_t Do_time ANSI(());
int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
char ** Pack_argv ANSI((int, int, char *));
char * Read_env_string ANSI((char *));
int Write_env_string ANSI((char *, char *));
void ReadEnvironment ANSI(());
void Catch_signals ANSI((void (*)()));
void Clear_signals ANSI(());
void Prolog ANSI((int, char* []));
void Epilog ANSI((int));
char * Get_current_dir ANSI(());
int Set_dir ANSI((char*));
char Get_switch_char ANSI(());
FILE* Get_temp ANSI((char **, char *, int));
FILE * Start_temp ANSI((char *, CELLPTR, char **));
void Open_temp_error ANSI((char *, char *));
void Link_temp ANSI((CELLPTR, FILE *, char *));
void Close_temp ANSI((CELLPTR, FILE *));
void Unlink_temp_files ANSI((CELLPTR));
void Handle_result ANSI((int, int, int, CELLPTR));
void Update_time_stamp ANSI((CELLPTR));
void Parse ANSI((FILE *));
int Get_line ANSI((char *, FILE *));
char * Do_comment ANSI((char *, char **, int));
char * Get_token ANSI((TKSTRPTR, char *, int));
void Quit ANSI(());
void Read_state ANSI(());
void Write_state ANSI(());
int Check_state ANSI((CELLPTR, STRINGPTR *, int));
char* basename ANSI((char *));
void Dump ANSI(());
void Dump_recipe ANSI((STRINGPTR));
int Parse_macro ANSI((char *, int));
int Macro_op ANSI((char *));
int Parse_rule_def ANSI((int *));
int Rule_op ANSI((char *));
void Add_recipe_to_list ANSI((char *, int, int));
void Bind_rules_to_targets ANSI((int));
int Set_group_attributes ANSI((char *));
DFALINKPTR Match_dfa ANSI((char *));
void Check_circle_dfa ANSI(());
void Add_nfa ANSI((char *));
char * Exec_function ANSI((char *));
int If_root_path ANSI((char *));
int runargv ANSI((CELLPTR, int, int, int, int, char *));
void Clean_up_processes ANSI(());
int Wait_for_child ANSI((int, int));
time_t seek_arch ANSI((char*, char*));
int touch_arch ANSI((char*, char*));
int _chdir ANSI((char *));
void Remove_prq ANSI((CELLPTR));
void Hook_std_writes ANSI((char *));
X
#endif
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/public.h ||
echo 'restore of dmake/msdos/bccdos/public.h failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/public.h'`"
test 5622 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/public.h: original size 5622, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/startup.mk ==============
if test -f 'dmake/msdos/bccdos/startup.mk' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/startup.mk (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/startup.mk' &&
# MSDOS DMAKE startup file.  Customize to suit your needs.
# Assumes MKS toolkit for the tool commands, and Turbo-C.  Change as req'd.
# See the documentation for a description of internally defined macros.
#
# Disable warnings for macros redefined here that were given
# on the command line.
__.SILENT := $(.SILENT)
.SILENT   := yes
X
# Configuration parameters for DMAKE startup.mk file
# Set these to NON-NULL if you wish to turn the parameter on.
_HAVE_RCS	:= yes		# yes => RCS  is installed.
_HAVE_SCCS	:= 		# yes => SCCS is installed.
X
# Applicable suffix definitions
A := .lib	# Libraries
E := .exe	# Executables
F := .for	# Fortran
O := .obj	# Objects
P := .pas	# Pascal
S := .asm	# Assembler sources
V := 		# RCS suffix
X
# See if these are defined
TMPDIR := $(ROOTDIR)/tmp
.IMPORT .IGNORE : TMPDIR SHELL COMSPEC
X
# Recipe execution configurations
# First set SHELL, If it is not defined, use COMSPEC, otherwise
# it is assumed to be MKS Korn SHELL.
.IF $(SHELL) == $(NULL)
.IF $(COMSPEC) == $(NULL)
X   SHELL := $(ROOTDIR)/bin/sh$E
.ELSE
X   SHELL := $(COMSPEC)
.END
.END
GROUPSHELL := $(SHELL)
X
# Now set remaining arguments depending on which SHELL we
# are going to use.  COMSPEC (assumed to be command.com) or
# MKS Korn Shell.
.IF $(SHELL)==$(COMSPEC)
X   SHELLFLAGS  := $(SWITCHAR)c
X   GROUPFLAGS  := $(SHELLFLAGS)
X   SHELLMETAS  := *"?<>
X   GROUPSUFFIX := .bat
X   DIRSEPSTR   := \\
X   DIVFILE      = $(TMPFILE:s,/,\)
.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  := \\
.END
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
# Definition of $(MAKE) macro for recursive makes.
X   MAKE = $(MAKECMD) $(MFLAGS)
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
# 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
# Implicit generation rules for making inferences.
# We don't provide .yr or .ye rules here.  They're obsolete.
# 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
# Executables
X   %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
X
# lex and yacc rules
X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
X
# RCS support
.IF $(_HAVE_RCS)
X   % : $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
X   .NOINFER : $$(@:d)RCS/$$(@:f)$V
.END
X
# SCCS support
.IF $(_HAVE_SCCS)
X   % : s.% ; get $@
X   .NOINFER : s.%
.END
X
# Recipe to make archive files.
%$A :
[
X   $(AR) $(ARFLAGS) $@ $?
X   $(RM) $(RMFLAGS) $?
]
X
# DMAKE uses this recipe to remove intermediate targets
.REMOVE :; $(RM) -f $<
X
# AUGMAKE extensions for SYSV compatibility
@B = $(@:b)
@D = $(@:d)
@F = $(@:f)
*B = $(*:b)
*D = $(*:d)
*F = $(*:f)
<B = $(<:b)
<D = $(<:d)
<F = $(<:f)
?B = $(?:b)
?F = $(?:f)
?D = $(?:d)
X
# Turn warnings back to previous setting.
.SILENT := $(__.SILENT)
X
# Local init file if any, gets parsed before user makefile
.INCLUDE .IGNORE: "_startup.mk"
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/startup.mk ||
echo 'restore of dmake/msdos/bccdos/startup.mk failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/startup.mk'`"
test 3795 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/startup.mk: original size 3795, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/tempnam.c ==============
if test -f 'dmake/msdos/bccdos/tempnam.c' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/tempnam.c (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/tempnam.c' &&
/*LINTLIBRARY*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <dos.h>
X
#if defined(max)
#   undef  max
#endif
#define max(A,B) (((A)<(B))?(B):(A))
X
extern char *mktemp();
extern int access();
int _access();
X
/* Turbo C stdio.h doesn't define P_tmpdir, so let's do it here */
/* Under DOS leave the default tmpdir pointing here!		*/
static char *P_tmpdir = "";
X
char *
tempnam(dir, prefix)
char *dir;		/* use this directory please (if non-NULL) */
char *prefix;		/* use this (if non-NULL) as filename prefix */
{
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
_access( name, flag )
char *name;
int  flag;
{
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, "/" );
X
X   return( r );
}
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/tempnam.c ||
echo 'restore of dmake/msdos/bccdos/tempnam.c failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/tempnam.c'`"
test 1724 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/tempnam.c: original size 1724, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/bccdos/utime.c ==============
if test -f 'dmake/msdos/bccdos/utime.c' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/bccdos/utime.c (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/bccdos/utime.c' &&
/*
** change access and modify times of file
*/
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
X
int
utime(name, timep)/*
====================
X    Broken for turbo C it only sets the file time to the current time by
X    touching a character in the file */
char*	name;
time_t	timep[2];
{
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	}
}
SHAR_EOF
chmod 0640 dmake/msdos/bccdos/utime.c ||
echo 'restore of dmake/msdos/bccdos/utime.c failed'
Wc_c="`wc -c < 'dmake/msdos/bccdos/utime.c'`"
test 767 -eq "$Wc_c" ||
	echo 'dmake/msdos/bccdos/utime.c: original size 767, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/msdos/config.mk ==============
if test -f 'dmake/msdos/config.mk' -a X"$1" != X"-c"; then
	echo 'x - skipping dmake/msdos/config.mk (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/msdos/config.mk' &&
# This is an OS specific configuration file
#	It assumes that OBJDIR, TARGET and DEBUG are previously defined.
#	It defines	CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
#	It augments	SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
#
X
# Memory model to compile for
# set to s - small, m - medium, c - compact, l - large
# Need large model now, dmake has grown up :-)
MODEL = l
X
STARTUPFILE	= $(OS)/startup.mk
X
CPPFLAGS 	= $(CFLAGS)
LDOBJS		= $(CSTARTUP) $(OBJDIR)/{$(<:f)}
LDARGS		= @$(LDTMPOBJ),$(TARGET),NUL.MAP$(LDTAIL)
LDTAIL		= $(_libs)$(LDFLAGS:s/ //)
_libs           = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
LDTMPOBJ	= $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
LDTMPLIB	= $(mktmp,,$(DIVFILE) $(LDLIBS:s,/,\\,:t"+\n")\n)
X
# Debug flags
DB_CFLAGS	= -DDBUG
DB_LDFLAGS	=
DB_LDLIBS	=
X
# NO Debug flags
NDB_CFLAGS	=
NDB_LDFLAGS	=
NDB_LDLIBS	=
X
# Local configuration modifications for CFLAGS.
CFLAGS         += -I$(OS)
X
# Common MSDOS source files.
# Define SWAP to anything but 'y' for the swap code to be excluded on making.
# Swapping for DOS versions is enabled by default.
SWAP *= y
.IF $(SWAP) == y
X   SWP_SRC = find.c spawn.c
X   ASRC += exec.asm
.ELSE
X   SWP_SRC = tee.c
.END
X
OS_SRC += ruletab.c dirbrk.c runargv.c arlib.c _chdir.c switchar.c rmprq.c\
X        $(SWP_SRC)
SRC += $(OS_SRC)
.SETDIR=$(OS) : $(ASRC) $(OS_SRC)
X
# Provide our own %$O : %$S rule.
%$O : %$S
X	$(AS) $(ASFLAGS) $(<:s,/,\,);
X	mv $(@:f) $(OBJDIR)
X
# Set source dirs so that we can find files named in this
SHAR_EOF
true || echo 'restore of dmake/msdos/config.mk failed'
fi
echo 'End of part 21, continue with part 22'
echo 22 > _shar_seq_.tmp
exit 0

exit 0 # Just in case...
-- 
Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.