[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Identify included files
From: |
Matt Wallis |
Subject: |
Re: Identify included files |
Date: |
Tue, 9 Jun 2020 21:37:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 09/06/2020 15:57, Fr. Samuel Springuel wrote:
On 9 Jun, 2020, at 5:54 AM, Matt Wallis <m7956@acumen-it.co.uk> wrote:
I found https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00148.html
very interesting.
It describes how to get lilypond to print out dependencies. Have you looked
into this?
That’s from the start of this thread and I’m making use of it in the
with-deps.ly file (and in parse-only.ly on the GNUmake_dependencies branch). I
don’t use it exactly as it was originally presented in that message because the
format wasn’t make-freindly, but ly:source-files is the starting point for
generating the list of prerequisites.
Sorry - I should have read more carefully!
Be clear about the difference between = and :=. You are using = when := would
work fine.
That’s a good point. I’m carrying over some bad practices from the original
Makefile example in the documentation and should clean that up as much as
possible.
Put everything that moves (!) into a variable. For example, I'd have
PDF_DIR := PDF/
Include the backslash when you define a directory (as above). This is a habit
I've got into and now rely on. It helps me.
Can you elaborate on this? Why would this be better than what I’ve got?
Good question. I've been doing this out of habit for so long, I had to
think hard to remember why! I've come up with two reasons:
1. The trailing slash in foo/ forces it to be a directory. For example,
even when foo does not exist you can't treat foo/ as a regular file:
$ cat > foo/
bash: foo/: Is a directory
2. An accidental extra slash causes no problems, but an accidental
missing slash changes the meaning:
foo//bar is the same as foo/bar, but
foobar is not the same as foo/bar
Matt