lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Makefile help!


From: foxfanfare
Subject: Re: Makefile help!
Date: Sun, 20 Oct 2019 05:47:32 -0700 (MST)

Karl Hammar wrote
> Where have you found that?

In the LilyPond documentation:
http://lilypond.org/doc/v2.19/Documentation/usage/make-and-makefiles

I think I found the problem and it is related to that part. I copied the
beginning of the example you can see in the documentation, for instance:

CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//`
LILY_CMD = lilypond -ddelete-intermediate-files \
                                         -dno-point-and-click 
-djob-count=$(CPU_CORES)
.SUFFIXES: .ly .ily .pdf .midi
%.pdf %.midi: %.ly
        $(LILY_CMD) $<; \
        if test -f "$*.pdf"; then \
                mv "$*.pdf" PDF/; \
        fi; \
        if test -f "$*.midi"; then \
                mv "$*.midi" MIDI/; \
        fi

score.%.pdf: score.%.ly notes.%.ily markup.%.ily

---

And in that case, make only update when score.%.ly is new, but not the other
files.
In the other hand, that Makefile works:

score.%.pdf: score.%.ly notes.%.ily markup.%.ily
        lilypond $<

---

So I guess the problem is because of the rule you pointed out. I'm really
unfamiliar with make and how this works, I just thought it was a good idea
to copy the one in the documentation. Apparently not!


Karl Hammar wrote
> mv *versionA* folder
> for i in A B C D; do mv *version$i*.pdf PDF/version$i; done 

Thanks for the idea. I will look into that, but if I understand correctly, I
have to launch the command separately from the Makefile? The idea was to
include everything in it... But since I obviously have to change the
beginning of my Makefile and get rid of the "%.pdf %.midi: %.ly", I will
maybe find a better solution to move the file to their according directories
with make.



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]