How do I define nmake macro from command line output?

Posted by Mike Atlas on Stack Overflow See other posts from Stack Overflow or by Mike Atlas
Published on 2010-04-26T19:01:25Z Indexed on 2010/04/26 19:03 UTC
Read the original article Hit count: 206

Filed under:
|
|

I'd like to capture the output from a tool from the command line into an nmake macro.

If this were a normal command line script, it would look like this:

> MyTool.exe > output.txt
> set /P MyVariable=<output.txt
> echo %MyVariable%

However, I can't seem to find anything relevant in the nmake doc on macros that is relevant.

This is basically what I'd like to do, though:

target:
    @call MyTool.exe > output.txt
    # This doesn't work in .mak, unfortunately. Help!
    @MyVariable=<output.txt

© Stack Overflow or respective owner

Related posts about nmake

Related posts about stdout