Changeset 904702d for waflib/Tools/ccroot.py
- Timestamp:
- Mar 14, 2015, 6:06:10 PM (10 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 6d7acc8
- Parents:
- 5525507
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waflib/Tools/ccroot.py
r5525507 r904702d 76 76 name=name+'-'+nums[0] 77 77 elif self.env.DEST_OS=='openbsd': 78 pattern='%s.%s.%s'%(pattern,nums[0],nums[1]) 78 pattern='%s.%s'%(pattern,nums[0]) 79 if len(nums)>=2: 80 pattern+='.%s'%nums[1] 79 81 tmp=folder+os.sep+pattern%name 80 82 target=self.generator.path.find_or_declare(tmp) … … 82 84 class stlink_task(link_task): 83 85 run_str='${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}' 86 chmod=Utils.O644 84 87 def rm_tgt(cls): 85 88 old=cls.run … … 112 115 inst_to=self.link_task.__class__.inst_to 113 116 if inst_to: 114 self.install_task=self.bld.install_files(inst_to,self.link_task.outputs[:],env=self.env,chmod=self.link_task.chmod )117 self.install_task=self.bld.install_files(inst_to,self.link_task.outputs[:],env=self.env,chmod=self.link_task.chmod,task=self.link_task) 115 118 @taskgen_method 116 119 def use_rec(self,name,**kw): … … 140 143 p=self.tmp_use_prec 141 144 for x in self.to_list(getattr(y,'use',[])): 145 if self.env["STLIB_"+x]: 146 continue 142 147 try: 143 148 p[x].append(name) … … 191 196 var=y.tmp_use_var 192 197 if var and link_task: 193 if var=='LIB'or y.tmp_use_stlib :198 if var=='LIB'or y.tmp_use_stlib or x in names: 194 199 self.env.append_value(var,[y.target[y.target.rfind(os.sep)+1:]]) 195 200 self.link_task.dep_nodes.extend(y.link_task.outputs) 196 201 tmp_path=y.link_task.outputs[0].parent.path_from(self.bld.bldnode) 197 self.env.append_ value(var+'PATH',[tmp_path])202 self.env.append_unique(var+'PATH',[tmp_path]) 198 203 else: 199 204 if y.tmp_use_objects: … … 206 211 try: 207 212 y=self.bld.get_tgen_by_name(x) 208 except E xception:213 except Errors.WafError: 209 214 if not self.env['STLIB_'+x]and not x in self.uselib: 210 215 self.uselib.append(x) 211 216 else: 212 for k in self.to_list(getattr(y,'use lib',[])):217 for k in self.to_list(getattr(y,'use',[])): 213 218 if not self.env['STLIB_'+k]and not k in self.uselib: 214 219 self.uselib.append(k) … … 239 244 _vars=self.get_uselib_vars() 240 245 env=self.env 241 for x in _vars: 242 y=x.lower() 243 env.append_unique(x,self.to_list(getattr(self,y,[]))) 244 for x in self.features: 245 for var in _vars: 246 compvar='%s_%s'%(var,x) 247 env.append_value(var,env[compvar]) 248 for x in self.to_list(getattr(self,'uselib',[])): 249 for v in _vars: 250 env.append_value(v,env[v+'_'+x]) 246 app=env.append_value 247 feature_uselib=self.features+self.to_list(getattr(self,'uselib',[])) 248 for var in _vars: 249 y=var.lower() 250 val=getattr(self,y,[]) 251 if val: 252 app(var,self.to_list(val)) 253 for x in feature_uselib: 254 val=env['%s_%s'%(var,x)] 255 if val: 256 app(var,val) 251 257 @feature('cshlib','cxxshlib','fcshlib') 252 258 @after_method('apply_link') … … 272 278 else: 273 279 self.link_task.inputs.append(node) 274 try: 275 inst_to=self.install_path 276 except AttributeError: 277 inst_to=self.link_task.__class__.inst_to 278 if not inst_to: 279 return 280 self.implib_install_task=self.bld.install_as('${LIBDIR}/%s'%implib.name,implib,self.env) 281 re_vnum=re.compile('^([1-9]\\d*|0)[.]([1-9]\\d*|0)[.]([1-9]\\d*|0)$') 280 if getattr(self,'install_task',None): 281 try: 282 inst_to=self.install_path_implib 283 except AttributeError: 284 try: 285 inst_to=self.install_path 286 except AttributeError: 287 inst_to='${IMPLIBDIR}' 288 self.install_task.dest='${BINDIR}' 289 if not self.env.IMPLIBDIR: 290 self.env.IMPLIBDIR=self.env.LIBDIR 291 self.implib_install_task=self.bld.install_files(inst_to,implib,env=self.env,chmod=self.link_task.chmod,task=self.link_task) 292 re_vnum=re.compile('^([1-9]\\d*|0)([.]([1-9]\\d*|0)[.]([1-9]\\d*|0))?$') 282 293 @feature('cshlib','cxxshlib','dshlib','fcshlib','vnum') 283 294 @after_method('apply_link','propagate_uselib_vars') … … 301 312 self.env.append_value('LINKFLAGS',v.split()) 302 313 if self.env.DEST_OS!='openbsd': 303 self.create_task('vnum',node,[node.parent.find_or_declare(name2),node.parent.find_or_declare(name3)]) 314 outs=[node.parent.find_or_declare(name3)] 315 if name2!=name3: 316 outs.append(node.parent.find_or_declare(name2)) 317 self.create_task('vnum',node,outs) 304 318 if getattr(self,'install_task',None): 305 319 self.install_task.hasrun=Task.SKIP_ME … … 312 326 else: 313 327 t1=bld.install_as(path+os.sep+name3,node,env=self.env,chmod=self.link_task.chmod) 314 t2=bld.symlink_as(path+os.sep+name2,name3)315 328 t3=bld.symlink_as(path+os.sep+libname,name3) 316 self.vnum_install_task=(t1,t2,t3) 329 if name2!=name3: 330 t2=bld.symlink_as(path+os.sep+name2,name3) 331 self.vnum_install_task=(t1,t2,t3) 332 else: 333 self.vnum_install_task=(t1,t3) 317 334 if'-dynamiclib'in self.env['LINKFLAGS']: 318 335 try: … … 328 345 quient=True 329 346 ext_in=['.bin'] 347 def keyword(self): 348 return'Symlinking' 330 349 def run(self): 331 350 for x in self.outputs:
Note: See TracChangeset
for help on using the changeset viewer.