[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU make - word position in list
From: |
Mathieu Zhang |
Subject: |
GNU make - word position in list |
Date: |
Tue, 20 Apr 2010 19:59:27 -0700 (PDT) |
User-agent: |
G2/1.0 |
Hi all,
I have one source pdf file source.pdf, that I want to use pdftk to
split into multiple files such that the n-th file on the target list
is the n-th page from source.pdf
TARGETS = "foo.pdf bar.pdf more_foo.pdf ... "
What I want, is to have a rule like this:
${TARGETS} : source.pdf
pdftk A=$? cat A# output $@
where # is the position of $@ inside the list ${TARGETS}. I see a lot
of buildin pattern matching and substitution functions, but I don't
see anything that help find the matching position.
Any idea?
--MZ
- GNU make - word position in list,
Mathieu Zhang <=