From 53664c2d1f20cb48583297d57848a6dca371d7e4 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 5 Sep 1991 11:22:37 +0000 Subject: [PATCH] New installation mechanism --- util/ceg/as_parser/.distr | 2 +- util/ceg/as_parser/proto.make | 73 +++++++++++++++++++++++++++++++++++ util/ceg/assemble/.distr | 2 +- util/ceg/assemble/proto.make | 34 ++++++++++++++++ 4 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 util/ceg/as_parser/proto.make create mode 100644 util/ceg/assemble/proto.make diff --git a/util/ceg/as_parser/.distr b/util/ceg/as_parser/.distr index 3e71ccc21..5e16f6278 100644 --- a/util/ceg/as_parser/.distr +++ b/util/ceg/as_parser/.distr @@ -1,4 +1,4 @@ -Makefile +proto.make as_parser.h const.h conversion.c diff --git a/util/ceg/as_parser/proto.make b/util/ceg/as_parser/proto.make new file mode 100644 index 000000000..c18d7172f --- /dev/null +++ b/util/ceg/as_parser/proto.make @@ -0,0 +1,73 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/ceg/as_parser +CEGLIB = $(TARGET_HOME)/lib.bin/ceg + +IFILES = -I$(EM)/h -I$(EM)/modules/h -I. +CFLAGS = $(COPTIONS) -DFLEX $(IFILES) +LDFLAGS = $(LDOPTIONS) + +GFILES = pars.g +OFILES = pars.$(SUF) Lpars.$(SUF) lex.yy.$(SUF) help.$(SUF) conversion.$(SUF) +LIBS = $(TARGET_HOME)/modules/lib/liballoc.$(LIBSUF)\ + $(TARGET_HOME)/modules/lib/libprint.$(LIBSUF)\ + $(TARGET_HOME)/modules/lib/libstring.$(LIBSUF)\ + $(TARGET_HOME)/modules/lib/libsystem.$(LIBSUF) + +all: as_parser eval/eval + +as_parser: dummy + make $(OFILES) + $(CC) $(LDFLAGS) -o as_parser $(OFILES) $(LIBS) + +eval/eval: + ( cd eval ; make eval ) + +install: all + -mkdir $(CEGLIB) + -mkdir $(CEGLIB)/as_parser + -mkdir $(CEGLIB)/as_parser/eval + cp as_parser $(CEGLIB)/as_parser/as_parser + cp eval/eval $(CEGLIB)/as_parser/eval/eval + cp $(SRC_DIR)/as_parser.h $(CEGLIB)/as_parser/as_parser.h + +cmp: all + -cmp as_parser $(CEGLIB)/as_parser/as_parser + -cmp eval/eval $(CEGLIB)/as_parser/eval/eval + -cmp $(SRC_DIR)/as_parser.h $(CEGLIB)/as_parser/as_parser.h + +pr: + @pr $(SRC_DIR)/proto.make $(SRC_DIR)/as_parser.h $(SRC_DIR)/const.h \ + $(SRC_DIR)/conversion.c $(SRC_DIR)/decl.h $(SRC_DIR)/help.c \ + $(SRC_DIR)/pars.g $(SRC_DIR)/table.l $(SRC_DIR)/eval/proto.make \ + $(SRC_DIR)/eval/eval.c $(SRC_DIR)/eval/states.h + +opr: + make pr | opr + +clean: + rm -f as_parser *.$(SUF) lex.yy.c Lpars.[ch] pars.c dummy eval/*.$(SUF) eval/eval + +lex.yy.c : table.l + flex -s table.l + +dummy : $(GFILES) + LLgen $(LLOPT) $(GFILES) + touch dummy + +Lpars.$(SUF): Lpars.h $(SRC_DIR)/decl.h Lpars.c + $(CC) $(CFLAGS) -c Lpars.c + +pars.$(SUF): Lpars.h $(SRC_DIR)/decl.h pars.c + $(CC) $(CFLAGS) -c pars.c + +lex.yy.$(SUF): Lpars.h $(SRC_DIR)/decl.h lex.yy.c + $(CC) $(CFLAGS) -c lex.yy.c + +help.$(SUF): $(SRC_DIR)/help.c + $(CC) $(CFLAGS) -c $(SRC_DIR)/help.c + +conversion.$(SUF): $(SRC_DIR)/conversion.c + $(CC) $(CFLAGS) -c $(SRC_DIR)/conversion.c diff --git a/util/ceg/assemble/.distr b/util/ceg/assemble/.distr index d7e136aa8..9fd2c817f 100644 --- a/util/ceg/assemble/.distr +++ b/util/ceg/assemble/.distr @@ -1,3 +1,3 @@ as_assemble -Makefile +proto.make obj_assemble diff --git a/util/ceg/assemble/proto.make b/util/ceg/assemble/proto.make new file mode 100644 index 000000000..a2eee6095 --- /dev/null +++ b/util/ceg/assemble/proto.make @@ -0,0 +1,34 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/util/ceg/assemble + +CEG = $(TARGET_HOME)/lib.bin/ceg +ASS = $(CEG)/assemble + +ASLIST = assemble.c block_as.c +OBJLIST = assemble.c block_as.c const.h + +all: + +install: + -mkdir $(CEG) + -mkdir $(ASS) + -mkdir $(ASS)/as_assemble + -mkdir $(ASS)/obj_assemble + for i in $(ASLIST) ; do cp $(SRC_DIR)/as_assemble/$$i $(ASS)/as_assemble/$$i ; done + for i in $(OBJLIST) ; do cp $(SRC_DIR)/obj_assemble/$$i $(ASS)/obj_assemble/$$i ; done + +cmp: + -for i in $(ASLIST) ; do cmp $(SRC_DIR)/as_assemble/$$i $(ASS)/as_assemble/$$i ; done + -for i in $(OBJLIST) ; do cmp $(SRC_DIR)/obj_assemble/$$i $(ASS)/obj_assemble/$$i ; done + +pr: + @for i in $(ASLIST) ; do pr $(SRC_DIR)/as_assemble/$$i ; done + @for i in $(OBJLIST) ; do pr $(SRC_DIR)/obj_assemble/$$i ; done + +opr: + make pr | opr + +clean: