Search code examples
nmake

How to escape white space in nmake


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

Solution

  • 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.