diff options
Diffstat (limited to 'xc/config/imake/imake.c')
-rw-r--r-- | xc/config/imake/imake.c | 74 |
1 files changed, 15 insertions, 59 deletions
diff --git a/xc/config/imake/imake.c b/xc/config/imake/imake.c index c34f2914f..ee8bc4935 100644 --- a/xc/config/imake/imake.c +++ b/xc/config/imake/imake.c @@ -25,7 +25,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $XConsortium: imake.c,v 1.47 89/08/28 14:19:51 jim Exp $ + * $XConsortium: imake.c,v 1.48 89/10/10 18:33:21 jim Exp $ * $Locker: jim $ * * Author: @@ -109,27 +109,13 @@ #include <sys/file.h> #include <signal.h> #include <sys/stat.h> +#include "imakemdep.h" + -#ifdef SYSV -#define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : \ - (close(fd2), fcntl(fd1, F_DUPFD, fd2))) -#endif /* SYSV */ #define TRUE 1 #define FALSE 0 -#define ARGUMENTS 50 - -/* - * It is known that we need this kludge on the following machines: - * - * sun, hpux, macII, CRAY, att - * - * The latter group all happen to be SYSV as well. - */ -#if defined(sun) || defined(SYSV) -#define REDUCED_TO_ASCII_SPACE -#endif -#ifdef REDUCED_TO_ASCII_SPACE +#ifdef FIXUP_CPP_WHITESPACE int InRule = FALSE; #endif @@ -138,53 +124,23 @@ int InRule = FALSE; * space. In addition, the escaped newline may be replaced with a * space instead of being deleted. Blech. */ -#ifndef REDUCED_TO_ASCII_SPACE +#ifndef FIXUP_CPP_WHITESPACE #define KludgeOutputLine(arg) #define KludgeResetRule() #endif typedef unsigned char boolean; -#ifndef apollo -char *cpp = "/lib/cpp"; -#else /* apollo */ -char *cpp = "/usr/lib/cpp"; -#endif /* apollo */ +#ifndef DEFAULT_CPP +#define DEFAULT_CPP "/lib/cpp" +#endif + +char *cpp = DEFAULT_CPP; char *tmpMakefile = "/tmp/Imf.XXXXXX"; char *tmpImakefile = "/tmp/IIf.XXXXXX"; char *make_argv[ ARGUMENTS ] = { "make" }; -/* - * Table of arguments to be passed on every imake line. If your cpp does not - * define a unique symbol, choose one, add it to the end of the table, and - * always build with BOOTSTRAPCFLAGS set the appropriate name. - */ -char *cpp_argv[ ARGUMENTS ] = { - "cpp", - "-I.", -#ifdef unix - "-Uunix", -#endif /* unix */ -#ifdef M4330 - "-DM4330", /* default cpp has no unique symbol */ -#endif /* M4330 (Tektronix) */ -#ifdef M4310 - "-DM4310", /* default cpp has no unique symbol */ -#endif /* M4310 (Tektronix) */ -#ifdef macII - "-DmacII", /* default cpp has no unique symbol */ -#endif /* macII (Apple) */ -#ifdef att - "-Datt", /* the default cpp has no unique symbol */ -#endif -#ifdef ibm - "-Dibm", -#endif -#ifdef aix - "-Daix", -#endif -}; int make_argindex; int cpp_argindex; char *make = NULL; @@ -712,9 +668,9 @@ char *ReadLine(tmpfd, tmpfname) initialized = TRUE; fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n"); fprintf (tmpfd, "# %s\n", - "$XConsortium: imake.c,v 1.47 89/08/28 14:19:51 jim Exp $"); + "$XConsortium: imake.c,v 1.48 89/10/10 18:33:21 jim Exp $"); -#ifdef REDUCED_TO_ASCII_SPACE +#ifdef FIXUP_CPP_WHITESPACE { static char *cpp_warning[] = { "#", @@ -729,7 +685,7 @@ NULL }; fprintf (tmpfd, "%s\n", *cpp); } } -#endif /* REDUCED_TO_ASCII_SPACE */ +#endif /* FIXUP_CPP_WHITESPACE */ } for (p1 = pline; p1 < end; p1++) { @@ -772,7 +728,7 @@ char *Emalloc(size) return(p); } -#ifdef REDUCED_TO_ASCII_SPACE +#ifdef FIXUP_CPP_WHITESPACE KludgeOutputLine(pline) char **pline; { @@ -802,7 +758,7 @@ KludgeResetRule() { InRule = FALSE; } -#endif /* REDUCED_TO_ASCII_SPACE */ +#endif /* FIXUP_CPP_WHITESPACE */ char *strdup(cp) register char *cp; |