简体   繁体   中英

What does *$ mean when expanding macros in a Watcom makefile?

I have a peculiar set of makefiles in a legacy project. They are processed by the Watcom make, but they seem to have the NMAKE file format. I frequently encounter the following construct:

*$(_cmd_run)

$(_cmd_run) is simply a macro expansion, but in this case there is also an asterisk before the dollar sign. I can't seem to find any documentation as to what its purpose is. NMAKE documentation doesn't have anything with regard to this syntax. I've even tried to look up Open Watcom source files, but to no avail.

What does this asterisk signify?

This is a workaround for handling "long" command lines under DOS, so it can be dropped off safely. From WMAKE's help:

Under DOS, an asterisk prefix (*) will cause Make to examine the length of the command argument. If it is too long (> 126 characters), it will take the command argument and stuff it into a temporary environment variable and then execute the command with "@env_var" as its argument.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM