Date: Tue, 11 Jan 2000 13:24:59 -0800 From: Bill Fenner <fenner@research.att.com> To: current@freebsd.org Subject: "make world" log parser Message-ID: <200001112124.NAA51609@mango.attlabs.att.com>
next in thread | raw e-mail | index | archive | help
--19701020 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline I often want to know where in a "make world" I am, so I wrote this quick little script. It breaks out the major sections, like -------------------------------------------------------------- >>> Cleaning up the elf obj tree -------------------------------------------------------------- and the directory progress indicators, and displays all of the major sections, the last directory progress indicator, and the last 5 lines of log. So you get something like -------------------------------------------------------------- >>> elf make world started on Tue Jan 11 11:19:42 PST 2000 -------------------------------------------------------------- >>> Cleaning up the temporary elf build tree -------------------------------------------------------------- >>> Making make -------------------------------------------------------------- >>> Making mtree -------------------------------------------------------------- >>> Making hierarchy -------------------------------------------------------------- >>> Cleaning up the elf obj tree -------------------------------------------------------------- ===> gnu/lib/libreadline/history/doc rm -f history.info history.info.gz history.texi rm -f .depend /usr/src/gnu/lib/libreadline/history/GPATH /usr/src/gnu/lib/libreadline/history/GRTAGS /usr/src/gnu/lib/libreadline/history/GSYMS /usr/src/gnu/lib/libreadline/history/GTAGS ===> gnu/lib/libreadline/history/doc ===> gnu/lib/libreadline/history/doc rm -f history.info history.info.gz history.texi ===> gnu/lib/libreadline/readline rm -f a.out readline.o vi_mode.o funmap.o keymaps.o parens.o search.o rltty.o complete.o bind.o isearch.o display.o signals.o util.o kill.o undo.o macro.o input.o callback.o terminal.o nls.o xmalloc.o history.o histexpand.o histfile.o histsearch.o shell.o tilde.o readline.o.tmp vi_mode.o.tmp funmap.o.tmp keymaps.o.tmp parens.o.tmp search.o.tmp rltty.o.tmp complete.o.tmp bind.o.tmp isearch.o.tmp display.o.tmp signals.o.tmp util.o.tmp kill.o.tmp undo.o.tmp macro.o.tmp input.o.tmp callback.o.tmp terminal.o.tmp nls.o.tmp xmalloc.o.tmp history.o.tmp histexpand.o.tmp histfile.o.tmp histsearch.o.tmp shell.o.tmp tilde.o.tmp readline.3.gz readline.3.cat.gz Anyway, I think it's so cool that I'm convinced that someone else will like it too, so I'm sending it to -current =) Bill --19701020 Content-Type: application/x-perl; name="whereintheworld"; x-unix-mode=0555 Content-Disposition: attachment; filename="whereintheworld" #!/usr/bin/perl # # whereintheworld # Parses "make world" output and summarize where it's been so far. # # Bill Fenner <fenner@freebsd.org> 11 January 2000 # # $Id: whereintheworld,v 1.2 2000/01/11 21:18:37 fenner Exp $ # use strict; my $lastarrow = undef; my $inside = 0; my @lines = (); my $thresh = 5; my $lastwasdash = 0; my $file = $ARGV[0] || (-f "/usr/src/world.out" ? "/usr/src/world.out" : "-"); open(LOG, $file) || die "$file: $!\n"; while (<LOG>) { if (/^------------/) { $inside = !$inside; print unless ($lastwasdash); $lastwasdash = 1; next; } if ($inside && /^>>>/) { print; $lastwasdash = 0; next; } push(@lines, $_); if ($#lines > $thresh) { my $line = shift(@lines); $lastarrow = $line if ($line =~ /^===>/); } } exit if ($lastwasdash); if ($lines[0] !~ /^===>/ && $lastarrow) { print $lastarrow, "...\n"; } print @lines; --19701020-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001112124.NAA51609>