From f6c43b95efb472e631aa3b93accf837f01b92477 Mon Sep 17 00:00:00 2001 From: David Given Date: Tue, 14 May 2013 22:24:38 +0100 Subject: [PATCH] Modula-2 now works. --HG-- branch : dtrg-buildsystem rename : lang/pc/build.mk => lang/m2/build.mk rename : lang/pc/libpc/build.mk => lang/m2/comp/build.mk rename : lang/pc/libpc/build.mk => lang/m2/libm2/build.mk --- Makefile | 1 + lang/m2/build.mk | 3 + lang/m2/comp/LLlex.c | 5 +- lang/m2/comp/LLmessage.c | 1 + lang/m2/comp/build.mk | 129 ++++++++++++++++++++++++++++++++++++++ lang/m2/comp/casestat.C | 3 +- lang/m2/comp/chk_expr.c | 3 +- lang/m2/comp/code.c | 2 +- lang/m2/comp/cstoper.c | 4 +- lang/m2/comp/debug.h | 2 - lang/m2/comp/declar.g | 3 +- lang/m2/comp/def.c | 1 + lang/m2/comp/defmodule.c | 1 + lang/m2/comp/desig.c | 2 +- lang/m2/comp/enter.c | 2 +- lang/m2/comp/error.c | 4 +- lang/m2/comp/expression.g | 1 + lang/m2/comp/idf.c | 1 + lang/m2/comp/input.c | 1 + lang/m2/comp/input.h | 2 - lang/m2/comp/lookup.c | 1 + lang/m2/comp/main.c | 3 +- lang/m2/comp/misc.c | 1 + lang/m2/comp/node.c | 1 + lang/m2/comp/options.c | 7 +-- lang/m2/comp/program.g | 3 +- lang/m2/comp/scope.C | 1 + lang/m2/comp/stab.c | 2 +- lang/m2/comp/statement.g | 1 + lang/m2/comp/tmpvar.C | 1 + lang/m2/comp/tokenname.c | 1 + lang/m2/comp/type.H | 4 -- lang/m2/comp/type.c | 4 +- lang/m2/comp/typequiv.c | 2 +- lang/m2/comp/walk.c | 5 +- lang/m2/comp/walk.h | 2 - lang/m2/libm2/build.mk | 103 ++++++++++++++++++++++++++++++ lib/descr/fe | 2 +- 38 files changed, 267 insertions(+), 48 deletions(-) create mode 100644 lang/m2/build.mk create mode 100644 lang/m2/comp/build.mk create mode 100644 lang/m2/libm2/build.mk diff --git a/Makefile b/Makefile index 5e21f2e73..4188b584e 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,7 @@ include util/topgen/build.mk include lang/cem/build.mk include lang/basic/build.mk include lang/pc/build.mk +include lang/m2/build.mk include mach/proto/as/build.mk include mach/proto/ncg/build.mk diff --git a/lang/m2/build.mk b/lang/m2/build.mk new file mode 100644 index 000000000..9d3f87be8 --- /dev/null +++ b/lang/m2/build.mk @@ -0,0 +1,3 @@ +include lang/m2/libm2/build.mk +include lang/m2/comp/build.mk + diff --git a/lang/m2/comp/LLlex.c b/lang/m2/comp/LLlex.c index edd166490..c118e997a 100644 --- a/lang/m2/comp/LLlex.c +++ b/lang/m2/comp/LLlex.c @@ -13,10 +13,8 @@ #include #include +#include "parameters.h" #include "debug.h" -#include "idfsize.h" -#include "numsize.h" -#include "strsize.h" #include "alloc.h" #include "em_arith.h" @@ -32,7 +30,6 @@ #include "def.h" #include "type.h" #include "warning.h" -#include "errout.h" extern char *getwdir(); diff --git a/lang/m2/comp/LLmessage.c b/lang/m2/comp/LLmessage.c index f8bc0cc43..673083f0b 100644 --- a/lang/m2/comp/LLmessage.c +++ b/lang/m2/comp/LLmessage.c @@ -19,6 +19,7 @@ #include #include +#include "parameters.h" #include "idf.h" #include "LLlex.h" #include "Lpars.h" diff --git a/lang/m2/comp/build.mk b/lang/m2/comp/build.mk new file mode 100644 index 000000000..a3be0ee7a --- /dev/null +++ b/lang/m2/comp/build.mk @@ -0,0 +1,129 @@ +D := lang/m2/comp + +define build-m2-allocd-header +$2: $1 $D/make.allocd + @echo ALLOCD $$@ + @mkdir -p $$(dir $$@) + $(hide) $D/make.allocd < $$^ > $$@ + +$(eval CLEANABLES += $2) +$(eval $q: $2) +endef + +define build-m2-next +$(eval CLEANABLES += $(OBJDIR)/$D/next.c) +$(OBJDIR)/$D/next.c: $D/make.next $1 + @echo NEXT $$@ + @mkdir -p $$(dir $$@) + $(hide) $$^ > $$@ +$(call cfile, $(OBJDIR)/$D/next.c) + +$(foreach f, $1, $(call build-m2-allocd-header, \ + $f, $(OBJDIR)/$(basename $f).h)) +endef + +define build-m2-impl + +$(call reset) +$(eval cflags += -I$(OBJDIR)/$D -I$D) + +$(call cfile, $D/LLlex.c) +$(call cfile, $D/LLmessage.c) +$(call cfile, $D/chk_expr.c) +$(call cfile, $D/code.c) +$(call cfile, $D/cstoper.c) +$(call cfile, $D/def.c) +$(call cfile, $D/defmodule.c) +$(call cfile, $D/desig.c) +$(call cfile, $D/enter.c) +$(call cfile, $D/error.c) +$(call cfile, $D/idf.c) +$(call cfile, $D/input.c) +$(call cfile, $D/lookup.c) +$(call cfile, $D/main.c) +$(call cfile, $D/misc.c) +$(call cfile, $D/node.c) +$(call cfile, $D/options.c) +$(call cfile, $D/stab.c) +$(call cfile, $D/tokenname.c) +$(call cfile, $D/type.c) +$(call cfile, $D/typequiv.c) +$(call cfile, $D/walk.c) + +$(call llgen, $(OBJDIR)/$D, \ + $(OBJDIR)/$D/tokenfile.g \ + $D/program.g \ + $D/declar.g \ + $D/expression.g \ + $D/statement.g) + +$(eval CLEANABLES += $(OBJDIR)/$D/tokenfile.g) +$(OBJDIR)/$D/tokenfile.g: $D/make.tokfile $D/tokenname.c + @echo TOKENFILE $$@ + @mkdir -p $$(dir $$@) + $(hide) sh $D/make.tokfile < $D/tokenname.c > $$@ + +$(call tabgen, $D/char.tab) + +$(eval $q: $(OBJDIR)/$D/parameters.h) + +$(eval CLEANABLES += $(OBJDIR)/$D/parameters.h) +$(OBJDIR)/$D/parameters.h: $D/BigPars + @echo PARAMETERS $$@ + @mkdir -p $$(dir $$@) + $(hide) echo '#ifndef PARAMETERS_H' > $$@ + $(hide) echo '#define PARAMETERS_H' >> $$@ + $(hide) grep -v '^!' < $$^ >> $$@ + $(hide) echo '#endif' >> $$@ + +$(eval CLEANABLES += $(OBJDIR)/$D/symbol2str.c) +$(OBJDIR)/$D/symbol2str.c: $D/make.tokcase $D/tokenname.c + @echo TOKCASE $$@ + @mkdir -p $$(dir $$@) + $(hide) $D/make.tokcase < $D/tokenname.c > $$@ +$(call cfile, $(OBJDIR)/$D/symbol2str.c) + +$(call build-m2-next, \ + $D/def.H \ + $D/type.H \ + $D/real.H \ + $D/node.H) + +$(call build-m2-allocd-header, $D/tmpvar.C, $(OBJDIR)/$D/tmpvar.c) +$(call cfile, $(OBJDIR)/$D/tmpvar.c) + +$(call build-m2-allocd-header, $D/casestat.C, $(OBJDIR)/$D/casestat.c) +$(call cfile, $(OBJDIR)/$D/casestat.c) + +$(call build-m2-allocd-header, $D/scope.C, $(OBJDIR)/$D/scope.c) +$(call cfile, $(OBJDIR)/$D/scope.c) + +$(eval $q: $(OBJDIR)/$D/Lpars.h) +$(eval $q: $(INCDIR)/idf_pkg.spec) +$(eval $q: $(INCDIR)/idf_pkg.body) +$(eval $q: $(INCDIR)/inp_pkg.spec) +$(eval $q: $(INCDIR)/inp_pkg.body) +$(eval $q: $(INCDIR)/alloc.h) +$(eval $q: $(INCDIR)/em_codeEK.h) +$(eval $q: $(INCDIR)/print.h) +$(eval $q: $(INCDIR)/system.h) + +$(call file, $(LIBEM_MES)) +$(call file, $(LIBEMK)) +$(call file, $(LIBEM_DATA)) +$(call file, $(LIBINPUT)) +$(call file, $(LIBASSERT)) +$(call file, $(LIBALLOC)) +$(call file, $(LIBFLT_ARITH)) +$(call file, $(LIBPRINT)) +$(call file, $(LIBSYSTEM)) +$(call file, $(LIBSTRING)) +$(call cprogram, $(BINDIR)/em_m2) +$(call installto, $(PLATDEP)/em_m2) + +$(call reset) +$(eval q := $D/em_m2.6) +$(call installto, $(INSDIR)/share/man/man6/em_m2.6) +endef + +$(eval $(build-m2-impl)) diff --git a/lang/m2/comp/casestat.C b/lang/m2/comp/casestat.C index d5bedf503..d227e3117 100644 --- a/lang/m2/comp/casestat.C +++ b/lang/m2/comp/casestat.C @@ -16,6 +16,7 @@ cases themselves. */ +#include "parameters.h" #include "debug.h" #include @@ -33,8 +34,6 @@ #include "chk_expr.h" #include "def.h" -#include "density.h" - struct switch_hdr { label sh_break; /* label of statement after this one */ label sh_default; /* label of ELSE part, or 0 */ diff --git a/lang/m2/comp/chk_expr.c b/lang/m2/comp/chk_expr.c index d9a39c3a2..7dbe5abc6 100644 --- a/lang/m2/comp/chk_expr.c +++ b/lang/m2/comp/chk_expr.c @@ -14,6 +14,7 @@ #include #include +#include "parameters.h" #include "debug.h" #include @@ -21,7 +22,6 @@ #include #include -#include "strict3rd.h" #include "Lpars.h" #include "idf.h" #include "type.h" @@ -34,7 +34,6 @@ #include "misc.h" #include "warning.h" #include "main.h" -#include "nostrict.h" extern char *symbol2str(); extern char *sprint(); diff --git a/lang/m2/comp/code.c b/lang/m2/comp/code.c index e0d05c584..f74231cb0 100644 --- a/lang/m2/comp/code.c +++ b/lang/m2/comp/code.c @@ -12,6 +12,7 @@ /* Code generation for expressions and coercions */ +#include "parameters.h" #include "debug.h" #include @@ -30,7 +31,6 @@ #include "Lpars.h" #include "standards.h" #include "walk.h" -#include "bigresult.h" extern int proclevel; extern char options[]; diff --git a/lang/m2/comp/cstoper.c b/lang/m2/comp/cstoper.c index fafb560f2..c55d4389f 100644 --- a/lang/m2/comp/cstoper.c +++ b/lang/m2/comp/cstoper.c @@ -9,9 +9,9 @@ /* $Id$ */ +#include +#include "parameters.h" #include "debug.h" -#include "target_sizes.h" -#include "uns_arith.h" #include #include diff --git a/lang/m2/comp/debug.h b/lang/m2/comp/debug.h index 865168335..1c2c34cb2 100644 --- a/lang/m2/comp/debug.h +++ b/lang/m2/comp/debug.h @@ -9,8 +9,6 @@ /* $Id$ */ -#include "debugcst.h" - #ifdef DEBUG #define DO_DEBUG(x, y) ((x) && (y)) #define STATIC diff --git a/lang/m2/comp/declar.g b/lang/m2/comp/declar.g index 9d7816e0c..49dac19c5 100644 --- a/lang/m2/comp/declar.g +++ b/lang/m2/comp/declar.g @@ -10,6 +10,7 @@ /* $Id$ */ { +#include "parameters.h" #include "debug.h" #include @@ -17,7 +18,6 @@ #include #include -#include "strict3rd.h" #include "idf.h" #include "LLlex.h" #include "def.h" @@ -28,7 +28,6 @@ #include "main.h" #include "chk_expr.h" #include "warning.h" -#include "nostrict.h" int proclevel = 0; /* nesting level of procedures */ int return_occurred; /* set if a return occurs in a block */ diff --git a/lang/m2/comp/def.c b/lang/m2/comp/def.c index 711f2d7e4..586875f5e 100644 --- a/lang/m2/comp/def.c +++ b/lang/m2/comp/def.c @@ -11,6 +11,7 @@ #include #include +#include "parameters.h" #include "debug.h" #include diff --git a/lang/m2/comp/defmodule.c b/lang/m2/comp/defmodule.c index e327f309b..fc83d36fd 100644 --- a/lang/m2/comp/defmodule.c +++ b/lang/m2/comp/defmodule.c @@ -9,6 +9,7 @@ /* $Id$ */ +#include "parameters.h" #include "debug.h" #include diff --git a/lang/m2/comp/desig.c b/lang/m2/comp/desig.c index 5550b2720..f2ea83a81 100644 --- a/lang/m2/comp/desig.c +++ b/lang/m2/comp/desig.c @@ -16,6 +16,7 @@ or perform a store. */ +#include "parameters.h" #include "debug.h" #include @@ -32,7 +33,6 @@ #include "node.h" #include "warning.h" #include "walk.h" -#include "squeeze.h" extern int proclevel; extern arith NewPtr(); diff --git a/lang/m2/comp/enter.c b/lang/m2/comp/enter.c index 002caa838..12f3e4e9d 100644 --- a/lang/m2/comp/enter.c +++ b/lang/m2/comp/enter.c @@ -13,6 +13,7 @@ #include #include +#include "parameters.h" #include "debug.h" #include "alloc.h" @@ -21,7 +22,6 @@ #include "em_code.h" #include "assert.h" -#include "dbsymtab.h" #include "idf.h" #include "LLlex.h" #include "def.h" diff --git a/lang/m2/comp/error.c b/lang/m2/comp/error.c index 2c265f7b6..410f7d15f 100644 --- a/lang/m2/comp/error.c +++ b/lang/m2/comp/error.c @@ -14,7 +14,7 @@ number of arguments! */ -#include "errout.h" +#include "parameters.h" #include "debug.h" #if __STDC__ @@ -28,14 +28,12 @@ #include #include -#include "strict3rd.h" #include "input.h" #include "f_info.h" #include "LLlex.h" #include "main.h" #include "node.h" #include "warning.h" -#include "nostrict.h" /* error classes */ #define ERROR 1 diff --git a/lang/m2/comp/expression.g b/lang/m2/comp/expression.g index 431b3aa93..1fe8024d3 100644 --- a/lang/m2/comp/expression.g +++ b/lang/m2/comp/expression.g @@ -10,6 +10,7 @@ /* $Id$ */ { +#include "parameters.h" #include "debug.h" #include diff --git a/lang/m2/comp/idf.c b/lang/m2/comp/idf.c index 471c5f5e8..697b3e011 100644 --- a/lang/m2/comp/idf.c +++ b/lang/m2/comp/idf.c @@ -9,5 +9,6 @@ /* $Id$ */ +#include "parameters.h" #include "idf.h" #include diff --git a/lang/m2/comp/input.c b/lang/m2/comp/input.c index 4c516a44e..ef8ee2982 100644 --- a/lang/m2/comp/input.c +++ b/lang/m2/comp/input.c @@ -12,6 +12,7 @@ #include #include #include +#include "parameters.h" #include "f_info.h" struct f_info file_info; #include "input.h" diff --git a/lang/m2/comp/input.h b/lang/m2/comp/input.h index 3a557a9f3..23c1ac582 100644 --- a/lang/m2/comp/input.h +++ b/lang/m2/comp/input.h @@ -9,8 +9,6 @@ /* $Id$ */ -#include "inputtype.h" - #define INP_NPUSHBACK 2 #define INP_TYPE struct f_info #define INP_VAR file_info diff --git a/lang/m2/comp/lookup.c b/lang/m2/comp/lookup.c index 39708353e..6d58791d6 100644 --- a/lang/m2/comp/lookup.c +++ b/lang/m2/comp/lookup.c @@ -9,6 +9,7 @@ /* $Id$ */ +#include "parameters.h" #include "debug.h" #include diff --git a/lang/m2/comp/main.c b/lang/m2/comp/main.c index 4b181eb83..a21ecf8a5 100644 --- a/lang/m2/comp/main.c +++ b/lang/m2/comp/main.c @@ -9,6 +9,7 @@ /* $Id$ */ +#include "parameters.h" #include "debug.h" #include @@ -19,8 +20,6 @@ #include #include -#include "strict3rd.h" -#include "dbsymtab.h" #include "input.h" #include "f_info.h" #include "idf.h" diff --git a/lang/m2/comp/misc.c b/lang/m2/comp/misc.c index d7a88ea5a..ada35fb02 100644 --- a/lang/m2/comp/misc.c +++ b/lang/m2/comp/misc.c @@ -17,6 +17,7 @@ #include "em_arith.h" #include "em_label.h" +#include "parameters.h" #include "f_info.h" #include "misc.h" #include "LLlex.h" diff --git a/lang/m2/comp/node.c b/lang/m2/comp/node.c index 2e2302504..910769e0d 100644 --- a/lang/m2/comp/node.c +++ b/lang/m2/comp/node.c @@ -9,6 +9,7 @@ /* $Id$ */ +#include "parameters.h" #include "debug.h" #include diff --git a/lang/m2/comp/options.c b/lang/m2/comp/options.c index 568101cb3..b4b734fef 100644 --- a/lang/m2/comp/options.c +++ b/lang/m2/comp/options.c @@ -9,21 +9,16 @@ /* $Id$ */ -#include "idfsize.h" +#include "parameters.h" #include #include #include -#include "strict3rd.h" -#include "dbsymtab.h" #include "type.h" #include "main.h" #include "warning.h" -#include "nostrict.h" -#include "nocross.h" #include "class.h" -#include "squeeze.h" #define MINIDFSIZE 14 diff --git a/lang/m2/comp/program.g b/lang/m2/comp/program.g index 05fedef61..e8ea7a0f3 100644 --- a/lang/m2/comp/program.g +++ b/lang/m2/comp/program.g @@ -12,6 +12,7 @@ { #include #include +#include "parameters.h" #include "debug.h" #include @@ -20,8 +21,6 @@ #include #include -#include "dbsymtab.h" -#include "strict3rd.h" #include "main.h" #include "idf.h" #include "LLlex.h" diff --git a/lang/m2/comp/scope.C b/lang/m2/comp/scope.C index 796475c23..085662232 100644 --- a/lang/m2/comp/scope.C +++ b/lang/m2/comp/scope.C @@ -9,6 +9,7 @@ /* $Id$ */ +#include "parameters.h" #include "debug.h" #include diff --git a/lang/m2/comp/stab.c b/lang/m2/comp/stab.c index 54bf67408..5aae2a1e5 100644 --- a/lang/m2/comp/stab.c +++ b/lang/m2/comp/stab.c @@ -9,7 +9,7 @@ /* $Id$ */ -#include "dbsymtab.h" +#include "parameters.h" #ifdef DBSYMTAB diff --git a/lang/m2/comp/statement.g b/lang/m2/comp/statement.g index 0a60226e1..ca5e72bb3 100644 --- a/lang/m2/comp/statement.g +++ b/lang/m2/comp/statement.g @@ -14,6 +14,7 @@ #include #include +#include "parameters.h" #include "idf.h" #include "LLlex.h" #include "scope.h" diff --git a/lang/m2/comp/tmpvar.C b/lang/m2/comp/tmpvar.C index da91114e1..03acdaba0 100644 --- a/lang/m2/comp/tmpvar.C +++ b/lang/m2/comp/tmpvar.C @@ -16,6 +16,7 @@ have local variabes. */ +#include "parameters.h" #include "debug.h" #include diff --git a/lang/m2/comp/tokenname.c b/lang/m2/comp/tokenname.c index be72a8418..cea9139b4 100644 --- a/lang/m2/comp/tokenname.c +++ b/lang/m2/comp/tokenname.c @@ -9,6 +9,7 @@ /* $Id$ */ +#include "parameters.h" #include "tokenname.h" #include "Lpars.h" #include "idf.h" diff --git a/lang/m2/comp/type.H b/lang/m2/comp/type.H index b677fa516..588ef28c7 100644 --- a/lang/m2/comp/type.H +++ b/lang/m2/comp/type.H @@ -9,8 +9,6 @@ /* $Id$ */ -#include "dbsymtab.h" - struct paramlist { /* structure for parameterlist of a PROCEDURE */ struct paramlist *par_next; struct def *par_def; /* "df" of parameter */ @@ -142,9 +140,7 @@ extern t_type *std_type, *error_type; /* All from type.c */ -#include "nocross.h" #ifdef NOCROSS -#include "target_sizes.h" #define word_align (AL_WORD) #define short_align (AL_SHORT) #define int_align (AL_INT) diff --git a/lang/m2/comp/type.c b/lang/m2/comp/type.c index fa0283d73..247e5e280 100644 --- a/lang/m2/comp/type.c +++ b/lang/m2/comp/type.c @@ -9,6 +9,7 @@ /* $Id$ */ +#include "parameters.h" #include "debug.h" #include @@ -17,7 +18,6 @@ #include #include -#include "nostrict.h" #include "LLlex.h" #include "def.h" #include "type.h" @@ -28,10 +28,8 @@ #include "main.h" #include "chk_expr.h" #include "warning.h" -#include "uns_arith.h" #ifndef NOCROSS -#include "target_sizes.h" int word_align = AL_WORD, short_align = AL_SHORT, diff --git a/lang/m2/comp/typequiv.c b/lang/m2/comp/typequiv.c index 2a3efbb7c..017e7a1d0 100644 --- a/lang/m2/comp/typequiv.c +++ b/lang/m2/comp/typequiv.c @@ -12,13 +12,13 @@ /* Routines for testing type equivalence, type compatibility, and assignment compatibility */ +#include "parameters.h" #include "debug.h" #include #include #include -#include "strict3rd.h" #include "type.h" #include "LLlex.h" #include "idf.h" diff --git a/lang/m2/comp/walk.c b/lang/m2/comp/walk.c index c79daed19..de9a63552 100644 --- a/lang/m2/comp/walk.c +++ b/lang/m2/comp/walk.c @@ -15,6 +15,7 @@ #include #include +#include "parameters.h" #include "debug.h" #include @@ -26,8 +27,6 @@ #include #include -#include "strict3rd.h" -#include "dbsymtab.h" #include "LLlex.h" #include "def.h" #include "type.h" @@ -42,8 +41,6 @@ #include "walk.h" #include "misc.h" #include "warning.h" -#include "bigresult.h" -#include "use_insert.h" extern arith NewPtr(); extern arith NewInt(); diff --git a/lang/m2/comp/walk.h b/lang/m2/comp/walk.h index c81a57a59..cf43c3074 100644 --- a/lang/m2/comp/walk.h +++ b/lang/m2/comp/walk.h @@ -19,8 +19,6 @@ extern int (*WalkTable[])(); extern label text_label; extern label data_label; -#include "squeeze.h" - #ifndef SQUEEZE #define c_loc(x) C_loc((arith) (x)) #define c_lae_dlb(x) C_lae_dlb(x,(arith) 0) diff --git a/lang/m2/libm2/build.mk b/lang/m2/libm2/build.mk new file mode 100644 index 000000000..7dadeb347 --- /dev/null +++ b/lang/m2/libm2/build.mk @@ -0,0 +1,103 @@ +define build-runtime-libmodula2-impl + +$(call reset) +$(eval objdir := $(PLATFORM)) + +$(call ackfile, lang/m2/libm2/Termcap.mod) +$(call ackfile, lang/m2/libm2/CSP.mod) +$(call ackfile, lang/m2/libm2/PascalIO.mod) +$(call ackfile, lang/m2/libm2/RealInOut.mod) +$(call ackfile, lang/m2/libm2/InOut.mod) +$(call ackfile, lang/m2/libm2/Streams.mod) +$(call ackfile, lang/m2/libm2/MathLib0.mod) +$(call ackfile, lang/m2/libm2/Mathlib.mod) +$(call ackfile, lang/m2/libm2/Processes.mod) +$(call ackfile, lang/m2/libm2/RealConver.mod) +$(call ackfile, lang/m2/libm2/Storage.mod) +$(call ackfile, lang/m2/libm2/Conversion.mod) +$(call ackfile, lang/m2/libm2/Semaphores.mod) +$(call ackfile, lang/m2/libm2/random.mod) +$(call ackfile, lang/m2/libm2/Strings.mod) +$(call ackfile, lang/m2/libm2/ArraySort.mod) +$(call ackfile, lang/m2/libm2/catch.c) +$(call ackfile, lang/m2/libm2/Traps.mod) +$(call ackfile, lang/m2/libm2/XXTermcap.c) +$(call ackfile, lang/m2/libm2/dvi.c) +$(call ackfile, lang/m2/libm2/Arguments.c) +$(call ackfile, lang/m2/libm2/LtoUset.e) +$(call ackfile, lang/m2/libm2/StrAss.c) +$(call ackfile, lang/m2/libm2/cap.c) +$(call ackfile, lang/m2/libm2/absd.c) +$(call ackfile, lang/m2/libm2/absf.e) +$(call ackfile, lang/m2/libm2/absi.c) +$(call ackfile, lang/m2/libm2/absl.c) +$(call ackfile, lang/m2/libm2/halt.c) +$(call ackfile, lang/m2/libm2/SYSTEM.c) +$(call ackfile, lang/m2/libm2/par_misc.e) +$(call ackfile, lang/m2/libm2/init.c) +$(call ackfile, lang/m2/libm2/sigtrp.c) +$(call ackfile, lang/m2/libm2/store.c) +$(call ackfile, lang/m2/libm2/confarray.c) +$(call ackfile, lang/m2/libm2/load.c) +$(call ackfile, lang/m2/libm2/blockmove.c) +$(call ackfile, lang/m2/libm2/stackprio.c) +$(call ackfile, lang/m2/libm2/ucheck.c) +$(call ackfile, lang/m2/libm2/rcka.c) +$(call ackfile, lang/m2/libm2/rcku.c) +$(call ackfile, lang/m2/libm2/rcki.c) +$(call ackfile, lang/m2/libm2/rckul.c) +$(call ackfile, lang/m2/libm2/rckil.c) +$(call ackfile, lang/m2/libm2/EM.e) + +$(eval $q: $(EM_M2)) + +$(call acklibrary, $(LIBDIR)/$(PLATFORM)/libmodula2.a) +$(call installto, $(PLATIND)/$(PLATFORM)/libmodula2.a) + +$(call reset) +$(eval objdir := $(PLATFORM)) +$(call ackfile, lang/m2/libm2/head_m2.e) +$(call installto, $(PLATIND)/$(PLATFORM)/modula2.o) + +endef + +build-runtime-libmodula2 = $(eval $(build-runtime-libmodula2-impl)) + +$(eval RUNTIMES += libmodula2) + +define build-headers-libmodula2-impl + +$(eval g := \ + Arguments.def \ + ArraySort.def \ + ASCII.def \ + Conversion.def \ + CSP.def \ + EM.def \ + Epilogue.def \ + InOut.def \ + MathLib0.def \ + Mathlib.def \ + PascalIO.def \ + Processes.def \ + random.def \ + RealConver.def \ + RealInOut.def \ + Semaphores.def \ + Storage.def \ + Streams.def \ + Strings.def \ + StripUnix.def \ + Termcap.def \ + Traps.def \ + Unix.def \ + XXTermcap.def) + +$(foreach f, $g, \ + $(call reset) \ + $(call file, lang/m2/libm2/$f) \ + $(call installto, $(PLATIND)/include/modula2/$f)) + +endef + +$(eval $(build-headers-libmodula2-impl)) diff --git a/lib/descr/fe b/lib/descr/fe index ac9b8b114..96a03ee8f 100644 --- a/lib/descr/fe +++ b/lib/descr/fe @@ -4,7 +4,7 @@ # Don't generate line updating code by default (i.e.: -L flag provided to cem). # To put it on again: use -NL var LFLAG=-L -var MODULA2_INCLUDES=-I{EM}/share/ack/include/m2 +var MODULA2_INCLUDES=-I{EM}/share/ack/include/modula2 var OCCAM_INCLUDES=-I{EM}/share/ack/include/occam var C_INCLUDES=-I{EM}/share/ack/include/ansi