diff --git a/autogen.pl b/autogen.pl index 82f6f74bee..34f768c926 100755 --- a/autogen.pl +++ b/autogen.pl @@ -376,16 +376,22 @@ sub mca_generate_framework_header(\$\@) { } } + my $ifdef_string = uc "${project}_FRAMEWORKS_H"; open(FRAMEWORKS_OUT, ">$project/include/$project/frameworks.h"); printf FRAMEWORKS_OUT "%s", "/* * This file is autogenerated by autogen.pl. Do not edit this file by hand. */ +#ifndef $ifdef_string +#define $ifdef_string + #include $framework_decl_output static mca_base_framework_t *${project}_frameworks[] = { $framework_array_output NULL -};\n"; +}; + +#endif /* $ifdef_string */\n\n"; close(FRAMEWORKS_OUT); } @@ -447,6 +453,19 @@ sub mca_run_global { # Debugging output debug_dump($mca_found); + # Save (just) the list of MCA projects in the m4 file + my $str; + foreach my $p (@$projects) { + my $pname = $p->{name}; + # Check if this project is an MCA project (contains MCA framework) + if (exists($mca_found->{$pname})) { + $str .= "$p->{name}, "; + } + } + $str =~ s/, $//; + $m4 .= "\ndnl List of MCA projects found by autogen.pl +m4_define([mca_project_list], [$str])\n"; + #----------------------------------------------------------------------- $m4 .= "\n$dnl_line @@ -485,7 +504,14 @@ dnl MCA information\n"; push(@tmp, $f) if ($f ne "common"); } - @mykeys = @tmp; + + # Then, check ignore status and prume ignored frameworks + @mykeys = (); + my $dir = "$topdir/$pdir/mca"; + foreach my $f (@tmp) { + push(@mykeys, $f) + if (!ignored("$dir/$f")); + } foreach my $f (@mykeys) { $frameworks_comma .= ", $f"; @@ -1175,16 +1201,7 @@ push(@{$projects}, { name => "orte", dir => "orte", need_base => 1 }) push(@{$projects}, { name => "ompi", dir => "ompi", need_base => 1 }) if (!$no_ompi_arg); -# Save the list of projects in the m4 file -my $str; -foreach my $p (@$projects) { - $str .= "$p->{name}, "; -} -$str =~ s/, $//; -$m4 .= "dnl List of projects found by autogen.pl -m4_define([mca_project_list], [$str]) - -dnl Separate m4 define for each project\n"; +$m4 .= "dnl Separate m4 define for each project\n"; foreach my $p (@$projects) { $m4 .= "m4_define([project_$p->{name}], [1])\n"; } @@ -1251,6 +1268,10 @@ safe_system("autom4te --language=m4sh opal_get_version.m4sh -o opal_get_version. verbose "==> Running autoreconf\n"; chdir(".."); my $cmd = "autoreconf -ivf --warnings=all,no-obsolete,no-override -I config"; +foreach my $project (@{$projects}) { + $cmd .= " -I $project->{dir}/config" + if (-d "$project->{dir}/config"); +} safe_system($cmd); #---------------------------------------------------------------------------