common/tools/analysis/parsewhatlog.pl
author Dario Sestito <darios@symbian.org>
Thu, 18 Jun 2009 09:23:08 +0100
changeset 199 7bcb8b1ad9a6
parent 97 4f54ca96b7e8
child 146 f31749863421
permissions -rw-r--r--
Add missing files for yarp publishing to diamonds
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
97
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     1
#!/usr/bin/perl
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     2
#parsewhatlog - parses a whatlog, gives csv output.
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     3
use strict;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     4
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     5
#<whatlog bldinf='t:/sf/mw/ipappprotocols/sipconnproviderplugins/sipstatemachine/group/bld.inf' mmp='' config='winscw_udeb.whatlog'>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     6
#<export destination='t:/epoc32/rom/include/sipstatemachine.iby' source='t:/sf/mw/ipappprotocols/sipconnproviderplugins/sipstatemachine/group/SipStateMachine.iby'/>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     7
#</whatlog>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     8
#<whatlog bldinf='t:/sf/os/mm/mmplugins/3gplib/group/bld.inf' mmp='t:/sf/os/mm/mmplugins/3gplib/impl/group/3gpmp4lib.mmp' config='winscw_udeb.whatlog'>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
     9
#<build>t:/epoc32/release/winscw/udeb/3gpmp4lib.lib</build>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    10
#<build>t:/epoc32/release/winscw/udeb/3gpmp4lib.lib</build>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    11
#<build>t:/epoc32/release/winscw/udeb/3gpmp4lib.dll</build>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    12
#</whatlog>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    13
#<whatlog bldinf='t:/sf/mw/messagingmw/messagingfw/msgconf/group/bld.inf' mmp='t:/sf/mw/messagingmw/messagingfw/msgconf/group/messaging_config.mmp' config='winscw_udeb.whatlog'>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    14
#<bitmap>t:/epoc32/data/z/resource/messaging/bif/vclp.mbm</bitmap>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    15
#<bitmap>t:/epoc32/release/winscw/udeb/z/resource/messaging/bif/vclp.mbm</bitmap>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    16
#<bitmap>t:/epoc32/release/winscw/urel/z/resource/messaging/bif/vclp.mbm</bitmap>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    17
#<bitmap>t:/epoc32/localisation/vclp/mbm/vclp0.bmp</bitmap>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    18
#<bitmap>t:/epoc32/localisation/group/vclp.info</bitmap>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    19
#</whatlog>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    20
#<whatlog bldinf='t:/sf/mw/mmmw/mmmiddlewarefws/mmfw/sounddev/group_pluginsupport/bld.inf' mmp='t:/sf/mw/mmmw/mmmiddlewarefws/mmfw/sounddev/PlatSec/MMPFiles/Sounddevice/aacdecoderconfigci.mmp' config='winscw_udeb.whatlog'>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    21
#<resource>t:/epoc32/data/z/resource/plugins/aacdecoderconfigci.rsc</resource>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    22
#<resource>t:/epoc32/release/winscw/udeb/z/resource/plugins/aacdecoderconfigci.rsc</resource>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    23
#<resource>t:/epoc32/release/winscw/urel/z/resource/plugins/aacdecoderconfigci.rsc</resource>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    24
#<resource>t:/epoc32/localisation/aacdecoderconfigci/rsc/aacdecoderconfigci.rpp</resource>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    25
#<resource>t:/epoc32/localisation/group/aacdecoderconfigci.info</resource>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    26
#</whatlog>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    27
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    28
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    29
my $keepgoing = 1;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    30
main();
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    31
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    32
sub cleanpath($)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    33
{
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    34
  my $str = lc(shift); #drop the case.
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    35
  $str =~ s/^\S://; #remove drive letter
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    36
  $str =~ s/^\///; # some custom makefiles report aboslute path
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    37
  $str =~ s/\\/\//g; #switch the path
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    38
  $str =~ s/\/\//\//g;#we have some double slashes in some resources... 
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    39
  return $str;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    40
}
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    41
sub ext($)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    42
{
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    43
  my $str = shift;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    44
  $str =~ s/\S+\.//; #may fail...
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    45
  return $str;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    46
}
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    47
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    48
sub main()
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    49
{
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    50
  my $path = shift @ARGV;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    51
  my @files = glob($path."/*whatlog*WHAT_*compile.log"); 
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    52
  foreach my $filename (@files)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    53
  {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    54
#    print $filename."\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    55
    parsefile($filename);
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    56
  }  
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    57
}
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    58
sub parsefile($filename)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    59
{  
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    60
  my $filename = shift;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    61
  open(FILE,"<$filename") or die "Couldn't open filename\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    62
  
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    63
  #I'm using previous formatting stypes from the flm parsing...ie location, bld.inf, makefile, type, target,extension
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    64
  print "location,bldinf,makefile,type,target,extension\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    65
  my $bldinf = "";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    66
  my $makefile = "";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    67
  my $inrecipe = 0;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    68
  
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    69
  my $linecount = 0;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    70
  while(my $line = <FILE>)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    71
  {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    72
    ++$linecount;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    73
    if($line =~ m/^<whatlog bldinf='(\S+)' mmp='(\S*)' config='\S+'>/) #brittle
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    74
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    75
      $bldinf = $1;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    76
      $makefile = $2;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    77
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    78
    elsif($line =~ m/^<\/whatlog>/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    79
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    80
      $bldinf = "";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    81
      $makefile = "";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    82
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    83
    elsif($line =~ m/^<bitmap>(\S+)<\/bitmap>/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    84
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    85
      if($bldinf eq "" || $makefile eq "" && !$keepgoing)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    86
      {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    87
        die "$filename($linecount) bldinf=$bldinf makefile=$makefile: $line\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    88
      }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    89
      print "$filename($linecount),".cleanpath($bldinf).",".cleanpath($makefile).",bitmap,".cleanpath($1).",".ext($1)."\n";        
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    90
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    91
    elsif($line =~ m/^<build>(\S+)<\/build>/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    92
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    93
      if($bldinf eq "" || $makefile eq "" && !$keepgoing)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    94
      {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    95
        die "$filename($linecount) bldinf=$bldinf makefile=$makefile : $line\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    96
      }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    97
      print "$filename($linecount),".cleanpath($bldinf).",".cleanpath($makefile).",binary,".cleanpath($1).",".ext($1)."\n";        
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    98
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    99
    elsif($line =~ m/^<resource>(\S+)<\/resource>/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   100
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   101
      if($bldinf eq "" || $makefile eq "" && !$keepgoing)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   102
      {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   103
        die "$filename($linecount) bldinf=$bldinf makefile=$makefile : $line\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   104
      }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   105
      print "$filename($linecount),".cleanpath($bldinf).",".cleanpath($makefile).",resource,".cleanpath($1).",".ext($1)."\n";        
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   106
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   107
    
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   108
    #<export destination='t:/epoc32/rom/include/sipstatemachine.iby' source='t:/sf/mw/ipappprotocols/sipconnproviderplugins/sipstatemachine/group/SipStateMachine.iby'/>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   109
    elsif($line =~ m/^<export destination='(\S+)' source='(\S+)'\/>/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   110
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   111
      if($bldinf eq "" )
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   112
      {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   113
        die "$filename($linecount) bldinf=$bldinf: $line\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   114
      }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   115
      print "$filename($linecount),".cleanpath($bldinf).",".cleanpath($2).",export,".cleanpath($1).",".ext($1)."\n";    
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   116
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   117
  #<recipe name='tem' target='91e4e9b4af8b5c84bbac43a2419a4ce3_RELEASABLES' host='LON-ENGBUILD87' layer='os' component='localesupport' bldinf='t:/sf/os/kernelhwsrv/localisation/localesupport/bld.inf' mmp='' config='winscw_urel.whatlog' platform='WINSCW' phase='BITMAP' source='copy_default.mk_RELEASABLES'>
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   118
    
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   119
    elsif($line =~ m/<recipe.+bldinf='(\S+)'.+source='(\S+)'>/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   120
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   121
      $bldinf = $1;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   122
      $makefile = $2;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   123
      $inrecipe = 1;    
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   124
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   125
    elsif($inrecipe && $line =~ m/^(\S:\S+)/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   126
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   127
      if($bldinf eq "" || $makefile eq "" && !$keepgoing)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   128
      {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   129
        die "$filename($linecount) bldinf=$bldinf makefile=$makefile : $line\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   130
      }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   131
      my $str = cleanpath($1);
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   132
      
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   133
      print "$filename($linecount),".cleanpath($bldinf).",".cleanpath($makefile).",custom,".cleanpath($str).",".ext($str)."\n";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   134
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   135
    
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   136
    elsif($line =~ m/<\/recipe>/)
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   137
    {
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   138
      $bldinf = "";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   139
      $makefile = "";
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   140
      $inrecipe = 0;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   141
    }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   142
    
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   143
      
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   144
  }
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   145
  close FILE;
4f54ca96b7e8 Add build analysis tools to <sf-run-analysis> target. All output generated in <logs>\analysis dir.
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   146
}