# This ensures the next time you run Make, it’ll properly re-run the failed # rule, and guards against broken files. # See https://tech.davis-hansson.com/p/make/#change-some-make-defaults .DELETE_ON_ERROR: # To prevent deleting intermediate files (for controls) .PRECIOUS: 02-download/%.jsonl 03-create-fields/%.jsonl 04-enrich/%.jsonl SOURCE_FILES := $(wildcard 01-query/*.txt) TARGET_FILES := $(patsubst 01-query/%.txt, 05-future-loader/%.jsonl, $(SOURCE_FILES)) watch: ## Automatically build files when they change while true; do \ inotifywait -qr -e modify -e create -e delete -e move --exclude '/\.' 01-query; \ make all; \ done # Rules all: $(TARGET_FILES) ## Build all files echo $(TARGET_FILES) # cible : dépendance 05-future-loader/%.jsonl: 04-enrich/%.jsonl npx ezs 05-future-loader.ini < $< > $@.crdownload mv $@.crdownload $@ 04-enrich/%.jsonl: 03-create-fields/%.jsonl npx ezs 04-enrich.ini < $< > $@.crdownload mv $@.crdownload $@ 03-create-fields/%.jsonl: 02-download/%.jsonl npx ezs 03-create-fields.ini < $< > $@.crdownload mv $@.crdownload $@ 02-download/%.jsonl: 01-query/%.txt npx ezs 02-download.ini < $< > $@.crdownload mv $@.crdownload $@