@@ -69,7 +69,7 @@ def __scan_and_copy(self, src_path, trg_path):
69
69
70
70
for r_type in ['headers' , 's_sources' , 'c_sources' , 'cpp_sources' ,
71
71
'objects' , 'libraries' , 'linker_script' ,
72
- 'lib_builds' , 'lib_refs' , 'repo_files' , ' hex_files' , 'bin_files' ]:
72
+ 'lib_builds' , 'lib_refs' , 'hex_files' , 'bin_files' ]:
73
73
r = getattr (resources , r_type )
74
74
if r :
75
75
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):
149
149
# Copy only the file for the required target and toolchain
150
150
lib_builds = []
151
151
# Create the configuration object
152
+ if isinstance (prj_paths , basestring ):
153
+ prj_paths = [prj_paths ]
152
154
config = Config (self .target , prj_paths )
153
155
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
+
155
160
lib_builds .extend (resources .lib_builds )
156
161
157
162
# 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))
162
167
163
168
# The libraries builds
164
169
for bld in lib_builds :
@@ -186,19 +191,14 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False):
186
191
# Loads the resources into the config system which might expand/modify resources based on config data
187
192
self .resources = config .load_resources (resources )
188
193
189
-
190
194
if hasattr (self , "MBED_CONFIG_HEADER_SUPPORTED" ) and self .MBED_CONFIG_HEADER_SUPPORTED :
191
195
# Add the configuration file to the target directory
192
196
self .config_header = self .toolchain .MBED_CONFIG_FILE_NAME
193
197
config .get_config_data_header (join (trg_path , self .config_header ))
194
198
self .config_macros = []
195
- else :
199
+ else :
196
200
# And add the configuration macros to the toolchain
197
201
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()
202
202
203
203
def gen_file (self , template_file , data , target_file ):
204
204
template_path = join (Exporter .TEMPLATE_DIR , template_file )
0 commit comments