aboutsummaryrefslogtreecommitdiff
path: root/devel/cocktail
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-05-04 21:07:46 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-05-04 21:07:46 +0000
commitc0150116c3123bc132196c968988f6b640018eac (patch)
tree6e6f79256cd261ce4868b9ac15d2b3a6ca9a799b /devel/cocktail
parent27571ccca6b2417f3889bddc9359c2ed2655bf10 (diff)
downloadports-c0150116c3123bc132196c968988f6b640018eac.tar.gz
ports-c0150116c3123bc132196c968988f6b640018eac.zip
Notes
Diffstat (limited to 'devel/cocktail')
-rw-r--r--devel/cocktail/Makefile21
-rw-r--r--devel/cocktail/distinfo2
-rw-r--r--devel/cocktail/files/changedfiles62
-rw-r--r--devel/cocktail/files/newfiles59
-rw-r--r--devel/cocktail/files/patch-Makefile250
-rw-r--r--devel/cocktail/files/patch-Makefile.inc64
-rw-r--r--devel/cocktail/files/patch-bnf-m2c-Makefile75
-rw-r--r--devel/cocktail/files/patch-cg-hag-c-Makefile19
-rw-r--r--devel/cocktail/files/patch-cg-hag-m-Makefile7
-rw-r--r--devel/cocktail/files/patch-cg-m2c-Makefile94
-rw-r--r--devel/cocktail/files/patch-cg-src-Makefile112
-rw-r--r--devel/cocktail/files/patch-cg-test-c-Makefile19
-rw-r--r--devel/cocktail/files/patch-cg-test-m-Makefile7
-rw-r--r--devel/cocktail/files/patch-common-c-Makefile8
-rw-r--r--devel/cocktail/files/patch-common-m2c-Makefile58
-rw-r--r--devel/cocktail/files/patch-ell-m2c-Makefile74
-rw-r--r--devel/cocktail/files/patch-ell-src-Makefile19
-rw-r--r--devel/cocktail/files/patch-estra-m2c-Makefile73
-rw-r--r--devel/cocktail/files/patch-front-doc-Makefile34
-rw-r--r--devel/cocktail/files/patch-front-m2c-Makefile72
-rw-r--r--devel/cocktail/files/patch-front-src-Makefile27
-rw-r--r--devel/cocktail/files/patch-l2cg-m2c-Makefile82
-rw-r--r--devel/cocktail/files/patch-l2cg-src-Makefile20
-rw-r--r--devel/cocktail/files/patch-l2r-src-Makefile56
-rw-r--r--devel/cocktail/files/patch-lalr-m2c-Makefile78
-rw-r--r--devel/cocktail/files/patch-mtc-m2c-Makefile85
-rw-r--r--devel/cocktail/files/patch-mtc-make-Makefile33
-rw-r--r--devel/cocktail/files/patch-mtc-src-Makefile72
-rw-r--r--devel/cocktail/files/patch-puma-ffaba-c-Makefile25
-rw-r--r--devel/cocktail/files/patch-puma-ffaba-m-Makefile8
-rw-r--r--devel/cocktail/files/patch-puma-m2c-C.c20
-rw-r--r--devel/cocktail/files/patch-puma-m2c-Makefile78
-rw-r--r--devel/cocktail/files/patch-puma-src-Makefile79
-rw-r--r--devel/cocktail/files/patch-r2l-m2c-Makefile68
-rw-r--r--devel/cocktail/files/patch-r2l-src-Makefile20
-rw-r--r--devel/cocktail/files/patch-reuse-c-Errors.c36
-rw-r--r--devel/cocktail/files/patch-reuse-c-Makefile63
-rw-r--r--devel/cocktail/files/patch-reuse-c-rSystem.c23
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Makefile248
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-rMemory.c39
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-rSystem.c23
-rw-r--r--devel/cocktail/files/patch-rex-m2c-Makefile72
-rw-r--r--devel/cocktail/files/patch-rex-src-Makefile58
-rw-r--r--devel/cocktail/files/patch-rex-test-Makefile53
-rw-r--r--devel/cocktail/files/patch-rpp-m2c-Makefile54
-rw-r--r--devel/cocktail/files/patch-rpp-src-Makefile16
-rw-r--r--devel/cocktail/files/patch-specs-Makefile42
-rw-r--r--devel/cocktail/files/patch-specs-Makefile.inc4
-rw-r--r--devel/cocktail/files/patch-specs-c-ada-Makefile42
-rw-r--r--devel/cocktail/files/patch-specs-c-c-Makefile36
-rw-r--r--devel/cocktail/files/patch-specs-c-cpp-Makefile55
-rw-r--r--devel/cocktail/files/patch-specs-c-minilax-Makefile190
-rw-r--r--devel/cocktail/files/patch-specs-c-modula2-Makefile36
-rw-r--r--devel/cocktail/files/patch-specs-c-modula2.ell-Makefile37
-rw-r--r--devel/cocktail/files/patch-specs-c-oberon2-Makefile36
-rw-r--r--devel/cocktail/files/patch-specs-c-occam-Makefile18
-rw-r--r--devel/cocktail/files/patch-specs-c-sather-Makefile36
-rw-r--r--devel/cocktail/files/patch-specs-c-sql-Makefile36
-rw-r--r--devel/cocktail/files/patch-specs-c-wag-Makefile110
-rw-r--r--devel/cocktail/files/patch-specs-modula-ada-Makefile22
-rw-r--r--devel/cocktail/files/patch-specs-modula-minilax-Makefile153
-rw-r--r--devel/cocktail/files/patch-specs-modula-modula2-Makefile21
-rw-r--r--devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile16
-rw-r--r--devel/cocktail/files/patch-specs-modula-modula3-Makefile21
-rw-r--r--devel/cocktail/files/patch-specs-modula-oberon-Makefile21
-rw-r--r--devel/cocktail/files/patch-specs-modula-pascal-Makefile21
-rw-r--r--devel/cocktail/files/patch-specs-modula-wag-Makefile41
-rw-r--r--devel/cocktail/files/patch-y2l-src-Makefile48
-rw-r--r--devel/cocktail/files/patch-y2l-src-Scanner.c158
-rw-r--r--devel/cocktail/pkg-descr10
-rw-r--r--devel/cocktail/pkg-plist113
71 files changed, 3888 insertions, 0 deletions
diff --git a/devel/cocktail/Makefile b/devel/cocktail/Makefile
new file mode 100644
index 000000000000..6d63ef1344ea
--- /dev/null
+++ b/devel/cocktail/Makefile
@@ -0,0 +1,21 @@
+# New ports collection makefile for: cocktail
+# Date created: 12 november 2003
+# Whom: wjw
+#
+# $FreeBSD$
+#
+
+PORTNAME= cocktail
+PORTVERSION= 9309
+CATEGORIES= devel
+MASTER_SITES= http://www.first.gmd.de/cocktail/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+
+MAINTAINER= wjw@withagen.nl
+COMMENT= Compiler tools with attribute grammars
+
+WRKSRC= ${WRKDIR}/cocktail-9309
+MAN1= ag.1 puma.1 mpp.1 lalr.1 ell.1 bnf.1 ast.1 rex.1 mtc.1
+MAN2= mtc.2
+
+.include <bsd.port.mk>
diff --git a/devel/cocktail/distinfo b/devel/cocktail/distinfo
new file mode 100644
index 000000000000..c8b6495c0c54
--- /dev/null
+++ b/devel/cocktail/distinfo
@@ -0,0 +1,2 @@
+MD5 (cocktail-9309-src.tar.gz) = 1cb24976780315fcc30776ad4da34226
+SIZE (cocktail-9309-src.tar.gz) = 2357144
diff --git a/devel/cocktail/files/changedfiles b/devel/cocktail/files/changedfiles
new file mode 100644
index 000000000000..245518c7cf59
--- /dev/null
+++ b/devel/cocktail/files/changedfiles
@@ -0,0 +1,62 @@
+./Makefile
+./bnf/m2c/Makefile
+./cg/hag-c/Makefile
+./cg/hag-m/Makefile
+./cg/m2c/Makefile
+./cg/src/Makefile
+./cg/test-c/Makefile
+./cg/test-m/Makefile
+./common/c/Makefile
+./common/m2c/Makefile
+./ell/m2c/Makefile
+./ell/src/Makefile
+./estra/m2c/Makefile
+./front/doc/Makefile
+./front/m2c/Makefile
+./front/src/Makefile
+./l2cg/m2c/Makefile
+./l2cg/src/Makefile
+./l2r/src/Makefile
+./lalr/m2c/Makefile
+./mtc/m2c/Makefile
+./mtc/make/Makefile
+./mtc/src/Makefile
+./puma/ffaba-c/Makefile
+./puma/ffaba-m/Makefile
+./puma/m2c/C.c
+./puma/m2c/Makefile
+./puma/src/Makefile
+./r2l/m2c/Makefile
+./r2l/src/Makefile
+./reuse/c/Errors.c
+./reuse/c/Makefile
+./reuse/c/rSystem.c
+./reuse/m2c/Makefile
+./reuse/m2c/rMemory.c
+./reuse/m2c/rSystem.c
+./rex/m2c/Makefile
+./rex/src/Makefile
+./rex/test/Makefile
+./rpp/m2c/Makefile
+./rpp/src/Makefile
+./specs/c/ada/Makefile
+./specs/c/c/Makefile
+./specs/c/cpp/Makefile
+./specs/c/minilax/Makefile
+./specs/c/modula2/Makefile
+./specs/c/modula2.ell/Makefile
+./specs/c/oberon2/Makefile
+./specs/c/occam/Makefile
+./specs/c/sather/Makefile
+./specs/c/sql/Makefile
+./specs/c/wag/Makefile
+./specs/modula/ada/Makefile
+./specs/modula/minilax/Makefile
+./specs/modula/modula2/Makefile
+./specs/modula/modula2.ell/Makefile
+./specs/modula/modula3/Makefile
+./specs/modula/oberon/Makefile
+./specs/modula/pascal/Makefile
+./specs/modula/wag/Makefile
+./y2l/src/Makefile
+./y2l/src/Scanner.c
diff --git a/devel/cocktail/files/newfiles b/devel/cocktail/files/newfiles
new file mode 100644
index 000000000000..55bd8258ad56
--- /dev/null
+++ b/devel/cocktail/files/newfiles
@@ -0,0 +1,59 @@
+./Makefile.inc
+./Makefile.inc.orig
+./Makefile.orig
+./bnf/m2c/Makefile.orig
+./cg/hag-c/Makefile.orig
+./cg/hag-m/Makefile.orig
+./cg/m2c/Makefile.orig
+./cg/test-c/Makefile.orig
+./cg/test-m/Makefile.orig
+./common/c/Makefile.orig
+./common/m2c/Makefile.orig
+./ell/m2c/Makefile.orig
+./estra/m2c/Makefile.orig
+./front/doc/Makefile.orig
+./front/m2c/Makefile.orig
+./l2cg/m2c/Makefile.orig
+./l2r/src/Makefile.orig
+./lalr/m2c/Makefile.orig
+./mtc/m2c/Makefile.orig
+./mtc/make/Makefile.orig
+./puma/ffaba-c/Makefile.orig
+./puma/ffaba-m/Makefile.orig
+./puma/m2c/C.c.orig
+./puma/m2c/Makefile.orig
+./r2l/m2c/Makefile.orig
+./reuse/c/Errors.c.orig
+./reuse/c/Makefile.orig
+./reuse/c/rSystem.c.orig
+./reuse/m2c/Makefile.orig
+./reuse/m2c/rMemory.c.orig
+./reuse/m2c/rSystem.c.orig
+./rex/m2c/Makefile.orig
+./rex/test/Makefile.orig
+./rpp/m2c/Makefile.orig
+./rpp/src/Makefile.orig
+./specs/Makefile
+./specs/Makefile.inc
+./specs/Makefile.inc.orig
+./specs/Makefile.orig
+./specs/c/ada/Makefile.orig
+./specs/c/c/Makefile.orig
+./specs/c/cpp/Makefile.orig
+./specs/c/minilax/Makefile.orig
+./specs/c/modula2/Makefile.orig
+./specs/c/modula2.ell/Makefile.orig
+./specs/c/oberon2/Makefile.orig
+./specs/c/occam/Makefile.orig
+./specs/c/sather/Makefile.orig
+./specs/c/sql/Makefile.orig
+./specs/c/wag/Makefile.orig
+./specs/modula/ada/Makefile.orig
+./specs/modula/minilax/Makefile.orig
+./specs/modula/modula2/Makefile.orig
+./specs/modula/modula2.ell/Makefile.orig
+./specs/modula/modula3/Makefile.orig
+./specs/modula/oberon/Makefile.orig
+./specs/modula/pascal/Makefile.orig
+./specs/modula/wag/Makefile.orig
+./y2l/src/Makefile.orig
diff --git a/devel/cocktail/files/patch-Makefile b/devel/cocktail/files/patch-Makefile
new file mode 100644
index 000000000000..70c2e236f014
--- /dev/null
+++ b/devel/cocktail/files/patch-Makefile
@@ -0,0 +1,250 @@
+--- ../../work/cocktail-9309//./Makefile Tue Feb 15 14:20:36 1994
++++ ./Makefile Wed Mar 31 22:35:03 2004
+@@ -17,58 +17,20 @@
+ # * *
+ # *************************************************************************
+
+-# Choose a suitable C compiler
+-# usually cc or gcc will do
+-# on HP700 use: CC = c89 -D_HPUX_SOURCE
+-CC = cc
+-
+-# Choose (optimizer) flags for the C compiler
+-OPT =
+-
+-# Choose a suitable Modula compiler
+-# MC or M2C
+-MC = MC
+-
+-# BSD needs this
+-MAKE = make
+-
+-# The place to install shell scripts and binaries
+-BIN = $(HOME)/bin
+-
+-# The place to install binaries and data files
+-LIB = $(HOME)/lib
+-
+-# Directory for man pages
+-MANDIR = $(HOME)/lib
+-
+-# Where to put include files for reuse
+-INCDIR = $(LIB)/include
+-
+-# The following targets are legal:
+-# PCS10
+-# PCS20
+-# SUN (this is valid for all others)
+-TARGET = SUN
+-
+-# For PCS10 you must define
+-# OPT = "-DPCS10"
+-
+-# Choose the source language:
+-LANGUAGE = c
+-# LANGUAGE = modula
++.include "Makefile.inc"
+
+ # ****************************************************************
+ # * DON'T CHANGE ANYTHING BELOW THIS LINE !
+ # ****************************************************************
+
+-MFLAGS = BIN=$(BIN) LIB=$(LIB) CC=$(CC) OPT=$(OPT) MC=$(MC) HOME=$(HOME)
++ROOTDIR = $(.CURDIR)
+
+ CTARGETS = \
+ reuselib \
+ c_reuse \
+ c_common \
+- c_rex \
+ c_front \
++ c_rex \
+ c_bnf \
+ c_ell \
+ c_lalr \
+@@ -79,7 +41,8 @@
+ c_rpp \
+ c_cg \
+ c_puma \
+- c_estra
++ c_estra \
++ mtc
+
+ MTARGETS = \
+ reuselib \
+@@ -104,12 +67,16 @@
+
+ install: install$(LANGUAGE)
+
+-reuselib:
+- @echo; echo "Making public reuse library"
+- cd reuse/c && $(MAKE) $(MFLAGS) TARGET=$(TARGET)
++diff: clean
++ -diff -rwPu -x'*cat' -x'?akefile*' ../cocktail-9309.org . > /tmp/cocktail.code.dif
++ -diff -rwPu -x'*cat' -x'*h' -x'*c' ../cocktail-9309.org . > /tmp/cocktail.makefiles.dif
+
+ c: $(CTARGETS)
+
++reuselib:
++ @echo; echo "Making public reuse library"
++ cd reuse/c && $(MAKE) TARGET=$(TARGET) $(MFLAGS)
++
+ c_reuse:
+ @echo; echo "Making local reuse library"
+ cd reuse/m2c && $(MAKE) $(MFLAGS)
+@@ -156,18 +123,24 @@
+ @echo; echo "Making estra"
+ cd estra/m2c && $(MAKE) $(MFLAGS)
+
++mtc: $(REUSELIB)
++ @echo; echo "Making mtc"
++ cd mtc/m2c && $(MAKE) $(MFLAGS)
++
++
+ installc: c_reuse c_common
+- sh -c "if test ! -d $(BIN); then mkdir -p $(BIN); else true; fi"
+- sh -c "if test ! -d $(LIB); then mkdir -p $(LIB); else true; fi"
+- sh -c "if test ! -d $(MANDIR); then mkdir -p $(MANDIR); else true; fi"
+- sh -c "if test ! -d $(INCDIR); then mkdir -p $(INCDIR); else true; fi"
+- cd reuse/c && $(MAKE) install $(MFLAGS) TARGET=$(TARGET) INCDIR=$(INCDIR)
++ sh -c "if test ! -d $(DESTBIN); then mkdir -p $(DESTBIN); else true; fi"
++ sh -c "if test ! -d $(DESTLIB); then mkdir -p $(DESTLIB); else true; fi"
++ sh -c "if test ! -d $(DESTMANDIR); then mkdir -p $(DESTMANDIR); else true; fi"
++ sh -c "if test ! -d $(DESTMANDIR2); then mkdir -p $(DESTMANDIR2); else true; fi"
++ sh -c "if test ! -d $(DESTINCDIR); then mkdir -p $(DESTINCDIR); else true; fi"
++ cd reuse/c && $(MAKE) install $(MFLAGS) TARGET=$(TARGET)
+ cd rex/m2c && $(MAKE) install $(MFLAGS)
+ cd front/m2c && $(MAKE) install $(MFLAGS)
++ cd front/doc && $(MAKE) install $(MFLAGS)
+ cd bnf/m2c && $(MAKE) install $(MFLAGS)
+ cd ell/m2c && $(MAKE) install $(MFLAGS)
+ cd lalr/m2c && $(MAKE) install $(MFLAGS)
+- cd front/doc && $(MAKE) install $(MFLAGS)
+ cd l2r/src && $(MAKE) install $(MFLAGS)
+ cd y2l/src && $(MAKE) install $(MFLAGS)
+ cd r2l/m2c && $(MAKE) install $(MFLAGS)
+@@ -176,7 +149,10 @@
+ cd cg/m2c && $(MAKE) install $(MFLAGS)
+ cd puma/m2c && $(MAKE) install $(MFLAGS)
+ cd estra/m2c && $(MAKE) install $(MFLAGS)
+- cd man && cp * $(MANDIR) && chmod a+r $(MANDIR)/*.1
++ cd mtc/m2c && $(MAKE) install $(MFLAGS)
++ cd man && cp * $(DESTMANDIR) && chmod a+r $(DESTMANDIR)/*.1
++ cp mtc/doc/*.1 $(DESTMANDIR) && chmod a+r $(DESTMANDIR)/*.1
++ cp mtc/doc/*.2 $(DESTMANDIR2) && chmod a+r $(DESTMANDIR2)/*.2
+
+
+ modula: $(MTARGETS)
+@@ -228,52 +204,46 @@
+ sh -c "if test ! -d $(BIN); then mkdir -p $(BIN); else true; fi"
+ sh -c "if test ! -d $(LIB); then mkdir -p $(LIB); else true; fi"
+ sh -c "if test ! -d $(MANDIR); then mkdir -p $(MANDIR); else true; fi"
++ sh -c "if test ! -d $(MANDIR2); then mkdir -p $(MANDIR2); else true; fi"
+ sh -c "if test ! -d $(INCDIR); then mkdir -p $(INCDIR); else true; fi"
+- cd reuse/c && $(MAKE) install $(MFLAGS) TARGET=$(TARGET) INCDIR=$(INCDIR)
+- cd rex/src && $(MAKE) install $(MFLAGS)
+- cd front/src && $(MAKE) install $(MFLAGS)
+- cd bnf/src && $(MAKE) install $(MFLAGS)
+- cd ell/src && $(MAKE) install $(MFLAGS)
+- cd lalr/src && $(MAKE) install $(MFLAGS)
+- cd front/doc && $(MAKE) install $(MFLAGS)
+- cd l2r/src && $(MAKE) install $(MFLAGS)
+- cd y2l/src && $(MAKE) install $(MFLAGS)
+- cd r2l/src && $(MAKE) install $(MFLAGS)
+- cd l2cg/src && $(MAKE) install $(MFLAGS)
+- cd rpp/src && $(MAKE) install $(MFLAGS)
+- cd cg/src && $(MAKE) install $(MFLAGS)
+- cd puma/src && $(MAKE) install $(MFLAGS)
+- cd mpp/src && $(MAKE) install $(MFLAGS)
+- cd estra/src && $(MAKE) install $(MFLAGS)
++ cd reuse/c && $(MAKE) install TARGET=$(TARGET) INCDIR=$(INCDIR)
++ cd rex/src && $(MAKE) install
++ cd front/src && $(MAKE) install
++ cd front/doc && $(MAKE) install
++ cd bnf/src && $(MAKE) install
++ cd ell/src && $(MAKE) install
++ cd lalr/src && $(MAKE) install
++ cd l2r/src && $(MAKE) install
++ cd y2l/src && $(MAKE) install
++ cd r2l/src && $(MAKE) install
++ cd l2cg/src && $(MAKE) install
++ cd rpp/src && $(MAKE) install
++ cd cg/src && $(MAKE) install
++ cd puma/src && $(MAKE) install
++ cd mpp/src && $(MAKE) install
++ cd estra/src && $(MAKE) install
+ cd man && cp * $(MANDIR) && chmod a+r $(MANDIR)/*.1
++ cp mtc/doc/*.1 $(MANDIR) && chmod a+r $(MANDIR)/*.1
++ cp mtc/doc/*.2 $(MANDIR2) && chmod a+r $(MANDIR2)/*.2
+
+-test:
+- -cd specs/c/ada && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/c && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/cpp && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/modula2 && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/modula2.ell && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/sather && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/sql && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/oberon2 && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
+- -cd specs/c/minilax && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR) minilax
+- -cd specs/c/wag && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR) minilax
+- -cd specs/modula/ada && $(MAKE) -i
+- -cd specs/modula/modula2 && $(MAKE) -i
+- -cd specs/modula/modula2.ell && $(MAKE) -i
+- -cd specs/modula/modula3 && $(MAKE) -i
+- -cd specs/modula/oberon && $(MAKE) -i
+- -cd specs/modula/pascal && $(MAKE) -i
+- -cd specs/modula/minilax && $(MAKE) -i minilax
+- -cd specs/modula/wag && $(MAKE) -i minilax
++test: testc testm
+
+-clean:
++testc:
++ cd specs && $(MAKE) testc
++ cd puma/ffaba-c && $(MAKE) test
++
++testm:
++ cd specs && $(MAKE) testm
++ cd puma/ffaba-m && $(MAKE) test
++
++clean: cleans
+ -cd reuse/c && $(MAKE) clean
+ -cd reuse/src && $(MAKE) clean
+ -cd common/src && $(MAKE) clean
+ -cd rex/src && $(MAKE) clean
+ -cd rex/test && $(MAKE) clean
+ -cd front/src && $(MAKE) clean
++ -cd front/doc && $(MAKE) clean
+ -cd bnf/src && $(MAKE) clean
+ -cd lalr/src && $(MAKE) clean
+ -cd ell/src && $(MAKE) clean
+@@ -299,23 +269,11 @@
+ -cd cg/m2c && $(MAKE) clean
+ -cd puma/m2c && $(MAKE) clean
+ -cd estra/m2c && $(MAKE) clean
++ -cd mtc/m2c && $(MAKE) clean
++
+
+ cleans:
+- -cd specs/c/ada && $(MAKE) clean
+- -cd specs/c/c && $(MAKE) clean
+- -cd specs/c/cpp && $(MAKE) clean
+- -cd specs/c/modula2 && $(MAKE) clean
+- -cd specs/c/modula2.ell && $(MAKE) clean
+- -cd specs/c/sather && $(MAKE) clean
+- -cd specs/c/sql && $(MAKE) clean
+- -cd specs/c/oberon2 && $(MAKE) clean
+- -cd specs/c/minilax && $(MAKE) clean
+- -cd specs/c/wag && $(MAKE) clean
+- -cd specs/modula/ada && $(MAKE) clean
+- -cd specs/modula/modula2 && $(MAKE) clean
+- -cd specs/modula/modula2.ell && $(MAKE) clean
+- -cd specs/modula/modula3 && $(MAKE) clean
+- -cd specs/modula/oberon && $(MAKE) clean
+- -cd specs/modula/pascal && $(MAKE) clean
+- -cd specs/modula/minilax && $(MAKE) clean
+- -cd specs/modula/wag && $(MAKE) clean
++ -cd specs && $(MAKE) clean
++ -cd puma/ffaba-c && $(MAKE) clean
++ -cd puma/ffaba-m && $(MAKE) clean
++
diff --git a/devel/cocktail/files/patch-Makefile.inc b/devel/cocktail/files/patch-Makefile.inc
new file mode 100644
index 000000000000..8a2a1287726e
--- /dev/null
+++ b/devel/cocktail/files/patch-Makefile.inc
@@ -0,0 +1,64 @@
+--- ../../work/cocktail-9309//./Makefile.inc Sun Apr 4 18:01:21 2004
++++ ./Makefile.inc Wed Mar 31 23:30:53 2004
+@@ -0,0 +1,60 @@
++# Choose a suitable C compiler
++# usually cc or gcc will do
++# on HP700 use: CC = c89 -D_HPUX_SOURCE
++CC ?= gcc
++
++OPT = -g -O -w # (optimizer) flags for the C compiler
++CFLAGS += $(OPT) -D$(UNIX) -D$(TARGET)
++ # C libraries
++
++# Choose a suitable Modula compiler
++# MC or M2C
++MC = MC
++
++# BSD needs this
++MAKE = make
++
++BIN = $(ROOTDIR)/bin
++LIB = $(ROOTDIR)/reuse/m2c # There are 2 different libraries
++LIBC = $(ROOTDIR)/reuse/c # to link against, depending on the
++INCDIR = $(ROOTDIR)/reuse/m2c # tool. And they cannot be exchanged
++INCDIRC = $(ROOTDIR)/reuse/c
++REUSE = libreuse.a
++REUSELIB = $(INCDIR)/libreuse.a
++REUSELIBC = $(INCDIRC)/libreuse.a
++COMMONINC = $(ROOTDIR)/common/m2c
++COMMONLIB = $(COMMONINC)/libcommon.a
++FRONTINC = $(ROOTDIR)/front/m2c
++FRONTLIB = $(FRONTINC)/libfront.a
++
++DEST = $(PREFIX)
++DESTBIN = $(DEST)/bin # to install shell scripts and binaries
++DESTLIB = $(DEST)/libexec/cocktail # to install binaries and data files
++DESTINCDIR = $(DEST)/include/cocktail # Where to put include files for reuse
++DESTMANDIR = $(DEST)/man/man1 # Directory for man pages
++DESTMANDIR2 = $(DEST)/man/man2 # Directory for man pages
++
++# During package build
++REX = $(ROOTDIR)/rex/m2c/rex -l$(ROOTDIR)/rex/lib
++LALR = $(ROOTDIR)/lalr/m2c/lalr
++MTC = $(ROOTDIR)/mtc/m2c/mtc
++SED = sed
++
++# The following targets are legal:
++# PCS10
++# PCS20
++# SUN (this is valid for all others)
++TARGET = FREEBSB
++UNIX = UNIX
++
++# Choose the source language:
++LANGUAGE = c
++# LANGUAGE = modula
++
++.SUFFIXES: .md .mi .h .c .o
++
++.mi.c:
++ mtc2 $(M2FLAGS) $*.mi;
++
++.md.h:
++ mtc2 $(M2FLAGS) $*.md;
++
diff --git a/devel/cocktail/files/patch-bnf-m2c-Makefile b/devel/cocktail/files/patch-bnf-m2c-Makefile
new file mode 100644
index 000000000000..c098a4706f92
--- /dev/null
+++ b/devel/cocktail/files/patch-bnf-m2c-Makefile
@@ -0,0 +1,75 @@
+--- ../../work/cocktail-9309//./bnf/m2c/Makefile Tue Feb 15 14:20:39 1994
++++ ./bnf/m2c/Makefile Wed Mar 31 22:35:03 2004
+@@ -1,36 +1,26 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
++.include "../../Makefile.inc"
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
+-
+- # C library (front)
+-FRONT = ../../front/m2c
+-
+- # C libraries
+-CLIBS = $(FRONT)/libfront.a $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -I$(FRONT) -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
+-
+-all : bnf
+-
+-install: bnf bnf.sh $(LIB)/lalr
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- install -c -s -m 755 bnf $(LIB)/lalr
+- sed "s;LIB;$(LIB);" < bnf.sh > $(BIN)/bnf
+- chmod a+rx $(BIN)/bnf
++ROOTDIR = ../..
++CFLAGS += -I$(FRONTINC) -I$(INCDIR)
++CLIBS += $(FRONTLIB) $(REUSELIB)
++
++all: bnf
++
++install: bnf bnf.sh $(DESTLIB)/lalr
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ install -c -s -m 755 bnf $(DESTLIB)/lalr
++ sed "s;LIB;$(DESTLIB);" < bnf.sh > $(DESTBIN)/bnf
++ chmod a+rx $(DESTBIN)/bnf
+
+ # installation directories
+
+-$(LIB)/lalr: $(LIB)
+- sh -c "if test ! -d $(LIB)/lalr; then mkdir -p $(LIB)/lalr; else true; fi"
++$(DESTLIB)/lalr: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/lalr; then mkdir -p $(DESTLIB)/lalr; else true; fi"
+
+
++clean:
++ rm -f core *.o bnf
++
+ # HEAD
+
+ sources : ArgCheck.h
+@@ -62,18 +52,3 @@
+ ArgCheck.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-cg-hag-c-Makefile b/devel/cocktail/files/patch-cg-hag-c-Makefile
new file mode 100644
index 000000000000..683374abf540
--- /dev/null
+++ b/devel/cocktail/files/patch-cg-hag-c-Makefile
@@ -0,0 +1,19 @@
+--- ../../work/cocktail-9309//./cg/hag-c/Makefile Tue Feb 15 14:21:25 1994
++++ ./cg/hag-c/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ Main: Main.o Tree.o Eval.o
+ $(CC) -o Main Main.o Eval.o Tree.o $(LIB)/libreuse.a
+@@ -47,7 +43,4 @@
+ clean:
+ rm -f TraceTab Main Tree.* Eval.* Main.o yyTree.w
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-cg-hag-m-Makefile b/devel/cocktail/files/patch-cg-hag-m-Makefile
new file mode 100644
index 000000000000..b3f79a1beeb5
--- /dev/null
+++ b/devel/cocktail/files/patch-cg-hag-m-Makefile
@@ -0,0 +1,7 @@
+--- ../../work/cocktail-9309//./cg/hag-m/Makefile Tue Feb 15 14:21:25 1994
++++ ./cg/hag-m/Makefile Wed Mar 31 22:35:04 2004
+@@ -37,3 +37,4 @@
+
+ clean:
+ rm -f TraceTab Main Tree.* Eval.* Main.[dimor]
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-cg-m2c-Makefile b/devel/cocktail/files/patch-cg-m2c-Makefile
new file mode 100644
index 000000000000..bceb84873a9a
--- /dev/null
+++ b/devel/cocktail/files/patch-cg-m2c-Makefile
@@ -0,0 +1,94 @@
+--- ../../work/cocktail-9309//./cg/m2c/Makefile Tue Feb 15 14:21:05 1994
++++ ./cg/m2c/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,46 +1,37 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c -d../../reuse/src
+-
+-
+-all : cg
+-
+-install: cg cg.sh lpp $(LIB)/cg
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed "s;LIB;$(LIB);g" < cg.sh > $(BIN)/cg
+- cp $(BIN)/cg $(BIN)/ag
+- cp $(BIN)/cg $(BIN)/ast
+- chmod a+rx $(BIN)/cg $(BIN)/ast $(BIN)/ag
+- install -c -m 755 gmdcpp $(BIN)
+- install -c -m 755 gmdupd $(BIN)
+- install -c -m 755 gmdrm $(BIN)
+- install -c -s -m 755 cg $(LIB)/cg
+- install -c -m 644 TypeTab.c $(LIB)/cg
+- install -c -m 644 TypeTab.m $(LIB)/cg
+- install -c -s -m 755 lpp $(BIN)
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
++
++all : cg lpp
++
++install: cg cg.sh lpp $(DESTLIB)/cg
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ sed "s;LIB;$(DESTLIB);g" < cg.sh > $(DESTBIN)/cg
++ cp $(DESTBIN)/cg $(DESTBIN)/ag
++ cp $(DESTBIN)/cg $(DESTBIN)/ast
++ chmod a+rx $(DESTBIN)/cg $(DESTBIN)/ast $(DESTBIN)/ag
++ install -c -m 755 gmdcpp $(DESTBIN)
++ install -c -m 755 gmdupd $(DESTBIN)
++ install -c -m 755 gmdrm $(DESTBIN)
++ install -c -s -m 755 cg $(DESTLIB)/cg
++ install -c -m 644 TypeTab.c $(DESTLIB)/cg
++ install -c -m 644 TypeTab.m $(DESTLIB)/cg
++ install -c -s -m 755 lpp $(DESTBIN)
+
+ # installation directories
+
+-$(LIB)/cg: $(LIB)
+- sh -c "if test ! -d $(LIB)/cg; then mkdir -p $(LIB)/cg; else true; fi"
++$(DESTLIB)/cg: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/cg; then mkdir -p $(DESTLIB)/cg; else true; fi"
+
+-# SYSTEM_ = SYSTEM_.o
++clean:
++ rm -f core *.o
++ rm -f cg lpp
+
+ lint:
+- lint -I$(REUSE) *.c
+-
++ lint -I$(INCDIR) *.c
+
+ # HEAD
+
+@@ -431,18 +422,3 @@
+ Tree.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-cg-src-Makefile b/devel/cocktail/files/patch-cg-src-Makefile
new file mode 100644
index 000000000000..1e4b89484c8b
--- /dev/null
+++ b/devel/cocktail/files/patch-cg-src-Makefile
@@ -0,0 +1,112 @@
+--- ../../work/cocktail-9309//./cg/src/Makefile Tue Feb 15 14:20:44 1994
++++ ./cg/src/Makefile Wed Mar 31 22:42:37 2004
+@@ -43,17 +43,17 @@
+ echo p cg | mc -d ../../reuse/src
+
+ Scanner.md Scanner.mi: cg.rex
+- rex -d cg.rex;
++ $(REX) -d cg.rex;
+
+ Parser.md: cg.lalr
+- lalr -b -d cg.lalr;
++ $(LALR) -b -d cg.lalr;
+
+ Parser.mi: cg.lalr
+- lalr -b -v cg.lalr;
++ $(LALR) -b -v cg.lalr;
+
+ Errors.mi: Errors.0 \
+ /tmp/cg/consts1 /tmp/cg/writes1 /tmp/cg/consts2 /tmp/cg/writes2
+- /lib/cpp -P Errors.0 Errors.mi
++ $(CPP) -P Errors.0 Errors.mi
+
+ Tree.md: cg.cg
+ echo SELECT AstIn Ast Common Cg Ag | cat - cg.cg | cg -diqmR
+@@ -71,65 +71,65 @@
+ echo SELECT AstIn Ast Common Cg Ag | cat - cg.cg | cg -4
+
+ GramMod.md GramMod.mi: mod0.puma Tree.TS
+- $(SED) < mod0.puma | puma -dinw;
++ $(SED) < mod0.puma | $(PUMA) -dinw;
+
+ GramC.md GramC.mi: c0.puma Tree.TS
+- $(SED) < c0.puma | puma -dinw;
++ $(SED) < c0.puma | $(PUMA) -dinw;
+
+ GramYacc.md GramYacc.mi: y0.puma Tree.TS
+- $(SED) < y0.puma | puma -dinw;
++ $(SED) < y0.puma | $(PUMA) -dinw;
+
+ Semantics.md Semantics.mi /tmp/cg/consts1 /tmp/cg/writes1: sem.puma Tree.TS /tmp/cg
+- awk -f cg.awk1 < sem.puma > /tmp/cg/sem
+- /lib/cpp -P < /tmp/cg/sem | puma -dinw;
+- sed -f cg.sed2 < /tmp/cg/writes01 > /tmp/cg/writes1
++ $(AWK) -f cg.awk1 < sem.puma > /tmp/cg/sem
++ $(CPP) -P < /tmp/cg/sem | $(PUMA) -dinw;
++ $(SED) -f cg.sed2 < /tmp/cg/writes01 > /tmp/cg/writes1
+
+ Order.md Order.mi /tmp/cg/consts2 /tmp/cg/writes2: oag.puma Tree.TS /tmp/cg
+- awk -f cg.awk2 < oag.puma > /tmp/cg/oag
+- /lib/cpp -P < /tmp/cg/oag | puma -dinw;
+- sed -f cg.sed2 < /tmp/cg/writes02 > /tmp/cg/writes2
++ $(AWK) -f cg.awk2 < oag.puma > /tmp/cg/oag
++ $(CPP) -P < /tmp/cg/oag | $(PUMA) -dinw;
++ $(SED) -f cg.sed2 < /tmp/cg/writes02 > /tmp/cg/writes2
+
+ Optimize.md Optimize.mi: opt.puma Tree.TS
+- /lib/cpp -P < opt.puma | puma -dinw;
++ $(CPP) -P < opt.puma | $(PUMA) -dinw;
+
+ Dialog.mi: Dialog.sed
+ $(SED) < Dialog.sed > Dialog.mi
+
+ TreeMod1.md TreeMod1.mi: mod1.puma Tree.TS
+- $(SED) < mod1.puma | puma -dinw;
++ $(SED) < mod1.puma | $(PUMA) -dinw;
+
+ TreeMod2.md TreeMod2.mi: mod2.puma Tree.TS
+- $(SED) < mod2.puma | puma -dinw;
++ $(SED) < mod2.puma | $(PUMA) -dinw;
+
+ EvalMod.md EvalMod.mi: mod3.puma Tree.TS
+- $(SED) < mod3.puma | puma -dinw;
++ $(SED) < mod3.puma | $(PUMA) -dinw;
+
+ EvalMod2.md EvalMod2.mi: mod4.puma Tree.TS
+- $(SED) < mod4.puma | puma -dinw;
++ $(SED) < mod4.puma | $(PUMA) -dinw;
+
+ EvalMod3.md EvalMod3.mi: mod5.puma Tree.TS
+- $(SED) < mod5.puma | puma -dinw;
++ $(SED) < mod5.puma | $(PUMA) -dinw;
+
+ EvalMod4.md EvalMod4.mi: mod6.puma Tree.TS
+- $(SED) < mod6.puma | puma -dinw;
++ $(SED) < mod6.puma | $(PUMA) -dinw;
+
+ TreeC1.md TreeC1.mi: c1.puma Tree.TS
+- $(SED) < c1.puma | puma -dinw;
++ $(SED) < c1.puma | $(PUMA) -dinw;
+
+ TreeC2.md TreeC2.mi: c2.puma Tree.TS
+- $(SED) < c2.puma | puma -dinw;
++ $(SED) < c2.puma | $(PUMA) -dinw;
+
+ EvalC.md EvalC.mi: c3.puma Tree.TS
+- $(SED) < c3.puma | puma -dinw;
++ $(SED) < c3.puma | $(PUMA) -dinw;
+
+ EvalC2.md EvalC2.mi: c4.puma Tree.TS
+- $(SED) < c4.puma | puma -dinw;
++ $(SED) < c4.puma | $(PUMA) -dinw;
+
+ EvalC3.md EvalC3.mi: c5.puma Tree.TS
+- $(SED) < c5.puma | puma -dinw;
++ $(SED) < c5.puma | $(PUMA) -dinw;
+
+ EvalC4.md EvalC4.mi: c6.puma Tree.TS
+- $(SED) < c6.puma | puma -dinw;
++ $(SED) < c6.puma | $(PUMA) -dinw;
+
+ cg.mi: cg.sed
+ $(SED) < cg.sed > cg.mi
diff --git a/devel/cocktail/files/patch-cg-test-c-Makefile b/devel/cocktail/files/patch-cg-test-c-Makefile
new file mode 100644
index 000000000000..d9436da8f64c
--- /dev/null
+++ b/devel/cocktail/files/patch-cg-test-c-Makefile
@@ -0,0 +1,19 @@
+--- ../../work/cocktail-9309//./cg/test-c/Makefile Tue Feb 15 14:21:27 1994
++++ ./cg/test-c/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ all:
+ make test clean LIB="$(LIB)" CC="cc"
+@@ -25,7 +21,4 @@
+ clean:
+ rm -f Main Tree.* Main.o yyTree.w a aa aaa b bb core
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-cg-test-m-Makefile b/devel/cocktail/files/patch-cg-test-m-Makefile
new file mode 100644
index 000000000000..00628b5d2b52
--- /dev/null
+++ b/devel/cocktail/files/patch-cg-test-m-Makefile
@@ -0,0 +1,7 @@
+--- ../../work/cocktail-9309//./cg/test-m/Makefile Tue Feb 15 14:21:26 1994
++++ ./cg/test-m/Makefile Wed Mar 31 22:35:04 2004
+@@ -9,3 +9,4 @@
+
+ clean:
+ rm -f Main Tree.* Main.[dimor] a aa aaa b bb core *.bak
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-common-c-Makefile b/devel/cocktail/files/patch-common-c-Makefile
new file mode 100644
index 000000000000..3e0afdfe4c56
--- /dev/null
+++ b/devel/cocktail/files/patch-common-c-Makefile
@@ -0,0 +1,8 @@
+--- ../../work/cocktail-9309//./common/c/Makefile Tue Feb 15 14:21:28 1994
++++ ./common/c/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,3 +1,5 @@
+ Timer.o: Timer.c Timer.h ; cc Timer.c
+ libcommon.a: SysErr.o Timer.o ; ar ruv libcommon.a Timer.o
+ clean: ; rm -f Timer.o
++
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-common-m2c-Makefile b/devel/cocktail/files/patch-common-m2c-Makefile
new file mode 100644
index 000000000000..97cbce022f52
--- /dev/null
+++ b/devel/cocktail/files/patch-common-m2c-Makefile
@@ -0,0 +1,58 @@
+--- ../../work/cocktail-9309//./common/m2c/Makefile Tue Feb 15 14:21:29 1994
++++ ./common/m2c/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,25 +1,20 @@
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
+
+ OBJS = Character.o Checks.o Convert.o Errors.o Listing.o Path.o Queues.o \
+ Stack.o SysError.o
+
+-
+-libcommon.a : $(OBJS)
++libcommon.a: $(OBJS)
+ ar ruc libcommon.a $(OBJS)
+ ranlib libcommon.a
+
++clean:
++ rm -f core *.o Main
++ rm -f libcommon.a
++
+
+ # HEAD
+
+@@ -115,21 +110,3 @@
+ Convert.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-CLEAN : clean
+- rm -f libcommon.a
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-ell-m2c-Makefile b/devel/cocktail/files/patch-ell-m2c-Makefile
new file mode 100644
index 000000000000..38a9d99907e9
--- /dev/null
+++ b/devel/cocktail/files/patch-ell-m2c-Makefile
@@ -0,0 +1,74 @@
+--- ../../work/cocktail-9309//./ell/m2c/Makefile Tue Feb 15 14:22:40 1994
++++ ./ell/m2c/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,37 +1,26 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
++.include "../../Makefile.inc"
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
+-
+- # C library (common)
+-COMMON = ../../common/m2c
+-
+- # C libraries
+-CLIBS = $(COMMON)/libcommon.a $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(COMMON) -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(COMMONINC) -I$(INCDIR)
++CLIBS += $(COMMONLIB) $(REUSELIB)
+
+ all : ell
+
+-install: ell ell.sh $(LIB)/ell
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed "s;LIB;$(LIB);" < ell.sh > $(BIN)/ell
+- chmod a+rx $(BIN)/ell
+- install -c -s -m 755 ell $(LIB)/ell
+- install -c -m 644 ErrorTab $(LIB)/ell
++install: ell ell.sh $(DESTLIB)/ell
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ sed "s;LIB;$(DESTLIB);" < ell.sh > $(DESTBIN)/ell
++ chmod a+rx $(DESTBIN)/ell
++ install -c -s -m 755 ell $(DESTLIB)/ell
++ install -c -m 644 ErrorTab $(DESTLIB)/ell
+
+ # installation directories
+
+-$(LIB)/ell: $(LIB)
+- sh -c "if test ! -d $(LIB)/ell; then mkdir -p $(LIB)/ell; else true; fi"
++$(DESTLIB)/ell: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/ell; then mkdir -p $(DESTLIB)/ell; else true; fi"
+
+-# SYSTEM_ = SYSTEM_.o
++clean:
++ rm -f core *.o
++ rm -f ell
+
+ # HEAD
+
+@@ -239,18 +228,3 @@
+ CodeC.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-ell-src-Makefile b/devel/cocktail/files/patch-ell-src-Makefile
new file mode 100644
index 000000000000..eff698a946b2
--- /dev/null
+++ b/devel/cocktail/files/patch-ell-src-Makefile
@@ -0,0 +1,19 @@
+--- ../../work/cocktail-9309//./ell/src/Makefile Tue Feb 15 14:22:52 1994
++++ ./ell/src/Makefile Wed Mar 31 22:43:34 2004
+@@ -48,13 +48,13 @@
+ sh -c "if test ! -d $(LIB)/ell; then mkdir -p $(LIB)/ell; else true; fi"
+
+ Scanner.mi Scanner.md: ell.rex
+- rex -d ell.rex;
++ $(REX) -d ell.rex;
+
+ Parser.mi Parser.md: ell.ell
+- ell -di ell.ell;
++ $(ELL) -di ell.ell;
+
+ Tree.mi Tree.md: ell.ast
+- cg -dimR ell.ast;
++ $(CG) -dimR ell.ast;
+
+ Semantics.md Semantics.mi: Sem.estra
+ estra $(ESTRA) Sem.estra;
diff --git a/devel/cocktail/files/patch-estra-m2c-Makefile b/devel/cocktail/files/patch-estra-m2c-Makefile
new file mode 100644
index 000000000000..481d660929f6
--- /dev/null
+++ b/devel/cocktail/files/patch-estra-m2c-Makefile
@@ -0,0 +1,73 @@
+--- ../../work/cocktail-9309//./estra/m2c/Makefile Tue Feb 15 14:23:01 1994
++++ ./estra/m2c/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,36 +1,27 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C library (common)
+-COMMON = ../../common/m2c
+-
+- # C libraries
+-CLIBS = $(COMMON)/libcommon.a $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(COMMON) -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(COMMONINC) -I$(INCDIR)
++CLIBS += $(COMMONLIB) $(REUSELIB)
+
+ all : estra
+
+-install: estra estra.sh $(LIB)/estra
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed "s;LIB;$(LIB);" < estra.sh > $(BIN)/estra
+- chmod a+rx $(BIN)/estra
+- install -c -s -m 755 estra $(LIB)/estra
+- install -c -m 644 ErrorTab $(LIB)/estra
++install: estra estra.sh $(DESTLIB)/estra
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ sed "s;LIB;$(DESTLIB);" < estra.sh > $(DESTBIN)/estra
++ chmod a+rx $(DESTBIN)/estra
++ install -c -s -m 755 estra $(DESTLIB)/estra
++ install -c -m 644 ErrorTab $(DESTLIB)/estra
+
+ # installation directories
+
+-$(LIB)/estra: $(LIB)
+- sh -c "if test ! -d $(LIB)/estra; then mkdir -p $(LIB)/estra; else true; fi"
++$(DESTLIB)/estra: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/estra; then mkdir -p $(DESTLIB)/estra; else true; fi"
+
++clean:
++ rm -f core *.o
++ rm -f estra
+
+ # HEAD
+
+@@ -232,18 +223,3 @@
+ CodeM2.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-front-doc-Makefile b/devel/cocktail/files/patch-front-doc-Makefile
new file mode 100644
index 000000000000..41c405089e40
--- /dev/null
+++ b/devel/cocktail/files/patch-front-doc-Makefile
@@ -0,0 +1,34 @@
+--- ../../work/cocktail-9309//./front/doc/Makefile Tue Feb 15 14:23:21 1994
++++ ./front/doc/Makefile Wed Mar 31 22:35:04 2004
+@@ -1,17 +1,18 @@
+ # $Id: Makefile,v 2.8 1993/08/24 13:19:11 grosch rel $
+
+-LIB = $(HOME)/lib
++.include "../../Makefile.inc"
++ROOTDIR=../..
+
+-install: bnf.cat lalr.cat bnf.syn lalr.syn $(LIB)/lalr
+- install -c -m 644 bnf.cat $(LIB)/lalr
+- install -c -m 644 lalr.cat $(LIB)/lalr
+- install -c -m 644 bnf.syn $(LIB)/lalr
+- install -c -m 644 lalr.syn $(LIB)/lalr
++install: bnf.cat lalr.cat bnf.syn lalr.syn $(DESTLIB)/lalr
++ install -c -m 644 bnf.cat $(DESTLIB)/lalr
++ install -c -m 644 lalr.cat $(DESTLIB)/lalr
++ install -c -m 644 bnf.syn $(DESTLIB)/lalr
++ install -c -m 644 lalr.syn $(DESTLIB)/lalr
+
+ # installation directories
+
+-$(LIB)/lalr: $(LIB)
+- sh -c "if test ! -d $(LIB)/lalr; then mkdir -p $(LIB)/lalr; else true; fi"
++$(DESTLIB)/lalr: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/lalr; then mkdir -p $(DESTLIB)/lalr; else true; fi"
+
+ bnf.cat: bnf.1
+ nroff -man < bnf.1 | col > bnf.cat
+@@ -25,3 +26,4 @@
+
+ clean:
+ rm -f bnf.cat lalr.cat
++
diff --git a/devel/cocktail/files/patch-front-m2c-Makefile b/devel/cocktail/files/patch-front-m2c-Makefile
new file mode 100644
index 000000000000..e1b07846e813
--- /dev/null
+++ b/devel/cocktail/files/patch-front-m2c-Makefile
@@ -0,0 +1,72 @@
+--- ../../work/cocktail-9309//./front/m2c/Makefile Tue Feb 15 14:23:22 1994
++++ ./front/m2c/Makefile Wed Mar 31 22:35:05 2004
+@@ -1,17 +1,9 @@
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
+
+ OBJS = Actions.o Character.o Checks.o Errors.o Limits.o \
+ Listing.o Oper.o Pars.o Parser.o Path.o Rules.o Scanner.o \
+@@ -21,15 +13,20 @@
+ ar ruc libfront.a $(OBJS)
+ ranlib libfront.a
+
+-install: ErrorTab libfront.a $(LIB)/lalr
+- cp ErrorTab $(LIB)/lalr
+- chmod a+r $(LIB)/lalr/ErrorTab
++install: ErrorTab libfront.a $(DESTLIB)/lalr
++ cp ErrorTab $(DESTLIB)/lalr
++ chmod a+r $(DESTLIB)/lalr/ErrorTab
+
+ # installation directories
+
+-$(LIB)/lalr: $(LIB)
+- sh -c "if test ! -d $(LIB)/lalr; then mkdir -p $(LIB)/lalr; else true; fi"
++$(DESTLIB)/lalr: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/lalr; then mkdir -p $(DESTLIB)/lalr; else true; fi"
++
++test: Pars
+
++clean:
++ rm -f core *.o
++ rm -f libfront.a Pars
+
+ # HEAD
+
+@@ -193,21 +190,3 @@
+ Character.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-CLEAN :
+- rm -f core *.o libfront.a
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-front-src-Makefile b/devel/cocktail/files/patch-front-src-Makefile
new file mode 100644
index 000000000000..691912721285
--- /dev/null
+++ b/devel/cocktail/files/patch-front-src-Makefile
@@ -0,0 +1,27 @@
+--- ../../work/cocktail-9309//./front/src/Makefile Tue Feb 15 14:23:34 1994
++++ ./front/src/Makefile Wed Mar 31 22:44:53 2004
+@@ -41,10 +41,10 @@
+ make -f MakefileM2C LIB=$(MLIB)
+
+ Scanner.md Scanner.mi: input.rex
+- rex -d input.rex;
++ $(REX) -d input.rex;
+
+ Parser.md Parser.mi: input.lalr
+- lalr -b -d input.lalr;
++ $(LALR) -b -d input.lalr;
+
+ install: ErrorTab $(LIB)/lalr
+ install -c -m 644 ErrorTab $(LIB)/lalr
+@@ -65,9 +65,9 @@
+
+ lalrId: input.rex
+ echo SCANNER lalrId | cat - input.rex | \
+- sed 's/\(RETURN.*Ident\)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
++ $(SED) 's/\(RETURN.*Ident\)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
+ $(BIN).sparc.t/rex -sd;
+- sed 's/@/lalrId/' < ../../front/src/Id.mi > lalrIdDrv.mi
++ $(SED) 's/@/lalrId/' < ../../front/src/Id.mi > lalrIdDrv.mi
+ echo p lalrIdDrv | mc -d $(MLIB)
+ mv lalrIdDrv lalrId
+
diff --git a/devel/cocktail/files/patch-l2cg-m2c-Makefile b/devel/cocktail/files/patch-l2cg-m2c-Makefile
new file mode 100644
index 000000000000..145c5ecb2de6
--- /dev/null
+++ b/devel/cocktail/files/patch-l2cg-m2c-Makefile
@@ -0,0 +1,82 @@
+--- ../../work/cocktail-9309//./l2cg/m2c/Makefile Tue Feb 15 14:23:40 1994
++++ ./l2cg/m2c/Makefile Wed Mar 31 22:35:05 2004
+@@ -1,42 +1,31 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
++
++all: l2cg
++
++install: l2cg l2cg.sh $(DESTLIB)/l2cg
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ sed 's;LIB;$(DESTLIB);g' < l2cg.sh > $(DESTBIN)/l2cg
++ chmod a+rx $(DESTBIN)/l2cg
++ install -c -s -m 755 l2cg $(DESTLIB)/l2cg
+
+- # options for C compiler
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c -d$(HOME)/reuse/src
+-
+-
+-all : l2cg
+-
+-install: l2cg l2cg.sh $(LIB)/l2cg
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed 's;LIB;$(LIB);g' < l2cg.sh > $(BIN)/l2cg
+- chmod a+rx $(BIN)/l2cg
+- install -c -s -m 755 l2cg $(LIB)/l2cg
+-
+-# installation directories
+-
+-$(LIB)/l2cg: $(LIB)
+- sh -c "if test ! -d $(LIB)/l2cg; then mkdir -p $(LIB)/l2cg; else true; fi"
+-
+-# SYSTEM_ = SYSTEM_.o
++$(DESTLIB)/l2cg: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/l2cg; then mkdir -p $(DESTLIB)/l2cg; else true; fi"
+
+ lint:
+ lint -I$(REUSE) *.c
+
+ l2cg: ParserDrv
+- mv ParserDrv l2cg
++ cp ParserDrv l2cg
+
+
++clean:
++ rm -f core *.o l2cg ParserDrv
++
+ # HEAD
+
+ sources : Parser.h
+@@ -68,18 +57,3 @@
+ Scanner.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o l2cg
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-l2cg-src-Makefile b/devel/cocktail/files/patch-l2cg-src-Makefile
new file mode 100644
index 000000000000..6dc835cfe236
--- /dev/null
+++ b/devel/cocktail/files/patch-l2cg-src-Makefile
@@ -0,0 +1,20 @@
+--- ../../work/cocktail-9309//./l2cg/src/Makefile Tue Feb 15 14:23:44 1994
++++ ./l2cg/src/Makefile Wed Mar 31 22:45:23 2004
+@@ -14,14 +14,14 @@
+ mv ParserDrv l2cg
+
+ Scanner.md Scanner.mi: l2cg.rex
+- rex -d l2cg.rex;
++ $(REX) -d l2cg.rex;
+
+ Parser.md Parser.mi ParserDrv.mi: l2cg.lalr
+- lalr -b -d -p l2cg.lalr;
++ $(LALR) -b -d -p l2cg.lalr;
+
+ install: l2cg l2cg.sh $(LIB)/l2cg
+ if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed 's;LIB;$(LIB);g' < l2cg.sh > $(BIN)/l2cg
++ $(SED) 's;LIB;$(LIB);g' < l2cg.sh > $(BIN)/l2cg
+ chmod a+rx $(BIN)/l2cg
+ install -c -s -m 755 l2cg $(LIB)/l2cg
+
diff --git a/devel/cocktail/files/patch-l2r-src-Makefile b/devel/cocktail/files/patch-l2r-src-Makefile
new file mode 100644
index 000000000000..67f7beb1a339
--- /dev/null
+++ b/devel/cocktail/files/patch-l2r-src-Makefile
@@ -0,0 +1,56 @@
+--- ../../work/cocktail-9309//./l2r/src/Makefile Tue Feb 15 14:23:48 1994
++++ ./l2r/src/Makefile Wed Mar 31 23:29:37 2004
+@@ -1,32 +1,34 @@
+-BIN = $(HOME)/bin
+-OPT = -O
+-CC = cc
+-REUSE = ../../reuse/c
+-CFLAGS = -w -I$(REUSE) $(OPT)
++
++.include "../../Makefile.inc"
++
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIRC)
++CLIBS += $(REUSELIBC)
++
+ OBJS = l2r.o Parser.o Scanner.o Errors.o StringBuf.o
+ SOURCES = Scanner.h Scanner.c Parser.h Parser.c
+
+ # targets
+
+ l2r: $(OBJS)
+- $(CC) -o l2r $(CFLAGS) $(OBJS) $(REUSE)/libreuse.a
++ $(CC) -o l2r $(CFLAGS) $(OBJS) $(REUSELIBC)
+
+ sources: $(SOURCES)
+
+ Scanner.h Scanner.c: lex.rex
+- rex -cd lex.rex;
++ $(REX) -cd lex.rex;
+
+ Parser.h Parser.c: lex.lalr
+- lalr -b -c -d lex.lalr;
++ $(LALR) -b -c -d lex.lalr;
+
+ install: l2r
+- install -c -s -m 755 l2r $(BIN)
++ install -c -s -m 755 l2r $(DESTBIN)
+
+ lint: l2r.c Parser.c Scanner.c Errors.c StringBuf.c
+- lint -I$(REUSE) -b -u *.c
++ lint -I$(INCDIRC) -b -u *.c
+
+ clean:
+- rm -f core l2r *.o
++ rm -f core l2r *.o Scanner.c Scanner.h
+
+ CLEAN: clean
+ rm -f $(SOURCES)
+@@ -44,7 +46,4 @@
+ man:
+ nroff -man l2r.1
+
+-.SUFFIXES: .c .o
+
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-lalr-m2c-Makefile b/devel/cocktail/files/patch-lalr-m2c-Makefile
new file mode 100644
index 000000000000..87ecfb129d0d
--- /dev/null
+++ b/devel/cocktail/files/patch-lalr-m2c-Makefile
@@ -0,0 +1,78 @@
+--- ../../work/cocktail-9309//./lalr/m2c/Makefile Tue Feb 15 14:23:56 1994
++++ ./lalr/m2c/Makefile Wed Mar 31 22:35:05 2004
+@@ -1,21 +1,9 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C library (front)
+-FRONT = ../../front/m2c
+-
+- # C libraries
+-CLIBS = $(FRONT)/libfront.a $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -I$(FRONT) -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(FRONTINC) -I$(INCDIR)
++CLIBS += $(FRONTLIB) $(REUSELIB)
+
+ PLIB = ParserDrv.mi Parser.md Parser.mi Errors.md Errors.mi Scanner.md Scanner.mi \
+ ParserDrv.c Parser.c Parser.h Errors.c Errors.h Scanner.c Scanner.h \
+@@ -24,19 +12,21 @@
+
+ all : lalr
+
+-install: lalr lalr.sh $(LIB)/lalr
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- install -c -s -m 755 lalr $(LIB)/lalr
+- sed "s;LIB;$(LIB);" < lalr.sh > $(BIN)/lalr
+- chmod a+rx $(BIN)/lalr
+- cd ../lib; cp $(PLIB) $(LIB)/lalr
+- cd $(LIB)/lalr; chmod a+r $(PLIB)
++install: lalr lalr.sh $(DESTLIB)/lalr
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ install -c -s -m 755 lalr $(DESTLIB)/lalr
++ sed "s;LIB;$(DESTLIB);" < lalr.sh > $(DESTBIN)/lalr
++ chmod a+rx $(DESTBIN)/lalr
++ cd ../lib; cp $(PLIB) $(DESTLIB)/lalr
++ cd $(DESTLIB)/lalr; chmod a+r $(PLIB)
+
+ # installation directories
+
+-$(LIB)/lalr: $(LIB)
+- sh -c "if test ! -d $(LIB)/lalr; then mkdir -p $(LIB)/lalr; else true; fi"
++$(DESTLIB)/lalr: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/lalr; then mkdir -p $(DESTLIB)/lalr; else true; fi"
+
++clean:
++ rm -f core *.o lalr
+
+ # HEAD
+
+@@ -200,18 +190,3 @@
+ Infos.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-mtc-m2c-Makefile b/devel/cocktail/files/patch-mtc-m2c-Makefile
new file mode 100644
index 000000000000..23bc7d0b8f77
--- /dev/null
+++ b/devel/cocktail/files/patch-mtc-m2c-Makefile
@@ -0,0 +1,85 @@
+--- ../../work/cocktail-9309//./mtc/m2c/Makefile Tue Feb 15 14:24:29 1994
++++ ./mtc/m2c/Makefile Wed Mar 31 22:35:05 2004
+@@ -1,43 +1,36 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C library
+-CLIBS = $(REUSE)/libreuse.a
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
+
+- # options for cc
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+- # options for mtc
+-M2FLAGS = -c
+-
+- # "runtime system"
+ RTS = SYSTEM_.h SYSTEM_.c Arguments.h Arguments.c
+
+-all :
++all: mtc
+
+-install: mtc $(BIN) $(LIB)/mtc
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- install -c -s -m 755 mtc $(BIN)
+- cp $(RTS) $(LIB)/mtc
+- chmod a+r $(LIB)/mtc/*.[hc]
++install: mtc $(DESTBIN) $(DESTLIB)/mtc
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ install -c -s -m 755 mtc $(DESTBIN)
++ cp $(RTS) $(DESTLIB)/mtc
++ chmod a+r $(DESTLIB)/mtc/*.[hc]
+
+ # installation directories
+
+-$(BIN):
+- sh -c "if test ! -d $(BIN); then mkdir -p $(BIN); else true; fi"
++$(DESTBIN):
++ sh -c "if test ! -d $(DESTBIN); then mkdir -p $(DESTBIN); else true; fi"
+
+-$(LIB):
+- sh -c "if test ! -d $(LIB); then mkdir -p $(LIB); else true; fi"
++$(DESTLIB):
++ sh -c "if test ! -d $(DESTLIB); then mkdir -p $(DESTLIB); else true; fi"
+
+-$(LIB)/mtc: $(LIB)
+- sh -c "if test ! -d $(LIB)/mtc; then mkdir -p $(LIB)/mtc; else true; fi"
++$(DESTLIB)/mtc: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/mtc; then mkdir -p $(DESTLIB)/mtc; else true; fi"
+
+
++clean:
++ rm -f core *.o
++ rm -f mtc
++
+ # HEAD
+
+ sources : AssocTab.h
+@@ -278,18 +271,3 @@
+ Parser.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-mtc-make-Makefile b/devel/cocktail/files/patch-mtc-make-Makefile
new file mode 100644
index 000000000000..3b61e47faefb
--- /dev/null
+++ b/devel/cocktail/files/patch-mtc-make-Makefile
@@ -0,0 +1,33 @@
+--- ../../work/cocktail-9309//./mtc/make/Makefile Tue Feb 15 14:24:53 1994
++++ ./mtc/make/Makefile Wed Mar 31 22:47:12 2004
+@@ -26,10 +26,10 @@
+ sh -c "if test ! -d $(LIB)/makemake; then mkdir -p $(LIB)/makemake; else true; fi"
+
+ Scanner.md Scanner.mi: modula.rex
+- rex -d modula.rex;
++ $(REX) -d modula.rex;
+
+ Parser.md Parser.mi: modula.ell
+- ell -di modula.ell;
++ $(ELL) -di modula.ell;
+
+ m2c: $(SRCM) $(GEN)
+ make sources M2FLAGS="-c -d../../reuse/src" -f MakefileC
+@@ -38,9 +38,9 @@
+
+ modId: modula.rex
+ echo SCANNER modId | cat - modula.rex | \
+- sed 's/\(RETURN.*Ident\)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
+- $(BIN).t/rex -sd;
+- sed 's/@/modId/' < ../../front/src/Id.mi > modIdDrv.mi
++ $(SED) 's/\(RETURN.*Ident\)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
++ $(REX) -sd;
++ $(SED) 's/@/modId/' < ../../front/src/Id.mi > modIdDrv.mi
+ echo p modIdDrv | mc -d ../../reuse/src
+ mv modIdDrv modId
+
+@@ -60,3 +60,4 @@
+
+ CLEAN: clean
+ rm -f [A-Z]*.[hc] Parser.m? Scanner.m? GetImports
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-mtc-src-Makefile b/devel/cocktail/files/patch-mtc-src-Makefile
new file mode 100644
index 000000000000..8c78bbb9e4c2
--- /dev/null
+++ b/devel/cocktail/files/patch-mtc-src-Makefile
@@ -0,0 +1,72 @@
+--- ../../work/cocktail-9309//./mtc/src/Makefile Tue Feb 15 14:25:08 1994
++++ ./mtc/src/Makefile Wed Mar 31 22:54:33 2004
+@@ -27,25 +27,25 @@
+ echo p mtc | $(MC)
+
+ Scanner.md Scanner.mi: modula.rex
+- rex -di modula.rex;
++ $(REX) -di modula.rex;
+
+ Parser.md Parser.mi: modula.ell
+- ell -di modula.ell;
++ $(ELL) -di modula.ell;
+
+ Tree.md Tree.mi: modula.cg
+- cg -mRdiDI0 modula.cg;
++ $(CG) -mRdiDI0 modula.cg;
+
+ Semantics.md Semantics.mi: modula.cg
+- cg -DI0 modula.cg;
++ $(CG) -DI0 modula.cg;
+
+ Defs.md Defs.mi: defs.cg
+- cg -mdi defs.cg;
++ $(CG) -mdi defs.cg;
+
+ Tree.TS: modula.cg
+ echo SELECT Abstract | cat - modula.cg | cg -4
+
+ Code.md Code.mi: code.puma Tree.TS opp opp.sed
+- opp code.puma | puma -dis
++ opp code.puma | $(PUMA) -dis
+ # Opp = output pre processor
+
+ install: mtc $(BIN) $(LIB)/mtc
+@@ -75,30 +75,30 @@
+ MTC = time mtc -tm -d../../reuse/src s.mi
+
+ test: $(GEN) $(SRCM)
+- cg -IL modula.cg;
++ $(CG) -IL modula.cg;
+ mv Semantics.mi s.mi
+- cg -dimRDI0 modula.cg;
++ $(CG) -dimRDI0 modula.cg;
+ make mtc
+ tcsh -c "$(MTC); $(MTC); $(MTC); $(MTC)"
+ wc Semantics.mi
+ size Semantics.o mtc
+- cg -dimRDI09 modula.cg;
++ $(CG) -dimRDI09 modula.cg;
+ make mtc
+ $(MTC)
+- cg -dimRDI modula.cg;
++ $(CG) -dimRDI modula.cg;
+ make mtc
+ tcsh -c "$(MTC); $(MTC); $(MTC); $(MTC)"
+ wc Semantics.mi
+ size Semantics.o mtc
+- cg -dimRDI9 modula.cg;
++ $(CG) -dimRDI9 modula.cg;
+ make mtc
+ $(MTC)
+- cg -dimRDIL modula.cg;
++ $(CG) -dimRDIL modula.cg;
+ make mtc
+ tcsh -c "$(MTC); $(MTC); $(MTC); $(MTC)"
+ wc Semantics.mi
+ size Semantics.o mtc
+- cg -dimRDIL9 modula.cg;
++ $(CG) -dimRDIL9 modula.cg;
+ make mtc
+ $(MTC)
+
diff --git a/devel/cocktail/files/patch-puma-ffaba-c-Makefile b/devel/cocktail/files/patch-puma-ffaba-c-Makefile
new file mode 100644
index 000000000000..a4c4e89389e0
--- /dev/null
+++ b/devel/cocktail/files/patch-puma-ffaba-c-Makefile
@@ -0,0 +1,25 @@
+--- ../../work/cocktail-9309//./puma/ffaba-c/Makefile Tue Feb 15 14:26:16 1994
++++ ./puma/ffaba-c/Makefile Wed Mar 31 22:35:05 2004
+@@ -1,13 +1,9 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc -O
+
+ all: main
+ time main
+
+ main: ProTest.o Compiler.o
+- cc -o main Compiler.o ProTest.o $(LIB)/libreuse.a
++ $(CC) -o main Compiler.o ProTest.o $(LIB)/libreuse.a
+
+ ProTest.o: ProTest.h
+ Compiler.o: ProTest.h
+@@ -24,5 +20,5 @@
+ clean:
+ rm -f core Compiler.* ProTest.* yy*.w main
+
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c;
++.include "../../Makefile.inc"
++
diff --git a/devel/cocktail/files/patch-puma-ffaba-m-Makefile b/devel/cocktail/files/patch-puma-ffaba-m-Makefile
new file mode 100644
index 000000000000..b8c62d26d3d8
--- /dev/null
+++ b/devel/cocktail/files/patch-puma-ffaba-m-Makefile
@@ -0,0 +1,8 @@
+--- ../../work/cocktail-9309//./puma/ffaba-m/Makefile Tue Feb 15 14:26:15 1994
++++ ./puma/ffaba-m/Makefile Wed Mar 31 22:35:05 2004
+@@ -12,3 +12,5 @@
+
+ clean:
+ rm -f core Compiler.* ProTest.* main.[mor] main
++
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-puma-m2c-C.c b/devel/cocktail/files/patch-puma-m2c-C.c
new file mode 100644
index 000000000000..794e06e90410
--- /dev/null
+++ b/devel/cocktail/files/patch-puma-m2c-C.c
@@ -0,0 +1,20 @@
+--- ../../work/cocktail-9309//./puma/m2c/C.c Tue Feb 15 14:26:00 1994
++++ ./puma/m2c/C.c Wed Mar 31 22:35:05 2004
+@@ -1558,7 +1558,7 @@
+ IO_WriteS(Tree_f, (STRING)"_Exit) () = yyExit;", 19L);
+ IO_WriteNl(Tree_f);
+ IO_WriteNl(Tree_f);
+- IO_WriteS(Tree_f, (STRING)"static FILE * yyf = stdout;", 27L);
++ IO_WriteS(Tree_f, (STRING)"static FILE * yyf;", 18L);
+ IO_WriteNl(Tree_f);
+ IO_WriteNl(Tree_f);
+ IO_WriteS(Tree_f, (STRING)"static void yyAbort", 19L);
+@@ -1594,6 +1594,8 @@
+ IO_WriteS(Tree_f, (STRING)" ()", 3L);
+ IO_WriteNl(Tree_f);
+ IO_WriteS(Tree_f, (STRING)"{", 1L);
++ IO_WriteNl(Tree_f);
++ IO_WriteS(Tree_f, (STRING)" yyf = stdout;", 15L);
+ IO_WriteNl(Tree_f);
+ WriteLine(W_35->Codes->U_1.V_12.Codes.BeginLine);
+ Texts_WriteText(Tree_f, W_35->Codes->U_1.V_12.Codes.Begin);
diff --git a/devel/cocktail/files/patch-puma-m2c-Makefile b/devel/cocktail/files/patch-puma-m2c-Makefile
new file mode 100644
index 000000000000..eb1609575cd7
--- /dev/null
+++ b/devel/cocktail/files/patch-puma-m2c-Makefile
@@ -0,0 +1,78 @@
+--- ../../work/cocktail-9309//./puma/m2c/Makefile Tue Feb 15 14:25:55 1994
++++ ./puma/m2c/Makefile Wed Mar 31 22:35:05 2004
+@@ -1,39 +1,31 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
+-
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c -d$(HOME)/reuse/src
++.include "../../Makefile.inc"
+
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
+
+ all : puma
+
+-install: puma puma.sh $(LIB)/puma
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed 's;LIB;$(LIB);g' < puma.sh > $(BIN)/puma
+- chmod a+rx $(BIN)/puma
+- install -c -s -m 755 puma $(LIB)/puma
+- install -c -m 644 TypeTab.c $(LIB)/puma
+- install -c -m 644 TypeTab.m $(LIB)/puma
++install: puma puma.sh $(DESTLIB)/puma
++ if test $(DESTLIB) = $(DESTBIN); then echo error: BIN = LIB; false; else true; fi
++ sed 's;LIB;$(DESTLIB);g' < puma.sh > $(DESTBIN)/puma
++ chmod a+rx $(DESTBIN)/puma
++ install -c -s -m 755 puma $(DESTLIB)/puma
++ install -c -m 644 TypeTab.c $(DESTLIB)/puma
++ install -c -m 644 TypeTab.m $(DESTLIB)/puma
+
+ # installation directories
+
+-$(LIB)/puma: $(LIB)
+- sh -c "if test ! -d $(LIB)/puma; then mkdir -p $(LIB)/puma; else true; fi"
++$(DESTLIB)/puma: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/puma; then mkdir -p $(DESTLIB)/puma; else true; fi"
+
+-# SYSTEM_ = SYSTEM_.o
++clean:
++ rm -f core *.o
++ rm -f puma
+
+ lint:
+- lint -I$(REUSE) *.c
++ lint -I$(INCDIR) *.c
+
+
+ # HEAD
+@@ -140,18 +132,3 @@
+ Parser.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-puma-src-Makefile b/devel/cocktail/files/patch-puma-src-Makefile
new file mode 100644
index 000000000000..9f32b94839e9
--- /dev/null
+++ b/devel/cocktail/files/patch-puma-src-Makefile
@@ -0,0 +1,79 @@
+--- ../../work/cocktail-9309//./puma/src/Makefile Tue Feb 15 14:25:38 1994
++++ ./puma/src/Makefile Wed Mar 31 22:56:36 2004
+@@ -20,40 +20,40 @@
+ echo p puma | mc -d ../../reuse/src
+
+ Scanner.rpp Parser.lalr: puma.pars
+- cg -xzj puma.pars;
++ $(CG) -xzj puma.pars;
+
+ puma.rex: puma.scan Scanner.rpp
+- rpp < puma.scan > puma.rex;
++ $(RPP) < puma.scan > puma.rex;
+
+ Scanner.md Scanner.mi: puma.rex
+- rex -d puma.rex;
++ $(REX) -d puma.rex;
+
+ Parser.md: Parser.lalr
+- lalr -d -v Parser.lalr;
++ $(LALR) -d -v Parser.lalr;
+
+ Parser.mi: Parser.lalr
+- lalr -v Parser.lalr;
++ $(LALR) -v Parser.lalr;
+
+ Tree.md: puma.cg
+- echo SELECT AstIn Ast Common PumaIn Puma | cat - puma.cg | cg -dimRyq
++ echo SELECT AstIn Ast Common PumaIn Puma | cat - puma.cg | $(CG) -dimRyq
+
+ Tree.mi: puma.cg
+- echo SELECT AstIn Ast Common PumaIn Puma | cat - puma.cg | cg -imRyq
++ echo SELECT AstIn Ast Common PumaIn Puma | cat - puma.cg | $(CG) -imRyq
+
+ Tree2.md: puma.cg
+- echo SUBUNIT Tree2 SELECT AstIn Ast | cat - puma.cg | cg -dig
++ echo SUBUNIT Tree2 SELECT AstIn Ast | cat - puma.cg | $(CG) -dig
+
+ Tree2.mi: puma.cg
+- echo SUBUNIT Tree2 SELECT AstIn Ast | cat - puma.cg | cg -ig
++ echo SUBUNIT Tree2 SELECT AstIn Ast | cat - puma.cg | $(CG) -ig
+
+ Tree.TS: puma.cg
+- echo SELECT PumaIn Puma | cat - puma.cg | cg -4
++ echo SELECT PumaIn Puma | cat - puma.cg | $(CG) -4
+
+ Semantics.md Semantics.mi: sem.puma Tree.TS
+- puma -dinw sem.puma;
++ $(PUMA) -dinw sem.puma;
+
+ Optimize.md Optimize.mi: opt.puma Tree.TS
+- puma -diwk opt.puma;
++ $(PUMA) -diwk opt.puma;
+
+ Mod.md Mod.mi: mod.puma Tree.TS
+ $(SED) < mod.puma | puma -dinw;
+@@ -64,9 +64,9 @@
+ puma.mi: puma.sed
+ $(SED) < puma.sed > puma.mi
+
+-install: puma puma.sh $(LIB)/puma
++install: $(PUMA) puma.sh $(LIB)/puma
+ if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed 's;LIB;$(LIB);g' < puma.sh > $(BIN)/puma
++ $(SED) 's;LIB;$(LIB);g' < puma.sh > $(BIN)/puma
+ chmod a+rx $(BIN)/puma
+ install -c -s -m 755 puma $(LIB)/puma
+ install -c -m 644 TypeTab.c $(LIB)/puma
+@@ -90,9 +90,9 @@
+
+ pumaId: puma.rex
+ echo SCANNER pumaId | cat - puma.rex | \
+- sed 's/\(RETURN 1 \)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
++ $(SED) 's/\(RETURN 1 \)/yyEcho; IO.WriteNl (IO.StdOutput); \1/' | \
+ $(BIN).t/rex -sd;
+- sed 's/@/pumaId/' < ../../front/src/Id.mi > pumaIdDrv.mi
++ $(SED) 's/@/pumaId/' < ../../front/src/Id.mi > pumaIdDrv.mi
+ echo p pumaIdDrv | mc -d ../../reuse/src
+ mv pumaIdDrv pumaId
+
diff --git a/devel/cocktail/files/patch-r2l-m2c-Makefile b/devel/cocktail/files/patch-r2l-m2c-Makefile
new file mode 100644
index 000000000000..edd495b6ddca
--- /dev/null
+++ b/devel/cocktail/files/patch-r2l-m2c-Makefile
@@ -0,0 +1,68 @@
+--- ../../work/cocktail-9309//./r2l/m2c/Makefile Tue Feb 15 14:26:18 1994
++++ ./r2l/m2c/Makefile Wed Mar 31 22:35:06 2004
+@@ -1,33 +1,26 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
+
+ all: r2l
+
+-install: r2l r2l.sh $(LIB)/r2l
+- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed 's;LIB;$(LIB);g' < r2l.sh > $(BIN)/r2l
+- chmod a+rx $(BIN)/r2l
+- install -c -s -m 755 r2l $(LIB)/r2l
++install: r2l r2l.sh $(DESTLIB)/r2l
++ if test $(DESTLIB) = $(DESTBIN); then echo error: BIN = LIB; false; else true; fi
++ sed 's;LIB;$(DESTLIB);g' < r2l.sh > $(DESTBIN)/r2l
++ chmod a+rx $(DESTBIN)/r2l
++ install -c -s -m 755 r2l $(DESTLIB)/r2l
+
+ # installation directories
+
+-$(LIB)/r2l: $(LIB)
+- sh -c "if test ! -d $(LIB)/r2l; then mkdir -p $(LIB)/r2l; else true; fi"
++$(DESTLIB)/r2l: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/r2l; then mkdir -p $(DESTLIB)/r2l; else true; fi"
+
+-# SYSTEM_ = SYSTEM_.o
++clean:
++ rm -f core *.o
++ rm -f r2l
+
+ # HEAD
+
+@@ -79,17 +72,3 @@
+ $(CLIBS)
+
+ # TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-r2l-src-Makefile b/devel/cocktail/files/patch-r2l-src-Makefile
new file mode 100644
index 000000000000..1e9e005e8b0b
--- /dev/null
+++ b/devel/cocktail/files/patch-r2l-src-Makefile
@@ -0,0 +1,20 @@
+--- ../../work/cocktail-9309//./r2l/src/Makefile Tue Feb 15 14:26:26 1994
++++ ./r2l/src/Makefile Wed Mar 31 22:57:18 2004
+@@ -15,14 +15,14 @@
+ echo p r2l | mc -d ../../reuse/src
+
+ Scanner.mi Scanner.md: r2l.rex
+- rex -d r2l.rex;
++ $(REX) -d r2l.rex;
+
+ Parser.mi Parser.md: r2l.lalr
+- lalr -b -d r2l.lalr;
++ $(LALR) -b -d r2l.lalr;
+
+ install: r2l r2l.sh $(LIB)/r2l
+ if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
+- sed "s;LIB;$(LIB);g" < r2l.sh > $(BIN)/r2l
++ $(SED) "s;LIB;$(LIB);g" < r2l.sh > $(BIN)/r2l
+ chmod a+rx $(BIN)/r2l
+ install -c -s -m 755 r2l $(LIB)/r2l
+
diff --git a/devel/cocktail/files/patch-reuse-c-Errors.c b/devel/cocktail/files/patch-reuse-c-Errors.c
new file mode 100644
index 000000000000..1c2924338f41
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Errors.c
@@ -0,0 +1,36 @@
+--- ../../work/cocktail-9309//./reuse/c/Errors.c Tue Feb 15 14:26:34 1994
++++ ./reuse/c/Errors.c Wed Mar 31 22:35:06 2004
+@@ -69,7 +69,8 @@
+ static int MessageCount;
+ static bool IsStore = false;
+ static void (* HandleMessage) ARGS((bool IsErrorCode, int ErrorCode, int ErrorClass, tPosition Position, int InfoClass, char * Info)) = WriteMessage;
+-static FILE * Out = stderr;
++static FILE * Out = NULL;
++/* = stderr; */
+
+ void ErrorMessage
+ # if defined __STDC__ | defined __cplusplus
+@@ -122,6 +123,7 @@
+ (Position, ErrorClass) tPosition Position; int ErrorClass;
+ # endif
+ {
++ if (Out==NULL) {Out = stderr;}
+ WritePosition (Out, Position);
+ (void) fputs (": ", Out);
+ switch (ErrorClass) {
+@@ -143,6 +145,7 @@
+ (ErrorCode) int ErrorCode;
+ # endif
+ {
++ if (Out==NULL) {Out = stderr;}
+ switch (ErrorCode) {
+ case xxNoText : break;
+ case xxSyntaxError : (void) fputs ("syntax error" , Out); break;
+@@ -163,6 +166,7 @@
+ {
+ int i;
+ if (InfoClass == xxNone) return;
++ if (Out==NULL) {Out = stderr;}
+ (void) fputs (": ", Out);
+ switch (InfoClass) {
+ case xxInteger : (void) fprintf (Out, "%d", * (int *) Info); break;
diff --git a/devel/cocktail/files/patch-reuse-c-Makefile b/devel/cocktail/files/patch-reuse-c-Makefile
new file mode 100644
index 000000000000..18d1d6a0a811
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Makefile
@@ -0,0 +1,63 @@
+--- ../../work/cocktail-9309//./reuse/c/Makefile Tue Feb 15 14:26:37 1994
++++ ./reuse/c/Makefile Wed Mar 31 22:35:06 2004
+@@ -1,35 +1,30 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-TARGET = SUN
+-REUSE = libreuse.a
+-OPT = -O
+-UNIX = UNIX
+-CFLAGS = $(OPT) -D$(UNIX) -D$(TARGET)
+-CC = cc
+-OBJS = rSystem.o General.o rMemory.o DynArray.o StringMem.o Idents.o Sets.o Time.o \
+- Errors.o Positions.o Source.o
+
+-# targets
++.include "../../Makefile.inc"
+
+-all: $(TARGET)
++OBJS = rSystem.o General.o rMemory.o DynArray.o StringMem.o Idents.o \
++ Sets.o Time.o Errors.o Positions.o Source.o
+
+-PCS10 PCS20: $(REUSE)
++# targets
+
+-SUN: $(REUSE)
+- ranlib $(REUSE)
++all: $(REUSE)
+
+ $(REUSE): $(OBJS)
+ ar ruc $(REUSE) $(OBJS)
+ -ranlib $(REUSE)
+
+-install: $(TARGET)
+- install -c -m 664 $(REUSE) $(LIB)
+- -ranlib $(LIB)/$(REUSE)
+- cp *.h $(INCDIR)
+- chmod u+w,a+r $(INCDIR)/*.h
++install: $(REUSE)
++ install -c -m 664 $(REUSE) $(DESTLIB)
++ -ranlib $(DESTLIB)/$(REUSE)
++ cp *.h $(DESTINCDIR)
++ chmod u+w,a+r $(DESTINCDIR)/*.h
++
++clean: cleantest
++ -rm -f *.o *Drv core $(REUSE)
++ -rm -f $(REUSE)
++
++cleantest:
++ -rm -f rMemoryDrv DynArrDrv SetsDrv IdentsDrv StrMemDrv ErrorsDrv
+
+-clean:
+- rm -f *.o *Drv core
+
+ # test programs
+
+@@ -73,7 +68,3 @@
+ ErrorsDrv.o: Errors.h Positions.h Sets.h Idents.h
+ Source.o: Source.h rSystem.h
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-reuse-c-rSystem.c b/devel/cocktail/files/patch-reuse-c-rSystem.c
new file mode 100644
index 000000000000..7005c4b86afa
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-rSystem.c
@@ -0,0 +1,23 @@
+--- ../../work/cocktail-9309//./reuse/c/rSystem.c Tue Feb 15 14:26:43 1994
++++ ./reuse/c/rSystem.c Wed Mar 31 22:35:06 2004
+@@ -17,9 +17,9 @@
+ # include "rSystem.h"
+
+ # ifdef m68000
+-# define hz 50
++# define HZ 50
+ # else
+-# define hz 60
++# define HZ 60
+ # endif
+
+ # ifndef UNIX
+@@ -156,7 +156,7 @@
+ # else
+ struct tms buffer;
+ (void) times (& buffer);
+- return (buffer.tms_utime + buffer.tms_stime) * 1000 / hz;
++ return (buffer.tms_utime + buffer.tms_stime) * 1000 / HZ;
+ # endif
+ }
+
diff --git a/devel/cocktail/files/patch-reuse-m2c-Makefile b/devel/cocktail/files/patch-reuse-m2c-Makefile
new file mode 100644
index 000000000000..d38bf41c9085
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Makefile
@@ -0,0 +1,248 @@
+--- ../../work/cocktail-9309//./reuse/m2c/Makefile Tue Feb 15 14:26:46 1994
++++ ./reuse/m2c/Makefile Wed Mar 31 22:35:06 2004
+@@ -1,9 +1,6 @@
+-OPT = -O
+-UNIX = UNIX
+-CFLAGS = $(OPT) -D$(UNIX)
+-CC = cc
+-M2FLAGS = -c -d/usr/local/lib/mocka/lib -o../m2c
+-# M2FLAGS = -cu -d/usr/local/lib/mocka/lib -o../m2c
++
++.include "../../Makefile.inc"
++
+ SYSTEM = rSystem.o
+
+ OBJS = Checks.o DynArray.o General.o Heap.o IO.o Idents.o Layout.o \
+@@ -13,12 +10,21 @@
+ CLIBS = Arguments.o SYSTEM_.o
+
+
+-libreuse.a : $(OBJS)
+- ar ruc libreuse.a $(OBJS)
+- ranlib libreuse.a
++$(REUSE) : $(OBJS)
++ ar ruc $(REUSE) $(OBJS)
++ ranlib $(REUSE)
++
+
++all : $(REUSE)
+
+-all : $(CLIBS)
++test: DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SysIODrv ErrorsDrv
++
++clean : cleantest
++ rm -f core *.o
++ rm -f $(REUSE)
++
++cleantest:
++ rm -f Main.o DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SysIODrv ErrorsDrv
+
+ # HEAD
+
+@@ -308,190 +314,27 @@
+
+ SYSTEM_.o : SYSTEM_.c SYSTEM_.h
+
+-DynArrDrv : $(SYSTEM) \
+- DynArrDrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- DynArray.o \
+-; $(CC) $(CFLAGS) -o DynArrDrv $(SYSTEM) \
+- DynArrDrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- DynArray.o \
+- $(CLIBS)
+-
+-ErrorsDrv : $(SYSTEM) \
+- ErrorsDrv.o \
+- Errors.o \
+- Strings.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- Sort.o \
+- Sets.o \
+- DynArray.o \
+- Idents.o \
+- StringMem.o \
+- Positions.o \
+-; $(CC) $(CFLAGS) -o ErrorsDrv $(SYSTEM) \
+- ErrorsDrv.o \
+- Errors.o \
+- Strings.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- Sort.o \
+- Sets.o \
+- DynArray.o \
+- Idents.o \
+- StringMem.o \
+- Positions.o \
+- $(CLIBS)
+-
+-IODrv : $(SYSTEM) \
+- IODrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+-; $(CC) $(CFLAGS) -o IODrv $(SYSTEM) \
+- IODrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- $(CLIBS)
+-
+-Main : $(SYSTEM) \
+- Main.o \
+- Times.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- Checks.o \
+- Pack.o \
+- Source.o \
+- Sort.o \
+- Errors.o \
+- Strings.o \
+- Sets.o \
+- DynArray.o \
+- Idents.o \
+- StringMem.o \
+- Positions.o \
+- Layout.o \
+- StdIO.o \
+- RelatsC.o \
+- SetsC.o \
+- Relations.o \
+- Texts.o \
+- Lists.o \
+- Heap.o \
+-; $(CC) $(CFLAGS) -o Main $(SYSTEM) \
+- Main.o \
+- Times.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- Checks.o \
+- Pack.o \
+- Source.o \
+- Sort.o \
+- Errors.o \
+- Strings.o \
+- Sets.o \
+- DynArray.o \
+- Idents.o \
+- StringMem.o \
+- Positions.o \
+- Layout.o \
+- StdIO.o \
+- RelatsC.o \
+- SetsC.o \
+- Relations.o \
+- Texts.o \
+- Lists.o \
+- Heap.o \
+- $(CLIBS)
+-
+-rMemoryDrv : $(SYSTEM) \
+- rMemoryDrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+-; $(CC) $(CFLAGS) -o rMemoryDrv $(SYSTEM) \
+- rMemoryDrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- $(CLIBS)
+-
+-RelDrv : $(SYSTEM) \
+- RelDrv.o \
+- Relations.o \
+- Sets.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- DynArray.o \
+-; $(CC) $(CFLAGS) -o RelDrv $(SYSTEM) \
+- RelDrv.o \
+- Relations.o \
+- Sets.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- DynArray.o \
+- $(CLIBS)
+-
+-SetsDrv : $(SYSTEM) \
+- SetsDrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- Sets.o \
+- DynArray.o \
+-; $(CC) $(CFLAGS) -o SetsDrv $(SYSTEM) \
+- SetsDrv.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- Sets.o \
+- DynArray.o \
+- $(CLIBS)
+-
+-SysIODrv : $(SYSTEM) \
+- SysIODrv.o \
+- Checks.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+-; $(CC) $(CFLAGS) -o SysIODrv $(SYSTEM) \
+- SysIODrv.o \
+- Checks.o \
+- IO.o \
+- rMemory.o \
+- General.o \
+- $(CLIBS)
++DynArrDrv: $(SYSTEM) $(REUSE) DynArrDrv.o
++ $(CC) $(CFLAGS) -o DynArrDrv DynArrDrv.o $(REUSE)
+
+-# TAIL
++ErrorsDrv: $(SYSTEM) $(REUSE) ErrorsDrv.o
++ $(CC) $(CFLAGS) -o ErrorsDrv ErrorsDrv.o $(REUSE)
+
+-clean :
+- rm -f core *.o
++IODrv: $(SYSTEM) $(REUSE) IODrv.o
++ $(CC) $(CFLAGS) -o IODrv IODrv.o $(REUSE)
+
+-CLEAN : clean
+- rm -f libreuse.a
++Main: $(SYSTEM) $(REUSE) Main.o
++ $(CC) $(CFLAGS) -o Main Main.o $(REUSE)
+
+-cleanc :
+- rm -f Main.o DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SysIODrv ErrorsDrv
++rMemoryDrv: $(SYSTEM) $(REUSE) rMemoryDrv.o
++ $(CC) $(CFLAGS) -o rMemoryDrv rMemoryDrv.o $(REUSE)
+
+-.SUFFIXES: .md .mi .h .c .o
++RelDrv: $(SYSTEM) $(REUSE) RelDrv.o
++ $(CC) $(CFLAGS) -o RelDrv RelDrv.o $(REUSE)
+
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
++SetsDrv: $(SYSTEM) SetsDrv.o $(REUSE)
++ $(CC) $(CFLAGS) -o SetsDrv SetsDrv.o $(REUSE)
+
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
++SysIODrv: $(SYSTEM) SysIODrv.o $(REUSE)
++ $(CC) $(CFLAGS) -o SysIODrv SysIODrv.o $(REUSE)
+
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-reuse-m2c-rMemory.c b/devel/cocktail/files/patch-reuse-m2c-rMemory.c
new file mode 100644
index 000000000000..210a288e05bc
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-rMemory.c
@@ -0,0 +1,39 @@
+--- ../../work/cocktail-9309//./reuse/m2c/rMemory.c Tue Feb 15 14:26:55 1994
++++ ./reuse/m2c/rMemory.c Wed Mar 31 22:35:06 2004
+@@ -49,6 +49,10 @@
+ LONGINT ByteCount;
+ # endif
+ {
++# ifdef __FreeBSD__
++ /* FreeBSD is suppossed to have its own proper memory manager */
++ return (ADDRESS)calloc(1,ByteCount);
++# else
+ tBlockPtr BlockPtr, CurrentBlock, PreviousBlock, BestBlock, PredecessorBlock;
+ CARDINAL ChainNumber;
+ LONGINT CurrentBlockSize, BestBlockSize;
+@@ -129,6 +133,7 @@
+ return (ADDRESS)BlockPtr;
+ }
+ }
++#endif
+ }
+
+ void rMemory_Free
+@@ -140,6 +145,9 @@
+ ADDRESS a;
+ # endif
+ {
++#ifdef __FREEBSD__
++ free(a);
++#else
+ tBlockPtr BlockPtr;
+ tLargeBlockRange ChainNumber;
+
+@@ -157,6 +165,7 @@
+ BlockPtr->Size = ByteCount;
+ LargeChain.A[ChainNumber - 6] = (ADDRESS)BlockPtr;
+ }
++#endif
+ }
+
+ void BEGIN_rMemory()
diff --git a/devel/cocktail/files/patch-reuse-m2c-rSystem.c b/devel/cocktail/files/patch-reuse-m2c-rSystem.c
new file mode 100644
index 000000000000..648e5f840fba
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-rSystem.c
@@ -0,0 +1,23 @@
+--- ../../work/cocktail-9309//./reuse/m2c/rSystem.c Tue Feb 15 14:26:46 1994
++++ ./reuse/m2c/rSystem.c Wed Mar 31 22:35:06 2004
+@@ -22,9 +22,9 @@
+ # define tFile int
+
+ # ifdef m68000
+-# define hz 50
++# define HZ 50
+ # else
+-# define hz 60
++# define HZ 60
+ # endif
+
+ /* binary IO */
+@@ -229,7 +229,7 @@
+ # else
+ struct tms buffer;
+ (void) times (& buffer);
+- return (buffer.tms_utime + buffer.tms_stime) * 1000 / hz;
++ return (buffer.tms_utime + buffer.tms_stime) * 1000 / HZ;
+ # endif
+ }
+
diff --git a/devel/cocktail/files/patch-rex-m2c-Makefile b/devel/cocktail/files/patch-rex-m2c-Makefile
new file mode 100644
index 000000000000..770681917248
--- /dev/null
+++ b/devel/cocktail/files/patch-rex-m2c-Makefile
@@ -0,0 +1,72 @@
+--- ../../work/cocktail-9309//./rex/m2c/Makefile Tue Feb 15 14:27:51 1994
++++ ./rex/m2c/Makefile Wed Mar 31 22:59:41 2004
+@@ -1,34 +1,28 @@
+-BIN = $(HOME)/bin
+-LIB = $(HOME)/lib
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
+
+ all : rex
+
+-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
+- chmod a+rx $(BIN)/rex
+- install -c -s -m 755 rex $(LIB)/rex
+- cp ../lib/[Salst]* $(LIB)/rex
+- chmod a+r $(LIB)/rex/[Salst]*
++install: rex rex.sh $(DESTLIB)/rex
++ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
++ $(SED) "s;LIB;$(DESTLIB);g" < rex.sh > $(DESTBIN)/rex
++ chmod a+rx $(DESTBIN)/rex
++ install -c -m 755 rex $(DESTLIB)/rex
++ cp ../lib/[Salst]* $(DESTLIB)/rex
++ chmod a+r $(DESTLIB)/rex/[Salst]*
+
+ # installation directories
+
+-$(LIB)/rex: $(LIB)
+- sh -c "if test ! -d $(LIB)/rex; then mkdir -p $(LIB)/rex; else true; fi"
++$(DESTLIB)/rex: $(DESTLIB)
++ sh -c "if test ! -d $(DESTLIB)/rex; then mkdir -p $(DESTLIB)/rex; else true; fi"
+
++clean:
++ rm -f core *.o
++ rm -f rex
+
+ # HEAD
+
+@@ -198,18 +192,3 @@
+ Scanner.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-rex-src-Makefile b/devel/cocktail/files/patch-rex-src-Makefile
new file mode 100644
index 000000000000..b6b25047e043
--- /dev/null
+++ b/devel/cocktail/files/patch-rex-src-Makefile
@@ -0,0 +1,58 @@
+--- ../../work/cocktail-9309//./rex/src/Makefile Tue Feb 15 14:27:41 1994
++++ ./rex/src/Makefile Wed Mar 31 22:58:56 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
+
diff --git a/devel/cocktail/files/patch-rex-test-Makefile b/devel/cocktail/files/patch-rex-test-Makefile
new file mode 100644
index 000000000000..362f6286d673
--- /dev/null
+++ b/devel/cocktail/files/patch-rex-test-Makefile
@@ -0,0 +1,53 @@
+--- ../../work/cocktail-9309//./rex/test/Makefile Tue Feb 15 14:28:08 1994
++++ ./rex/test/Makefile Wed Mar 31 23:00:23 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-MLIB = ../../reuse/src
+-CFLAGS = -I../../reuse/c
+-CC = cc
+
+ # target language C
+
+@@ -16,7 +12,7 @@
+ Source.o: Source.h
+
+ ScannerDrv.c Scanner.h Scanner.c Source.h Source.c: modula.c
+- rex -sdc1 modula.c;
++ $(REX) -sdc1 modula.c;
+
+ # target language Modula using MOCKA (mc)
+
+@@ -25,7 +21,7 @@
+ make test
+
+ ScannerDrv.mi Scanner.md Scanner.mi Source.md Source.mi: modula.m
+- rex -sdm1 modula.m;
++ $(REX) -sdm1 modula.m;
+
+ # target language Modula using SUN modula compiler (m2c)
+
+@@ -34,7 +30,7 @@
+ make test
+
+ ScannerDrv.mod Scanner.def Scanner.mod Source.def Source.mod: modula.m
+- rex -sdm1 modula.m;
++ $(REX) -sdm1 modula.m;
+
+ # target language Eiffel
+
+@@ -43,7 +39,7 @@
+ make test
+
+ scanner.e scannerdrv.e source.e attribute.e lsarray.e statecontrol.e: modula.e
+- rex -sde1 modula.e;
++ $(REX) -sde1 modula.e;
+
+ test:
+ time ScannerDrv < in
+@@ -58,5 +54,4 @@
+ clean:
+ rm -f Scan* Source* scan* [alst]*.e core
+
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c;
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-rpp-m2c-Makefile b/devel/cocktail/files/patch-rpp-m2c-Makefile
new file mode 100644
index 000000000000..bba6523795b9
--- /dev/null
+++ b/devel/cocktail/files/patch-rpp-m2c-Makefile
@@ -0,0 +1,54 @@
+--- ../../work/cocktail-9309//./rpp/m2c/Makefile Tue Feb 15 14:28:12 1994
++++ ./rpp/m2c/Makefile Wed Mar 31 22:35:06 2004
+@@ -1,24 +1,18 @@
+-BIN = $(HOME)/bin
+-BIN = $(HOME)/bin
+-OPT = -O
+-CC = cc
+
+- # C library (reuse)
+-REUSE = ../../reuse/m2c
++.include "../../Makefile.inc"
+
+- # C libraries
+-CLIBS = $(REUSE)/libreuse.a
+-
+- # options for C compiler
+-CFLAGS = -w -I$(REUSE) $(OPT)
+-
+-M2FLAGS = -c
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIR)
++CLIBS += $(REUSELIB)
+
+ all: rpp
+
+ install: rpp
+- install -c -s -m 755 rpp $(BIN)
++ install -c -s -m 755 rpp $(DESTBIN)
+
++clean:
++ rm -f core *.o
++ rm -f rpp
+
+ # HEAD
+
+@@ -42,18 +36,3 @@
+ Scanner.o \
+ $(CLIBS)
+
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-.SUFFIXES: .md .mi .h .c .o
+-
+-.mi.c:
+- mtc2 $(M2FLAGS) $*.mi;
+-
+-.md.h:
+- mtc2 $(M2FLAGS) $*.md;
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-rpp-src-Makefile b/devel/cocktail/files/patch-rpp-src-Makefile
new file mode 100644
index 000000000000..7bc7296e778d
--- /dev/null
+++ b/devel/cocktail/files/patch-rpp-src-Makefile
@@ -0,0 +1,16 @@
+--- ../../work/cocktail-9309//./rpp/src/Makefile Tue Feb 15 14:28:17 1994
++++ ./rpp/src/Makefile Wed Mar 31 23:00:33 2004
+@@ -1,4 +1,3 @@
+-BIN = $(HOME)/bin
+ SOURCES = Scanner.md Scanner.mi
+
+ all: rpp_boot
+@@ -11,7 +10,7 @@
+ echo p rpp | mc -d ../../reuse/src
+
+ Scanner.md Scanner.mi: rpp.rex
+- rex -d rpp.rex;
++ $(REX) -d rpp.rex;
+
+ install: rpp
+ install -c -s -m 755 rpp $(BIN)/rpp
diff --git a/devel/cocktail/files/patch-specs-Makefile b/devel/cocktail/files/patch-specs-Makefile
new file mode 100644
index 000000000000..404ec346133b
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-Makefile
@@ -0,0 +1,42 @@
+--- ../../work/cocktail-9309//./specs/Makefile Sun Apr 4 18:01:21 2004
++++ ./specs/Makefile Wed Mar 31 22:35:07 2004
+@@ -0,0 +1,39 @@
++
++.include "Makefile.inc"
++
++ROOTDIR = ../
++
++
++all: testc
++
++testc:
++ cd c/ada && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/c && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/cpp && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/modula2 && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/modula2.ell && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/sather && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/sql && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/oberon2 && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
++ cd c/minilax && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR) minilax
++ cd c/wag && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR) minilax
++
++clean:
++ -cd c/ada && $(MAKE) clean
++ -cd c/c && $(MAKE) clean
++ -cd c/cpp && $(MAKE) clean
++ -cd c/modula2 && $(MAKE) clean
++ -cd c/modula2.ell && $(MAKE) clean
++ -cd c/sather && $(MAKE) clean
++ -cd c/sql && $(MAKE) clean
++ -cd c/oberon2 && $(MAKE) clean
++ -cd c/minilax && $(MAKE) clean
++ -cd c/wag && $(MAKE) clean
++ -cd modula/ada && $(MAKE) clean
++ -cd modula/modula2 && $(MAKE) clean
++ -cd modula/modula2.ell && $(MAKE) clean
++ -cd modula/modula3 && $(MAKE) clean
++ -cd modula/oberon && $(MAKE) clean
++ -cd modula/pascal && $(MAKE) clean
++ -cd modula/minilax && $(MAKE) clean
++ -cd modula/wag && $(MAKE) clean
diff --git a/devel/cocktail/files/patch-specs-Makefile.inc b/devel/cocktail/files/patch-specs-Makefile.inc
new file mode 100644
index 000000000000..6fd0a4835796
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-Makefile.inc
@@ -0,0 +1,4 @@
+--- ../../work/cocktail-9309//./specs/Makefile.inc Sun Apr 4 18:01:21 2004
++++ ./specs/Makefile.inc Wed Mar 31 22:35:07 2004
+@@ -0,0 +1 @@
++.include "../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-ada-Makefile b/devel/cocktail/files/patch-specs-c-ada-Makefile
new file mode 100644
index 000000000000..d85fe39bf5be
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-ada-Makefile
@@ -0,0 +1,42 @@
+--- ../../work/cocktail-9309//./specs/c/ada/Makefile Tue Feb 15 14:28:23 1994
++++ ./specs/c/ada/Makefile Wed Mar 31 23:01:55 2004
+@@ -1,22 +1,23 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
++
++HOME ?= $(.CURDIR)/../..
++.include "../../Makefile.inc"
++
++CFLAGS += $(INCDIRC) $(LIBREUSEC)
+
+ ParserDrv: ParserDrv.o Scanner.o Parser.o
+- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -o ParserDrv
+
+ Scanner.rpp Parser.lalr: ada.pars
+ lpp -cxzj ada.pars;
+
+ ada.rex: ada.scan Scanner.rpp
+- rpp < ada.scan > ada.rex;
++ $(RPP) < ada.scan > ada.rex;
+
+ Scanner.h Scanner.c: ada.rex
+- rex -cd ada.rex;
++ $(REX) -cd ada.rex;
+
+ Parser.h Parser.c ParserDrv.c: Parser.lalr
+- lalr -c -d -p -cs Parser.lalr;
++ $(LALR) -c -d -p -cs Parser.lalr;
+
+ ParserDrv.o: Parser.h Scanner.h
+ Parser.o: Parser.h Scanner.h
+@@ -28,7 +29,3 @@
+ clean:
+ rm -f ParserDrv core *.[hco] _Debug ada.rex Parser.lalr Scanner.rpp
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-specs-c-c-Makefile b/devel/cocktail/files/patch-specs-c-c-Makefile
new file mode 100644
index 000000000000..199d771adecb
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-c-Makefile
@@ -0,0 +1,36 @@
+--- ../../work/cocktail-9309//./specs/c/c/Makefile Tue Feb 15 14:28:24 1994
++++ ./specs/c/c/Makefile Wed Mar 31 23:02:22 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR) -g
+-CC = cc
+ OBJS = ParserDrv.o Scanner.o Parser.o Positions.o Errors.o hash.o name-space.o
+
+ ParserDrv: $(OBJS)
+@@ -11,13 +7,13 @@
+ lpp -cxzj c.pars;
+
+ c.rex: c.scan Scanner.rpp
+- rpp < c.scan > c.rex;
++ $(RPP) < c.scan > c.rex;
+
+ Scanner.h Scanner.c: c.rex
+- rex -cd c.rex;
++ $(REX) -cd c.rex;
+
+ Parser.h Parser.c Errors.h Errors.c ParserDrv.c: Parser.lalr
+- lalr -c -d -e -p -cs Parser.lalr;
++ $(LALR) -c -d -e -p -cs Parser.lalr;
+
+ ParserDrv.o: Parser.h Scanner.h
+ Parser.o: Parser.h Scanner.h Errors.h
+@@ -32,7 +28,4 @@
+ rm -f ParserDrv core *.o _Debug Parser.[hc] Scanner.[hc] Errors.[hc] \
+ c.rex Parser.lalr Scanner.rpp ParserDrv.c
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-cpp-Makefile b/devel/cocktail/files/patch-specs-c-cpp-Makefile
new file mode 100644
index 000000000000..4b86adb42acf
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-cpp-Makefile
@@ -0,0 +1,55 @@
+--- ../../work/cocktail-9309//./specs/c/cpp/Makefile Tue Feb 15 14:28:21 1994
++++ ./specs/c/cpp/Makefile Wed Mar 31 23:01:31 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ all: ParserDrv cParserDrv
+
+@@ -12,13 +8,13 @@
+ lpp -cxzj cpp.pars;
+
+ cpp.rex: cpp.scan Scanner.rpp
+- rpp < cpp.scan > cpp.rex;
++ $(RPP) < cpp.scan > cpp.rex;
+
+ Scanner.h Scanner.c: cpp.rex
+- rex -cd cpp.rex;
++ $(REX) -cd cpp.rex;
+
+ Parser.h Parser.c ParserDrv.c: Parser.lalr
+- lalr -c -d -p -cs 300 Parser.lalr;
++ $(LALR) -c -d -p -cs 300 Parser.lalr;
+
+ ParserDrv.o: Parser.h Scanner.h
+ Parser.o: Parser.h Scanner.h
+@@ -32,15 +28,15 @@
+
+ c.rex: cpp.scan cScanner.rpp
+ (echo SCANNER cScanner; rpp cScanner.rpp < cpp.scan) | \
+- sed -e 's/ Attribute/ cScanner_Attribute/' \
++ $(SED) -e 's/ Attribute/ cScanner_Attribute/' \
+ -e 's/TokenPtr/cScanner_TokenPtr/' \
+ -e 's/GetWord/cScanner_GetWord/' > c.rex;
+
+ cScanner.h cScanner.c cScannerSource.h cScannerSource.c: c.rex
+- rex -csd c.rex;
++ $(REX) -csd c.rex;
+
+ cParser.h cParser.c cParserDrv.c: cParser.lalr
+- lalr -c -d -p -cs cParser.lalr;
++ $(LALR) -c -d -p -cs cParser.lalr;
+
+ cParserDrv.o: cParser.h cScanner.h
+ cParser.o: cParser.h cScanner.h
+@@ -53,7 +49,4 @@
+ rm -f core *.[hco] _Debug cParserDrv ParserDrv c.rex cpp.rex \
+ cParser.lalr Parser.lalr cScanner.rpp Scanner.rpp
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-minilax-Makefile b/devel/cocktail/files/patch-specs-c-minilax-Makefile
new file mode 100644
index 000000000000..ef659e3b101a
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-minilax-Makefile
@@ -0,0 +1,190 @@
+--- ../../work/cocktail-9309//./specs/c/minilax/Makefile Tue Feb 15 14:28:44 1994
++++ ./specs/c/minilax/Makefile Wed Mar 31 23:06:11 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ SOURCES = Scanner.h Scanner.c Parser.h Parser.c Tree.h Tree.c \
+ Semantics.h Semantics.c Types.h Types.c Definitions.h Definitions.c \
+@@ -21,31 +17,31 @@
+ lpp -cxzj minilax.pars;
+
+ minilax.rex: minilax.scan Scanner.rpp
+- rpp < minilax.scan > minilax.rex;
++ $(RPP) < minilax.scan > minilax.rex;
+
+ Scanner.h Scanner.c: minilax.rex
+- rex -cd minilax.rex;
++ $(REX) -cd minilax.rex;
+
+ Parser.h Parser.c: Parser.lalr
+- lalr -c -d -g Parser.lalr;
++ $(LALR) -c -d -g Parser.lalr;
+
+ Tree.h Tree.c: minilax.cg
+- cg -cdimRDI0 minilax.cg;
++ $(CG) -cdimRDI0 minilax.cg;
+
+ Semantics.h Semantics.c: minilax.cg
+- cg -cDI0 minilax.cg;
++ $(CG) -cDI0 minilax.cg;
+
+ Definitions.h Definitions.c Definitions.TS: Definitions.cg
+- cg -cdim4 Definitions.cg;
++ $(CG) -cdim4 Definitions.cg;
+
+ Tree.TS: minilax.cg
+- echo SELECT AbstractSyntax Output | cat - minilax.cg | cg -c4
++ echo SELECT AbstractSyntax Output | cat - minilax.cg | $(CG) -c4
+
+ Types.h Types.c: Types.puma Tree.TS
+- puma -cdipk Types.puma;
++ $(PUMA) -cdipk Types.puma;
+
+ ICode.h ICode.c: ICode.puma Tree.TS Definitions.TS
+- puma -cdi ICode.puma;
++ $(PUMA) -cdi ICode.puma;
+
+ Parser.o: Parser.h Scanner.h Tree.h Types.h Definitions.h
+ Semantics.o: Semantics.h Tree.h Definitions.h Types.h
+@@ -59,87 +55,85 @@
+ lint $(CFLAGS) -u *.c
+
+ test: $(SOURCES)
+- cg -cdimRDI0 minilax.cg;
++ $(CG) -cdimRDI0 minilax.cg;
+ make minilax LIB=$(LIB)
+ tcsh -c "time minilax < in5; time minilax < in5; time minilax < in5; time minilax < in5"
+ wc Semantics.c
+ size Semantics.o
+- cg -cdimRDI09 minilax.cg;
++ $(CG) -cdimRDI09 minilax.cg;
+ make minilax LIB=$(LIB)
+ time minilax < in5
+- cg -cdimRDI minilax.cg;
++ $(CG) -cdimRDI minilax.cg;
+ make minilax LIB=$(LIB)
+ tcsh -c "time minilax < in5; time minilax < in5; time minilax < in5; time minilax < in5"
+ wc Semantics.c
+ size Semantics.o
+- cg -cdimRDI9 minilax.cg;
++ $(CG) -cdimRDI9 minilax.cg;
+ make minilax LIB=$(LIB)
+ time minilax < in5
+- cg -cdimRDIL minilax.cg;
++ $(CG) -cdimRDIL minilax.cg;
+ make minilax LIB=$(LIB)
+ tcsh -c "time minilax < in5; time minilax < in5; time minilax < in5; time minilax < in5"
+ wc Semantics.c
+ size Semantics.o
+- cg -cdimRDIL9 minilax.cg;
++ $(CG) -cdimRDIL9 minilax.cg;
+ make minilax LIB=$(LIB)
+ time minilax < in5
+- cg -cdimRDIK minilax.cg;
++ $(CG) -cdimRDIK minilax.cg;
+ make minilax LIB=$(LIB)
+ tcsh -c "time minilax < in5; time minilax < in5; time minilax < in5; time minilax < in5"
+ wc Semantics.c
+ size Semantics.o
+- cg -cdimRDIK9 minilax.cg;
++ $(CG) -cdimRDIK9 minilax.cg;
+ make minilax LIB=$(LIB)
+ time minilax < in5
+
+ test2: $(SOURCES)
+- cg -cdimRD minilax.cg
+- cg -cI minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI0 minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL minilax.cg; make minilax LIB=$(LIB)
+- cg -cIK minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cdimRD0 minilax.cg
+- cg -cI minilax.cg; make minilax LIB=$(LIB)
+- cg -cI0 minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL minilax.cg; make minilax LIB=$(LIB)
+- cg -cIK minilax.cg; make minilax LIB=$(LIB)
+- cg -cdimRDL minilax.cg
+- cg -cI minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI0 minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIK minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cdimRD minilax.cg
++ $(CG) -cI minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI0 minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL minilax.cg; make minilax LIB=$(LIB)
++ $(CG) -cIK minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cdimRD0 minilax.cg
++ $(CG) -cI minilax.cg; make minilax LIB=$(LIB)
++ $(CG) -cI0 minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL minilax.cg; make minilax LIB=$(LIB)
++ $(CG) -cIK minilax.cg; make minilax LIB=$(LIB)
++ $(CG) -cdimRDL minilax.cg
++ $(CG) -cI minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI0 minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIK minilax.cg; make minilax LIB=$(LIB); minilax < in1
+
+ trace: $(SOURCES)
+- cg -cdimRwDI09 minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI09T minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI09YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI09X minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI09Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI09Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cdimRwDI9 minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI9T minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI9YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI9X minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI9Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cI9Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cdimRwDIL9 minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL9T minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL9YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL9X minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL9Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIL9Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cdimRwDIK9 minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIK9T minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIK9YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIK9X minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIK9Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
+- cg -cIK9Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cdimRwDI09 minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI09T minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI09YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI09X minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI09Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI09Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cdimRwDI9 minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI9T minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI9YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI9X minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI9Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cI9Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cdimRwDIL9 minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL9T minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL9YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL9X minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL9Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIL9Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cdimRwDIK9 minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIK9T minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIK9YZ minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIK9X minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIK9Y minilax.cg; make minilax LIB=$(LIB); minilax < in1
++ $(CG) -cIK9Z minilax.cg; make minilax LIB=$(LIB); minilax < in1
+
+ clean:
+- rm -f Scanner.? Parser.? Tree.? Semantics.? Definitions.? Types.? ICode.? *.TS
+- rm -f core _Debug minilax *Tab minilax.rex Parser.lalr Scanner.rpp yy*.w *.o
++ rm -f Scanner.? Parser.? Tree.? Semantics.? Definitions.?
++ rm -f core _Debug minilax *Tab minilax.rex Parser.lalr
++ rm -f Types.? ICode.? *.TS Scanner.rpp yy*.w *.o
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-modula2-Makefile b/devel/cocktail/files/patch-specs-c-modula2-Makefile
new file mode 100644
index 000000000000..e07b0ebf8e71
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-modula2-Makefile
@@ -0,0 +1,36 @@
+--- ../../work/cocktail-9309//./specs/c/modula2/Makefile Tue Feb 15 14:28:29 1994
++++ ./specs/c/modula2/Makefile Wed Mar 31 23:02:48 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ ParserDrv: ParserDrv.o Scanner.o Parser.o
+ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
+@@ -10,13 +6,13 @@
+ lpp -cxzj modula.pars;
+
+ modula.rex: modula.scan Scanner.rpp
+- rpp < modula.scan > modula.rex;
++ $(RPP) < modula.scan > modula.rex;
+
+ Scanner.h Scanner.c: modula.rex
+- rex -cd modula.rex;
++ $(REX) -cd modula.rex;
+
+ Parser.h Parser.c ParserDrv.c: Parser.lalr
+- lalr -c -d -p Parser.lalr;
++ $(LALR) -c -d -p Parser.lalr;
+
+ ParserDrv.o: Parser.h Scanner.h
+ Parser.o: Parser.h Scanner.h
+@@ -28,7 +24,4 @@
+ clean:
+ rm -f core *.[hco] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-modula2.ell-Makefile b/devel/cocktail/files/patch-specs-c-modula2.ell-Makefile
new file mode 100644
index 000000000000..d09402f0da39
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-modula2.ell-Makefile
@@ -0,0 +1,37 @@
+--- ../../work/cocktail-9309//./specs/c/modula2.ell/Makefile Tue Feb 15 14:28:30 1994
++++ ./specs/c/modula2.ell/Makefile Wed Mar 31 23:03:07 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ all: ParserDrv ScannerDrv
+
+@@ -12,7 +8,7 @@
+ Parser.o: Parser.h Scanner.h
+
+ ParserDrv.c Parser.c Parser.h: modula.ell
+- ell -cdip modula.ell;
++ $(ELL) -cdip modula.ell;
+
+ ScannerDrv: ScannerDrv.o Scanner.o
+ $(CC) $(CFLAGS) ScannerDrv.o Scanner.o $(LIB)/libreuse.a -o ScannerDrv
+@@ -21,7 +17,7 @@
+ Scanner.o: Scanner.h
+
+ ScannerDrv.c Scanner.c Scanner.h: modula.rex
+- rex -csd modula.rex;
++ $(REX) -csd modula.rex;
+
+ lint: ParserDrv.c Parser.c Scanner.c
+ lint $(CFLAGS) -b -u *.c
+@@ -29,7 +25,4 @@
+ clean:
+ rm -f *Drv *.[hco] core
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-oberon2-Makefile b/devel/cocktail/files/patch-specs-c-oberon2-Makefile
new file mode 100644
index 000000000000..434ce1ecd050
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-oberon2-Makefile
@@ -0,0 +1,36 @@
+--- ../../work/cocktail-9309//./specs/c/oberon2/Makefile Tue Feb 15 14:28:41 1994
++++ ./specs/c/oberon2/Makefile Wed Mar 31 23:04:25 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ ParserDrv: ParserDrv.o Scanner.o Parser.o
+ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
+@@ -10,13 +6,13 @@
+ lpp -cxzj oberon2.pars;
+
+ oberon2.rex: oberon2.scan Scanner.rpp
+- rpp < oberon2.scan > oberon2.rex;
++ $(RPP) < oberon2.scan > oberon2.rex;
+
+ Scanner.h Scanner.c: oberon2.rex
+- rex -cd oberon2.rex;
++ $(REX) -cd oberon2.rex;
+
+ Parser.h Parser.c ParserDrv.c: Parser.lalr
+- lalr -c -d -p Parser.lalr;
++ $(LALR) -c -d -p Parser.lalr;
+
+ ParserDrv.o: Parser.h Scanner.h
+ Parser.o: Parser.h Scanner.h
+@@ -28,7 +24,4 @@
+ clean:
+ rm -f ParserDrv core *.[hco] _Debug oberon2.rex Parser.lalr Scanner.rpp
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-occam-Makefile b/devel/cocktail/files/patch-specs-c-occam-Makefile
new file mode 100644
index 000000000000..f19707e58802
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-occam-Makefile
@@ -0,0 +1,18 @@
+--- ../../work/cocktail-9309//./specs/c/occam/Makefile Tue Feb 15 14:28:32 1994
++++ ./specs/c/occam/Makefile Wed Mar 31 22:35:08 2004
+@@ -1,6 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CC = cc
+ #
+ # Makefile for occam recogniser - pjmp @ hrc 22/7/86
+ #
+@@ -43,7 +40,4 @@
+ clean:
+ rm -f *.o occam2.c occam.c lex2.h lex.h Parser.h occam occam2
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-sather-Makefile b/devel/cocktail/files/patch-specs-c-sather-Makefile
new file mode 100644
index 000000000000..774dea40ab6c
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-sather-Makefile
@@ -0,0 +1,36 @@
+--- ../../work/cocktail-9309//./specs/c/sather/Makefile Tue Feb 15 14:28:38 1994
++++ ./specs/c/sather/Makefile Wed Mar 31 23:03:31 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ ParserDrv: ParserDrv.o Scanner.o Parser.o
+ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
+@@ -10,13 +6,13 @@
+ lpp -cxzj sather.pars;
+
+ sather.rex: sather.scan Scanner.rpp
+- rpp < sather.scan > sather.rex;
++ $(RPP) < sather.scan > sather.rex;
+
+ Scanner.h Scanner.c: sather.rex
+- rex -cd sather.rex;
++ $(REX) -cd sather.rex;
+
+ Parser.h Parser.c ParserDrv.c: Parser.lalr
+- lalr -c -d -p Parser.lalr;
++ $(LALR) -c -d -p Parser.lalr;
+
+ ParserDrv.o: Parser.h Scanner.h
+ Parser.o: Parser.h Scanner.h
+@@ -28,7 +24,4 @@
+ clean:
+ rm -f core *.[hco] _Debug ParserDrv sather.rex Parser.lalr Scanner.rpp
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-sql-Makefile b/devel/cocktail/files/patch-specs-c-sql-Makefile
new file mode 100644
index 000000000000..79a3aaeaac3f
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-sql-Makefile
@@ -0,0 +1,36 @@
+--- ../../work/cocktail-9309//./specs/c/sql/Makefile Tue Feb 15 14:28:39 1994
++++ ./specs/c/sql/Makefile Wed Mar 31 23:03:58 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ ParserDrv: ParserDrv.o Scanner.o Parser.o
+ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
+@@ -10,13 +6,13 @@
+ lpp -cxzj sql.pars;
+
+ sql.rex: sql.scan Scanner.rpp
+- rpp < sql.scan > sql.rex;
++ $(RPP) < sql.scan > sql.rex;
+
+ Scanner.h Scanner.c: sql.rex
+- rex -cd sql.rex;
++ $(REX) -cd sql.rex;
+
+ Parser.h Parser.c ParserDrv.c: Parser.lalr
+- lalr -c -d -p -cs Parser.lalr;
++ $(LALR) -c -d -p -cs Parser.lalr;
+
+ ParserDrv.o: Parser.h Scanner.h
+ Parser.o: Parser.h Scanner.h
+@@ -28,7 +24,4 @@
+ clean:
+ rm -f ParserDrv core *.[hco] _Debug sql.rex Parser.lalr Scanner.rpp
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-wag-Makefile b/devel/cocktail/files/patch-specs-c-wag-Makefile
new file mode 100644
index 000000000000..36734ab0b3f8
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-c-wag-Makefile
@@ -0,0 +1,110 @@
+--- ../../work/cocktail-9309//./specs/c/wag/Makefile Tue Feb 15 14:28:50 1994
++++ ./specs/c/wag/Makefile Wed Mar 31 23:07:19 2004
+@@ -1,7 +1,3 @@
+-LIB = $(HOME)/lib
+-INCDIR = $(LIB)/include
+-CFLAGS = -I$(INCDIR)
+-CC = cc
+
+ SOURCES = Scanner.h Scanner.c Parser.h Parser.c Tree.h Tree.c Semantics.h Semantics.c \
+ Types.h Types.c ICode.h ICode.c ICodeInter.h ICodeInter.c minilax.c
+@@ -9,8 +5,8 @@
+ OBJS = minilax.o Scanner.o Parser.o Tree.o Types.o Semantics.o ICode.o ICodeInter.o
+
+ all: minilax
+- time minilax < in1
+- time minilax < in5
++ time ./minilax < in1
++ time ./minilax < in1
+
+ minilax: $(OBJS)
+ $(CC) $(CFLAGS) -o minilax $(OBJS) $(LIB)/libreuse.a -lm
+@@ -19,28 +15,28 @@
+ lpp -cxzj minilax.pars;
+
+ minilax.rex: minilax.scan Scanner.rpp
+- rpp < minilax.scan > minilax.rex;
++ $(RPP) < minilax.scan > minilax.rex;
+
+ Scanner.h Scanner.c: minilax.rex
+- rex -cd minilax.rex;
++ $(REX) -cd minilax.rex;
+
+ Parser.h Parser.c: Parser.lalr
+- lalr -c -d Parser.lalr;
++ $(LALR) -c -d Parser.lalr;
+
+ Tree.h Tree.c: minilax.cg
+- cg -cdimRDIL minilax.cg;
++ $(CG) -cdimRDIL minilax.cg;
+
+ Semantics.h Semantics.c: minilax.cg
+- cg -cDIL minilax.cg;
++ $(CG) -cDIL minilax.cg;
+
+ Tree.TS: minilax.cg
+- echo SELECT AbstractSyntax Output | cat - minilax.cg | cg -c4
++ echo SELECT AbstractSyntax Output | cat - minilax.cg | $(CG) -c4
+
+ Types.h Types.c: Types.puma Tree.TS
+- puma -cdipk Types.puma;
++ $(PUMA) -cdipk Types.puma;
+
+ ICode.h ICode.c: ICode.puma Tree.TS
+- puma -cdi ICode.puma;
++ $(PUMA) -cdi ICode.puma;
+
+ Scanner.o: Scanner.h
+ Parser.o: Parser.h Tree.h Scanner.h
+@@ -54,36 +50,34 @@
+ lint $(CFLAGS) -u *.c
+
+ test: $(SOURCES)
+- cg -cdimRDI0 minilax.cg;
++ $(CG) -cdimRDI0 minilax.cg;
+ make minilax LIB=$(LIB)
+- tcsh -c "time minilax < in5; time minilax < in5; time minilax < in5; time minilax < in5"
++ tcsh -c "time ./minilax < in1; time ./minilax < in1; time ./minilax < in1; time ./minilax < in1"
+ wc Semantics.c
+ size Semantics.o
+- cg -cdimRDI09 minilax.cg;
++ $(CG) -cdimRDI09 minilax.cg;
+ make minilax LIB=$(LIB)
+- time minilax < in5
+- cg -cdimRDI minilax.cg;
++ time ./minilax < in1
++ $(CG) -cdimRDI minilax.cg;
+ make minilax LIB=$(LIB)
+- tcsh -c "time minilax < in5; time minilax < in5; time minilax < in5; time minilax < in5"
++ tcsh -c "time ./minilax < in1; time ./minilax < in1; time ./minilax < in1; time ./minilax < in1"
+ wc Semantics.c
+ size Semantics.o
+- cg -cdimRDI9 minilax.cg;
++ $(CG) -cdimRDI9 minilax.cg;
+ make minilax LIB=$(LIB)
+- time minilax < in5
+- cg -cdimRDIL minilax.cg;
++ time ./minilax < in1
++ $(CG) -cdimRDIL minilax.cg;
+ make minilax LIB=$(LIB)
+- tcsh -c "time minilax < in5; time minilax < in5; time minilax < in5; time minilax < in5"
++ tcsh -c "time ./minilax < in1; time ./minilax < in1; time ./minilax < in1; time ./minilax < in1"
+ wc Semantics.c
+ size Semantics.o
+- cg -cdimRDIL9 minilax.cg;
++ $(CG) -cdimRDIL9 minilax.cg;
+ make minilax LIB=$(LIB)
+- time minilax < in5
++ time ./minilax < in1
+
+ clean:
+- rm -f Scanner.? Parser.? Tree.? Semantics.? Types.? ICode.? *.TS yy*.w *.o
++ rm -f Scanner.? Parser.? Tree.? Semantics.?
++ rm -f Types.? ICode.? *.TS yy*.w *.o
+ rm -f core _Debug minilax *Tab minilax.rex Parser.lalr Scanner.rpp
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
++.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-ada-Makefile b/devel/cocktail/files/patch-specs-modula-ada-Makefile
new file mode 100644
index 000000000000..24d97bc8601a
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-ada-Makefile
@@ -0,0 +1,22 @@
+--- ../../work/cocktail-9309//./specs/modula/ada/Makefile Tue Feb 15 14:28:56 1994
++++ ./specs/modula/ada/Makefile Wed Mar 31 23:07:56 2004
+@@ -7,14 +7,16 @@
+ lpp -xzj ada.pars;
+
+ ada.rex: ada.scan Scanner.rpp
+- rpp < ada.scan > ada.rex;
++ $(RPP) < ada.scan > ada.rex;
+
+ Scanner.md Scanner.mi: ada.rex
+- rex -d ada.rex;
++ $(REX) -d ada.rex;
+
+ Parser.md Parser.mi ParserDrv.mi: Parser.lalr
+- lalr -d -p -cs Parser.lalr;
++ $(LALR) -d -p -cs Parser.lalr;
+
+ clean:
+ rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
+ rm -f core *.[dimor] _Debug ada.rex Parser.lalr Scanner.rpp *.bak
++
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-minilax-Makefile b/devel/cocktail/files/patch-specs-modula-minilax-Makefile
new file mode 100644
index 000000000000..c82492b170a9
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-minilax-Makefile
@@ -0,0 +1,153 @@
+--- ../../work/cocktail-9309//./specs/modula/minilax/Makefile Tue Feb 15 14:29:06 1994
++++ ./specs/modula/minilax/Makefile Wed Mar 31 23:11:28 2004
+@@ -15,97 +15,98 @@
+ lpp -xzj minilax.pars;
+
+ minilax.rex: minilax.scan Scanner.rpp
+- rpp < minilax.scan > minilax.rex;
++ $(RPP) < minilax.scan > minilax.rex;
+
+ Scanner.md Scanner.mi: minilax.rex
+- rex -d minilax.rex;
++ $(REX) -d minilax.rex;
+
+ Parser.md Parser.mi: Parser.lalr
+- lalr -d Parser.lalr;
++ $(LALR) -d Parser.lalr;
+
+ Tree.md Tree.mi: minilax.cg
+- cg -dimRDI0 minilax.cg;
++ $(CG) -dimRDI0 minilax.cg;
+
+ Semantics.md Semantics.mi: minilax.cg
+- cg -DI0 minilax.cg;
++ $(CG) -DI0 minilax.cg;
+
+ Definitions.md Definitions.mi Definitions.TS: Definitions.cg
+- cg -dim4 Definitions.cg;
++ $(CG) -dim4 Definitions.cg;
+
+ Tree.TS: minilax.cg
+- echo SELECT AbstractSyntax Output | cat - minilax.cg | cg -4
++ echo SELECT AbstractSyntax Output | cat - minilax.cg | $(CG) -4
+
+ Types.md Types.mi: Types.puma Tree.TS
+- puma -dipk Types.puma;
++ $(PUMA) -dipk Types.puma;
+
+ ICode.md ICode.mi: ICode.puma Tree.TS Definitions.TS
+- puma -di ICode.puma;
++ $(PUMA) -di ICode.puma;
+
+ test: $(SOURCES)
+- cg -dimRDI09 minilax.cg;
++ $(CG) -dimRDI09 minilax.cg;
+ make minilax
+ time minilax < in5
+ wc Semantics.mi
+ size Semantics.o
+- cg -dimRDI9 minilax.cg;
++ $(CG) -dimRDI9 minilax.cg;
+ make minilax
+ time minilax < in5
+ wc Semantics.mi
+ size Semantics.o
+- cg -dimRDIL9 minilax.cg;
++ $(CG) -dimRDIL9 minilax.cg;
+ make minilax
+ time minilax < in5
+ wc Semantics.mi
+ size Semantics.o
+- cg -dimRDIK9 minilax.cg;
++ $(CG) -dimRDIK9 minilax.cg;
+ make minilax
+ time minilax < in5
+ wc Semantics.mi
+ size Semantics.o
+
+ test2: $(SOURCES)
+- cg -dimRD minilax.cg
+- cg -I minilax.cg; make minilax; minilax < in1
+- cg -I0 minilax.cg; make minilax; minilax < in1
+- cg -IL minilax.cg; make minilax
+- cg -IK minilax.cg; make minilax; minilax < in1
+- cg -dimRD0 minilax.cg
+- cg -I minilax.cg; make minilax
+- cg -I0 minilax.cg; make minilax; minilax < in1
+- cg -IL minilax.cg; make minilax
+- cg -IK minilax.cg; make minilax
+- cg -dimRDL minilax.cg
+- cg -I minilax.cg; make minilax; minilax < in1
+- cg -I0 minilax.cg; make minilax; minilax < in1
+- cg -IL minilax.cg; make minilax; minilax < in1
+- cg -IK minilax.cg; make minilax; minilax < in1
++ $(CG) -dimRD minilax.cg
++ $(CG) -I minilax.cg; make minilax; minilax < in1
++ $(CG) -I0 minilax.cg; make minilax; minilax < in1
++ $(CG) -IL minilax.cg; make minilax
++ $(CG) -IK minilax.cg; make minilax; minilax < in1
++ $(CG) -dimRD0 minilax.cg
++ $(CG) -I minilax.cg; make minilax
++ $(CG) -I0 minilax.cg; make minilax; minilax < in1
++ $(CG) -IL minilax.cg; make minilax
++ $(CG) -IK minilax.cg; make minilax
++ $(CG) -dimRDL minilax.cg
++ $(CG) -I minilax.cg; make minilax; minilax < in1
++ $(CG) -I0 minilax.cg; make minilax; minilax < in1
++ $(CG) -IL minilax.cg; make minilax; minilax < in1
++ $(CG) -IK minilax.cg; make minilax; minilax < in1
+
+ trace: $(SOURCES)
+- cg -dimRwDI09 minilax.cg; make minilax; minilax < in1
+- cg -I09T minilax.cg; make minilax; minilax < in1
+- cg -I09YZ minilax.cg; make minilax; minilax < in1
+- cg -I09X minilax.cg; make minilax; minilax < in1
+- cg -I09Y minilax.cg; make minilax; minilax < in1
+- cg -I09Z minilax.cg; make minilax; minilax < in1
+- cg -dimRwDI9 minilax.cg; make minilax; minilax < in1
+- cg -I9T minilax.cg; make minilax; minilax < in1
+- cg -I9YZ minilax.cg; make minilax; minilax < in1
+- cg -I9X minilax.cg; make minilax; minilax < in1
+- cg -I9Y minilax.cg; make minilax; minilax < in1
+- cg -I9Z minilax.cg; make minilax; minilax < in1
+- cg -dimRwDIL9 minilax.cg; make minilax; minilax < in1
+- cg -IL9T minilax.cg; make minilax; minilax < in1
+- cg -IL9YZ minilax.cg; make minilax; minilax < in1
+- cg -IL9X minilax.cg; make minilax; minilax < in1
+- cg -IL9Y minilax.cg; make minilax; minilax < in1
+- cg -IL9Z minilax.cg; make minilax; minilax < in1
+- cg -dimRwDIK9 minilax.cg; make minilax; minilax < in1
+- cg -IK9T minilax.cg; make minilax; minilax < in1
+- cg -IK9YZ minilax.cg; make minilax; minilax < in1
+- cg -IK9X minilax.cg; make minilax; minilax < in1
+- cg -IK9Y minilax.cg; make minilax; minilax < in1
+- cg -IK9Z minilax.cg; make minilax; minilax < in1
++ $(CG) -dimRwDI09 minilax.cg; make minilax; minilax < in1
++ $(CG) -I09T minilax.cg; make minilax; minilax < in1
++ $(CG) -I09YZ minilax.cg; make minilax; minilax < in1
++ $(CG) -I09X minilax.cg; make minilax; minilax < in1
++ $(CG) -I09Y minilax.cg; make minilax; minilax < in1
++ $(CG) -I09Z minilax.cg; make minilax; minilax < in1
++ $(CG) -dimRwDI9 minilax.cg; make minilax; minilax < in1
++ $(CG) -I9T minilax.cg; make minilax; minilax < in1
++ $(CG) -I9YZ minilax.cg; make minilax; minilax < in1
++ $(CG) -I9X minilax.cg; make minilax; minilax < in1
++ $(CG) -I9Y minilax.cg; make minilax; minilax < in1
++ $(CG) -I9Z minilax.cg; make minilax; minilax < in1
++ $(CG) -dimRwDIL9 minilax.cg; make minilax; minilax < in1
++ $(CG) -IL9T minilax.cg; make minilax; minilax < in1
++ $(CG) -IL9YZ minilax.cg; make minilax; minilax < in1
++ $(CG) -IL9X minilax.cg; make minilax; minilax < in1
++ $(CG) -IL9Y minilax.cg; make minilax; minilax < in1
++ $(CG) -IL9Z minilax.cg; make minilax; minilax < in1
++ $(CG) -dimRwDIK9 minilax.cg; make minilax; minilax < in1
++ $(CG) -IK9T minilax.cg; make minilax; minilax < in1
++ $(CG) -IK9YZ minilax.cg; make minilax; minilax < in1
++ $(CG) -IK9X minilax.cg; make minilax; minilax < in1
++ $(CG) -IK9Y minilax.cg; make minilax; minilax < in1
++ $(CG) -IK9Z minilax.cg; make minilax; minilax < in1
+
+ clean:
+ rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Definitions.m? Types.m? ICode.m?
+ rm -f core *.TS *.bak *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-modula2-Makefile b/devel/cocktail/files/patch-specs-modula-modula2-Makefile
new file mode 100644
index 000000000000..e6a3edd15bb4
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-modula2-Makefile
@@ -0,0 +1,21 @@
+--- ../../work/cocktail-9309//./specs/modula/modula2/Makefile Tue Feb 15 14:28:58 1994
++++ ./specs/modula/modula2/Makefile Wed Mar 31 23:08:24 2004
+@@ -10,14 +10,15 @@
+ lpp -xzj modula.pars;
+
+ modula.rex: modula.scan Scanner.rpp
+- rpp < modula.scan > modula.rex;
++ $(RPP) < modula.scan > modula.rex;
+
+ Scanner.md Scanner.mi: modula.rex
+- rex -d modula.rex;
++ $(REX) -d modula.rex;
+
+ Parser.md Parser.mi ParserDrv.mi: Parser.lalr
+- lalr -d -p Parser.lalr;
++ $(LALR) -d -p Parser.lalr;
+
+ clean:
+ rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
+ rm -f core *.[dimor] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile b/devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile
new file mode 100644
index 000000000000..8bd1cff9784c
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile
@@ -0,0 +1,16 @@
+--- ../../work/cocktail-9309//./specs/modula/modula2.ell/Makefile Tue Feb 15 14:29:00 1994
++++ ./specs/modula/modula2.ell/Makefile Wed Mar 31 23:08:43 2004
+@@ -5,10 +5,11 @@
+ echo p ParserDrv | mc
+
+ Scanner.md Scanner.mi ScannerDrv.mi: modula.rex
+- rex -sd modula.rex;
++ $(REX) -sd modula.rex;
+
+ Parser.md Parser.mi ParserDrv.mi: modula.ell
+- ell -dip modula.ell;
++ $(ELL) -dip modula.ell;
+
+ clean:
+ rm -f *Drv *.m? *.[dimor] _Debug core *.bak
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-modula3-Makefile b/devel/cocktail/files/patch-specs-modula-modula3-Makefile
new file mode 100644
index 000000000000..d978263e1db8
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-modula3-Makefile
@@ -0,0 +1,21 @@
+--- ../../work/cocktail-9309//./specs/modula/modula3/Makefile Tue Feb 15 14:29:02 1994
++++ ./specs/modula/modula3/Makefile Wed Mar 31 23:09:06 2004
+@@ -8,14 +8,15 @@
+ lpp -xzj modula3.pars;
+
+ modula3.rex: modula3.scan Scanner.rpp
+- rpp < modula3.scan > modula3.rex;
++ $(RPP) < modula3.scan > modula3.rex;
+
+ Scanner.md Scanner.mi: modula3.rex
+- rex -d modula3.rex;
++ $(REX) -d modula3.rex;
+
+ Parser.md Parser.mi ParserDrv.mi: Parser.lalr
+- lalr -d -p Parser.lalr;
++ $(LALR) -d -p Parser.lalr;
+
+ clean:
+ rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
+ rm -f core *.[dimor] _Debug ParserDrv modula3.rex Parser.lalr Scanner.rpp
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-oberon-Makefile b/devel/cocktail/files/patch-specs-modula-oberon-Makefile
new file mode 100644
index 000000000000..7fb7f91e4d75
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-oberon-Makefile
@@ -0,0 +1,21 @@
+--- ../../work/cocktail-9309//./specs/modula/oberon/Makefile Tue Feb 15 14:29:03 1994
++++ ./specs/modula/oberon/Makefile Wed Mar 31 23:09:51 2004
+@@ -8,14 +8,15 @@
+ lpp -xzj oberon.pars;
+
+ oberon.rex: oberon.scan Scanner.rpp
+- rpp < oberon.scan > oberon.rex;
++ $(RPP) < oberon.scan > oberon.rex;
+
+ Scanner.md Scanner.mi: oberon.rex
+- rex -d oberon.rex;
++ $(REX) -d oberon.rex;
+
+ Parser.md Parser.mi ParserDrv.mi: Parser.lalr
+- lalr -d -p Parser.lalr;
++ $(LALR) -d -p Parser.lalr;
+
+ clean:
+ rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
+ rm -f core *.[dimor] _Debug oberon.rex Parser.lalr Scanner.rpp *.bak
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-pascal-Makefile b/devel/cocktail/files/patch-specs-modula-pascal-Makefile
new file mode 100644
index 000000000000..64e14e8f6439
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-pascal-Makefile
@@ -0,0 +1,21 @@
+--- ../../work/cocktail-9309//./specs/modula/pascal/Makefile Tue Feb 15 14:29:04 1994
++++ ./specs/modula/pascal/Makefile Wed Mar 31 23:10:16 2004
+@@ -8,14 +8,15 @@
+ lpp -xzj pascal.pars;
+
+ pascal.rex: pascal.scan Scanner.rpp
+- rpp < pascal.scan > pascal.rex;
++ $(RPP) < pascal.scan > pascal.rex;
+
+ Scanner.md Scanner.mi: pascal.rex
+- rex -d pascal.rex;
++ $(REX) -d pascal.rex;
+
+ Parser.md Parser.mi ParserDrv.mi: Parser.lalr
+- lalr -d -p Parser.lalr;
++ $(LALR) -d -p Parser.lalr;
+
+ clean:
+ rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
+ rm -f core *.[dimor] _Debug pascal.rex Parser.lalr Scanner.rpp *.bak
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-wag-Makefile b/devel/cocktail/files/patch-specs-modula-wag-Makefile
new file mode 100644
index 000000000000..609e2f33bd4e
--- /dev/null
+++ b/devel/cocktail/files/patch-specs-modula-wag-Makefile
@@ -0,0 +1,41 @@
+--- ../../work/cocktail-9309//./specs/modula/wag/Makefile Tue Feb 15 14:29:10 1994
++++ ./specs/modula/wag/Makefile Wed Mar 31 23:13:13 2004
+@@ -18,29 +18,30 @@
+ lpp -xzj minilax.pars;
+
+ minilax.rex: minilax.scan Scanner.rpp
+- rpp < minilax.scan > minilax.rex;
++ $(RPP) < minilax.scan > minilax.rex;
+
+ Scanner.md Scanner.mi: minilax.rex
+- rex -d minilax.rex;
++ $(REX) -d minilax.rex;
+
+ Parser.md Parser.mi: Parser.lalr
+- lalr -d Parser.lalr;
++ $(LALR) -d Parser.lalr;
+
+ Tree.md Tree.mi: minilax.cg
+- cg -dimRDIL minilax.cg;
++ $(CG) -dimRDIL minilax.cg;
+
+ Semantics.md Semantics.mi: minilax.cg
+- cg -DIL minilax.cg;
++ $(CG) -DIL minilax.cg;
+
+ Tree.TS: minilax.cg
+- echo SELECT AbstractSyntax Output | cat - minilax.cg | cg -4
++ echo SELECT AbstractSyntax Output | cat - minilax.cg | $(CG) -4
+
+ Types.md Types.mi: Types.puma Tree.TS
+- puma -dipk Types.puma;
++ $(PUMA) -dipk Types.puma;
+
+ ICode.md ICode.mi: ICode.puma Tree.TS
+- puma -di ICode.puma;
++ $(PUMA) -di ICode.puma;
+
+ clean:
+ rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Types.m? ICode.m? *.TS *.bak
+ rm -f core *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
++.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-y2l-src-Makefile b/devel/cocktail/files/patch-y2l-src-Makefile
new file mode 100644
index 000000000000..c2c49d11969b
--- /dev/null
+++ b/devel/cocktail/files/patch-y2l-src-Makefile
@@ -0,0 +1,48 @@
+--- ../../work/cocktail-9309//./y2l/src/Makefile Tue Feb 15 14:29:16 1994
++++ ./y2l/src/Makefile Wed Mar 31 23:13:47 2004
+@@ -1,26 +1,28 @@
+-BIN = $(HOME)/bin
+-OPT = -O
+-CC = cc
+-REUSE = ../../reuse/c
+-CFLAGS = -w -I$(REUSE) $(OPT)
++
++.include "../../Makefile.inc"
++
++ROOTDIR = ../..
++CFLAGS += -I$(INCDIRC)
++CLIBS += $(REUSELIBC)
++
+ OBJS = y2l.o Parser.o Scanner.o Tables.o
+ SOURCES = Scanner.h Scanner.c Parser.h Parser.c
+
+ # targets
+
+ y2l: $(OBJS)
+- $(CC) -o y2l $(CFLAGS) $(OBJS) $(REUSE)/libreuse.a
++ $(CC) -o y2l $(CFLAGS) $(OBJS) $(CLIBS)
+
+ sources: $(SOURCES)
+
+ Scanner.h Scanner.c: yacc.rex
+- rex -cd yacc.rex;
++ $(REX) -cd yacc.rex;
+
+ Parser.h Parser.c: yacc.lalr
+- lalr -b -c -d yacc.lalr;
++ $(LALR) -b -c -d yacc.lalr;
+
+ install: y2l
+- install -c -s -m 755 y2l $(BIN)
++ install -c -s -m 755 y2l $(DESTBIN)
+
+ lint: y2l.c Parser.c Scanner.c Tables.c
+ lint -I$(REUSE) -b -u *.c
+@@ -43,7 +45,3 @@
+ man:
+ nroff -man y2l.1
+
+-.SUFFIXES: .c .o
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-y2l-src-Scanner.c b/devel/cocktail/files/patch-y2l-src-Scanner.c
new file mode 100644
index 000000000000..ce5be7d217aa
--- /dev/null
+++ b/devel/cocktail/files/patch-y2l-src-Scanner.c
@@ -0,0 +1,158 @@
+--- ../../work/cocktail-9309//./y2l/src/Scanner.c Tue Feb 15 14:29:16 1994
++++ ./y2l/src/Scanner.c Wed Mar 31 23:32:57 2004
+@@ -1,4 +1,4 @@
+-/* $Id: Scanner.c,v 2.20 1993/08/31 14:47:10 grosch rel $ */
++/* $Id: Scanner.c,v 2.19 1993/08/18 17:28:53 grosch rel $ */
+
+ # define bool char
+ # define true 1
+@@ -78,8 +78,7 @@
+ tScanAttribute Attribute ;
+ void (* Scanner_Exit) () = yyExit;
+
+-static yyCombType yyComb [yyTableSize + 1] = {
+-{0, 0},
++static yyCombType yyComb [yyTableSize + 1] = {{1, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+@@ -2503,7 +2502,7 @@
+ {0, 0},
+ {0, 0},
+ };
+-static yyCombType * yyBasePtr [yyDStateCount + 1] = { 0,
++static yyCombType * yyBasePtr [yyDStateCount + 1] = {& yyComb [0],
+ & yyComb [0],
+ & yyComb [0],
+ & yyComb [125],
+@@ -2658,7 +2657,7 @@
+ & yyComb [201],
+ & yyComb [0],
+ };
+-static yyStateRange yyDefault [yyDStateCount + 1] = { 0,
++static yyStateRange yyDefault [yyDStateCount + 1] = {0,
+ 28,
+ 1,
+ 19,
+@@ -2813,7 +2812,7 @@
+ 59,
+ 0,
+ };
+-static yyStateRange yyEobTrans [yyDStateCount + 1] = { 0,
++static yyStateRange yyEobTrans [yyDStateCount + 1] = {0,
+ 0,
+ 0,
+ 49,
+@@ -2969,27 +2968,21 @@
+ 0,
+ };
+
+-static yyStateRange yyInitStateStack [yyInitBufferSize] = {yyDefaultState};
++static yyStateRange yyInitStateStack [yyInitBufferSize] = {0};
+ static yyStateRange * yyStateStack = yyInitStateStack;
+ static unsigned long yyStateStackSize= yyInitBufferSize;
+-static yyStateRange yyStartState = STD;
+-static yyStateRange yyPreviousStart = STD;
++static yyStateRange yyStartState = 0;
++static yyStateRange yyPreviousStart = 1;
+
+-static unsigned char yyInitChBuffer [yyInitBufferSize] = {
+- '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
+- '\0', '\0', '\0', '\0', '\0', '\0', '\0', yyEolCh,
+- yyEobCh, '\0',
+-};
+-static short yySourceFile = StdIn;
+-static bool yyIsFirstCall = true;
+-static bool yyEof = false;
+-static unsigned char * yyChBufferPtr = yyInitChBuffer;
+-static unsigned char * yyChBufferStart = & yyInitChBuffer [16];
+-static unsigned long yyChBufferSize = yyInitBufferSize;
+-static unsigned char * yyChBufferIndex = & yyInitChBuffer [16];
+-static int yyBytesRead = 0;
+-static int yyLineCount = 1;
+-static unsigned char * yyLineStart = & yyInitChBuffer [16 - 1];
++static short yySourceFile ;
++static bool yyEof ;
++static unsigned char * yyChBufferPtr ;
++static unsigned char * yyChBufferStart ;
++static unsigned long yyChBufferSize ;
++static unsigned char * yyChBufferIndex = ((unsigned char *) yyComb) + 2; /* dirty trick */
++static int yyBytesRead ;
++static int yyLineCount ;
++static unsigned char * yyLineStart ;
+
+ static struct {
+ short yySourceFile ;
+@@ -3001,7 +2994,7 @@
+ int yyBytesRead ;
+ int yyLineCount ;
+ unsigned char * yyLineStart ;
+- } yyFileStack [yyFileStackSize + 1], * yyFileStackPtr = & yyFileStack [1];
++ } yyFileStack [yyFileStackSize + 1], * yyFileStackPtr = yyFileStack;
+
+ static unsigned char yyToLower [] = {
+ '\0', '\1', '\2', '\3', '\4', '\5', '\6', '\7',
+@@ -3061,6 +3054,7 @@
+ '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
+ };
+
++static void yyInitialize ();
+ static void yyErrorMessage ARGS((int yyErrorCode));
+ static char input ();
+ /* line 29 "yacc.rex" */
+@@ -3691,7 +3685,9 @@
+ }
+ goto yyBegin;
+
+- case yyDNoState:
++ case yyDNoState: /* automatic initialization */
++ yyInitialize ();
++ yySourceFile = StdIn;
+ goto yyBegin;
+
+ case 60:
+@@ -3766,6 +3762,18 @@
+ }
+ }
+
++void BeginFile
++# if defined __STDC__ | defined __cplusplus
++ (char * yyFileName)
++# else
++ (yyFileName) char * yyFileName;
++# endif
++ {
++ yyInitialize ();
++ yySourceFile = BeginSource (yyFileName);
++ if (yySourceFile < 0) yyErrorMessage (4);
++ }
++
+ static void yyInitialize ()
+ {
+ if (yyFileStackPtr >= yyFileStack + yyFileStackSize) yyErrorMessage (2);
+@@ -3792,23 +3800,8 @@
+ yyBytesRead = 0;
+ yyLineCount = 1;
+ yyLineStart = & yyChBufferStart [-1];
+- }
+-
+-void BeginFile
+-# if defined __STDC__ | defined __cplusplus
+- (char * yyFileName)
+-# else
+- (yyFileName) char * yyFileName;
+-# endif
+- {
+- if (yyIsFirstCall) {
+- ReleaseArray ((char * *) & yyChBufferPtr, & yyChBufferSize, sizeof (char));
+- yyFileStackPtr --;
+- yyIsFirstCall = false;
+- }
+- yyInitialize ();
+- yySourceFile = BeginSource (yyFileName);
+- if (yySourceFile < 0) yyErrorMessage (4);
++ if (yyStartState == 0) yyStartState = STD;
++ yyStateStack [0] = yyDefaultState; /* stack underflow sentinel */
+ }
+
+ void CloseFile ()
diff --git a/devel/cocktail/pkg-descr b/devel/cocktail/pkg-descr
new file mode 100644
index 000000000000..3fda3e4e1ac9
--- /dev/null
+++ b/devel/cocktail/pkg-descr
@@ -0,0 +1,10 @@
+Cocktail is a set of program generators or compiler construction tools
+for nearly all phases of a compiler. It has been developed until 1993
+at the Karlsruhe research lab of GMD, the German National Research Center
+for Information Technology.
+
+http://www.first.gmd.de/cocktail
+
+Commercial and more recent tools:
+WWW: http://www.cocolab.de
+.
diff --git a/devel/cocktail/pkg-plist b/devel/cocktail/pkg-plist
new file mode 100644
index 000000000000..4c1a2a376c6c
--- /dev/null
+++ b/devel/cocktail/pkg-plist
@@ -0,0 +1,113 @@
+bin/rex
+bin/bnf
+bin/ell
+bin/lalr
+bin/l2r
+bin/y2l
+bin/r2l
+bin/l2cg
+bin/rpp
+bin/cg
+bin/ag
+bin/ast
+bin/gmdcpp
+bin/gmdupd
+bin/gmdrm
+bin/lpp
+bin/puma
+bin/estra
+bin/mtc
+libexec/cocktail/libreuse.a
+libexec/cocktail/rex/rex
+libexec/cocktail/rex/ScanDrv.c
+libexec/cocktail/rex/source.e
+libexec/cocktail/rex/scanner.e
+libexec/cocktail/rex/scanner.doc
+libexec/cocktail/rex/scandrv.e
+libexec/cocktail/rex/scanattribute.e
+libexec/cocktail/rex/lsarray.e
+libexec/cocktail/rex/attribute.e
+libexec/cocktail/rex/Source.mod
+libexec/cocktail/rex/Source.mi
+libexec/cocktail/rex/Source.md
+libexec/cocktail/rex/Source.h
+libexec/cocktail/rex/Source.def
+libexec/cocktail/rex/Source.c
+libexec/cocktail/rex/Scanner.mod
+libexec/cocktail/rex/Scanner.mi
+libexec/cocktail/rex/Scanner.md
+libexec/cocktail/rex/Scanner.h
+libexec/cocktail/rex/Scanner.def
+libexec/cocktail/rex/Scanner.c
+libexec/cocktail/rex/ScanDrv.mod
+libexec/cocktail/rex/ScanDrv.mi
+libexec/cocktail/rex/statecontrol.e
+libexec/cocktail/lalr/ErrorTab
+libexec/cocktail/lalr/bnf
+libexec/cocktail/lalr/lalr
+libexec/cocktail/lalr/ParserDrv.mi
+libexec/cocktail/lalr/sets.e
+libexec/cocktail/lalr/scanner.e
+libexec/cocktail/lalr/parserdrv.e
+libexec/cocktail/lalr/parser.e
+libexec/cocktail/lalr/lsarray.e
+libexec/cocktail/lalr/errors.e
+libexec/cocktail/lalr/scanattribute.e
+libexec/cocktail/lalr/attribute.e
+libexec/cocktail/lalr/Scanner.h
+libexec/cocktail/lalr/Scanner.c
+libexec/cocktail/lalr/Errors.h
+libexec/cocktail/lalr/Errors.c
+libexec/cocktail/lalr/Parser.h
+libexec/cocktail/lalr/Parser.c
+libexec/cocktail/lalr/ParserDrv.c
+libexec/cocktail/lalr/Scanner.mi
+libexec/cocktail/lalr/Scanner.md
+libexec/cocktail/lalr/Errors.mi
+libexec/cocktail/lalr/Errors.md
+libexec/cocktail/lalr/Parser.mi
+libexec/cocktail/lalr/bnf.cat
+libexec/cocktail/lalr/Parser.md
+libexec/cocktail/lalr/statecontrol.e
+libexec/cocktail/lalr/lalr.cat
+libexec/cocktail/lalr/bnf.syn
+libexec/cocktail/lalr/lalr.syn
+libexec/cocktail/ell/ell
+libexec/cocktail/ell/ErrorTab
+libexec/cocktail/r2l/r2l
+libexec/cocktail/l2cg/l2cg
+libexec/cocktail/cg/cg
+libexec/cocktail/cg/TypeTab.c
+libexec/cocktail/cg/TypeTab.m
+libexec/cocktail/puma/puma
+libexec/cocktail/puma/TypeTab.c
+libexec/cocktail/puma/TypeTab.m
+libexec/cocktail/estra/estra
+libexec/cocktail/estra/ErrorTab
+libexec/cocktail/mtc/Arguments.c
+libexec/cocktail/mtc/Arguments.h
+libexec/cocktail/mtc/SYSTEM_.c
+libexec/cocktail/mtc/SYSTEM_.h
+include/cocktail/DynArray.h
+include/cocktail/rSystem.h
+include/cocktail/rMemory.h
+include/cocktail/Time.h
+include/cocktail/StringMem.h
+include/cocktail/Source.h
+include/cocktail/Sets.h
+include/cocktail/Positions.h
+include/cocktail/Idents.h
+include/cocktail/General.h
+include/cocktail/Errors.h
+include/cocktail/ratc.h
+@dirrm libexec/cocktail/rex
+@dirrm libexec/cocktail/lalr
+@dirrm libexec/cocktail/ell
+@dirrm libexec/cocktail/r2l
+@dirrm libexec/cocktail/l2cg
+@dirrm libexec/cocktail/cg
+@dirrm libexec/cocktail/puma
+@dirrm libexec/cocktail/estra
+@dirrm libexec/cocktail/mtc/
+@dirrm libexec/cocktail
+@dirrm include/cocktail