Skip to content

Commit 0224e23

Browse files
committed
build: Run missing package dist-hook earlier
The hook that would fail "make dist" if packages weren't configured to be included in the tarball ran at the end of "make dist". This was fine when the packages missing didn't break running make dist. However, Sphinx not being available means that "make dist" won't work because of missing files, but the error was really not intuitive. Move the dist-hook for missing packages from the top level to the config directory Makefile, which has the practical outcome of running the missing package check right after generation of the AUTHORS file, well before any likely missing package make breakage, returning us to clear error messages. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 49460b4 commit 0224e23

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

Makefile.am

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Copyright (c) 2006-2022 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-2021 Amazon.com, Inc. or its affiliates.
15+
# Copyright (c) 2017-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
1616
# All Rights reserved.
1717
# Copyright (c) 2020 IBM Corporation. All rights reserved.
1818
# $COPYRIGHT$
@@ -22,6 +22,9 @@
2222
# $HEADER$
2323
#
2424

25+
# There is an assumption in config/Makefile.am that config is the first
26+
# subdirectory in the DIST_SUBDIRS list. If that changes, work may
27+
# be required.
2528
SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_SUBDIRS) test docs
2629
DIST_SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_DIST_SUBDIRS) test docs
2730
EXTRA_DIST = README.md VERSION Doxyfile LICENSE autogen.pl AUTHORS
@@ -34,14 +37,6 @@ dist-hook:
3437
echo "AUTHORS file is empty; aborting distribution"; \
3538
exit 1; \
3639
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
4540

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

config/Makefile.am

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,27 @@
1515
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
1616
# Copyright (c) 2016 Research Organization for Information Science
1717
# and Technology (RIST). All rights reserved.
18+
# Copyright (c) 2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
1819
# $COPYRIGHT$
1920
#
2021
# Additional copyrights may follow
2122
#
2223
# $HEADER$
2324
#
2425

26+
# This is a weird place for this, but config/ is the first directory that
27+
# is entered, and the dist-hook runs at the end of the current directory,
28+
# so this is the earliest we can run this test.
29+
dist-hook:
30+
@if test -n "$(OPAL_MAKEDIST_DISABLE)" ; then \
31+
echo "#########################################################################"; \
32+
echo "#"; \
33+
echo "# make dist is disabled due to the following packages: $(OPAL_MAKEDIST_DISABLE)"; \
34+
echo "#"; \
35+
echo "#########################################################################"; \
36+
exit 1; \
37+
fi
38+
2539
EXTRA_DIST = \
2640
distscript.sh \
2741
opal_get_version.m4sh \

0 commit comments

Comments
 (0)