Index: /trunk/kBuild/tools/OPENWATCOM-16.kmk
===================================================================
--- /trunk/kBuild/tools/OPENWATCOM-16.kmk	(revision 2571)
+++ /trunk/kBuild/tools/OPENWATCOM-16.kmk	(revision 2572)
@@ -46,11 +46,11 @@
 TOOL_OPENWATCOM-16_COMPILE_AS_OUTPUT = $(obj).err
 define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
-	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CC16) \
+	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AS) \
 		$(flags) \
-		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
+		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
 		$(addprefix -d, $(defs)) \
-		-fo=$(subst /,\\,$(obj)) \
-		-fr=$(subst /,\\,$(obj)).err \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		-fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 	$(QUIET)$(APPEND) -n $(obj).err
 ## @todo dependencies
@@ -63,9 +63,9 @@
 	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CC16) \
 		$(flags) \
-		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
+		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
 		$(addprefix -d, $(defs)) \
-		-fo=$(subst /,\\,$(obj)) \
-		-fr=$(subst /,\\,$(obj)).err \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		-fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 	$(QUIET)$(APPEND) -n $(obj).err
 ## @todo dependencies
@@ -78,9 +78,9 @@
 	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CXX16) \
 		$(flags) \
-		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
+		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
 		$(addprefix -d, $(defs)) \
-		-fo=$(subst /,\\,$(obj)) \
-		-fr=$(subst /,\\,$(obj)).err \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		-fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 	$(QUIET)$(APPEND) -n $(obj).err
 ## @todo dependencies
@@ -94,8 +94,8 @@
 		$(TOOL_OPENWATCOM_RC) -r\
 		$(flags) \
-		$(addprefix -i=, $(subst /,\\,$(incs))) \
+		$(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
 		$(addprefix -d, $(defs))\
-		-fo=$(subst /,\\,$(obj)) \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 endef
 
@@ -104,9 +104,10 @@
 TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPORD =
 define TOOL_OPENWATCOM-16_LINK_LIBRARY_CMDS
-	$(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(subst /,\,$(objs) $(othersrc)),'+"$(obj)"')
-	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(subst /,\\,$(out)) @$(outbase).rsp
+	$(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
+	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
 endef
 
 TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT = $(outbase).map
+TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).sym
 TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
 TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD =
@@ -115,17 +116,18 @@
 		$(TOOL_OPENWATCOM_LD16) \
 		$(flags) \
-		-fe=$(subst /,\\,$(out)) \
-		-fm=$(subst /,\\,$(outbase).map) \
-		$(subst /,\\,$(filter-out %.res,$(objs))) \
-		$(subst /,\\,$(libs)) \
-		$(subst /,\\,$(othersrc))
+		-fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+		-fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
 		$(TOOL_OPENWATCOM_RC) \
 			$(filter -bt=%,$(flags)) \
-			/fe=$(subst /,\\,$(out)) \
-			$(subst /,\\,$(filter %.res,$(objs))))
+			/fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+			$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
 endef
 
 TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT = $(outbase).map
+TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT_MAYBE = $(outbase).sym
 TOOL_OPENWATCOM-16_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
 TOOL_OPENWATCOM-16_LINK_DLL_DEPORD =
@@ -134,17 +136,18 @@
 		$(TOOL_OPENWATCOM_LD16) \
 		$(flags) \
-		-fe=$(subst /,\\,$(out)) \
-		-fm=$(subst /,\\,$(outbase).map) \
-		$(subst /,\\,$(filter-out %.res,$(objs))) \
-		$(subst /,\\,$(libs)) \
-		$(subst /,\\,$(othersrc))
+		-fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+		-fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
 		$(TOOL_OPENWATCOM_RC) \
 			$(filter -bt=%,$(flags)) \
-			/fe=$(subst /,\\,$(out)) \
-			$(subst /,\\,$(filter %.res,$(objs))))
+			/fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+			$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
 endef
 
 TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT = $(outbase).map
+TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).sym
 TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
 TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD =
@@ -153,14 +156,14 @@
 		$(TOOL_OPENWATCOM_LD16) \
 		$(flags) \
