mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 05:12:26 +00:00
added help message to vmake if run without arguments
This commit is contained in:
parent
776ccc8b46
commit
6b3baeb47f
1 changed files with 22 additions and 3 deletions
|
|
@ -28,6 +28,22 @@ TYPE
|
||||||
next: Import;
|
next: Import;
|
||||||
END ;
|
END ;
|
||||||
|
|
||||||
|
PROCEDURE showhelp;
|
||||||
|
BEGIN
|
||||||
|
Out.String ("vmake topologically sorts a set of Oberon source file names according to their import relationships"); Out.Ln;
|
||||||
|
Out.String ("so that they are in a correct compilation order. The generated list can be prepended with the"); Out.Ln;
|
||||||
|
Out.String ("command voc and can be compiled"); Out.Ln;
|
||||||
|
Out.Ln;
|
||||||
|
Out.String ("vmake {filename} ~"); Out.Ln;
|
||||||
|
Out.String ("reads a list of file names describing Oberon modules. The import relationships of these"); Out.Ln;
|
||||||
|
Out.String ("modules are inspected and the modules are sorted accordingly. The sorted list of file names"); Out.Ln;
|
||||||
|
Out.String ("is written to the standard output."); Out.Ln;
|
||||||
|
Out.String ("in case modules in different directories must be checked, it is also possible to use MODULES environment variable"); Out.Ln;
|
||||||
|
Out.String ("which may contain module paths."); Out.Ln
|
||||||
|
|
||||||
|
END showhelp;
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE Append (VAR name: ModuleName; ext: ARRAY OF CHAR);
|
PROCEDURE Append (VAR name: ModuleName; ext: ARRAY OF CHAR);
|
||||||
VAR i, j: INTEGER;
|
VAR i, j: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
@ -40,10 +56,13 @@ PROCEDURE ReadModuleList (VAR list: Module);
|
||||||
VAR m: Module; name: ModuleName;
|
VAR m: Module; name: ModuleName;
|
||||||
BEGIN
|
BEGIN
|
||||||
In.Open; list := NIL; In.Name(name);
|
In.Open; list := NIL; In.Name(name);
|
||||||
|
IF ~In.Done THEN showhelp
|
||||||
|
ELSE
|
||||||
WHILE In.Done DO
|
WHILE In.Done DO
|
||||||
NEW(m); m.name := name; m.imports := NIL; m.ref := 0; m.next := list; list := m;
|
NEW(m); m.name := name; m.imports := NIL; m.ref := 0; m.next := list; list := m;
|
||||||
In.Name(name)
|
In.Name(name)
|
||||||
END
|
END
|
||||||
|
END
|
||||||
END ReadModuleList;
|
END ReadModuleList;
|
||||||
|
|
||||||
PROCEDURE Find (list: Module; name: ModuleName; VAR m: Module);
|
PROCEDURE Find (list: Module; name: ModuleName; VAR m: Module);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue