fixed fpc src defines for bsd

git-svn-id: trunk@4451 -
This commit is contained in:
mattias 2003-08-03 10:27:31 +00:00
parent 3c90980862
commit 3fa610411f
3 changed files with 17 additions and 8 deletions

View File

@ -45,16 +45,15 @@
}
unit DefineTemplates;
{$ifdef FPC} {$mode objfpc} {$endif}{$H+}
{$mode objfpc}{$H+}
{ $Define VerboseDefineCache}
interface
uses
Classes, SysUtils, CodeToolsStrConsts, ExprEval
{$ifdef FPC}, Laz_XMLCfg{$endif}, AVL_Tree, Process,
KeywordFuncLists, FileProcs;
Classes, SysUtils, CodeToolsStrConsts, ExprEval, Laz_XMLCfg, AVL_Tree,
Process, KeywordFuncLists, FileProcs;
const
ExternalMacroStart = ExprEval.ExternalMacroStart;
@ -2592,7 +2591,11 @@ begin
ctsDefaultppc386TargetOperatingSystem,
ExternalMacroStart+'TargetOS',TargetOS,da_DefineRecurse);
AddTemplate(NewDefTempl);
if (TargetOS='linux') then
if (TargetOS='linux')
or (TargetOS='freebsd')
or (TargetOS='netbsd')
or (TargetOS='openbsd')
then
SrcOS:='unix'
else
SrcOS:=TargetOS;
@ -2781,7 +2784,7 @@ var
SrcOSMacroUsed: boolean;
i: integer;
begin
// writeln('%%%Browse ',ADirPath);
//writeln('Browse ',ADirPath);
if ADirPath='' then exit;
if not (ADirPath[length(ADirPath)]=PathDelim) then
ADirPath:=ADirPath+PathDelim;
@ -2897,13 +2900,13 @@ var
inc(PathEnd);
if PathEnd>PathStart then begin
ADirPath:=copy(UnitSearchPath,PathStart,PathEnd-PathStart);
//writeln('&&& FindStandardPPUSources ',ADirPath);
//writeln('FindStandardPPUSources A ',ADirPath);
// search all ppu files in this directory
if FindFirst(ADirPath+CurMask,faAnyFile,FileInfo)=0 then begin
repeat
UnitName:=ExtractFileName(FileInfo.Name);
UnitName:=copy(UnitName,1,length(UnitName)-4);
//writeln('&&& FindStandardPPUSources B ',UnitName);
//writeln('FindStandardPPUSources B ',UnitName);
AddFPCSourceLinkForUnit(UnitName);
until FindNext(FileInfo)<>0;
end;

View File

@ -3530,6 +3530,8 @@ begin
then begin
if Scanner.InitialValues.IsDefined('LINUX') then
SystemAlias:='SYSLINUX'
else if Scanner.InitialValues.IsDefined('BSD') then
SystemAlias:='SYSBSD'
else if Scanner.InitialValues.IsDefined('WIN32') then
SystemAlias:='SYSWIN32';
end;

View File

@ -7637,6 +7637,7 @@ begin
CompilerUnitLinks:='';
if UnitLinksValid then
CompilerUnitLinks:=InputHistories.FPCConfigCache.GetUnitLinks(CurOptions);
FPCSrcTemplate:=CodeToolBoss.DefinePool.CreateFPCSrcTemplate(
CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'FPCSrcDir'],
CompilerUnitSearchPath,
@ -9366,6 +9367,9 @@ end.
{ =============================================================================
$Log$
Revision 1.629 2003/08/03 10:27:30 mattias
fixed fpc src defines for bsd
Revision 1.628 2003/07/31 19:56:49 mattias
fixed double messages SETLabel