From 1326bcb9ac9b6fca0a4802034cbb90624923b160 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 26 Oct 2018 17:38:36 -0700 Subject: [PATCH] Update make-doc-files to work with plugins. --- dist/make-doc-files | 22 ++++++++++++++-------- dist/shared.sh | 7 +++++++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/dist/make-doc-files b/dist/make-doc-files index 3eaabb8ef..5cc0bb702 100755 --- a/dist/make-doc-files +++ b/dist/make-doc-files @@ -28,37 +28,43 @@ make_output_dir BUILD_DIR=doc-build PLUGINS_WITH_DOC=(blowfish gdbm imail) +DIST_DOCDIR=${DIST_DIR}/doc build_docs () { - my_configure - my_make "${@}" + my_configure + my_make "${@}" } make_archive_dir () { - local FORMAT=${1} - my_make install-"${FORMAT}" "${FORMAT}"dir="${TL_DIR}"/"${DIST_DIR}"/doc + my_make install-"${1}" DESTDIR="${TL_DIR}"/"${DIST_DIR}" } notify "Building documentation" unpack_dist_file_to "${DIST_DIR}" "${BUILD_DIR}" run_command "${DOC_OUT}"-build "${BUILD_DIR}"/doc build_docs for PLUGIN in "${PLUGINS_WITH_DOC[@]}"; do - run_command "${DOC_OUT}"-build-"${PLUGIN}" "${BUILD_DIR}"/src/"${PLUGIN}" \ + run_command_append "${DOC_OUT}"-build "${BUILD_DIR}"/src/"${PLUGIN}" \ build_docs info html pdf done new_temp_dir "${DIST_DIR}" for FORMAT in html info pdf; do - OUT=${DOC_OUT}-${FORMAT} + OUT=${DOC_OUT}-archive-${FORMAT} notify "Making archive for ${FORMAT}" run_command "${OUT}" "${BUILD_DIR}"/doc make_archive_dir "${FORMAT}" for PLUGIN in "${PLUGINS_WITH_DOC[@]}"; do - run_command "${OUT}"-"${PLUGIN}" "${BUILD_DIR}"/src/"${PLUGIN}" \ + run_command_append "${OUT}" "${BUILD_DIR}"/src/"${PLUGIN}" \ make_archive_dir "${FORMAT}" done - make_tar_file "${OUT}" "${DIST_DIR}"-doc-"${FORMAT}" "${DIST_DIR}"/doc + my_mkdir "${DIST_DOCDIR}" + FROM=doc/mit-scheme + [[ ${FORMAT} = info ]] && FROM=info + my_mv "${DIST_DIR}"/usr/local/share/${FROM}/* "${DIST_DOCDIR}"/. + my_rm_rf "${DIST_DIR}"/usr + my_rm_f "${DIST_DOCDIR}"/plugins.scm + make_tar_file "${OUT}" "${DIST_DIR}"-doc-"${FORMAT}" "${DIST_DOCDIR}" my_rm_rf "${DIST_DIR}" done diff --git a/dist/shared.sh b/dist/shared.sh index 881edc04a..e755b8601 100644 --- a/dist/shared.sh +++ b/dist/shared.sh @@ -221,6 +221,13 @@ run_command () run_command_helper "${@}" &> "${OUT_FILE}" } +run_command_append () +{ + local OUT_FILE=${1} + shift + run_command_helper "${@}" >> "${OUT_FILE}" 2>&1 +} + run_command_helper () { local DIR=${1} -- 2.25.1