Fix Cygwin PATH composition
Adding Windows-style paths (C:\foo\bar) happened to appear to work, as Cygwin translated that into two paths C;\foo\bar (where the former typically just does not exist and the latter is relative to the current drive, which is typically C). In theory, wrapping in $(shell cygpath -u ...) should not be necessary, but in practice S is set to a Windows-syte path (which is probably a bug?) after the paths of PATH would be shortened to use $I/$S/$W, which is prevented with the wrapper. In theory, the shell variable assignment PATH="$$PATH:... would more idiomatically read PATH=$$PATH:"... but e.g. unoidl/CustomTarget_unoidl-write_test.mk passes this variable assignment as a command line argument to exectest.pl in which case it would potentially be split into multiple arguments. Change-Id: If870e9eba8b650fe75b324ac54c49891d19fcc55
This commit is contained in:
@@ -382,7 +382,7 @@ endef
|
||||
# CppunitTest class
|
||||
|
||||
gb_CppunitTest_DEFS := -D_DLL
|
||||
gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath -w $(gb_Library_DLLDIR)):$(shell cygpath -w $(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
|
||||
gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath -u $(gb_Library_DLLDIR)):$(shell cygpath -u $(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
|
||||
|
||||
gb_CppunitTest_get_filename = test_$(1).dll
|
||||
gb_CppunitTest_get_ilibfilename = itest_$(1).lib
|
||||
|
@@ -293,7 +293,6 @@ gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
|
||||
|
||||
# Helper class
|
||||
|
||||
# need windows path with backslashes here
|
||||
gb_Helper_set_ld_path := PATH="$(PATH);$(shell cygpath -w $(INSTDIR)/$(LIBO_URE_LIB_FOLDER));$(shell cygpath -w $(INSTDIR)/$(LIBO_BIN_FOLDER))"
|
||||
gb_Helper_set_ld_path := PATH="$$PATH:$(shell cygpath -u $(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u $(INSTDIR)/$(LIBO_BIN_FOLDER))"
|
||||
|
||||
# vim: set noet sw=4:
|
||||
|
Reference in New Issue
Block a user