fpmake.pp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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:='h2pa';
  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,zxspectrum,msxdos,amstradcpc];
  23. { avr-embedded and i8086-embedded do not support all needed features by default }
  24. if Defaults.CPU in [avr,i8086,z80] 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. T:=P.Targets.AddProgram('h2paschk.pas');
  49. P.Targets.AddUnit('h2poptions.pas').install:=false;
  50. P.Targets.AddUnit('h2plexlib.pas').install:=false;
  51. P.Targets.AddUnit('h2pyacclib.pas').install:=false;
  52. P.Targets.AddUnit('converu.pas').install:=false;
  53. end;
  54. end;
  55. {$ifndef ALLPACKAGES}
  56. begin
  57. add_h2pas('');
  58. Installer.Run;
  59. end.
  60. {$endif ALLPACKAGES}