mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 07:09:09 +02:00
* enable to check the existing of environment variables in config files
This commit is contained in:
parent
910fc7215d
commit
7e3bdd501c
@ -3483,7 +3483,11 @@ begin
|
|||||||
stopOptions(1);
|
stopOptions(1);
|
||||||
end;
|
end;
|
||||||
inc(Level);
|
inc(Level);
|
||||||
skip[level]:=(skip[level-1] or not defined_macro(upper(GetName(opts))));
|
{ environment variable? }
|
||||||
|
if (opts[1]='$') and (opts[length(opts)]='$') then
|
||||||
|
skip[level]:=skip[level-1] or (GetEnvironmentVariable(copy(opts,2,length(opts)-2))='')
|
||||||
|
else
|
||||||
|
skip[level]:=(skip[level-1] or not defined_macro(upper(GetName(opts))));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (s='IFNDEF') then
|
if (s='IFNDEF') then
|
||||||
@ -3495,7 +3499,11 @@ begin
|
|||||||
stopOptions(1);
|
stopOptions(1);
|
||||||
end;
|
end;
|
||||||
inc(Level);
|
inc(Level);
|
||||||
skip[level]:=(skip[level-1] or defined_macro(upper(GetName(opts))));
|
{ environment variable? }
|
||||||
|
if (opts[1]='$') and (opts[length(opts)]='$') then
|
||||||
|
skip[level]:=skip[level-1] or (GetEnvironmentVariable(copy(opts,2,length(opts)-2))<>'')
|
||||||
|
else
|
||||||
|
skip[level]:=skip[level-1] or defined_macro(upper(GetName(opts)));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (s='ELSE') then
|
if (s='ELSE') then
|
||||||
|
Loading…
Reference in New Issue
Block a user