I'm trying to dump the value of make variables to a file for further processing.

So far, I've been able to print the values to the command line using the following rule:

```
print-%:
    @echo '$*=$($*)'

```

Which you call with the command line

```
make print-VAR

```

I really don't want it on stdout, but printed to a file. The GNU Make "file" function seems like the thing I should be using:
<http://www.gnu.org/software/make/manual/html_node/File-Function.html#File-Function>

The page jumps into a complex example right away though, so I've implemented the following but can't seem to get it to work: it prints the @echo to stdout, but when I look in my directory there is no output.txt file.

```
printf-%:
    @echo '$*=$($*)'
    $(file > output.txt,$($*))

```

What am I missing?

EDIT: Well, looks like I can just use

```
@echo '$($*)' > output.txt

```

to do what I want, but that still doesn't explain why my file call wasn't working.