* fixed dblib/fpmake.pp and fpindexer/fpmake.pp when they are included from

the top-level fpmake.pp
  * replaced commands to regenerate fpmake*.inc in top level fpmake.pp with
    ones that don't depend on GNU awk, and which automatically recognize
    nested fpmake files that contain their own add_XXX procedure and hence
    must not get a wrapper
  * regenerated fpmake*.inc so that fpindexer and opengles are now also
    built, and dblib/fpmake.pp does not get a wrapper

git-svn-id: trunk@20625 -
This commit is contained in:
Jonas Maebe 2012-03-25 14:09:04 +00:00
parent c4c9661f84
commit 5a05542ddb
5 changed files with 88 additions and 76 deletions

View File

@ -4,36 +4,41 @@ program fpmake;
uses fpmkunit;
{$endif not ALLPACKAGES}
procedure add_dblib;
Const
DBLibOSes = [linux,freebsd,netbsd,openbsd,win32];
Var
P : TPackage;
T : TTarget;
begin
With Installer do
begin
{$endif ALLPACKAGES}
P:=AddPackage('dblib');
P:=AddPackage('dblib');
{$ifdef ALLPACKAGES}
P.Directory:='dblib';
P.Directory:='dblib';
{$endif ALLPACKAGES}
P.Version:='1.0';
P.Author := 'Library: (FreeTDS/Microsoft), header: Ladislav Karrach';
P.License := 'Library: FreeTDS License, header: LGPL with modification, ';
P.HomepageURL := 'www.freepascal.org';
P.Email := '';
P.Description := 'Headers for the MS SQL Server RDBMS';
P.NeedLibC:= true; // true for headers that indirectly link to libc?
P.Version:='1.0';
P.Author := 'Library: (FreeTDS/Microsoft), header: Ladislav Karrach';
P.License := 'Library: FreeTDS License, header: LGPL with modification, ';
P.HomepageURL := 'www.freepascal.org';
P.Email := '';
P.Description := 'Headers for the MS SQL Server RDBMS';
P.NeedLibC:= true; // true for headers that indirectly link to libc?
P.SourcePath.Add('src');
P.IncludePath.Add('src');
P.SourcePath.Add('src');
P.IncludePath.Add('src');
T:=P.Targets.AddUnit('dblib.pp',DBLibOSes);
T:=P.Targets.AddUnit('dblib.pp',DBLibOSes);
end;
end;
{$ifndef ALLPACKAGES}
Run;
end;
begin
add_dblib;
Installer.Run;
end.
{$endif ALLPACKAGES}

View File

