14
14
See the License for the specific language governing permissions and
15
15
limitations under the License.
16
16
"""
17
- from exporters import Exporter
18
- from os .path import splitext , basename , relpath , join , abspath
17
+ from os .path import splitext , basename , relpath , join , abspath , dirname
19
18
from os import curdir , getcwd
19
+ from tools .export .exporters import Exporter
20
20
21
21
22
22
class GccArm (Exporter ):
@@ -150,7 +150,6 @@ def generate(self):
150
150
l , _ = splitext (basename (lib ))
151
151
libraries .append (l [3 :])
152
152
153
- build_dir = abspath (join (self .export_dir , ".build" ))
154
153
ctx = {
155
154
'name' : self .project_name ,
156
155
'to_be_compiled' : to_be_compiled ,
@@ -162,7 +161,9 @@ def generate(self):
162
161
'symbols' : self .toolchain .get_symbols (),
163
162
'cpu_flags' : self .toolchain .cpu ,
164
163
'hex_files' : self .resources .hex_files ,
165
- 'vpath' : [".." ]
164
+ 'vpath' : (["../../.." ]
165
+ if basename (dirname (dirname (self .export_dir ))) == "projectfiles"
166
+ else [".." ])
166
167
}
167
168
168
169
for key in ['include_paths' , 'library_paths' , 'linker_script' , 'hex_files' ]:
@@ -174,7 +175,3 @@ def generate(self):
174
175
ctx ["include_paths" ] += ['../.' ]
175
176
ctx .update (self .flags )
176
177
self .gen_file ('gcc_arm_%s.tmpl' % self .target .lower (), ctx , 'Makefile' )
177
-
178
- def scan_and_copy_resources (self , prj_paths , trg_path , relative = False ):
179
- self .prj_paths = prj_paths
180
- Exporter .scan_and_copy_resources (self , prj_paths , trg_path , relative )
0 commit comments