Python Library Caching
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. EXAMPLES = $(wildcard *.py)
  2. FIRSTLOGS = ${EXAMPLES:.py=_1.log}
  3. LASTLOGS = ${EXAMPLES:.py=_2.log}
  4. .PHONY: all
  5. .SECONDAY: $(FIRSTLOGS)
  6. all: $(LASTLOGS)
  7. %_1.log: %.py
  8. rm -f *.json *.pickle
  9. python3 $< > $@
  10. %_2.log: %.py %_1.log
  11. python3 $< > $@
  12. rm -f *.json *.pickle
  13. clean:
  14. @echo "\e[1m * Example logs...\e[0m"
  15. @rm -f $(FIRSTLOGS) $(LASTLOGS) *.json *.pickle