From: DeaDDooMER Date: Mon, 24 Feb 2020 19:46:06 +0000 (+0300) Subject: cpmake: find compiler/linker executable using DswProcs.Directory.GetPath X-Git-Url: https://deadsoftware.ru/gitweb?p=cpc.git;a=commitdiff_plain;h=fe8a1b7186dee342e1e5024ac44a3db8a98976aa;hp=7147de0ec5fe252c907577218ae17a28ac84daba cpmake: find compiler/linker executable using DswProcs.Directory.GetPath --- diff --git a/src/generic/Dsw/Mod/MakeMain.cp b/src/generic/Dsw/Mod/MakeMain.cp index e4f49c2..bd06566 100644 --- a/src/generic/Dsw/Mod/MakeMain.cp +++ b/src/generic/Dsw/Mod/MakeMain.cp @@ -107,6 +107,8 @@ MODULE DswMakeMain; | 22: msg := "linker terminated with code ^2" | 23: msg := "unable to execute linker" | 24: msg := "trap occured" + | 25: msg := "compiler not installed" + | 26: msg := "linker not installed" ELSE Strings.IntToString(err, msg) END; @@ -438,13 +440,19 @@ MODULE DswMakeMain; IF (exe # NIL) & (exe^ = "") THEN Error(19, "", "", 0) END; - IF cpcExe = NIL THEN - IF compiler = cpnative THEN cpcExe := NewStr("cpc486") - ELSIF compiler = cpfront THEN cpcExe := NewStr("cpfront") + IF (cpcExe = NIL) & (compiler # anycp) THEN + IF compiler = cpnative THEN cpcExe := DswProcs.dir.GetPath("cpc486") + ELSIF compiler = cpfront THEN cpcExe := DswProcs.dir.GetPath("cpfront") + END; + IF cpcExe = NIL THEN + Error(25, "", "", 0) END END; - IF cplExe = NIL THEN - IF linker = dev2 THEN cplExe := NewStr("cpl486") END + IF (cplExe = NIL) & (linker # anyint) THEN + cplExe := DswProcs.dir.GetPath("cpl486"); + IF cplExe = NIL THEN + Error(26, "", "", 0) + END END END CheckParams; @@ -776,13 +784,6 @@ MODULE DswMakeMain; w.PutParam("-define-"); w.PutParam("M68K"); END; CASE os OF - | anyos: - w.PutParam("-define-"); w.PutParam("POSIX"); - w.PutParam("-define-"); w.PutParam("LINUX"); - w.PutParam("-define-"); w.PutParam("FREEBSD"); - w.PutParam("-define-"); w.PutParam("OPENBSD"); - w.PutParam("-define-"); w.PutParam("WIN32"); - w.PutParam("-define-"); w.PutParam("DARWIN"); | linux: w.PutParam("-define+"); w.PutParam("POSIX"); w.PutParam("-define+"); w.PutParam("LINUX"); @@ -830,6 +831,13 @@ MODULE DswMakeMain; w.PutParam("-define-"); w.PutParam("WIN32"); w.PutParam("-define-"); w.PutParam("CYGWIN"); w.PutParam("-define+"); w.PutParam("DARWIN"); + ELSE + w.PutParam("-define-"); w.PutParam("POSIX"); + w.PutParam("-define-"); w.PutParam("LINUX"); + w.PutParam("-define-"); w.PutParam("FREEBSD"); + w.PutParam("-define-"); w.PutParam("OPENBSD"); + w.PutParam("-define-"); w.PutParam("WIN32"); + w.PutParam("-define-"); w.PutParam("DARWIN"); END; CASE linker OF | dev2: