lilypond-user
[Top][All Lists]
Advanced

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

Makefile and shell loop


From: Federico Bruni
Subject: Makefile and shell loop
Date: Fri, 09 Dec 2016 10:30:32 +0100

Hi all

Once again I have a problem with a loop within a Makefile.
I followed the example in the Usage manual, so I have these variables defined:

CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//`

LILY_CMD = lilypond -ddelete-intermediate-files \
--include=/home/fede/Documenti/spartiti/ly \
-dno-point-and-click -djob-count=$(CPU_CORES)

Then I have a for loop:

.PHONY: libri
libri:
        for f in *.lybook; do $(LILY_CMD) $$f; done


where $(CPU_CORES) is treated as a string, instead of being executed in the shell:

$ make
for f in *.lybook; do lilypond -ddelete-intermediate-files --include=/home/fede/Documenti/spartiti/ly -dno-point-and-click -djob-count=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//` $f; done
GNU LilyPond 2.19.51

The files are created correctly, but I guess that it's not using the desired number of cores.

Thanks in advance
Federico






reply via email to

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