@ -3,7 +3,9 @@
program fpmake;
uses fpmkunit;
{$endif ALLPACKAGES}
procedure add_fpindexer;
Const
SqldbConnectionOSes = [beos,linux,freebsd,win32,win64,wince,darwin,iphonesim,netbsd,openbsd];
SqliteOSes = [beos,haiku,linux,freebsd,darwin,iphonesim,solaris,netbsd,openbsd,win32,wince];
@ -14,62 +16,62 @@ Var
begin
With Installer do
begin
{$endif ALLPACKAGES}
P:=AddPackage('fpindexer');
P:=AddPackage('fpindexer');
{$ifdef ALLPACKAGES}
P.Directory:='fpindexer';
P.Directory:='fpindexer';
{$endif ALLPACKAGES}
P.Version:='2.7.1';
P.OSes := [beos,haiku,freebsd,darwin,solaris,netbsd,openbsd,linux,win32,win64,wince];
P.Dependencies.Add('fcl-base');
P.Dependencies.Add('fcl-db');
P.Dependencies.Add('chm'); // for fastreaderhtml
P.Dependencies.Add('sqlite');
P.Author := 'Free Pascal development team';
P.License := 'LGPL with modification, ';
P.HomepageURL := 'www.freepascal.org';
P.Email := '';
P.Description := 'Free Pascal text indexer and search engine.';
P.NeedLibC:= false;
P.SourcePath.Add('src');
T:=P.Targets.AddUnit('fpmasks.pp');
T:=P.Targets.AddUnit('fpindexer.pp');
T.Dependencies.AddUnit('fpmasks');
T.ResourceStrings:=true;
T:=P.Targets.AddUnit('memindexdb.pp');
T.ResourceStrings:=true;
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('ireaderhtml.pp');
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('ireaderpas.pp');
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('ireadertxt.pp');
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('sqldbindexdb.pp',SqldbConnectionOSes);
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('sqliteindexdb.pp',SqliteOSes);
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('fbindexdb.pp',SqliteOSes);
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('dbindexer.pp',SqldbConnectionOSes);
T.Dependencies.AddUnit('fpindexer');
T.Dependencies.AddUnit('ireadertxt');
P.Version:='2.7.1';
P.OSes := [beos,haiku,freebsd,darwin,solaris,netbsd,openbsd,linux,win32,win64,wince];
P.Dependencies.Add('fcl-base');
P.Dependencies.Add('fcl-db');
P.Dependencies.Add('chm'); // for fastreaderhtml
P.Dependencies.Add('sqlite');
P.Author := 'Free Pascal development team';
P.License := 'LGPL with modification, ';
P.HomepageURL := 'www.freepascal.org';
P.Email := '';
P.Description := 'Free Pascal text indexer and search engine.';
P.NeedLibC:= false;
P.SourcePath.Add('src');
T:=P.Targets.AddUnit('fpmasks.pp');
T:=P.Targets.AddUnit('fpindexer.pp');
T.Dependencies.AddUnit('fpmasks');
T.ResourceStrings:=true;
T:=P.Targets.AddUnit('memindexdb.pp');
T.ResourceStrings:=true;
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('ireaderhtml.pp');
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('ireaderpas.pp');
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('ireadertxt.pp');
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('sqldbindexdb.pp',SqldbConnectionOSes);
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('sqliteindexdb.pp',SqliteOSes);
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('fbindexdb.pp',SqliteOSes);
T.Dependencies.AddUnit('fpindexer');
T:=P.Targets.AddUnit('dbindexer.pp',SqldbConnectionOSes);
T.Dependencies.AddUnit('fpindexer');
T.Dependencies.AddUnit('ireadertxt');
end;
end;
{$ifndef ALLPACKAGES}
Run;
end;
begin
add_fpindexer;
Installer.Run;
end.
{$endif ALLPACKAGES}

View File

@ -14,8 +14,7 @@ Var
The include files are generated with the following commands:
/bin/ls -1 */fpmake.pp | awk -F '/' '/fpmake.pp/ { printf "procedure add_%s;\nbegin\n with Installer do\n{$include %s}\nend;\n\n",gensub("-","_","g",$1),$0; }' > fpmake_proc.inc
/bin/ls -1 */fpmake.pp | awk -F '/' '/fpmake.pp/ { printf " add_%s;\n",gensub("-","_","g",$1); }' > fpmake_add.inc
rm fpmake_proc.inc fpmake_add.inc ; /bin/ls -1 */fpmake.pp| while read file; do cleanedname=`dirname $file | sed -e 's+-+_+g'` ; if ! `grep -i "^procedure add_$cleanedname" $file >/dev/null` ; then printf 'procedure add_%s;\nbegin\n with Installer do\n{$include %s}\nend;\n\n' $cleanedname $file >> fpmake_proc.inc; else printf '{$include %s}\n\n' $file >> fpmake_proc.inc; fi; echo " add_$cleanedname;" >> fpmake_add.inc; done
*)

View File

@ -29,6 +29,7 @@
add_fcl_xml;
add_fftw;
add_fpgtk;
add_fpindexer;
add_fpmkunit;
add_fppkg;
add_fv;
@ -74,6 +75,7 @@
add_openal;
add_opencl;
add_opengl;
add_opengles;
add_openssl;
add_oracle;
add_os2units;

View File

@ -52,11 +52,7 @@ begin
{$include cocoaint/fpmake.pp}
end;
procedure add_dblib;
begin
with Installer do
{$include dblib/fpmake.pp}
end;
procedure add_dbus;
begin
@ -180,6 +176,8 @@ begin
{$include fpgtk/fpmake.pp}
end;
{$include fpindexer/fpmake.pp}
procedure add_fpmkunit;
begin
with Installer do
@ -442,6 +440,12 @@ begin
{$include opengl/fpmake.pp}
end;
procedure add_opengles;
begin
with Installer do
{$include opengles/fpmake.pp}
end;
procedure add_openssl;
begin
with Installer do