@@ -502,7 +502,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
502
502
notify = None , name = None , macros = None , inc_dirs = None , jobs = 1 ,
503
503
report = None , properties = None , project_id = None ,
504
504
project_description = None , config = None ,
505
- app_config = None , build_profile = None , stats_depth = None ):
505
+ app_config = None , build_profile = None , stats_depth = None , ignore = None ):
506
506
""" Build a project. A project may be a test or a user program.
507
507
508
508
Positional arguments:
@@ -529,6 +529,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
529
529
app_config - location of a chosen mbed_app.json file
530
530
build_profile - a dict of flags that will be passed to the compiler
531
531
stats_depth - depth level for memap to display file/dirs
532
+ ignore - list of paths to add to mbedignore
532
533
"""
533
534
534
535
# Convert src_path to a list if needed
@@ -548,6 +549,10 @@ def build_project(src_paths, build_path, target, toolchain_name,
548
549
clean = clean , jobs = jobs , notify = notify , config = config ,
549
550
app_config = app_config , build_profile = build_profile )
550
551
552
+ if ignore :
553
+ toolchain .add_ignore_patterns (root = "." , base_path = "." ,
554
+ patterns = ignore )
555
+
551
556
# The first path will give the name to the library
552
557
name = (name or toolchain .config .name or
553
558
basename (normpath (abspath (src_paths [0 ]))))
@@ -643,7 +648,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
643
648
archive = True , notify = None , macros = None , inc_dirs = None , jobs = 1 ,
644
649
report = None , properties = None , project_id = None ,
645
650
remove_config_header_file = False , app_config = None ,
646
- build_profile = None ):
651
+ build_profile = None , ignore = None ):
647
652
""" Build a library
648
653
649
654
Positional arguments:
@@ -668,6 +673,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
668
673
remove_config_header_file - delete config header file when done building
669
674
app_config - location of a chosen mbed_app.json file
670
675
build_profile - a dict of flags that will be passed to the compiler
676
+ ignore - list of paths to add to mbedignore
671
677
"""
672
678
673
679
# Convert src_path to a list if needed
@@ -693,6 +699,10 @@ def build_library(src_paths, build_path, target, toolchain_name,
693
699
clean = clean , jobs = jobs , notify = notify , app_config = app_config ,
694
700
build_profile = build_profile )
695
701
702
+ if ignore :
703
+ toolchain .add_ignore_patterns (root = "." , base_path = "." ,
704
+ patterns = ignore )
705
+
696
706
# The first path will give the name to the library
697
707
if name is None :
698
708
name = basename (normpath (abspath (src_paths [0 ])))
0 commit comments