402N/A#!/bin/bash
402N/A#
402N/A#
402N/A# CDDL HEADER START
402N/A#
402N/A# The contents of this file are subject to the terms of the
402N/A# Common Development and Distribution License (the "License").
402N/A# You may not use this file except in compliance with the License.
402N/A#
402N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
402N/A# or http://www.opensolaris.org/os/licensing.
402N/A# See the License for the specific language governing permissions
402N/A# and limitations under the License.
402N/A#
402N/A# When distributing Covered Code, include this CDDL HEADER in each
402N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
402N/A# If applicable, add the following below this CDDL HEADER, with the
402N/A# fields enclosed by brackets "[]" replaced with your own identifying
402N/A# information: Portions Copyright [yyyy] [name of copyright owner]
402N/A#
402N/A# CDDL HEADER END
402N/A#
402N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
402N/A#
402N/A#
402N/A
402N/Aunset LD_LIBRARY_PATH
402N/Aunset LD_LIBRARY_PATH_32
402N/Aunset LD_LIBRARY_PATH_64
402N/Aunset LD_PRELOAD
402N/Aunset LD_PRELOAD_32
402N/Aunset LD_PRELOAD_64
402N/A
402N/Aexport TOPDIR="../../"
402N/Aexport DO_CLEANUP="no"
402N/Aexport DO_MAKE="no"
402N/A
402N/AUNKNOWN_ARG=no
402N/APRINT_HELP=no
402N/A
402N/Acheck_args() {
402N/A while [ "$#" -gt 0 ] ; do
402N/A UNKNOWN_ARG=no
402N/A case "$1" in
402N/A --cleanup)
402N/A DO_CLEANUP=yes
402N/A ;;
402N/A --make)
402N/A DO_MAKE=yes
402N/A ;;
402N/A *)
402N/A UNKNOWN_ARG=yes
402N/A ;;
402N/A esac
402N/A
402N/A if [ "${UNKNOWN_ARG}" = "yes" ] ; then
402N/A echo "$1: Invalid argument"
402N/A PRINT_HELP=yes
402N/A shift
402N/A continue
402N/A fi
402N/A
402N/A shift
402N/A done
402N/A
402N/A export DO_CLEANUP DO_MAKE TOPDIR
402N/A
402N/A if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
402N/A echo "Usage: `basename $0` [ --cleanup ] [ --make ]"
402N/A exit 1
402N/A fi
402N/A}
402N/A
402N/Arun_make() {
402N/A if [ "${DO_MAKE}" = "no" ] ; then
402N/A return
402N/A fi
402N/A
402N/A for file in \
402N/A "18.limits.stdcxx-436" \
402N/A "18.limits.traps.stdcxx-624" \
402N/A "20.specialized.stdcxx-390" \
402N/A "21.string.append.stdcxx-438" \
402N/A "21.string.io.stdcxx-206" \
402N/A "21.string.io.stdcxx-250" \
402N/A "21.string.replace.stdcxx-175" \
402N/A "21.string.stdcxx-162" \
402N/A "21.string.stdcxx-231" \
402N/A "21.string.stdcxx-466" \
402N/A "22.locale.codecvt.stdcxx-435" \
402N/A "22.locale.cons.stdcxx-485" \
402N/A "22.locale.messages.stdcxx-542" \
402N/A "22.locale.money.get.stdcxx-62" \
402N/A "22.locale.num.put.stdcxx-2" \
402N/A "22.locale.stdcxx-554" \
402N/A "23.associative.stdcxx-16" \
402N/A "23.bitset.cons.stdcxx-297" \
402N/A "23.deque.special.stdcxx-127" \
402N/A "23.list.cons.stdcxx-268" \
402N/A "23.list.insert.stdcxx-331" \
402N/A "23.list.special.stdcxx-334" \
402N/A "23.set.stdcxx-216" \
402N/A "23.vector.bool.stdcxx-235" \
402N/A "23.vector.stdcxx-611" \
402N/A "24.istream.iterator.cons.stdcxx-645" \
402N/A "24.istream.iterator.ops.stdcxx-321" \
402N/A "24.operations.stdcxx-234" \
402N/A "26.valarray.binary.stdcxx-237" \
402N/A "26.valarray.members.stdcxx-313" \
402N/A "26.valarray.members.stdcxx-318" \
402N/A "26.valarray.sub.stdcxx-224" \
402N/A "26.valarray.sub.stdcxx-309" \
402N/A "26.valarray.sub.stdcxx-448" \
402N/A "26.valarray.transcend.stdcxx-315" \
402N/A "26.valarray.unary.stdcxx-314" \
402N/A "27.basic.ios.copyfmt.stdcxx-766" \
402N/A "27.basic.ios.tie.stdcxx-804" \
402N/A "27.cstdio.stdcxx-195" \
402N/A "27.filebuf.members.stdcxx-308" \
402N/A "27.filebuf.virtuals.stdcxx-522" \
402N/A "27.ostream.unformatted.stdcxx-626" \
402N/A "27.streambuf.imbue.stdcxx-307" \
402N/A "27.stringbuf.members.stdcxx-427" \
402N/A "27.stringbuf.overflow.stdcxx-795" \
402N/A "27.stringbuf.str.stdcxx-514" \
402N/A "27.stringbuf.xsputn.stdcxx-515" \
402N/A "27.stringbuf.xsputn.stdcxx-576"
402N/A do
402N/A if [ -f "${file}.o" ] ; then
402N/A rm -f ${file}.o
402N/A fi
402N/A if [ -f "${file}" ] ; then
402N/A rm -f ${file}
402N/A fi
402N/A
402N/A gmake ${file}
402N/A done
402N/A}
402N/A
402N/Ado_cleanup() {
402N/A if [ "${DO_CLEANUP}" = "no" ] ; then
402N/A return
402N/A fi
402N/A
402N/A for file in \
402N/A "18.limits.stdcxx-436" \
402N/A "18.limits.traps.stdcxx-624" \
402N/A "20.specialized.stdcxx-390" \
402N/A "21.string.append.stdcxx-438" \
402N/A "21.string.io.stdcxx-206" \
402N/A "21.string.io.stdcxx-250" \
402N/A "21.string.replace.stdcxx-175" \
402N/A "21.string.stdcxx-162" \
402N/A "21.string.stdcxx-231" \
402N/A "21.string.stdcxx-466" \
402N/A "22.locale.codecvt.stdcxx-435" \
402N/A "22.locale.cons.stdcxx-485" \
402N/A "22.locale.messages.stdcxx-542" \
402N/A "22.locale.money.get.stdcxx-62" \
402N/A "22.locale.num.put.stdcxx-2" \
402N/A "22.locale.stdcxx-554" \
402N/A "23.associative.stdcxx-16" \
402N/A "23.bitset.cons.stdcxx-297" \
402N/A "23.deque.special.stdcxx-127" \
402N/A "23.list.cons.stdcxx-268" \
402N/A "23.list.insert.stdcxx-331" \
402N/A "23.list.special.stdcxx-334" \
402N/A "23.set.stdcxx-216" \
402N/A "23.vector.bool.stdcxx-235" \
402N/A "23.vector.stdcxx-611" \
402N/A "24.istream.iterator.cons.stdcxx-645" \
402N/A "24.istream.iterator.ops.stdcxx-321" \
402N/A "24.operations.stdcxx-234" \
402N/A "26.valarray.binary.stdcxx-237" \
402N/A "26.valarray.members.stdcxx-313" \
402N/A "26.valarray.members.stdcxx-318" \
402N/A "26.valarray.sub.stdcxx-224" \
402N/A "26.valarray.sub.stdcxx-309" \
402N/A "26.valarray.sub.stdcxx-448" \
402N/A "26.valarray.transcend.stdcxx-315" \
402N/A "26.valarray.unary.stdcxx-314" \
402N/A "27.basic.ios.copyfmt.stdcxx-766" \
402N/A "27.basic.ios.tie.stdcxx-804" \
402N/A "27.cstdio.stdcxx-195" \
402N/A "27.filebuf.members.stdcxx-308" \
402N/A "27.filebuf.virtuals.stdcxx-522" \
402N/A "27.ostream.unformatted.stdcxx-626" \
402N/A "27.streambuf.imbue.stdcxx-307" \
402N/A "27.stringbuf.members.stdcxx-427" \
402N/A "27.stringbuf.overflow.stdcxx-795" \
402N/A "27.stringbuf.str.stdcxx-514" \
402N/A "27.stringbuf.xsputn.stdcxx-515" \
402N/A "27.stringbuf.xsputn.stdcxx-576"
402N/A do
402N/A rm -f "${file}"
402N/A done
402N/A}
402N/A
402N/Acheck_args $@
402N/Arun_make
402N/Ado_cleanup
402N/A
402N/Aexit 0
402N/A