ack/lang/m2/comp/Makefile

514 lines
11 KiB
Makefile
Raw Normal View History

1986-03-20 14:52:03 +00:00
# make modula-2 "compiler"
EMHOME = ../../..
MDIR = $(EMHOME)/modules
MHDIR = $(MDIR)/h
PKGDIR = $(MDIR)/pkg
LIBDIR = $(MDIR)/lib
1986-11-05 14:33:00 +00:00
OBJECTCODE = $(LIBDIR)/libemk.a
LLGEN = $(EMHOME)/bin/LLgen
MKDEP = $(EMHOME)/bin/mkdep
PRID = $(EMHOME)/bin/prid
CID = $(EMHOME)/bin/cid
1986-11-26 16:40:45 +00:00
CURRDIR = .
1986-03-20 14:52:03 +00:00
INCLUDES = -I$(MHDIR) -I$(EMHOME)/h -I$(PKGDIR)
OLIBS = $(LIBDIR)/libem_mes.a $(OBJECTCODE) $(LIBDIR)/libinput.a $(LIBDIR)/libassert.a $(LIBDIR)/liballoc.a $(MALLOC) $(LIBDIR)/libprint.a $(LIBDIR)/libstring.a $(LIBDIR)/libsystem.a
1986-04-03 17:41:26 +00:00
1987-05-13 15:09:11 +00:00
GF = program.g declar.g expression.g statement.g
GENGFILES= tokenfile.g
GFILES =$(GENGFILES) $(GF)
LLGENOPTIONS = -v
1986-09-25 19:39:06 +00:00
PROFILE =
COPTIONS=
CFLAGS = $(PROFILE) $(INCLUDES) $(COPTIONS) -O -DSTATIC=
1986-06-17 12:04:05 +00:00
LINTFLAGS = -DSTATIC= -DNORCSID
MALLOC = $(LIBDIR)/malloc.o
1987-05-18 15:57:33 +00:00
LDFLAGS = -i $(PROFILE)
1986-10-06 20:36:30 +00:00
LSRC = tokenfile.c program.c declar.c expression.c statement.c
1986-03-20 14:52:03 +00:00
LOBJ = tokenfile.o program.o declar.o expression.o statement.o
1987-05-13 15:09:11 +00:00
CSRC = LLlex.c LLmessage.c error.c main.c \
tokenname.c idf.c input.c type.c def.c \
misc.c enter.c defmodule.c typequiv.c node.c \
cstoper.c chk_expr.c options.c walk.c desig.c \
code.c lookup.c Version.c
1986-03-20 14:52:03 +00:00
COBJ = LLlex.o LLmessage.o char.o error.o main.o \
1986-03-26 15:11:02 +00:00
symbol2str.o tokenname.o idf.o input.o type.o def.o \
1986-04-07 17:40:38 +00:00
scope.o misc.o enter.o defmodule.o typequiv.o node.o \
1986-05-23 09:46:31 +00:00
cstoper.o chk_expr.o options.o walk.o casestat.o desig.o \
1986-12-09 17:41:06 +00:00
code.o tmpvar.o lookup.o Version.o next.o
1987-05-13 15:09:11 +00:00
GENC= $(LSRC) symbol2str.c char.c Lpars.c casestat.c tmpvar.c scope.c next.c
1987-05-18 15:57:33 +00:00
SRC = $(CSRC) $(GENC)
1986-03-20 14:52:03 +00:00
OBJ = $(COBJ) $(LOBJ) Lpars.o
1987-05-13 15:09:11 +00:00
GENH= errout.h\
1986-11-05 14:33:00 +00:00
idfsize.h numsize.h strsize.h target_sizes.h \
1987-11-09 16:11:04 +00:00
inputtype.h density.h squeeze.h nocross.h nostrict.h \
def.h debugcst.h type.h Lpars.h node.h desig.h strict3rd.h
1986-08-26 14:33:24 +00:00
HFILES= LLlex.h\
chk_expr.h class.h const.h debug.h f_info.h idf.h\
1986-08-26 14:33:24 +00:00
input.h main.h misc.h scope.h standards.h tokenname.h\
1987-05-13 15:31:21 +00:00
walk.h warning.h SYSTEM.h $(GENH)
1986-06-20 14:36:49 +00:00
#
1987-05-13 15:09:11 +00:00
GENFILES = $(GENGFILES) $(GENC) $(GENH)
NEXTFILES = def.H type.H node.H desig.H scope.C tmpvar.C casestat.C
1986-08-26 14:33:24 +00:00
1986-10-22 15:38:24 +00:00
#EXCLEXCLEXCLEXCL
1986-08-26 14:33:24 +00:00
all: Cfiles
1987-07-01 13:15:52 +00:00
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) $(CURRDIR)/main ; else EMHOME=$(EMHOME); export EMHOME; sh Resolve main ; fi'
1986-08-26 14:33:24 +00:00
@rm -f nmclash.o a.out
Omain: Cfiles
rm -f *.o
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE $(CURRDIR)/omain ; else EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
@rm -f nmclash.o a.out
mv *.o PEEPHOLE
CEmain: Cfiles
rm -f *.o
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) "COPTIONS="-DCODE_EXPANDER $(CURRDIR)/cemain ; else EMHOME=$(EMHOME); export EMHOME; ./Resolve cemain ; fi'
@rm -f nmclash.o a.out
mv *.o CODE_EXPANDER
1986-10-22 15:38:24 +00:00
install: all
cp $(CURRDIR)/main $(EMHOME)/lib/em_m2
1987-05-13 15:09:11 +00:00
rm -f $(EMHOME)/man/em_m2.6 $(EMHOME)/man/modula-2.1
cp $(CURRDIR)/em_m2.6 $(CURRDIR)/modula-2.1 $(EMHOME)/man
cmp: all
-cmp $(CURRDIR)/main $(EMHOME)/lib/em_m2
-cmp $(CURRDIR)/em_m2.6 $(EMHOME)/man/em_m2.6
-cmp $(CURRDIR)/modula-2.1 $(EMHOME)/man/modula-2.1
1987-05-13 15:09:11 +00:00
opr:
make pr | opr
pr:
@pr Makefile Resolve Parameters $(GF) *.H $(HFILES) *.C $(CSRC)
1986-10-22 15:38:24 +00:00
1986-08-26 14:33:24 +00:00
clean:
rm -f $(OBJ) $(GENFILES) LLfiles hfiles Cfiles tab clashes \
$(CURRDIR)/main LL.output
1986-08-26 14:33:24 +00:00
(cd .. ; rm -rf Xsrc)
lint: Cfiles
1987-07-01 13:15:52 +00:00
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) Xlint ; else EMHOME=$(EMHOME); export EMHOME; sh Resolve Xlint ; fi'
1986-08-26 14:33:24 +00:00
@rm -f nmclash.o a.out
longnames: $(SRC) $(HFILES)
sh -c 'if test -f longnames ; then $(PRID) -l7 longnames $? > Xlongnames ; mv Xlongnames longnames ; else $(PRID) -l7 $? > longnames ; fi'
1986-08-26 14:33:24 +00:00
# entry points not to be used directly
Cfiles: hfiles LLfiles $(GENC) $(GENH) Makefile
1986-10-06 20:36:30 +00:00
echo $(SRC) $(HFILES) > Cfiles
1986-03-20 14:52:03 +00:00
1986-10-06 20:36:30 +00:00
LLfiles: $(GFILES)
$(LLGEN) $(LLGENOPTIONS) $(GFILES)
1986-03-20 14:52:03 +00:00
@touch LLfiles
hfiles: Parameters make.hfiles
1986-04-17 09:28:09 +00:00
make.hfiles Parameters
touch hfiles
1986-03-20 14:52:03 +00:00
tokenfile.g: tokenname.c make.tokfile
make.tokfile <tokenname.c >tokenfile.g
1986-10-22 15:38:24 +00:00
symbol2str.c: tokenname.c make.tokcase
make.tokcase <tokenname.c >symbol2str.c
1986-08-26 14:33:24 +00:00
1986-12-09 17:41:06 +00:00
.SUFFIXES: .H .h
.H.h:
./make.allocd < $*.H > $*.h
1986-08-26 14:33:24 +00:00
1986-12-09 17:41:06 +00:00
.SUFFIXES: .C .c
.C.c:
./make.allocd < $*.C > $*.c
1986-03-20 14:52:03 +00:00
1986-12-09 17:41:06 +00:00
def.h: make.allocd
type.h: make.allocd
node.h: make.allocd
desig.h: make.allocd
1986-12-09 17:41:06 +00:00
scope.c: make.allocd
tmpvar.c: make.allocd
casestat.c: make.allocd
1986-03-20 14:52:03 +00:00
1986-12-09 17:41:06 +00:00
next.c: $(NEXTFILES) ./make.next
./make.next $(NEXTFILES) > next.c
1986-08-26 14:33:24 +00:00
1986-10-22 15:38:24 +00:00
char.c: char.tab tab
tab -fchar.tab >char.c
1986-08-26 14:33:24 +00:00
tab:
1986-10-22 15:38:24 +00:00
$(CC) tab.c -o tab
1986-08-26 14:33:24 +00:00
depend: Cfiles
1986-03-20 14:52:03 +00:00
sed '/^#AUTOAUTO/,$$d' Makefile > Makefile.new
echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >> Makefile.new
$(MKDEP) $(SRC) |\
1986-03-20 14:52:03 +00:00
sed 's/\.c:/\.o:/' >> Makefile.new
mv Makefile Makefile.old
mv Makefile.new Makefile
1986-10-22 15:38:24 +00:00
#INCLINCLINCLINCL
Xlint:
1987-05-18 15:57:33 +00:00
lint $(INCLUDES) $(LINTFLAGS) $(SRC) \
$(LIBDIR)/llib-lem_mes.ln \
$(LIBDIR)/llib-lemk.ln \
$(LIBDIR)/llib-linput.ln \
$(LIBDIR)/llib-lassert.ln \
$(LIBDIR)/llib-lalloc.ln \
$(LIBDIR)/llib-lprint.ln \
$(LIBDIR)/llib-lstring.ln \
$(LIBDIR)/llib-lsystem.ln
1986-10-22 15:38:24 +00:00
$(CURRDIR)/main: $(OBJ) $(CURRDIR)/Makefile
$(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)/main
1988-08-24 11:39:57 +00:00
-size $(CURRDIR)/main
1986-10-22 15:38:24 +00:00
$(CURRDIR)/omain: $(OBJ) $(CURRDIR)/Makefile
$(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)/omain
size $(CURRDIR)/omain
$(CURRDIR)/cemain: $(OBJ) $(CURRDIR)/Makefile
$(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)/cemain
size $(CURRDIR)/cemain
1986-03-20 14:52:03 +00:00
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
LLlex.o: LLlex.h
LLlex.o: Lpars.h
LLlex.o: class.h
LLlex.o: const.h
LLlex.o: debug.h
LLlex.o: debugcst.h
LLlex.o: def.h
LLlex.o: f_info.h
LLlex.o: idf.h
LLlex.o: idfsize.h
LLlex.o: input.h
LLlex.o: inputtype.h
LLlex.o: nocross.h
LLlex.o: numsize.h
LLlex.o: strsize.h
LLlex.o: target_sizes.h
LLlex.o: type.h
LLlex.o: warning.h
LLmessage.o: LLlex.h
LLmessage.o: Lpars.h
LLmessage.o: idf.h
error.o: LLlex.h
error.o: debug.h
error.o: debugcst.h
error.o: errout.h
error.o: f_info.h
error.o: input.h
error.o: inputtype.h
error.o: main.h
error.o: node.h
error.o: nostrict.h
error.o: strict3rd.h
error.o: warning.h
main.o: LLlex.h
main.o: Lpars.h
main.o: SYSTEM.h
main.o: debug.h
main.o: debugcst.h
main.o: def.h
main.o: f_info.h
main.o: idf.h
main.o: input.h
main.o: inputtype.h
main.o: nocross.h
main.o: node.h
main.o: scope.h
main.o: standards.h
main.o: strict3rd.h
main.o: target_sizes.h
main.o: tokenname.h
main.o: type.h
main.o: warning.h
tokenname.o: Lpars.h
tokenname.o: idf.h
tokenname.o: tokenname.h
1986-03-20 14:52:03 +00:00
idf.o: idf.h
input.o: f_info.h
input.o: input.h
input.o: inputtype.h
type.o: LLlex.h
type.o: chk_expr.h
type.o: const.h
type.o: debug.h
type.o: debugcst.h
type.o: def.h
type.o: idf.h
type.o: nocross.h
type.o: node.h
type.o: nostrict.h
type.o: scope.h
1987-09-28 10:18:02 +00:00
type.o: squeeze.h
type.o: target_sizes.h
type.o: type.h
type.o: walk.h
1987-10-28 16:03:56 +00:00
type.o: warning.h
def.o: LLlex.h
def.o: Lpars.h
def.o: debug.h
def.o: debugcst.h
def.o: def.h
def.o: idf.h
def.o: main.h
def.o: nocross.h
def.o: node.h
def.o: scope.h
def.o: target_sizes.h
def.o: type.h
1988-03-08 10:44:09 +00:00
def.o: warning.h
misc.o: LLlex.h
misc.o: f_info.h
misc.o: idf.h
misc.o: misc.h
misc.o: node.h
enter.o: LLlex.h
enter.o: debug.h
enter.o: debugcst.h
enter.o: def.h
1987-07-22 10:59:24 +00:00
enter.o: f_info.h
enter.o: idf.h
enter.o: main.h
enter.o: misc.h
enter.o: nocross.h
enter.o: node.h
enter.o: scope.h
enter.o: target_sizes.h
enter.o: type.h
defmodule.o: LLlex.h
defmodule.o: Lpars.h
defmodule.o: debug.h
defmodule.o: debugcst.h
defmodule.o: def.h
defmodule.o: f_info.h
defmodule.o: idf.h
defmodule.o: input.h
defmodule.o: inputtype.h
defmodule.o: main.h
defmodule.o: misc.h
defmodule.o: nocross.h
defmodule.o: node.h
defmodule.o: scope.h
defmodule.o: target_sizes.h
defmodule.o: type.h
typequiv.o: LLlex.h
typequiv.o: debug.h
typequiv.o: debugcst.h
typequiv.o: def.h
1987-08-03 09:09:07 +00:00
typequiv.o: idf.h
typequiv.o: main.h
typequiv.o: nocross.h
typequiv.o: node.h
typequiv.o: strict3rd.h
typequiv.o: target_sizes.h
typequiv.o: type.h
typequiv.o: warning.h
node.o: LLlex.h
node.o: debug.h
node.o: debugcst.h
node.o: def.h
1988-03-23 17:44:25 +00:00
node.o: main.h
node.o: nocross.h
node.o: node.h
node.o: target_sizes.h
node.o: type.h
cstoper.o: LLlex.h
cstoper.o: Lpars.h
cstoper.o: debug.h
cstoper.o: debugcst.h
cstoper.o: idf.h
cstoper.o: nocross.h
cstoper.o: node.h
cstoper.o: standards.h
cstoper.o: target_sizes.h
cstoper.o: type.h
cstoper.o: warning.h
chk_expr.o: LLlex.h
chk_expr.o: Lpars.h
chk_expr.o: chk_expr.h
chk_expr.o: const.h
chk_expr.o: debug.h
chk_expr.o: debugcst.h
chk_expr.o: def.h
chk_expr.o: idf.h
chk_expr.o: main.h
chk_expr.o: misc.h
chk_expr.o: nocross.h
chk_expr.o: node.h
chk_expr.o: nostrict.h
chk_expr.o: scope.h
chk_expr.o: standards.h
chk_expr.o: strict3rd.h
chk_expr.o: target_sizes.h
chk_expr.o: type.h
chk_expr.o: warning.h
options.o: class.h
options.o: idfsize.h
options.o: main.h
options.o: nocross.h
options.o: nostrict.h
options.o: squeeze.h
options.o: strict3rd.h
options.o: target_sizes.h
options.o: type.h
options.o: warning.h
walk.o: LLlex.h
walk.o: Lpars.h
walk.o: chk_expr.h
walk.o: debug.h
walk.o: debugcst.h
walk.o: def.h
walk.o: desig.h
walk.o: f_info.h
walk.o: idf.h
walk.o: main.h
walk.o: misc.h
walk.o: nocross.h
walk.o: node.h
walk.o: scope.h
1987-09-28 10:18:02 +00:00
walk.o: squeeze.h
walk.o: strict3rd.h
walk.o: target_sizes.h
walk.o: type.h
walk.o: walk.h
walk.o: warning.h
desig.o: LLlex.h
desig.o: debug.h
desig.o: debugcst.h
desig.o: def.h
desig.o: desig.h
desig.o: nocross.h
desig.o: node.h
desig.o: scope.h
1987-09-28 10:18:02 +00:00
desig.o: squeeze.h
desig.o: target_sizes.h
desig.o: type.h
1987-09-28 10:18:02 +00:00
desig.o: walk.h
desig.o: warning.h
code.o: LLlex.h
code.o: Lpars.h
code.o: debug.h
code.o: debugcst.h
code.o: def.h
code.o: desig.h
code.o: nocross.h
code.o: node.h
code.o: scope.h
1987-09-28 10:18:02 +00:00
code.o: squeeze.h
code.o: standards.h
code.o: target_sizes.h
code.o: type.h
code.o: walk.h
lookup.o: LLlex.h
lookup.o: debug.h
lookup.o: debugcst.h
lookup.o: def.h
lookup.o: idf.h
lookup.o: misc.h
lookup.o: nocross.h
lookup.o: node.h
lookup.o: scope.h
lookup.o: target_sizes.h
lookup.o: type.h
1986-03-20 14:52:03 +00:00
tokenfile.o: Lpars.h
program.o: LLlex.h
program.o: Lpars.h
program.o: debug.h
program.o: debugcst.h
program.o: def.h
program.o: f_info.h
program.o: idf.h
program.o: main.h
program.o: nocross.h
program.o: node.h
program.o: scope.h
program.o: strict3rd.h
program.o: target_sizes.h
program.o: type.h
program.o: warning.h
declar.o: LLlex.h
declar.o: Lpars.h
declar.o: chk_expr.h
declar.o: debug.h
declar.o: debugcst.h
declar.o: def.h
declar.o: idf.h
declar.o: main.h
declar.o: misc.h
declar.o: nocross.h
declar.o: node.h
declar.o: nostrict.h
declar.o: scope.h
declar.o: strict3rd.h
declar.o: target_sizes.h
declar.o: type.h
declar.o: warning.h
expression.o: LLlex.h
expression.o: Lpars.h
expression.o: chk_expr.h
expression.o: const.h
expression.o: debug.h
expression.o: debugcst.h
expression.o: def.h
expression.o: idf.h
expression.o: nocross.h
expression.o: node.h
expression.o: target_sizes.h
expression.o: type.h
expression.o: warning.h
statement.o: LLlex.h
statement.o: Lpars.h
statement.o: def.h
statement.o: idf.h
statement.o: nocross.h
statement.o: node.h
statement.o: scope.h
statement.o: target_sizes.h
statement.o: type.h
1987-05-18 15:57:33 +00:00
symbol2str.o: Lpars.h
char.o: class.h
1986-03-20 14:52:03 +00:00
Lpars.o: Lpars.h
1987-05-18 15:57:33 +00:00
casestat.o: LLlex.h
casestat.o: Lpars.h
1987-08-03 09:09:07 +00:00
casestat.o: chk_expr.h
1987-05-18 15:57:33 +00:00
casestat.o: debug.h
casestat.o: debugcst.h
casestat.o: def.h
1987-05-18 15:57:33 +00:00
casestat.o: density.h
casestat.o: desig.h
casestat.o: nocross.h
1987-05-18 15:57:33 +00:00
casestat.o: node.h
1987-09-28 10:18:02 +00:00
casestat.o: squeeze.h
casestat.o: target_sizes.h
1987-05-18 15:57:33 +00:00
casestat.o: type.h
casestat.o: walk.h
1987-08-03 09:09:07 +00:00
tmpvar.o: LLlex.h
1987-05-18 15:57:33 +00:00
tmpvar.o: debug.h
tmpvar.o: debugcst.h
tmpvar.o: def.h
tmpvar.o: main.h
tmpvar.o: nocross.h
1987-05-18 15:57:33 +00:00
tmpvar.o: scope.h
tmpvar.o: target_sizes.h
1987-05-18 15:57:33 +00:00
tmpvar.o: type.h
scope.o: LLlex.h
scope.o: debug.h
scope.o: debugcst.h
scope.o: def.h
scope.o: idf.h
scope.o: nocross.h
1987-05-18 15:57:33 +00:00
scope.o: node.h
scope.o: scope.h
scope.o: target_sizes.h
1987-05-18 15:57:33 +00:00
scope.o: type.h
next.o: debug.h
next.o: debugcst.h