mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 05:12:26 +00:00
vmake ported
This commit is contained in:
parent
2aeddb9975
commit
776ccc8b46
3 changed files with 42 additions and 6 deletions
27
src/lib/v4/compatIn.Mod
Normal file
27
src/lib/v4/compatIn.Mod
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
MODULE compatIn;
|
||||
(* module created to compile Make utility from Trianus v4 system with less changes in original file ; -- noch *)
|
||||
IMPORT Args;
|
||||
|
||||
VAR Done* : BOOLEAN;
|
||||
argnum : INTEGER;
|
||||
PROCEDURE Open*;
|
||||
BEGIN
|
||||
argnum := 0;
|
||||
Done := FALSE;
|
||||
END Open;
|
||||
|
||||
PROCEDURE Name*(VAR name : ARRAY OF CHAR);
|
||||
BEGIN
|
||||
INC(argnum);
|
||||
|
||||
IF argnum < Args.argc THEN
|
||||
Args.Get(argnum, name);
|
||||
Done := TRUE
|
||||
ELSE
|
||||
Done := FALSE
|
||||
END
|
||||
END Name;
|
||||
|
||||
BEGIN
|
||||
Open();
|
||||
END compatIn.
|
||||
|
|
@ -8,9 +8,10 @@ Make.Order {filename} ~
|
|||
modules are inspected and the modules are sorted accordingly. The sorted list of file names
|
||||
is written to the standard output.
|
||||
-----------------------------------------------------------------------*)
|
||||
(* taken from trianus system source ; -- noch *)
|
||||
|
||||
MODULE Make; (*HM 94-06-22 / *)
|
||||
IMPORT Texts, In, Out;
|
||||
MODULE vmake; (*HM 94-06-22 / *)
|
||||
IMPORT Texts := CmdlnTexts, In := compatIn, Out := Console;
|
||||
|
||||
TYPE
|
||||
ModuleName = ARRAY 32 OF CHAR;
|
||||
|
|
@ -90,7 +91,7 @@ BEGIN
|
|||
IF prev = NIL THEN list := m.next ELSE prev.next := m.next END ;
|
||||
imp := m.imports; WHILE imp # NIL DO DEC(imp.mod.ref); imp := imp.next END ;
|
||||
Print(list);
|
||||
Out.String(m.name); Out.String("/s"); Out.Ln
|
||||
Out.String(m.name); (*Out.String(" -s");*) Out.Ln
|
||||
END
|
||||
END Print;
|
||||
|
||||
|
|
@ -103,7 +104,10 @@ BEGIN
|
|||
Print(list)
|
||||
END Order;
|
||||
|
||||
END Make.
|
||||
BEGIN
|
||||
Order
|
||||
|
||||
END vmake.
|
||||
|
||||
Make.Order
|
||||
POPB.Mod
|
||||
Loading…
Add table
Add a link
Reference in a new issue