@@ -69,7 +69,7 @@ def __scan_and_copy(self, src_path, trg_path):
6969
7070 for r_type in ['headers' , 's_sources' , 'c_sources' , 'cpp_sources' ,
7171 'objects' , 'libraries' , 'linker_script' ,
72- 'lib_builds' , 'lib_refs' , 'repo_files' , ' hex_files' , 'bin_files' ]:
72+ 'lib_builds' , 'lib_refs' , 'hex_files' , 'bin_files' ]:
7373 r = getattr (resources , r_type )
7474 if r :
7575 self .toolchain .copy_files (r , trg_path , resources = resources )
@@ -149,16 +149,21 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False):
149149 # Copy only the file for the required target and toolchain
150150 lib_builds = []
151151 # Create the configuration object
152+ if isinstance (prj_paths , basestring ):
153+ prj_paths = [prj_paths ]
152154 config = Config (self .target , prj_paths )
153155 for src in ['lib' , 'src' ]:
154- resources = reduce (add , [self .__scan_and_copy (join (path , src ), trg_path ) for path in prj_paths ])
156+ resources = self .__scan_and_copy (join (prj_paths [0 ], src ), trg_path )
157+ for path in prj_paths [1 :]:
158+ resources .add (self .__scan_and_copy (join (path , src ), trg_path ))
159+
155160 lib_builds .extend (resources .lib_builds )
156161
157162 # The repository files
158- for repo_dir in resources .repo_dirs :
159- repo_files = self .__scan_all (repo_dir )
160- for path in proj_paths :
161- self .toolchain .copy_files (repo_files , trg_path , rel_path = join (path , src ))
163+ # for repo_dir in resources.repo_dirs:
164+ # repo_files = self.__scan_all(repo_dir)
165+ # for path in prj_paths :
166+ # self.toolchain.copy_files(repo_files, trg_path, rel_path=join(path, src))
162167
163168 # The libraries builds
164169 for bld in lib_builds :
@@ -186,19 +191,14 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False):
186191 # Loads the resources into the config system which might expand/modify resources based on config data
187192 self .resources = config .load_resources (resources )
188193
189-
190194 if hasattr (self , "MBED_CONFIG_HEADER_SUPPORTED" ) and self .MBED_CONFIG_HEADER_SUPPORTED :
191195 # Add the configuration file to the target directory
192196 self .config_header = self .toolchain .MBED_CONFIG_FILE_NAME
193197 config .get_config_data_header (join (trg_path , self .config_header ))
194198 self .config_macros = []
195- else :
199+ else :
196200 # And add the configuration macros to the toolchain
197201 self .config_macros = config .get_config_data_macros ()
198- # Check the existence of a binary build of the mbed library for the desired target
199- # This prevents exporting the mbed libraries from source
200- # if not self.toolchain.mbed_libs:
201- # raise OldLibrariesException()
202202
203203 def gen_file (self , template_file , data , target_file ):
204204 template_path = join (Exporter .TEMPLATE_DIR , template_file )
0 commit comments