tools/fsh-builddocs
changeset 40 06e2064de820
parent 39 b1cc3c1b5028
parent 17 949c6f5096e4
child 51 8dc858aede52
equal deleted inserted replaced
39:b1cc3c1b5028 40:06e2064de820
     1 #!perl
     1 #!perl
     2 # fsh-builddocs
     2 # fsh-builddocs
     3 # 
     3 #
     4 # Copyright (c) 2010 Accenture. All rights reserved.
     4 # Copyright (c) 2010 Accenture. All rights reserved.
     5 # This component and the accompanying materials are made available
     5 # This component and the accompanying materials are made available
     6 # under the terms of the "Eclipse Public License v1.0"
     6 # under the terms of the "Eclipse Public License v1.0"
     7 # which accompanies this distribution, and is available
     7 # which accompanies this distribution, and is available
     8 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     9 # 
     9 #
    10 # Initial Contributors:
    10 # Initial Contributors:
    11 # Accenture - Initial contribution
    11 # Accenture - Initial contribution
    12 
    12 
    13 # Description:
    13 # Description:
    14 # fsh-builddocs - A tool that generates HTML documentation from POD source files.
    14 # fsh-builddocs - A tool that generates HTML documentation from POD source files.
    81 	     'w|what' => \$options{what},
    81 	     'w|what' => \$options{what},
    82 	     'c|clean' => \$options{clean},
    82 	     'c|clean' => \$options{clean},
    83 	     'i|include=s' => $options{includes}) or DisplayHelp();
    83 	     'i|include=s' => $options{includes}) or DisplayHelp();
    84   DisplayHelp() if ($help);
    84   DisplayHelp() if ($help);
    85   warn "Invalid arguments\n" and DisplayHelp() unless (@ARGV == 1);
    85   warn "Invalid arguments\n" and DisplayHelp() unless (@ARGV == 1);
       
    86 
       
    87   my $relativeEpocRootPath = fshu::RelativePath($ENV{EPOCROOT}, cwd());
       
    88   $relativeEpocRootPath =~ s/\\/\//g; # '\' -> '/'.
       
    89   foreach my $include (@{$options{includes}}) {
       
    90     if ($include =~ /^epoc32/i) {
       
    91       $include = "${relativeEpocRootPath}$include";
       
    92     }
       
    93   }
       
    94 
    86   return shift @ARGV;
    95   return shift @ARGV;
    87 }
    96 }
    88 
    97 
    89 sub DisplayHelp {
    98 sub DisplayHelp {
    90   require Pod::Text;
    99   require Pod::Text;