> Does fpc accept relative path for -Fu in the fpc.cfg config file, something
> like:

> -Fu./units/$fpctarget
> -Fu./units/$fpctarget/*
> -Fu./units/$fpctarget/rtl 

No, it seems that it is not possible.

So I propose to do this, dont hurt existing code, only gives happiness:

in cfileutls.pas do this:

procedure TSearchPathList.AddPath(s:TCmdStr;addfirst:boolean);  
    begin
      if system.copy(s,1,2) = './' then
     begin         s :=
AnsiString(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0))) + 
         system.copy(s,3,length(s)-2));
      end;
      AddLibraryPath('',s,AddFirst);
     end;

Tested and re-tested, committed, it works like charms, with fpc.cfg in same
dir than fpc (first patch):

# searchpath for units and other system dependent things
-Fu./units/$fpctarget
-Fu./units/$fpctarget/*
-Fu./units/$fpctarget/rtl

OK, I let you in peace.

Take care of you.

Fre;D



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to