---
 util/mpiinstall.in |   72 ++++++++++++++++++++++++++---------------------------
 1 file changed, 36 insertions(+), 36 deletions(-)

--- a/util/mpiinstall.in
+++ b/util/mpiinstall.in
@@ -461,9 +461,9 @@
 MkDir $docdir
 MkDir $sysconfdir
 
-MkDir $prefix/examples
+MkDir $docdir/examples
 if [ -n "$CPP_DIR" -a "$buildcpp" = 1 ] ; then 
-    MkDir $prefix/examples/$CPP_DIR
+    MkDir $docdir/examples/$CPP_DIR
     MkDir $includedir/mpi2c++
 fi
 
@@ -1026,7 +1026,7 @@
 CopyFile $top_srcdir/util/cleanipcs $sbindir $XMODE
 #
 # Example programs
-CopyFile $top_srcdir/installtest/Makefile.in $prefix/examples
+CopyFile $top_srcdir/installtest/Makefile.in $docdir/examples
 #
 # This SHOULD use mpireconfig...
 Savevar=$prefix
@@ -1034,39 +1034,39 @@
 # prefix=@prefix@ when ever prefix= starts in the first column (!)
 # It also does this with exec_prefix (!!)
      prefix=$APREFIX
-(cd $DESTDIR$prefix/examples ; $DESTDIR$bindir/mpireconfig Makefile )
-echo "(cd $prefix/examples ; $MAKE clean)" >> $UNINSTALLFILE
-echo "rm -f $prefix/examples/Makefile" >> $UNINSTALLFILE
+(cd $DESTDIR$docdir/examples ; $DESTDIR$bindir/mpireconfig Makefile )
+echo "(cd $docdir/examples ; $MAKE clean)" >> $UNINSTALLFILE
+echo "rm -f $docdir/examples/Makefile" >> $UNINSTALLFILE
      prefix=$Savevar
-CopyFile $DESTDIR$prefix/examples/Makefile $datadir/Makefile.sample
-CopyFile $top_srcdir/installtest/cpi.c $prefix/examples
-CopyFile $top_srcdir/installtest/cpip.c $prefix/examples
-CopyFile $top_srcdir/installtest/cpilog.c $prefix/examples
-CopyFile $top_srcdir/installtest/hello++.cc $prefix/examples
+CopyFile $DESTDIR$docdir/examples/Makefile $datadir/Makefile.sample
+CopyFile $top_srcdir/installtest/cpi.c $docdir/examples
+CopyFile $top_srcdir/installtest/cpip.c $docdir/examples
+CopyFile $top_srcdir/installtest/cpilog.c $docdir/examples
+CopyFile $top_srcdir/installtest/hello++.cc $docdir/examples
 if [ "@NOF77@" = "0" ] ; then
-    CopyFile $top_srcdir/installtest/pi3.f $prefix/examples
-    CopyFile $top_srcdir/installtest/pi3p.f $prefix/examples
+    CopyFile $top_srcdir/installtest/pi3.f $docdir/examples
+    CopyFile $top_srcdir/installtest/pi3p.f $docdir/examples
     if [ "@NO_F90@" = "0" ] ; then
-        CopyFile $top_srcdir/installtest/pi3f90.f90 $prefix/examples
+        CopyFile $top_srcdir/installtest/pi3f90.f90 $docdir/examples
     fi
 fi
 if [ -s $top_srcdir/romio/test/simple.c ] ; then 
-    CopyFile $top_srcdir/romio/test/simple.c $prefix/examples/simpleio.c
+    CopyFile $top_srcdir/romio/test/simple.c $docdir/examples/simpleio.c
 fi
-CopyFile $top_srcdir/installtest/README $prefix/examples
+CopyFile $top_srcdir/installtest/README $docdir/examples
 #
 # Test build the examples
-$Show "(cd $DESTDIR$prefix/examples ; rm -f mpirun ; \
+$Show "(cd $DESTDIR$docdir/examples ; rm -f mpirun ; \
 	  ln -s ../bin/mpirun mpirun )"
-echo "rm -f $prefix/examples/mpirun" >> $UNINSTALLFILE
+echo "rm -f $docdir/examples/mpirun" >> $UNINSTALLFILE
 #
 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 $DESTDIR$docdir/examples; $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 $DESTDIR$docdir/examples; MPICH_USE_SHLIB="yes"; export MPICH_USE_SHLIB; $MAKE all ; $MAKE clean )"
   fi
 fi
 #
@@ -1075,7 +1075,7 @@
 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 $docdir/examples/$CPP_DIR
     #
     prefix=$APREFIX
 #      CPPEXDIR=$top_srcdir/$CPP_DIR/contrib/examples
@@ -1083,30 +1083,30 @@
 #      # 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 "rm -f $prefix/examples/$CPP_DIR/Makefile" >> $UNINSTALLFILE
+#      (cd $docdir/examples/$CPP_DIR ; $bindir/mpireconfig Makefile )
+#      echo "(cd $docdir/examples/$CPP_DIR ; $MAKE clean)" >> $UNINSTALLFILE
+#      echo "rm -f $docdir/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
+#      CopyFile $CPPEXDIR/hello_world.cc $docdir/examples/$CPP_DIR
+#      CopyFile $CPPEXDIR/ring.cc $docdir/examples/$CPP_DIR
+#      CopyFile $CPPEXDIR/topology.cc $docdir/examples/$CPP_DIR
+#      CopyFile $CPPEXDIR/user_bcast.cc $docdir/examples/$CPP_DIR
+#      CopyFile $CPPEXDIR/chapter_10_mpi2.cc $docdir/examples/$CPP_DIR
+#      CopyFile $CPPEXDIR/pi.cc $docdir/examples/$CPP_DIR
+#      CopyFile $CPPEXDIR/README $docdir/examples/$CPP_DIR
 #      #
 #      # Test build the C++ examples
-#      $Show "(cd $prefix/examples/$CPP_DIR ; rm -f mpirun ; \
+#      $Show "(cd $docdir/examples/$CPP_DIR ; rm -f mpirun ; \
 #  	      ln -s ../../bin/mpirun mpirun )"
-#      echo "rm -f $prefix/examples/$CPP_DIR/mpirun" >> $UNINSTALLFILE
+#      echo "rm -f $docdir/examples/$CPP_DIR/mpirun" >> $UNINSTALLFILE
 #      #
 #      echo "About to run C++ installation test..."
-#      $Show "(cd $prefix/examples/$CPP_DIR; $MAKE ; $MAKE clean)"
+#      $Show "(cd $docdir/examples/$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
+#      if [ -d $docdir/examples/$CPP_DIR/ii_files ] ; then
+#          $Show rm -rf $docdir/examples/$CPP_DIR/ii_files
 #      fi
     #
 fi
