fpmake.pp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. { java and jvm-android do not support
  16. fpc_get_output used in these sources }
  17. if Defaults.CPU=jvm then
  18. P.OSes := P.OSes - [java,android];
  19. { palmos does not support command line parameters }
  20. P.OSes := P.OSes - [palmos];
  21. { Program does not fit in 16-bit memory constraints }
  22. P.OSes := P.OSes - [msdos,win16];
  23. { avr-embedded and i8086-embedded do not support all needed features by default }
  24. if Defaults.CPU in [avr,i8086] then
  25. P.OSes := P.OSes - [embedded];
  26. P.Author := '<various>';
  27. P.License := 'LGPL with modification';
  28. P.HomepageURL := 'www.freepascal.org';
  29. P.Email := '';
  30. P.Description := 'A utility to create Pascal header files from c header files.';
  31. P.NeedLibC:= false;
  32. P.Directory:=ADirectory;
  33. P.Version:='3.3.1';
  34. P.Options.Add('-Sg');
  35. p.Commands.AddCommand(caBeforeCompile, AddProgramExtension('pyacc', Defaults.BuildOS), '$(SOURCE) $(DEST)','h2pas.pas','h2pas.y');
  36. p.Commands.AddCommand(caBeforeCompile, AddProgramExtension('plex', Defaults.BuildOS), '$(SOURCE) $(DEST)','scan.pas','scan.l');
  37. T:=P.Targets.AddProgram('h2pas.pas');
  38. T.Dependencies.AddUnit('h2poptions');
  39. T.Dependencies.AddUnit('h2plexlib');
  40. T.Dependencies.AddUnit('scan');
  41. T.Dependencies.AddUnit('h2pyacclib');
  42. T.Dependencies.AddUnit('converu');
  43. T:=P.Targets.AddUnit('scan.pas');
  44. T.Install:=false;
  45. T.Dependencies.AddUnit('converu');
  46. T.Dependencies.AddUnit('h2poptions');
  47. T:=P.Targets.AddProgram('h2paspp.pas');
  48. P.Targets.AddUnit('h2poptions.pas').install:=false;
  49. P.Targets.AddUnit('h2plexlib.pas').install:=false;
  50. P.Targets.AddUnit('h2pyacclib.pas').install:=false;
  51. P.Targets.AddUnit('converu.pas').install:=false;
  52. end;
  53. end;
  54. {$ifndef ALLPACKAGES}
  55. begin
  56. add_h2pas('');
  57. Installer.Run;
  58. end.
  59. {$endif ALLPACKAGES}