[PATCH] to common/bin/hide_important_warnings_from_javac.sh for OpenSolaris
Tim Bell
tim.bell at gmail.com
Mon Nov 28 07:53:20 PST 2011
Hi All
I know this script is a short time measure that will eventually go
away. I'd still like to use it on OpenSolaris as well as on Linux.
Fredrik, as build-infra committer, could sponsor this?
Thanks-
Tim Bell
% hg out
comparing with http://hg.openjdk.java.net/build-infra/jdk7/
searching for changes
changeset: 431:c8572af8c1d0
tag: tip
user: tbell
date: Mon Nov 28 07:43:25 2011 -0800
summary: Use /usr/bin/ggrep on OpenSolaris
% hg export -g 431:c8572af8c1d0
# HG changeset patch
# User tbell
# Date 1322495005 28800
# Node ID c8572af8c1d0cbee093f8695b8964dbd7823a1a2
# Parent da7bdee66b9afc26949f8aae17391f2ac7313b96
Use /usr/bin/ggrep on OpenSolaris
Contributed-by: Tim Bell <tim.bell at gmail.com>
diff --git a/common/bin/hide_important_warnings_from_javac.sh
b/common/bin/hide_important_warnings_from_javac.sh
--- a/common/bin/hide_important_warnings_from_javac.sh
+++ b/common/bin/hide_important_warnings_from_javac.sh
@@ -1,7 +1,18 @@
-grep --line-buffered -v "Note: Some input files use or override a
deprecated API." | \
-grep --line-buffered -v "Note: Recompile with -Xlint:deprecation for
details." | \
-grep --line-buffered -v "Note: Some input files use unchecked or
unsafe operations." | \
-grep --line-buffered -v "Note: Recompile with -Xlint:unchecked for
details." | \
-grep --line-buffered -v " warning" | \
-grep --line-buffered -v "uses or overrides a deprecated API." | \
-grep --line-buffered -v "uses unchecked or unsafe operations."
+#!/bin/sh
+if [ -x /usr/bin/ggrep ] ; then
+ # Gnu grep on Solaris
+ # (reference configure and
build/solaris-i586-clientANDserver-release/spec.gmk
+ GREP=/usr/bin/ggrep
+else
+ GREP=/usr/bin/grep
+fi
+#
+EXP="Note: Some input files use or override a deprecated API."
+EXP="${EXP}|Note: Recompile with -Xlint:deprecation for details."
+EXP="${EXP}|Note: Some input files use unchecked or unsafe operations."
+EXP="${EXP}|Note: Recompile with -Xlint:unchecked for details."
+EXP="${EXP}| warning"
+EXP="${EXP}|uses or overrides a deprecated API."
+EXP="${EXP}|uses unchecked or unsafe operations."
+#
+${GREP} --line-buffered -v -E "${EXP}"
More information about the build-infra-dev
mailing list