How do I define an 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:13 UTC
Read the original article
Hit count: 1350
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. There is scant text on the web on nmake, unfortunately...
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
@echo $(MyVariable)
© Stack Overflow or respective owner