>>>>> "Dominic" == Dominic Neumann <[EMAIL PROTECTED]> writes:
Dominic> Hi Laura,
Dominic> 2008/3/2, Laura Conrad <[EMAIL PROTECTED]>:
>>
>> A hack to get the included files to cause recompilation
>>
Dominic> I´m interested in that hack because I´ve got always problems when I
Dominic> change my central include files. The only solution I use then is to
Dominic> remove the complete out-directory and recompile it all. But that
takes
Dominic> minutes ...
And if you were doing a large book with hundreds of files, and had
only changed one or two, it would take tens of minutes every time you
changed something.
Attached is the script I use. This is on 10.33. I don't think it's
particularly robust. I call it via my Makefile like this:
%.pdf: %.lytex *.ly
remove_obsolete.sh -d $* $?
lilypond-book --output=$* --psfonts $*.lytex
cd $*;latex $*.tex;dvips $(DVIPSOPTS) -h $*.psfonts -Ppdf -o ../$*.ps
$*.dvi
ps2pdf $*.ps $*.pdf
#!/bin/sh -x
# syntax: remove_obsolete.sh [-d <dirname> ]<filename> {...]
# dirname is the name of the output directory, defaults to out
# This script is invoked from a Makefile to remove the lilypond files
# that depend on files that have changed, but that lilypond-book
# doesn't know to rebuild. So the arguments are the list of filenames
# that make considers to have changed, and the effect of running the
# script is that any file in out/*.ly that refers to any of those
# filenames is removed. so if you're using the directory out to store
# anything valuable, this is a dangerous script, but if it's being
# used as intended to just be a working directory for lilypond-book,
# the worst that can happen is that lilypond-book might have to run
# lilypond on more stuff than it should have to.
FILES=$@
if [ "F$1" = "F-d" ]
then
DIR=$2
else
DIR="out"
fi
ls $DIR/*.ly >/dev/null
if [ "$?" != "0" ]
then
exit
fi
for FILE in $FILES
do
if [ "$FILE" = "allparts.lytex" ]
then
continue
fi
if [ "$FILE" = "-d" ]
then
continue
fi
grep -l "$FILE" $DIR/*.ly | xargs --verbose rm -f
done
--
Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ )
(617) 661-8097 fax: (501) 641-5011
233 Broadway, Cambridge, MA 02139
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user