Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-08 16:25:57


The supplied patch should fix the issues with qt4.jam, named libraries
and def files. This was due to the changes w.r.t. the new response file
logic.

Hopefully, this patch should fix the problems. If not, shout!

- Reece

Index: common.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/common.jam,v
retrieving revision 1.42
diff -u -r1.42 common.jam
--- common.jam 5 Nov 2005 07:46:38 -0000 1.42
+++ common.jam 8 Nov 2005 21:16:38 -0000
@@ -447,6 +447,34 @@
 }
 
 
+# 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
Index: cw.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/cw.jam,v
retrieving revision 1.7
diff -u -r1.7 cw.jam
--- cw.jam 5 Nov 2005 07:46:38 -0000 1.7
+++ cw.jam 8 Nov 2005 21:17:19 -0000
@@ -171,15 +171,38 @@
 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 @@
       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)")"
 }
 
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.62
diff -u -r1.62 msvc.jam
--- msvc.jam 5 Nov 2005 07:46:38 -0000 1.62
+++ msvc.jam 8 Nov 2005 21:19:54 -0000
@@ -538,11 +538,12 @@
 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 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 @@
     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 @@
     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 @@
 
 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
 }
 

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk