[Makefile][Fixed] What is included in all target
- Now outputs marked with run_by_default=False aren't included. - They are included in other targets, just not in the default target.
This commit is contained in:
parent
8c72fc23c9
commit
44c7b95e77
|
|
@ -70,6 +70,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Problems with recursive imports when the intermediate import didn't
|
- Problems with recursive imports when the intermediate import didn't
|
||||||
contain any of the requested elements (i.e. no outputs). (#335)
|
contain any of the requested elements (i.e. no outputs). (#335)
|
||||||
- Navigate results: fail when no output to generate. Now you get a warning.
|
- Navigate results: fail when no output to generate. Now you get a warning.
|
||||||
|
- Makefile: outputs marked as not run by default were listed in the `all`
|
||||||
|
target.
|
||||||
|
|
||||||
## [1.4.0] - 2022-10-12
|
## [1.4.0] - 2022-10-12
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -542,7 +542,7 @@ def get_pre_targets(targets, dependencies, is_pre):
|
||||||
return pcb_targets, sch_targets
|
return pcb_targets, sch_targets
|
||||||
|
|
||||||
|
|
||||||
def get_out_targets(outputs, ori_names, targets, dependencies, comments):
|
def get_out_targets(outputs, ori_names, targets, dependencies, comments, no_default):
|
||||||
pcb_targets = sch_targets = ''
|
pcb_targets = sch_targets = ''
|
||||||
try:
|
try:
|
||||||
for out in outputs:
|
for out in outputs:
|
||||||
|
|
@ -555,6 +555,8 @@ def get_out_targets(outputs, ori_names, targets, dependencies, comments):
|
||||||
dependencies[name] = [adapt_file_name(fn) for fn in out.get_dependencies()]
|
dependencies[name] = [adapt_file_name(fn) for fn in out.get_dependencies()]
|
||||||
if out.comment:
|
if out.comment:
|
||||||
comments[name] = out.comment
|
comments[name] = out.comment
|
||||||
|
if not out.run_by_default:
|
||||||
|
no_default.add(name)
|
||||||
if out.is_sch():
|
if out.is_sch():
|
||||||
sch_targets += ' '+name
|
sch_targets += ' '+name
|
||||||
if out.is_pcb():
|
if out.is_pcb():
|
||||||
|
|
@ -596,13 +598,14 @@ def generate_makefile(makefile, cfg_file, outputs, kibot_sys=False):
|
||||||
comments = {}
|
comments = {}
|
||||||
ori_names = {}
|
ori_names = {}
|
||||||
is_pre = set()
|
is_pre = set()
|
||||||
|
no_default = set()
|
||||||
# Preflights
|
# Preflights
|
||||||
pre_pcb_targets, pre_sch_targets = get_pre_targets(targets, dependencies, is_pre)
|
pre_pcb_targets, pre_sch_targets = get_pre_targets(targets, dependencies, is_pre)
|
||||||
# Outputs
|
# Outputs
|
||||||
out_pcb_targets, out_sch_targets = get_out_targets(outputs, ori_names, targets, dependencies, comments)
|
out_pcb_targets, out_sch_targets = get_out_targets(outputs, ori_names, targets, dependencies, comments, no_default)
|
||||||
# all target
|
# all target
|
||||||
f.write('#\n# Default target\n#\n')
|
f.write('#\n# Default target\n#\n')
|
||||||
f.write('all: '+' '.join(targets.keys())+'\n\n')
|
f.write('all: '+' '.join(filter(lambda x: x not in no_default, targets.keys()))+'\n\n')
|
||||||
extra_targets = ['all']
|
extra_targets = ['all']
|
||||||
# PCB/SCH specific targets
|
# PCB/SCH specific targets
|
||||||
f.write('#\n# SCH/PCB targets\n#\n')
|
f.write('#\n# SCH/PCB targets\n#\n')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue