fpmake.pp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. cthreads,
  22. {$endif}
  23. fpmkunit,
  24. {$IFDEF HAS_UNIT_PROCESS}
  25. process,
  26. {$ENDIF HAS_UNIT_PROCESS}
  27. sysutils;
  28. {$endif ALLPACKAGES}
  29. (*
  30. The include files are generated with the following commands:
  31. 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
  32. *)
  33. {$include fpmake_proc.inc}
  34. procedure add_utils(const ADirectory: string);
  35. Var
  36. P : TPackage;
  37. T : TTarget;
  38. begin
  39. With Installer do
  40. begin
  41. P:=AddPackage('utils');
  42. P.ShortName := 'utils';
  43. P.OSes:=AllOSes-[embedded,msdos,win16,macosclassic,palmos,zxspectrum,msxdos,amstradcpc,sinclairql];
  44. if Defaults.CPU=jvm then
  45. P.OSes := P.OSes - [java,android];
  46. P.Author := '<various>';
  47. P.License := 'LGPL with modification';
  48. P.HomepageURL := 'www.freepascal.org';
  49. P.Email := '';
  50. P.Description := 'Various Free Pascal utilities.';
  51. P.NeedLibC:= false;
  52. {$ifndef NO_PARENT}
  53. P.Directory:=ADirectory;
  54. {$endif ALLPACKAGES}
  55. P.Dependencies.Add('fcl-base');
  56. P.Dependencies.Add('paszlib');
  57. P.Dependencies.Add('hash');
  58. P.Dependencies.Add('univint',[darwin,iphonesim,ios]);
  59. P.Dependencies.Add('fcl-json');
  60. P.Dependencies.Add('rtl-extra');
  61. P.Dependencies.Add('rtl-objpas');
  62. P.Version:='3.3.1';
  63. T:=P.Targets.AddProgram('ptop.pp');
  64. T.Dependencies.AddUnit('ptopu');
  65. T.ResourceStrings:=true;
  66. P.Targets.AddProgram('ppdep.pp');
  67. T:=P.Targets.AddProgram('rstconv.pp');
  68. T.ResourceStrings:=true;
  69. P.Targets.AddProgram('data2inc.pp');
  70. P.Targets.AddProgram('delp.pp');
  71. P.Targets.AddProgram('bin2obj.pp');
  72. P.Targets.AddProgram('mkinsadd.pp');
  73. P.Targets.AddProgram('postw32.pp');
  74. P.Targets.AddProgram('rmcvsdir.pp');
  75. P.Targets.AddProgram('grab_vcsa.pp',[linux]);
  76. T:=P.Targets.AddProgram('fpcsubst.pp');
  77. T.Dependencies.AddUnit('usubst');
  78. T.ResourceStrings:=true;
  79. P.Targets.AddUnit('usubst.pp').install:=false;
  80. P.Targets.AddUnit('ptopu.pp').install:=false;
  81. { The source files fpmake_proc.inc and fpmake_add.inc
  82. need to be added explicitly to be integrated in source zip }
  83. P.Sources.AddSrc('fpmake_proc.inc');
  84. P.Sources.AddSrc('fpmake_add.inc');
  85. end;
  86. {$include fpmake_add.inc}
  87. end;
  88. {$ifdef NO_PARENT}
  89. begin
  90. add_utils('');
  91. Installer.Run;
  92. end.
  93. {$endif NO_PARENT}