EXAMPLES = $(wildcard *.py) LOGFILES = ${EXAMPLES:.py=.log} .PHONY: all all: $(LOGFILES) %.log: %.py python3 $< > $@ clean: @echo -e "\e[1m * Example logs...\e[0m" @rm -f $(LOGFILES)