diff --git a/Makefile.prte-rules b/Makefile.prte-rules index eb50a1855b..27b38eda3e 100644 --- a/Makefile.prte-rules +++ b/Makefile.prte-rules @@ -2,6 +2,7 @@ # Copyright (c) 2008-2022 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2020 Intel, Inc. All rights reserved. +# Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -22,8 +23,8 @@ PRTE_V_SPHINX_MAN = $(prte__v_SPHINX_MAN_$V) prte__v_SPHINX_MAN_ = $(prte__v_SPHINX_MAN_$AM_DEFAULT_VERBOSITY) prte__v_SPHINX_MAN_0 = @echo " GENERATE man pages"; -PRTE_V_TXT = $(prte__v_SPHINX_TXT_$V) -prte__v_TXT_ = $(prte__v_SPHINX_TXT_$AM_DEFAULT_VERBOSITY) +PRTE_V_TXT = $(prte__v_TXT_$V) +prte__v_TXT_ = $(prte__v_TXT_$AM_DEFAULT_VERBOSITY) prte__v_TXT_0 = @echo " GENERATE text files"; PRTE_V_LN_S = $(prte__v_LN_S_$V) diff --git a/configure.ac b/configure.ac index f513641428..7a25a4a8a4 100644 --- a/configure.ac +++ b/configure.ac @@ -718,6 +718,7 @@ AC_INCLUDES_DEFAULT # OAC_SETUP_SPHINX([$srcdir/docs/_build/html/index.html], []) +AC_CHECK_PROGS(PYTHON, [python3 python python2]) AS_IF([test -n "$OAC_MAKEDIST_DISABLE"], [AS_IF([test -n "$PRTE_MAKEDIST_DISABLE"], diff --git a/src/docs/show-help-files/Makefile.am b/src/docs/show-help-files/Makefile.am index 37be796efd..f25f919249 100644 --- a/src/docs/show-help-files/Makefile.am +++ b/src/docs/show-help-files/Makefile.am @@ -96,7 +96,9 @@ $(TXT_SENTINEL_OUTPUT): if PRTE_BUILD_DOCS $(PRTE_V_TXT) $(SPHINX_BUILD) -M text "$(srcdir)" "$(OUTDIR)" $(SPHINX_OPTS) else !PRTE_BUILD_DOCS - $(PRTE_V_TXT) $(srcdir)/build-dummy-ini-files.py $(TXT_OUTDIR) $(ALL_TXT_BUILT) + $(PRTE_V_TXT) \ + $(PYTHON) $(srcdir)/build-dummy-ini-files.py $(TXT_OUTDIR) $(ALL_TXT_BUILT); \ + touch $(TXT_SENTINEL_OUTPUT) endif !PRTE_BUILD_DOCS maintainer-clean-local: diff --git a/src/docs/show-help-files/build-dummy-ini-files.py b/src/docs/show-help-files/build-dummy-ini-files.py index d17364cd9a..57781cb57a 100755 --- a/src/docs/show-help-files/build-dummy-ini-files.py +++ b/src/docs/show-help-files/build-dummy-ini-files.py @@ -63,10 +63,13 @@ # Ensure the out directory exists full_outdir = os.path.abspath(os.path.dirname(outfile)) - # Use older form of os.mkdirs (without the exist_ok param) to make - # this script runnable in as many environments as possible. + if not os.path.exists(full_outdir): + # Use older form of os.mkdirs (without the exist_ok param) to + # make this script runnable in as many environments as + # possible. + os.makedirs(full_outdir) + try: - os.makedirs(full_outdir, exists_ok=True) # Write the output file with open(outfile, 'w') as fp: for section in sections: @@ -74,5 +77,6 @@ # we don't have Python 3 (!). fp.write("""[{}] This help section is empty because PRRTE was built without Sphinx.\n""".format(section)) - except Exception: + except Exception as e: + print("ERROR: {}".format(e)) pass