How to escape white space in nmake

拜拜、爱过 提交于 2019-12-24 01:49:20

问题


I´m trying to use nmake call MSTest

TEST="%VS90COMNTOOLS%..\IDE\MSTest.exe"
test:
  $(TEST) /testcontainer:Test.dll

When i run nmake i got:

$ nmake test
'C:\Program' is not recognized as an internal or external command,

Double quote doesn´t work right

EDIT:

Thanks "Eric Melski". I created something like:

TEST_="%VS90COMNTOOLS%..\IDE\MSTest.exe" 
TEST="$(TEST_)" /nologo /noresults

test: 
  $(TEST) /testcontainer:Test.dll

回答1:


Put double quotes around the usage of $(TEST) as well:

TEST="%VS90COMNTOOLS%..\IDE\MSTest.exe"
test:
  "$(TEST)" /testcontainer:Test.dll

Works with nmake 7 and 8.




回答2:


I faced the same problem before. Well, you can escape the white space in CMD with a '\' when you type manually, while the command is auto generated in this case. So my way is to use a another path without white space in it. Make sure you share your way if you find a better one.



来源:https://stackoverflow.com/questions/6551480/how-to-escape-white-space-in-nmake

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!