From 02b11bcaeb133c3f4719d39de76deb5044429370 Mon Sep 17 00:00:00 2001 From: coryan Date: Wed, 10 Mar 1999 02:57:21 +0000 Subject: ChangeLogTag:Tue Mar 9 20:56:35 1999 Carlos O'Ryan --- bin/auto_compile | 52 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 17 deletions(-) (limited to 'bin/auto_compile') diff --git a/bin/auto_compile b/bin/auto_compile index 25662f308ba..46ae42c71ca 100755 --- a/bin/auto_compile +++ b/bin/auto_compile @@ -72,24 +72,28 @@ $MAKEFLAGS = $ARGV[4]; $disable_file = $LOGDIR . '/.disable'; +sub mywarn { + local @msg = @_; + open(MAIL, "|mail $ADMIN") + || die "cannot open email pipe on error: $msg\n"; + print MAIL 'The following message is brought to you by: ', "\n"; + print MAIL $CMD, ' [', $REVISION, "] for $BUILD on $CHECKOUT\n"; + print MAIL "\n"; + local $m; + foreach $m (@msg) { + print MAIL $m, "\n"; + } + print MAIL "\nPlease check log files for more info\n"; + close(MAIL) + || die "cannot close email pipe on error: $msg\n"; +} + sub mydie { - local @msg = @_; - open(MAIL, "|mail $ADMIN") - || die "cannot open email pipe on error: $msg\n"; - print MAIL 'The following error is brought to you by: ', "\n"; - print MAIL $CMD, ' [', $REVISION, "] for $BUILD on $CHECKOUT\n"; - print MAIL "\n"; - local $m; - foreach $m (@msg) { - print MAIL $m, "\n"; - } - print MAIL "\nPlease check log files for more info\n"; - close(MAIL) - || die "cannot close email pipe on error: $msg\n"; - print HIST 'FAILED', "\n"; - unlink $disable_file - || die "cannot unlink disable file"; - exit 0; + mywarn @_; + print HIST 'FAILED', "\n"; + unlink $disable_file + || die "cannot unlink disable file"; + exit 0; } ### MAIN FUNCTION @@ -173,6 +177,7 @@ $ENV{'ACE_ROOT'} = $CHECKOUT . '/' . $MODULE . '/build/' . $BUILD; $ENV{'TAO_ROOT'} = $CHECKOUT . '/' . $MODULE . '/build/' . $BUILD . '/TAO'; @failures = (); +@warnings = (); $MAKEFLAGS .= " shared_libs_only=1"; foreach $i (@BUILD_LIST) { $date = localtime; @@ -182,6 +187,7 @@ foreach $i (@BUILD_LIST) { local $current_dir = $i; local $last_error = ""; + local $last_warning = ""; while () { print LOG $_; chop; @@ -196,6 +202,12 @@ foreach $i (@BUILD_LIST) { $last_error = $current_dir; } } + if (m/Warning:/ || m/warning:/) { + if ($last_warning ne $current_dir) { + push @warnings, "Warning while compiling in $current_dir\n"; + $last_warning = $current_dir; + } + } } if (close(MAKE) == 0) { push @failures, "errors while running make in $i"; @@ -244,6 +256,10 @@ if ($#failures >= 0) { mydie @failures; } +if ($#warnings >= 0) { + mywarn @warnings; +} + close(LOG) || mydie "cannot close LOGFILE"; @@ -253,3 +269,5 @@ close(HIST) unlink $disable_file || mydie "cannot unlink disable file"; + +exit 0; -- cgit v1.2.1