Skip to content

Commit 9f3e1a0

Browse files
Merge pull request #1898 from ggouaillardet/topic/poc_configury_cli
configury: capture configury command line
2 parents 5ff6b81 + 273e560 commit 9f3e1a0

File tree

6 files changed

+51
-3
lines changed

6 files changed

+51
-3
lines changed

config/opal_setup_cli.m4

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
dnl -*- shell-script -*-
2+
dnl
3+
dnl Copyright (c) 2016 Research Organization for Information Science
4+
dnl and Technology (RIST). All rights reserved.
5+
dnl $COPYRIGHT$
6+
dnl
7+
dnl Additional copyrights may follow
8+
dnl
9+
dnl $HEADER$
10+
dnl
11+
12+
dnl OPAL_CAPTURE_CONFIGURE_CLI
13+
dnl
14+
dnl Capture configure command line and do the AC substitution
15+
dnl
16+
dnl Arguments: the variable in which command line will be captured
17+
dnl
18+
dnl Dependencies: None
19+
dnl
20+
AC_DEFUN([OPAL_CAPTURE_CONFIGURE_CLI],[
21+
# Capture configure command line do the AC substitution
22+
OPAL_VAR_SCOPE_PUSH([sed_quote_subst arg quoted_arg])
23+
$1=
24+
for arg in "$[]@"; do
25+
sed_quote_subst='s/\(@<:@`"$\\@:>@\)/\\\1/g'
26+
case "$arg" in
27+
*@<:@\\\`\"\$[]@:>@*)
28+
quoted_arg=\'`echo "$arg" | sed $sed_quote_subst`\' ;;
29+
*)
30+
quoted_arg="\'$arg\'" ;;
31+
esac
32+
33+
eval "$1=\$$1\\ \$quoted_arg"
34+
done
35+
OPAL_VAR_SCOPE_POP
36+
AC_SUBST($1)
37+
])

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ AC_PREREQ(2.60)
5454
AC_CONFIG_AUX_DIR(config)
5555
AC_CONFIG_MACRO_DIR(config)
5656

57+
OPAL_CAPTURE_CONFIGURE_CLI([OPAL_CONFIGURE_CLI])
58+
5759
# Get our platform support file. This has to be done very, very early
5860
# because it twiddles random bits of autoconf
5961
OPAL_LOAD_PLATFORM

ompi/tools/ompi_info/param.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
14-
* Copyright (c) 2014-2015 Research Organization for Information Science
14+
* Copyright (c) 2014-2016 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
1616
* Copyright (c) 2015 Intel, Inc. All rights reserved
1717
* $COPYRIGHT$
@@ -37,6 +37,7 @@
3737
#endif
3838

3939
#include MCA_timer_IMPLEMENTATION_HEADER
40+
#include "opal/include/opal/version.h"
4041
#include "opal/class/opal_value_array.h"
4142
#include "opal/class/opal_pointer_array.h"
4243
#include "opal/util/printf.h"
@@ -315,6 +316,7 @@ void ompi_info_do_config(bool want_all)
315316
opal_info_out("Configured by", "config:user", OPAL_CONFIGURE_USER);
316317
opal_info_out("Configured on", "config:timestamp", OPAL_CONFIGURE_DATE);
317318
opal_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST);
319+
opal_info_out("Configure command line", "config:cli", OPAL_CONFIGURE_CLI);
318320

319321
opal_info_out("Built by", "build:user", OMPI_BUILD_USER);
320322
opal_info_out("Built on", "build:timestamp", OMPI_BUILD_DATE);

opal/include/opal/version.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2016 Research Organization for Information Science
14+
* and Technology (RIST). All rights reserved.
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow
@@ -35,5 +37,6 @@
3537
#undef OPAL_VERSION
3638
#endif
3739
#define OPAL_VERSION "@OPAL_VERSION@"
40+
#define OPAL_CONFIGURE_CLI "@OPAL_CONFIGURE_CLI@"
3841

3942
#endif

orte/tools/orte-info/param.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
14-
* Copyright (c) 2015 Research Organization for Information Science
14+
* Copyright (c) 2015-2016 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
1616
* $COPYRIGHT$
1717
*
@@ -35,6 +35,7 @@
3535
#endif
3636

3737
#include MCA_timer_IMPLEMENTATION_HEADER
38+
#include "opal/include/opal/version.h"
3839
#include "opal/mca/installdirs/installdirs.h"
3940
#include "opal/class/opal_value_array.h"
4041
#include "opal/class/opal_pointer_array.h"
@@ -367,6 +368,7 @@ void orte_info_do_config(bool want_all)
367368
orte_info_out("Configured by", "config:user", OPAL_CONFIGURE_USER);
368369
orte_info_out("Configured on", "config:timestamp", OPAL_CONFIGURE_DATE);
369370
orte_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST);
371+
orte_info_out("Configure command line", "config:cli", OPAL_CONFIGURE_CLI);
370372

371373
orte_info_out("Built by", "build:user", OMPI_BUILD_USER);
372374
orte_info_out("Built on", "build:timestamp", OMPI_BUILD_DATE);

oshmem/tools/oshmem_info/param.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* All rights reserved.
44
*
55
* Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
6-
* Copyright (c) 2014-2015 Research Organization for Information Science
6+
* Copyright (c) 2014-2016 Research Organization for Information Science
77
* and Technology (RIST). All rights reserved.
88
* $COPYRIGHT$
99
*
@@ -29,6 +29,7 @@
2929
#endif
3030

3131
#include MCA_timer_IMPLEMENTATION_HEADER
32+
#include "opal/include/opal/version.h"
3233
#include "opal/class/opal_value_array.h"
3334
#include "opal/class/opal_pointer_array.h"
3435
#include "opal/util/printf.h"
@@ -283,6 +284,7 @@ void oshmem_info_do_config(bool want_all)
283284
opal_info_out("Configured by", "config:user", OPAL_CONFIGURE_USER);
284285
opal_info_out("Configured on", "config:timestamp", OPAL_CONFIGURE_DATE);
285286
opal_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST);
287+
opal_info_out("Configure command line", "config:cli", OPAL_CONFIGURE_CLI);
286288

287289
opal_info_out("Built by", "build:user", OMPI_BUILD_USER);
288290
opal_info_out("Built on", "build:timestamp", OMPI_BUILD_DATE);

0 commit comments

Comments
 (0)