fpmake.pp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {$ifndef ALLPACKAGES}
  2. {$define allpackages}
  3. {$define no_parent}
  4. {$mode objfpc}{$H+}
  5. program fpmake;
  6. {$IFDEF MORPHOS}
  7. {$DEFINE NO_UNIT_PROCESS}
  8. {$DEFINE NO_THREADING}
  9. {$ENDIF}
  10. {$IFDEF OS2}
  11. {$DEFINE NO_UNIT_PROCESS}
  12. {$ENDIF OS2}
  13. {$IFDEF GO32V2}
  14. {$DEFINE NO_UNIT_PROCESS}
  15. {$ENDIF GO32V2}
  16. {$ifndef NO_UNIT_PROCESS}
  17. {$define HAS_UNIT_PROCESS}
  18. {$endif NO_UNIT_PROCESS}
  19. uses
  20. {$ifdef unix}
  21. cwstring,
  22. cthreads,
  23. {$endif}
  24. fpmkunit,
  25. {$IFDEF HAS_UNIT_PROCESS}
  26. process,
  27. {$ENDIF HAS_UNIT_PROCESS}
  28. sysutils;
  29. {$endif ALLPACKAGES}
  30. (*
  31. The include files are generated with the following commands:
  32. rm fpmake_proc.inc fpmake_add.inc ; /bin/ls -1 */fpmake.pp| while read file; do cleanedname=`dirname $file | sed -e 's+-+_+g'` ; if ! `grep -i "^procedure add_$cleanedname" $file >/dev/null` ; then printf 'procedure add_%s(const ADirectory: string);\nbegin\n with Installer do\n{$include %s}\nend;\n\n' $cleanedname $file >> fpmake_proc.inc; else printf '{$include %s}\n\n' $file >> fpmake_proc.inc; fi; echo " add_$cleanedname(ADirectory+IncludeTrailingPathDelimiter('$cleanedname'));" >> fpmake_add.inc; done
  33. *)
  34. {$include fpmake_proc.inc}
  35. procedure add_utils(const ADirectory: string);
  36. Var
  37. P : TPackage;
  38. T : TTarget;
  39. begin
  40. With Installer do
  41. begin
  42. P:=AddPackage('utils');
  43. P.ShortName := 'utils';
  44. P.OSes:=AllOSes-[embedded,msdos,win16,macosclassic,palmos,zxspectrum,msxdos,amstradcpc,sinclairql,wasi];
  45. if Defaults.CPU=jvm then
  46. P.OSes := P.OSes - [java,android];
  47. P.Author := '<various>';
  48. P.License := 'LGPL with modification';
  49. P.HomepageURL := 'www.freepascal.org';
  50. P.Email := '';
  51. P.Description := 'Various Free Pascal utilities.';
  52. P.NeedLibC:= false;
  53. {$ifndef NO_PARENT}
  54. P.Directory:=ADirectory;
  55. {$endif ALLPACKAGES}
  56. P.Dependencies.Add('fcl-base');
  57. P.Dependencies.Add('paszlib');
  58. P.Dependencies.Add('hash');
  59. P.Dependencies.Add('univint',[darwin,iphonesim,ios]);
  60. P.Dependencies.Add('fcl-json');
  61. P.Dependencies.Add('rtl-extra');
  62. P.Dependencies.Add('rtl-objpas');
  63. P.Version:='3.3.1';
  64. T:=P.Targets.AddProgram('ptop.pp');
  65. T.Dependencies.AddUnit('ptopu');
  66. T.ResourceStrings:=true;
  67. P.Targets.AddProgram('ppdep.pp');
  68. T:=P.Targets.AddProgram('rstconv.pp');
  69. T.ResourceStrings:=true;
  70. P.Targets.AddProgram('data2inc.pp');
  71. P.Targets.AddProgram('delp.pp');
  72. P.Targets.AddProgram('bin2obj.pp');
  73. P.Targets.AddProgram('mkinsadd.pp');
  74. P.Targets.AddProgram('postw32.pp');
  75. P.Targets.AddProgram('rmcvsdir.pp');
  76. P.Targets.AddProgram('grab_vcsa.pp',[linux]);
  77. T:=P.Targets.AddProgram('fpcsubst.pp');
  78. T.Dependencies.AddUnit('usubst');
  79. T.ResourceStrings:=true;
  80. P.Targets.AddUnit('usubst.pp').install:=false;
  81. P.Targets.AddUnit('ptopu.pp').install:=false;
  82. { The source files fpmake_proc.inc and fpmake_add.inc
  83. need to be added explicitly to be integrated in source zip }
  84. P.Sources.AddSrc('fpmake_proc.inc');
  85. P.Sources.AddSrc('fpmake_add.inc');
  86. end;
  87. {$include fpmake_add.inc}
  88. end;
  89. {$ifdef NO_PARENT}
  90. begin
  91. add_utils('');
  92. Installer.Run;
  93. end.
  94. {$endif NO_PARENT}