From: ceriel Date: Tue, 27 Aug 1991 09:41:49 +0000 (+0000) Subject: New installation mechanism X-Git-Tag: release-5-5~1044 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e7856a22044217289278e8155099e7e2edc947e2;p=ack.git New installation mechanism --- diff --git a/util/byacc/.distr b/util/byacc/.distr index 263bec818..94964ce7e 100644 --- a/util/byacc/.distr +++ b/util/byacc/.distr @@ -1,5 +1,5 @@ ACKNOWLEDGEMENTS -Makefile +proto.make NEW_FEATURES NO_WARRANTY README diff --git a/util/byacc/proto.make b/util/byacc/proto.make new file mode 100644 index 000000000..52deca649 --- /dev/null +++ b/util/byacc/proto.make @@ -0,0 +1,97 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/byacc +DEST = $(TARGET_HOME)/bin +MAN = $(TARGET_HOME)/man + +HDRS = $(SRC_DIR)/defs.h + +INCLUDES = -I$(SRC_DIR) +CFLAGS = $(COPTIONS) $(INCLUDES) +LDFLAGS = $(LDOPTIONS) +LINTFLAGS = $(LINTOPTIONS) $(INCLUDES) + +OBJS = closure.$(SUF) \ + error.$(SUF) \ + lalr.$(SUF) \ + lr0.$(SUF) \ + main.$(SUF) \ + mkpar.$(SUF) \ + output.$(SUF) \ + reader.$(SUF) \ + skeleton.$(SUF) \ + symtab.$(SUF) \ + verbose.$(SUF) \ + warshall.$(SUF) + +PROGRAM = yacc + +SRCS = $(SRC_DIR)/closure.c \ + $(SRC_DIR)/error.c \ + $(SRC_DIR)/lalr.c \ + $(SRC_DIR)/lr0.c \ + $(SRC_DIR)/main.c \ + $(SRC_DIR)/mkpar.c \ + $(SRC_DIR)/output.c \ + $(SRC_DIR)/reader.c \ + $(SRC_DIR)/skeleton.c \ + $(SRC_DIR)/symtab.c \ + $(SRC_DIR)/verbose.c \ + $(SRC_DIR)/warshall.c + +all: $(PROGRAM) + +$(PROGRAM): $(OBJS) + $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) + +clean: + rm -f $(OBJS) $(PROGRAM) + +install: $(PROGRAM) + cp $(PROGRAM) $(DEST)/$(PROGRAM) + cp $(SRC_DIR)/manpage $(MAN)/yacc.1 + +cmp: $(PROGRAM) + -cmp $(PROGRAM) $(DEST)/$(PROGRAM) + -cmp $(SRC_DIR)/manpage $(MAN)/yacc.1 + +pr: + @pr proto.make $(HDRS) $(SRCS) + +opr: + make pr | opr + +lint: + $(LINT) $(LINTFLAGS) $(SRCS) + +program: $(PROGRAM) + +tags: $(HDRS) $(SRCS) + @ctags $(HDRS) $(SRCS) + +closure.$(SUF): $(SRC_DIR)/closure.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/closure.c +error.$(SUF): $(SRC_DIR)/error.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/error.c +lalr.$(SUF): $(SRC_DIR)/lalr.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/lalr.c +lr0.$(SUF): $(SRC_DIR)/lr0.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/lr0.c +main.$(SUF): $(SRC_DIR)/main.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c +mkpar.$(SUF): $(SRC_DIR)/mkpar.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/mkpar.c +output.$(SUF): $(SRC_DIR)/output.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/output.c +reader.$(SUF): $(SRC_DIR)/reader.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/reader.c +skeleton.$(SUF): $(SRC_DIR)/skeleton.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/skeleton.c +symtab.$(SUF): $(SRC_DIR)/symtab.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/symtab.c +verbose.$(SUF): $(SRC_DIR)/verbose.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/verbose.c +warshall.$(SUF): $(SRC_DIR)/warshall.c $(SRC_DIR)/defs.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/warshall.c diff --git a/util/cgg/.distr b/util/cgg/.distr index 55f9fde4b..4f5635a59 100644 --- a/util/cgg/.distr +++ b/util/cgg/.distr @@ -1,4 +1,4 @@ -Makefile +proto.make bootgram.y bootlex.l main.c diff --git a/util/cgg/proto.make b/util/cgg/proto.make new file mode 100644 index 000000000..52fe78bc3 --- /dev/null +++ b/util/cgg/proto.make @@ -0,0 +1,45 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/cgg +INCLUDES=-I$(TARGET_HOME)/h +CFLAGS=$(INCLUDES) $(COPTIONS) +LDFLAGS=$(LDOPTIONS) +LINTFLAGS=$(INCLUDES) $(LINTOPTIONS) +LIBS=$(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) + +cgg: bootgram.$(SUF) main.$(SUF) bootlex.$(SUF) + $(CC) $(LDFLAGS) bootgram.$(SUF) main.$(SUF) bootlex.$(SUF) $(LIBS) -o cgg + +bootgram.c: $(SRC_DIR)/bootgram.y + @echo expect 1 shift/reduce conflict + yacc -d $(SRC_DIR)/bootgram.y + mv y.tab.c bootgram.c + +install: cgg + cp cgg $(TARGET_HOME)/lib.bin/cgg + +cmp: cgg + -cmp cgg $(TARGET_HOME)/lib.bin/cgg + +bootlex.c: $(SRC_DIR)/bootlex.l + flex -st $(SRC_DIR)/bootlex.l > bootlex.c + +lint: bootgram.c $(SRC_DIR)/main.c bootlex.c + $(LINT) $(LINTFLAGS) bootgram.c $(SRC_DIR)/main.c bootlex.c $(UTIL_HOME)/lib.bin/$(LINTPREF)em_data.$(LINTSUF) +clean: + rm -f *.$(SUF) bootgram.c bootlex.c cgg y.tab.h + +bootgram.$(SUF): bootgram.c + $(CC) -c $(CFLAGS) bootgram.c +bootgram.$(SUF): $(SRC_DIR)/booth.h +bootgram.$(SUF): $(TARGET_HOME)/h/cg_pattern.h +bootlex.$(SUF): bootlex.c + $(CC) -c $(CFLAGS) bootlex.c +bootlex.$(SUF): $(SRC_DIR)/booth.h +bootlex.$(SUF): $(TARGET_HOME)/h/cg_pattern.h +main.$(SUF): $(SRC_DIR)/main.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c +main.$(SUF): $(SRC_DIR)/booth.h +main.$(SUF): $(TARGET_HOME)//h/cg_pattern.h diff --git a/util/cmisc/.distr b/util/cmisc/.distr index d4fa0ebb5..c54a3d964 100644 --- a/util/cmisc/.distr +++ b/util/cmisc/.distr @@ -1,5 +1,5 @@ GCIPM.c -Makefile +proto.make cclash.1 cclash.c cid.1 diff --git a/util/cmisc/proto.make b/util/cmisc/proto.make new file mode 100644 index 000000000..bbfdf968b --- /dev/null +++ b/util/cmisc/proto.make @@ -0,0 +1,69 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/cmisc +TARGET_BIN = $(TARGET_HOME)/bin +TARGET_MAN = $(TARGET_HOME)/man +CFLAGS = $(COPTIONS) +LDFLAGS = $(LDOPTIONS) +LINTFLAGS = $(LINTOPTIONS) + +all: cid cclash prid tabgen + +install: all + cp cid cclash prid tabgen $(TARGET_BIN) + cp $(SRC_DIR)/cid.1 $(SRC_DIR)/cclash.1 $(SRC_DIR)/prid.1 $(SRC_DIR)/tabgen.1 $(TARGET_MAN) + +cmp: all + -cmp cid $(TARGET_BIN)/cid + -cmp cclash $(TARGET_BIN)/cclash + -cmp prid $(TARGET_BIN)/prid + -cmp tabgen $(TARGET_BIN)/tabgen + -cmp $(SRC_DIR)/cid.1 $(TARGET_MAN)/cid.1 + -cmp $(SRC_DIR)/cclash.1 $(TARGET_MAN)/cclash.1 + -cmp $(SRC_DIR)/prid.1 $(TARGET_MAN)/prid.1 + -cmp $(SRC_DIR)/tabgen.1 $(TARGET_MAN)/tabgen.1 + +clean: + rm -f *.$(SUF) cid cclash prid tabgen + +pr: + @pr $(SRC_DIR)/proto.make $(SRC_DIR)/cclash.c $(SRC_DIR)/cid.c \ + $(SRC_DIR)/prid.c $(SRC_DIR)/GCIPM.c $(SRC_DIR)/tabgen.c + +opr: + make pr | opr + +tabgen: tabgen.$(SUF) + $(CC) $(LDFLAGS) -o tabgen tabgen.$(SUF) + +cid: cid.$(SUF) GCIPM.$(SUF) + $(CC) $(LDFLAGS) -o cid cid.$(SUF) GCIPM.$(SUF) + +cclash: cclash.$(SUF) GCIPM.$(SUF) + $(CC) $(LDFLAGS) -o cclash cclash.$(SUF) GCIPM.$(SUF) + +prid: prid.$(SUF) GCIPM.$(SUF) + $(CC) $(LDFLAGS) -o prid prid.$(SUF) GCIPM.$(SUF) + +lint: + $(LINT) $(LINTFLAGS) $(SRC_DIR)/cid.c $(SRC_DIR)/GCIPM.c + $(LINT) $(LINTFLAGS) $(SRC_DIR)/prid.c $(SRC_DIR)/GCIPM.c + $(LINT) $(LINTFLAGS) $(SRC_DIR)/cclash.c $(SRC_DIR)/GCIPM.c + $(LINT) $(LINTFLAGS) $(SRC_DIR)/tabgen.c + +tabgen.$(SUF): $(SRC_DIR)/tabgen.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/tabgen.c + +cid.$(SUF): $(SRC_DIR)/cid.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/cid.c + +prid.$(SUF): $(SRC_DIR)/prid.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/prid.c + +cclash.$(SUF): $(SRC_DIR)/cclash.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/cclash.c + +GCIPM.$(SUF): $(SRC_DIR)/GCIPM.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/GCIPM.c diff --git a/util/cmisc/tabgen.1 b/util/cmisc/tabgen.1 index 039b63b12..0c2c9ac01 100644 --- a/util/cmisc/tabgen.1 +++ b/util/cmisc/tabgen.1 @@ -60,13 +60,6 @@ Initialize all internal table values to \fIstr\fP. if \fIstr\fP is not given, this command is equivalent to the C command. .IP S\fInum\fP Set the table size to \fInum\fP entries. The default size is 128. -.IP H\fIfilename\fP -Create tables which can be indexed by the full range of characters, -rather than 0..127. As this depends on the implementation of 'char' -in C (signed or unsigned), this also generates a file \fIfilename\fP, -with a #define for the constant "CharOffset". The generated tables can -be indexed by first adding "CharOffset" to the base of the table. -If \fIfilename\fP is not given, "charoffset.h" is used. .SH "AN EXAMPLE" .PP The next example is a part of the \fItabgen\fP description of the diff --git a/util/cmisc/tabgen.c b/util/cmisc/tabgen.c index 85a838db7..5ddf1749b 100644 --- a/util/cmisc/tabgen.c +++ b/util/cmisc/tabgen.c @@ -25,18 +25,14 @@ char OutputForm[MAXBUF] = "%s,\n"; /* format for spitting out a string */ char *Table[MAXTAB]; char *ProgCall; /* callname of this program */ -int signedch = 0; /* set if characters are signed */ int TabSize = 128; /* default size of generated table */ char *InitialValue; /* initial value of all table entries */ -#define CHROFFSETFILE "charoffset.h" -char *chroffsetfile = 0; extern char *malloc(), *strcpy(); main(argc, argv) char *argv[]; { - if (((char) -1) < 0) signedch = 1; ProgCall = *argv++; argc--; @@ -50,24 +46,8 @@ main(argc, argv) } } } - if (chroffsetfile) MkCharIndex(); exit(0); -} - -MkCharIndex() -{ - /* Assumption: 8 bit bytes, ASCII character set */ - FILE *fp; - - if ((fp = fopen(chroffsetfile, "w")) == NULL) { - fprintf(stderr, "%s: cannot write file %s\n", ProgCall, chroffsetfile); - exit(1); - } - if (signedch) { - fputs("#define CharOffset 128\n", fp); - } - else fputs("#define CharOffset 0\n", fp); - fclose(fp); + /*NOTREACHED*/ } char * @@ -126,16 +106,6 @@ option(str) } else InitTable(str); break; - case 'H': /* create include file for character offset, - and create tables which can be indexed by the - full range of characters, rather than 0..127, - by adding "CharOffset" to the base. - */ - if (*++str == '\0') { - chroffsetfile = CHROFFSETFILE; - } - else chroffsetfile = ++str; - break; case 'S': { register i = atoi(++str); @@ -232,14 +202,14 @@ c_proc(str, Name) ch = quoted(&str); } else { - ch = *str++; + ch = *str++ & 0377; } if (*str == '-') { if (*++str == '\\') { ch2 = quoted(&str); } else { - if (ch2 = *str++); + if (ch2 = (*str++ & 0377)); else str--; } if (ch > ch2) { @@ -255,23 +225,20 @@ c_proc(str, Name) if (! setval(ch, name)) return 0; } } - if (chroffsetfile) Table[256] = Table[0]; return 1; } -#define ind(X) (chroffsetfile && signedch?(X>=128?X-128:X+128):X) - int setval(ch, nm) char *nm; { - register char **p = &Table[ind(ch)]; + register char **p = &Table[ch]; if (ch < 0 || ch >= TabSize) { fprintf(stderr, "Illegal index: %d\n", ch); return 0; } - if (*(p = &Table[ind(ch)])) { + if (*(p = &Table[ch])) { fprintf(stderr, "Warning: redefinition of index %d\n", ch); } *p = nm; diff --git a/util/cpp/.distr b/util/cpp/.distr index a38425ca0..949bf8260 100644 --- a/util/cpp/.distr +++ b/util/cpp/.distr @@ -1,7 +1,7 @@ LLlex.c LLlex.h LLmessage.c -Makefile +proto.make Parameters bits.h ch7bin.c diff --git a/util/cpp/char.tab b/util/cpp/char.tab index ce3460aa7..b76e3fecc 100644 --- a/util/cpp/char.tab +++ b/util/cpp/char.tab @@ -3,7 +3,6 @@ % % some general settings: %F %s, -%H %S257 % % START OF TOKEN diff --git a/util/cpp/class.h b/util/cpp/class.h index 7dc3456e7..f589301df 100644 --- a/util/cpp/class.h +++ b/util/cpp/class.h @@ -10,9 +10,7 @@ At present such a class number is supposed to fit in 4 bits. */ -#include "charoffset.h" - -#define class(ch) ((tkclass+CharOffset)[ch]) +#define class(ch) (tkclass[(unsigned char) ch]) /* Being the start of a token is, fortunately, a mutual exclusive property, so, as there are less than 16 classes they can be @@ -38,9 +36,9 @@ #define _D_ 04 #define _H_ 010 -#define in_idf(ch) ((tk2class+CharOffset)[ch] & _I_) -#define is_oct(ch) ((tk2class+CharOffset)[ch] & _O_) -#define is_dig(ch) ((tk2class+CharOffset)[ch] & _D_) -#define is_hex(ch) ((tk2class+CharOffset)[ch] & _H_) +#define in_idf(ch) (tk2class[(unsigned char)ch] & _I_) +#define is_oct(ch) (tk2class[(unsigned char)ch] & _O_) +#define is_dig(ch) (tk2class[(unsigned char)ch] & _D_) +#define is_hex(ch) (tk2class[(unsigned char)ch] & _H_) extern char tkclass[], tk2class[]; diff --git a/util/cpp/proto.make b/util/cpp/proto.make new file mode 100644 index 000000000..1be32655b --- /dev/null +++ b/util/cpp/proto.make @@ -0,0 +1,350 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/cpp + +MODULES=$(TARGET_HOME)/modules +MODULES=$(UTIL_HOME)/modules +MODULESLIB=$(MODULES)/lib +UMODULESLIB=$(UMODULES)/lib +BIN=$(TARGET_HOME)/lib.bin +MANDIR=$(TARGET_HOME)/man + +# Libraries +SYSLIB = $(MODULESLIB)/libsystem.$(LIBSUF) +STRLIB = $(MODULESLIB)/libstring.$(LIBSUF) +PRTLIB = $(MODULESLIB)/libprint.$(LIBSUF) +ALLOCLIB = $(MODULESLIB)/liballoc.$(LIBSUF) +ASSERTLIB = $(MODULESLIB)/libassert.$(LIBSUF) +MALLOC = $(MODULESLIB)/malloc.$(SUF) +LIBS = $(PRTLIB) $(STRLIB) $(ALLOCLIB) $(MALLOC) $(ASSERTLIB) $(SYSLIB) +LINTLIBS = \ + $(UMODULESLIB)/$(LINTPREF)print.$(LINTSUF) \ + $(UMODULESLIB)/$(LINTPREF)string.$(LINTSUF) \ + $(UMODULESLIB)/$(LINTPREF)alloc.$(LINTSUF) \ + $(UMODULESLIB)/$(LINTPREF)assert.$(LINTSUF) \ + $(UMODULESLIB)/$(LINTPREF)system.$(LINTSUF) +INCLUDES = -I$(MODULES)/h -I$(MODULES)/pkg -I. -I$(SRC_DIR) + +CFLAGS = $(INCLUDES) $(COPTIONS) +LDFLAGS = $(LDOPTIONS) +LINTFLAGS = $(INCLUDES) $(LINTOPTIONS) + +# Where to install the preprocessor +CEMPP = $(BIN)/cpp + +# Grammar files and their objects +LSRC = tokenfile.g $(SRC_DIR)/expression.g +LCSRC = tokenfile.c expression.c Lpars.c +LOBJ = tokenfile.$(SUF) expression.$(SUF) Lpars.$(SUF) + +# Objects of hand-written C files +CSRC = $(SRC_DIR)/LLlex.c $(SRC_DIR)/LLmessage.c $(SRC_DIR)/ch7bin.c \ + $(SRC_DIR)/ch7mon.c $(SRC_DIR)/domacro.c $(SRC_DIR)/error.c \ + $(SRC_DIR)/idf.c $(SRC_DIR)/init.c $(SRC_DIR)/input.c \ + $(SRC_DIR)/main.c $(SRC_DIR)/options.c $(SRC_DIR)/Version.c \ + $(SRC_DIR)/preprocess.c $(SRC_DIR)/replace.c $(SRC_DIR)/scan.c \ + $(SRC_DIR)/skip.c $(SRC_DIR)/tokenname.c $(SRC_DIR)/next.c \ + $(SRC_DIR)/expr.c +COBJ = LLlex.$(SUF) LLmessage.$(SUF) ch7bin.$(SUF) ch7mon.$(SUF) \ + domacro.$(SUF) error.$(SUF) idf.$(SUF) init.$(SUF) input.$(SUF) \ + main.$(SUF) options.$(SUF) Version.$(SUF) \ + preprocess.$(SUF) replace.$(SUF) scan.$(SUF) skip.$(SUF) \ + tokenname.$(SUF) next.$(SUF) expr.$(SUF) + +PRFILES = $(SRC_DIR)/proto.make $(SRC_DIR)/Parameters \ + $(SRC_DIR)/make.hfiles $(SRC_DIR)/make.tokcase $(SRC_DIR)/make.tokfile \ + $(SRC_DIR)/LLlex.h $(SRC_DIR)/bits.h $(SRC_DIR)/file_info.h \ + $(SRC_DIR)/idf.h $(SRC_DIR)/input.h $(SRC_DIR)/interface.h \ + $(SRC_DIR)/macro.h \ + $(SRC_DIR)/class.h $(SRC_DIR)/char.tab $(SRC_DIR)/expression.g $(CSRC) + +# Objects of other generated C files +GOBJ = char.$(SUF) symbol2str.$(SUF) + +# generated source files +GSRC = char.c symbol2str.c + +# .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE! +GHSRC = errout.h idfsize.h ifdepth.h lapbuf.h \ + nparams.h numsize.h obufsize.h \ + parbufsize.h pathlength.h strsize.h textsize.h \ + botch_free.h debug.h inputtype.h dobits.h line_prefix.h + +# Other generated files, for 'make clean' only +GENERATED = tokenfile.g Lpars.h LLfiles LL.output lint.out \ + Xref hfiles cfiles + +all: cc + +cc: hfiles LLfiles + make cpp + +hfiles: Parameters char.c + $(SRC_DIR)/make.hfiles Parameters + @touch hfiles + +Parameters: $(SRC_DIR)/Parameters + cp $(SRC_DIR)/Parameters Parameters + +char.c: $(SRC_DIR)/char.tab + tabgen -f$(SRC_DIR)/char.tab > char.c + +LLfiles: $(LSRC) + LLgen $(LLGENOPTIONS) $(LSRC) + @touch LLfiles + +tokenfile.g: $(SRC_DIR)/tokenname.c $(SRC_DIR)/make.tokfile + <$(SRC_DIR)/tokenname.c $(SRC_DIR)/make.tokfile >tokenfile.g + +symbol2str.c: $(SRC_DIR)/tokenname.c $(SRC_DIR)/make.tokcase + <$(SRC_DIR)/tokenname.c $(SRC_DIR)/make.tokcase >symbol2str.c + +# Objects needed for 'cpp' +OBJ = $(COBJ) $(LOBJ) $(GOBJ) +SRC = $(CSRC) $(LCSRC) $(GSRC) + +cpp: $(OBJ) + $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o cpp + +cfiles: hfiles LLfiles $(GSRC) + @touch cfiles + +install: all + rm -f $(CEMPP) + cp cpp $(CEMPP) + rm -f $(MANDIR)/cpp.6 + cp $(SRC_DIR)/cpp.6 $(MANDIR)/cpp.6 + +cmp: all + -cmp cpp $(CEMPP) + -cmp $(SRC_DIR)/cpp.6 $(MANDIR)/cpp.6 + +pr: + @pr $(PRFILES) + +opr: + make pr | opr + +tags: cfiles + ctags $(SRC) + +depend: cfiles + sed '/^#DEPENDENCIES/,$$d' Makefile >Makefile.new + echo '#DEPENDENCIES' >>Makefile.new + for i in $(SRC) ; do \ + echo "`basename $$i .c`.$$(SUF): $$i" >> Makefile.new ; \ + echo ' $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \ + $(UTIL_HOME)/lib.bin/cpp -d $(INCLUDES) $$i | sed "s/^/`basename $$i .c`.$$(SUF): /" >> Makefile.new ; \ + done + mv Makefile Makefile.old + mv Makefile.new Makefile + +lint: cfiles + $(LINT) $(LINTFLAGS) $(INCLUDES) $(SRC) $(LINTLIBS) + +clean: + rm -f $(LCSRC) $(OBJ) $(GENERATED) $(GSRC) $(GHSRC) cpp Out + +# do not remove the next line. It is used for generating dependencies. +#DEPENDENCIES +LLlex.$(SUF): $(SRC_DIR)/LLlex.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/LLlex.c +LLlex.$(SUF): ./dobits.h +LLlex.$(SUF): $(SRC_DIR)/bits.h +LLlex.$(SUF): $(SRC_DIR)/class.h +LLlex.$(SUF): ./Lpars.h +LLlex.$(SUF): $(SRC_DIR)/file_info.h +LLlex.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +LLlex.$(SUF): $(SRC_DIR)/LLlex.h +LLlex.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +LLlex.$(SUF): $(SRC_DIR)/idf.h +LLlex.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.spec +LLlex.$(SUF): ./inputtype.h +LLlex.$(SUF): $(SRC_DIR)/input.h +LLlex.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +LLlex.$(SUF): ./strsize.h +LLlex.$(SUF): ./numsize.h +LLlex.$(SUF): ./idfsize.h +LLmessage.$(SUF): $(SRC_DIR)/LLmessage.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/LLmessage.c +LLmessage.$(SUF): ./Lpars.h +LLmessage.$(SUF): $(SRC_DIR)/file_info.h +LLmessage.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +LLmessage.$(SUF): $(SRC_DIR)/LLlex.h +ch7bin.$(SUF): $(SRC_DIR)/ch7bin.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/ch7bin.c +ch7bin.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +ch7bin.$(SUF): ./Lpars.h +ch7mon.$(SUF): $(SRC_DIR)/ch7mon.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/ch7mon.c +ch7mon.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +ch7mon.$(SUF): ./Lpars.h +domacro.$(SUF): $(SRC_DIR)/domacro.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/domacro.c +domacro.$(SUF): ./dobits.h +domacro.$(SUF): $(SRC_DIR)/bits.h +domacro.$(SUF): $(SRC_DIR)/macro.h +domacro.$(SUF): $(SRC_DIR)/class.h +domacro.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +domacro.$(SUF): $(TARGET_HOME)/modules/h/assert.h +domacro.$(SUF): ./idfsize.h +domacro.$(SUF): ./textsize.h +domacro.$(SUF): ./parbufsize.h +domacro.$(SUF): ./nparams.h +domacro.$(SUF): ./botch_free.h +domacro.$(SUF): ./ifdepth.h +domacro.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.spec +domacro.$(SUF): ./inputtype.h +domacro.$(SUF): $(SRC_DIR)/input.h +domacro.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +domacro.$(SUF): $(SRC_DIR)/idf.h +domacro.$(SUF): ./debug.h +domacro.$(SUF): ./Lpars.h +domacro.$(SUF): $(SRC_DIR)/file_info.h +domacro.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +domacro.$(SUF): $(SRC_DIR)/LLlex.h +domacro.$(SUF): $(SRC_DIR)/interface.h +error.$(SUF): $(SRC_DIR)/error.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/error.c +error.$(SUF): $(SRC_DIR)/file_info.h +error.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +error.$(SUF): $(SRC_DIR)/LLlex.h +error.$(SUF): ./errout.h +error.$(SUF): /usr/include/varargs.h +error.$(SUF): $(TARGET_HOME)/modules/h/system.h +idf.$(SUF): $(SRC_DIR)/idf.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/idf.c +idf.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +idf.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.body +idf.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +idf.$(SUF): $(SRC_DIR)/idf.h +init.$(SUF): $(SRC_DIR)/init.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/init.c +init.$(SUF): $(SRC_DIR)/interface.h +init.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +init.$(SUF): $(SRC_DIR)/idf.h +init.$(SUF): $(SRC_DIR)/macro.h +init.$(SUF): $(SRC_DIR)/class.h +init.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +init.$(SUF): $(TARGET_HOME)/modules/h/system.h +input.$(SUF): $(SRC_DIR)/input.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/input.c +input.$(SUF): $(TARGET_HOME)/modules/h/system.h +input.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +input.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.body +input.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.spec +input.$(SUF): ./inputtype.h +input.$(SUF): $(SRC_DIR)/input.h +input.$(SUF): $(SRC_DIR)/file_info.h +main.$(SUF): $(SRC_DIR)/main.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c +main.$(SUF): $(SRC_DIR)/macro.h +main.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +main.$(SUF): $(SRC_DIR)/idf.h +main.$(SUF): ./idfsize.h +main.$(SUF): $(SRC_DIR)/file_info.h +main.$(SUF): $(TARGET_HOME)/modules/h/system.h +main.$(SUF): $(TARGET_HOME)/modules/h/assert.h +main.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +main.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +options.$(SUF): $(SRC_DIR)/options.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/options.c +options.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +options.$(SUF): $(SRC_DIR)/idf.h +options.$(SUF): $(SRC_DIR)/macro.h +options.$(SUF): $(SRC_DIR)/class.h +options.$(SUF): ./idfsize.h +options.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +Version.$(SUF): $(SRC_DIR)/Version.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/Version.c +preprocess.$(SUF): $(SRC_DIR)/preprocess.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/preprocess.c +preprocess.$(SUF): ./line_prefix.h +preprocess.$(SUF): ./dobits.h +preprocess.$(SUF): $(SRC_DIR)/bits.h +preprocess.$(SUF): ./idfsize.h +preprocess.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +preprocess.$(SUF): $(SRC_DIR)/idf.h +preprocess.$(SUF): $(SRC_DIR)/class.h +preprocess.$(SUF): $(SRC_DIR)/file_info.h +preprocess.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +preprocess.$(SUF): $(SRC_DIR)/LLlex.h +preprocess.$(SUF): ./obufsize.h +preprocess.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.spec +preprocess.$(SUF): ./inputtype.h +preprocess.$(SUF): $(SRC_DIR)/input.h +preprocess.$(SUF): $(TARGET_HOME)/modules/h/system.h +replace.$(SUF): $(SRC_DIR)/replace.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/replace.c +replace.$(SUF): $(SRC_DIR)/interface.h +replace.$(SUF): $(SRC_DIR)/class.h +replace.$(SUF): $(SRC_DIR)/file_info.h +replace.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +replace.$(SUF): $(SRC_DIR)/LLlex.h +replace.$(SUF): $(SRC_DIR)/macro.h +replace.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.spec +replace.$(SUF): ./inputtype.h +replace.$(SUF): $(SRC_DIR)/input.h +replace.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +replace.$(SUF): $(SRC_DIR)/idf.h +replace.$(SUF): $(TARGET_HOME)/modules/h/assert.h +replace.$(SUF): $(TARGET_HOME)/modules/h/alloc.h +replace.$(SUF): ./textsize.h +replace.$(SUF): ./pathlength.h +replace.$(SUF): ./debug.h +scan.$(SUF): $(SRC_DIR)/scan.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/scan.c +scan.$(SUF): $(SRC_DIR)/file_info.h +scan.$(SUF): $(SRC_DIR)/interface.h +scan.$(SUF): $(SRC_DIR)/macro.h +scan.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +scan.$(SUF): $(SRC_DIR)/idf.h +scan.$(SUF): $(SRC_DIR)/class.h +scan.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.spec +scan.$(SUF): ./inputtype.h +scan.$(SUF): $(SRC_DIR)/input.h +scan.$(SUF): ./nparams.h +scan.$(SUF): ./lapbuf.h +skip.$(SUF): $(SRC_DIR)/skip.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/skip.c +skip.$(SUF): $(TARGET_HOME)/modules/pkg/inp_pkg.spec +skip.$(SUF): ./inputtype.h +skip.$(SUF): $(SRC_DIR)/input.h +skip.$(SUF): $(SRC_DIR)/class.h +skip.$(SUF): $(SRC_DIR)/file_info.h +skip.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +skip.$(SUF): $(SRC_DIR)/LLlex.h +tokenname.$(SUF): $(SRC_DIR)/tokenname.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/tokenname.c +tokenname.$(SUF): ./Lpars.h +tokenname.$(SUF): $(SRC_DIR)/file_info.h +tokenname.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +tokenname.$(SUF): $(SRC_DIR)/LLlex.h +tokenname.$(SUF): $(TARGET_HOME)/modules/pkg/idf_pkg.spec +tokenname.$(SUF): $(SRC_DIR)/idf.h +next.$(SUF): $(SRC_DIR)/next.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/next.c +next.$(SUF): ./debug.h +expr.$(SUF): $(SRC_DIR)/expr.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/expr.c +expr.$(SUF): ./Lpars.h +tokenfile.$(SUF): tokenfile.c + $(CC) -c $(CFLAGS) tokenfile.c +tokenfile.$(SUF): Lpars.h +expression.$(SUF): expression.c + $(CC) -c $(CFLAGS) expression.c +expression.$(SUF): $(SRC_DIR)/file_info.h +expression.$(SUF): $(TARGET_HOME)/modules/h/em_arith.h +expression.$(SUF): $(SRC_DIR)/LLlex.h +expression.$(SUF): Lpars.h +Lpars.$(SUF): Lpars.c + $(CC) -c $(CFLAGS) Lpars.c +Lpars.$(SUF): Lpars.h +char.$(SUF): char.c + $(CC) -c $(CFLAGS) char.c +char.$(SUF): $(SRC_DIR)/class.h +symbol2str.$(SUF): symbol2str.c + $(CC) -c $(CFLAGS) symbol2str.c +symbol2str.$(SUF): Lpars.h diff --git a/util/data/.distr b/util/data/.distr index 965b0681f..7a82b882f 100644 --- a/util/data/.distr +++ b/util/data/.distr @@ -1,4 +1,4 @@ -Makefile +proto.make em_flag.c em_mnem.c em_pseu.c diff --git a/util/data/proto.make b/util/data/proto.make new file mode 100644 index 000000000..1a6802d96 --- /dev/null +++ b/util/data/proto.make @@ -0,0 +1,49 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/data +OBJ = em_mnem.$(SUF) em_pseu.$(SUF) em_flag.$(SUF) em_ptyp.$(SUF) + +DATA_PATH = em_data.$(LIBSUF) + +INCLUDES = -I$(TARGET_HOME)/h +CFLAGS = $(COPTIONS) $(INCLUDES) + +$(DATA_PATH): $(OBJ) + $(AR) rv $(DATA_PATH) $(OBJ) + $(RANLIB) $(DATA_PATH) + +install: $(DATA_PATH) + cp $(DATA_PATH) $(TARGET_HOME)/lib.bin/$(DATA_PATH) + $(RANLIB) $(TARGET_HOME)/lib.bin/$(DATA_PATH) + + +cmp: $(DATA_PATH) + -cmp $(DATA_PATH) $(TARGET_HOME)/lib.bin/$(DATA_PATH) + +clean: + rm -f $(OBJ) $(DATA_PATH) *.old + +opr: + make pr ^ opr + +pr: + @pr $(SRC_DIR)/proto.make $(SRC_DIR)/em_mnem.c $(SRC_DIR)/em_pseu.c $(SRC_DIR)/em_flag.c $(SRC_DIR)/em_ptyp.c + +em_flag.$(SUF): $(SRC_DIR)/em_flag.c $(TARGET_HOME)/h/em_flag.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/em_flag.c + +em_mnem.$(SUF): $(SRC_DIR)/em_mnem.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/em_mnem.c + +em_pseu.$(SUF): $(SRC_DIR)/em_pseu.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/em_pseu.c + +em_ptyp.$(SUF): $(SRC_DIR)/em_ptyp.c $(TARGET_HOME)/h/em_spec.h $(TARGET_HOME)/h/em_ptyp.h + $(CC) -c $(CFLAGS) $(SRC_DIR)/em_ptyp.c + +lintlib: + $(MK_LINT_LIB) em_data $(TARGET_HOME)/lib.bin $(INCLUDES) \ + $(SRC_DIR)/em_flag.c $(SRC_DIR)/em_mnem.c \ + $(SRC_DIR)/em_pseu.c $(SRC_DIR)/em_ptyp.c diff --git a/util/flex/.distr b/util/flex/.distr index 8854f59cf..b7fb02916 100644 --- a/util/flex/.distr +++ b/util/flex/.distr @@ -14,7 +14,7 @@ gen.c initscan.c libmain.c main.c -makefile +proto.make misc.c nfa.c parse.y diff --git a/util/flex/proto.make b/util/flex/proto.make new file mode 100644 index 000000000..dae3525e0 --- /dev/null +++ b/util/flex/proto.make @@ -0,0 +1,167 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/flex + +# make file for "flex" tool + +# Porting considerations: +# +# For System V Unix machines, add -DUSG to CFLAGS (if it's not +# automatically defined) +# For Vax/VMS, add "-DVMS -DUSG" to CFLAGS. +# For MS-DOS, add "-DMS_DOS -DUSG" to CFLAGS. Create \tmp if not present. +# You will also want to rename flex.skel to something with a three +# character extension, change SKELETON_FILE below appropriately, +# See MSDOS.notes for more info. +# For Amiga, add "-DAMIGA -DUSG" to CFLAGS. +# For SCO Unix, add "-DSCO_UNIX" to CFLAGS. +# +# For C compilers which don't know about "void", add -Dvoid=int to CFLAGS. +# +# If your C compiler is ANSI standard but does not include the +# header file (some installations of gcc have this problem), then add +# -DDONT_HAVE_STDLIB_H to CFLAGS. +# +# By default, flex will be configured to generate 8-bit scanners only +# if the -8 flag is given. If you want it to always generate 8-bit +# scanners, add "-DDEFAULT_CSIZE=256" to CFLAGS. Note that doing +# so will double the size of all uncompressed scanners. +# +# If on your system you have trouble building flex due to 8-bit +# character problems, remove the -8 from FLEX_FLAGS and the +# "#define FLEX_8_BIT_CHARS" from the beginning of flexdef.h. + + +# the first time around use "make first_flex" + + +# Installation targeting. Files will be installed under the tree rooted +# at DESTDIR. User commands will be installed in BINDIR, library files +# in LIBDIR (which will be created if necessary), auxiliary files in +# AUXDIR, manual pages will be installed in MANDIR with extension MANEXT. +# Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff +# preformatted versions will be installed if INSTALLMAN=cat. +DESTDIR = +BINDIR = $(TARGET_HOME)/bin +AUXDIR = $(TARGET_HOME)/lib/flex +MANDIR = $(TARGET_HOME)/man +MANEXT = 1 +INSTALLMAN = man + +# MAKE = make + +SKELETON_FILE = \"$(AUXDIR)/flex.skel\" +SKELFLAGS = -DDEFAULT_SKELETON_FILE=$(SKELETON_FILE) +INCLUDES = -I$(SRC_DIR) -I. +CFLAGS = $(COPTIONS) -DACK_MOD $(INCLUDES) +LDFLAGS = $(LDOPTIONS) + +COMPRESSION = +FLEX_FLAGS = -ist8 -Sflex.skel +# which "flex" to use to generate scan.c from scan.l +FLEX = flex + +FLEXOBJS = \ + ccl.$(SUF) \ + dfa.$(SUF) \ + ecs.$(SUF) \ + gen.$(SUF) \ + main.$(SUF) \ + misc.$(SUF) \ + nfa.$(SUF) \ + parse.$(SUF) \ + scan.$(SUF) \ + sym.$(SUF) \ + tblcmp.$(SUF) \ + yylex.$(SUF) + +FLEX_C_SOURCES = \ + $(SRC_DIR)/ccl.c \ + $(SRC_DIR)/dfa.c \ + $(SRC_DIR)/ecs.c \ + $(SRC_DIR)/gen.c \ + $(SRC_DIR)/main.c \ + $(SRC_DIR)/misc.c \ + $(SRC_DIR)/nfa.c \ + $(SRC_DIR)/parse.c \ + $(SRC_DIR)/scan.c \ + $(SRC_DIR)/sym.c \ + $(SRC_DIR)/tblcmp.c \ + $(SRC_DIR)/yylex.c + + +all : flex + +flex : $(FLEXOBJS) + $(CC) -o flex $(LDFLAGS) $(FLEXOBJS) + +first_flex: + cp $(SRC_DIR)/initscan.c scan.c + make $(MFLAGS) flex + +parse.h parse.c : $(SRC_DIR)/parse.y + yacc -d $(SRC_DIR)/parse.y + @mv y.tab.c parse.c + @mv y.tab.h parse.h + +scan.c : $(SRC_DIR)/scan.l + $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) $(SRC_DIR)/scan.l >scan.c + +scan.$(SUF) : scan.c parse.h $(SRC_DIR)/flexdef.h + +main.$(SUF) : $(SRC_DIR)/main.c $(SRC_DIR)/flexdef.h + -mkdir $(AUXDIR) + $(CC) $(CFLAGS) -c $(SKELFLAGS) $(SRC_DIR)/main.c + +ccl.$(SUF) : $(SRC_DIR)/ccl.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/ccl.c +dfa.$(SUF) : $(SRC_DIR)/dfa.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/dfa.c +ecs.$(SUF) : $(SRC_DIR)/ecs.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/ecs.c +gen.$(SUF) : $(SRC_DIR)/gen.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/gen.c +misc.$(SUF) : $(SRC_DIR)/misc.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/misc.c +nfa.$(SUF) : $(SRC_DIR)/nfa.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/nfa.c +parse.$(SUF) : parse.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c parse.c +sym.$(SUF) : $(SRC_DIR)/sym.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/sym.c +tblcmp.$(SUF) : $(SRC_DIR)/tblcmp.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/tblcmp.c +yylex.$(SUF) : $(SRC_DIR)/yylex.c $(SRC_DIR)/flexdef.h + $(CC) $(CFLAGS) -c $(SRC_DIR)/yylex.c + +LINTFLAGS = $(LINTOPTIONS) $(INCLUDES) +lint : $(FLEX_C_SOURCES) + $(LINT) $(LINTFLAGS) $(FLEX_C_SOURCES) + +install: first_flex $(SRC_DIR)/flex.skel + rm -f $(BINDIR)/flex + cp flex $(BINDIR)/flex + cp $(SRC_DIR)/flex.skel $(AUXDIR)/flex.skel + cp $(SRC_DIR)/flex.1 $(MANDIR)/flex.1 + cp $(SRC_DIR)/flexdoc.1 $(MANDIR)/flexdoc.1 + +clean : + rm -f core errs flex *.$(SUF) parse.c *.lint parse.h tags + +tags : + ctags $(FLEX_C_SOURCES) + +test : flex + ./flex $(FLEX_FLAGS) $(COMPRESSION) scan.l | diff scan.c - + +bigtest : + rm -f scan.c ; $(MAKE) COMPRESSION="-C" test + rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" test + rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" test + rm -f scan.c ; $(MAKE) COMPRESSION="-Cfe" test + rm -f scan.c ; $(MAKE) COMPRESSION="-CFe" test + rm -f scan.c ; $(MAKE) COMPRESSION="-Cf" test + rm -f scan.c ; $(MAKE) COMPRESSION="-CF" test + rm -f scan.c ; $(MAKE) diff --git a/util/int/switch/.distr b/util/int/switch/.distr index 892105d92..fed3bf61a 100644 --- a/util/int/switch/.distr +++ b/util/int/switch/.distr @@ -1,4 +1,4 @@ READ_ME -Makefile +proto.make mkiswitch.c mkswitch.c diff --git a/util/int/switch/proto.make b/util/int/switch/proto.make new file mode 100644 index 000000000..a2c9d1cb9 --- /dev/null +++ b/util/int/switch/proto.make @@ -0,0 +1,56 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/int/switch +IP_SPEC = $(SRC_HOME)/etc/ip_spec.t +UCFLAGS = -I$(UTIL_HOME) $(COPTIONS) +ULDFLAGS = $(ULDOPTIONS) +LINTFLAGS = -I$(UTIL_HOME) $(LINTOPTIONS) + +SRC = $(SRC_DIR)/mkiswitch.c $(SRC_DIR)/mkswitch.c +OBJ = mkiswitch.$(USUF) mkswitch.$(USUF) + +mkiswitch: mkiswitch.$(USUF) + $(UCC) $(ULDFLAGS) -o mkiswitch mkiswitch.$(USUF) $(UTIL_HOME)/lib.bin/em_data.$(ULIBSUF) + +mkiswitch.$(USUF): $(SRC_DIR)/mkiswitch.c + $(UCC) $(UCFLAGS) -c $(SRC_DIR)/mkiswitch.c + +mkswitch: mkswitch.$(USUF) + $(UCC) $(ULDFLAGS) -o mkswitch mkswitch.$(USUF) + +mkswitch.$(USUF): $(SRC_DIR)/mkswitch.c + $(UCC) $(UCFLAGS) -c $(SRC_DIR)/mkswitch.c + +DoCases: mkiswitch $(IP_SPEC) + mkiswitch Do $(IP_SPEC) DoCases + wc DoCases + +PrCases: mkswitch $(IP_SPEC) + mkswitch Pr $(IP_SPEC) PrCases + wc PrCases + +lint: + $(LINT) $(LINTOPTIONS) $(SRC_DIR)/mkiswitch.c $(UTIL_HOME)/lib.bin/em_data.$(LINTSUF) + $(LINT) $(LINTOPTIONS) $(SRC_DIR)/mkswitch.c + +clean: # NOT the cases files ! + rm -f a.out core $(OBJ) mkswitch mkiswitch + +bare: clean + rm -f DoCases PrCases + +all: mkswitch + +install: + echo "Nothing to install" + +cmp: + echo "Nothing to compare" + +pr: + @pr $(SRC_DIR)/READ_ME $(SRC_DIR)/proto.make $(SRC) + +opr: + make pr | opr diff --git a/util/int/test/.distr b/util/int/test/.distr index df4a335b5..e66350655 100644 --- a/util/int/test/.distr +++ b/util/int/test/.distr @@ -5,5 +5,5 @@ ioc0.c prtime.c set.c sig.c -Makefile +proto.make READ_ME diff --git a/util/int/test/proto.make b/util/int/test/proto.make new file mode 100644 index 000000000..9347a3b89 --- /dev/null +++ b/util/int/test/proto.make @@ -0,0 +1,29 @@ +# $Header$ + +#PARAMS do not remove this line + +.SUFFIXES: .em22 .em24 .em44 + +.c.em22: + $(UTIL_HOME)/bin/em22 $*.c -o $*.em22 + +.p.em22: + $(UTIL_HOME)/bin/em22 $*.p -o $*.em22 + +.c.em24: + $(UTIL_HOME)/bin/em24 $*.c -o $*.em24 + +.p.em24: + $(UTIL_HOME)/bin/em24 $*.p -o $*.em24 + +.c.em44: + $(UTIL_HOME)/bin/em44 $*.c -o $*.em44 + +.p.em44: + $(UTIL_HOME)/bin/em44 $*.p -o $*.em44 + +clean: + rm -f e.out core mon.out int.mess int.log int.core int.tally \ + *.k *.m *.o *.s *.em?? a.out + +all install cmp pr opr: