Skip to content

Commit 48cb583

Browse files
committed
Script to extract configure options from 3rd party libraries
* Extracts configure arguments from 3rd party packages * Takes care to de-duplicate options already provided by OMPI - So there is a preference for the OMPI configure option with its help string. Signed-off-by: Joshua Hursey <[email protected]>
1 parent 56c7ed4 commit 48cb583

File tree

6 files changed

+513
-2
lines changed

6 files changed

+513
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ config/mca_no_configure_components.m4
114114
config/mca_m4_config_include.m4
115115
config/ext_no_configure_components.m4
116116
config/ext_m4_config_include.m4
117+
config/auto-extracted-pmix-configure-args.m4
118+
config/auto-extracted-prrte-configure-args.m4
119+
config/auto-generated-ompi-exclude.ini
117120

118121
contrib/build-mca-comps-outside-of-tree/btl_tcp2_config.h
119122
contrib/build-mca-comps-outside-of-tree/btl_tcp2_config.h.in

3rd-party/exclude-config.ini

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#
2+
# Copyright (c) 2021 IBM Corporation. All rights reserved.
3+
# $COPYRIGHT$
4+
#
5+
# Additional copyrights may follow
6+
#
7+
# $HEADER$
8+
#
9+
# List of m4 files and configure options to exclude when extracting configure
10+
# options from 3rd party packages.
11+
#
12+
# Exclude a whole file (prefix with 'FILE:'):
13+
# FILE: ltoptions.m4
14+
# FILE: 3rd-party/prrte/config/prte_check_slurm.m4
15+
# Accepts a relative path to the top level directory, or a single filename.
16+
# Relative path is useful for excluding an .m4 file from a specific package.
17+
#
18+
# Exclude an option from all 3rd party packages (prefix with 'OPTION:'):
19+
# OPTION: pkgconfigdir
20+
#
21+
# Exclude an option from a specific 3rd party package
22+
# (prefix with 'OPTION(pkg):' where 'pkg' is the package name as it is
23+
# passed to extract-3rd-party-configure.pl in autogen.pl (case insensitive).
24+
# OPTION(PMIx): max-
25+
# OPTION(PRRTE): hwloc
26+
#
27+
28+
#------------------------------------
29+
# Generally excluded files
30+
# Example: FILE: ltoptions.m4
31+
FILE: ltoptions.m4
32+
FILE: ltsugar.m4
33+
FILE: ltversion.m4
34+
FILE: lt~obsolete.m4
35+
FILE: libtool.m4
36+
FILE: autogen_found_items.m4
37+
FILE: config/auto-extracted-pmix-configure-args.m4
38+
FILE: config/auto-extracted-prrte-configure-args.m4
39+
40+
#------------------------------------
41+
# Generally excluded options
42+
# Example: OPTION: pkgconfigdir
43+
OPTION: pkgconfigdir
44+
OPTION: noarch-pkgconfigdir
45+
OPTION: libevent
46+
OPTION: libevent-header
47+
OPTION: libevent-libdir
48+
OPTION: libevent-header
49+
50+
51+
#------------------------------------
52+
# OpenPMIx
53+
OPTION(PMIx): max-
54+
55+
#------------------------------------
56+
# PRRTE
57+
# Example: FILE: 3rd-party/prrte/config/prte_check_slurm.m4
58+
59+
# Excluded options
60+
# Example: OPTION(PRRTE): zlib-libdir
61+
OPTION(PRRTE): hwloc
62+
OPTION(PRRTE): hwloc-libdir
63+
OPTION(PRRTE): hwloc-header
64+
OPTION(PRRTE): max-
65+
OPTION(PRRTE): pmix
66+
OPTION(PRRTE): pmix-libdir
67+
OPTION(PRRTE): pmix-header
68+
OPTION(PRRTE): pmix-devel-support

autogen.pl

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
88
# Copyright (c) 2015-2020 Research Organization for Information Science
99
# and Technology (RIST). All rights reserved.
10-
# Copyright (c) 2015-2020 IBM Corporation. All rights reserved.
10+
# Copyright (c) 2015-2021 IBM Corporation. All rights reserved.
1111
# Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
1212
# All Rights reserved.
1313
#
@@ -1562,6 +1562,11 @@ sub replace_config_sub_guess {
15621562
15631563
dnl 3rd-party package information\n";
15641564

1565+
# Extract the OMPI options to exclude them when processing PMIx and PRRTE
1566+
if ( ! ("pmix" ~~ @disabled_3rdparty_packages && "prrte" ~~ @disabled_3rdparty_packages) ) {
1567+
safe_system("./config/extract-3rd-party-configure.pl -p . -n \"OMPI\" -l > config/auto-generated-ompi-exclude.ini");
1568+
}
1569+
15651570
# these are fairly one-off, so we did not try to do anything
15661571
# generic. Sorry :).
15671572

@@ -1605,6 +1610,12 @@ sub replace_config_sub_guess {
16051610
}
16061611
push(@subdirs, "3rd-party/openpmix/");
16071612
$m4 .= "m4_define([package_pmix], [1])\n";
1613+
1614+
# Grab the unique configure options from each of the 3rd party packages
1615+
safe_system("./config/extract-3rd-party-configure.pl -p \"3rd-party/openpmix/\" -n \"PMIx\" -e config/auto-generated-ompi-exclude.ini > config/auto-extracted-pmix-configure-args.m4");
1616+
# Add the additional configure options from PMIx
1617+
safe_system("./config/extract-3rd-party-configure.pl -p \"3rd-party/openpmix/\" -n \"PMIx\" -l >> config/auto-generated-ompi-exclude.ini");
1618+
16081619
verbose "--- PMIx enabled\n";
16091620
}
16101621

@@ -1618,6 +1629,10 @@ sub replace_config_sub_guess {
16181629
}
16191630
push(@subdirs, "3rd-party/prrte/");
16201631
$m4 .= "m4_define([package_prrte], [1])\n";
1632+
1633+
# Grab the unique configure options from each of the 3rd party packages
1634+
safe_system("./config/extract-3rd-party-configure.pl -p \"3rd-party/prrte/\" -n \"PRRTE\" -e config/auto-generated-ompi-exclude.ini > config/auto-extracted-prrte-configure-args.m4");
1635+
16211636
verbose "--- PRRTE enabled\n";
16221637
}
16231638

0 commit comments

Comments
 (0)