Skip to content

Commit 5a8fe8b

Browse files
committed
Break "make dist" if a package isn't configured
With a previous commit, it is now possible that configure will not run the PMIX or PRRTE configure scripts. This means that "make dist" will not recurse into the package's directory and those packages will unexpectedly not be in the dist tarball. This patch avoids that situation by explicitly breaking "make dist" in those situations, printing the package that caused the issue. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 1fe8ca9 commit 5a8fe8b

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

Makefile.am

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
1313
# Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved.
1414
# Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
15-
# Copyright (c) 2017-2020 Amazon.com, Inc. or its affiliates.
15+
# Copyright (c) 2017-2021 Amazon.com, Inc. or its affiliates.
1616
# All Rights reserved.
1717
# Copyright (c) 2020 IBM Corporation. All rights reserved.
1818
# $COPYRIGHT$
@@ -34,6 +34,14 @@ dist-hook:
3434
echo "AUTHORS file is empty; aborting distribution"; \
3535
exit 1; \
3636
fi
37+
@if test -n "$(OPAL_MAKEDIST_DISABLE)" ; then \
38+
echo "#########################################################################"; \
39+
echo "#"; \
40+
echo "# make dist is disabled due to the following packages: $(OPAL_MAKEDIST_DISABLE)"; \
41+
echo "#"; \
42+
echo "#########################################################################"; \
43+
exit 1; \
44+
fi
3745

3846
# Check for common symbols. Use a "-hook" to increase the odds that a
3947
# developer will see it at the end of their installation process.

config/ompi_setup_prrte.m4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
5959
# failing to configure in a situation where it isn't
6060
# desired.
6161
_OMPI_SETUP_PRRTE_INTERNAL([prrte_setup_internal_happy=1],
62-
[prrte_setup_internal_happy=0])])])
62+
[prrte_setup_internal_happy=0])])
63+
64+
# if we have a pmix package and configure did not complete
65+
# successfullly (or wasn't started), then disable make dist.
66+
AS_IF([test $prrte_setup_internal_happy != 1],
67+
[OPAL_MAKEDIST_DISABLE="$OPAL_MAKEDIST_DISABLE PRRTE"])])
6368
6469
# unless internal specifically requested by the user, try to find
6570
# an external that works.

config/opal_config_pmix.m4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ AC_DEFUN([OPAL_CONFIG_PMIX], [
114114
[--with-pmix=[[^ ]]*], [--with-platform=[[^ ]]*]],
115115
[internal_pmix_happy=1])
116116
OPAL_SUBDIR_ENV_RESTORE([opal_pmix_configure])
117-
OPAL_3RDPARTY_DIST_SUBDIRS="$OPAL_3RDPARTY_DIST_SUBDIRS openpmix"])])
117+
OPAL_3RDPARTY_DIST_SUBDIRS="$OPAL_3RDPARTY_DIST_SUBDIRS openpmix"])
118+
119+
# if we have a pmix package and configure did not complete
120+
# successfullly (or wasn't started), then disable make dist.
121+
AS_IF([test $internal_pmix_happy != 1],
122+
[OPAL_MAKEDIST_DISABLE="$OPAL_MAKEDIST_DISABLE PMIX"])])
118123
119124
# unless internal specifically requested by the user, try to find
120125
# an external that works.

configure.ac

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
# Copyright (c) 2014-2017 Research Organization for Information Science
2424
# and Technology (RIST). All rights reserved.
2525
# Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
26-
# Copyright (c) 2018 Amazon.com, Inc. or its affiliates.
26+
# Copyright (c) 2018-2021 Amazon.com, Inc. or its affiliates.
2727
# All Rights reserved.
2828
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
2929
# Copyright (c) 2019 Triad National Security, LLC. All rights
3030
# reserved.
31-
# Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
32-
# All Rights reserved.
3331
# $COPYRIGHT$
3432
#
3533
# Additional copyrights may follow
@@ -68,6 +66,9 @@ OPAL_CAPTURE_CONFIGURE_CLI([OPAL_CONFIGURE_CLI])
6866
# because it twiddles random bits of autoconf
6967
OPAL_LOAD_PLATFORM
7068

69+
# Start a list of packages / modules / etc. that want to disable "make dist".
70+
OPAL_MAKEDIST_DISABLE=""
71+
7172
#
7273
# Start it up
7374
#
@@ -1538,6 +1539,10 @@ AC_CONFIG_FILES([contrib/dist/mofed/debian/rules],
15381539
AC_CONFIG_FILES([contrib/dist/mofed/compile_debian_mlnx_example],
15391540
[chmod +x contrib/dist/mofed/compile_debian_mlnx_example])
15401541
1542+
AS_IF([test -n "$OPAL_MAKEDIST_DISABLE"],
1543+
[AC_MSG_WARN(["make dist" will be disabled due to: $OPAL_MAKEDIST_DISABLE])])
1544+
AC_SUBST([OPAL_MAKEDIST_DISABLE])
1545+
15411546
OPAL_CONFIG_FILES
15421547
m4_ifdef([project_ompi], [OMPI_CONFIG_FILES])
15431548
m4_ifdef([project_oshmem], [OSHMEM_CONFIG_FILES])

0 commit comments

Comments
 (0)