annotate makefiles/scripts/addNotices.sh @ 8330:9c60860b1812

8001931: The new build system whitespace cleanup Reviewed-by: tbell, simonis, erikj
author ihse
date Thu, 10 Oct 2013 15:06:21 +0200
parents cea72c2bf071
children
rev   line source
erikj@5507 1 #! /bin/sh
erikj@5507 2 #
alanb@6073 3 # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
erikj@5507 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
erikj@5507 5 #
erikj@5507 6 # This code is free software; you can redistribute it and/or modify it
erikj@5507 7 # under the terms of the GNU General Public License version 2 only, as
erikj@5507 8 # published by the Free Software Foundation. Oracle designates this
erikj@5507 9 # particular file as subject to the "Classpath" exception as provided
erikj@5507 10 # by Oracle in the LICENSE file that accompanied this code.
erikj@5507 11 #
erikj@5507 12 # This code is distributed in the hope that it will be useful, but WITHOUT
erikj@5507 13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
erikj@5507 14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
erikj@5507 15 # version 2 for more details (a copy is included in the LICENSE file that
erikj@5507 16 # accompanied this code).
erikj@5507 17 #
erikj@5507 18 # You should have received a copy of the GNU General Public License version
erikj@5507 19 # 2 along with this work; if not, write to the Free Software Foundation,
erikj@5507 20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
erikj@5507 21 #
erikj@5507 22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
erikj@5507 23 # or visit www.oracle.com if you need additional information or have any
erikj@5507 24 # questions.
erikj@5507 25 #
erikj@5507 26
erikj@5507 27 # Parse the first contiguous comment block in this script and generate
ihse@8330 28 # a java comment block. If this script is invoked with a copyright
erikj@5507 29 # year/year range, the java comment block will contain a Sun copyright.
erikj@5507 30
erikj@5507 31 COPYRIGHT_YEARS="$1"
erikj@5507 32
erikj@5507 33 cat <<__END__
erikj@5507 34 /*
erikj@5507 35 __END__
erikj@5507 36
erikj@5507 37 if [ "x$COPYRIGHT_YEARS" != x ]; then
erikj@5507 38 cat <<__END__
erikj@5507 39 * Copyright (c) $COPYRIGHT_YEARS Oracle and/or its affiliates. All rights reserved.
erikj@5507 40 __END__
erikj@5507 41 fi
erikj@5507 42
erikj@5507 43 $NAWK ' /^#.*Copyright.*Oracle/ { next }
ihse@8330 44 /^#([^!]|$)/ { sub(/^#/, " *"); print }
ihse@8330 45 /^$/ { print " */"; exit } ' $0