lilypond-user
[Top][All Lists]
Advanced

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

Re: help with loop in a Make file


From: David Kastrup
Subject: Re: help with loop in a Make file
Date: Wed, 31 Aug 2016 08:57:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Federico Bruni <address@hidden> writes:

> I have a slightly OT question about Make.
> I'm using Make to generate several EPS file to be included in a
> LilyPond file.
> The three commands below work fine on the terminal but do not work
> when I launch make:
>
> ### Make snippet ###
>
> SHELL=/usr/bin/bash
>
> %.pdf %.ps %.eps: %.tex
> latexmk -xelatex intervista.tex && \
> pdf-stapler split intervista.pdf && \
> for f in intervista_*.pdf; do pdf2ps $f; done

Action lines _must_ start with a TAB character.  Also $f would be
interpreted by Make (which has no clue about for loops), so you need to
escape the $ and write $$f instead.

> Output written on intervista.pdf (7 pages).
> Transcript written on intervista.log.
> Latexmk: Log file says output to 'intervista.pdf'
> Latexmk: All targets (intervista.pdf) are up-to-date
> Usage: pdf2ps [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3]
> input.pdf [output.ps]
> Usage: pdf2ps [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3]
> input.pdf [output.ps]
> Usage: pdf2ps [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3]
> input.pdf [output.ps]
> Usage: pdf2ps [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3]
> input.pdf [output.ps]
> Usage: pdf2ps [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3]
> input.pdf [output.ps]
> Usage: pdf2ps [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3]
> input.pdf [output.ps]
> Usage: pdf2ps [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3]
> input.pdf [output.ps]
> Makefile:32: recipe for target 'intervista.pdf' failed
> make: *** [intervista.pdf] Error 1

Well, there you are. $f is empty according to Make.

-- 
David Kastrup



reply via email to

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