nmake:如何为包含重新定义宏?
我有一个由 [Microsoft] nmake 构建的 makefile。它引用另一个文件作为包含。我无法修改包含的文件。问题是两者使用的用户定义宏之一不太适合包含使用。如何仅针对包含中使用的位置重新定义此宏?
我尝试过类似:
`B=$(A)
A=$(C)
!include myfile.make
A=$(B)`
nmake,但是不喜欢这样。还有其他方法可以做到这一点吗?
I have a makefile that is to be built by [Microsoft] nmake. It references another file as an include. I do not get to modify the included file. The problem is that one of the user-defined macros used by both isn't quite right for use by the include. How can I redefine this macro ONLY for where it's used in the include?
I tried something like:
`B=$(A)
A=$(C)
!include myfile.make
A=$(B)`
nmake, however did not like this. Is there another way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚运行了一个测试用例,我得到的行为与您的描述不符。
假设我有两个 makefile,...
nuit.mak:
和 nuit-a.mak:
这是我看到的结果:
I just ran a test case, and the behavior I got does not agree with your description.
Suppose I have two makefiles, ...
nuit.mak:
And nuit-a.mak:
Here are the results I see: