--- Merging r32142 into '.':

U    packages/svgalib/fpmake.pp
U    packages/libndsfpc/fpmake.pp
U    packages/regexpr/fpmake.pp
U    packages/libogcfpc/fpmake.pp
U    packages/postgres/fpmake.pp
U    packages/os2units/fpmake.pp
U    packages/libxml/fpmake.pp
U    packages/libcurl/fpmake.pp
U    packages/gtk2/fpmake.pp
U    packages/odbc/fpmake.pp
U    packages/syslog/fpmake.pp
U    packages/libgd/fpmake.pp
U    packages/ibase/fpmake.pp
U    packages/fpmkunit/src/fpmkunit.pp
U    packages/opengles/fpmake.pp
U    packages/fcl-base/fpmake.pp
U    packages/gmp/fpmake.pp
U    packages/uuid/fpmake.pp
U    packages/libgbafpc/fpmake.pp
U    packages/ptc/fpmake.pp
U    ide/fpmake.pp
--- Recording mergeinfo for merge of r32142 into '.':
 U   .

# revisions: 32142

git-svn-id: branches/fixes_3_0@32242 -
This commit is contained in:
joost 2015-11-04 21:17:00 +00:00
parent fe336c38d4
commit 54cdefa707
21 changed files with 53 additions and 50 deletions

View File

@ -222,13 +222,13 @@ begin
AddSrc('readme.txt');
AddSrc('todo.txt');
AddSrc('fp.ans');
AddSrcFiles('*.tdf');
AddSrcFiles('*.pas',true);
AddSrcFiles('*.inc',true);
AddSrcFiles('*.rc');
AddSrcFiles('*.ico');
AddSrcFiles('*.term');
AddSrcFiles('*.pt');
AddSrcFiles('*.tdf',P.Directory);
AddSrcFiles('*.pas',P.Directory,true);
AddSrcFiles('*.inc',P.Directory,true);
AddSrcFiles('*.rc',P.Directory);
AddSrcFiles('*.ico',P.Directory);
AddSrcFiles('*.term',P.Directory);
AddSrcFiles('*.pt',P.Directory);
end;
P.CleanFiles.Add('$(UNITSOUTPUTDIR)ppheap.ppu');

View File

@ -118,7 +118,7 @@ begin
AddUnit('contnrs');
end;
// Additional sources
P.Sources.AddSrcFiles('src/win/fclel.*');
P.Sources.AddSrcFiles('src/win/fclel.*', P.Directory);
// Install windows resources
P.InstallFiles.Add('src/win/fclel.res',AllWindowsOSes,'$(unitinstalldir)');

View File

@ -726,10 +726,10 @@ Type
Function AddExample(const AFiles : String) : TSource;
Function AddExample(const AFiles : String; AInstallSourcePath : String) : TSource;
Function AddTest(const AFiles : String) : TSource;
procedure AddDocFiles(const AFileMask: string; Recursive: boolean = False; AInstallSourcePath : String = '');
procedure AddSrcFiles(const AFileMask: string; Recursive: boolean = False);
procedure AddExampleFiles(const AFileMask: string; Recursive: boolean = False; AInstallSourcePath : String = '');
procedure AddTestFiles(const AFileMask: string; Recursive: boolean = False);
procedure AddDocFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False; AInstallSourcePath : String = '');
procedure AddSrcFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False);
procedure AddExampleFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False; AInstallSourcePath : String = '');
procedure AddTestFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False);
Property SourceItems[Index : Integer] : TSource Read GetSourceItem Write SetSourceItem;default;
end;
@ -1368,7 +1368,7 @@ Function GetCustomFpmakeCommandlineOptionValue(const ACommandLineOption : string
Function AddProgramExtension(const ExecutableName: string; AOS : TOS) : string;
Function GetImportLibraryFilename(const UnitName: string; AOS : TOS) : string;
procedure SearchFiles(const AFileName: string; Recursive: boolean; var List: TStrings);
procedure SearchFiles(AFileName, ASearchPathPrefix: string; Recursive: boolean; var List: TStrings);
function GetDefaultLibGCCDir(CPU : TCPU;OS: TOS; var ErrorMessage: string): string;
Implementation
@ -2396,7 +2396,7 @@ begin
end;
procedure SearchFiles(const AFileName: string; Recursive: boolean; var List: TStrings);
procedure SearchFiles(AFileName, ASearchPathPrefix: string; Recursive: boolean; var List: TStrings);
procedure AddRecursiveFiles(const SearchDir, FileMask: string; Recursive: boolean);
var
@ -2419,12 +2419,16 @@ var
BasePath: string;
i: integer;
begin
if IsRelativePath(AFileName) and (ASearchPathPrefix<>'') then
AFileName := IncludeTrailingPathDelimiter(ASearchPathPrefix) + AFileName;
BasePath := ExtractFilePath(ExpandFileName(AFileName));
AddRecursiveFiles(BasePath, ExtractFileName(AFileName), Recursive);
CurrDir:=GetCurrentDir;
for i := 0 to Pred(List.Count) do
List[i] := ExtractRelativepath(IncludeTrailingPathDelimiter(CurrDir), List[i]);
List[i] := ExtractRelativepath(IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(CurrDir)+ASearchPathPrefix), List[i]);
end;
Const
@ -3157,53 +3161,52 @@ begin
Result.FSourceType:=stTest;
end;
procedure TSources.AddDocFiles(const AFileMask: string; Recursive: boolean; AInstallSourcePath : String = '');
procedure TSources.AddDocFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean; AInstallSourcePath: String);
var
List : TStrings;
i: integer;
begin
List := TStringList.Create;
SearchFiles(AFileMask, Recursive, List);
SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
for i:= 0 to Pred(List.Count) do
AddDoc(List[i], AInstallSourcePath);
List.Free;
end;
procedure TSources.AddSrcFiles(const AFileMask: string; Recursive: boolean);
procedure TSources.AddSrcFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean);
var
List : TStrings;
i: integer;
begin
List := TStringList.Create;
SearchFiles(AFileMask, Recursive, List);
SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
for i:= 0 to Pred(List.Count) do
AddSrc(List[i]);
List.Free;
end;
procedure TSources.AddExampleFiles(const AFileMask: string; Recursive: boolean; AInstallSourcePath : String = '');
procedure TSources.AddExampleFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean; AInstallSourcePath: String);
var
List : TStrings;
i: integer;
begin
List := TStringList.Create;
SearchFiles(AFileMask, Recursive, List);
SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
for i:= 0 to Pred(List.Count) do
AddExample(List[i], AInstallSourcePath);
List.Free;
end;
procedure TSources.AddTestFiles(const AFileMask: string; Recursive: boolean);
procedure TSources.AddTestFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean);
var
List : TStrings;
i: integer;
begin
List := TStringList.Create;
SearchFiles(AFileMask, Recursive, List);
SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
for i:= 0 to Pred(List.Count) do
AddTest(List[i]);
List.Free;

View File

@ -30,7 +30,7 @@ begin
T:=P.Targets.AddUnit('gmp.pas');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -1278,15 +1278,15 @@ begin
AddInclude('htmldocument.inc');
AddInclude('htmlview.inc');
end;}
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/filechooser/*',false,'filechooser');
P.Sources.AddExampleFiles('examples/gettingstarted/*',false,'gettingstarted');
P.Sources.AddExampleFiles('examples/gtk_demo/*',false,'gtk_demo');
P.Sources.AddExampleFiles('examples/gtkglext/*',false,'gtkglext');
P.Sources.AddExampleFiles('examples/helloworld/*',false,'helloworld');
P.Sources.AddExampleFiles('examples/helloworld2/*',false,'helloworld2');
P.Sources.AddExampleFiles('examples/plugins/*',false,'plugins');
P.Sources.AddExampleFiles('examples/scribble_simple/*',false,'scribble_simple');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
P.Sources.AddExampleFiles('examples/filechooser/*',P.Directory,false,'filechooser');
P.Sources.AddExampleFiles('examples/gettingstarted/*',P.Directory,false,'gettingstarted');
P.Sources.AddExampleFiles('examples/gtk_demo/*',P.Directory,false,'gtk_demo');
P.Sources.AddExampleFiles('examples/gtkglext/*',P.Directory,false,'gtkglext');
P.Sources.AddExampleFiles('examples/helloworld/*',P.Directory,false,'helloworld');
P.Sources.AddExampleFiles('examples/helloworld2/*',P.Directory,false,'helloworld2');
P.Sources.AddExampleFiles('examples/plugins/*',P.Directory,false,'plugins');
P.Sources.AddExampleFiles('examples/scribble_simple/*',P.Directory,false,'scribble_simple');
{$ifndef ALLPACKAGES}

View File

@ -45,7 +45,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testib40.pp');
P.Targets.AddExampleProgram('testib60.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -33,7 +33,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testcurl.pp');
P.Targets.AddExampleProgram('teststream.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}

View File

@ -70,7 +70,7 @@ begin
AddInclude('mm_types.inc');
end;
P.Sources.AddExampleFiles('examples/*',true,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,true,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -27,7 +27,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('gdtestcgi.pp');
P.Targets.AddExampleProgram('gdtest.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -144,7 +144,7 @@ begin
AddInclude('mm_types.inc');
end;
P.Sources.AddExampleFiles('examples/*',true,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,true,'.');
{$ifndef ALLPACKAGES}
Run;
end;

View File

@ -149,7 +149,7 @@ begin
AddInclude('wpad.inc');
end;
P.Sources.AddExampleFiles('examples/*',true,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,true,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -88,7 +88,7 @@ begin
P.Targets.AddExampleProgram('tree2.pas');
P.Targets.AddExampleProgram('exutils.pas');
P.Targets.AddExampleProgram('reader2.pas');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -34,7 +34,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testodbc.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -30,7 +30,7 @@ begin
T:=P.Targets.AddUnit('gles20.pas',[linux,win32,win64,wince,darwin]);
P.Targets.AddExampleProgram('examples/es2example1.pas');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}

View File

@ -46,7 +46,7 @@ begin
P.Targets.AddExampleProgram('clktest.pas');
P.Targets.AddExampleProgram('ftptest.pas');
P.Targets.AddExampleProgram('lvmtest.pas');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -57,7 +57,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testpg2.pp');
P.Targets.AddExampleProgram('testpg1.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -235,7 +235,7 @@ begin
P.Targets.AddExampleProgram('tunnel3d.pp');
P.Targets.AddExampleProgram('ptcgl.pp', AllUnixOSes + [win32, win64]);
P.Targets.AddExampleProgram('ptcgl2.pp', AllUnixOSes + [win32, win64]);
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -34,7 +34,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testreg1.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -28,7 +28,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testvga.pp');
P.Targets.AddExampleProgram('vgatest.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -24,7 +24,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testlog.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}
Run;

View File

@ -29,7 +29,7 @@ begin
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('testlibuid.pp');
P.Targets.AddExampleProgram('testuid.pp');
P.Sources.AddExampleFiles('examples/*',false,'.');
P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
{$ifndef ALLPACKAGES}