[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 06:35:58 -0700 (MST) |
foxfanfare wrote
> 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.
Okay, here is the solution I found and seems to work by now:
CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//`
LILY_CMD = lilypond \
-ddelete-intermediate-files \
-djob-count=$(CPU_CORES)
general = \
instrumentation.ily \
liens.ily \
presentation.ily \
titres.ily
# Piano (Solo)
piano-solo.%.pdf: \
piano-solo.%.ly \
notes.piano-solo.%.ily \
dialogues.%.ily \
global.%.ily \
pedales.%.ily \
$(general)
$(LILY_CMD) $<; \
mv "piano-solo.$*.pdf" PDF/piano-solo/; \
mv "piano-solo.$*.midi" MIDI/piano-solo/
# Piano (Primo)
piano-primo.%.pdf: \
piano-primo.%.ly \
notes.piano-primo.%.ily \
dialogues.%.ily \
global.%.ily \
pedales.%.ily \
$(general)
$(LILY_CMD) $<; \
mv "piano-primo.$*.pdf" PDF/piano-primo/
# Piano (Secondo)
piano-secondo.%.pdf: \
piano-secondo.%.ly \
notes.piano-secondo.%.ily \
dialogues.%.ily \
global.%.ily \
pedales.%.ily \
$(general)
$(LILY_CMD) $<; \
mv "piano-secondo.$*.pdf" PDF/piano-secondo/
# Piano (Duo)
piano-duo.%.pdf: \
piano-primo.%.ly \
piano-secondo.%.ly \
piano-primo.%.pdf \
piano-secondo.%.pdf \
notes.piano-primo.%.ily \
notes.piano-secondo.%.ily \
dialogues.%.ily \
global.%.ily \
pedales.%.ily \
$(general)
$(LILY_CMD) $<; \
pdftk PDF/piano-secondo/piano-secondo.$*.pdf \
PDF/piano-primo/piano-primo.$*.pdf \
shuffle output PDF/piano-duo/piano-duo.$*.pdf
I can now make all the different parts, create automatically the layout of a
piano 4-hands score, and move all the generate files in the appropriate
directories. I don't know if this solution is a "good way" of using make,
what do you think? At least, it seems to work... :)
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
- Makefile help!, foxfanfare, 2019/10/16
- Re: Makefile help!, karl, 2019/10/16
- Re: Makefile help!, foxfanfare, 2019/10/17
- Re: Makefile help!, foxfanfare, 2019/10/17
- Re: Makefile help!, foxfanfare, 2019/10/19
- Re: Makefile help!, karl, 2019/10/20
- Re: Makefile help!, foxfanfare, 2019/10/20
- Re: Makefile help!,
foxfanfare <=
- Re: Makefile help!, karl, 2019/10/20
- Re: Makefile help!, karl, 2019/10/20
Re: Makefile help!, foxfanfare, 2019/10/20