diff options
author | jim <empty> | 1989-10-16 12:09:15 +0000 |
---|---|---|
committer | jim <empty> | 1989-10-16 12:09:15 +0000 |
commit | b2fb16915880c960d495b863e73beb54eff11211 (patch) | |
tree | ad836e26366997a1b4c00080cea2975de623a3d4 /xc | |
parent | 1ef671cac2fb1a45214944e76bb9abd612c4cbfb (diff) |
added new config stuff
Diffstat (limited to 'xc')
-rw-r--r-- | xc/config/cf/Imakefile | 23 | ||||
-rw-r--r-- | xc/config/cf/Project.tmpl | 6 | ||||
-rw-r--r-- | xc/config/imake/Makefile.ini | 10 | ||||
-rw-r--r-- | xc/config/imake/ccimake.c | 42 | ||||
-rw-r--r-- | xc/config/imake/imake.c | 74 | ||||
-rw-r--r-- | xc/config/imake/imakemdep.h | 63 |
6 files changed, 112 insertions, 106 deletions
diff --git a/xc/config/cf/Imakefile b/xc/config/cf/Imakefile index cecc7e625..aa58a1748 100644 --- a/xc/config/cf/Imakefile +++ b/xc/config/cf/Imakefile @@ -1,12 +1,27 @@ /* - * $XConsortium: Imakefile,v 1.3 89/03/14 12:17:56 jim Exp $ + * $XConsortium: Imakefile,v 1.4 89/08/28 13:51:09 jim Exp $ + * + * This is used to recreate imake. Makefile.ini is used to generate imake + * the first time. */ -CONFIG_FILES = Imake.rules Imake.tmpl Project.tmpl site.def *.bac *.cf +DEPLIBS = +HEADERS = imakemdep.h +CFFILES = $(HEADERS) Imake.rules Imake.tmpl Project.tmpl site.def *.bac *.cf -all:: + +#undef ImakeDependency +#define ImakeDependency() @@\ +Makefile:: imake + +SimpleProgramTarget(imake) + +BuildIncludes($(HEADERS),config,..) MakeDirectories(install,$(CONFIGDIR)) -InstallMultipleDestFlags(install,$(CONFIG_FILES),$(CONFIGDIR),$(INSTDATFLAGS)) +InstallMultipleDestFlags(install,$(CFFILES),$(CONFIGDIR),$(INSTDATFLAGS)) depend:: + +clean:: + $(RM) ccimake diff --git a/xc/config/cf/Project.tmpl b/xc/config/cf/Project.tmpl index 1bc434014..d7200e62e 100644 --- a/xc/config/cf/Project.tmpl +++ b/xc/config/cf/Project.tmpl @@ -1,6 +1,6 @@ /**/########################################################################### /**/# X Window System Build Parameters -/**/# $XConsortium: Project.tmpl,v 1.42 89/10/09 17:27:21 jim Exp $ +/**/# $XConsortium: Project.tmpl,v 1.43 89/10/11 18:55:03 jim Exp $ /***************************************************************************** * * @@ -309,7 +309,7 @@ Berklib.c: sysV/Berklib.c @@\ /**/########################################################################### /**/# X Window System make variables; this need to be coordinated with rules -/**/# $XConsortium: Project.tmpl,v 1.42 89/10/09 17:27:21 jim Exp $ +/**/# $XConsortium: Project.tmpl,v 1.43 89/10/11 18:55:03 jim Exp $ /* * This list must be reflected in the DIRS_TO_BUILD list in the top-level @@ -376,7 +376,7 @@ Berklib.c: sysV/Berklib.c @@\ DOCSRC = $(TOP)/doc RGBSRC = $(TOP)/rgb DEPENDSRC = DependDir - IMAKESRC = $(UTILSRC)/imake + IMAKESRC = $(CONFIGSRC) XAUTHSRC = $(LIBSRC)/Xau XLIBSRC = $(LIBSRC)/X XMUSRC = $(LIBSRC)/Xmu diff --git a/xc/config/imake/Makefile.ini b/xc/config/imake/Makefile.ini index e2c47b1ac..f84dced91 100644 --- a/xc/config/imake/Makefile.ini +++ b/xc/config/imake/Makefile.ini @@ -20,18 +20,18 @@ BOOTSTRAPCFLAGS = imake:: @echo "making imake with BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)" -imake:: ccflags imake.c - $(CC) -o imake $(CFLAGS) imake.c `./ccflags` +imake:: ccimake imake.c + $(CC) -o imake $(CFLAGS) imake.c `./ccimake` -ccflags: ccflags.c - $(CC) -o ccflags $(CFLAGS) ccflags.c +ccimake: ccimake.c + $(CC) -o ccimake $(CFLAGS) ccimake.c relink: $(RM) imake $(MAKE) $(MFLAGS) imake clean: - $(RM) ccflags imake + $(RM) ccimake imake $(RM_CMD) \#* depend: diff --git a/xc/config/imake/ccimake.c b/xc/config/imake/ccimake.c index df2309cdd..c5a4b83f7 100644 --- a/xc/config/imake/ccimake.c +++ b/xc/config/imake/ccimake.c @@ -1,41 +1,21 @@ /* - * Put any special flags that will be necessary to get imake.c to compile. Do - * not include the value of BOOTSTRAPCFLAGS as it will be passed to imake.c - * automatically. + * $XConsortium$ + * + * Warning: This file must be kept as simple as posible so that it can + * compile without any special flags on all systems. Do not touch it unless + * you *really* know what you're doing. Make changes in imakemdep.h, not here. */ -#ifdef hpux -#define ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV" -#endif /* hpux */ +#define CCIMAKE /* only get imake_ccflags definitions */ +#include "imakemdep.h" /* things to set when porting imake */ -#ifdef macII -#define ccflags "-DSYSV" -#endif /* macII */ - -#ifdef att -#define ccflags "-DSYSV -DUSG" -#endif /* att */ - -#ifdef aix -#define ccflags "-Daix" -#endif - -#ifdef CRAY -#define ccflags "-DSYSV" -#endif /* CRAY */ - -#ifdef umips -#ifdef SYSTYPE_SYSV -#define ccflags "-DSYSV -I../../lib/X/mips -I/usr/include/bsd ../../lib/X/mips/mipssysvc.c -lbsd" -#endif +#ifndef imake_ccflags +#define imake_ccflags "-O" #endif -#ifndef ccflags -#define ccflags "-O" -#endif /* ccflags */ - main() { - write(1, ccflags, sizeof(ccflags) - 1); + write(1, imake_ccflags, sizeof(imake_ccflags) - 1); exit(0); } + 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; diff --git a/xc/config/imake/imakemdep.h b/xc/config/imake/imakemdep.h index a64a4315d..845bf102c 100644 --- a/xc/config/imake/imakemdep.h +++ b/xc/config/imake/imakemdep.h @@ -1,5 +1,5 @@ /* - * $XConsortium$ + * $XConsortium: imakemdep.h,v 1.1 89/10/16 11:50:22 jim Exp $ * * This file contains machine-dependent constants for the imake utility. When * porting imake, read each of the steps below and add in any necessary @@ -40,9 +40,7 @@ #endif #else /* not CCIMAKE */ - - - +#ifndef MAKEDEPEND /* * Step 2: dup2 * If your OS doesn't have a dup2() system call to duplicate one file @@ -122,5 +120,62 @@ char *cpp_argv[ARGUMENTS] = { "-Daix", /* AIX instead of AOS */ #endif }; +#else /* else MAKEDEPEND */ +/* + * Step 6: predefs + * If your compiler and/or preprocessor define any specific symbols, add + * them to the the following table. The definition of struct symtab is + * in util/makedepend/main.c. + */ +struct symtab predefs[] = { +#ifdef apollo + {"apollo", NULL}, +#endif +#ifdef ibm032 + {"ibm032", NULL}, +#endif +#ifdef sun + {"sun", NULL}, +#endif +#ifdef hpux + {"hpux", NULL}, +#endif +#ifdef vax + {"vax", NULL}, +#endif +#ifdef VMS + {"VMS", NULL}, +#endif +#ifdef cray + {"cray", NULL}, +#endif +#ifdef CRAY + {"CRAY", NULL}, +#endif +#ifdef att + {"att", NULL}, +#endif +#ifdef mips + {"mips", NULL}, +#endif +#ifdef ultrix + {"ultrix", NULL}, +#endif +#ifdef mc68000 + {"mc68000", NULL}, +#endif +#ifdef mc68020 + {"mc68020", NULL}, +#endif +#ifdef __GNUC__ + {"__GNUC__", NULL}, +#endif +#ifdef __STDC__ + {"__STDC__", NULL}, +#endif + /* add any additional symbols before this line */ + {NULL, NULL} +}; +#endif /* MAKEDEPEND */ #endif /* CCIMAKE */ |