mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-19 21:14:38 +01:00
chore: adds env NO_PYTHON check to Makefiles
This adds an environment variable $NO_PYTHON check to Makefiles so that: - It checks and runs into an defined error instead of some python hickup: `ModuleNotFoundError: No module named 'mako'` - makes it possible to manually export this environment variable NO_PYTHON=1 to run the same testcase that travis is running on job 1 which causes so much pain ;) Changelog-None
This commit is contained in:
committed by
Christian Decker
parent
f1eebb6c59
commit
db19f19eb3
16
Makefile
16
Makefile
@@ -271,16 +271,24 @@ SHA256STAMP = echo '$(1) SHA256STAMP:'`cat $(sort $(filter-out FORCE,$^)) | $(SH
|
||||
|
||||
# generate-wire.py --page [header|impl] hdrfilename wirename < csv > file
|
||||
%_wiregen.h: %_wire.csv $(WIRE_GEN_DEPS)
|
||||
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE,"wiregen $@",tools/generate-wire.py --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); fi
|
||||
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" == 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
|
||||
$(call VERBOSE,"wiregen $@",tools/generate-wire.py --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
|
||||
fi
|
||||
|
||||
%_wiregen.c: %_wire.csv $(WIRE_GEN_DEPS)
|
||||
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE,"wiregen $@",tools/generate-wire.py --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); fi
|
||||
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" == 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
|
||||
$(call VERBOSE,"wiregen $@",tools/generate-wire.py --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
|
||||
fi
|
||||
|
||||
%_printgen.h: %_wire.csv $(WIRE_GEN_DEPS)
|
||||
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); fi
|
||||
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" == 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
|
||||
$(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
|
||||
fi
|
||||
|
||||
%_printgen.c: %_wire.csv $(WIRE_GEN_DEPS)
|
||||
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); fi
|
||||
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" == 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
|
||||
$(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
|
||||
fi
|
||||
|
||||
include external/Makefile
|
||||
include bitcoin/Makefile
|
||||
|
||||
Reference in New Issue
Block a user