Am 15.04.2013 17:45, schrieb Urs Liska:
Am 15.04.2013 17:04, schrieb Trevor Daniels:
Urs Liska wrote Monday, April 15, 2013 2:38 PM
When trying to build a documentation section with
scripts/auxiliar/doc-section.sh I encounter a problem for which I can't
provide a patch myself:
This script is rather installation-dependent. I've been using it for
some
time (indeed I wrote the original a long time ago) and find it's usually
easiest to copy it out and modify it to suit your personal requirements
locally. But by all means try to patch it up to be more useful - for
doc
changes it's by far the quickest method of checking the changes are
good. And it will, or can be made to, work under Windows within
the bash shell from MinGW. Useful if MS provides your every-day
environment.
Trevor
On my (linux) machine I could use the output of `which
lilypond-book`to write a generic version that sets LILYPOND_BOOK to
either the one from the default installation or the one built from
source (the latter taking precedence).
I now (after your comment) see that there are more references to the
build directory, and maybe I'll look into that.
But this leads be to another question:
To complement my patch I wanted to update the documentation in CG.
There I realized that I had missed the fact that doc-section.sh
shouldn't work for sections of the CG.
But a) I _did_ make it work for me
and b) I don't really see the difference between cg-section.sh and
doc-section.sh (except for the routine constructing the file name.
I have the impression that (with my previous patch about .itely and
.itexi files) doc-section.sh should work with both, and it should be
possible to completely remove cg-section.sh (and of course update the
doc).
If you think that's true I could do that, make a patch and suggest it
for inclusion.
Otherwise I'd just add the necessary comments to complement my current
(not-yet-sent) patch.
Best
Urs
OK, what the heck:
Here is a patch trying to fix the lilypond-book issue in doc-section.sh,
along with a comment in the CG.
If I have time I'll look into the other BUILD_DIRECTORY dependencies.
And if you can confirm my impression I would also make a patch removing
cg-section.sh and the reference in the CG.
Urs
>From eb79de728c95a46d523356c023a48df8fbd5042a Mon Sep 17 00:00:00 2001
From: Urs Liska <[email protected]>
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
_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond