[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Identify included files
From: |
Fr. Samuel Springuel |
Subject: |
Re: Identify included files |
Date: |
Mon, 25 May 2020 17:08:34 -0400 |
> On 25 May, 2020, at 3:12 PM, Wols Lists <address@hidden> wrote:
>
> So. Am I correct in thinking that, if you change one .ily file, you need
> to rebuild the entire makefile? WHY?
<snip>
> And it means if put a new include into
> dynamics.ily, I just need to create/update the line for dynamics.ily,
> and everything that depends on it will rebuild if I run the "make" command.
Not the entire makefile, just the dly files (which are only partial makefiles)
which depend on that ily file. This is necessary to take care of your later
issue automatically. By making the dly files depend on the same files which
the associate pdf file depends on make will automatically check for changes to
the number of included files.
> partTrombone.ly voiceTrombone.ily
> :
This is not a valid statement for make (even if coerced into the correct
syntax). While partTrombone.ly may include voiceTrombone.ily, it does not
actually depend on it. Dependency in make implies one thing is required to
*create* the other, not that they cannot be used independently (which is what
you appear to mean by “virtual object”).
Each dly file looks like this:
target.dly target.pdf : target.ly include_1.ily include_2.ily
path/to/include_3.ily
The separator (:) splits the targets (the files which can be built) from their
prerequisites (the files needed to do the building). If make determines that
any target doesn’t exist or is out-of-date, then it will rebuild the target.
That’s all that’s in a single dly file, so it does not constitute a complete
makefile. Instead it is read into the master makefile, which also contains the
rules for building both dly files and pdf files.
The master makefile looks like the one I posted earlier in this thread. It co
ntains the rules for building dly files and pdf files. Both of these are
pattern rules. This means that one rule tells make how to build all dly files
from a ly (and parse-init.ly) file and another tells it how to build all pdf
files from a ly file.
Perhaps a working example will be more productive than a purely theoretical
discussion. Here’s a repository that I built using code from the documentation:
https://github.com/rpspringuel/lilypond_make
Right now it just tries to actualize the example from
http://lilypond.org/doc/v2.21/Documentation/usage/make-and-makefiles (using
content taken from
http://lilypond.org/doc/v2.21/Documentation/snippets/staff-notation#staff-notation-orchestra-choir-and-piano-template).
I had to make a few changes to make it work on my system, but I tried to make
those changes be as system-agnostic as possible. If you’ll accept that this is
a working representation of the makefile example from the documentation, then
I’ll go about showing how it gets modified to use the system that I’ve worked
out.
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036
PAX ☧ ΧΡΙΣΤΟΣ
- Re: Identify included files, (continued)
- Re: Identify included files, antlists, 2020/05/21
- Re: Identify included files, Fr. Samuel Springuel, 2020/05/21
- Re: Identify included files, David Wright, 2020/05/23
- Re: Identify included files, Fr. Samuel Springuel, 2020/05/24
- Re: Identify included files, Wols Lists, 2020/05/25
- Re: Identify included files, R. Padraic Springuel, 2020/05/25
- Re: Identify included files, Valentin Villenave, 2020/05/25
- Re: Identify included files, David Wright, 2020/05/25
- Re: Identify included files, Fr. Samuel Springuel, 2020/05/25
- Re: Identify included files, Wols Lists, 2020/05/25
- Re: Identify included files,
Fr. Samuel Springuel <=
- Re: Identify included files, Matt Wallis, 2020/05/26
- Re: Identify included files, Fr. Samuel Springuel, 2020/05/26
- Re: Identify included files, Timothy Lanfear, 2020/05/26
- Re: Identify included files, Fr. Samuel Springuel, 2020/05/26
- Re: Identify included files, David Wright, 2020/05/26
- Re: Identify included files, Fr. Samuel Springuel, 2020/05/27
- Re: Identify included files, David Wright, 2020/05/21
- Re: Identify included files, antlists, 2020/05/21
- Re: Identify included files, David Wright, 2020/05/21
- Re: Identify included files, Wols Lists, 2020/05/22