fpmake.pp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. {$ifndef ALLPACKAGES}
  2. {$mode objfpc}{$H+}
  3. program fpmake;
  4. uses fpmkunit;
  5. {$endif ALLPACKAGES}
  6. procedure add_tply(const ADirectory: string);
  7. Var
  8. P : TPackage;
  9. T : TTarget;
  10. lexyaccpath: string;
  11. begin
  12. With Installer do
  13. begin
  14. P:=AddPackage('utils-lexyacc');
  15. P.ShortName:='tply';
  16. { java and jvm-android do not support
  17. fpc_get_output used in these sources }
  18. if Defaults.CPU=jvm then
  19. P.OSes := P.OSes - [java,android];
  20. { palmos does not support command line parameters }
  21. P.OSes := P.OSes - [palmos];
  22. { Program does not fit in 16-bit memory constraints }
  23. P.OSes := P.OSes - [msdos,win16];
  24. { avr-embedded and i8086-embedded do not meet needed requirements }
  25. if Defaults.CPU in [avr,i8086] then
  26. P.OSes := P.OSes - [embedded];
  27. P.Author := '<various>';
  28. P.License := 'LGPL with modification';
  29. P.HomepageURL := 'www.freepascal.org';
  30. P.Email := '';
  31. P.Description := 'A compiler generator for Turbo Pascal and compatibles.';
  32. P.NeedLibC:= false;
  33. P.Directory:=ADirectory;
  34. P.Version:='3.3.1';
  35. P.Options.Add('-Sg');
  36. T:=P.Targets.AddProgram('plex.pas');
  37. T.Dependencies.AddUnit('lexbase');
  38. T.Dependencies.AddUnit('lexopt');
  39. T.Dependencies.AddUnit('lexdfa');
  40. T.Dependencies.AddUnit('lexpos');
  41. T.Dependencies.AddUnit('lexlist');
  42. T.Dependencies.AddUnit('lexrules');
  43. T.Dependencies.AddUnit('lexmsgs');
  44. T.Dependencies.AddUnit('lextable');
  45. T:=P.Targets.AddProgram('pyacc.pas');
  46. T.Dependencies.AddUnit('yaccbase');
  47. T.Dependencies.AddUnit('yaccmsgs');
  48. T.Dependencies.AddUnit('yaccclos');
  49. T.Dependencies.AddUnit('yaccpars');
  50. T.Dependencies.AddUnit('yacclook');
  51. T.Dependencies.AddUnit('yaccsem');
  52. T.Dependencies.AddUnit('yacclr0');
  53. T.Dependencies.AddUnit('yacctabl');
  54. P.Targets.AddUnit('lexlib.pas');
  55. P.Targets.AddUnit('yacclib.pas');
  56. P.Targets.AddUnit('lexbase.pas').install:=false;
  57. P.Targets.AddUnit('lexopt.pas').install:=false;
  58. P.Targets.AddUnit('lexdfa.pas').install:=false;
  59. P.Targets.AddUnit('lexpos.pas').install:=false;
  60. P.Targets.AddUnit('lexlist.pas').install:=false;
  61. P.Targets.AddUnit('lexrules.pas').install:=false;
  62. P.Targets.AddUnit('lexmsgs.pas').install:=false;
  63. P.Targets.AddUnit('lextable.pas').install:=false;
  64. P.Targets.AddUnit('yaccbase.pas').install:=false;
  65. P.Targets.AddUnit('yaccmsgs.pas').install:=false;
  66. P.Targets.AddUnit('yaccclos.pas').install:=false;
  67. P.Targets.AddUnit('yaccpars.pas').install:=false;
  68. P.Targets.AddUnit('yacclook.pas').install:=false;
  69. P.Targets.AddUnit('yaccsem.pas').install:=false;
  70. P.Targets.AddUnit('yacclr0.pas').install:=false;
  71. P.Targets.AddUnit('yacctabl.pas').install:=false;
  72. if (OSToString(defaults.OS)=lowercase({$I %FPCTARGETOS%})) and
  73. (CPUToString(defaults.CPU)=lowercase({$I %FPCTARGETCPU%})) then
  74. begin
  75. // Do not install these files when performing a cross-installation
  76. if Defaults.OS in AllUnixOSes then
  77. lexyaccpath:='$(baseinstalldir)../lexyacc'
  78. else
  79. lexyaccpath:='$(bininstalldir)';
  80. P.InstallFiles.Add('yylex.cod',lexyaccpath);
  81. P.InstallFiles.Add('yyparse.cod',lexyaccpath);
  82. end;
  83. end;
  84. end;
  85. {$ifndef ALLPACKAGES}
  86. begin
  87. add_tply('');
  88. Installer.Run;
  89. end.
  90. {$endif ALLPACKAGES}