#NEWLINE# @ feature ( 'd' ) #NEWLINE# @ after ( 'apply_core' ) #NEWLINE# def apply_d_vars( self ) : #NEWLINE# #INDENT# env = self . env #NEWLINE# dpath_st = env [ 'DPATH_ST' ] #NEWLINE# lib_st = env [ 'DLIB_ST' ] #NEWLINE# libpath_st = env [ 'DLIBPATH_ST' ] #NEWLINE# importpaths = self . to_list ( self . importpaths ) #NEWLINE# libpaths = [ ] #NEWLINE# libs = [ ] #NEWLINE# uselib = self . to_list ( self . uselib ) #NEWLINE# for i in uselib : #NEWLINE# #INDENT# if env [ ( 'DFLAGS_' + i ) ] : #NEWLINE# #INDENT# env . append_unique ( 'DFLAGS' , env [ ( 'DFLAGS_' + i ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# for x in self . features : #NEWLINE# #INDENT# if ( not ( x in [ 'dprogram' , 'dstaticlib' , 'dshlib' ] ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# x . lstrip ( 'd' ) #NEWLINE# d_shlib_dflags = env [ ( ( 'D_' + x ) + '_DFLAGS' ) ] #NEWLINE# if d_shlib_dflags : #NEWLINE# #INDENT# env . append_unique ( 'DFLAGS' , d_shlib_dflags ) #NEWLINE# #UNINDENT# #UNINDENT# for i in uselib : #NEWLINE# #INDENT# if env [ ( 'DPATH_' + i ) ] : #NEWLINE# #INDENT# for entry in self . to_list ( env [ ( 'DPATH_' + i ) ] ) : #NEWLINE# #INDENT# if ( not ( entry in importpaths ) ) : #NEWLINE# #INDENT# importpaths . append ( entry ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# for path in importpaths : #NEWLINE# #INDENT# if os . path . isabs ( path ) : #NEWLINE# #INDENT# env . append_unique ( '_DIMPORTFLAGS' , ( dpath_st % path ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# node = self . path . find_dir ( path ) #NEWLINE# self . env . append_unique ( 'INC_PATHS' , node ) #NEWLINE# env . append_unique ( '_DIMPORTFLAGS' , ( dpath_st % node . srcpath ( env ) ) ) #NEWLINE# env . append_unique ( '_DIMPORTFLAGS' , ( dpath_st % node . bldpath ( env ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# for i in uselib : #NEWLINE# #INDENT# if env [ ( 'LIBPATH_' + i ) ] : #NEWLINE# #INDENT# for entry in self . to_list ( env [ ( 'LIBPATH_' + i ) ] ) : #NEWLINE# #INDENT# if ( not ( entry in libpaths ) ) : #NEWLINE# #INDENT# libpaths . append ( entry ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# libpaths = ( self . to_list ( self . libpaths ) + libpaths ) #NEWLINE# for path in libpaths : #NEWLINE# #INDENT# if ( not os . path . isabs ( path ) ) : #NEWLINE# #INDENT# node = self . path . find_resource ( self ) #NEWLINE# if ( not node ) : #NEWLINE# #INDENT# raise Utils . WafError ( ( 'could not find libpath %r from %r' % ( path , self ) ) ) #NEWLINE# #UNINDENT# path = node . abspath ( self . env ) #NEWLINE# #UNINDENT# env . append_unique ( 'DLINKFLAGS' , ( libpath_st % path ) ) #NEWLINE# #UNINDENT# for i in uselib : #NEWLINE# #INDENT# if env [ ( 'LIB_' + i ) ] : #NEWLINE# #INDENT# for entry in self . to_list ( env [ ( 'LIB_' + i ) ] ) : #NEWLINE# #INDENT# if ( not ( entry in libs ) ) : #NEWLINE# #INDENT# libs . append ( entry ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# libs . extend ( self . to_list ( self . libs ) ) #NEWLINE# for flag in self . to_list ( self . dflags ) : #NEWLINE# #INDENT# env . append_unique ( 'DFLAGS' , flag ) #NEWLINE# #UNINDENT# for lib in libs : #NEWLINE# #INDENT# env . append_unique ( 'DLINKFLAGS' , ( lib_st % lib ) ) #NEWLINE# #UNINDENT# for i in uselib : #NEWLINE# #INDENT# dlinkflags = env [ ( 'DLINKFLAGS_' + i ) ] #NEWLINE# if dlinkflags : #NEWLINE# #INDENT# for linkflag in dlinkflags : #NEWLINE# #INDENT# env . append_unique ( 'DLINKFLAGS' , linkflag )