$NetBSD: patch-al,v 1.6 2003/03/27 21:07:05 jschauma Exp $ --- util/mpiinstall.in.orig Mon Jan 13 18:12:29 2003 +++ util/mpiinstall.in Thu Mar 27 12:04:15 2003 @@ -453,9 +453,11 @@ MkDir $docdir MkDir $sysconfdir -MkDir $prefix/examples +MkDir $prefix/share/util +MkDir $prefix/share/util/machines +MkDir $prefix/share/examples/mpi-ch if [ -n "$CPP_DIR" -a "$buildcpp" = 1 ] ; then - MkDir $prefix/examples/$CPP_DIR + MkDir $prefix/share/examples/mpi-ch/$CPP_DIR MkDir $includedir/mpi2c++ fi @@ -670,7 +672,7 @@ # $CPRP -r util/machines $prefix/util/machines.anl for file in util/machines/machines* ; do if [ -s $file ] ; then - CopyFile $file $datadir + CopyFile $file $prefix/share/util/machines fi done # @@ -963,6 +965,8 @@ CopyFile $top_srcdir/util/cleanipcs $sbindir $XMODE # # Example programs +# We install all example programs, so we can skip these +if [ ! true ]; then CopyFile $top_srcdir/installtest/Makefile.in $prefix/examples # # This SHOULD use mpireconfig... @@ -996,14 +1000,16 @@ $Show "(cd $DESTDIR$prefix/examples ; /bin/rm -f mpirun ; \ ln -s ../bin/mpirun mpirun )" echo "/bin/rm -f $prefix/examples/mpirun" >> $UNINSTALLFILE + +fi # no examples # echo "About to run installation test..." if [ "x$DESTDIR" = "x" ]; then # only works when DESTDIR is blank, and installing on final location. - $Show "(cd $DESTDIR$prefix/examples; $MAKE all ; $MAKE clean )" + $Show "(cd $prefix/share/examples/mpi-ch; $MAKE all ; $MAKE clean )" if [ @SHAREDKIND@ != "ignore" ] ; then echo "About to run installation test for shared libraries ..." - $Show "(cd $DESTDIR$prefix/examples; MPICH_USE_SHLIB="yes"; export MPICH_USE_SHLIB; $MAKE all ; $MAKE clean )" + $Show "(cd $prefix/share/examples/mpi-ch; MPICH_USE_SHLIB="yes"; export MPICH_USE_SHLIB; $MAKE all ; $MAKE clean )" fi fi # @@ -1012,39 +1018,40 @@ if [ -n "$CPP_DIR" -a "$buildcpp" = 1 ] ; then # Removed the installation of these extra examples. # C++ Example programs -# CopyFile $top_srcdir/installtest/mpi-2-c++/Makefile.in $prefix/examples/$CPP_DIR + CopyFile $top_srcdir/installtest/mpi-2-c++/Makefile.in $prefix/share/examples/mpi-ch/$CPP_DIR # prefix=$APREFIX -# CPPEXDIR=$top_srcdir/$CPP_DIR/contrib/examples + CPPEXDIR=$top_srcdir/$CPP_DIR/contrib/examples # # This isn't correct because it doesn't handle all of the fields in # # the C++ examples Makefile, particularly the TEMPLATE_REP field # # The intent here is to update the directories; but we also need # # to update a few additional fields -# (cd $prefix/examples/$CPP_DIR ; $bindir/mpireconfig Makefile ) -# echo "(cd $prefix/examples/$CPP_DIR ; $MAKE clean)" >> $UNINSTALLFILE -# echo "/bin/rm -f $prefix/examples/$CPP_DIR/Makefile" >> $UNINSTALLFILE -# prefix=$Savevar -# CopyFile $CPPEXDIR/hello_world.cc $prefix/examples/$CPP_DIR -# CopyFile $CPPEXDIR/ring.cc $prefix/examples/$CPP_DIR -# CopyFile $CPPEXDIR/topology.cc $prefix/examples/$CPP_DIR -# CopyFile $CPPEXDIR/user_bcast.cc $prefix/examples/$CPP_DIR -# CopyFile $CPPEXDIR/chapter_10_mpi2.cc $prefix/examples/$CPP_DIR -# CopyFile $CPPEXDIR/pi.cc $prefix/examples/$CPP_DIR -# CopyFile $CPPEXDIR/README $prefix/examples/$CPP_DIR + (cd $prefix/share/examples/mpi-ch/$CPP_DIR ; $bindir/mpireconfig Makefile ) + echo "(cd $prefix/share/examples/mpi-ch/$CPP_DIR ; $MAKE clean)" >> $UNINSTALLFILE + echo "/bin/rm -f $prefix/share/examples/mpi-ch/$CPP_DIR/Makefile" >> $UNINSTALLFILE + prefix=$Savevar + CopyFile $CPPEXDIR/hello_world.cc $prefix/share/examples/mpi-ch/$CPP_DIR + CopyFile $CPPEXDIR/ring.cc $prefix/share/examples/mpi-ch/$CPP_DIR + CopyFile $CPPEXDIR/topology.cc $prefix/share/examples/mpi-ch/$CPP_DIR + CopyFile $CPPEXDIR/user_bcast.cc $prefix/share/examples/mpi-ch/$CPP_DIR + CopyFile $CPPEXDIR/chapter_10_mpi2.cc $prefix/share/examples/mpi-ch/$CPP_DIR + CopyFile $CPPEXDIR/pi.cc $prefix/share/examples/mpi-ch/$CPP_DIR + CopyFile $CPPEXDIR/README $prefix/share/examples/mpi-ch/$CPP_DIR + # # # # Test build the C++ examples -# $Show "(cd $prefix/examples/$CPP_DIR ; /bin/rm -f mpirun ; \ -# ln -s ../../bin/mpirun mpirun )" -# echo "/bin/rm -f $prefix/examples/$CPP_DIR/mpirun" >> $UNINSTALLFILE -# # -# echo "About to run C++ installation test..." -# $Show "(cd $prefix/examples/$CPP_DIR; $MAKE ; $MAKE clean)" + $Show "(cd $prefix/share/examples/mpi-ch/$CPP_DIR ; /bin/rm -f mpirun ; \ + ln -s $bindir/mpirun mpirun )" + echo "/bin/rm -f $prefix/share/examples/mpi-ch/$CPP_DIR/mpirun" >> $UNINSTALLFILE + + echo "About to run C++ installation test..." + $Show "(cd $prefix/share/examples/mpi-ch/$CPP_DIR; $MAKE ; $MAKE clean)" # # A temporary fix because C++ clean doesn't remove any template # # directories. This will eventually need to be changed into a for loop # # (even better, the clean target in the Makefile should be fixed) -# if [ -d $prefix/examples/$CPP_DIR/ii_files ] ; then -# $Show rm -rf $prefix/examples/$CPP_DIR/ii_files -# fi + if [ -d $prefix/share/examples/mpi-ch/$CPP_DIR/ii_files ] ; then + $Show rm -rf $prefix/share/examples/mpi-ch/$CPP_DIR/ii_files + fi # fi #