[mpich2-commits] r4070 - mpich2/trunk/maint
gropp at mcs.anl.gov
gropp at mcs.anl.gov
Sat Mar 14 16:50:34 CDT 2009
Author: gropp
Date: 2009-03-14 16:50:34 -0500 (Sat, 14 Mar 2009)
New Revision: 4070
Modified:
mpich2/trunk/maint/simplemake.in
Log:
Fixed bug in simplemake when name of executable program does not match any of the source files
Modified: mpich2/trunk/maint/simplemake.in
===================================================================
--- mpich2/trunk/maint/simplemake.in 2009-03-14 21:03:58 UTC (rev 4069)
+++ mpich2/trunk/maint/simplemake.in 2009-03-14 21:50:34 UTC (rev 4070)
@@ -1840,14 +1840,36 @@
sub FindPgmSrcType {
$pgm = $_[0];
$pgmsrc = $_[1];
+ # Also keep track of the types seen
+ my %exttypes;
+ my $firstext = "";
foreach $file (split(/\s+/,$pgmsrc)) {
($name,$ext) = split('\.',$file);
if ($name eq $pgm) {
$pgmlinktypes{$ext} = 1;
return $ext;
}
+ else {
+ $exttypes{$ext} = 1;
+ if ($firstext eq "") { $firstext = $ext; }
+ }
}
- return "c";
+ if (defined($exttypes{"c"})) {
+ $pgmlinktypes{"c"} = 1;
+ return "c";
+ }
+ elsif (defined($exttypes{"cxx"})) {
+ $pgmlinktypes{"cxx"} = 1;
+ return "cxx";
+ }
+ elsif (defined($exttypes{"f90"})) {
+ $pgmlinktypes{"f90"} = 1;
+ return "f90";
+ }
+ else {
+ $pgmlinktypes{$firstext} = 1;
+ return $firstext;
+ }
}
sub ClearVars {
More information about the mpich2-commits
mailing list