From cb6b68a05f6689ebb41a4ddcb91a1a8406c8936a Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 10 Dec 1986 15:13:04 +0000 Subject: [PATCH] added nmclash.c, mods to Makefile/Resolve --- lang/m2/comp/Makefile | 23 +++++++++++++---------- lang/m2/comp/Resolve | 2 +- lang/m2/comp/nmclash.c | 4 ++++ 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 lang/m2/comp/nmclash.c diff --git a/lang/m2/comp/Makefile b/lang/m2/comp/Makefile index 9178d4eed..a38abbe0f 100644 --- a/lang/m2/comp/Makefile +++ b/lang/m2/comp/Makefile @@ -1,20 +1,23 @@ # make modula-2 "compiler" -EMDIR = ../../.. -MHDIR = $(EMDIR)/modules/h -PKGDIR = $(EMDIR)/modules/pkg -LIBDIR = $(EMDIR)/modules/lib +EMHOME = ../../.. +MHDIR = $(EMHOME)/modules/h +PKGDIR = $(EMHOME)/modules/pkg +LIBDIR = $(EMHOME)/modules/lib OBJECTCODE = $(LIBDIR)/libemk.a -LLGEN = $(EMDIR)/bin/LLgen +LLGEN = $(EMHOME)/bin/LLgen +MKDEP = $(EMHOME)/bin/mkdep +PRID = $(EMHOME)/bin/prid +CID = $(EMHOME)/bin/cid CURRDIR = . -INCLUDES = -I$(MHDIR) -I$(EMDIR)/h -I$(PKGDIR) +INCLUDES = -I$(MHDIR) -I$(EMHOME)/h -I$(PKGDIR) GFILES = tokenfile.g program.g declar.g expression.g statement.g LLGENOPTIONS = PROFILE = CFLAGS = $(PROFILE) $(INCLUDES) -DSTATIC= LINTFLAGS = -DSTATIC= -DNORCSID -MALLOC = $(LIBDIR)/dickmalloc.o +MALLOC = $(LIBDIR)/malloc.o LFLAGS = $(PROFILE) LSRC = tokenfile.c program.c declar.c expression.c statement.c LOBJ = tokenfile.o program.o declar.o expression.o statement.o @@ -55,7 +58,7 @@ all: Cfiles @rm -f nmclash.o a.out install: all - cp $(CURRDIR)/main $(EMDIR)/lib/em_m2 + cp $(CURRDIR)/main $(EMHOME)/lib/em_m2 clean: rm -f $(OBJ) $(GENFILES) LLfiles hfiles Cfiles tab clashes $(CURRDIR)/main @@ -66,7 +69,7 @@ lint: Cfiles @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' + sh -c 'if test -f longnames ; then $(PRID) -l7 longnames $? > Xlongnames ; mv Xlongnames longnames ; else $(PRID) -l7 $? > longnames ; fi' # entry points not to be used directly @@ -114,7 +117,7 @@ tab: depend: sed '/^#AUTOAUTO/,$$d' Makefile > Makefile.new echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >> Makefile.new - mkdep $(SRC) |\ + $(MKDEP) $(SRC) |\ sed 's/\.c:/\.o:/' >> Makefile.new mv Makefile Makefile.old mv Makefile.new Makefile diff --git a/lang/m2/comp/Resolve b/lang/m2/comp/Resolve index e107d789d..388b55dfa 100755 --- a/lang/m2/comp/Resolve +++ b/lang/m2/comp/Resolve @@ -48,7 +48,7 @@ do cat >> Makefile < $i + \$(CID) -Fclashes < $PW/$i > $i EOF done make CURRDIR=$currdir $target diff --git a/lang/m2/comp/nmclash.c b/lang/m2/comp/nmclash.c new file mode 100644 index 000000000..ca2567a80 --- /dev/null +++ b/lang/m2/comp/nmclash.c @@ -0,0 +1,4 @@ +/* Accepted if many characters of long names are significant */ +abcdefghijklmnopr() { } +abcdefghijklmnopq() { } +main() { }