From 4b263b0775d7c7e126cd358b8ec16ef620ca2e52 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 16 Jun 2005 08:37:53 +0000 Subject: [PATCH] Use common.rm-command instead of hardcoded 'del' for removing response files. [SVN r29607] --- src/tools/borland.jam | 6 ++++-- src/tools/como-win.jam | 6 ++++-- src/tools/msvc.jam | 14 +++++++------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/tools/borland.jam b/src/tools/borland.jam index 610c5ef1f..77f7a1af6 100644 --- a/src/tools/borland.jam +++ b/src/tools/borland.jam @@ -186,6 +186,8 @@ else " ; } +RM = [ common.rm-command ] ; + rule link ( targets + : sources * : properties * ) { @@ -195,7 +197,7 @@ rule link ( targets + : sources * : properties * ) actions link bind LIBRARIES RSP { - $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"$(RSP:W)" && del "$(RSP)" + $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"$(RSP:W)" && $(RM) "$(RSP)" } rule link.dll ( targets + : sources * : properties * ) @@ -205,6 +207,6 @@ rule link.dll ( targets + : sources * : properties * ) actions link.dll bind LIBRARIES RSP { - $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"$(RSP:W)" && del "$(RSP)" + $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"$(RSP:W)" && $(RM) "$(RSP)" "$(.root)implib" "$(<[2]:W)" "$(<[1]:W)" } diff --git a/src/tools/como-win.jam b/src/tools/como-win.jam index 33ad6dfe6..73060dfd7 100644 --- a/src/tools/como-win.jam +++ b/src/tools/como-win.jam @@ -83,6 +83,8 @@ flags como-win LIBRARIES ; flags como-win FINDLIBS ; flags como-win FINDLIBS ; +RM = [ common.rm-command ] ; + #### Link #### rule link ( targets + : sources * : properties * ) @@ -94,7 +96,7 @@ rule link ( targets + : sources * : properties * ) # for como, we repeat all libraries so that dependencies are always resolved actions link bind LIBRARIES RSP { - $(CONFIG_COMMAND) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"$(RSP:W)" "$(LIBRARIES)" "$(FINDLIBS:S=.lib)" && del "$(RSP)" + $(CONFIG_COMMAND) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"$(RSP:W)" "$(LIBRARIES)" "$(FINDLIBS:S=.lib)" && $(RM) "$(RSP)" } actions compile.c @@ -117,6 +119,6 @@ rule archive ( targets + : sources * : properties * ) actions updated together piecemeal archive bind RSP { $(CONFIG_COMMAND) --no_version --no_prelink_verbose --prelink_object @"$(RSP:W)" - lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"$(RSP:W)" && del "$(RSP)" + lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"$(RSP:W)" && $(RM) "$(RSP)" } diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index c0787cb02..186b9e546 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -30,7 +30,7 @@ feature.subfeature toolset msvc : vendor # to be seen, though ;-) ; -RM = [ modules.peek common : RM ] ; +RM = [ common.rm-command ] ; # Initialize the toolset for a specific version. As the result, path to # compiler and, possible, program names are set up, and will be used when @@ -273,11 +273,11 @@ flags msvc.compile INCLUDES ; # The actions differ only by explicit selection of input language actions compile.c bind RSP { - $(.CC) /Zm800 -nologo -TC -U$(UNDEFS) $(CFLAGS) $(USER_CFLAGS) @"$(RSP:W)" -c -Fo"$(<[1]:W)" && del "$(RSP)" + $(.CC) /Zm800 -nologo -TC -U$(UNDEFS) $(CFLAGS) $(USER_CFLAGS) @"$(RSP:W)" -c -Fo"$(<[1]:W)" && $(RM) "$(RSP)" } actions compile.c++ bind RSP { - $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(USER_CFLAGS) @"$(RSP:W)" -c -Fo"$(<[1]:W)" && del "$(RSP)" + $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(USER_CFLAGS) @"$(RSP:W)" -c -Fo"$(<[1]:W)" && $(RM) "$(RSP)" } actions compile.rc @@ -338,7 +338,7 @@ if [ os.name ] in NT actions archive bind RSP { if exist "$(<[1])" DEL "$(<[1])" - $(.LD) /lib /NOLOGO /out:"$(<[1])" @"$(RSP)" && del "$(RSP)" + $(.LD) /lib /NOLOGO /out:"$(<[1])" @"$(RSP)" && $(RM) "$(RSP)" } } else @@ -346,7 +346,7 @@ else actions archive bind RSP { $(RM) "$(<[1])" - $(.LD) /lib /NOLOGO /out:"$(<[1])" @"$(RSP)" && del "$(RSP)" + $(.LD) /lib /NOLOGO /out:"$(<[1])" @"$(RSP)" && $(RM) "$(RSP)" } } @@ -358,12 +358,12 @@ else # don't want it. actions link bind DEF_FILE RSP { - $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"$(RSP:W)" && del "$(RSP)" + $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"$(RSP:W)" && $(RM) "$(RSP)" } actions link.dll bind DEF_FILE RSP { - $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"$(RSP:W)" && del "$(RSP)" + $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"$(RSP:W)" && $(RM) "$(RSP)" $(MANIFEST)$(<[1]).manifest $(OUTPUTRESOURCE)$(<[1]);#2 }