|
Boost-Build : |
From: Ilya Sokolov (fal_delivery_at_[hidden])
Date: 2006-06-08 09:35:00
hi,
a little patch includes:
- rsp-file support for link and link.dll actions
- fixed place and content of autogen .def-file in link.dll actions
- always remove archive and start again
- different options for creating and adding to the static lib in
piecemeal archive actions
cvs -q diff -u -d -- dmc.jam (in directory J:\w\boost\boost\tools\build\v2\tools\)
Index: dmc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/dmc.jam,v
retrieving revision 1.6
diff -u -d -r1.6 dmc.jam
--- dmc.jam 24 Apr 2006 14:09:51 -0000 1.6
+++ dmc.jam 8 Jun 2006 13:14:16 -0000
@@ -97,38 +171,84 @@
flags dmc.link <linkflags> ;
flags dmc.archive OPTIONS <arflags> ;
-flags dmc LIBPATH <library-path> ;
-flags dmc LIBRARIES <library-file> ;
-flags dmc FINDLIBS <find-library-sa> ;
-flags dmc FINDLIBS <find-library-st> ;
+flags dmc.link LIBPATH <library-path> ;
+flags dmc.link LIBRARIES <library-file> ;
+flags dmc.link FINDLIBS <find-shared-library> ;
+flags dmc.link FINDLIBS <find-static-library> ;
+
+nl = "
+" ;
+
+plus-nl = "+
+" ;
actions together link bind LIBRARIES
{
- "$(.root)link" $(OPTIONS) /NOI /DE /XN "$(>)" , "$(<[1])" ,, $(LIBRARIES) user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
+ "$(.root)link" $(OPTIONS) /NOI /DE /XN @"@($(<[1]:W).rsp:E=$(plus-nl)"$(>)" $(nl)"$(<[1])" $(nl) $(plus-nl)$(LIBRARIES) $(plus-nl)"$(LIBPATH:S=.lib)" $(plus-nl)"$(FINDLIBS:S=.lib)" $(nl)"$(<[2]:B).def")"
}
actions together link.dll bind LIBRARIES
{
- echo LIBRARY "$(<[1])" > $(<[2]:B).def
- echo DESCRIPTION 'A Library' >> $(<[2]:B).def
- echo EXETYPE NT >> $(<[2]:B).def
- echo SUBSYSTEM WINDOWS >> $(<[2]:B).def
- echo CODE EXECUTE READ >> $(<[2]:B).def
- echo DATA READ WRITE >> $(<[2]:B).def
- "$(.root)link" $(OPTIONS) /NOI /DE /XN /ENTRY:_DllMainCRTStartup /IMPLIB:"$(<[2])" "$(>)" $(LIBRARIES) , "$(<[1])" ,, user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
+ echo LIBRARY "$(<[1]:B)" > $(<[2]).def
+ echo DESCRIPTION 'A Library' >> $(<[2]).def
+ echo EXETYPE NT >> $(<[2]).def
+ echo CODE SHARED EXECUTE >> $(<[2]).def
+ echo DATA WRITE >> $(<[2]).def
+ "$(.root)link" $(OPTIONS) /NOI /DE /XN /PAGESIZE:32 -implib:"$(<[2])" @"@($(<[1]:W).rsp:E=$(plus-nl)"$(>)" $(plus-nl)$(LIBRARIES) $(nl)"$(<[1])" $(nl)NUL $(nl)user32.lib $(plus-nl)kernel32.lib $(plus-nl)"$(FINDLIBS:S=.lib)" $(nl)"$(<[2]).def")"
}
+rule archive ( targets * : sources * : properties * )
+{
+ # Always remove archive and start again. See rationale in gcc.jam
+ local clean.a = $(targets[1])(clean) ;
+ TEMPORARY $(clean.a) ;
+ NOCARE $(clean.a) ;
+ LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
+ DEPENDS $(clean.a) : $(sources) ;
+ DEPENDS $(targets) : $(clean.a) ;
+ common.RmTemps $(clean.a) : $(targets) ;
+}
actions together piecemeal archive
{
- "$(.root)lib" $(OPTIONS) -c -n -p256 "$(<)" "$(>)"
+ if exist "$(<[1])" (
+ "$(.root)lib" $(OPTIONS) -n -p256 "$(<)" "$(>)"
+ ) else (
+ "$(.root)lib" $(OPTIONS) -c -n -p256 "$(<)" "$(>)"
+ )
}
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