Ticket #1177: stlport.jam.patch
File stlport.jam.patch, 4.5 KB (added by , 15 years ago) |
---|
-
stlport.jam
10 10 # The subfeature value 'hostios' means to use host compiler's iostreams. 11 11 # 12 12 # The specific version of stlport is selected by features: 13 # The < link> feature selects between static and shared library13 # The <runtime-link> feature selects between static and shared library 14 14 # The <runtime-debugging>on selects STLPort with debug symbols 15 15 # and stl debugging. 16 16 # There's no way to use STLPort with debug symbols but without … … 109 109 return [ basic-target.generate $(property-set) ] ; 110 110 } 111 111 112 rule get-name-with-suffix ( name : property-set ) 113 { 114 # Add the lib file suffix because some of the compiler jamfiles (e.g. msvc) expect 115 # it to be there. If no suffix is present, when they use :S= they will strip 116 # off anything following the last . in the name. 117 local lib-file.suffix ; 118 if [ feature.get-values <runtime-link> : [ $(property-set).raw ] ] = "static" 119 { 120 lib-file.suffix = [ type.generated-target-suffix STATIC_LIB : $(property-set) ] ; 121 } 122 else 123 { 124 lib-file.suffix = [ type.generated-target-suffix IMPORT_LIB : $(property-set) ] ; 125 } 126 127 return $(name).$(lib-file.suffix) ; 128 } 129 112 130 rule construct ( name : source-targets * : property-set ) 113 131 { 114 132 # Deduce the name of stlport library, based on toolset and … … 124 142 # STLport host IO streams no longer supported. So we always 125 143 # need libraries. 126 144 127 # name: stlport(stl)?[dg]? .M.R145 # name: stlport(stl)?[dg]?(_static)?.M.R 128 146 local name = stlport ; 129 147 if [ feature.get-values <runtime-debugging> : $(raw) ] = "on" 130 148 { … … 136 154 case * : name += d ; 137 155 } 138 156 } 157 158 if [ feature.get-values <runtime-link> : $(raw) ] = "static" 159 { 160 name += _static ; 161 } 162 139 163 name += .$(self.version.5) ; 140 164 name = $(name:J=) ; 141 165 … … 156 180 = [ type.generated-target-suffix $(runtime-link:U)_LIB : $(lib-file.props) ] ; 157 181 lib-file.prefix 158 182 ?= "" "lib" ; 183 159 184 lib-file.suffix 160 185 ?= "" ; 161 186 local lib-file … … 169 194 = [ targets.main-target-requirements 170 195 [ $(lib-file.props).raw ] <file>$(lib-file[-1]) 171 196 : $(self.project) ] ; 172 return [ generators.construct $(self.project) $(name) : LIB : $(lib-file.requirements) ] ;197 return [ generators.construct $(self.project) $(name) : LIB : $(lib-file.requirements) : : LIB ] ; 173 198 } 174 199 else 175 200 { 176 201 #~ Otherwise, it's just a regular usage of the library. 202 local full-name ; 203 full-name = [ get-name-with-suffix $(name) : $(property-set) ] ; 177 204 return [ generators.construct 178 $(self.project) $( name) : SEARCHED_LIB : $(property-set)] ;205 $(self.project) $(full-name) : SEARCHED_LIB : [ $(property-set).add-raw <name>$(full-name) ] ] ; 179 206 } 180 207 } 181 208 else if ! $(hostios) && $(toolset) != msvc … … 191 218 name = $(name)_stldebug ; 192 219 } 193 220 221 local full-name ; 222 full-name = [ get-name-with-suffix $(name) : $(property-set) ] ; 194 223 return [ generators.construct 195 $(self.project) $( name) : SEARCHED_LIB : $(property-set)] ;224 $(self.project) $(full-name) : SEARCHED_LIB : [ $(property-set).add-raw <name>$(full-name) ] ] ; 196 225 } 197 226 else 198 227 { … … 217 246 <define>_STLP_DEBUG=1 218 247 <define>_STLP_DEBUG_UNINITIALIZED=1 ; 219 248 } 220 if [ $(rproperties).get <runtime- debugging> ] = "on"249 if [ $(rproperties).get <runtime-link> ] = "shared" 221 250 { 222 251 usage-requirements += 223 252 <define>_STLP_USE_DYNAMIC_LIB=1 ; … … 254 283 if $(self.version) 255 284 { 256 285 usage-requirements += 257 <stdlib>stlport -$(self.version) ;286 <stdlib>stlport <stdlib-stlport:version>$(self.version) ; 258 287 } 259 288 else 260 289 {