common/bin/hide_important_warnings_from_javac.sh
author duke
Wed, 05 Jul 2017 20:54:03 +0200
changeset 32971 1a52a30674cd
parent 14111 2a82ecb35fc7
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 12258
diff changeset
     1
#!/bin/bash
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     2
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# published by the Free Software Foundation.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# accompanied this code).
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
# You should have received a copy of the GNU General Public License version
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# or visit www.oracle.com if you need additional information or have any
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# questions.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
if [ -x /usr/bin/ggrep ] ; then
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    26
    # Gnu grep on Solaris
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    27
    # (reference configure and build/solaris-i586-clientANDserver-release/spec.gmk
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    28
    GREP=/usr/bin/ggrep
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
else
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    30
    GREP=grep
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    32
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    33
EXP="Note: Some input files use or override a deprecated API."
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    34
EXP="${EXP}|Note: Recompile with -Xlint:deprecation for details."
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    35
EXP="${EXP}|Note: Some input files use unchecked or unsafe operations."
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    36
EXP="${EXP}|Note: Recompile with -Xlint:unchecked for details."
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    37
EXP="${EXP}| warning"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    38
EXP="${EXP}|uses or overrides a deprecated API."
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    39
EXP="${EXP}|uses unchecked or unsafe operations."
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    40
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    41
${GREP} --line-buffered -v -E "${EXP}"