fpmake.pp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. fpmkunit,
  21. {$IFDEF HAS_UNIT_PROCESS}
  22. process,
  23. {$ENDIF HAS_UNIT_PROCESS}
  24. sysutils;
  25. {$endif ALLPACKAGES}
  26. (*
  27. The include files are generated with the following commands:
  28. 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
  29. *)
  30. {$include fpmake_proc.inc}
  31. procedure add_utils(const ADirectory: string);
  32. Var
  33. P : TPackage;
  34. T : TTarget;
  35. begin
  36. {$include fpmake_add.inc}
  37. With Installer do
  38. begin
  39. P:=AddPackage('utils');
  40. P.Author := '<various>';
  41. P.License := 'LGPL with modification';
  42. P.HomepageURL := 'www.freepascal.org';
  43. P.Email := '';
  44. P.Description := 'Various Free Pascal utilities.';
  45. P.NeedLibC:= false;
  46. {$ifndef NO_PARENT}
  47. P.Directory:=ADirectory;
  48. {$endif ALLPACKAGES}
  49. P.Dependencies.Add('fcl-base');
  50. P.Dependencies.Add('paszlib');
  51. P.Dependencies.Add('hash');
  52. P.Dependencies.Add('univint',[darwin,iphonesim]);
  53. P.Version:='2.7.1';
  54. T:=P.Targets.AddProgram('ptop.pp');
  55. T.Dependencies.AddUnit('ptopu');
  56. T.ResourceStrings:=true;
  57. P.Targets.AddProgram('ppdep.pp');
  58. P.Targets.AddProgram('rstconv.pp').ResourceStrings:=true;
  59. P.Targets.AddProgram('data2inc.pp');
  60. P.Targets.AddProgram('delp.pp');
  61. P.Targets.AddProgram('bin2obj.pp');
  62. P.Targets.AddProgram('postw32.pp');
  63. P.Targets.AddProgram('rmcvsdir.pp');
  64. P.Targets.AddProgram('grab_vcsa.pp',[linux]);
  65. P.Targets.AddUnit('ptopu.pp').install:=false;
  66. end;
  67. end;
  68. {$ifdef NO_PARENT}
  69. begin
  70. add_utils('');
  71. Installer.Run;
  72. end.
  73. {$endif NO_PARENT}