Updates to autogen.pl:
+ Add ifdef guard to project's autogenerated "frameworks.h" header file, e.g., "opal/inlude/opal/frameworks.h" would have "OPAL_FRAMEWORKS_H". + Avoid adding "ignored" frameworks to the autogenerated "frameworks.h" header file. + Avoid adding non-MCA projects to the autogenerated 'mca_project_list', which maintains existing support for "projects" with new MCA framework enhancements. Moves this down to mca_run_global(). + Add small loop at end to add projects with a "config/" subdir to the list of includes for 'autoreconf'. This commit was SVN r28456.
Этот коммит содержится в:
родитель
f15fe5045e
Коммит
0a950009be
45
autogen.pl
45
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");
|
open(FRAMEWORKS_OUT, ">$project/include/$project/frameworks.h");
|
||||||
printf FRAMEWORKS_OUT "%s", "/*
|
printf FRAMEWORKS_OUT "%s", "/*
|
||||||
* This file is autogenerated by autogen.pl. Do not edit this file by hand.
|
* This file is autogenerated by autogen.pl. Do not edit this file by hand.
|
||||||
*/
|
*/
|
||||||
|
#ifndef $ifdef_string
|
||||||
|
#define $ifdef_string
|
||||||
|
|
||||||
#include <opal/mca/base/mca_base_framework.h>
|
#include <opal/mca/base/mca_base_framework.h>
|
||||||
|
|
||||||
$framework_decl_output
|
$framework_decl_output
|
||||||
static mca_base_framework_t *${project}_frameworks[] = {
|
static mca_base_framework_t *${project}_frameworks[] = {
|
||||||
$framework_array_output NULL
|
$framework_array_output NULL
|
||||||
};\n";
|
};
|
||||||
|
|
||||||
|
#endif /* $ifdef_string */\n\n";
|
||||||
close(FRAMEWORKS_OUT);
|
close(FRAMEWORKS_OUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,6 +453,19 @@ sub mca_run_global {
|
|||||||
# Debugging output
|
# Debugging output
|
||||||
debug_dump($mca_found);
|
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
|
$m4 .= "\n$dnl_line
|
||||||
@ -485,7 +504,14 @@ dnl MCA information\n";
|
|||||||
push(@tmp, $f)
|
push(@tmp, $f)
|
||||||
if ($f ne "common");
|
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) {
|
foreach my $f (@mykeys) {
|
||||||
$frameworks_comma .= ", $f";
|
$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 })
|
push(@{$projects}, { name => "ompi", dir => "ompi", need_base => 1 })
|
||||||
if (!$no_ompi_arg);
|
if (!$no_ompi_arg);
|
||||||
|
|
||||||
# Save the list of projects in the m4 file
|
$m4 .= "dnl Separate m4 define for each project\n";
|
||||||
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";
|
|
||||||
foreach my $p (@$projects) {
|
foreach my $p (@$projects) {
|
||||||
$m4 .= "m4_define([project_$p->{name}], [1])\n";
|
$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";
|
verbose "==> Running autoreconf\n";
|
||||||
chdir("..");
|
chdir("..");
|
||||||
my $cmd = "autoreconf -ivf --warnings=all,no-obsolete,no-override -I config";
|
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);
|
safe_system($cmd);
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user