Name: Anonymous 2012-11-07 6:46
I want to take all .foo files in source/ and compile them to .bar files in target/
I can use the following to successfully compile .foo files to .bar files in the *same* source/ directory, but *not* to the target/ directory
The ``foobar'' is just an example and it's not a C compiler. I tried tweaking patsubst but to no avail. Ideas?
Any help is greatly appreciated. Thanks for the help :)
I can use the following to successfully compile .foo files to .bar files in the *same* source/ directory, but *not* to the target/ directory
SOURCES=$(wildcard source/*.foo)
TARGETS=$(patsubst %.foo,%.bar,$(SOURCES))
less: $(TARGETS)
%.foo: %.bar
foobar $< > $@The ``foobar'' is just an example and it's not a C compiler. I tried tweaking patsubst but to no avail. Ideas?
Any help is greatly appreciated. Thanks for the help :)