fpmake.pp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.ShortName:='h2pas';
  15. P.Author := '<various>';
  16. P.License := 'LGPL with modification';
  17. P.HomepageURL := 'www.freepascal.org';
  18. P.Email := '';
  19. P.Description := 'A utility to create Pascal header files from c header files.';
  20. P.NeedLibC:= false;
  21. P.Directory:=ADirectory;
  22. P.Version:='3.1.1';
  23. P.Options.Add('-Sg');
  24. p.Commands.AddCommand(caBeforeCompile, AddProgramExtension('pyacc', Defaults.BuildOS), '$(SOURCE) $(DEST)','h2pas.pas','h2pas.y');
  25. p.Commands.AddCommand(caBeforeCompile, AddProgramExtension('plex', Defaults.BuildOS), '$(SOURCE) $(DEST)','scan.pas','scan.l');
  26. T:=P.Targets.AddProgram('h2pas.pas');
  27. T.Dependencies.AddUnit('h2poptions');
  28. T.Dependencies.AddUnit('h2plexlib');
  29. T.Dependencies.AddUnit('scan');
  30. T.Dependencies.AddUnit('h2pyacclib');
  31. T.Dependencies.AddUnit('converu');
  32. T:=P.Targets.AddUnit('scan.pas');
  33. T.Install:=false;
  34. T.Dependencies.AddUnit('converu');
  35. T.Dependencies.AddUnit('h2poptions');
  36. T:=P.Targets.AddProgram('h2paspp.pas');
  37. P.Targets.AddUnit('h2poptions.pas').install:=false;
  38. P.Targets.AddUnit('h2plexlib.pas').install:=false;
  39. P.Targets.AddUnit('h2pyacclib.pas').install:=false;
  40. P.Targets.AddUnit('converu.pas').install:=false;
  41. end;
  42. end;
  43. {$ifndef ALLPACKAGES}
  44. begin
  45. add_h2pas('');
  46. Installer.Run;
  47. end.
  48. {$endif ALLPACKAGES}