-		-fe=$(subst /,\\,$(out)) \
-		-fm=$(subst /,\\,$(outbase).map) \
-		$(subst /,\\,$(filter-out %.res,$(objs))) \
-		$(subst /,\\,$(libs)) \
-		$(subst /,\\,$(othersrc))
+		-fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+		-fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
 		$(TOOL_OPENWATCOM_RC) \
 			$(filter -bt=%,$(flags)) \
-			/fe=$(subst /,\\,$(out)) \
-			$(subst /,\\,$(filter %.res,$(objs))))
+			/fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+			$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
 endef
 
Index: /trunk/kBuild/tools/OPENWATCOM-WL.kmk
===================================================================
--- /trunk/kBuild/tools/OPENWATCOM-WL.kmk	(revision 2571)
+++ /trunk/kBuild/tools/OPENWATCOM-WL.kmk	(revision 2572)
@@ -44,4 +44,5 @@
 
 TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).rsp
+TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).sym
 TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
 TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPORD =
@@ -49,9 +50,9 @@
 	$(QUIET)$(APPEND) -tn $(outbase).rsp \
 		$(if $(flags),'$(flags)',) \
-		'Name $(subst /,\,$(out)$(if $(suffix $(out)),,.))' \
-		'Option Map=$(subst /,\,$(outbase)).map' \
-		$(foreach p,$(subst /,\,$(libpath)),'LIBPath $p') \
-        $(foreach o,$(subst /,\,$(filter-out %.res,$(objs)) $(othersrc)),'$(if $(filter %.lib %.a,$l),LIB,)File $o') \
-		$(foreach l,$(subst /,\,$(libs)),'Library $l')
+		'Name $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)$(if $(suffix $(out)),,.))' \
+		'Option Map=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase)).map' \
+		$(foreach p,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libpath)),'LIBPath $p') \
+        $(foreach o,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs)) $(othersrc)),'$(if $(filter %.lib %.a,$l),LIB,)File $o') \
+		$(foreach l,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)),'Library $l')
 	$(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
 		$(TOOL_OPENWATCOM_WLINK) @$(outbase).rsp
@@ -59,9 +60,10 @@
 		$(TOOL_OPENWATCOM_RC) \
 			$(filter -bt=%,$(flags)) \
-			/fe=$(subst /,\\,$(out)) \
-			$(subst /,\\,$(filter %.res,$(objs))))
+			/fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+			$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
 endef
 
 TOOL_OPENWATCOM-WL_LINK_DLL_OUTPUT     = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT)
+TOOL_OPENWATCOM-WL_LINK_DLL_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT_MAYBE)
 TOOL_OPENWATCOM-WL_LINK_DLL_DEPEND     = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPEND)
 TOOL_OPENWATCOM-WL_LINK_DLL_DEPORD     = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPORD)
@@ -69,4 +71,5 @@
 
 TOOL_OPENWATCOM-WL_LINK_SYSMOD_OUTPUT  = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT)
+TOOL_OPENWATCOM-WL_LINK_SYSMOD_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT_MAYBE)
 TOOL_OPENWATCOM-WL_LINK_SYSMOD_DEPEND  = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPEND)
 TOOL_OPENWATCOM-WL_LINK_SYSMOD_DEPORD  = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPORD)
@@ -74,4 +77,5 @@
 
 TOOL_OPENWATCOM-WL_LINK_MISCBIN_OUTPUT = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT)
+TOOL_OPENWATCOM-WL_LINK_MISCBIN_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_OUTPUT_MAYBE)
 TOOL_OPENWATCOM-WL_LINK_MISCBIN_DEPEND = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPEND)
 TOOL_OPENWATCOM-WL_LINK_MISCBIN_DEPORD = $(TOOL_OPENWATCOM-WL_LINK_PROGRAM_DEPORD)
Index: /trunk/kBuild/tools/OPENWATCOM.kmk
===================================================================
--- /trunk/kBuild/tools/OPENWATCOM.kmk	(revision 2571)
+++ /trunk/kBuild/tools/OPENWATCOM.kmk	(revision 2572)
@@ -121,4 +121,10 @@
 endif
 
+if1of ($(KBUILD_HOST), os2 win)
+ TOOL_OPENWATCOM_FIX_SLASHES = $(subst /,\\,$1)
+else
+ TOOL_OPENWATCOM_FIX_SLASHES = $1
+endif
+
 # General Properties used by kBuild
 TOOL_OPENWATCOM_ASOBJSUFF        ?= .obj
