简体   繁体   English

在Watcom Makefile中扩展宏时**是什么意思?

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

I have a peculiar set of makefiles in a legacy project. 我在旧项目中有一组特殊的makefile。 They are processed by the Watcom make, but they seem to have the NMAKE file format. 它们是由Watcom品牌处理的,但是它们似乎具有NMAKE文件格式。 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. $(_cmd_run)只是一个宏扩展,但是在这种情况下,美元符号前还有一个星号。 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. NMAKE文档对此语法没有任何要求。 I've even tried to look up Open Watcom source files, but to no avail. 我什至尝试查找Open Watcom源文件,但无济于事。

What does this asterisk signify? 这个星号表示什么?

This is a workaround for handling "long" command lines under DOS, so it can be dropped off safely. 这是在DOS下处理“长”命令行的解决方法,因此可以安全地将其删除。 From WMAKE's help: 在WMAKE的帮助下:

Under DOS, an asterisk prefix (*) will cause Make to examine the length of the command argument. 在DOS下,星号前缀(*)将使Make检查命令参数的长度。 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. 如果太长(> 126个字符),它将使用命令参数并将其填充到临时环境变量中,然后以“ @env_var”作为参数执行命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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