From 5a05542ddb4749ba6e0783b042203476ac1c03e4 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 25 Mar 2012 14:09:04 +0000 Subject: [PATCH] * 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 - --- packages/dblib/fpmake.pp | 39 +++++++------ packages/fpindexer/fpmake.pp | 108 ++++++++++++++++++----------------- packages/fpmake.pp | 3 +- packages/fpmake_add.inc | 2 + packages/fpmake_proc.inc | 12 ++-- 5 files changed, 88 insertions(+), 76 deletions(-) diff --git a/packages/dblib/fpmake.pp b/packages/dblib/fpmake.pp index 72422c0051..55eddda233 100644 --- a/packages/dblib/fpmake.pp +++ b/packages/dblib/fpmake.pp @@ -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} diff --git a/packages/fpindexer/fpmake.pp b/packages/fpindexer/fpmake.pp index 9a6425a2f8..aff538dedf 100644 --- a/packages/fpindexer/fpmake.pp +++ b/packages/fpindexer/fpmake.pp @@ -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} diff --git a/packages/fpmake.pp b/packages/fpmake.pp index 8d00250e6f..d4ce7de7f2 100644 --- a/packages/fpmake.pp +++ b/packages/fpmake.pp @@ -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 *) diff --git a/packages/fpmake_add.inc b/packages/fpmake_add.inc index 606cfc66ff..e40388e0d9 100644 --- a/packages/fpmake_add.inc +++ b/packages/fpmake_add.inc @@ -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; diff --git a/packages/fpmake_proc.inc b/packages/fpmake_proc.inc index c1672545d1..0f1ac1dedf 100644 --- a/packages/fpmake_proc.inc +++ b/packages/fpmake_proc.inc @@ -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