fpmake.pp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {$ifndef ALLPACKAGES}
  2. {$mode objfpc}{$H+}
  3. program fpmake;
  4. uses fpmkunit;
  5. {$endif ALLPACKAGES}
  6. procedure add_h2pas(const ADirectory: string);
  7. Var
  8. P : TPackage;
  9. T : TTarget;
  10. begin
  11. With Installer do
  12. begin
  13. P:=AddPackage('utils-h2pas');
  14. P.Author := '<various>';
  15. P.License := 'LGPL with modification';
  16. P.HomepageURL := 'www.freepascal.org';
  17. P.Email := '';
  18. P.Description := 'An utility to create Pascal header files from c header files.';
  19. P.NeedLibC:= false;
  20. P.Directory:=ADirectory;
  21. P.Version:='2.7.1';
  22. P.Options.Add('-Sg');
  23. p.Commands.AddCommand(caBeforeCompile, AddProgramExtension('pyacc', Defaults.BuildOS), '$(SOURCE) $(DEST)','h2pas.pas','h2pas.y');
  24. p.Commands.AddCommand(caBeforeCompile, AddProgramExtension('plex', Defaults.BuildOS), '$(SOURCE) $(DEST)','scan.pas','scan.l');
  25. T:=P.Targets.AddProgram('h2pas.pas');
  26. T.Dependencies.AddUnit('h2poptions');
  27. T.Dependencies.AddUnit('h2plexlib');
  28. T.Dependencies.AddUnit('scan');
  29. T.Dependencies.AddUnit('h2pyacclib');
  30. T.Dependencies.AddUnit('converu');
  31. T:=P.Targets.AddUnit('scan.pas');
  32. T.Install:=false;
  33. T.Dependencies.AddUnit('converu');
  34. T.Dependencies.AddUnit('h2poptions');
  35. T:=P.Targets.AddProgram('h2paspp.pas');
  36. P.Targets.AddUnit('h2poptions.pas').install:=false;
  37. P.Targets.AddUnit('h2plexlib.pas').install:=false;
  38. P.Targets.AddUnit('h2pyacclib.pas').install:=false;
  39. P.Targets.AddUnit('converu.pas').install:=false;
  40. end;
  41. end;
  42. {$ifndef ALLPACKAGES}
  43. begin
  44. add_h2pas('');
  45. Installer.Run;
  46. end.
  47. {$endif ALLPACKAGES}