2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-12 12:02:24 +00:00

Use common.rm-command instead of hardcoded 'del' for removing response files.

[SVN r29607]
This commit is contained in:
Vladimir Prus
2005-06-16 08:37:53 +00:00
parent 6e5772545e
commit 4b263b0775
3 changed files with 15 additions and 11 deletions

View File

@@ -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)"
}

View File

@@ -83,6 +83,8 @@ flags como-win LIBRARIES <library-file> ;
flags como-win FINDLIBS <find-shared-library> ;
flags como-win FINDLIBS <find-static-library> ;
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)"
}

View File

@@ -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 <include> ;
# 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
}