-
Bug
-
Resolution: Fixed
-
P4
-
10, 11
-
None
-
b09
-
windows
When running tests using Make on a (Windows) machine where VS120COMNTOOLS is set an error message is generated.
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
The message is generated by this logic in test/TestCommon.gmk:
ifneq ($(VS120COMNTOOLS), )
JTREG_BASIC_OPTIONS += -e:VS120COMNTOOLS=$(shell $(GETMIXEDPATH) "$(VS120COMNTOOLS)")
endif
The problem is that the VS120COMNTOOLS variable typically looks something like:
$ echo $VS120COMNTOOLS
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
Of particular interest is the fact that it has a trailing backslash. When used in the make file that means it will all be expanded to something like:
JTREG_BASIC_OPTIONS += ... $(shell cygwin -m "c:\<path>\Common7\Tools\")
When that in turn gets executed the backslash will escape the last double quote which means that the quotes are no longer paired.
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
The message is generated by this logic in test/TestCommon.gmk:
ifneq ($(VS120COMNTOOLS), )
JTREG_BASIC_OPTIONS += -e:VS120COMNTOOLS=$(shell $(GETMIXEDPATH) "$(VS120COMNTOOLS)")
endif
The problem is that the VS120COMNTOOLS variable typically looks something like:
$ echo $VS120COMNTOOLS
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
Of particular interest is the fact that it has a trailing backslash. When used in the make file that means it will all be expanded to something like:
JTREG_BASIC_OPTIONS += ... $(shell cygwin -m "c:\<path>\Common7\Tools\")
When that in turn gets executed the backslash will escape the last double quote which means that the quotes are no longer paired.