codetools: fixed fpc src include path for directory rtl

git-svn-id: trunk@31021 -
This commit is contained in:
mattias 2011-06-03 14:03:26 +00:00
parent decee4a238
commit 03e335fd0e
22 changed files with 114 additions and 39 deletions

View File

@ -238,6 +238,7 @@ ResourceString
ctsAddsDirToSourcePath = 'adds %s to SrcPath';
ctsIfDefWindows = 'IfDef Windows';
ctsIfDefLinux = 'IfDef Linux';
ctsIfDefDarwin = 'IfDef Darwin';
ctsAddsDirToIncludePath = 'adds %s to IncPath';
ctsSetsIncPathTo = 'sets IncPath to %s';
ctsSetsSrcPathTo = 'sets SrcPath to %s';

View File

@ -510,7 +510,7 @@ type
function CreateFPCSrcTemplate(const FPCSrcDir, UnitSearchPath, PPUExt,
DefaultTargetOS, DefaultProcessorName: string;
UnitLinkListValid: boolean; var UnitLinkList: string;
Owner: TObject): TDefineTemplate;
Owner: TObject): TDefineTemplate; deprecated;
function CreateFPCCommandLineDefines(const Name, CmdLine: string;
RecursiveDefines: boolean;
Owner: TObject;
@ -2010,6 +2010,30 @@ begin
['objpas, inc,'+TargetProcessor+','+SrcOS]),
ExternalMacroStart+'IncPath',s,da_DefineRecurse));
// if solaris or darwin or beos then define FPC_USE_LIBC
IFTempl:=TDefineTemplate.Create('IF darwin or solaris or beos',
'If Darwin or Solaris or Beos', '', 'defined(darwin) or defined(solaris) or defined(beos)', da_If);
// then define FPC_USE_LIBC
IFTempl.AddChild(TDefineTemplate.Create('define FPC_USE_LIBC',
'define FPC_USE_LIBC','FPC_USE_LIBC','',da_DefineRecurse));
RTLDir.AddChild(IFTempl);
// rtl: IF SrcOS=win then add include path rtl/win/wininc
IFTempl:=TDefineTemplate.Create('If SrcOS=win','If SrcOS=win',
'',''''+SrcOS+'''=''win''',da_If);
IFTempl.AddChild(TDefineTemplate.Create('Include Path',
Format(ctsIncludeDirectoriesPlusDirs,['wininc']),
ExternalMacroStart+'IncPath',
IncPathMacro
+';'+Dir+'rtl'+DS+'win'+DS+'wininc'
+';'+Dir+'rtl'+DS+'win',
da_DefineRecurse));
RTLDir.AddChild(IFTempl);
// add processor and SrcOS alias defines for the RTL
AddProcessorTypeDefine(RTLDir);
AddSrcOSDefines(RTLDir);
// rtl/$(#TargetOS)
RTLOSDir:=TDefineTemplate.Create('TargetOS','Target OS','',
TargetOSMacro,da_Directory);
@ -2028,33 +2052,6 @@ begin
ExternalMacroStart+'SrcPath',s,da_DefineRecurse));
RTLDir.AddChild(RTLOSDir);
// rtl: IF SrcOS=win then add include path rtl/win/wininc
IFTempl:=TDefineTemplate.Create('If SrcOS=win','If SrcOS=win',
'',''''+SrcOS+'''=''win''',da_If);
IFTempl.AddChild(TDefineTemplate.Create('Include Path',
Format(ctsIncludeDirectoriesPlusDirs,['wininc']),
ExternalMacroStart+'IncPath',
IncPathMacro
+';'+Dir+'rtl'+DS+'win'+DS+'wininc'
+';'+Dir+'rtl'+DS+'win',
da_DefineRecurse));
RTLDir.AddChild(IFTempl);
// rtl: IF TargetOS=darwin then add include path rtl/freebsd
IFTempl:=TDefineTemplate.Create('If TargetOS=darwin','If TargetOS=darwin',
'',''''+TargetOSMacro+'''=''darwin''',da_If);
IFTempl.AddChild(TDefineTemplate.Create('Include Path',
Format(ctsIncludeDirectoriesPlusDirs,['rtl'+DS+'freebsd']),
ExternalMacroStart+'IncPath',
IncPathMacro
+';'+Dir+'rtl'+DS+'freebsd',
da_DefineRecurse));
RTLDir.AddChild(IFTempl);
// add processor and SrcOS alias defines for the RTL
AddProcessorTypeDefine(RTLDir);
AddSrcOSDefines(RTLDir);
// fcl
FCLDir:=TDefineTemplate.Create('FCL',ctsFreePascalComponentLibrary,'','fcl',
@ -5724,6 +5721,14 @@ begin
ExternalMacroStart+'SrcPath',s,da_DefineRecurse));
RTLDir.AddChild(RTLOSDir);
// if solaris or darwin or beos then define FPC_USE_LIBC
IFTempl:=TDefineTemplate.Create('IF darwin or solaris or beos',
'If Darwin or Solaris or Beos', '', 'defined(darwin) or defined(solaris) or defined(beos)', da_If);
// then define FPC_USE_LIBC
IFTempl.AddChild(TDefineTemplate.Create('define FPC_USE_LIBC',
'define FPC_USE_LIBC','FPC_USE_LIBC','',da_DefineRecurse));
RTLDir.AddChild(IFTempl);
// rtl: IF SrcOS=win then add include path rtl/win/wininc
IFTempl:=TDefineTemplate.Create('If SrcOS=win','If SrcOS=win',
'',''''+SrcOS+'''=''win''',da_If);
@ -5736,17 +5741,6 @@ begin
da_DefineRecurse));
RTLDir.AddChild(IFTempl);
// rtl: IF TargetOS=darwin then add include path rtl/freebsd
IFTempl:=TDefineTemplate.Create('If TargetOS=darwin','If TargetOS=darwin',
'',''''+TargetOSMacro+'''=''darwin''',da_If);
IFTempl.AddChild(TDefineTemplate.Create('Include Path',
Format(ctsIncludeDirectoriesPlusDirs,['rtl'+DS+'freebsd']),
ExternalMacroStart+'IncPath',
IncPathMacro
+';'+Dir+'rtl'+DS+'freebsd',
da_DefineRecurse));
RTLDir.AddChild(IFTempl);
// add processor and SrcOS alias defines for the RTL
AddProcessorTypeDefine(RTLDir);
AddSrcOSDefines(RTLDir);

View File

@ -449,6 +449,10 @@ msgstr "L'identificador %s ja està definit"
msgid "identifier not found: %s"
msgstr "no s'ha trobat l'identificador: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -450,6 +450,10 @@ msgstr "Identifikátor %s již definován"
msgid "identifier not found: %s"
msgstr "Identifikátor nenalezen: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -452,6 +452,10 @@ msgstr "Bezeichner %s ist bereits definiert"
msgid "identifier not found: %s"
msgstr "Bezeichner nicht gefunden: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -449,6 +449,10 @@ msgstr "Ya fue definido el identificador %s"
msgid "identifier not found: %s"
msgstr "identificador no encontrado: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -448,6 +448,10 @@ msgstr "Ya fue definido el identificador %s"
msgid "identifier not found: %s"
msgstr "identificador no encontrado: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -442,6 +442,10 @@ msgstr ""
msgid "identifier not found: %s"
msgstr ""
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -450,6 +450,10 @@ msgstr "Identificateur %s déjà défini"
msgid "identifier not found: %s"
msgstr "identificateur %s non trouvé"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -449,6 +449,10 @@ msgstr "מזהה s% כבר הוגדר"
msgid "identifier not found: %s"
msgstr "מזהה לא נמצא: יחידה s%"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "אם מוגדר לינוקס"

View File

@ -450,6 +450,10 @@ msgstr "Pengenal %s sudah didefinisikan"
msgid "identifier not found: %s"
msgstr "pengenal tidak ditemukan: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -447,6 +447,10 @@ msgstr "Identificatore %s già definito"
msgid "identifier not found: %s"
msgstr "identificatore non trovato: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -451,6 +451,10 @@ msgstr "Apibrėžtis %s jau yra įgyvendinta"
msgid "identifier not found: %s"
msgstr "identifikatorius nerastas: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -449,6 +449,10 @@ msgstr ""
msgid "identifier not found: %s"
msgstr ""
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -453,6 +453,10 @@ msgstr "Identyfikator %s jest już zdefiniowany"
msgid "identifier not found: %s"
msgstr "nie znaleziono identyfikatora: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -442,6 +442,10 @@ msgstr ""
msgid "identifier not found: %s"
msgstr ""
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -449,6 +449,10 @@ msgstr "Identificador %s já definido"
msgid "identifier not found: %s"
msgstr "identificador não encontrado: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -449,6 +449,10 @@ msgstr "Identificador %s já definido"
msgid "identifier not found: %s"
msgstr "identificador não encontrado: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -448,6 +448,10 @@ msgstr "Идентификатор %s уже определён"
msgid "identifier not found: %s"
msgstr "не найден идентификатор: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -448,6 +448,10 @@ msgstr ""
msgid "identifier not found: %s"
msgstr ""
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""

View File

@ -447,6 +447,10 @@ msgstr "Ідентифікатор %s вже визначений"
msgid "identifier not found: %s"
msgstr "не знайдений ідентифікатор: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr "IfDef Linux"

View File

@ -452,6 +452,10 @@ msgstr "标识符 %s 已经定义"
msgid "identifier not found: %s"
msgstr "标识符未找到: %s"
#: codetoolsstrconsts.ctsifdefdarwin
msgid "IfDef Darwin"
msgstr ""
#: codetoolsstrconsts.ctsifdeflinux
msgid "IfDef Linux"
msgstr ""