⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpeinstall.in

📁 fortran并行计算包
💻 IN
📖 第 1 页 / 共 2 页
字号:
if [ -d $DESTDIR$2 ] ; then    dest=$DESTDIR$2/`basename $1`    destfile=$2/`basename $1`else    dest=$DESTDIR$2    destfile=$2fiif [ $replace = 0 -a -f $dest ] ; then    if [ $verbose = 1 ] ; then echo "$dest exists; not changed" ; fielif [ -d $1 ] ; then    echo "$1 is a directory; not fixed"else    if [ -f $dest ] ; then $Show $RM -f $dest ; fi    if [ $just_testing = 0 ] ; then \        if [ "$MPI_IMPL" = "MPICH" -o "$MPI_IMPL" = "MPICH2" ] ; then            sed \            -e "s%^MPI_CC\([ ]*\)=\([ ]*\).*\$%MPI_CC\1=\2$bindir/mpicc%g" \            -e "s%^MPI_F77\([ ]*\)=\([ ]*\).*\$%MPI_F77\1=\2$bindir/mpif77%g" \            -e "s%^MPE_CLINKER\([ ]*\)=\([ ]*\).*\$%MPE_CLINKER\1=\2$bindir/mpicc -mpe=%g" \            -e "s%^MPE_FLINKER\([ ]*\)=\([ ]*\).*\$%MPE_FLINKER\1=\2$bindir/mpif77 -mpe=%g" \            -e "s%^MPE_INCDIR\([ ]*\)=\([ ]*\).*\$%MPE_INCDIR\1=\2$includedir%g" \            -e "s%^MPE_LIBDIR\([ ]*\)=\([ ]*\).*\$%MPE_LIBDIR\1=\2$libdir%g" \            -e "s%^MPE_BINDIR\([ ]*\)=\([ ]*\).*\$%MPE_BINDIR\1=\2$bindir%g" \            -e "s%^MPE_ETCDIR\([ ]*\)=\([ ]*\).*\$%MPE_ETCDIR\1=\2$sysconfdir%g" \            -e "s%^MPE_SBINDIR\([ ]*\)=\([ ]*\).*\$%MPE_SBINDIR\1=\2$sbindir%g" \            $1 > $dest        else            sed \            -e "s%^MPE_CLINKER\([ ]*\)=\([ ]*\).*\$%MPE_CLINKER\1=\2$bindir/mpecc -%g" \            -e "s%^MPE_FLINKER\([ ]*\)=\([ ]*\).*\$%MPE_FLINKER\1=\2$bindir/mpefc -%g" \            -e "s%^MPE_INCDIR\([ ]*\)=\([ ]*\).*\$%MPE_INCDIR\1=\2$includedir%g" \            -e "s%^MPE_LIBDIR\([ ]*\)=\([ ]*\).*\$%MPE_LIBDIR\1=\2$libdir%g" \            -e "s%^MPE_BINDIR\([ ]*\)=\([ ]*\).*\$%MPE_BINDIR\1=\2$bindir%g" \            -e "s%^MPE_ETCDIR\([ ]*\)=\([ ]*\).*\$%MPE_ETCDIR\1=\2$sysconfdir%g" \            -e "s%^MPE_SBINDIR\([ ]*\)=\([ ]*\).*\$%MPE_SBINDIR\1=\2$sbindir%g" \            $1 > $dest        fi        rc=$?        if [ $rc != 0 ] ; then            echo "*** Error fixing up file $dest. ***"            errs=`expr $errs + 1`            if [ $failmode = "hard" ] ; then exit $rc ; fi        else            # store the destination fixed filename            filelist="$filelist $destfile"        fi    else        if [ $verbose = 1 ] ; then echo "Fixup $1 and install to $dest" ; fi    fifiif [ -z "$3" ] ; then    mode=$MODEelse    mode=$3fiif [ "X$mode" != "X" ] ; then    $Show chmod $mode $dest    rc=$?    if [ $rc != 0 ] ; then        echo "*** Error setting mode $mode on file $dest. ***"        errs=`expr $errs + 1`        if [ $failmode = "hard" ] ; then exit $rc ; fi    fifi}################################################################################ End of routines###############################################################################if [ ! -s $libbuild_dir/lib${PROF_LIBNAME}.a ] ; then     echo "You must make $pkgname before installing it!"    echo "Could not find $libbuild_dir/lib${PROF_LIBNAME}.a !"    exit 1fiif [ ! -n "$prefix" ] ; then     echo "Set an installation location with -prefix=<location> ."    exit 1fiif [ $verbose = 1 ] ; then    echo "Install into $DESTDIR$prefix"fiif [ -d $DESTDIR$prefix ] ; then    if [ $verbose = 1 ] ; then        echo "using existing directory $DESTDIR$prefix"    fielse    MkDir $prefixfi# echo "prefix = $prefix"# echo "exec_prefix = $exec_prefix"# echo "includedir = $includedir"# echo "libdir = $libdir"# echo "bindir = $bindir"# echo "sbindir = $sbindir"# echo "datadir = $datadir"# echo "sysconfdir = $sysconfdir"# echo "mandir = $mandir"# echo "htmldir = $htmldir"# echo "docdir = $docdir"# If the prefix was set, we want to override these choicesif [ "$prefix_override" = 1 ] ; then    includedir=$prefix/include    libdir=$prefix/lib    bindir=$prefix/bin    sbindir=$prefix/sbin    datadir=$prefix/share    sysconfdir=$prefix/etc    mandir=$prefix/man    htmldir=$prefix/www    docdir=$prefix/doc    if [ $appendUninstall = 0 ] ; then        UNINSTALLFILE=$DESTDIR${sbindir}/${UNINSTALL_base}    fifi# Install end-user include Files, i.e. mpe*hif [ -n "$includebuild_dir" ] ; then    if [ -d $includebuild_dir ] ; then        echo "Installing $pkgname include files to $DESTDIR$includedir"        if [ ! -d $DESTDIR$includedir ] ; then            MkDir $includedir        fi        cd $includebuild_dir        for file in clog*.h mpe*.h ; do            if [ -f $includebuild_dir/$file ] ; then                InstallFile $includebuild_dir/$file $includedir/$file $MODE            fi        done    fifi# Install librariesif [ -n "$libbuild_dir" ] ; then    if [ -d $libbuild_dir ] ; then        echo "Installing $pkgname libraries to $DESTDIR$libdir"        InstallDirRecur $libbuild_dir $libdir $MODE    fifi# Install utility programsif [ -n "$binbuild_dir" ] ; then    if [ -d $binbuild_dir ] ; then         echo "Installing $pkgname utility programs to $DESTDIR$bindir"         InstallDirRecur $binbuild_dir $bindir $XMODE         if [ -s $binbuild_dir/mpecc -a -x $binbuild_dir/mpecc ] ; then             FixInstallFile $binbuild_dir/mpecc $bindir/mpecc $XMODE         fi         if [ -s $binbuild_dir/mpefc -a -x $binbuild_dir/mpefc ] ; then             FixInstallFile $binbuild_dir/mpefc $bindir/mpefc $XMODE         fi    fifi# Install compiler configuration filesif [ -n "$etcbuild_dir" ] ; then    if [ -d $etcbuild_dir ] ; then         echo "Installing $pkgname configuration files to $DESTDIR$sysconfdir"         InstallDirRecur $etcbuild_dir $sysconfdir $MODE         cd $etcbuild_dir && \         for file in *.conf ; do \             FixInstallFile $file $sysconfdir/$file ; \         done    fifi# Create $sbindir outside of nested IF blocks because $sbindir is needed# even if $sbinbuild_dir/* do not exist.MkDir $sbindir# Install system-admin related utiliesif [ -n "$sbinbuild_dir" ] ; then    if [ -d $sbinbuild_dir ] ; then         echo "Installing $pkgname system utility programs to $DESTDIR$sbindir"         InstallFile    $sbinbuild_dir/mpecheckinstall  $sbindir $XMODE         FixInstallFile $sbinbuild_dir/mpetestlink      $sbindir $XMODE         FixInstallFile $sbinbuild_dir/mpetestexec      $sbindir $XMODE         FixInstallFile $sbinbuild_dir/mpetestexeclog   $sbindir $XMODE    fifiMkDir $datadir# Set up Examples directory for the MPE Logging programslogging_dirname="src/wrappers/test"graphics_dirname="src/graphics/contrib/test"collchk_dirname="src/collchk/test"for pkg in logging graphics collchk ; do    dirname=${pkg}_dirname    eval dirvalue=\$"$dirname"    if [ -f $libbuild_dir/../$dirvalue/Makefile ] ; then        examplesdir=$datadir/examples_${pkg}        MkDir $examplesdir#       Install example C and Fortran programs        InstallDirRecur $top_srcdir/$dirvalue $examplesdir#       Create examples Makefile        cd $DESTDIR$examplesdir && \        FixInstallFile $libbuild_dir/../$dirvalue/Makefile \                       $examplesdir/Makefile#        MPICH2 1.0.2 mpd does not sypport symbolic link to mpiexec#        if [ -x $bindir/mpiexec -o -x $DESTDIR$bindir/mpiexec ] ; then#            $Show "( cd $DESTDIR$examplesdir && \#                     $RM -f mpiexec && \#                     $LN_S $bindir/mpiexec mpiexec )"#            filelist="$filelist $examplesdir/mpiexec" #        elif [ -x $bindir/mpirun -o -x $DESTDIR$bindir/mpirun ] ; then#            $Show "( cd $DESTDIR$examplesdir && \#                     $RM -f mpirun && \#                     $LN_S $bindir/mpirun mpirun )"#            filelist="$filelist $examplesdir/mpirun" #        fi    fidone# Install documentation related files if they exist,# ie INSTALL $top_srcdir/doc  $docdir#    INSTALL $top_srcdir/man  $mandir#    INSTALL $top_srcdir/html $htmldirfor type in doc man html ; do    typename=${type}dir    eval typevalue=\$"$typename"    if [ -d $top_srcdir/$type ] ; then        if [ ! -d $DESTDIR$typevalue ] ; then            MkDir $typevalue        fi        echo "Installing $pkgname $type to $DESTDIR$typevalue"        InstallDirRecur $top_srcdir/$type $typevalue $MODE    fidone# Remove old uninstall fileif [ "$appendUninstall" = 0 -a -f $UNINSTALLFILE ] ; then    $RM -f $UNINSTALLFILEfi## Open an uninstall file and force strong echo if one does NOT existif [ ! -f $UNINSTALLFILE ] ; then    cat > $UNINSTALLFILE <<EOF#! /bin/shset -xEOFfichmod u+x $UNINSTALLFILE# Install the SLOG-2 tools if they exist# Don't set the prefix if the default is chosen.if [ -x $libbuild_dir/../src/slog2sdk/sbin/install-package ] ; then    install_opts="-mode=$MODE -xmode=$XMODE -dmode=$DMODE -copymode=core"    install_opts="-uninstall=$UNINSTALLFILE $install_opts"    if [ "$prefix_override" = 1 ] ; then        install_opts="-prefix=$prefix $install_opts"    fi    ( cd $libbuild_dir/../src/slog2sdk && ./sbin/install-package $install_opts )fi#  Clean up the example directoriesfor pkg in logging graphics ; do    dirname=${pkg}_dirname    examplesdir=$datadir/examples_${pkg}    if [ -s $DESTDIR$examplesdir/Makefile ] ; then       echo "( cd $examplesdir && $MAKE clean )" >> $UNINSTALLFILE    fidone# Add the files to be removed to the UNINSTALLFILEfor file in $filelist ; do    echo "$RM -f $file" >> $UNINSTALLFILEdoneif [ "$appendUninstall" = 0 ] ; then    echo "$RM -f $sbindir/mpeuninstall" >> $UNINSTALLFILE    echo "$RM -f $UNINSTALLFILE" >> $UNINSTALLFILEfi# Add the directory removes to the UNINSTALL filefor dir in $dirlist ; do    echo "if [ -d $dir ] ; then rmdir $dir ; fi" >> $UNINSTALLFILEdoneif [ "$appendUninstall" = 0 ] ; then    cp $UNINSTALLFILE $sbinbuild_dir/mpeuninstall#    echo "Installed $pkgname in $DESTDIR$prefix"    echo "$UNINSTALLFILE may be used to remove the installation"fiif [ $errs -gt 0 ] ; then    rc=1else    rc=0fiexit $rc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -