Index: /mpich2/branches/dev/kumudb/maint/simplemake.in
===================================================================
--- /mpich2/branches/dev/kumudb/maint/simplemake.in (revision 4827)
+++ /mpich2/branches/dev/kumudb/maint/simplemake.in (revision 4869)
@@ -1192,4 +1192,7 @@
     &TargetInstall;
     print FD $makeBlockSep;
+    
+    #------------kumud_parallel_fix---------------------------------------
+    &TargetExecutables;
 
     # This is ugly, but we need to tell the install target when we're at
@@ -4112,4 +4115,35 @@
     &TargetPostamble( "installcheck" );
 }
+
+#--------------Kumud_parallel_fix--------------------------------
+
+#============================================================================
+#The target to desend into sub-directories and create all the executables that
+#needs to be created
+#INSTALL_BIN = myexecutable
+sub TargetExecutables {
+
+    print FD "all-executable: all-executable-local$newline";
+    foreach $dir (@extra_dirs, @subdirs) {
+        if ($dir eq ".") {
+	     # the pre-requisite all-executable-local already take care of this case.   
+	}
+	elsif ($dir =~ /@([^@]*)@/) {
+	    # May be a replaced variable
+	    print FD "\t${quietmake}for dir in $dir - ; do \\$newline";
+	    print FD "\t\tif [ \"\$\$dir\" = \"-\" ] ; then break ; fi ; \\$newline";
+	    print FD "\t\tif ( cd \$\$dir && \${MAKE} all-executable ) ; then : ; else exit 1; fi \\$newline";
+	    print FD "\tdone$newline";
+	}
+	else {
+	    print FD "\t${quietmake}(cd $dir && \${MAKE} all-executable )$newline";
+	}
+    }
+    
+
+   
+}
+
+
 #
 # ===========================================================================
