summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b97dcad)
raw | patch | inline | side by side (parent: b97dcad)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 4 Aug 2020 17:58:59 +0000 (20:58 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 4 Aug 2020 17:58:59 +0000 (20:58 +0300) |
src/generic/Dsw/Mod/MakeMain.cp | patch | blob | history |
index b88795d846777093012fcf5ba61934780c18ff28..25c80b5b0bdfcb5c9026bd14eaac4323fadad02b 100644 (file)
END
END Define;
+ PROCEDURE DefineNew (IN n: ARRAY OF CHAR);
+ BEGIN
+ Define(n, FALSE);
+ END DefineNew;
+
PROCEDURE AddModule (IN n: ARRAY OF CHAR; selectors: Selector; dir: DevCPM.Directory);
VAR i, res: INTEGER; m: Module;
BEGIN
END
END ParseArgs;
- PROCEDURE ReadDefines;
- VAR loc: Files.Locator; name: Files.Name; m: DswDocuments.Model; r: DswDocuments.Reader; i, res: INTEGER;
+ PROCEDURE ReadLines (loc: Files.Locator; IN name: Files.Name; p: PROCEDURE (IN s: ARRAY OF CHAR));
+ VAR s: Name; m: DswDocuments.Model; r: DswDocuments.Reader; i, res: INTEGER;
BEGIN
- loc := Files.dir.This(base).This(target);
- DswDocuments.Open(loc, "defines", m, res);
+ ASSERT(loc # NIL, 20);
+ ASSERT(name # "", 21);
+ ASSERT(p # NIL, 22);
+ DswDocuments.Open(loc, name, m, res);
IF res = 0 THEN
r := m.NewReader(NIL);
r.SetPos(0);
WHILE ~r.eot DO
i := 0;
WHILE ~r.eot & (r.char <= 20X) DO r.Read END;
- WHILE ~r.eot & (r.char > 20X) DO name[i] := r.char; r.Read; INC(i) END;
- IF i # 0 THEN name[i] := 0X; Define(name, FALSE) END
+ WHILE ~r.eot & (r.char > 20X) DO s[i] := r.char; r.Read; INC(i) END;
+ IF i # 0 THEN s[i] := 0X; p(s) END
END
END
- END ReadDefines;
+ END ReadLines;
PROCEDURE CheckParams;
+ VAR loc: Files.Locator;
BEGIN
IF (exe # NIL) & (exe^ = "") THEN
Error("specified empty file name for exe", "", "", 0)
IF base^ = "" THEN
Error("specified empty path to cpmake rules", "", "", 0)
END;
- ReadDefines
+ loc := Files.dir.This(base).This(target);
+ ReadLines(loc, "defines", DefineNew);
+ ReadLines(loc, "libs", AddLib)
END CheckParams;
(* --------- loader --------- *)