diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 11:36:52 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 11:36:52 +0200 |
commit | 81a1c065fd3c0242efa0273eba0aefeebadcd877 (patch) | |
tree | 3f5f6c2f91eda7581f58473c1c79857eba48ef01 /dmake | |
parent | 6f0d3f2a5b72673086f82a88831535e535885998 (diff) | |
parent | 13b9f49c1dcb324aa712a82de73bfeffca7b9524 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
Repository.mk
RepositoryFixes.mk
configure
configure.in
set_soenv.in
solenv/config/sdev300.ini
solenv/gbuild/ComponentTarget.mk
solenv/gbuild/CppunitTest.mk
solenv/gbuild/CustomTarget.mk
solenv/gbuild/Deliver.mk
solenv/gbuild/Executable.mk
solenv/gbuild/JavaClassSet.mk
solenv/gbuild/Library.mk
solenv/gbuild/LinkTarget.mk
solenv/gbuild/StaticLibrary.mk
solenv/gbuild/TargetLocations.mk
solenv/gbuild/gbuild.mk
solenv/gbuild/platform/linux.mk
solenv/gbuild/platform/macosx.mk
solenv/gbuild/platform/solaris.mk
solenv/gbuild/platform/windows.mk
solenv/gbuild/platform/winmingw.mk
solenv/gbuild/templates/Executable.mk
solenv/gbuild/templates/Library.mk
solenv/inc/libs.mk
solenv/inc/unxobsd.mk
Diffstat (limited to 'dmake')
37 files changed, 43 insertions, 1763 deletions
diff --git a/dmake/.gitignore b/dmake/.gitignore new file mode 100644 index 000000000000..addefdaaee95 --- /dev/null +++ b/dmake/.gitignore @@ -0,0 +1,11 @@ +Makefile +.deps +*.o +/config.h +/config.log +/config.status +/dmake +/dmakeroot.h +/stamp-h1 +/startup/config.mk +/*/.dirstamp diff --git a/dmake/configure b/dmake/configure index 7e6d05ab8a65..840207bbb891 100755 --- a/dmake/configure +++ b/dmake/configure @@ -4084,7 +4084,7 @@ case "$_os" in "AIX") OS_VERSION=sysvr4 ;; - "OpenBSD") + "OpenBSD"|DragonFly) OS_VERSION=linux ;; *) diff --git a/dmake/configure.in b/dmake/configure.in index c903d94faab8..c196413f9da0 100755 --- a/dmake/configure.in +++ b/dmake/configure.in @@ -111,7 +111,7 @@ case "$_os" in "AIX") OS_VERSION=sysvr4 ;; - "OpenBSD") + "OpenBSD"|DragonFly) OS_VERSION=linux ;; *) diff --git a/dmake/dbug/dbug/dbug.c b/dmake/dbug/dbug/dbug.c index e63a4750ed5b..6262f89431dd 100644 --- a/dmake/dbug/dbug/dbug.c +++ b/dmake/dbug/dbug/dbug.c @@ -164,45 +164,6 @@ EXPORT BOOLEAN _db_pon_ = FALSE; /* TRUE if debugging currently on */ * Externally supplied functions. */ -/* Disable the manual definitions, if something is missing use #include's! */ -#if 0 - -#ifdef unix /* Only needed for unix */ -IMPORT VOID perror (); /* Print system/library error */ -IMPORT int chown (); /* Change owner of a file */ -IMPORT int getgid (); /* Get real group id */ -IMPORT int getuid (); /* Get real user id */ -IMPORT int access (); /* Test file for access */ -#else -#if !(AMIGA || LATTICE || __TURBOC__) -LOCAL VOID perror (); /* Fake system/library error print routine */ -#endif -#endif - -# if BSD4_3 || sun -IMPORT int getrusage (); -#endif - -IMPORT int atoi (); /* Convert ascii to integer */ -IMPORT VOID exit (); /* Terminate execution */ -IMPORT int fclose (); /* Close a stream */ -IMPORT FILE *fopen (); /* Open a stream */ -#if !defined(__BORLANDC__) -IMPORT int fprintf (); /* Formatted print on file */ -#endif -IMPORT VOID free (); -IMPORT char *malloc (); /* Allocate memory */ -IMPORT int strcmp (); /* Compare strings */ -IMPORT char *strcpy (); /* Copy strings around */ -IMPORT int strlen (); /* Find length of string */ - -#ifndef fflush /* This is sometimes a macro */ -IMPORT int fflush (); /* Flush output for stream */ -#endif - -#endif - - /* * The user may specify a list of functions to trace or * debug. These lists are kept in a linear linked list, @@ -274,7 +235,7 @@ LOCAL BOOLEAN DoProfile (); /* Check if profiling is enabled */ /* Supplied in Sys V runtime environ */ LOCAL char *strtok (); /* Break string into tokens */ -LOCAL char *strrchr (); /* Find last occurance of char */ +LOCAL char *strrchr (); /* Find last occurrence of char */ /* * The following local variables are used to hold the state information diff --git a/dmake/dbug/malloc/testmem.c b/dmake/dbug/malloc/testmem.c index 46fba912f8c0..7da5e8ced89b 100644 --- a/dmake/dbug/malloc/testmem.c +++ b/dmake/dbug/malloc/testmem.c @@ -354,34 +354,6 @@ second() check(strpbrk(one, "bc") == NULL, 10); /* Empty string. */ check(strpbrk(one, "") == NULL, 11); /* Both strings empty. */ -#if 0 - /* - * strstr - somewhat like strchr - */ - it = "strstr"; - check(strstr("abcd", "z") == NULL, 1); /* Not found. */ - check(strstr("abcd", "abx") == NULL, 2); /* Dead end. */ - (void) strcpy(one, "abcd"); - check(strstr(one, "c") == one+2, 3); /* Basic test. */ - check(strstr(one, "bc") == one+1, 4); /* Multichar. */ - check(strstr(one, "d") == one+3, 5); /* End of string. */ - check(strstr(one, "cd") == one+2, 6); /* Tail of string. */ - check(strstr(one, "abc") == one, 7); /* Beginning. */ - check(strstr(one, "abcd") == one, 8); /* Exact match. */ - check(strstr(one, "abcde") == NULL, 9); /* Too long. */ - check(strstr(one, "de") == NULL, 10); /* Past end. */ - check(strstr(one, "") == one+4, 11); /* Finding empty. */ - (void) strcpy(one, "ababa"); - check(strstr(one, "ba") == one+1, 12); /* Finding first. */ - (void) strcpy(one, ""); - check(strstr(one, "b") == NULL, 13); /* Empty string. */ - check(strstr(one, "") == one, 14); /* Empty in empty string. */ - (void) strcpy(one, "bcbca"); - check(strstr(one, "bca") == one+2, 15); /* False start. */ - (void) strcpy(one, "bbbcabbca"); - check(strstr(one, "bbca") == one+1, 16); /* With overlap. */ -#endif - /* * strspn */ diff --git a/dmake/dmake.c b/dmake/dmake.c index ddfe3a88ad06..cf6763fc711f 100644 --- a/dmake/dmake.c +++ b/dmake/dmake.c @@ -292,7 +292,7 @@ char **argv; HASHPTR hp; /* This cleans the .SILENT setting */ hp = Def_macro(".SILENT", "", M_EXPANDED); - /* This overrides the bitmask for further occurences of + /* This overrides the bitmask for further occurrences of * .SILENT to "no bits allowed", see bit variables in the * set_macro_value() definition in dag.c. * The bitmask is already set by Create_macro_vars() in @@ -795,11 +795,7 @@ va_list args; ** Print error message and abort */ PUBLIC void -#ifndef __MWERKS__ Fatal(ARG(char *,fmt), ARG(va_alist_type,va_alist)) -#else -Fatal(char * fmt, ...) -#endif DARG(char *,fmt) DARG(va_alist_type,va_alist) { @@ -815,11 +811,7 @@ DARG(va_alist_type,va_alist) ** error message and exit (unless -k) */ PUBLIC void -#ifndef __MWERKS__ Error(ARG(char *,fmt), ARG(va_alist_type,va_alist)) -#else -Error(char * fmt, ...) -#endif DARG(char *,fmt) DARG(va_alist_type,va_alist) { @@ -835,11 +827,7 @@ DARG(va_alist_type,va_alist) ** non-fatal message */ PUBLIC void -#ifndef __MWERKS__ Warning(ARG(char *,fmt), ARG(va_alist_type,va_alist)) -#else -Warning(char * fmt , ...) -#endif DARG(char *,fmt) DARG(va_alist_type,va_alist) { @@ -929,6 +917,7 @@ int eflag; puts(" -x - export macro values to environment"); puts(" -X - ignore #! lines at start of makefile"); } + FREE(fill); Quit(0); } diff --git a/dmake/dmake.h b/dmake/dmake.h index 457031fdb50d..c3003a3db911 100644 --- a/dmake/dmake.h +++ b/dmake/dmake.h @@ -28,7 +28,8 @@ #define MAX_INC_DEPTH 10 /* max of ten nested include files */ #define MAX_COND_DEPTH 20 /* max nesting level of conditionals */ -#define ERROR_EXIT_VALUE 255 /* return code of aborted make */ +#define ERROR_ABORT_VALUE 254 /* return code of aborted make */ +#define ERROR_EXIT_VALUE 255 /* return code of failed make */ #define CONTINUATION_CHAR '\\' /* line continuation \<nl> */ #define DEF_ESCAPE_CHAR '\\' /* escape char for used chars */ #define ESCAPE_CHAR *Escape_char diff --git a/dmake/dmstring.c b/dmake/dmstring.c index 9659fc406768..53068a9deba0 100644 --- a/dmake/dmstring.c +++ b/dmake/dmstring.c @@ -200,7 +200,7 @@ char *str; PUBLIC char * DmStrPbrk( s1, s2 )/* ==================== - find first occurence of char in s2 in string s1. + find first occurrence of char in s2 in string s1. Returns a pointer to the first occurrence. NOTE '\0' is considered part of s2 and a pointer to it is returned if no other chars match. */ diff --git a/dmake/function.c b/dmake/function.c index cd86810849e5..d0379f612971 100644 --- a/dmake/function.c +++ b/dmake/function.c @@ -587,7 +587,7 @@ int expand; Do_profile_output( "s", M_TARGET, &cell ); /* Print the shell escape command. */ - if( !(rcp.st_attr & A_SILENT) ) { + if( Verbose & V_FORCEECHO ) { printf( "%s: Executing shell macro: %s\n", Pname, data ); fflush(stdout); } diff --git a/dmake/getinp.c b/dmake/getinp.c index 5445193d1a90..1ac312a53b59 100644 --- a/dmake/getinp.c +++ b/dmake/getinp.c @@ -88,17 +88,23 @@ FILE *fil; /* Reading the internal rule table. Set rule_ind to zero after the * last entry so that ReadEnvironment() works as expected every time. */ - while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) ) + while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) ) { /* The last test in this if *p != '~', handles the environment * passing conventions used by MKS to pass arguments. We want to * skip those environment entries. Also CYGWIN likes to export '!' - * prefixed environment variables that cause severe pain, axe them too */ - if( !Readenv || (Readenv && (strchr(p,'=') != NIL(char)) && *p!='~' && *p!='!')){ + * prefixed environment variables that cause severe pain, axe them too. + * And finally it is possible to do "env 'GGG HHH'='some value' bash" + * which causes that there are env variables with spaces in the name + * defined which causes dmake to malfunction too */ + char *equal = strchr(p,'='); + char *space = strchr(p,' '); + if( !Readenv || (Readenv && (equal != NIL(char)) && (space == NIL(char) || space > equal) && *p!='~' && *p!='!')){ strcpy( buf, p ); DB_PRINT( "io", ("Returning [%s]", buf) ); DB_RETURN( FALSE ); } + } rule_ind = 0; diff --git a/dmake/mac/arlib.c b/dmake/mac/arlib.c deleted file mode 100644 index 2f06bca68f9e..000000000000 --- a/dmake/mac/arlib.c +++ /dev/null @@ -1,56 +0,0 @@ -/* RCS $Id: arlib.c,v 1.1.1.1 2000-09-22 15:33:26 hr Exp $ --- --- SYNOPSIS --- Library access code. --- --- DESCRIPTION --- This implementation uses the library timestamp inplace of the --- library member timestamp. --- --- 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 "extern.h" - -PUBLIC time_t -seek_arch(name, lib) -char* name; -char* lib; -{ - static int warned = FALSE; - - if (!warned && !(Glob_attr&A_SILENT)) - warned = TRUE, - Warning("Can't extract library member timestamp;\n\ - using library timestamp instead."); - return (Do_stat(lib, NULL, NULL, TRUE)); -} - -PUBLIC int -touch_arch(name, lib) -char* name; -char* lib; -{ - static int warned = FALSE; - - if (!warned && !(Glob_attr&A_SILENT)) - warned = TRUE, - Warning("Can't update library member timestamp;\n\ - touching library instead."); - return (Do_touch(lib, NULL, NULL)); -} - diff --git a/dmake/mac/bogus.c b/dmake/mac/bogus.c deleted file mode 100644 index efd7d39b9470..000000000000 --- a/dmake/mac/bogus.c +++ /dev/null @@ -1,99 +0,0 @@ -/* RCS $Id: bogus.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Write the shell of subroutines we can't or don't --- need to implement --- --- DESCRIPTION --- dmake uses a couple of functions which I am either unable to figure out --- how to implement or which are not needed. The shells of these routines --- are in this 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. -*/ - -#include "extern.h" - - - -/* - * tzset() is a Microsoft "extension" to ANSI C. It sets global - * variables telling if we are in dayling savings time, the time - * zone, and difference between the current time and GMT. - * None of these globals are used by dmake, so this routine is - * not needed - */ -PUBLIC void -tzset () -{ -} - - - -/* - * Add an environmental variable that child processes can use. - * Since MPW currently doesn't allow child processes, this isn't - * needed. - */ -PUBLIC int -putenv (char *pEnvString) -{ - return (0); -} - - - -/* - * Execute a child process. This may be able to be done with - * the MPW system() call someday, but cannot be done currently. - */ -PUBLIC int -runargv (CELLPTR target, int ignore, int, - int last, int shell, char *pCmd) -{ - static int warned = FALSE; - - if (!warned && !(Glob_attr & A_SILENT)) { - warned = TRUE; - Fatal ("Can't execute any targets: use '-n' option."); - } /* if */ - - return (0); -} /* int runargv () */ - - - -/* - * Wait for the child process to complete. Only needed to be implemented - * if we could executing multiple processes at once. - */ -PUBLIC int -Wait_for_child(int abort_flg, int pid) -{ - return (1); -} - - - -/* - * Do any cleanup for any processes when we quit. - */ -PUBLIC void -Clean_up_processes() -{ -} diff --git a/dmake/mac/config.mk b/dmake/mac/config.mk deleted file mode 100644 index 2a6806cff159..000000000000 --- a/dmake/mac/config.mk +++ /dev/null @@ -1,44 +0,0 @@ -# This is an OS Mac 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 -# - -STARTUPFILE = :$(OS):startup.mk - -CPPFLAGS = $(CFLAGS) -LDOBJS = $(CSTARTUP) :$(OBJDIR):{$(<:f)} -LDARGS = $(LDFLAGS) -o $@ $(LDOBJS) $(LDLIBS) - -# Debug flags -DB_CFLAGS = -sym on -DB_LDFLAGS = -sym on -DB_LDLIBS = - -# NO Debug flags -NDB_CFLAGS = -sym off -NDB_LDFLAGS = -sym off -NDB_LDLIBS = - -# Local configuration modifications for CFLAGS. -CFLAGS += -I :$(OS) -d _MPW -s $(<:b) -LDFLAGS += -w -c 'MPS ' -t MPST - -# Since we writing out what files we want to execute, we can't use .SETDIR -# to specify the files to compile in the Mac directory. -# Instead, we copy the files to the (top-level) current directory and compile -# them there. -%.c : ":$(OS):%.c" - duplicate -y $< $@ - -# Common Mac source files. -OS_SRC = arlib.c bogus.c dirbrk.c directry.c environ.c main.c rmprq.c \ - ruletab.c tempnam.c tomacfil.c -.IF $(SHELL) != mwp - .SETDIR=$(OS) : $(OS_SRC) -.ENDIF -SRC += $(OS_SRC) - -# Set source dirs so that we can find files named in this -# config file. -.SOURCE.h : $(OS) diff --git a/dmake/mac/dirbrk.c b/dmake/mac/dirbrk.c deleted file mode 100644 index c584ad22cad1..000000000000 --- a/dmake/mac/dirbrk.c +++ /dev/null @@ -1,42 +0,0 @@ -/* RCS $Id: dirbrk.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Define the directory separator string. --- --- DESCRIPTION --- Define this string for any character that may appear in a path name --- and can be used as a directory separator. --- --- 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 "extern.h" - -/* mac only uses ':' */ -char* DirBrkStr = ":"; - -/* -** Return TRUE if the name is the full specification of a path name to a file -** starting at the root of the file system, otherwise return FALSE -*/ -PUBLIC int -If_root_path(name) -char *name; -{ - return( (strchr(name, ':') != NIL(char)) && - (name[0] != ':') ); -} diff --git a/dmake/mac/directry.c b/dmake/mac/directry.c deleted file mode 100644 index b1d452d073ba..000000000000 --- a/dmake/mac/directry.c +++ /dev/null @@ -1,264 +0,0 @@ -/* RCS $Id: directry.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Fake directory and file functions for the Mac --- --- DESCRIPTION --- This file contains implementations for some ANSI standard routines dmake --- uses which are not otherwise available for the mac. --- --- Assume we are using at least 128K ROMS. --- --- 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 <Errors.h> -#include <Files.h> -#include <OSUtils.h> -#include <StdLib.h> -#include <Strings.h> -/* - * We now include LowMem.h instead of SysEqu.h as LowMem.h is what Apple recommends - * we use. - */ -#include <LowMem.h> -#include "extern.h" - - - -/* - * Implementation of stat function for dmake on the mac. - * - * Many fields aren't filled in, and the times are seconds from 1/1//1904, - * but it should be enough for dmake (I think we only need st_mtime and - * st_mode's S_IFDIR set correctly). - */ -PUBLIC int -stat(pPath, pStat) -char *pPath; -struct stat *pStat; -{ - CInfoPBRec infoPB; - OSErr err; - int retVal; - - infoPB.hFileInfo.ioCompletion = NULL; - infoPB.hFileInfo.ioNamePtr = c2pstr (pPath); - infoPB.hFileInfo.ioVRefNum = 0; - infoPB.hFileInfo.ioFDirIndex = 0; - infoPB.hFileInfo.ioDirID = 0; - err = PBGetCatInfo(&infoPB, FALSE); - p2cstr ((StringPtr) pPath); - - if (err == noErr) { - pStat->st_mtime = (time_t) infoPB.hFileInfo.ioFlMdDat; - pStat->st_ctime = (time_t) infoPB.hFileInfo.ioFlCrDat; - pStat->st_mode = S_IREAD | S_IEXEC; - - /* If it is a directory ... */ - if (infoPB.hFileInfo.ioFlAttrib & 0x10) { - pStat->st_size = infoPB.dirInfo.ioDrNmFls; - pStat->st_mode |= S_IFDIR; - } else { - pStat->st_size = infoPB.hFileInfo.ioFlLgLen; - pStat->st_mode |= S_IFREG; - } /* if ... else */ - - /* If it is writeable */ - if ((infoPB.hFileInfo.ioFlAttrib & 0x1) == 0) { - pStat->st_mode |= S_IWRITE; - } /* if */ - - retVal = 0; - - } else { - retVal = -1; - } /* if ... else */ - - return (retVal); -} /* PUBLIC int stat () */ - - - -/* - * Return the current working directory, or NULL if there is an error. - */ -PUBLIC char * -getcwd(char *pPath, size_t pathSize) -{ - DirInfo dirInfo; - OSErr err; - Str255 dirName; - char *pBeginName; - char *pC; - size_t len; - size_t spaceForColon; - - /* Set up the info for the PBGetCatInfo() calls */ - dirInfo.ioCompletion = NULL; - dirInfo.ioNamePtr = dirName; - dirInfo.ioVRefNum = 0; - dirInfo.ioFDirIndex = -1; - dirInfo.ioDrDirID = 0; - pBeginName = pPath + pathSize - 1; - spaceForColon = 0; /* Make sure we don't have an end colon on the name */ - - /* - * Keep going up the directory path until the end is reached or an error - * occurs. Ideally, we would check for errors at every level and stop - * when we received an fnfErr (File Not Found), but it appears that there - * are some problems with network volumes. (During testing, I received - * a paramErr (No Default Volume) beyond the top level.) Thus, to keep it - * simple, I assume any error past the first directory indicates we have - * seen all directories. - */ - while (TRUE) { - err = PBGetCatInfo ((CInfoPBPtr) &dirInfo, FALSE); - len = ((size_t)(unsigned char) dirName[0]); - if ((err == noErr) && (len < pBeginName - pPath)) { - p2cstr (dirName); - pBeginName -= len + spaceForColon; - strcpy (pBeginName, (char *)dirName); - /* Note that strcpy() adds the '\0' at the end of - the first directory for us */ - if (spaceForColon == 1) { - pBeginName[len] = ':'; - } else { - /* The end of the string shouldn't have a ':' */ - spaceForColon = 1; - } /* if */ - - /* Set up for the next call to PBGetCatInfo() with - the parent's directory ID */ - dirInfo.ioDrDirID = dirInfo.ioDrParID; - - } else if (spaceForColon == 1) { - /* We got past the top-level directory */ - break; - - } else { - /* We either have an error when looking at the first directory - or have run out of room. */ - return (NULL); - } /* if ... elses */ - } /* while */ - - /* Now copy the directory string to the beginning of the path string. - (It's possible the directory already starts at the beginning of the - string, but this is unlikely and doesn't hurt anything if it does, - so we don't bother to check for it.) */ - pC = pPath; - while ((*(pC++) = *(pBeginName++)) != '\0') - ; - - return (pPath); -} /* PUBLIC char *getcwd () */ - - - -/* - * Change the directory to a new default directory. - * - * Return 0 if successful, or -1 if there is an error. - */ -PUBLIC int -chdir(char *pPath) -{ - WDPBRec WDPB; - VolumeParam vParam; - OSErr err; - int result; - char *pC; - char c; - - /* Set up the directory */ - c2pstr (pPath); - WDPB.ioCompletion = NULL; - WDPB.ioNamePtr = (unsigned char *)pPath; - WDPB.ioVRefNum = 0; - WDPB.ioWDProcID = 0; - WDPB.ioWDDirID = 0; - err = PBOpenWD (&WDPB, FALSE); - /* Restore path to a C-type string in case the caller wants - to use it after this call. */ - p2cstr ((unsigned char *)pPath); - if (err != noErr) { - return (-1); - } /* if */ - - /* Set up the volume if necessary */ - if (*pPath != ':') { - for (pC = pPath + 1; (*pC != ':') && (*pC != '\0'); ++pC) - ; - c = *pC; - *pC = '\0'; - vParam.ioCompletion = NULL; - vParam.ioNamePtr = c2pstr (pPath); - vParam.ioVRefNum = WDPB.ioVRefNum; - err = PBSetVol ((ParmBlkPtr) &vParam, FALSE); - p2cstr ((unsigned char *)pPath); - *pC = c; - result = ((err == noErr) ? 0 : -1); - - } else { - result = 0; - } /* if ... else */ - - return (result); -} /* PUBLIC int chdir () */ - - - -/* - * Change the modification time for the file to the current time. - * - * The normal version of utime can set the modification time to any - * time, this function aborts the function if this is tried. - * - * We return 0 if the modification time was updated and -1 if there - * was an error. - */ -PUBLIC int -utime(char *pPath, time_t *pTimes) -{ - CInfoPBRec infoPB; - OSErr err; - - if (pTimes != NULL) { - Fatal ("SUBROUTINE SHORTCOMING: utime cannot take a utimbuf struct"); - } /* if */ - - /* Get the old info */ - infoPB.hFileInfo.ioCompletion = NULL; - infoPB.hFileInfo.ioNamePtr = c2pstr (pPath); - infoPB.hFileInfo.ioVRefNum = 0; - infoPB.hFileInfo.ioFDirIndex = 0; - infoPB.hFileInfo.ioDirID = 0; - err = PBGetCatInfo (&infoPB, FALSE); - if (err != noErr) { - p2cstr ((StringPtr) pPath); - return (-1); - } /* if */ - - /* Change the modification time and set the new info */ - GetDateTime (&(infoPB.hFileInfo.ioFlMdDat)); - infoPB.hFileInfo.ioDirID = 0; - err = PBSetCatInfo (&infoPB, FALSE); - p2cstr ((StringPtr) pPath); - return ((err == noErr) ? 0 : -1); -} /* PUBLIC int utime () */ diff --git a/dmake/mac/dompwmak b/dmake/mac/dompwmak deleted file mode 100644 index c71ed12ca16d..000000000000 --- a/dmake/mac/dompwmak +++ /dev/null @@ -1,67 +0,0 @@ -newfolder objects -c -I. -I :mac -d _MPW -s infer -sym off -o :objects:infer.c.o infer.c -c -I. -I :mac -d _MPW -s make -sym off -o :objects:make.c.o make.c -c -I. -I :mac -d _MPW -s stat -sym off -o :objects:stat.c.o stat.c -c -I. -I :mac -d _MPW -s expand -sym off -o :objects:expand.c.o expand.c -c -I. -I :mac -d _MPW -s dmstring -sym off -o :objects:dmstring.c.o dmstring.c -c -I. -I :mac -d _MPW -s hash -sym off -o :objects:hash.c.o hash.c -c -I. -I :mac -d _MPW -s dag -sym off -o :objects:dag.c.o dag.c -c -I. -I :mac -d _MPW -s dmake -sym off -o :objects:dmake.c.o dmake.c -c -I. -I :mac -d _MPW -s path -sym off -o :objects:path.c.o path.c -c -I. -I :mac -d _MPW -s imacs -sym off -o :objects:imacs.c.o imacs.c -c -I. -I :mac -d _MPW -s sysintf -sym off -o :objects:sysintf.c.o sysintf.c -c -I. -I :mac -d _MPW -s parse -sym off -o :objects:parse.c.o parse.c -c -I. -I :mac -d _MPW -s getinp -sym off -o :objects:getinp.c.o getinp.c -c -I. -I :mac -d _MPW -s quit -sym off -o :objects:quit.c.o quit.c -c -I. -I :mac -d _MPW -s state -sym off -o :objects:state.c.o state.c -c -I. -I :mac -d _MPW -s basename -sym off -o :objects:basename.c.o basename.c -c -I. -I :mac -d _MPW -s dmdump -sym off -o :objects:dmdump.c.o dmdump.c -c -I. -I :mac -d _MPW -s macparse -sym off -o :objects:macparse.c.o macparse.c -c -I. -I :mac -d _MPW -s rulparse -sym off -o :objects:rulparse.c.o rulparse.c -c -I. -I :mac -d _MPW -s percent -sym off -o :objects:percent.c.o percent.c -c -I. -I :mac -d _MPW -s function -sym off -o :objects:function.c.o function.c -duplicate -y :mac:arlib.c arlib.c -c -I. -I :mac -d _MPW -s arlib -sym off -o :objects:arlib.c.o arlib.c -delete arlib.c -duplicate -y :mac:bogus.c bogus.c -c -I. -I :mac -d _MPW -s bogus -sym off -o :objects:bogus.c.o bogus.c -delete bogus.c -duplicate -y :mac:dirbrk.c dirbrk.c -c -I. -I :mac -d _MPW -s dirbrk -sym off -o :objects:dirbrk.c.o dirbrk.c -delete dirbrk.c -duplicate -y :mac:directry.c directry.c -c -I. -I :mac -d _MPW -s directry -sym off -o :objects:directry.c.o directry.c -delete directry.c -duplicate -y :mac:environ.c environ.c -c -I. -I :mac -d _MPW -s environ -sym off -o :objects:environ.c.o environ.c -delete environ.c -duplicate -y :mac:main.c main.c -c -I. -I :mac -d _MPW -s main -sym off -o :objects:main.c.o main.c -delete main.c -duplicate -y :mac:rmprq.c rmprq.c -c -I. -I :mac -d _MPW -s rmprq -sym off -o :objects:rmprq.c.o rmprq.c -delete rmprq.c -duplicate -y :mac:ruletab.c ruletab.c -c -I. -I :mac -d _MPW -s ruletab -sym off -o :objects:ruletab.c.o ruletab.c -delete ruletab.c -duplicate -y :mac:tempnam.c tempnam.c -c -I. -I :mac -d _MPW -s tempnam -sym off -o :objects:tempnam.c.o tempnam.c -delete tempnam.c -duplicate -y :mac:tomacfil.c tomacfil.c -c -I. -I :mac -d _MPW -s tomacfil -sym off -o :objects:tomacfil.c.o tomacfil.c -delete tomacfil.c -Set p1 ":objects:infer.c.o :objects:make.c.o :objects:stat.c.o :objects:expand.c.o" -Set p2 ":objects:dmstring.c.o :objects:hash.c.o :objects:dag.c.o :objects:dmake.c.o" -Set p3 ":objects:path.c.o :objects:imacs.c.o :objects:sysintf.c.o :objects:parse.c.o" -Set p4 ":objects:getinp.c.o :objects:quit.c.o :objects:state.c.o :objects:basename.c.o" -Set p5 ":objects:dmdump.c.o :objects:macparse.c.o :objects:rulparse.c.o" -Set p6 ":objects:percent.c.o :objects:function.c.o :objects:arlib.c.o :objects:bogus.c.o" -Set p7 ":objects:dirbrk.c.o :objects:directry.c.o :objects:environ.c.o :objects:main.c.o" -Set p8 ":objects:rmprq.c.o :objects:ruletab.c.o :objects:tempnam.c.o" -Set p9 ":objects:tomacfil.c.o Micah:MPW:Libraries:CLibraries:CSANELib.o" -Set p10 "Micah:MPW:Libraries:CLibraries:Math.o" -Set p11 "Micah:MPW:Libraries:CLibraries:StdCLib.o" -Set p12 "Micah:MPW:Libraries:Libraries:Runtime.o" -Set p13 "Micah:MPW:Libraries:Libraries:Interface.o Micah:MPW:Libraries:Libraries:Toollibs.o" -link -w -c 'MPS ' -t MPST -sym off -o dmake {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8} {p9} {p10} {p11} {p12} {p13} -duplicate :mac:startup.mk startup.mk diff --git a/dmake/mac/environ.c b/dmake/mac/environ.c deleted file mode 100644 index b9bd6d014da9..000000000000 --- a/dmake/mac/environ.c +++ /dev/null @@ -1,231 +0,0 @@ -/* RCS $Id: environ.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Set up and free for environ --- --- DESCRIPTION --- This file contains routines that will fill in and dispose of the --- list of environmental variables in the environ global variable. --- --- 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 "extern.h" - -/* The char used to replace the equal signs in environmental variable names. */ -const char kEqualReplace = '_'; - -/* Maximum size of a "name=value" environmental string, including the ending '\0'. - Larger environmental variables will be clipped before dmake sees them. - (Caution: When I tested the program, the Mac or dmake trashed memory - when environmental variables of >4K were read in. I looked around a bit - and couldn't find out the exact cause, so I simply made this variable. - The memory trashing may be related to the value for MAXLINELENGTH.) */ -const int kMaxEnvLen = 1024; - - -/* The list of environmental variables in the form "name=value". - (Once make_env() has been called.) */ -char **environ = NULL; - -/* Characters replaced during make_env() */ -struct ReplaceChar { - char *fpPos; - char fC; - struct ReplaceChar *fpNext; -}; /* struct ReplaceChar */ -struct ReplaceChar *gpReplaceList = NULL; - - -void AddReplace (char *pReplacePos); - - - -/* - * Set up the environmental variables in a format used by - * the environ global variable. - * - * environ has already been set to main's envp argument when - * this suboroutine is called. We assume that envp is a copy - * MPW makes for this process' use alone, so we can modify it - * below. - */ -PUBLIC void -make_env() -{ - char **ppCurEnv; - char *pCurPos; -#if 0 - char **ppMacEnv; - char *pMacPos; - - if (!gMECalled) { - gMECalled = TRUE; - -environ = MALLOC (1, char *); -*environ = NULL; -#endif -#if 0 -{ - int numenv; - int len; - int firstnil; - - numenv = 1; - ppMacEnv = environ; - while (*(ppMacEnv++) != NULL) { - ++numenv; - } /* while */ - - ppMacEnv = environ; - if ((environ = MALLOC (numenv, char *)) == NULL) { - No_ram (); - } /* if */ - -numenv = 80; - for (ppCurEnv = environ; (numenv-- > 0) && (*ppMacEnv != NULL); ++ppCurEnv, ++ppMacEnv) { - pMacPos = *ppMacEnv; - len = strlen (pMacPos) + 1; - len += strlen (pMacPos + len) + 1; -#define MAXLEN 4098 -if (len > MAXLEN) len = MAXLEN; - if ((*ppCurEnv = MALLOC (len, char)) == NULL) { - No_ram (); - } /* if */ - - firstnil = TRUE; - for (pCurPos = *ppCurEnv; ((pCurPos - *ppCurEnv) < MAXLEN - 1); ++pCurPos, ++pMacPos) { - if (*pMacPos == '=') { - *pCurPos = gEqualReplace; - - } else if (*pMacPos == '\0') { - if (firstnil) { - *pCurPos = '='; - firstnil = FALSE; - } else { - *pCurPos = *pMacPos; - break; - } /* if ... else */ - - } else { - *pCurPos = *pMacPos; - } /* if ... elses */ - } /* for */ -firstnil = FALSE; - } /* for */ - *ppCurEnv = NULL; -} -#endif -{ - int firstnil; - - /* Get rid of any equal signs in any environmental name, and put - equal signs between the names and their values */ - for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) { - - firstnil = TRUE; - for (pCurPos = *ppCurEnv; - ((pCurPos - *ppCurEnv < kMaxEnvLen - 1) && - ((*pCurPos != '\0') || firstnil)); - ++pCurPos) { - if (*pCurPos == '=') { - AddReplace (pCurPos); - *pCurPos = kEqualReplace; - - } else if (*pCurPos == '\0') { - AddReplace (pCurPos); - *pCurPos = '='; - firstnil = FALSE; - } /* if ... else if */ - } /* for */ - - /* If the environtmental variable was too large ... */ - if (*pCurPos != '\0') { - AddReplace (pCurPos); - *pCurPos = '\0'; - if (firstnil) { - AddReplace (--pCurPos); - *pCurPos = '='; - } /* if */ - } /* if */ - } /* for */ -} -#if 0 - } /* if */ -#endif -} /* PUBLIC void make_env () */ - - -/* - * The character at pReplacePos is about to be replaced. Remember the - * old value so we can restore it when we're done. - */ -void AddReplace (char *pReplacePos) { - struct ReplaceChar *pReplaceChar; - - if ((pReplaceChar = MALLOC (1, struct ReplaceChar)) == NULL) { - No_ram (); - } /* if */ - pReplaceChar->fpPos = pReplacePos; - pReplaceChar->fC = *pReplacePos; - pReplaceChar->fpNext = gpReplaceList; - gpReplaceList = pReplaceChar; -} /* void AddReplace () */ - - -/* - * Restore the old environmental variables to the way they looked before - * the make_env() call, on the unlikely chance that something else will look - * at our copy of the environmental variables during the program execution. - * - */ -PUBLIC void -free_env() -{ - struct ReplaceChar *pReplaceChar; - - while (gpReplaceList != NULL) { - pReplaceChar = gpReplaceList; - gpReplaceList = pReplaceChar->fpNext; - - *(pReplaceChar->fpPos) = pReplaceChar->fC; - - FREE (pReplaceChar); - } /* while */ - -#if 0 - char **ppCurEnv; - char *pCurPos; - - if (!gFECalled) { - gFECalled = TRUE; - -//FREE (environ); -environ = NULL; -#endif -#if 0 - /* Restore the environment list to what it was before we - read it in. */ - for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) { - for (pCurPos = *ppCurEnv; *pCurPos != '='; ++pCurPos) - ; - *pCurPos = '\0'; - } /* for */ - } /* if */ -#endif -} /* PUBLIC void free_env () */ diff --git a/dmake/mac/eold.c b/dmake/mac/eold.c deleted file mode 100644 index 5c389c5851db..000000000000 --- a/dmake/mac/eold.c +++ /dev/null @@ -1,119 +0,0 @@ -/* RCS $Id: eold.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Set up and free for environ --- --- DESCRIPTION --- This file contains routines that will fill in and dispose of the --- list of environmental variables in the environ global variable. --- --- 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 "extern.h" - - -/* - * Keep track of any environmental variables that have '='s in their - * name. - */ -struct EqualPos { - char *fpPos; - struct equalsign *fpNext; -} /* struct EqualPos */ - -struct EqualPos *gpEqualList; - -/* - * The character used to replae the equal signs. - */ -const char gEqualReplace = '_'; - - - -/* - * Set up the environmental variables in a format used by - * the environ global variable. - * - * environ has already been set to main's envp argument when - * this suboroutine is called. - */ -void main_env () { - char **ppCurEnv; - char *pCurPos; - struct equalpos *pNewEqual; - - gpEqualList = NULL; - - for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) { - for (pCurPos = *ppCurEnv; *pCurPos != '\0'; ++pCurPos) { - if (*pCurPos == '=') { - if ((pNewEqual = - (struct EqualPos *) malloc (sizeof (struct EqualPos))) == - NULL) { - fputs ("Out of Memory", stderr); - exit (EXIT_FAILURE); - } /* if */ - pNewEqual->fpPos = pCurPos; - pNewEqual->fpNext = gpEqualList; - gpEqualList = pNewEqual; - - *pCurPos = gEqualReplace; - } /* if */ - } /* for */ - - *pCurPos = '='; - } /* for */ -} /* void main_env () */ - - - -/* - * Reset the environmental variables so they look like they did - * before the main_env() call. - * - * environ has already been set to main's envp argument when - * this suboroutine is called. - */ -void main_env () { - char **ppCurEnv; - char *pCurPos; - struct equalpos *pNewEqual; - - gpEqualList = NULL; - - for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) { - for (pCurPos = *ppCurEnv; *pCurPos != '\0'; ++pCurPos) { - if (*pCurPos == '=') { - if ((pNewEqual = - (struct EqualPos *) malloc (sizeof (struct EqualPos))) == - NULL) { - fputs ("Out of Memory", stderr); - exit (EXIT_FAILURE); - } /* if */ - pNewEqual->fpPos = pCurPos; - pNewEqual->fpNext = gpEqualList; - gpEqualList = pNewEqual; - - *pCurPos = gEqualReplace; - } /* if */ - } /* for */ - - *pCurPos = '='; - } /* for */ -} /* void main_env () */ diff --git a/dmake/mac/main.c b/dmake/mac/main.c deleted file mode 100644 index ab97476d4237..000000000000 --- a/dmake/mac/main.c +++ /dev/null @@ -1,43 +0,0 @@ -/* RCS $Id: main.c,v 1.3 2003-03-25 14:02:21 hr Exp $ --- --- SYNOPSIS --- The real main function --- --- DESCRIPTION --- In order to get the third argument to main(), which is a list of --- environmental variables, we have #defined main to dmakemain, --- and put the real main here. --- --- The environmental variables are placed in the environ global variable --- and set up for processing by dmake in make_env(). --- --- 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 "extern.h" - - - -/* - * Put envp in environ and call dmake's main(). - */ -#undef main -void main(int argc, char **argv, char **envp) { - environ = envp; - dmakemain (argc, argv); -} /* void main () */ diff --git a/dmake/mac/make.sh b/dmake/mac/make.sh deleted file mode 100644 index fc2b8db02b0f..000000000000 --- a/dmake/mac/make.sh +++ /dev/null @@ -1,107 +0,0 @@ -# -# $Id: make.sh,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ -# -# This MPW script builds the dmake executable using the Metroworks PPC compiler -# and linker. The resulting dmake binary will only run on the PPC platform. -# -# To execute this script, you will need the following tools: -# - MacOS 8 or later -# - CodeWarrior for MacOS Release 5 or later -# -# To run this script, you need to open the MPW Shell that is bundled with CodeWarrior. -# If you have another instance of MPW installed other than the one bundled with -# CodeWarrior, you may encounter problems. Once you open the MPW Shell that is bundled -# with CodeWarrior, you will need to set MPW's working directory to the "dmake" -# directory (the directory above the directory that this script is in). Then, execute -# this script from the MPW Worksheet by typing the following command: -# -# :mac:make.sh -# -set Exit 1 -if ( "{0}" != ':mac:make.sh' ) - Echo "You cannot run this script from the current directory." - Echo "To run this script, you need to be in the "dmake" directory and then" - Echo "execute the following command: ":mac:make.sh"" - Exit -end -if ( ! `Exists -d objects` ) - NewFolder :objects -end -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle infer.c -Move -y infer.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle make.c -Move -y make.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle stat.c -Move -y stat.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle expand.c -Move -y expand.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dmstring.c -Move -y dmstring.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle hash.c -Move -y hash.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dag.c -Move -y dag.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dmake.c -Move -y dmake.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle path.c -Move -y path.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle imacs.c -Move -y imacs.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle sysintf.c -Move -y sysintf.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle parse.c -Move -y parse.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle getinp.c -Move -y getinp.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle quit.c -Move -y quit.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle state.c -Move -y state.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dmdump.c -Move -y dmdump.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle macparse.c -Move -y macparse.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle rulparse.c -Move -y rulparse.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle percent.c -Move -y percent.c.o :objects -# Note that function.c needs to have __useAppleExts__ defined. Otherwise, it won't link. -MWCPPC -o : -ansi off -I :mac -d _MPW -d __useAppleExts__ -sym off -proto ignoreoldstyle function.c -Move -y function.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:arlib.c -Move -y arlib.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:bogus.c -Move -y bogus.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:dirbrk.c -Move -y dirbrk.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:directry.c -Move -y directry.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:environ.c -Move -y environ.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:main.c -Move -y main.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:rmprq.c -Move -y rmprq.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:ruletab.c -Move -y ruletab.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:tempnam.c -Move -y tempnam.c.o :objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:tomacfil.c -Move -y tomacfil.c.o :objects -MWLinkPPC -w -c 'MPS ' -t MPST -sym off -xm m -o dmake :objects:infer.c.o :objects:make.c.o - :objects:stat.c.o :objects:expand.c.o :objects:dmstring.c.o :objects:hash.c.o - :objects:dag.c.o :objects:dmake.c.o :objects:path.c.o :objects:imacs.c.o - :objects:sysintf.c.o :objects:parse.c.o :objects:getinp.c.o :objects:quit.c.o - :objects:state.c.o :objects:dmdump.c.o :objects:macparse.c.o :objects:rulparse.c.o - :objects:percent.c.o :objects:function.c.o :objects:arlib.c.o :objects:bogus.c.o - :objects:dirbrk.c.o :objects:directry.c.o :objects:environ.c.o :objects:main.c.o - :objects:rmprq.c.o :objects:ruletab.c.o :objects:tempnam.c.o :objects:tomacfil.c.o - "{SharedLibraries}StdCLib" - "{SharedLibraries}InterfaceLib" - "{PPCLibraries}StdCRuntime.o" - "{PPCLibraries}PPCCRuntime.o" - "{PPCLibraries}PPCToolLibs.o" -if ( `Exists -f :startup:config.mk` ) - SetFile -a l :startup:config.mk -end -Duplicate -y :mac:template.mk :startup:config.mk diff --git a/dmake/mac/make_mac.sh b/dmake/mac/make_mac.sh deleted file mode 100644 index 9e6c4cc54949..000000000000 --- a/dmake/mac/make_mac.sh +++ /dev/null @@ -1,105 +0,0 @@ -# -# $Id: make_mac.sh,v 1.1.1.1 2000-09-22 15:33:26 hr Exp $ -# -# This MPW script builds the dmake executable using the Metroworks PPC compiler -# and linker. The resulting dmake binary will only run on the PPC platform. -# -# To execute this script, you will need the following tools: -# - MacOS 8 or later -# - CodeWarrior for MacOS Release 5 or later -# -# To run this script, you need to open the MPW Shell that is bundled with CodeWarrior. -# If you have another instance of MPW installed other than the one bundled with -# CodeWarrior, you may encounter problems. Once you open the MPW Shell that is bundled -# with CodeWarrior, you will need to set MPW's working directory to the "dmake" -# directory (the directory above the directory that this script is in). Then, execute -# this script from the MPW Worksheet by typing the following command: -# -# :mac:make_mac.sh -# -set Exit 1 -if ( "{0}" != ':mac:make_mac.sh' ) - Echo "You cannot run this script from the current directory." - Echo "To run this script, you need to be in the "dmake" directory and then" - Echo "execute the following command: ":mac:make_mac.sh"" - Exit -end -if ( ! `Exists -d objects` ) - NewFolder objects -end -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle infer.c -Move -y infer.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle make.c -Move -y make.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle stat.c -Move -y stat.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle expand.c -Move -y expand.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dmstring.c -Move -y dmstring.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle hash.c -Move -y hash.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dag.c -Move -y dag.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dmake.c -Move -y dmake.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle path.c -Move -y path.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle imacs.c -Move -y imacs.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle sysintf.c -Move -y sysintf.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle parse.c -Move -y parse.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle getinp.c -Move -y getinp.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle quit.c -Move -y quit.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle state.c -Move -y state.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle dmdump.c -Move -y dmdump.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle macparse.c -Move -y macparse.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle rulparse.c -Move -y rulparse.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle percent.c -Move -y percent.c.o objects -# Note that function.c needs to have __useAppleExts__ defined. Otherwise, it won't link. -MWCPPC -o : -ansi off -I :mac -d _MPW -d __useAppleExts__ -sym off -proto ignoreoldstyle function.c -Move -y function.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:arlib.c -Move -y arlib.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:bogus.c -Move -y bogus.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:dirbrk.c -Move -y dirbrk.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:directry.c -Move -y directry.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:environ.c -Move -y environ.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:main.c -Move -y main.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:rmprq.c -Move -y rmprq.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:ruletab.c -Move -y ruletab.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:tempnam.c -Move -y tempnam.c.o objects -MWCPPC -o : -ansi off -I :mac -d _MPW -sym off -proto ignoreoldstyle :mac:tomacfil.c -Move -y tomacfil.c.o objects -MWLinkPPC -w -c 'MPS ' -t MPST -sym off -xm m -o dmake :objects:infer.c.o :objects:make.c.o - :objects:stat.c.o :objects:expand.c.o :objects:dmstring.c.o :objects:hash.c.o - :objects:dag.c.o :objects:dmake.c.o :objects:path.c.o :objects:imacs.c.o - :objects:sysintf.c.o :objects:parse.c.o :objects:getinp.c.o :objects:quit.c.o - :objects:state.c.o :objects:dmdump.c.o :objects:macparse.c.o :objects:rulparse.c.o - :objects:percent.c.o :objects:function.c.o :objects:arlib.c.o :objects:bogus.c.o - :objects:dirbrk.c.o :objects:directry.c.o :objects:environ.c.o :objects:main.c.o - :objects:rmprq.c.o :objects:ruletab.c.o :objects:tempnam.c.o :objects:tomacfil.c.o - "{SharedLibraries}StdCLib" - "{SharedLibraries}InterfaceLib" - "{PPCLibraries}StdCRuntime.o" - "{PPCLibraries}PPCCRuntime.o" - "{PPCLibraries}PPCToolLibs.o" -SetFile -a l :startup:config.mk -Duplicate -y :mac:template.mk :startup:config.mk diff --git a/dmake/mac/public.h b/dmake/mac/public.h deleted file mode 100644 index 9404c0e4d40c..000000000000 --- a/dmake/mac/public.h +++ /dev/null @@ -1,173 +0,0 @@ -/* RCS $Id: public.h,v 1.9 2007-10-15 15:42:19 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 **, 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 *)); -time_t seek_arch ANSI((char*, char*)); -int touch_arch ANSI((char*, char*)); -//void tzset () {}/PUBLIC int putenv (char *pEnvString) {return (0); }/ ANSI(()); -void tzset ANSI(()); -int Wait_for_child ANSI((int ,int )); -void Clean_up_processes ANSI(()); -int If_root_path ANSI((char *)); -int stat ANSI((char *, struct stat *)); -char *getcwd ANSI((char *,size_t )); -int chdir ANSI((char *)); -int utime ANSI((char *,time_t *)); -void make_env ANSI(()); -void free_env ANSI(()); -void Remove_prq ANSI((CELLPTR)); -char *tempnam ANSI((char *,char *)); - -#endif diff --git a/dmake/mac/rmprq.c b/dmake/mac/rmprq.c deleted file mode 100644 index 424b9a060009..000000000000 --- a/dmake/mac/rmprq.c +++ /dev/null @@ -1,38 +0,0 @@ -/* RCS $Id: rmprq.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Remove prerequisites code. --- --- DESCRIPTION --- This code is different for The Mac and for UNIX and parallel make --- architectures since the parallel case requires the rm's to be --- run in parallel, whereas The Mac guarantees to run them sequentially. --- --- 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 "extern.h" - -PUBLIC void -Remove_prq( tcp ) -CELLPTR tcp; -{ - tcp->ce_flag &= ~(F_MADE|F_VISITED); - tcp->ce_time = 0L; - - Make( tcp, tcp ); -} diff --git a/dmake/mac/ruletab.c b/dmake/mac/ruletab.c deleted file mode 100644 index 520e2089201e..000000000000 --- a/dmake/mac/ruletab.c +++ /dev/null @@ -1,43 +0,0 @@ -/* RCS $Id: ruletab.c,v 1.2 2006-04-20 12:05:16 hr 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 */ - -static char *_rules[] = { - "MAXLINELENGTH := 4094", - "MAXPROCESSLIMIT := 1", - "MAXPROCESS := 1", - ".IMPORT .IGNORE: DMAKEROOT", - ".MAKEFILES : makefile.mk Makefile makefile", - ".SOURCE : .NULL", -#include "startup.h" - 0 }; - -char **Rule_tab = _rules; /* for sundry reasons in Get_environment() */ - diff --git a/dmake/mac/startup.h b/dmake/mac/startup.h deleted file mode 100644 index f4d18a5d6506..000000000000 --- a/dmake/mac/startup.h +++ /dev/null @@ -1,28 +0,0 @@ -/* RCS $Id: startup.h,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Default value of MAKESTARTUP. --- --- DESCRIPTION --- Default value is used if the environment variable is not --- defined. --- --- 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/mac/sysintf.h b/dmake/mac/sysintf.h deleted file mode 100644 index 717b968041b1..000000000000 --- a/dmake/mac/sysintf.h +++ /dev/null @@ -1,41 +0,0 @@ -/* RCS $Id: sysintf.h,v 1.2 2007-01-18 09:33:25 vg Exp $ --- --- SYNOPSIS --- Assorted bits of system interface --- --- DESCRIPTION --- This file is used to abstract away some of the 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 1 - -/* for directory cache */ -#define CacheStat(A,B) really_dostat(A,&buf) - -/* -** standard C items -*/ - -/* -** Mac interface standard items -*/ -#define getswitchar() '-' diff --git a/dmake/mac/template.mk b/dmake/mac/template.mk deleted file mode 100644 index 0cf10289c826..000000000000 --- a/dmake/mac/template.mk +++ /dev/null @@ -1,7 +0,0 @@ -# ** Default build configuration for dmake. -# ** DO NOT PLACE LOCAL DEFINITIONS INTO THIS FILE IT IS AUTO GENERATED -# ** USE "startup/local.mk" for those. - - OS *:= mac - OSRELEASE *:= - OSENVIRONMENT *:= diff --git a/dmake/mac/tempnam.c b/dmake/mac/tempnam.c deleted file mode 100644 index ee86ccb6a0a2..000000000000 --- a/dmake/mac/tempnam.c +++ /dev/null @@ -1,65 +0,0 @@ -/* RCS $Id: tempnam.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Fake tempnam function for the mac --- --- DESCRIPTION --- Get a temporary file name. --- --- 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 "extern.h" -#include <StdIO.h> -#include <String.h> - - - -/* - * Try to open a temporary file in the given directory (if non-NULL) - * with the given prefix (if non-NULL). - * - * We ignore the directory argument. - */ -PUBLIC char * -tempnam(char *pDir, char * pPrefix) -{ - char *pName; - char *pFullName; - - pName = tmpnam ((char *) NULL); - - /* Assume that if the name returned by tmpnam is not being used, - the name with the prefix is also not being used. */ - pFullName = MALLOC (((pPrefix != NULL) ? strlen (pPrefix) : 0) + - strlen (pName) + 1, char); - - /* Copy in the name if we successfully allocated space for it. */ - if (pFullName != NULL) { - if (pPrefix != NULL) { - strcpy (pFullName, pPrefix); - } else { - *pFullName = '\0'; - } /* if ... else */ - - strcat (pFullName, pName); - } /* if */ - - return (pFullName); -} /* PUBLIC char *tempnam () */ diff --git a/dmake/mac/tomacfil.c b/dmake/mac/tomacfil.c deleted file mode 100644 index d5f1ea72a496..000000000000 --- a/dmake/mac/tomacfil.c +++ /dev/null @@ -1,38 +0,0 @@ -/* RCS $Id: tomacfil.c,v 1.1.1.1 2000-09-22 15:33:27 hr Exp $ --- --- SYNOPSIS --- Routines to change unix file names to mac file names --- --- DESCRIPTION --- Dmake sometimes assumes that files have '/' as a directory parameter in some makefiles. --- This works, even on DOS, but not on the Mac. In fact, on the Mac, you can't even do a --- a simple switch of ':' for '/' because all other the Mac has decided to reverse the use --- of a first-character directory delimiter to mean a relative path rather than absolute path. --- (i.e., ':test:b' means directory test is relative to the current directory, rather than --- a top-level directory. Thus, this file attempts to do the directory conversion behind --- the back of the rest of the program. --- --- 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. -*/ - -/* This file no longer contains an override to the fopen() function as we now accept only - * Mac style path names - */ -#include <Files.h> - -#include "extern.h" diff --git a/dmake/make.c b/dmake/make.c index 67af0653d35f..2f9a9b1b6022 100644 --- a/dmake/make.c +++ b/dmake/make.c @@ -1044,6 +1044,7 @@ char *pat; cmp1 = DmStrPbrk(pfx,DirBrkStr); result = DmStrJoin(result,up,-1,TRUE); } + FREE(up); pat = DmStrSpn(pat,DirBrkStr); /* Append pat to result. */ @@ -1254,7 +1255,7 @@ Exec_commands( cp )/* The function returns 0, if the command is executed and has successfully returned, and it returns 1 if the command is executing but has not yet - returned or -1 if an error occured (Return value from Do_cmnd()). + returned or -1 if an error occurred (Return value from Do_cmnd()). Macros that are found in recipe lines are expanded in this function, in parallel builds this can mean they are expanded before the previous recipe @@ -1519,7 +1520,6 @@ char *name; int ignore; { STRINGPTR new_dir; - int freedir=FALSE; DB_ENTER( "Push_dir" ); @@ -1527,12 +1527,9 @@ int ignore; if( *dir == '\'' && dir[strlen(dir)-1] == '\'' ) { dir = DmStrDup(dir+1); dir[strlen(dir)-1]='\0'; - freedir=TRUE; } - else if (strchr(dir,'$') != NIL(char)) { + else if (strchr(dir,'$') != NIL(char)) dir = Expand(dir); - freedir=TRUE; - } else dir = DmStrDup(dir); @@ -1540,7 +1537,7 @@ int ignore; if( !ignore ) Fatal( "Unable to change to directory `%s', target is [%s]", dir, name ); - if (freedir) FREE(dir); + FREE(dir); DB_RETURN( 0 ); } @@ -1548,7 +1545,7 @@ int ignore; if( Verbose & V_DIR_SET ) printf( "%s: Changed to directory [%s]\n", Pname, dir ); - if (freedir) FREE( dir ); + FREE( dir ); TALLOC( new_dir, 1, STRING ); new_dir->st_next = dir_stack; dir_stack = new_dir; diff --git a/dmake/path.c b/dmake/path.c index ead163394175..d50b7593eec1 100644 --- a/dmake/path.c +++ b/dmake/path.c @@ -181,7 +181,7 @@ char *path; #ifdef HAVE_DRIVE_LETTERS - /* Change all occurences from DirBrkStr to *DirSepStr. This assumes + /* Change all occurrences from DirBrkStr to *DirSepStr. This assumes * that when HAVE_DRIVE_LETTERS is set the directory separator is * either '\' or '/'. */ if (*DirSepStr == '/') diff --git a/dmake/quit.c b/dmake/quit.c index 54043093de24..68ade197fd24 100644 --- a/dmake/quit.c +++ b/dmake/quit.c @@ -37,6 +37,8 @@ Quit( sig )/* ======== Error or quit */ int sig; { + int ret = ERROR_ABORT_VALUE; + if( sig == SIGINT ) fprintf(stderr, "Caught SIGINT. Trying to quit ...\n"); else @@ -48,7 +50,7 @@ int sig; #endif if( sig == 0 ) /* Don't be verbose during regular program termination. */ - ; + ret = ERROR_EXIT_VALUE; else fprintf(stderr, "Caught signal %d. Trying to quit ...\n", sig); @@ -78,7 +80,7 @@ int sig; if( _quitting == 0 ) _handle_quit( ".ERROR" ); Set_dir( Makedir ); /* No Error message if we can't do it */ - Epilog( ERROR_EXIT_VALUE ); + Epilog( ret ); } diff --git a/dmake/rulparse.c b/dmake/rulparse.c index f47f166ef7ae..b5cb72e65f77 100644 --- a/dmake/rulparse.c +++ b/dmake/rulparse.c @@ -451,12 +451,6 @@ int flag; DB_PRINT( "par", ("Binding to %s, %04x", tg->CE_NAME, tg->ce_flag) ); magic = tg->ce_flag & F_PERCENT; -#if 0 - /* Check to see if we had a rule of the form '%.o : a.h b.h ; xxx' - * In which case we must build a NULL prq node to hold the recipe */ - if( _sv_globprq_only && (_sv_rules != NIL(STRING)) ) - _build_graph( _sv_op, tg, NIL(CELL) ); -#endif /* NOTE: For targets that are magic or special we ignore any * previously defined rules, ie. We throw away the old definition @@ -1199,7 +1193,7 @@ CELLPTR prereq; * definitions for the %-target members are stored in the prerequisites * list of the master target. */ /* This relies on target->ce_prq being NULL if this is the first - * occurence of this %-target and therefore not yet having a %-target + * occurrence of this %-target and therefore not yet having a %-target * master. */ match = FALSE; for(edl=target->ce_prq; !match && edl != NIL(LINK); edl=edl->cl_next) { diff --git a/dmake/startup/mac/macros.mk b/dmake/startup/mac/macros.mk deleted file mode 100644 index ca161a8baa5c..000000000000 --- a/dmake/startup/mac/macros.mk +++ /dev/null @@ -1,41 +0,0 @@ -# Define MPW MAC specific macros. -# Assumes CodeWarrior for Mac 5.0 C, change as needed. -# - -A *:= .lib -S *:= .s -V *:= v -TMPDIR *:= $(TempFolder) - -# import library definitions -.IMPORT .IGNORE : CLibraries Libraries - -# Set arguments for the SHELL. Since we can't execute sub-processes, -# these variables are not important, except for some makefiles that check -# for some values to determine the platform. -SHELL *:= "{MPW}MPW Shell" -SHELLFLAGS *:= -GROUPFLAGS *:= -SHELLMETAS *:= - -# Define toolkit macros -CC *:= MWCPPC -AS *:= PPCAsm -LD *:= MWLinkPPC -AR *:= -ARFLAGS *:= -RM *:= delete -RMFLAGS *:= -MV *:= rename -YTAB *:= -LEXYY *:= - -LDLIBS *= "{SharedLibraries}StdCLib" "{SharedLibraries}InterfaceLib" \ - "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime.o" \ - "{Libraries}MathLib.o" "{PPCLibraries}PPCToolLibs.o" - -# Disable the print command -PRINT *= - -# Make certain to disable defining how to make executables. -__.EXECS !:= diff --git a/dmake/sysintf.c b/dmake/sysintf.c index 65104114923f..c8cf756b19b9 100644 --- a/dmake/sysintf.c +++ b/dmake/sysintf.c @@ -278,7 +278,7 @@ int last; /* Last recipe line in target. */ DB_RETURN( 0 ); } - /* Stop making the rest of the recipies for this target if an error occured + /* Stop making the rest of the recipies for this target if an error occurred * but the Continue (-k) flag is set to build as much as possible. */ if ( target->ce_attr & A_ERROR ) { if ( last ) { diff --git a/dmake/unix/runargv.c b/dmake/unix/runargv.c index e8e39d21bd3d..42b9c25e66a9 100644 --- a/dmake/unix/runargv.c +++ b/dmake/unix/runargv.c @@ -438,7 +438,8 @@ private_strerror (errnum) int errnum; { #ifndef __APPLE__ -# if defined(arm32) || defined(linux) || defined(__FreeBSD__) || defined(__OpenBSD__) +# if defined(arm32) || defined(linux) || defined(__FreeBSD__) || \ + defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) extern const char * const sys_errlist[]; # else extern char *sys_errlist[]; diff --git a/dmake/win95/dchdir.c b/dmake/win95/dchdir.c index dab1d7163ede..6a77d45b69fe 100644 --- a/dmake/win95/dchdir.c +++ b/dmake/win95/dchdir.c @@ -23,9 +23,6 @@ -- Use cvs log to obtain detailed change logs. */ -#if 0 -#include <dir.h> -#endif #include <direct.h> #include "extern.h" |