From 167bdcd4e98f4a248ae5ef67e5f8da587597a52c Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 29 Dec 2021 15:18:47 -0300 Subject: [PATCH] Fixed problems when generating a Makefile and no PCB or SCH is defined --- kibot/kiplot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kibot/kiplot.py b/kibot/kiplot.py index dfd72788..0efeada7 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -467,8 +467,10 @@ def generate_makefile(makefile, cfg_file, outputs, kibot_sys=False): dbg = '-'+'v'*GS.debug_level f.write('DEBUG?={}\n'.format(dbg)) f.write('CONFIG={}\n'.format(cfg_file)) - f.write('SCH={}\n'.format(os.path.relpath(GS.sch_file))) - f.write('PCB={}\n'.format(os.path.relpath(GS.pcb_file))) + if GS.sch_file: + f.write('SCH={}\n'.format(os.path.relpath(GS.sch_file))) + if GS.pcb_file: + f.write('PCB={}\n'.format(os.path.relpath(GS.pcb_file))) f.write('DEST={}\n'.format(os.path.relpath(GS.out_dir))) f.write('KIBOT_CMD=$(KIBOT) $(DEBUG) -c $(CONFIG) -e $(SCH) -b $(PCB) -d $(DEST)\n') f.write('LOGFILE?=kibot_error.log\n')