tags:

views:

22

answers:

1

Let's say I have this:

FILES = c:/file.c c:/another_file.c

and I want to do something to each of the files. For example, I'd like to apply cygpath to each of the files. How can I do that? I would like a solution based on an external program, instead of a built-in make function please.

+3  A: 

Your question is unclear. If you mean you want to get at the cygpath'd path names, use something like:

CYG_FILES := $(shell cygpath $(FILES))
Jack Kelly
Remark: It's important to use `:=` over `=` here because otherwise it will execute the `$(shell)` command every time `$(CYG_FILES)` is expanded, which is great for killing performance.
Jack Kelly
Yes. This is exactly what I needed. Thanks!
Geo