diff --git a/CHANGELOG.md b/CHANGELOG.md index d4a55ed7..a89610cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Errors and warnings from KiAuto now are printed as errors and warnings. -- Schematic dependencies are sorted in the generated Makefiles +- Schematic dependencies are sorted in the generated Makefiles. +- Makefile variables KIBOT, DEBUG and LOGFILE can be defined from outside. ### Fixed - Problem when using E/DRC filters and the output dir didn't exist. diff --git a/kibot/kiplot.py b/kibot/kiplot.py index 499f0033..f4c40e05 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -446,17 +446,17 @@ def generate_makefile(makefile, cfg_file, outputs, kibot_sys=False): fname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src', 'kibot')) if kibot_sys or not os.path.isfile(fname): fname = 'kibot' - f.write('KIBOT={}\n'.format(fname)) + f.write('KIBOT?={}\n'.format(fname)) dbg = '' if GS.debug_level > 0: dbg = '-'+'v'*GS.debug_level - f.write('DEBUG={}\n'.format(dbg)) + 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))) 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') + f.write('LOGFILE?=kibot_error.log\n') f.write('\n') # Configure all outputs GS.outputs = outputs