}
print INDEX "</table>\n";
-print INDEX "<h2>Build Summary</h2>\n";
-print INDEX "<ol>\n";
-
-my ($n_products) = 0;
-my ($n_steps) = 0;
+my (@products);
+my (@steps);
my ($new_page) = 0;
while (<LOG>) {
my $ln = $.;
$new_page = 0;
$log_class = "step";
if (my ($product) = /^Saving (.*)$/) {
- print INDEX "\n <ul>\n" if !$n_products++;
my $href = "$product/index.html";
$href = $product if ! -e $href;
- print INDEX " <li><a href=\"", encode_entities ($href), "\">";
- print INDEX encode_entities ($product), "</a>";
- print INDEX " <small><a href=\"log.html#$ln\">(log)</a></small>";
- print INDEX "</li>\n";
+
+ my (%p);
+ $p{PRODUCT} = $product;
+ $p{HREF} = $href;
+ $p{LN} = $ln;
+ push (@products, \%p);
+ push (@{$steps[$#steps]{CHILDREN}}, \%p);
} else {
- print INDEX "</ul>" if !$n_steps;
- print INDEX "<li>", encode_entities ($_);
- print INDEX " <small><a href=\"log.html#$ln\">(log)</a></small>";
- $n_products = 0;
+ my (%s);
+ $s{TITLE} = $_;
+ $s{LN} = $ln;
+ push (@steps, \%s);
}
} else {
if (my ($diagnostic) = /(error|warning):/) {
- if ($n_products) {
- print INDEX " </ul>\n";
- $n_products = 0;
- }
- print INDEX "<p class=\"$diagnostic\">";
- print INDEX "<a href=\"log.html#$ln\">";
- print INDEX encode_entities ($_);
- print INDEX "</a></p>\n";
+ my (%d);
+ $d{DIAGNOSTIC} = $diagnostic;
+ $d{MESSAGE} = $_;
+ $d{LN} = $ln;
+ push (@{$steps[$#steps]{CHILDREN}}, \%d);
+
$log_class = "$diagnostic";
}
}
print LOG_HTML encode_entities ($_), "\n";
}
}
-print INDEX " </ul>\n" if $n_products;
-print INDEX "</li>\n" if $n_steps;
+
+print INDEX "<h2>Build Products</h2>\n";
+print INDEX "<ul>\n";
+foreach my $p (@products) {
+ print INDEX "<li><a href=\"", encode_entities ($p->{HREF}), "\">";
+ print INDEX encode_entities ($p->{PRODUCT});
+ print INDEX "</a></li>\n";
+}
+print INDEX "</ul>\n";
+
+sub log_link {
+ my ($ln) = @_;
+ return "<small><a href=\"log.html#$ln\">(log)</a></small>";
+}
+
+print INDEX "<h2>Build Summary</h2>\n";
+print INDEX "<ol>\n";
+foreach my $s (@steps) {
+ print INDEX "<li>", encode_entities ($s->{TITLE});
+ print INDEX " ", log_link ($s->{LN});
+ foreach my $c (@{$s->{CHILDREN}}) {
+ if (defined ($c->{DIAGNOSTIC})) {
+ print INDEX "<p class=\"$c->{DIAGNOSTIC}\">";
+ print INDEX "<a href=\"log.html#$c->{LN}\">";
+ print INDEX encode_entities ($c->{MESSAGE});
+ print INDEX "</a></p>\n";
+ } else {
+ print INDEX "<p>→ <a href=\"", encode_entities ($c->{HREF}), "\">";
+ print INDEX encode_entities ($c->{PRODUCT});
+ print INDEX "</a></p>\n";
+ }
+ }
+ print INDEX "</li>\n";
+}
+print INDEX "</ol>\n";
+
print INDEX <<EOF;
-</ol>
</body>
</html>
EOF
body {
background: white;
color: black;
- padding: 0em 12em 0em 3em;
+ padding: 0em 3em 0em 3em;
margin: 0
}
body>p {
text-decoration: underline
}
+ol>li>p {
+ margin-top: 0;
+ margin-bottom: 0
+}
.step {
font-weight: bold
}
.warning {
- background: yellow;
- margin-top: 0;
- margin-bottom: 0
+ background: yellow
}
.error {
- background: orange;
- margin-top: 0;
- margin-bottom: 0
+ background: orange
}
EOF