2
0

fpmake.pp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {$mode objfpc}{$H+}
  2. {$define allpackages}
  3. program fpmake;
  4. {$IFDEF OS2}
  5. {$DEFINE NO_UNIT_PROCESS}
  6. {$ENDIF OS2}
  7. {$IFDEF GO32V2}
  8. {$DEFINE NO_UNIT_PROCESS}
  9. {$ENDIF GO32V2}
  10. {$ifndef NO_UNIT_PROCESS}
  11. {$define HAS_UNIT_PROCESS}
  12. {$endif NO_UNIT_PROCESS}
  13. uses
  14. fpmkunit,
  15. classes,
  16. {$IFDEF HAS_UNIT_PROCESS}
  17. process,
  18. {$ENDIF HAS_UNIT_PROCESS}
  19. sysutils;
  20. Var
  21. TBuild,T : TTarget;
  22. PBuild,P : TPackage;
  23. D : TDependency;
  24. I : Integer;
  25. (*
  26. The include files are generated with the following commands:
  27. 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
  28. *)
  29. {$include fpmake_proc1.inc}
  30. procedure add_fpc(const ADirectory: string);
  31. begin
  32. {$include fpmake_add1.inc}
  33. end;
  34. begin
  35. add_fpc('');
  36. Installer.Run;
  37. end.