diff --git a/ide/include/freebsd/lazconf.inc b/ide/include/freebsd/lazconf.inc index 4cbe670e33..9e9be06ae3 100644 --- a/ide/include/freebsd/lazconf.inc +++ b/ide/include/freebsd/lazconf.inc @@ -109,6 +109,16 @@ begin Result:=SearchFileInPath('make','',GetEnv('PATH'),':'); end; +function CreateCompilerTestPascalFilename: string; +var + fs: TFileStream; +begin + Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas'; + if not FileExists(Result) then begin + fs:=TFileStream.Create(Result,fmCreate); + fs.Free; + end; +end; initialization PrimaryConfigPath:=FExpand('~/.lazarus'); @@ -117,6 +127,9 @@ initialization { $Log$ + Revision 1.7 2002/12/20 11:08:47 mattias + method resolution clause, class ancestor find declaration, 1.1. makros + Revision 1.6 2002/07/01 05:53:31 lazarus MG: improved default make path for build lazarus diff --git a/ide/include/linux/lazconf.inc b/ide/include/linux/lazconf.inc index c8f26396df..2bae562883 100644 --- a/ide/include/linux/lazconf.inc +++ b/ide/include/linux/lazconf.inc @@ -101,6 +101,17 @@ begin end; end; +function CreateCompilerTestPascalFilename: string; +var + fs: TFileStream; +begin + Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas'; + if not FileExists(Result) then begin + fs:=TFileStream.Create(Result,fmCreate); + fs.Free; + end; +end; + function FindDefaultCompilerPath: string; begin Result:=SearchFileInPath('ppc386','',GetEnv('PATH'),':'); @@ -117,6 +128,9 @@ initialization { $Log$ + Revision 1.9 2002/12/20 11:08:47 mattias + method resolution clause, class ancestor find declaration, 1.1. makros + Revision 1.8 2002/07/01 05:53:31 lazarus MG: improved default make path for build lazarus diff --git a/ide/include/netbsd/lazconf.inc b/ide/include/netbsd/lazconf.inc index ce5e859d95..2b6acd12d2 100644 --- a/ide/include/netbsd/lazconf.inc +++ b/ide/include/netbsd/lazconf.inc @@ -109,6 +109,16 @@ begin Result:=SearchFileInPath('make','',GetEnv('PATH'),':'); end; +function CreateCompilerTestPascalFilename: string; +var + fs: TFileStream; +begin + Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas'; + if not FileExists(Result) then begin + fs:=TFileStream.Create(Result,fmCreate); + fs.Free; + end; +end; initialization PrimaryConfigPath:=FExpand('~/.lazarus'); @@ -117,6 +127,9 @@ initialization { $Log$ + Revision 1.4 2002/12/20 11:08:47 mattias + method resolution clause, class ancestor find declaration, 1.1. makros + Revision 1.3 2002/07/01 05:53:31 lazarus MG: improved default make path for build lazarus diff --git a/ide/include/win32/lazconf.inc b/ide/include/win32/lazconf.inc index 0d99823142..6acb987d40 100644 --- a/ide/include/win32/lazconf.inc +++ b/ide/include/win32/lazconf.inc @@ -103,17 +103,29 @@ begin Result:=''; end; +function CreateCompilerTestPascalFilename: string; +var + fs: TFileStream; +begin + Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas'; + if not FileExists(Result) then begin + fs:=TFileStream.Create(Result,fmCreate); + fs.Free; + end; +end; + initialization PrimaryConfigPath:=ExtractFilePath(Paramstr(0)); - { This might need some work because on WinNT the - the path is called something different on almost every - version of Windows. Probably can use the Windows API to + { This need some work. Probably one can use the Windows API to get the system path. } SecondaryConfigPath:='\windows\system'; { $Log$ + Revision 1.7 2002/12/20 11:08:47 mattias + method resolution clause, class ancestor find declaration, 1.1. makros + Revision 1.6 2002/07/01 05:53:31 lazarus MG: improved default make path for build lazarus diff --git a/ide/lazconf.pp b/ide/lazconf.pp index 5e3aaa1720..5c0d3f1395 100644 --- a/ide/lazconf.pp +++ b/ide/lazconf.pp @@ -46,7 +46,7 @@ interface {$endif} uses - SysUtils, Classes, IDEProcs; + SysUtils, Classes, FileProcs, IDEProcs; { Config Path Functions } @@ -67,6 +67,8 @@ uses function FindDefaultCompilerPath: string; function FindDefaultMakePath: string; + + function CreateCompilerTestPascalFilename: string; implementation @@ -76,6 +78,9 @@ end. { $Log$ + Revision 1.9 2002/12/20 11:08:47 mattias + method resolution clause, class ancestor find declaration, 1.1. makros + Revision 1.8 2002/07/01 05:53:31 lazarus MG: improved default make path for build lazarus diff --git a/ide/main.pp b/ide/main.pp index 2e7d326c65..bdf8a855ad 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -2352,7 +2352,8 @@ var EnvironmentOptionsDialog: TEnvironmentOptionsDialog; // rescan compiler defines // ask the compiler for its settings CompilerTemplate:=CodeToolBoss.DefinePool.CreateFPCTemplate( - EnvironmentOptions.CompilerFilename,CompilerUnitSearchPath); + EnvironmentOptions.CompilerFilename, + CreateCompilerTestPascalFilename,CompilerUnitSearchPath); if CompilerTemplate<>nil then begin CodeToolBoss.DefineTree.ReplaceRootSameNameAddFirst(CompilerTemplate); // create compiler macros to simulate the Makefiles of the FPC sources @@ -6209,7 +6210,7 @@ begin with CodeToolBoss.DefinePool do begin // start the compiler and ask for his settings ADefTempl:=CreateFPCTemplate(EnvironmentOptions.CompilerFilename, - CompilerUnitSearchPath); + CreateCompilerTestPascalFilename,CompilerUnitSearchPath); AddTemplate(ADefTempl,false, 'NOTE: Could not create Define Template for Free Pascal Compiler'); @@ -7520,6 +7521,9 @@ end. { ============================================================================= $Log$ + Revision 1.439 2002/12/20 11:08:47 mattias + method resolution clause, class ancestor find declaration, 1.1. makros + Revision 1.438 2002/12/17 19:49:33 mattias finished publish project