소스 검색

* Added some bin2obj rules to the fpmake.pp file

git-svn-id: trunk@24481 -
joost 12 년 전
부모
커밋
436d0bbdae
1개의 변경된 파일16개의 추가작업 그리고 1개의 파일을 삭제
  1. 16 1
      utils/fpdoc/fpmake.pp

+ 16 - 1
utils/fpdoc/fpmake.pp

@@ -2,7 +2,7 @@
 {$mode objfpc}{$H+}
 program fpmake;
 
-uses fpmkunit;
+uses fpmkunit, sysutils;
 {$endif ALLPACKAGES}
 
 procedure add_fpdoc;
@@ -10,8 +10,10 @@ procedure add_fpdoc;
 Var
   P : TPackage;
   T : TTarget;
+  Bin2Obj : string;
 
 begin
+  AddCustomFpmakeCommandlineOption('bin2obj', 'Use indicated bin2obj executable.');
   With Installer do
     begin
     P:=AddPackage('fpdoc');
@@ -26,6 +28,7 @@ begin
     P.Dependencies.Add('fcl-base');
     P.Dependencies.Add('fcl-xml');
     P.Dependencies.Add('fcl-passrc');
+    P.Dependencies.Add('fcl-process');
     P.Dependencies.Add('chm');
     P.Dependencies.Add('univint',[darwin,iphonesim]);
 
@@ -83,6 +86,18 @@ begin
     P.Targets.AddUnit('fpdocproj.pas').install:=false;
     P.Targets.AddUnit('mkfpdoc.pp').install:=false;
     P.Targets.AddUnit('dw_ipflin.pas').install:=false;
+
+    Bin2Obj := GetCustomFpmakeCommandlineOptionValue('bin2obj');
+    if Bin2Obj<>'' then
+      Bin2Obj:= ExpandFileName(Bin2Obj);
+    if Bin2Obj='' then
+      Bin2Obj := ExeSearch(AddProgramExtension('bin2obj', Defaults.BuildOS));
+    if Bin2Obj <> '' then
+      begin
+      P.Commands.AddCommand(Bin2Obj,'-o $(DEST) -c DefaultCSS $(SOURCE)','css.inc','fpdoc.css');
+      P.Commands.AddCommand(Bin2Obj,'-o $(DEST) -c PlusImageData $(SOURCE)','plusimage.inc','images/plus.png');
+      P.Commands.AddCommand(Bin2Obj,'-o $(DEST) -c MinusImageData $(SOURCE)','minusimage.inc','images/minus.png');
+      end;
     end;
 end;