diff options
Diffstat (limited to 'dmake/os2')
-rw-r--r-- | dmake/os2/config.mk | 54 | ||||
-rw-r--r-- | dmake/os2/dchdir.c | 41 | ||||
-rw-r--r-- | dmake/os2/dirent.h | 36 | ||||
-rw-r--r-- | dmake/os2/ibm/config.h | 78 | ||||
-rw-r--r-- | dmake/os2/ibm/config.mk | 54 | ||||
-rw-r--r-- | dmake/os2/ibm/icc/config.mk | 11 | ||||
-rw-r--r-- | dmake/os2/ibm/icc/lib.rsp | 1 | ||||
-rwxr-xr-x | dmake/os2/ibm/icc/mk.cmd | 96 | ||||
-rw-r--r-- | dmake/os2/ibm/icc/obj.rsp | 31 | ||||
-rw-r--r-- | dmake/os2/ibm/icc/public.h | 169 | ||||
-rw-r--r-- | dmake/os2/ibm/icc/template.mk | 7 | ||||
-rw-r--r-- | dmake/os2/ibm/icc3/config.mk | 11 | ||||
-rw-r--r-- | dmake/os2/ibm/icc3/lib.rsp | 1 | ||||
-rwxr-xr-x | dmake/os2/ibm/icc3/mk.cmd | 192 | ||||
-rw-r--r-- | dmake/os2/ibm/icc3/obj.rsp | 30 | ||||
-rw-r--r-- | dmake/os2/ibm/icc3/public.h | 169 | ||||
-rw-r--r-- | dmake/os2/ibm/icc3/template.mk | 7 | ||||
-rw-r--r-- | dmake/os2/ibm/tempnam.c | 111 | ||||
-rw-r--r-- | dmake/os2/ruletab.c | 47 | ||||
-rw-r--r-- | dmake/os2/startup.h | 27 | ||||
-rw-r--r-- | dmake/os2/switchar.c | 43 | ||||
-rw-r--r-- | dmake/os2/sysintf.h | 62 |
22 files changed, 1278 insertions, 0 deletions
diff --git a/dmake/os2/config.mk b/dmake/os2/config.mk new file mode 100644 index 000000000000..5e2b7689bd82 --- /dev/null +++ b/dmake/os2/config.mk @@ -0,0 +1,54 @@ +# 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 +# +OSRELEASE *= ibm +- := $(SWITCHAR) + +# Memory model to compile for +# set to s - small, m - medium, c - compact, l - large +# Use only large model now. +MODEL = l + +STARTUPFILE = $(OS)/startup.mk + +CPPFLAGS = $(CFLAGS) +LDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)} +LDARGS = $(LDHEAD) @$(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)\n) + +# Debug flags +DB_CFLAGS = -DDBUG +DB_LDFLAGS = +DB_LDLIBS = + +# NO Debug flags +NDB_CFLAGS = +NDB_LDFLAGS = +NDB_LDLIBS = + +# Local configuration modifications for CFLAGS. +CFLAGS += $-I$(OS) + +# OS2 does not have a swap version. The operating system will +# handle all swapping. +# To save copying unchanged files in from elsewhere, I shall use them in situ. +OS_SRC += ruletab.c dchdir.c switchar.c +DOS_SRC += dirbrk.c arlib.c dstrlwr.c runargv.c rmprq.c + +SRC += $(OS_SRC) $(DOS_SRC) +.SETDIR=$(OS) : $(ASRC) $(OS_SRC) +.SETDIR=msdos : $(DOS_SRC) + +# Set source dirs so that we can find files named in this +# config file. +.SOURCE.h : $(OS) + +# See if we modify anything in the lower levels. +.IF $(OSRELEASE) != $(NULL) + .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk +.END diff --git a/dmake/os2/dchdir.c b/dmake/os2/dchdir.c new file mode 100644 index 000000000000..6244c630d2a6 --- /dev/null +++ b/dmake/os2/dchdir.c @@ -0,0 +1,41 @@ +/* RCS $Id: dchdir.c,v 1.1.1.1 2000-09-22 15:33:30 hr Exp $ +-- +-- SYNOPSIS +-- Change directory. +-- +-- DESCRIPTION +-- Under DOS change the current drive as well as the current directory. +-- +-- AUTHOR +-- Dennis Vadura, dvadura@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +#include <os2.h> +#include "extern.h" + +PUBLIC int +_dchdir(path) +char *path; +{ + int res; + + res = _chdir(path); + + if (res == 0 && path[1] == ':') + DosSelectDisk((*path & ~0x20) - '@'); + + return (res); +} diff --git a/dmake/os2/dirent.h b/dmake/os2/dirent.h new file mode 100644 index 000000000000..eafaccbcc38a --- /dev/null +++ b/dmake/os2/dirent.h @@ -0,0 +1,36 @@ +/* DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89 */ + +#ifndef _DIRLIB_h_ +#define _DIRLIB_h_ + +#define INCL_DOSFILEMGR +#include <os2.h> +#include <stdio.h> +#include <stdlib.h> +#include "stdmacs.h" + +#define MAXNAMLEN _MAX_FNAME + +struct dirent { + long d_ino; + unsigned short d_reclen; + unsigned short d_namlen; + char d_name[MAXNAMLEN+1]; +}; + +typedef struct { + HDIR dd_handle; /* Handle for FindFirst/Next */ + FILEFINDBUF3 dd_dta; /* Disk transfer area for this dir. */ + ULONG dd_count; /* Count for FindFirst/Next */ + APIRET dd_stat; /* Status return from last lookup */ + char dd_name[1]; /* Full name of file -- struct is extended */ +} DIR; + +extern DIR *opendir ANSI((char *)); +extern struct dirent *readdir ANSI((DIR *)); +extern long telldir ANSI((DIR *)); +extern void seekdir ANSI((DIR *, long)); +extern void closedir ANSI((DIR *)); + +#define rewinddir(dirp) seekdir(dirp,0L) +#endif diff --git a/dmake/os2/ibm/config.h b/dmake/os2/ibm/config.h new file mode 100644 index 000000000000..cd8199445066 --- /dev/null +++ b/dmake/os2/ibm/config.h @@ -0,0 +1,78 @@ +/* RCS $Id: config.h,v 1.2 2008-03-05 18:38:08 kz 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@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +#if defined (_MSC_VER) +# if _MSC_VER < 500 + Force a compile-time blowup. + Do not define define _MSC_VER for MSC compilers ealier than 5.0. +# endif +#endif + +/* define this for configurations that don't have the coreleft function + * so that the code compiles. To my knowledge coreleft exists only on + * Turbo C, but it is needed here since the function is used in many debug + * macros. */ +#define coreleft() 0L + +/* MSC Version 4.0 doesn't understand SIGTERM, later versions do. */ +#ifndef SIGTERM +# define SIGTERM SIGINT +#endif + +/* This should already be defined under C6.0, also for OS/2 we want buffering + * to minimise the mess during parallel makes. + */ +#ifndef _IOLBF +# define _IOLBF _IOFBF +#endif + +/* in alloc.h: size_t is redefined + * defined in stdio.h which is included by alloc.h + */ +#if defined(MSDOS) && defined (_MSC_VER) +# define _TYPES_ +#endif + +/* Don't need this one either */ +#define CONST + +/* in sysintf.c: SIGQUIT is used, this is not defined in MSC */ +#ifndef SIGQUIT +# define SIGQUIT SIGTERM +#endif + +/* a small problem with pointer to voids on some unix machines needs this */ +#define DMPVOID void * + +/* C-lib redefinitions... */ +#define dup _dup +#define close _close +#define utime _utime +#define tzset _tzset +#define access _access +#define getpid _getpid +#define getcwd _getcwd diff --git a/dmake/os2/ibm/config.mk b/dmake/os2/ibm/config.mk new file mode 100644 index 000000000000..716addd82abf --- /dev/null +++ b/dmake/os2/ibm/config.mk @@ -0,0 +1,54 @@ +# This is the MSC 4.0 and higher 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) + +TMPDIR := +.EXPORT : TMPDIR + +# Definition of macros for library, and C startup code. + +# The following sources are required for MSC +OSR_SRC = tempnam.c +.SETDIR=$(osrdir) : $(OSR_SRC) + +SRC += $(OSR_SRC) +.SOURCE.h : $(osrdir) + +SET_STACK = $-stack:32768 +NDB_LDFLAGS += + +ASFLAGS += -t -mx $(S_$(MODEL)) + +# Microsoft C doesn't need tail but needs head +LDTAIL = ,; +LDHEAD = $(LDFLAGS) + +# Debugging libraries +DB_LDFLAGS += $-co $-li $-map $(SET_STACK) +DB_LDLIBS += + +# NO Debug MSC flags: +# Set the environment variable MSC_VER to be one of 5.1, 6.0, 8.0 (for VC++4.0) +# to get these by default when you make dmake using 'dmake'. +# +# Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately +# and sets the flags appropriately. + +CFLAGS += $-I$(osrdir) +DB_CFLAGS += $-Ti+ + +# See if we modify anything in the lower levels. +.IF $(OSENVIRONMENT) != $(NULL) + .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk +.END + +S_s = -Dmsmall +S_m = -Dmmedium +S_c = -Dmcompact +S_l = -Dmlarge diff --git a/dmake/os2/ibm/icc/config.mk b/dmake/os2/ibm/icc/config.mk new file mode 100644 index 000000000000..2042f5636262 --- /dev/null +++ b/dmake/os2/ibm/icc/config.mk @@ -0,0 +1,11 @@ +# Definition of macros for library, and C startup code. +osedir = $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT) + +.IMPORT .IGNORE : MSC_VER +MSC_VER *= 6.0 + +CFLAGS += $-I$(osedir) $-Sp1 $-Q $-Fi- + +NDB_CFLAGS += $-O +NDB_LDFLAGS += $-de $-pmtype:vio $-align:16 $-nologo $-m $-stack:32768 +NDB_LDLIBS += diff --git a/dmake/os2/ibm/icc/lib.rsp b/dmake/os2/ibm/icc/lib.rsp new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/dmake/os2/ibm/icc/lib.rsp @@ -0,0 +1 @@ + diff --git a/dmake/os2/ibm/icc/mk.cmd b/dmake/os2/ibm/icc/mk.cmd new file mode 100755 index 000000000000..563a88aad43c --- /dev/null +++ b/dmake/os2/ibm/icc/mk.cmd @@ -0,0 +1,96 @@ +md objects +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O infer.c +copy infer.obj objects +del infer.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O make.c +copy make.obj objects +del make.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O stat.c +copy stat.obj objects +del stat.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O expand.c +copy expand.obj objects +del expand.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O dmstring.c +copy dmstring.obj objects +del dmstring.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O hash.c +copy hash.obj objects +del hash.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O dag.c +copy dag.obj objects +del dag.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O dmake.c +copy dmake.obj objects +del dmake.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O path.c +copy path.obj objects +del path.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O imacs.c +copy imacs.obj objects +del imacs.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O sysintf.c +copy sysintf.obj objects +del sysintf.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O parse.c +copy parse.obj objects +del parse.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O getinp.c +copy getinp.obj objects +del getinp.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O quit.c +copy quit.obj objects +del quit.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O state.c +copy state.obj objects +del state.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O dmdump.c +copy dmdump.obj objects +del dmdump.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O macparse.c +copy macparse.obj objects +del macparse.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O rulparse.c +copy rulparse.obj objects +del rulparse.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O percent.c +copy percent.obj objects +del percent.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O function.c +copy function.obj objects +del function.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O os2\ruletab.c +copy ruletab.obj objects +del ruletab.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O os2\dchdir.c +copy dchdir.obj objects +del dchdir.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O os2\switchar.c +copy switchar.obj objects +del switchar.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O os2\dirlib.c +copy dirlib.obj objects +del dirlib.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O os2\runargv.c +copy runargv.obj objects +del runargv.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O msdos\dirbrk.c +copy dirbrk.obj objects +del dirbrk.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O msdos\arlib.c +copy arlib.obj objects +del arlib.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O msdos\dstrlwr.c +copy dstrlwr.obj objects +del dstrlwr.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O unix\rmprq.c +copy rmprq.obj objects +del rmprq.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O unix\dcache.c +copy dcache.obj objects +del dcache.obj +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc /Sp1 /Q /Fi- /O os2\ibm\tempnam.c +copy tempnam.obj objects +del tempnam.obj +link386 /de /pmtype:vio /align:16 /nologo /m /stack:32768 @os2\ibm\icc\obj.rsp,dmake.exe,NUL.MAP,,,; +copy os2\ibm\icc\template.mk startup\config.mk diff --git a/dmake/os2/ibm/icc/obj.rsp b/dmake/os2/ibm/icc/obj.rsp new file mode 100644 index 000000000000..594535036c87 --- /dev/null +++ b/dmake/os2/ibm/icc/obj.rsp @@ -0,0 +1,31 @@ +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\dmdump.obj+ +objects\macparse.obj+ +objects\rulparse.obj+ +objects\percent.obj+ +objects\function.obj+ +objects\ruletab.obj+ +objects\dchdir.obj+ +objects\switchar.obj+ +objects\dirlib.obj+ +objects\runargv.obj+ +objects\dirbrk.obj+ +objects\arlib.obj+ +objects\dstrlwr.obj+ +objects\rmprq.obj+ +objects\dcache.obj+ +objects\tempnam.obj diff --git a/dmake/os2/ibm/icc/public.h b/dmake/os2/ibm/icc/public.h new file mode 100644 index 000000000000..b3bd37964ec3 --- /dev/null +++ b/dmake/os2/ibm/icc/public.h @@ -0,0 +1,169 @@ +/* RCS $Id: public.h,v 1.9 2007-10-15 15:45:45 ihi Exp $ +-- 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@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +#ifndef _DMAKE_PUBLIC_h +#define _DMAKE_PUBLIC_h + +#ifdef EXTERN +#undef EXTERN +#endif +#if defined(DEFINE_DMAKE_VARIABLES) +#define EXTERN +#else +#define EXTERN extern +#endif + +/***** genpub: Begin list of generated function headers */ +void Infer_recipe ANSI((CELLPTR, CELLPTR)); +int Make_targets ANSI(()); +int Make ANSI((CELLPTR, CELLPTR)); +int Exec_commands ANSI((CELLPTR)); +void Print_cmnd ANSI((char *, int, int)); +int Push_dir ANSI((char *, char *, int)); +void Pop_dir ANSI((int)); +void Append_line ANSI((char *, int, FILE *, char *, int, int)); +void Stat_target ANSI((CELLPTR, int, 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, int)); +char* ScanToken ANSI((char *, char **, int)); +char *DmStrJoin ANSI((char *, char *, int, int)); +char *DmStrAdd ANSI((char *, char *, int)); +char *DmStrApp ANSI((char *, char *)); +char *DmStrDup ANSI((char *)); +char *DmStrDup2 ANSI((char *)); +char *DmStrPbrk ANSI((char *, char *)); +char *DmStrSpn ANSI((char *, char *)); +char *DmStrStr ANSI((char *, char *)); +char *DmSubStr ANSI((char *, char *)); +uint16 Hash ANSI((char *, uint32 *)); +HASHPTR Get_name ANSI((char *, HASHPTR *, int)); +HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *)); +HASHPTR Push_macro ANSI((HASHPTR)); +HASHPTR Pop_macro ANSI((HASHPTR)); +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(()); +int Nestlevel ANSI(()); +FILE *TryFiles ANSI((LINKPTR)); +void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist))); +void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist))); +void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist))); +void No_ram ANSI(()); +void Usage ANSI((int)); +void Version ANSI(()); +char *Get_suffix ANSI((char *)); +char *Basename ANSI((char *)); +char *Filedir 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)); +int Do_touch ANSI((char *, char *, char **)); +void Void_lib_cache ANSI((char *, char *)); +time_t Do_time ANSI(()); +void Do_profile_output ANSI((char *, uint16, CELLPTR)); +int Do_cmnd ANSI((char **, int, int, CELLPTR, t_attr, 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 (*)(int))); +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 *)); +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)); +int Remove_file ANSI((char *)); +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((int)); +void Read_state ANSI(()); +void Write_state ANSI(()); +int Check_state ANSI((CELLPTR, STRINGPTR *, int)); +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 _dchdir ANSI((char *)); +int runargv ANSI((CELLPTR, int, int, t_attr, char **)); +void SetSessionTitle ANSI((char *)); +int Wait_for_child ANSI((int, int)); +void Clean_up_processes ANSI(()); +int If_root_path ANSI((char *)); +time_t seek_arch ANSI((char*, char*)); +int touch_arch ANSI((char*, char*)); +void dstrlwr ANSI((char *, char *)); +void Remove_prq ANSI((CELLPTR)); +time_t CacheStat ANSI((char *, int)); + +#endif diff --git a/dmake/os2/ibm/icc/template.mk b/dmake/os2/ibm/icc/template.mk new file mode 100644 index 000000000000..c9c5adbf21ae --- /dev/null +++ b/dmake/os2/ibm/icc/template.mk @@ -0,0 +1,7 @@ +# ** Default build configuration for dmake. +# ** DO NOT PLACE LOCAL DEFINITIONS INTO THIS FILE IT IS AUTO GENERATED +# ** USE "startup/local.mk" for those. + + OS *:= os2 + OSRELEASE *:= ibm + OSENVIRONMENT *:= icc diff --git a/dmake/os2/ibm/icc3/config.mk b/dmake/os2/ibm/icc3/config.mk new file mode 100644 index 000000000000..2042f5636262 --- /dev/null +++ b/dmake/os2/ibm/icc3/config.mk @@ -0,0 +1,11 @@ +# Definition of macros for library, and C startup code. +osedir = $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT) + +.IMPORT .IGNORE : MSC_VER +MSC_VER *= 6.0 + +CFLAGS += $-I$(osedir) $-Sp1 $-Q $-Fi- + +NDB_CFLAGS += $-O +NDB_LDFLAGS += $-de $-pmtype:vio $-align:16 $-nologo $-m $-stack:32768 +NDB_LDLIBS += diff --git a/dmake/os2/ibm/icc3/lib.rsp b/dmake/os2/ibm/icc3/lib.rsp new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/dmake/os2/ibm/icc3/lib.rsp @@ -0,0 +1 @@ + diff --git a/dmake/os2/ibm/icc3/mk.cmd b/dmake/os2/ibm/icc3/mk.cmd new file mode 100755 index 000000000000..f45e63e64318 --- /dev/null +++ b/dmake/os2/ibm/icc3/mk.cmd @@ -0,0 +1,192 @@ +md objects + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O infer.c + +copy infer.obj objects + +del infer.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O make.c + +copy make.obj objects + +del make.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O stat.c + +copy stat.obj objects + +del stat.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O expand.c + +copy expand.obj objects + +del expand.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O dmstring.c + +copy dmstring.obj objects + +del dmstring.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O hash.c + +copy hash.obj objects + +del hash.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O dag.c + +copy dag.obj objects + +del dag.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O dmake.c + +copy dmake.obj objects + +del dmake.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O path.c + +copy path.obj objects + +del path.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O imacs.c + +copy imacs.obj objects + +del imacs.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O sysintf.c + +copy sysintf.obj objects + +del sysintf.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O parse.c + +copy parse.obj objects + +del parse.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O getinp.c + +copy getinp.obj objects + +del getinp.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O quit.c + +copy quit.obj objects + +del quit.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O state.c + +copy state.obj objects + +del state.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O dmdump.c + +copy dmdump.obj objects + +del dmdump.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O macparse.c + +copy macparse.obj objects + +del macparse.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O rulparse.c + +copy rulparse.obj objects + +del rulparse.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O percent.c + +copy percent.obj objects + +del percent.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O function.c + +copy function.obj objects + +del function.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O os2\ruletab.c + +copy ruletab.obj objects + +del ruletab.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O os2\dchdir.c + +copy dchdir.obj objects + +del dchdir.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O os2\switchar.c + +copy switchar.obj objects + +del switchar.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O msdos\dirlib.c + +copy dirlib.obj objects + +del dirlib.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O msdos\runargv.c + +copy runargv.obj objects + +del runargv.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O msdos\dirbrk.c + +copy dirbrk.obj objects + +del dirbrk.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O msdos\arlib.c + +copy arlib.obj objects + +del arlib.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O msdos\dstrlwr.c + +copy dstrlwr.obj objects + +del dstrlwr.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O unix\rmprq.c + +copy rmprq.obj objects + +del rmprq.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O unix\dcache.c + +copy dcache.obj objects + +del dcache.obj + +icc /c /I. /Ios2 /Ios2\ibm /Ios2\ibm\icc3 /Sp1 /Q /Fi- /O tempnam.c + +copy tempnam.obj objects + +del tempnam.obj + +ilink /NOFREE /de /pmtype:vio /align:16 /nologo /m /stack:32768 @os2\ibm\icc3\obj.rsp,,,,, + +copy os2\ibm\icc3\template.mk startup\config.mk + diff --git a/dmake/os2/ibm/icc3/obj.rsp b/dmake/os2/ibm/icc3/obj.rsp new file mode 100644 index 000000000000..6309577681b9 --- /dev/null +++ b/dmake/os2/ibm/icc3/obj.rsp @@ -0,0 +1,30 @@ +objects\dmake.obj+ +objects\infer.obj+ +objects\make.obj+ +objects\stat.obj+ +objects\expand.obj+ +objects\dmstring.obj+ +objects\hash.obj+ +objects\dag.obj+ +objects\path.obj+ +objects\imacs.obj+ +objects\sysintf.obj+ +objects\parse.obj+ +objects\getinp.obj+ +objects\quit.obj+ +objects\state.obj+ +objects\dmdump.obj+ +objects\macparse.obj+ +objects\rulparse.obj+ +objects\percent.obj+ +objects\function.obj+ +objects\ruletab.obj+ +objects\dchdir.obj+ +objects\switchar.obj+ +objects\runargv.obj+ +objects\dirbrk.obj+ +objects\arlib.obj+ +objects\dstrlwr.obj+ +objects\rmprq.obj+ +objects\tempnam.obj + diff --git a/dmake/os2/ibm/icc3/public.h b/dmake/os2/ibm/icc3/public.h new file mode 100644 index 000000000000..012d30129fd0 --- /dev/null +++ b/dmake/os2/ibm/icc3/public.h @@ -0,0 +1,169 @@ +/* RCS $Id: public.h,v 1.9 2007-10-15 15:45:57 ihi Exp $ +-- 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@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +#ifndef _DMAKE_PUBLIC_h +#define _DMAKE_PUBLIC_h + +#ifdef EXTERN +#undef EXTERN +#endif +#if defined(DEFINE_DMAKE_VARIABLES) +#define EXTERN +#else +#define EXTERN extern +#endif + +/***** genpub: Begin list of generated function headers */ +void Infer_recipe ANSI((CELLPTR, CELLPTR)); +int Make_targets ANSI(()); +int Make ANSI((CELLPTR, CELLPTR)); +int Exec_commands ANSI((CELLPTR)); +void Print_cmnd ANSI((char *, int, int)); +int Push_dir ANSI((char *, char *, int)); +void Pop_dir ANSI((int)); +void Append_line ANSI((char *, int, FILE *, char *, int, int)); +void Stat_target ANSI((CELLPTR, int, 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, int)); +char* ScanToken ANSI((char *, char **, int)); +char *DmStrJoin ANSI((char *, char *, int, int)); +char *DmStrAdd ANSI((char *, char *, int)); +char *DmStrApp ANSI((char *, char *)); +char *DmStrDup ANSI((char *)); +char *DmStrDup2 ANSI((char *)); +char *DmStrPbrk ANSI((char *, char *)); +char *DmStrSpn ANSI((char *, char *)); +char *DmStrStr ANSI((char *, char *)); +char *DmSubStr ANSI((char *, char *)); +uint16 Hash ANSI((char *, uint32 *)); +HASHPTR Get_name ANSI((char *, HASHPTR *, int)); +HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *)); +HASHPTR Push_macro ANSI((HASHPTR)); +HASHPTR Pop_macro ANSI((HASHPTR)); +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(()); +int Nestlevel ANSI(()); +FILE *TryFiles ANSI((LINKPTR)); +void Fatal ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist))); +void Error ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist))); +void Warning ANSI((ARG (char *,fmt),ARG (va_alist_type, va_alist))); +void No_ram ANSI(()); +void Usage ANSI((int)); +void Version ANSI(()); +char *Get_suffix ANSI((char *)); +char *Basename ANSI((char *)); +char *Filedir 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)); +int Do_touch ANSI((char *, char *, char **)); +void Void_lib_cache ANSI((char *, char *)); +time_t Do_time ANSI(()); +void Do_profile_output ANSI((char *, uint16, CELLPTR)); +int Do_cmnd ANSI((char **, int, int, CELLPTR, t_attr, 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 (*)(int))); +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 *)); +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)); +int Remove_file ANSI((char *)); +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((int)); +void Read_state ANSI(()); +void Write_state ANSI(()); +int Check_state ANSI((CELLPTR, STRINGPTR *, int)); +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 _dchdir ANSI((char *)); +int runargv ANSI((CELLPTR, int, int, t_attr, char **)); +void SetSessionTitle ANSI((char *)); +int Wait_for_child ANSI((int, int)); +void Clean_up_processes ANSI(()); +int If_root_path ANSI((char *)); +time_t seek_arch ANSI((char*, char*)); +int touch_arch ANSI((char*, char*)); +void dstrlwr ANSI((char *, char *)); +void Remove_prq ANSI((CELLPTR)); +time_t CacheStat ANSI((char *, int)); + +#endif diff --git a/dmake/os2/ibm/icc3/template.mk b/dmake/os2/ibm/icc3/template.mk new file mode 100644 index 000000000000..c9c5adbf21ae --- /dev/null +++ b/dmake/os2/ibm/icc3/template.mk @@ -0,0 +1,7 @@ +# ** Default build configuration for dmake. +# ** DO NOT PLACE LOCAL DEFINITIONS INTO THIS FILE IT IS AUTO GENERATED +# ** USE "startup/local.mk" for those. + + OS *:= os2 + OSRELEASE *:= ibm + OSENVIRONMENT *:= icc diff --git a/dmake/os2/ibm/tempnam.c b/dmake/os2/ibm/tempnam.c new file mode 100644 index 000000000000..5bf5c21b3544 --- /dev/null +++ b/dmake/os2/ibm/tempnam.c @@ -0,0 +1,111 @@ +/* RCS $Id: tempnam.c,v 1.1.1.1 2000-09-22 15:33:30 hr Exp $ +-- +-- SYNOPSIS +-- tempnam +-- +-- DESCRIPTION +-- temp file name generation routines. +-- +-- AUTHOR +-- Dennis Vadura, dvadura@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +/*LINTLIBRARY*/ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include "config.h" + +#if defined(max) +# undef max +#endif +#define max(A,B) (((A)<(B))?(B):(A)) + +extern int access(); +int d_access(); + +/* MSC stdio.h defines P_tmpdir, so let's undo it here */ +/* Under DOS leave the default tmpdir pointing here! */ +#ifdef P_tmpdir +#undef P_tmpdir +#endif +static char *P_tmpdir = ""; + +char * +tempnam(dir, prefix) +char *dir; /* use this directory please (if non-NULL) */ +char *prefix; /* use this (if non-NULL) as filename prefix */ +{ + static int count = 0; + register char *p, *q, *tmpdir; + int tl=0, dl=0, pl; + char buf[30]; + + pl = strlen(P_tmpdir); + + if( (tmpdir = getenv("TMPDIR")) != NULL ) + tl = strlen(tmpdir); + else if( (tmpdir = getenv("TMP")) != NULL ) + tl = strlen(tmpdir); + if( dir != NULL ) dl = strlen(dir); + + if( (p = malloc((unsigned)(max(max(dl,tl),pl)+13))) == NULL ) + return(NULL); + + *p = '\0'; + + if( (tl == 0) || (d_access( strcpy(p, tmpdir), 0) != 0) ) + if( (dl == 0) || (d_access( strcpy(p, dir), 0) != 0) ) + if( d_access( strcpy(p, P_tmpdir), 0) != 0 ) + if( !prefix ) + prefix = "tp"; + + if(prefix) + { + *(p+strlen(p)+2) = '\0'; + (void)strncat(p, prefix, 2); + } + + sprintf( buf, "%08x", getpid() ); + buf[6]='\0'; + (void)strcat(p, buf ); + sprintf( buf, "%04d", count++ ); + q=p+strlen(p)-6; + *q++ = buf[0]; *q++ = buf[1]; + *q++ = buf[2]; *q++ = buf[3]; + + if( (q = strrchr(p,'.')) != NULL ) *q = '\0'; + + return strlwr(p); +} + + + +d_access( name, flag ) +char *name; +int flag; +{ + char *p; + int r; + + if( name == NULL || !*name ) return(1); /* NULL dir means current dir */ + p = name+strlen(name)-1; + if(*p == ':' ) strcat( p++, "\\" ); + r = access( name, flag ); + if(*p != '/' && *p != '\\') strcat( p, "\\" ); + + return( r ); +} diff --git a/dmake/os2/ruletab.c b/dmake/os2/ruletab.c new file mode 100644 index 000000000000..dfe6f72f63da --- /dev/null +++ b/dmake/os2/ruletab.c @@ -0,0 +1,47 @@ +/* RCS $Id: ruletab.c,v 1.4 2007-10-15 15:45:20 ihi Exp $ +-- +-- SYNOPSIS +-- Default initial configuration of dmake. +-- +-- DESCRIPTION +-- Define here the initial set of rules that are defined before +-- dmake performs any processing. +-- +-- AUTHOR +-- Dennis Vadura, dvadura@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +/* These are control macros for dmake that MUST be defined at some point + * if they are NOT dmake will not work! These are default definitions. They + * may be overridden inside the .STARTUP makefile, they are here + * strictly so that dmake can parse the STARTUP makefile */ +/* + * For OS/2 these are close to the Unix definitions in terms of limits. + * We dont need the two different cases of Makefile, so only keep the + * pretty one. + */ +static char *_rules[] = { + "MAXLINELENGTH := 8190", + "MAXPROCESSLIMIT := 16", +#include "dmakeroot.h" + ".IMPORT .IGNORE: DMAKEROOT" + ".MAKEFILES : makefile.mk Makefile", + ".SOURCE : .NULL", +#include "startup.h" + 0 }; + +char **Rule_tab = _rules; /* for sundry reasons in Get_environment() */ + diff --git a/dmake/os2/startup.h b/dmake/os2/startup.h new file mode 100644 index 000000000000..bf6c94ff939f --- /dev/null +++ b/dmake/os2/startup.h @@ -0,0 +1,27 @@ +/* RCS $Id: startup.h,v 1.1.1.1 2000-09-22 15:33:30 hr Exp $ +-- +-- SYNOPSIS +-- Definition of MAKESTARTUP +-- +-- DESCRIPTION +-- Default MAKESTARTUP value defining where dmake locates the +-- startup file. +-- +-- AUTHOR +-- Dennis Vadura, dvadura@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +"MAKESTARTUP := $(DMAKEROOT)\\startup.mk", diff --git a/dmake/os2/switchar.c b/dmake/os2/switchar.c new file mode 100644 index 000000000000..458030993d57 --- /dev/null +++ b/dmake/os2/switchar.c @@ -0,0 +1,43 @@ +/* RCS $Id: switchar.c,v 1.1.1.1 2000-09-22 15:33:30 hr Exp $ +-- +-- SYNOPSIS +-- switch char query. +-- +-- DESCRIPTION +-- Get the current value of the command line switch char. Only useful +-- in a DOS environment, otherwise we #define it to be '-'. +-- +-- AUTHOR +-- Dennis Vadura, dvadura@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ +#include <stdlib.h> +#include <stdio.h> +#include "stdmacs.h" + +getswitchar()/* +=============== + Try the environment first. If you don't find SWITCHAR there, then use + the DOS call. The call is undocumented, and doesn't work for DOS versions + 4.0 and up, so the check of the environment will fix that. */ +{ + static char *_env_switchar = NIL(char); + + if( _env_switchar != NIL(char) || + (_env_switchar = (char *)getenv("SWITCHAR")) != NIL(char) ) + return(*_env_switchar); + + return ('/'); +} diff --git a/dmake/os2/sysintf.h b/dmake/os2/sysintf.h new file mode 100644 index 000000000000..0a624b70e8c5 --- /dev/null +++ b/dmake/os2/sysintf.h @@ -0,0 +1,62 @@ +/* RCS $Id: sysintf.h,v 1.4 2007-10-15 15:45:33 ihi Exp $ +-- +-- SYNOPSIS +-- Interfaces for sysintf.c +-- +-- DESCRIPTION +-- Abstractions of functions in sysintf.c +-- +-- AUTHOR +-- Dennis Vadura, dvadura@dmake.wticorp.com +-- +-- WWW +-- http://dmake.wticorp.com/ +-- +-- COPYRIGHT +-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. +-- +-- This program is NOT free software; you can redistribute it and/or +-- modify it under the terms of the Software License Agreement Provided +-- in the file <distribution-root>/readme/license.txt. +-- +-- LOG +-- Use cvs log to obtain detailed change logs. +*/ + +#define DMSTAT stat +#define VOID_LCACHE(l,m) +#define Hook_std_writes(A) +#define GETPID getpid() +/* Disabled for CWS os2port01 + *#define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG) + */ +extern char * tempnam(); +extern char * getcwd(); + +/* for directory cache */ +/* #define CacheStat(A,B) really_dostat(A,&buf)*/ + +/* +** standard C items +*/ + +/* +** DOS interface standard items +*/ +/* Disabled for CWS os2port01 + *#define chdir(p) _dchdir(p) + */ +#define CacheStat(A,B) really_dostat(A,&buf) + +/* +** make parameters +*/ +#ifdef _POSIX_NAME_MAX +#undef _POSIX_NAME_MAX +#endif +#define _POSIX_NAME_MAX 12 + +#ifdef _POSIX_PATH_MAX +#undef _POSIX_PATH_MAX +#endif +#define _POSIX_PATH_MAX 255 |