From 6a8360b33500f60f6c6008510fe2fcb739ffb5e4 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 24 Nov 1988 09:41:39 +0000 Subject: [PATCH] Fix from Lindsey: changed CURRDIR mechanism to make it work on SunOs 4.0 --- lang/m2/comp/Makefile | 38 +++++++++++++++++++------------------- lang/m2/comp/Resolve | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lang/m2/comp/Makefile b/lang/m2/comp/Makefile index b1d83519a..805c4c685 100644 --- a/lang/m2/comp/Makefile +++ b/lang/m2/comp/Makefile @@ -9,7 +9,7 @@ LLGEN = $(EMHOME)/bin/LLgen MKDEP = $(EMHOME)/bin/mkdep PRID = $(EMHOME)/bin/prid CID = $(EMHOME)/bin/cid -CURRDIR = . +CURRDIR = LINT = lint INCLUDES = -I$(MHDIR) -I$(EMHOME)/h -I$(PKGDIR) @@ -57,30 +57,30 @@ NEXTFILES = def.H type.H node.H desig.H scope.C tmpvar.C casestat.C #EXCLEXCLEXCLEXCL all: Cfiles - 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' + 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' @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' + 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' + 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 install: all - cp $(CURRDIR)/main $(EMHOME)/lib/em_m2 + cp $(CURRDIR)main $(EMHOME)/lib/em_m2 rm -f $(EMHOME)/man/em_m2.6 $(EMHOME)/man/modula-2.1 - cp $(CURRDIR)/em_m2.6 $(CURRDIR)/modula-2.1 $(EMHOME)/man + 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 + -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 opr: make pr | opr @@ -90,7 +90,7 @@ pr: clean: rm -f $(OBJ) $(GENFILES) LLfiles hfiles Cfiles clashes \ - $(CURRDIR)/main LL.output + $(CURRDIR)main LL.output (cd .. ; rm -rf Xsrc) lint: Cfiles @@ -162,17 +162,17 @@ Xlint: $(LIBDIR)/llib-lstring.ln \ $(LIBDIR)/llib-lsystem.ln -$(CURRDIR)/main: $(OBJ) $(CURRDIR)/Makefile - $(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)/main - -size $(CURRDIR)/main +$(CURRDIR)main: $(OBJ) $(CURRDIR)Makefile + $(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)main + -size $(CURRDIR)main -$(CURRDIR)/omain: $(OBJ) $(CURRDIR)/Makefile - $(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)/omain - size $(CURRDIR)/omain +$(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 +$(CURRDIR)cemain: $(OBJ) $(CURRDIR)Makefile + $(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)cemain + size $(CURRDIR)cemain #AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO diff --git a/lang/m2/comp/Resolve b/lang/m2/comp/Resolve index 655a42a87..2ebdcb1de 100755 --- a/lang/m2/comp/Resolve +++ b/lang/m2/comp/Resolve @@ -54,4 +54,4 @@ $i: clashes $PW/$i \$(CID) -Fclashes < $PW/$i > $i EOF done -make EMHOME=$EMHOME CURRDIR=$currdir COPTIONS=$options $target +make EMHOME=$EMHOME CURRDIR=$currdir/ COPTIONS=$options $target