mirror of https://gitlab.com/basile.b/dexed.git
dexed proj format, fix symstring considered as rel path
This commit is contained in:
parent
b6ce7abc28
commit
deec267acf
|
@ -386,6 +386,13 @@ type
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
function mustPrependProjectRootPath(const str: string): Boolean;
|
||||||
|
begin
|
||||||
|
result := false;
|
||||||
|
if str.length > 0 then
|
||||||
|
result := (str[1] <> '<') and not FilenameIsAbsolute(str);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TOptsGroup.create;
|
constructor TOptsGroup.create;
|
||||||
begin
|
begin
|
||||||
fSymStringExpander := getSymStringExpander;
|
fSymStringExpander := getSymStringExpander;
|
||||||
|
@ -1072,7 +1079,7 @@ begin
|
||||||
s := fExtraSrcs[i];
|
s := fExtraSrcs[i];
|
||||||
if isStringDisabled(s) then
|
if isStringDisabled(s) then
|
||||||
continue;
|
continue;
|
||||||
if not FilenameIsAbsolute(s) then
|
if mustPrependProjectRootPath(s) then
|
||||||
s := c + s;
|
s := c + s;
|
||||||
s := fSymStringExpander.expand(s);
|
s := fSymStringExpander.expand(s);
|
||||||
if not listAsteriskPath(s, list, e) then
|
if not listAsteriskPath(s, list, e) then
|
||||||
|
@ -1103,7 +1110,7 @@ begin
|
||||||
str := fExtraSrcs[i];
|
str := fExtraSrcs[i];
|
||||||
if isStringDisabled(str) then
|
if isStringDisabled(str) then
|
||||||
continue;
|
continue;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
sym := fSymStringExpander.expand(str);
|
sym := fSymStringExpander.expand(str);
|
||||||
if not listAsteriskPath(sym, list, exts) then
|
if not listAsteriskPath(sym, list, exts) then
|
||||||
|
@ -1117,7 +1124,7 @@ begin
|
||||||
str := fImpMod[i];
|
str := fImpMod[i];
|
||||||
if isStringDisabled(str) then
|
if isStringDisabled(str) then
|
||||||
continue;
|
continue;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
list.Add('-I'+ fSymStringExpander.expand(str));
|
list.Add('-I'+ fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
|
@ -1126,21 +1133,21 @@ begin
|
||||||
str := fImpStr[i];
|
str := fImpStr[i];
|
||||||
if isStringDisabled(str) then
|
if isStringDisabled(str) then
|
||||||
continue;
|
continue;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
list.Add('-J'+ fSymStringExpander.expand(str));
|
list.Add('-J'+ fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
if fFname <> '' then
|
if fFname <> '' then
|
||||||
begin
|
begin
|
||||||
str := fFname;
|
str := fFname;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
list.Add('-of' + fSymStringExpander.expand(str));
|
list.Add('-of' + fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
if fObjDir <> '' then
|
if fObjDir <> '' then
|
||||||
begin
|
begin
|
||||||
str := fObjDir;
|
str := fObjDir;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
list.Add('-od' + fSymStringExpander.expand(str));
|
list.Add('-od' + fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
|
@ -1159,7 +1166,7 @@ begin
|
||||||
str := rightList[i];
|
str := rightList[i];
|
||||||
if isStringDisabled(str) then
|
if isStringDisabled(str) then
|
||||||
continue;
|
continue;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
sym := fSymStringExpander.expand(str);
|
sym := fSymStringExpander.expand(str);
|
||||||
if not listAsteriskPath(sym, list, exts) then
|
if not listAsteriskPath(sym, list, exts) then
|
||||||
|
@ -1178,7 +1185,7 @@ begin
|
||||||
str := rightList[i];
|
str := rightList[i];
|
||||||
if isStringDisabled(str) then
|
if isStringDisabled(str) then
|
||||||
continue;
|
continue;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
list.Add('-I'+ fSymStringExpander.expand(str));
|
list.Add('-I'+ fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
|
@ -1192,7 +1199,7 @@ begin
|
||||||
str := rightList[i];
|
str := rightList[i];
|
||||||
if isStringDisabled(str) then
|
if isStringDisabled(str) then
|
||||||
continue;
|
continue;
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + str;
|
str := c + str;
|
||||||
list.Add('-J'+ fSymStringExpander.expand(str));
|
list.Add('-J'+ fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
|
@ -1204,7 +1211,7 @@ begin
|
||||||
str := baseopt.fFname;
|
str := baseopt.fFname;
|
||||||
if str.isNotEmpty then
|
if str.isNotEmpty then
|
||||||
begin
|
begin
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + DirectorySeparator + str;
|
str := c + DirectorySeparator + str;
|
||||||
list.Add('-of' + fSymStringExpander.expand(str));
|
list.Add('-of' + fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
|
@ -1216,7 +1223,7 @@ begin
|
||||||
str := baseopt.fObjDir;
|
str := baseopt.fObjDir;
|
||||||
if str.isNotEmpty then
|
if str.isNotEmpty then
|
||||||
begin
|
begin
|
||||||
if not FilenameIsAbsolute(str) then
|
if mustPrependProjectRootPath(str) then
|
||||||
str := c + DirectorySeparator + str;
|
str := c + DirectorySeparator + str;
|
||||||
list.Add('-od' + fSymStringExpander.expand(str));
|
list.Add('-od' + fSymStringExpander.expand(str));
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue