Skip to content

Commit

Permalink
build: Run missing package dist-hook earlier
Browse files Browse the repository at this point in the history
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 <[email protected]>
bwbarrett committed Apr 8, 2022
1 parent 49460b4 commit 0224e23
Showing 2 changed files with 18 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
# Copyright (c) 2006-2022 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2017-2021 Amazon.com, Inc. or its affiliates.
# Copyright (c) 2017-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
# All Rights reserved.
# Copyright (c) 2020 IBM Corporation. All rights reserved.
# $COPYRIGHT$
@@ -22,6 +22,9 @@
# $HEADER$
#

# There is an assumption in config/Makefile.am that config is the first
# subdirectory in the DIST_SUBDIRS list. If that changes, work may
# be required.
SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_SUBDIRS) test docs
DIST_SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_DIST_SUBDIRS) test docs
EXTRA_DIST = README.md VERSION Doxyfile LICENSE autogen.pl AUTHORS
@@ -34,14 +37,6 @@ dist-hook:
echo "AUTHORS file is empty; aborting distribution"; \
exit 1; \
fi
@if test -n "$(OPAL_MAKEDIST_DISABLE)" ; then \
echo "#########################################################################"; \
echo "#"; \
echo "# make dist is disabled due to the following packages: $(OPAL_MAKEDIST_DISABLE)"; \
echo "#"; \
echo "#########################################################################"; \
exit 1; \
fi

# Check for common symbols. Use a "-hook" to increase the odds that a
# developer will see it at the end of their installation process.
14 changes: 14 additions & 0 deletions config/Makefile.am
Original file line number Diff line number Diff line change
@@ -15,13 +15,27 @@
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
# Copyright (c) 2016 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# This is a weird place for this, but config/ is the first directory that
# is entered, and the dist-hook runs at the end of the current directory,
# so this is the earliest we can run this test.
dist-hook:
@if test -n "$(OPAL_MAKEDIST_DISABLE)" ; then \
echo "#########################################################################"; \
echo "#"; \
echo "# make dist is disabled due to the following packages: $(OPAL_MAKEDIST_DISABLE)"; \
echo "#"; \
echo "#########################################################################"; \
exit 1; \
fi

EXTRA_DIST = \
distscript.sh \
opal_get_version.m4sh \

0 comments on commit 0224e23

Please sign in to comment.