File: configure.m4

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (99 lines) | stat: -rw-r--r-- 2,832 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2016-2018 Inria.  All rights reserved.
dnl Copyright (c) 2019      Research Organization for Information Science
dnl                         and Technology (RIST).  All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl

# mca_ompi_osc_monitoring_generate_templates
#
# Overwrite $1. $1 is where the different templates are brought
# together and compose an array of components by listing component
# names in $2.
#
# $1 = filename
# $2 = osc component names
#
AC_DEFUN(
    [MCA_OMPI_OSC_MONITORING_GENERATE_TEMPLATES],
    [m4_ifval(
         [$1],
         [AC_CONFIG_COMMANDS(
              [$1],
              [filename="$1"
               components=`echo "$2" | sed -e 's/,/ /g' -e 's/monitoring//'`
               cat <<EOF >$filename
/* $filename
 *
 * This file was generated from ompi/mca/osc/monitoring/configure.m4
 *
 * DO NOT EDIT THIS FILE.
 *
 */
/*
 * Copyright (c) 2017-2018 Inria.  All rights reserved.
 * \$COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * \$HEADER$
 */

#ifndef MCA_OSC_MONITORING_GEN_TEMPLATE_H
#define MCA_OSC_MONITORING_GEN_TEMPLATE_H

#include "ompi_config.h"
#include "ompi/mca/osc/osc.h"
#include "ompi/mca/osc/monitoring/osc_monitoring_template.h"

/************************************************************/
/* Include template generating macros and inlined functions */

EOF
               # Generate each case in order to register the proper template functions
               for comp in $components
               do
                   echo "OSC_MONITORING_MODULE_TEMPLATE_GENERATE(${comp})" >>$filename
               done
               cat <<EOF >>$filename

/************************************************************/

typedef struct {
    const char * name;
    ompi_osc_base_module_t * (*fct) (ompi_osc_base_module_t *);
} osc_monitoring_components_list_t;

static const osc_monitoring_components_list_t osc_monitoring_components_list[[]] = {
EOF
               for comp in $components
               do
                   echo "    { .name = \"${comp}\", .fct = OSC_MONITORING_SET_TEMPLATE_FCT_NAME(${comp}) }," >>$filename
               done
               cat <<EOF >>$filename
    { .name = NULL, .fct = NULL }
};

#endif /* MCA_OSC_MONITORING_GEN_TEMPLATE_H */
EOF
               unset filename components
              ])
         ])dnl
    ])dnl

# MCA_ompi_osc_monitoring_CONFIG()
# ------------------------------------------------
AC_DEFUN(
    [MCA_ompi_osc_monitoring_CONFIG],
    [AC_CONFIG_FILES([ompi/mca/osc/monitoring/Makefile])
    [$1]

     MCA_OMPI_OSC_MONITORING_GENERATE_TEMPLATES(
         [ompi/mca/osc/monitoring/osc_monitoring_template_gen.h],
         [mca_ompi_osc_m4_config_component_list, mca_ompi_osc_no_config_component_list])dnl
    ])dnl