@@ -169,9 +175,9 @@
 	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AS) \
 		$(flags) \
-		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
+		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
 		$(addprefix -d, $(defs)) \
-		-fo=$(subst /,\\,$(obj)) \
-		-fr=$(subst /,\\,$(obj)).err \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		-fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 	$(QUIET)$(APPEND) -n $(obj).err
 ## @todo dependencies
@@ -185,9 +191,9 @@
 	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CC) \
 		$(flags) \
-		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
+		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
 		$(addprefix -d, $(defs)) \
-		-fo=$(subst /,\\,$(obj)) \
-		-fr=$(subst /,\\,$(obj)).err \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		-fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 	$(QUIET)$(APPEND) -n $(obj).err
 ## @todo dependencies
@@ -200,9 +206,9 @@
 	$(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CXX) \
 		$(flags) \
-		$(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
+		$(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
 		$(addprefix -d, $(defs)) \
-		-fo=$(subst /,\\,$(obj)) \
-		-fr=$(subst /,\\,$(obj)).err \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		-fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 	$(QUIET)$(APPEND) -n $(obj).err
 ## @todo dependencies
@@ -216,8 +222,8 @@
 		$(TOOL_OPENWATCOM_RC) -r\
 		$(flags) \
-		$(addprefix -i=, $(subst /,\\,$(incs))) \
+		$(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
 		$(addprefix -d, $(defs))\
-		-fo=$(subst /,\\,$(obj)) \
-		$(subst /,\\,$(abspath $(source)))
+		-fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
 endef
 
@@ -226,6 +232,6 @@
 TOOL_OPENWATCOM_LINK_LIBRARY_DEPORD =
 define TOOL_OPENWATCOM_LINK_LIBRARY_CMDS
-	$(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(subst /,\,$(objs) $(othersrc)),'+"$(obj)"')
-	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(subst /,\\,$(out)) @$(outbase).rsp
+	$(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
+	$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
 endef
 
@@ -237,14 +243,14 @@
 		$(TOOL_OPENWATCOM_LD) \
 		$(flags) \
-		-fe=$(subst /,\\,$(out)) \
-		-fm=$(subst /,\\,$(outbase).map) \
-		$(subst /,\\,$(filter-out %.res,$(objs))) \
-		$(subst /,\\,$(libs)) \
-		$(subst /,\\,$(othersrc))
+		-fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+		-fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
 		$(TOOL_OPENWATCOM_RC) \
 			$(filter -bt=%,$(flags)) \
-			/fe=$(subst /,\\,$(out)) \
-			$(subst /,\\,$(filter %.res,$(objs))))
+			/fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+			$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
 endef
 
@@ -256,14 +262,14 @@
 		$(TOOL_OPENWATCOM_LD) \
 		$(flags) \
-		-fe=$(subst /,\\,$(out)) \
-		-fm=$(subst /,\\,$(outbase).map) \
-		$(subst /,\\,$(filter-out %.res,$(objs))) \
-		$(subst /,\\,$(libs)) \
-		$(subst /,\\,$(othersrc))
+		-fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+		-fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
 		$(TOOL_OPENWATCOM_RC) \
 			$(filter -bt=%,$(flags)) \
-			/fe=$(subst /,\\,$(out)) \
-			$(subst /,\\,$(filter %.res,$(objs))))
+			/fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+			$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
 endef
 
@@ -275,14 +281,14 @@
 		$(TOOL_OPENWATCOM_LD) \
 		$(flags) \
-		-fe=$(subst /,\\,$(out)) \
-		-fm=$(subst /,\\,$(outbase).map) \
-		$(subst /,\\,$(filter-out %.res,$(objs))) \
-		$(subst /,\\,$(libs)) \
-		$(subst /,\\,$(othersrc))
+		-fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+		-fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
+		$(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
 	$(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
 		$(TOOL_OPENWATCOM_RC) \
 			$(filter -bt=%,$(flags)) \
-			/fe=$(subst /,\\,$(out)) \
-			$(subst /,\\,$(filter %.res,$(objs))))
-endef
-
+			/fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
+			$(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
+endef
+
