mirror of
https://github.com/boostorg/build.git
synced 2026-02-13 12:22:17 +00:00
Fixes for QT4, DEF files, etc. from Reece Dunn.
[SVN r31607]
This commit is contained in:
@@ -447,6 +447,34 @@ rule prepend-path-variable-command ( variable : paths * )
|
||||
}
|
||||
|
||||
|
||||
# Returns the list of libraries from the <library> property
|
||||
# in their actualized form.
|
||||
rule resolve-library-files ( properties * )
|
||||
{
|
||||
local libraries ;
|
||||
|
||||
for local p in $(properties)
|
||||
{
|
||||
if $(p:G) = <library-file> &&
|
||||
! [ type.is-derived [ $(p:G=).type ] SHARED_LIB ]
|
||||
{
|
||||
libraries += $(p:G=) ;
|
||||
}
|
||||
}
|
||||
|
||||
# Get real jam targets
|
||||
|
||||
local xlibraries ;
|
||||
|
||||
for local l in $(libraries)
|
||||
{
|
||||
xlibraries += [ $(l).actualize ] ;
|
||||
}
|
||||
|
||||
return $(xlibraries) ;
|
||||
}
|
||||
|
||||
|
||||
# Return a command which can create a file. If 'r' is result of invocation,
|
||||
# then
|
||||
# r foobar
|
||||
|
||||
@@ -171,15 +171,38 @@ flags cw LINKFLAGS <user-interface>auto : -subsystem auto ;
|
||||
flags cw LINKFLAGS <main-target-type>LIB/<link>static : -library ;
|
||||
flags cw LINKFLAGS <main-target-type>LIB/<link>shared : -shared ;
|
||||
|
||||
toolset.flags cw.link USER_LINKFLAGS <linkflags> ;
|
||||
toolset.flags cw.link LINKPATH <library-path> ;
|
||||
flags cw.link USER_LINKFLAGS <linkflags> ;
|
||||
flags cw.link LINKPATH <library-path> ;
|
||||
|
||||
flags cw.link FINDLIBS_ST <find-static-library> ;
|
||||
flags cw.link FINDLIBS_SA <find-shared-library> ;
|
||||
flags cw.link LIBRARY_OPTION <toolset>cw : "" : unchecked ;
|
||||
|
||||
rule archive ( targets + : sources * : properties * )
|
||||
{
|
||||
flags cw.link LIBRARIES
|
||||
[ common.resolve-library-files properties ] ;
|
||||
}
|
||||
|
||||
rule link ( targets + : sources * : properties * )
|
||||
{
|
||||
flags cw.link LIBRARIES
|
||||
[ common.resolve-library-files properties ] ;
|
||||
}
|
||||
|
||||
rule link.dll ( targets + : sources * : properties * )
|
||||
{
|
||||
flags cw.link LIBRARIES
|
||||
[ common.resolve-library-files properties ] ;
|
||||
DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ;
|
||||
}
|
||||
|
||||
if [ os.name ] in NT
|
||||
{
|
||||
actions archive bind
|
||||
{
|
||||
if exist "$(<[1])" DEL "$(<[1])"
|
||||
$(.LD) -library -o "$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) -library -o "$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
}
|
||||
}
|
||||
else # cygwin
|
||||
@@ -190,17 +213,17 @@ else # cygwin
|
||||
if test -f "$_bbv2_out_" ; then
|
||||
_bbv2_existing_="$(<:W)"
|
||||
fi
|
||||
$(.LD) -library -o "$(<:W)" $_bbv2_existing_ @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) -library -o "$(<:W)" $_bbv2_existing_ @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
}
|
||||
}
|
||||
|
||||
actions link bind DEF_FILE
|
||||
{
|
||||
$(.LD) -o "$(<[1]:W)" -L"$(LINKPATH)" $(LINKFLAGS) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) -o "$(<[1]:W)" -L"$(LINKPATH)" $(LINKFLAGS) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
}
|
||||
|
||||
actions link.dll bind DEF_FILE
|
||||
{
|
||||
$(.LD) -o "$(<[1]:W)" -implib "$(<[2]:W)" -L"$(LINKPATH)" $(LINKFLAGS) -f "$(DEF_FILE)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) -o "$(<[1]:W)" -implib "$(<[2]:W)" -L"$(LINKPATH)" $(LINKFLAGS) -f "$(DEF_FILE)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
}
|
||||
|
||||
|
||||
@@ -538,11 +538,12 @@ flags msvc.compile UNDEFS <undef> ;
|
||||
flags msvc.compile INCLUDES <include> ;
|
||||
|
||||
# The actions differ only by explicit selection of input language
|
||||
actions compile.c bind RSP
|
||||
actions compile.c bind
|
||||
{
|
||||
$(.CC) /Zm800 -nologo -TC -U$(UNDEFS) $(CFLAGS) $(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)"
|
||||
}
|
||||
actions compile.c++ bind RSP
|
||||
|
||||
actions compile.c++ bind
|
||||
{
|
||||
$(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)"
|
||||
}
|
||||
@@ -594,6 +595,25 @@ flags msvc.link FINDLIBS_SA <find-shared-library> ;
|
||||
flags msvc.link LIBRARY_OPTION <toolset>msvc : "" : unchecked ;
|
||||
|
||||
|
||||
rule archive ( targets + : sources * : properties * )
|
||||
{
|
||||
flags msvc.link LIBRARIES
|
||||
[ common.resolve-library-files properties ] ;
|
||||
}
|
||||
|
||||
rule link ( targets + : sources * : properties * )
|
||||
{
|
||||
flags msvc.link LIBRARIES
|
||||
[ common.resolve-library-files properties ] ;
|
||||
}
|
||||
|
||||
rule link.dll ( targets + : sources * : properties * )
|
||||
{
|
||||
flags msvc.link LIBRARIES
|
||||
[ common.resolve-library-files properties ] ;
|
||||
DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ;
|
||||
}
|
||||
|
||||
# Declare action for creating static libraries
|
||||
# If library exists, remove it before adding files. See
|
||||
# http://article.gmane.org/gmane.comp.lib.boost.build/4241
|
||||
@@ -605,7 +625,7 @@ if [ os.name ] in NT
|
||||
actions archive bind
|
||||
{
|
||||
if exist "$(<[1])" DEL "$(<[1])"
|
||||
$(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -613,7 +633,7 @@ else
|
||||
actions archive bind
|
||||
{
|
||||
$(RM) "$(<[1])"
|
||||
$(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -631,13 +651,13 @@ else
|
||||
|
||||
actions link bind DEF_FILE
|
||||
{
|
||||
$(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
$(MANIFEST)$(<[1]).manifest $(OUTPUTRESOURCE)$(<[1]);#2
|
||||
}
|
||||
|
||||
actions link.dll bind DEF_FILE
|
||||
{
|
||||
$(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
|
||||
$(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
|
||||
$(MANIFEST)$(<[1]).manifest $(OUTPUTRESOURCE)$(<[1]);#2
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user