--- /usr/ports/devel/cocktail/work/cocktail-9309//./rex/src/Makefile	Tue Feb 15 14:27:41 1994
+++ ./rex/src/Makefile	Thu Aug  5 18:49:04 2004
@@ -30,7 +30,7 @@
 	echo p rex | mc -d $(MLIB)
 
 Scanner.mi Scanner.md:	rex.rex
-	rex -di rex.rex;
+	$(REX) -di rex.rex;
 
 # compilation of Rex with SUN Modula compiler
 
@@ -44,27 +44,27 @@
 	make -f MakefileM2C LIB=$(MLIB)
 
 Scanner.mod Scanner.def:	rex.rex
-	rex -di rex.rex;
+	$(REX) -di rex.rex;
 
 # generation of the parser using 'lalr'
 
 Parser.mi Parser.md:	rex.lalr
-	lalr -b -d rex.lalr;
+	$(LALR) -b -d rex.lalr;
 
 Parser.mod Parser.def:	rex.lalr
-	lalr -b -d rex.lalr;
+	$(LALR) -b -d rex.lalr;
 	ln Parser.mi Parser.mod
 	ln Parser.md Parser.def
 
 Tree0.md Tree0.mi:	rex.cg
-	cg -dimtwFDI rex.cg;
+	$(CG) -dimtwFDI rex.cg;
 
 Eval.md Eval.mi:	rex.cg
-	cg -DI rex.cg;
+	$(CG) -DI rex.cg;
 
 install:	rex rex.sh $(LIB)/rex
 	if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
-	sed "s;LIB;$(LIB);g" < rex.sh > $(BIN)/rex
+	$(SED) "s;LIB;$(LIB);g" < rex.sh > $(BIN)/rex
 	chmod a+rx $(BIN)/rex
 	install -c -s -m 755 rex $(LIB)/rex
 	cp ../lib/[Salst]* $(LIB)/rex
@@ -86,9 +86,9 @@
 
 rexId:	rex.rex
 	echo SCANNER rexId | cat - rex.rex | \
-	sed 's/\(RETURN.*Ident\)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
-	rex -sdi;
-	sed 's/@/rexId/' < ../../front/src/Id.mi > rexIdDrv.mi
+	$(SED) 's/\(RETURN.*Ident\)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
+	$(REX) -sdi;
+	$(SED) 's/@/rexId/' < ../../front/src/Id.mi > rexIdDrv.mi
 	echo p rexIdDrv | mc -d $(MLIB)
 	mv rexIdDrv rexId
 
@@ -101,13 +101,14 @@
 	sh -c "if test ! -d $(LIB)/Id; then mkdir -p $(LIB)/Id; else true; fi"
 
 cleanId:
-	rm -f rexId*
+	-rm -f rexId*
 
 clean:	cleanId
-	rm -f core *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug rex *.bak
+	-rm -f $(STDCLEAN) 
+	-rm -f   *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug rex *.bak
 
 CLEAN:	clean
-	rm -f $(SOURCES)
+	-rm -f $(SOURCES)
 
 .SUFFIXES:	.def .mod .md .mi
 
