Automatically generate a list of installed frameworks in project/include/project/frameworks.h
This commit was SVN r28238.
This commit is contained in:
parent
020b9991a4
commit
c3b67d0187
32
autogen.pl
32
autogen.pl
@ -362,6 +362,36 @@ sub mca_process_framework {
|
||||
|
||||
##############################################################################
|
||||
|
||||
sub mca_generate_framework_header(\$\@) {
|
||||
my ($project, @frameworks) = @_;
|
||||
my $framework_array_output="";
|
||||
my $framework_decl_output="";
|
||||
|
||||
foreach my $framework (@frameworks) {
|
||||
# There is no common framework object
|
||||
if ($framework ne "common") {
|
||||
my $framework_name = "${project}_${framework}_base_framework";
|
||||
|
||||
$framework_array_output .= " &$framework_name,\n";
|
||||
$framework_decl_output .= "extern mca_base_framework_t $framework_name;\n";
|
||||
}
|
||||
}
|
||||
|
||||
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.
|
||||
*/
|
||||
#include <opal/mca/base/mca_base_framework.h>
|
||||
|
||||
$framework_decl_output
|
||||
static mca_base_framework_t *${project}_frameworks[] = {
|
||||
$framework_array_output NULL
|
||||
};\n";
|
||||
close(FRAMEWORKS_OUT);
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
|
||||
sub mca_process_project {
|
||||
my ($topdir, $project) = @_;
|
||||
|
||||
@ -472,6 +502,8 @@ dnl MCA information\n";
|
||||
}
|
||||
$frameworks_comma =~ s/^, //;
|
||||
|
||||
&mca_generate_framework_header($pname, @mykeys);
|
||||
|
||||
$m4 .= "$dnl_line
|
||||
|
||||
dnl Frameworks in the $pname project and their corresponding directories
|
||||
|
@ -25,7 +25,8 @@ headers += \
|
||||
ompi/constants.h \
|
||||
ompi/types.h \
|
||||
ompi/memchecker.h \
|
||||
ompi/totalview.h
|
||||
ompi/totalview.h \
|
||||
ompi/frameworks.h
|
||||
|
||||
nodist_headers += \
|
||||
ompi/version.h
|
||||
|
@ -25,7 +25,8 @@ headers += \
|
||||
opal/opal_socket_errno.h \
|
||||
opal/types.h \
|
||||
opal/prefetch.h \
|
||||
opal/hash_string.h
|
||||
opal/hash_string.h \
|
||||
opal/frameworks.h
|
||||
|
||||
nodist_headers += \
|
||||
opal/version.h
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/class/opal_pointer_array.h"
|
||||
|
||||
@ -36,6 +40,8 @@
|
||||
#include "opal/runtime/opal.h"
|
||||
#include "opal/dss/dss.h"
|
||||
|
||||
#include "opal/include/opal/frameworks.h"
|
||||
|
||||
#include "opal/mca/installdirs/installdirs.h"
|
||||
#include "opal/mca/event/base/base.h"
|
||||
#include "opal/mca/base/base.h"
|
||||
|
@ -21,7 +21,8 @@
|
||||
|
||||
headers += \
|
||||
orte/constants.h \
|
||||
orte/types.h
|
||||
orte/types.h \
|
||||
orte/frameworks.h
|
||||
|
||||
nodist_headers += \
|
||||
orte/version.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user