Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

Tool Repository

[ tool index ]

Lists information about the triggered targets.


Description prints information about targets in a build log. It demonstrates several build log processing techniques in Perl.


Perl 5.6
Exptools users can use /opt/exp/bin/perl.
A CPAN module used for loading and processing XML. Included in exptools, install on RHEL 6 using: yum install perl-XML-LibXML
A CPAN module used for date/time parsing. Included in exptools, install on RHEL 6 using: yum install perl-Time-modules


perl filename.xml

Example Command Line

perl makelog.xml

Example Output

vpath /home/richb/projects/nightly/linux /home/richb/projects/nightly/source
builddir /home/richb/projects/nightly/linux/src

target-name almond1.o
exit-code 0
start-time 12:56:32.822873
end-time 12:56:33.126217
duration 0.303344
pwd /home/richb/projects/nightly/linux/src/lib/libtr1

target-name apple1.o
exit-code 0
start-time 12:56:33.311279
end-time 12:56:33.894835
duration 0.583556
pwd /home/richb/projects/nightly/linux/src/lib/libtr1
number of leaf targets found: 458
number of targets with non-zero exit code: 3

Script Description demonstrates several techniques for build log processing using Perl. The script provides examples showing how to

The script first parses and loads up the build log into a structure referenced by variable $doc. The script accesses vpath and builddir from fixed locations in the log XML structure and prints them. Access is through absolute XPath paths like /buildlog/makelog/makeinfo/vpath. The script then obtains a list of leaf (bottom level) targets and assigns it to variable @tgs, using XPath expression //tg[not (makelog)] to filter out targets that just run recursive makes. The script iterates through the target list, printing attributes for each target. Target durations are calculated by converting start and end times to absolute seconds using the secs() function and subtracting the values.

Additional information is printed for failed targets. Parent makefile elements are obtained using the XPath ancestor:: axis which navigates back toward the root of the buildlog tree from the current target, and information about each parent makefile is printed. A count of triggered targets in each makefile is printed along with the name of each target. The failed job output is accessed using XPath expression text()[last()] which finds the last child text node of the target (there are multiple child text elements due to the "reason" codes stored prior to the job output).

Last Update: Friday,12-Aug-2016 12:17:11 EDT