fpmake.pp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {$ifndef ALLPACKAGES}
  2. {$define allpackages}
  3. {$define no_parent}
  4. {$mode objfpc}{$H+}
  5. program fpmake;
  6. uses {$ifdef unix}cthreads,{$endif} sysutils, Classes, fpmkunit;
  7. Var
  8. TBuild,T : TTarget;
  9. PBuild,P : TPackage;
  10. D : TDependency;
  11. I : Integer;
  12. {$endif ALLPACKAGES}
  13. (*
  14. The include files are generated with the following commands:
  15. rm fpmake_proc.inc fpmake_add.inc ; /bin/ls -1 */fpmake.pp| while read file; do dir=`dirname $file` ; cleanedname=`echo $dir | sed -e 's+-+_+g'` ; if ! `grep -i "^procedure add_$cleanedname" $file >/dev/null` ; then printf 'procedure add_%s(const ADirectory: string);\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(ADirectory+IncludeTrailingPathDelimiter('$dir'));" >> fpmake_add.inc; done
  16. *)
  17. {$include fpmake_proc.inc}
  18. procedure add_packages(const ADirectory: string);
  19. begin
  20. AddCustomFpmakeCommandlineOption('data2inc', 'Use indicated data2inc executable.');
  21. AddCustomFpmakeCommandlineOption('genfpmkunit', 'Regenerate the fpmkunitsrc.inc file (fppkg).');
  22. {$include fpmake_add.inc}
  23. With Installer do
  24. begin
  25. // Create fpc-all package
  26. PBuild:=AddPackage('fpc-all');
  27. PBuild.ShortName := 'fpca';
  28. PBuild.Version:='3.3.1';
  29. { The source files fpmake_proc.inc and fpmake_add.inc
  30. need to be added explicitly to be integrated in source zip }
  31. PBuild.Sources.AddSrc('fpmake_proc.inc');
  32. PBuild.Sources.AddSrc('fpmake_add.inc');
  33. end;
  34. end;
  35. {$ifdef no_parent}
  36. begin
  37. add_packages('');
  38. Installer.Run;
  39. end.
  40. {$endif no_parent}