diff --git a/Makefile b/Makefile index 501ff9b..5d4a442 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,19 @@ docker = podman library_dir = library propers_dir = propers template_dir = templates -tex_deps = $(template_dir)/*.tt $(library_dir)/*/*/*.tt $(propers_dir)/*.tt $(config_dir)/song_choices.csv $(config_dir)/qr_codes.csv $(config_dir)/variables.tt +# get dependencies from song_choices.csv and variables.tt +dynamic_deps = $(shell cat $(config_dir)/song_choices.csv | \ + awk '!/#/' | \ + awk 'NR>1' | \ + awk -F '|' '{print $$4}' | \ + sed 's/ //' | \ + awk '{print "$(library_dir)/" $$0 "/*"}') \ + $(shell cat $(config_dir)/variables.tt | \ + grep '^\s*proper =' | awk -F '=' '{print $$2}' | \ + sed 's/ //g' | \ + sed "s/'//g" | \ + awk '{print "$(propers_dir)/" $$0 ".tt"}') +tex_deps = $(template_dir)/*.tt $(config_dir)/qr_codes.csv $(config_dir)/variables.tt $(dynamic_deps) .PHONY: all all: leadsheet_collection.pdf choir_scores.pdf print_a3.pdf clean_intermediate #print_a4.pdf %.pdf: build diff --git a/config/song_choices.csv b/config/song_choices.csv index 14b7539..89b180c 100644 --- a/config/song_choices.csv +++ b/config/song_choices.csv @@ -1,5 +1,5 @@ purpose | content | template | variables -| | | +| | | ../library/freie_lieder/adeste_fideles introitus | | | #confiteor | \input{library/gebete/confiteor/confiteor_de.tex} | | kyrie | | |