From: <zw...@ma...> - 2009-05-20 22:52:19
|
Author: zwelch Date: 2009-05-20 22:52:14 +0200 (Wed, 20 May 2009) New Revision: 1858 Added: trunk/tools/logger.pl Modified: trunk/Makefile.am Log: Add 'docs' and 'doxygen' targets to top-level Makefile. Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2009-05-20 09:01:01 UTC (rev 1857) +++ trunk/Makefile.am 2009-05-20 20:52:14 UTC (rev 1858) @@ -13,6 +13,14 @@ EXTRA_DIST = Doxyfile +docs: pdf html doxygen + +doxygen:: + doxygen Doxyfile 2>&1 | perl tools/logger.pl > doxygen.log + +doxygen-clean: + rm -f -r doxygen doxygen.log + MAINTAINERCLEANFILES = \ configure \ Makefile.in \ Added: trunk/tools/logger.pl =================================================================== --- trunk/tools/logger.pl 2009-05-20 09:01:01 UTC (rev 1857) +++ trunk/tools/logger.pl 2009-05-20 20:52:14 UTC (rev 1858) @@ -0,0 +1,34 @@ +#!/usr/bin/perl +# logger.pl: masks long meaningless output with pretty lines of dots +# Details: 1) reads lines from STDIN and echos them on STDOUT, +# 2) print a '.' to STDERR every $N lines. +# 3) print a newline after a sequence of $C dots + +use strict; +use warnings; + +# make sure all output gets displayed immediately +$| = 1; + +# TODO: add -n and -c options w/ zero checks) +# line and column limits +my $N = 10; +my $C = 72; + +# current line and column counters +my $n = 0; +my $c = 0; + +# read all lines from STDIN +while (<STDIN>) +{ + # echo line to output + print STDOUT $_; + # only display progress every Nth step + next unless ++$n % $N; + print STDERR "."; + # wrap at column C to provide fixed-width rows of dots + print STDERR "\n" unless ++$c % $C; +} + +print STDERR "\n" Property changes on: trunk/tools/logger.pl ___________________________________________________________________ Name: svn:eol-style + native |