>From eb79de728c95a46d523356c023a48df8fbd5042a Mon Sep 17 00:00:00 2001 From: Urs Liska Date: Mon, 15 Apr 2013 17:32:28 +0200 Subject: [PATCH] doc-section.sh: Make finding of lilypond-book more reliable lilypond-book was only searched for in the LILYPOND_BUILD dir - which fails if lilypond isn't built. This patch attempts t locate lilypond-book with the output of the 'which' command. If the built lilypond is present that takes precedence. I don't think that's fail-safe but increases the chance of the script working properly. --- Documentation/contributor/doc-work.itexi | 12 ++++++++++++ scripts/auxiliar/doc-section.sh | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/contributor/doc-work.itexi b/Documentation/contributor/doc-work.itexi index 8b4e1d9..3315625 100644 --- a/Documentation/contributor/doc-work.itexi +++ b/Documentation/contributor/doc-work.itexi @@ -1490,6 +1490,18 @@ Similarly, output defaults to @file{build/tempdocs/} but this can be overridden by setting the environment variable @code{LILYPOND_TEMPDOCS}. +The script is written with a developer in mind who has +built the program from source, therefore it looks into the build +directory for several occasions. You should expect some +glitches when you didn't build from source yourself. +You have to be aware that the script is quite installation dependent +and that you may have to tweak it to your local configuration +to make it work. +To find @code{lilypond-book} the script will first try to locate +the version from a default installation using the shell's @code{which} +command, then a version from the build directory. If both are present +the custom-built one takes precedence. + This script will not work for building sections of the Contributors' guide. For building sections of the Contributors' Guide, use: diff --git a/scripts/auxiliar/doc-section.sh b/scripts/auxiliar/doc-section.sh index c616b9f..2df0cd9 100755 --- a/scripts/auxiliar/doc-section.sh +++ b/scripts/auxiliar/doc-section.sh @@ -74,7 +74,12 @@ fi : "${LILYPOND_BUILD_DIR:=$LILYPOND_GIT/build}" DOC_DIR="${LILYPOND_TEMPDOCS:-$LILYPOND_BUILD_DIR/tempdocs}" -LILYPOND_BOOK="$LILYPOND_BUILD_DIR/out/bin/lilypond-book" + +LILYPOND_BOOK=`which lilypond-book` +if test -e "$LILYPOND_BUILD_DIR/out/bin/lilypond-book"; then + LILYPOND_BOOK="$LILYPOND_BUILD_DIR/bin/lilypond-book" +fi + TEXI2HTML="texi2html" REFCHECK="$LILYPOND_GIT/scripts/auxiliar/ref_check.py" -- 1.7.9.5