You can compute the list of source files with a shell
function:
SRCFILES := $(shell find . -iname '*.x' -size +0)
OUTFILES := $(SRCFILES:%=%.y)
all: $(OUTFILES)
%.x.y : %.x
$(CONVERT) -to $@ $<
Question
I have a set of files of type *.x, processing which yields a corresponding set of files *.x.y (where each *.x file produces a corresponding *.x.y file). Simple enough so far.
The two issues I have are:
Currently I use:
for a in $(find . -iname '*.x' -size +0); do make $a.y; done
and it works, but I'd prefer a cleaner, more make
-y solution.
Using GNU make 3.81 on OS X 10.7.5.
Solution
You can compute the list of source files with a shell
function:
SRCFILES := $(shell find . -iname '*.x' -size +0)
OUTFILES := $(SRCFILES:%=%.y)
all: $(OUTFILES)
%.x.y : %.x
$(CONVERT) -to $@ $<