mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 07:32:24 +00:00
Restore text file based error support as prototyped in the ErrorExperiment branch.
This commit is contained in:
parent
f7feea0ad1
commit
377bc73774
36 changed files with 393 additions and 1479 deletions
|
|
@ -4,7 +4,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
31.1.2007 jt synchronized with BlackBox version, in particular PromoteIntConstToLInt added
|
||||
*)
|
||||
|
||||
IMPORT SYSTEM, Texts, Files, Platform, Out, errors, Configuration, VT100, Strings;
|
||||
IMPORT SYSTEM, Texts, Files, Platform, Out, Configuration, VT100, Strings;
|
||||
|
||||
CONST
|
||||
OptionChar* = "-";
|
||||
|
|
@ -111,7 +111,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
|
||||
lasterrpos: LONGINT;
|
||||
inR: Texts.Reader;
|
||||
Log: Texts.Text;
|
||||
Log, Errors: Texts.Text;
|
||||
oldSF, newSF: Files.Rider;
|
||||
R: ARRAY 3 OF Files.Rider;
|
||||
|
||||
|
|
@ -420,10 +420,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
|
||||
|
||||
PROCEDURE LogErrMsg(n: INTEGER);
|
||||
VAR
|
||||
S: Texts.Scanner; T: Texts.Text;
|
||||
ch: CHAR; i: INTEGER;
|
||||
buf: ARRAY 1024 OF CHAR;
|
||||
VAR l: INTEGER; S: Texts.Scanner; c: CHAR;
|
||||
BEGIN
|
||||
IF n >= 0 THEN
|
||||
IF ~(notcoloroutput IN Options) THEN VT100.SetAttr(VT100.Red) END;
|
||||
|
|
@ -436,6 +433,32 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
END ;
|
||||
LogWNum(n, 1);
|
||||
LogWStr(" ");
|
||||
|
||||
IF Errors = NIL THEN NEW(Errors); Texts.Open(Errors, "Errors.Txt") END;
|
||||
Texts.OpenScanner(S, Errors, 0);
|
||||
REPEAT l := S.line; Texts.Scan(S)
|
||||
UNTIL (l # S.line) & (S.class = Texts.Int) & (S.i = n) OR S.eot;
|
||||
IF ~S.eot THEN
|
||||
Texts.Read(S, c);
|
||||
WHILE ~S.eot & (c >= ' ') DO Out.Char(c); Texts.Read(S, c) END
|
||||
END
|
||||
|
||||
|
||||
(* ---
|
||||
VAR T: Texts.Text; S: Texts.Scanner;
|
||||
|
||||
PROCEDURE Write*(n: INTEGER);
|
||||
VAR l: INTEGER; c: CHAR;
|
||||
BEGIN
|
||||
IF T = NIL THEN NEW(T); Texts.Open(T, "VishapOberonErrors.txt") END;
|
||||
Texts.OpenScanner(S, T, 0);
|
||||
REPEAT l := S.line; Texts.Scan(S)
|
||||
UNTIL (l # S.line) & (S.class = Texts.Int) & (S.i = n) OR S.eot;
|
||||
IF ~S.eot THEN Texts.Read(S, c);
|
||||
WHILE ~S.eot & (c >= ' ') DO Console.Char(c); Texts.Read(S, c) END
|
||||
END
|
||||
END Write;
|
||||
|
||||
(*NEW(T); Texts.Open(T, "vocErrors.Text"); Texts.OpenScanner(S, T, 0);
|
||||
REPEAT S.line := 0;
|
||||
REPEAT Texts.Scan(S) UNTIL S.eot OR (S.line # 0)
|
||||
|
|
@ -445,6 +468,8 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
buf[i] := 0X; LogWStr(buf);
|
||||
END*)
|
||||
LogWStr(errors.errors[n]);
|
||||
|
||||
--- *)
|
||||
END LogErrMsg;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,215 +0,0 @@
|
|||
MODULE errors;
|
||||
|
||||
TYPE string* = ARRAY 128 OF CHAR;
|
||||
|
||||
VAR errors- : ARRAY 350 OF string;
|
||||
|
||||
|
||||
BEGIN
|
||||
(* Incorrect use of the language Oberon *)
|
||||
errors[0] := "undeclared identifier";
|
||||
errors[1] := "multiply defined identifier";
|
||||
errors[2] := "illegal character in number";
|
||||
errors[3] := "illegal character in string";
|
||||
errors[4] := "identifier does not match procedure name";
|
||||
errors[5] := "comment not closed";
|
||||
errors[6] := "";
|
||||
errors[7] := "";
|
||||
errors[8] := "";
|
||||
errors[9] := "'=' expected";
|
||||
errors[10] :="";
|
||||
errors[11] :="";
|
||||
errors[12] := "type definition starts with incorrect symbol";
|
||||
errors[13] := "factor starts with incorrect symbol";
|
||||
errors[14] := "statement starts with incorrect symbol";
|
||||
errors[15] := "declaration followed by incorrect symbol";
|
||||
errors[16] := "MODULE expected";
|
||||
errors[17] := "";
|
||||
errors[18] := "'.' missing";
|
||||
errors[19] := "',' missing";
|
||||
errors[20] := "':' missing";
|
||||
errors[21] := "";
|
||||
errors[22] := "')' missing";
|
||||
errors[23] := "']' missing";
|
||||
errors[24] := "'}' missing";
|
||||
errors[25] := "OF missing";
|
||||
errors[26] := "THEN missing";
|
||||
errors[27] := "DO missing";
|
||||
errors[28] := "TO missing";
|
||||
errors[29] := "";
|
||||
errors[30] := "'(' missing";
|
||||
errors[31] := "";
|
||||
errors[32] := "";
|
||||
errors[33] := "";
|
||||
errors[34] := "':=' missing";
|
||||
errors[35] := "',' or OF expected";
|
||||
errors[36] := "";
|
||||
errors[37] := "";
|
||||
errors[38] := "identifier expected";
|
||||
errors[39] := "';' missing";
|
||||
errors[40] := "";
|
||||
errors[41] := "END missing";
|
||||
errors[42] := "";
|
||||
errors[43] := "";
|
||||
errors[44] := "UNTIL missing";
|
||||
errors[45] := "";
|
||||
errors[46] := "EXIT not within loop statement";
|
||||
errors[47] := "illegally marked identifier";
|
||||
errors[48] := "";
|
||||
errors[49] := "";
|
||||
errors[50] := "expression should be constant";
|
||||
errors[51] := "constant not an integer";
|
||||
errors[52] := "identifier does not denote a type";
|
||||
errors[53] := "identifier does not denote a record type";
|
||||
errors[54] := "result type of procedure is not a basic type";
|
||||
errors[55] := "procedure call of a function";
|
||||
errors[56] := "assignment to non-variable";
|
||||
errors[57] := "pointer not bound to record or array type";
|
||||
errors[58] := "recursive type definition";
|
||||
errors[59] := "illegal open array parameter";
|
||||
errors[60] := "wrong type of case label";
|
||||
errors[61] := "inadmissible type of case label";
|
||||
errors[62] := "case label defined more than once";
|
||||
errors[63] := "illegal value of constant";
|
||||
errors[64] := "more actual than formal parameters";
|
||||
errors[65] := "fewer actual than formal parameters";
|
||||
errors[66] := "element types of actual array and formal open array differ";
|
||||
errors[67] := "actual parameter corresponding to open array is not an array";
|
||||
errors[68] := "control variable must be integer";
|
||||
errors[69] := "parameter must be an integer constant";
|
||||
errors[70] := "pointer or VAR record required as formal receiver";
|
||||
errors[71] := "pointer expected as actual receiver";
|
||||
errors[72] := "procedure must be bound to a record of the same scope";
|
||||
errors[73] := "procedure must have level 0";
|
||||
errors[74] := "procedure unknown in base type";
|
||||
errors[75] := "invalid call of base procedure";
|
||||
errors[76] := "this variable (field) is read only";
|
||||
errors[77] := "object is not a record";
|
||||
errors[78] := "dereferenced object is not a variable";
|
||||
errors[79] := "indexed object is not a variable";
|
||||
errors[80] := "index expression is not an integer";
|
||||
errors[81] := "index out of specified bounds";
|
||||
errors[82] := "indexed variable is not an array";
|
||||
errors[83] := "undefined record field";
|
||||
errors[84] := "dereferenced variable is not a pointer";
|
||||
errors[85] := "guard or test type is not an extension of variable type";
|
||||
errors[86] := "guard or testtype is not a pointer";
|
||||
errors[87] := "guarded or tested variable is neither a pointer nor a VAR-parameter record";
|
||||
errors[88] := "open array not allowed as variable, record field or array element";
|
||||
errors[89] := "";
|
||||
errors[90] := "";
|
||||
errors[91] := "";
|
||||
errors[92] := "operand of IN not an integer, or not a set";
|
||||
errors[93] := "set element type is not an integer";
|
||||
errors[94] := "operand of & is not of type BOOLEAN";
|
||||
errors[95] := "operand of OR is not of type BOOLEAN";
|
||||
errors[96] := "operand not applicable to (unary) +";
|
||||
errors[97] := "operand not applicable to (unary) -";
|
||||
errors[98] := "operand of ~ is not of type BOOLEAN";
|
||||
errors[99] := "ASSERT fault";
|
||||
errors[100] := "incompatible operands of dyadic operator";
|
||||
errors[101] := "operand type inapplicable to *";
|
||||
errors[102] := "operand type inapplicable to /";
|
||||
errors[103] := "operand type inapplicable to DIV";
|
||||
errors[104] := "operand type inapplicable to MOD";
|
||||
errors[105] := "operand type inapplicable to +";
|
||||
errors[106] := "operand type inapplicable to -";
|
||||
errors[107] := "operand type inapplicable to = or #";
|
||||
errors[108] := "operand type inapplicable to relation";
|
||||
errors[109] := "overriding method must be exported";
|
||||
errors[110] := "operand is not a type";
|
||||
errors[111] := "operand inapplicable to (this) function";
|
||||
errors[112] := "operand is not a variable";
|
||||
errors[113] := "incompatible assignment";
|
||||
errors[114] := "string too long to be assigned";
|
||||
errors[115] := "parameter doesn't match";
|
||||
errors[116] := "number of parameters doesn't match";
|
||||
errors[117] := "result type doesn't match";
|
||||
errors[118] := "export mark doesn't match with forward declaration";
|
||||
errors[119] := "redefinition textually precedes procedure bound to base type";
|
||||
errors[120] := "type of expression following IF, WHILE, UNTIL or ASSERT is not BOOLEAN";
|
||||
errors[121] := "called object is not a procedure (or is an interrupt procedure)";
|
||||
errors[122] := "actual VAR-parameter is not a variable";
|
||||
errors[123] := "type of actual parameter is not identical with that of formal VAR-parameter";
|
||||
errors[124] := "type of result expression differs from that of procedure";
|
||||
errors[125] := "type of case expression is neither INTEGER nor CHAR";
|
||||
errors[126] := "this expression cannot be a type or a procedure";
|
||||
errors[127] := "illegal use of object";
|
||||
errors[128] := "unsatisfied forward reference";
|
||||
errors[129] := "unsatisfied forward procedure";
|
||||
errors[130] := "WITH clause does not specify a variable";
|
||||
errors[131] := "LEN not applied to array";
|
||||
errors[132] := "dimension in LEN too large or negative";
|
||||
errors[135] := "SYSTEM not imported";
|
||||
errors[150] := "key inconsistency of imported module";
|
||||
errors[151] := "incorrect symbol file";
|
||||
errors[152] := "symbol file of imported module not found";
|
||||
errors[153] := "object or symbol file not opened (disk full?)";
|
||||
errors[154] := "recursive import not allowed";
|
||||
errors[155] := "generation of new symbol file not allowed";
|
||||
errors[156] := "parameter file not found";
|
||||
errors[157] := "syntax error in parameter file";
|
||||
(* Limitations of implementation*)
|
||||
errors[200] := "not yet implemented";
|
||||
errors[201] := "lower bound of set range greater than higher bound";
|
||||
errors[202] := "set element greater than MAX(SET) or less than 0";
|
||||
errors[203] := "number too large";
|
||||
errors[204] := "product too large";
|
||||
errors[205] := "division by zero";
|
||||
errors[206] := "sum too large";
|
||||
errors[207] := "difference too large";
|
||||
errors[208] := "overflow in arithmetic shift";
|
||||
errors[209] := "case range too large";
|
||||
errors[213] := "too many cases in case statement";
|
||||
errors[218] := "illegal value of parameter (0 <= p < 256)";
|
||||
errors[219] := "machine registers cannot be accessed";
|
||||
errors[220] := "illegal value of parameter";
|
||||
errors[221] := "too many pointers in a record";
|
||||
errors[222] := "too many global pointers";
|
||||
errors[223] := "too many record types";
|
||||
errors[224] := "too many pointer types";
|
||||
errors[225] := "address of pointer variable too large (move forward in text)";
|
||||
errors[226] := "too many exported procedures";
|
||||
errors[227] := "too many imported modules";
|
||||
errors[228] := "too many exported structures";
|
||||
errors[229] := "too many nested records for import";
|
||||
errors[230] := "too many constants (strings) in module";
|
||||
errors[231] := "too many link table entries (external procedures)";
|
||||
errors[232] := "too many commands in module";
|
||||
errors[233] := "record extension hierarchy too high";
|
||||
errors[234] := "export of recursive type not allowed";
|
||||
errors[240] := "identifier too long";
|
||||
errors[241] := "string too long";
|
||||
errors[242] := "address overflow";
|
||||
errors[244] := "cyclic type definition not allowed";
|
||||
errors[245] := "guarded pointer variable may be manipulated by non-local operations; use auxiliary pointer variable";
|
||||
(* Compiler Warnings *)
|
||||
|
||||
errors[301] := "implicit type cast";
|
||||
errors[306] := "inappropriate symbol file ignored";
|
||||
errors[307] := "no ELSE symbol after CASE statement sequence may lead to trap"; (* new warning, -- noch *)
|
||||
errors[308] := "SYSTEM.VAL result includes memory past end of source variable"; (* DCWB *)
|
||||
|
||||
END errors.
|
||||
(*
|
||||
Run-time Error Messages
|
||||
SYSTEM_halt
|
||||
0 silent HALT(0)
|
||||
1..255 HALT(n), cf. SYSTEM_halt
|
||||
-1 assertion failed, cf. SYSTEM_assert
|
||||
-2 invalid array index
|
||||
-3 function procedure without RETURN statement
|
||||
-4 invalid case in CASE statement
|
||||
-5 type guard failed
|
||||
-6 implicit type guard in record assignment failed
|
||||
-7 invalid case in WITH statement
|
||||
-8 value out of range
|
||||
-9 (delayed) interrupt
|
||||
-10 NIL access
|
||||
-11 alignment error
|
||||
-12 zero divide
|
||||
-13 arithmetic overflow/underflow
|
||||
-14 invalid function argument
|
||||
-15 internal error
|
||||
*)
|
||||
|
||||
194
src/runtime/Errors.Txt
Normal file
194
src/runtime/Errors.Txt
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
The first line of this file is ignored.
|
||||
Any line not starting /^ *[0-9]/ is ignored.
|
||||
There should be only one space between the number and the message text.
|
||||
|
||||
Compiler error messages
|
||||
0 undeclared identifier
|
||||
1 multiply defined identifier
|
||||
2 illegal character in number
|
||||
3 illegal character in string
|
||||
4 identifier does not match procedure name
|
||||
5 comment not closed
|
||||
|
||||
9 '=' expected
|
||||
|
||||
12 type definition starts with incorrect symbol
|
||||
13 factor starts with incorrect symbol
|
||||
14 statement starts with incorrect symbol
|
||||
15 declaration followed by incorrect symbol
|
||||
16 MODULE expected
|
||||
|
||||
18 '.' missing
|
||||
19 ',' missing
|
||||
20 ':' missing
|
||||
|
||||
22 ')' missing
|
||||
23 ']' missing
|
||||
24 '}' missing
|
||||
25 OF missing
|
||||
26 THEN missing
|
||||
27 DO missing
|
||||
28 TO missing
|
||||
|
||||
30 '(' missing
|
||||
|
||||
34 ':=' missing
|
||||
35 ',' or OF expected
|
||||
|
||||
38 identifier expected
|
||||
39 ';' missing
|
||||
|
||||
41 END missing
|
||||
|
||||
44 UNTIL missing
|
||||
|
||||
46 EXIT not within loop statement
|
||||
47 illegally marked identifier
|
||||
|
||||
50 expression should be constant
|
||||
51 constant not an integer
|
||||
52 identifier does not denote a type
|
||||
53 identifier does not denote a record type
|
||||
54 result type of procedure is not a basic type
|
||||
55 procedure call of a function
|
||||
56 assignment to non-variable
|
||||
57 pointer not bound to record or array type
|
||||
58 recursive type definition
|
||||
59 illegal open array parameter
|
||||
60 wrong type of case label
|
||||
61 inadmissible type of case label
|
||||
62 case label defined more than once
|
||||
63 illegal value of constant
|
||||
64 more actual than formal parameters
|
||||
65 fewer actual than formal parameters
|
||||
66 element types of actual array and formal open array differ
|
||||
67 actual parameter corresponding to open array is not an array
|
||||
68 control variable must be integer
|
||||
69 parameter must be an integer constant
|
||||
70 pointer or VAR record required as formal receiver
|
||||
71 pointer expected as actual receiver
|
||||
72 procedure must be bound to a record of the same scope
|
||||
73 procedure must have level 0
|
||||
74 procedure unknown in base type
|
||||
75 invalid call of base procedure
|
||||
76 this variable (field) is read only
|
||||
77 object is not a record
|
||||
78 dereferenced object is not a variable
|
||||
79 indexed object is not a variable
|
||||
80 index expression is not an integer
|
||||
81 index out of specified bounds
|
||||
82 indexed variable is not an array
|
||||
83 undefined record field
|
||||
84 dereferenced variable is not a pointer
|
||||
85 guard or test type is not an extension of variable type
|
||||
86 guard or testtype is not a pointer
|
||||
87 guarded or tested variable is neither a pointer nor a VAR-parameter record
|
||||
88 open array not allowed as variable, record field or array element
|
||||
|
||||
92 operand of IN not an integer, or not a set
|
||||
93 set element type is not an integer
|
||||
94 operand of & is not of type BOOLEAN
|
||||
95 operand of OR is not of type BOOLEAN
|
||||
96 operand not applicable to (unary) +
|
||||
97 operand not applicable to (unary) -
|
||||
98 operand of ~ is not of type BOOLEAN
|
||||
99 ASSERT fault
|
||||
100 incompatible operands of dyadic operator
|
||||
101 operand type inapplicable to *
|
||||
102 operand type inapplicable to /
|
||||
103 operand type inapplicable to DIV
|
||||
104 operand type inapplicable to MOD
|
||||
105 operand type inapplicable to +
|
||||
106 operand type inapplicable to -
|
||||
107 operand type inapplicable to = or #
|
||||
108 operand type inapplicable to relation
|
||||
109 overriding method must be exported
|
||||
110 operand is not a type
|
||||
111 operand inapplicable to (this) function
|
||||
112 operand is not a variable
|
||||
113 incompatible assignment
|
||||
114 string too long to be assigned
|
||||
115 parameter doesn't match
|
||||
116 number of parameters doesn't match
|
||||
117 result type doesn't match
|
||||
118 export mark doesn't match with forward declaration
|
||||
119 redefinition textually precedes procedure bound to base type
|
||||
120 type of expression following IF, WHILE, UNTIL or ASSERT is not BOOLEAN
|
||||
121 called object is not a procedure (or is an interrupt procedure)
|
||||
122 actual VAR-parameter is not a variable
|
||||
123 type of actual parameter is not identical with that of formal VAR-parameter
|
||||
124 type of result expression differs from that of procedure
|
||||
125 type of case expression is neither INTEGER nor CHAR
|
||||
126 this expression cannot be a type or a procedure
|
||||
127 illegal use of object
|
||||
128 unsatisfied forward reference
|
||||
129 unsatisfied forward procedure
|
||||
130 WITH clause does not specify a variable
|
||||
131 LEN not applied to array
|
||||
132 dimension in LEN too large or negative
|
||||
135 SYSTEM not imported
|
||||
150 key inconsistency of imported module
|
||||
151 incorrect symbol file
|
||||
152 symbol file of imported module not found
|
||||
153 object or symbol file not opened (disk full?)
|
||||
154 recursive import not allowed
|
||||
155 generation of new symbol file not allowed
|
||||
156 parameter file not found
|
||||
157 syntax error in parameter file
|
||||
|
||||
Limitations of implementation
|
||||
200 not yet implemented
|
||||
201 lower bound of set range greater than higher bound
|
||||
202 set element greater than MAX(SET) or less than 0
|
||||
203 number too large
|
||||
204 product too large
|
||||
205 division by zero
|
||||
206 sum too large
|
||||
207 difference too large
|
||||
208 overflow in arithmetic shift
|
||||
209 case range too large
|
||||
213 too many cases in case statement
|
||||
218 illegal value of parameter (0 <= p < 256)
|
||||
219 machine registers cannot be accessed
|
||||
220 illegal value of parameter
|
||||
221 too many pointers in a record
|
||||
222 too many global pointers
|
||||
223 too many record types
|
||||
224 too many pointer types
|
||||
225 address of pointer variable too large (move forward in text)
|
||||
226 too many exported procedures
|
||||
227 too many imported modules
|
||||
228 too many exported structures
|
||||
229 too many nested records for import
|
||||
230 too many constants (strings) in module
|
||||
231 too many link table entries (external procedures)
|
||||
232 too many commands in module
|
||||
233 record extension hierarchy too high
|
||||
234 export of recursive type not allowed
|
||||
240 identifier too long
|
||||
241 string too long
|
||||
242 address overflow
|
||||
244 cyclic type definition not allowed
|
||||
245 guarded pointer variable may be manipulated by non-local operations; use auxiliary pointer variable
|
||||
|
||||
Compiler Warnings
|
||||
301 implicit type cast
|
||||
306 inappropriate symbol file ignored
|
||||
307 no ELSE symbol after CASE statement sequence may lead to trap
|
||||
|
||||
Run-time Error Messages
|
||||
-1 assertion failed, cf. SYSTEM_assert
|
||||
-2 invalid array index
|
||||
-3 function procedure without RETURN statement
|
||||
-4 invalid case in CASE statement
|
||||
-5 type guard failed
|
||||
-6 implicit type guard in record assignment failed
|
||||
-7 invalid case in WITH statement
|
||||
-8 value out of range
|
||||
-9 (delayed) interrupt
|
||||
-10 NIL access
|
||||
-11 alignment error
|
||||
-12 zero divide
|
||||
-13 arithmetic overflow/underflow
|
||||
-14 invalid function argument
|
||||
-15 internal error
|
||||
|
|
@ -61,16 +61,18 @@ assemble:
|
|||
|
||||
cd $(BUILDDIR) && $(COMPILE) -c SYSTEM.c Configuration.c Platform.c Heap.c
|
||||
cd $(BUILDDIR) && $(COMPILE) -c Out.c Strings.c Modules.c Files.c
|
||||
cd $(BUILDDIR) && $(COMPILE) -c Reals.c Texts.c VT100.c errors.c
|
||||
cd $(BUILDDIR) && $(COMPILE) -c Reals.c Texts.c VT100.c
|
||||
cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c
|
||||
cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c
|
||||
|
||||
cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \
|
||||
SYSTEM.o Configuration.o Platform.o Heap.o Out.o Strings.o Modules.o Files.o \
|
||||
Reals.o Texts.o VT100.o errors.o OPM.o extTools.o OPS.o OPT.o \
|
||||
OPC.o OPV.o OPB.o OPP.o
|
||||
SYSTEM.o Configuration.o Platform.o Heap.o Out.o Strings.o \
|
||||
Modules.o Files.o Reals.o Texts.o VT100.o extTools.o \
|
||||
OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o
|
||||
|
||||
cp src/runtime/*.[ch] $(BUILDDIR)
|
||||
cp src/runtime/*.Txt $(BUILDDIR)
|
||||
cp src/runtime/*.Txt $(ROOTDIR)
|
||||
@printf "$(OBECOMP) created.\n"
|
||||
|
||||
|
||||
|
|
@ -111,7 +113,6 @@ translate:
|
|||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsfF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod
|
||||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsfF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod
|
||||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsfF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod
|
||||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsfF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/errors.Mod
|
||||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsfF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod
|
||||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsfF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod
|
||||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsfFx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod
|
||||
|
|
@ -123,6 +124,7 @@ translate:
|
|||
cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ssfm -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/Compiler.Mod
|
||||
|
||||
cp src/runtime/*.[ch] $(BUILDDIR)
|
||||
cp src/runtime/*.Txt $(BUILDDIR)
|
||||
@printf "$(BUILDDIR) filled with compiler C source.\n"
|
||||
|
||||
|
||||
|
|
@ -134,7 +136,7 @@ browsercmd:
|
|||
@cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Smf -O$(MODEL) ../../src/tools/browser/BrowserCmd.Mod
|
||||
@cd $(BUILDDIR); $(COMPILE) BrowserCmd.c Oberon.c -o showdef \
|
||||
Platform.o Texts.o OPT.o Heap.o Out.o SYSTEM.o OPM.o OPS.o OPV.o \
|
||||
Files.o Reals.o Modules.o VT100.o errors.o Configuration.o Strings.o \
|
||||
Files.o Reals.o Modules.o VT100.o Configuration.o Strings.o \
|
||||
OPC.o
|
||||
|
||||
|
||||
|
|
@ -168,6 +170,9 @@ install:
|
|||
@mkdir -p "$(INSTALLDIR)/C/include" && cp $(BUILDDIR)/C/*.h "$(INSTALLDIR)/C/include/"
|
||||
@mkdir -p "$(INSTALLDIR)/C/sym" && cp $(BUILDDIR)/C/*.sym "$(INSTALLDIR)/C/sym/"
|
||||
|
||||
@cp $(BUILDDIR)/*.Txt "$(INSTALLDIR)/2/sym/"
|
||||
@cp $(BUILDDIR)/*.Txt "$(INSTALLDIR)/C/sym/"
|
||||
|
||||
@mkdir -p "$(INSTALLDIR)/lib"
|
||||
@cp $(BUILDDIR)/2/lib$(ONAME)* "$(INSTALLDIR)/lib/"
|
||||
@cp $(BUILDDIR)/C/lib$(ONAME)* "$(INSTALLDIR)/lib/"
|
||||
|
|
@ -366,8 +371,9 @@ library:
|
|||
@printf "\nCompiling lib$(ONAME)-O$(MODEL) sources\n"
|
||||
rm -rf $(BUILDDIR)/$(MODEL)
|
||||
mkdir -p $(BUILDDIR)/$(MODEL)
|
||||
cp src/runtime/*.[ch] $(BUILDDIR)/$(MODEL)
|
||||
cd $(BUILDDIR)/$(MODEL) && $(COMPILE) -c SYSTEM.c
|
||||
#cp src/runtime/*.[ch] $(BUILDDIR)/$(MODEL)
|
||||
#cd $(BUILDDIR)/$(MODEL) && $(COMPILE) -c SYSTEM.c
|
||||
cp $(BUILDDIR)/SYSTEM.[ho] $(BUILDDIR)/$(MODEL)
|
||||
@make -f src/tools/make/oberon.mk -s O$(MODEL)library MODEL=$(MODEL)
|
||||
@printf "\nMaking lib$(ONAME)-O$(MODEL) .a and .so\n"
|
||||
ar rcs "$(BUILDDIR)/$(MODEL)/lib$(ONAME)-O$(MODEL).a" $(BUILDDIR)/$(MODEL)/*.o
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue