1 0 yongsun #/bin/bash 2 82 yongsun # 3 82 yongsun # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4 82 yongsun # 5 82 yongsun # Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved. 6 82 yongsun # 7 82 yongsun # The contents of this file are subject to the terms of either the GNU Lesser 8 82 yongsun # General Public License Version 2.1 only ("LGPL") or the Common Development and 9 82 yongsun # Distribution License ("CDDL")(collectively, the "License"). You may not use this 10 82 yongsun # file except in compliance with the License. You can obtain a copy of the CDDL at 11 82 yongsun # http://www.opensource.org/licenses/cddl1.php and a copy of the LGPLv2.1 at 12 82 yongsun # http://www.opensource.org/licenses/lgpl-license.php. See the License for the 13 82 yongsun # specific language governing permissions and limitations under the License. When 14 82 yongsun # distributing the software, include this License Header Notice in each file and 15 82 yongsun # include the full text of the License in the License file as well as the 16 82 yongsun # following notice: 17 82 yongsun # 18 82 yongsun # NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE 19 82 yongsun # (CDDL) 20 82 yongsun # For Covered Software in this distribution, this License shall be governed by the 21 82 yongsun # laws of the State of California (excluding conflict-of-law provisions). 22 82 yongsun # Any litigation relating to this License shall be subject to the jurisdiction of 23 82 yongsun # the Federal Courts of the Northern District of California and the state courts 24 82 yongsun # of the State of California, with venue lying in Santa Clara County, California. 25 82 yongsun # 26 82 yongsun # Contributor(s): 27 82 yongsun # 28 82 yongsun # If you wish your version of this file to be governed by only the CDDL or only 29 82 yongsun # the LGPL Version 2.1, indicate your decision by adding "[Contributor]" elects to 30 82 yongsun # include this software in this distribution under the [CDDL or LGPL Version 2.1] 31 82 yongsun # license." If you don't indicate a single choice of license, a recipient has the 32 82 yongsun # option to distribute your version of this file under either the CDDL or the LGPL 33 82 yongsun # Version 2.1, or to extend the choice of license to its licensees as provided 34 82 yongsun # above. However, if you add LGPL Version 2.1 code and therefore, elected the LGPL 35 82 yongsun # Version 2 license, then the option applies only if the new code is made subject 36 82 yongsun # to such option by the copyright holder. 37 0 yongsun # 38 0 yongsun 39 2 ys148558 if [[ ! -d /jds/cbe/bin ]] && [[ ! -d /opt/jdsbld/bin ]]; then 40 0 yongsun echo "Please install Gnome CBE before kick off $0." 41 0 yongsun exit 1 42 0 yongsun fi 43 0 yongsun 44 315 yongsun if [ -d /opt/jdsbld/bin ]; then 45 315 yongsun . /opt/jdsbld/bin/env.sh 46 315 yongsun else 47 0 yongsun . /jds/cbe/bin/env.sh 48 37 simford export ACLOCAL_FLAGS="-I /usr/share/aclocal -I /jds/cbe/share/aclocal -I /jds/cbe/share/aclocal-1.9" 49 0 yongsun fi 50 0 yongsun 51 0 yongsun export LC_ALL=C 52 0 yongsun BUILDROOT=$(cd $(dirname $0); pwd) 53 0 yongsun SRC=$(cd $BUILDROOT/../..; pwd) 54 0 yongsun 55 0 yongsun ARCH=`uname -p` 56 0 yongsun FILEROOT="$SRC/proto/$ARCH/fileroot" 57 0 yongsun MARCH=sparcv9 58 0 yongsun [ "x$ARCH" = "xi386" ] && MARCH=amd64 59 0 yongsun 60 0 yongsun cd $BUILDROOT 61 0 yongsun [ ! -d LOG ] && mkdir -p LOG 62 0 yongsun 63 0 yongsun set -e -x 64 0 yongsun # Append all further output & errors to the log file 65 0 yongsun exec > $BUILDROOT/LOG/build-sunpinyin.log 2>&1 66 0 yongsun 67 0 yongsun # 68 0 yongsun # libtool swallows -norunpath option in $(CXXLINK) cmd 69 0 yongsun # add -norunpath in $CXX env value 70 0 yongsun # more details: 71 0 yongsun # http://monaco.sfbay.sun.com/detail.jsf?cr=6497744 72 0 yongsun # http://mail.opensolaris.org/pipermail/jds-notify/2007-April/001799.html 73 0 yongsun # 74 0 yongsun if [ -z $CXX ]; then 75 0 yongsun export CXX="CC -norunpath" 76 0 yongsun elif ! echo $CXX | grep g++ >/dev/null 2>&1; then 77 0 yongsun export CXX="$CXX -norunpath" 78 0 yongsun fi 79 0 yongsun 80 0 yongsun cd $BUILDROOT/ime 81 0 yongsun ./autogen.sh -disable-debug --prefix=/usr 82 0 yongsun make 83 0 yongsun make DESTDIR=$FILEROOT install 84 0 yongsun 85 0 yongsun #cd $BUILDROOT/slm 86 0 yongsun #./autogen.sh -disable-debug --prefix=/usr 87 0 yongsun #make 88 0 yongsun #make DESTDIR=$FILEROOT install 89 0 yongsun 90