made library dependencies more dynamic

switched to absolute paths
This commit is contained in:
2024-11-27 12:52:40 +01:00
parent 0f7023da16
commit 0ae5cba75c
7 changed files with 53 additions and 37 deletions
+9 -9
View File
@@ -1,13 +1,13 @@
build_dir = ../build
library_dir = ../library
propers_dir = ../propers
config_dir = ../config
tex_deps = *.tt $(library_dir)/*/*/*.tt $(propers_dir)/*.tt $(config_dir)/song_choices.csv $(config_dir)/variables.tt
tpage_defs = --define config_dir=$(config_dir) --define library_dir=$(library_dir) --define propers_dir=$(propers_dir)
tpage = tpage $(tpage_defs)
tex_deps = *.tt $(config_dir)/variables.tt $(dynamic_deps)
songsheet.tex: songsheet.tt $(tex_deps) header.tt head.tt footer.tt
tpage $< > $(build_dir)/$@
$(tpage) $< > $(build_dir)/$@
musician_scores.tex: musician_scores.tt $(tex_deps)
tpage $< > $(build_dir)/$@
$(tpage) $< > $(build_dir)/$@
leadsheet_collection.tex: musician_scores.tt $(tex_deps)
tpage --define parts=band $< > $(build_dir)/$@
$(tpage) --define parts=band $< > $(build_dir)/$@
choir_scores.tex: musician_scores.tt $(tex_deps)
tpage --define parts=SATB $< > $(build_dir)/$@
$(tpage) --define parts=SATB $< > $(build_dir)/$@
$(build_dir)/dynamic_deps.mk: dynamic_deps.mk.tt $(song_choices) $(user_variables)
$(tpage) $< > $@
+11
View File
@@ -0,0 +1,11 @@
dynamic_deps = [% PROCESS variables.tt;
USE song_choices = datafile("${config_dir}/song_choices.csv", delim= '|');
FOREACH song = song_choices;
IF song.variables != '';
GET "${library_dir}/${song.variables}/* ";
END;
END;
IF proper != '';
GET "${propers_dir}/${proper}.tt";
END;
-%]
+5 -1
View File
@@ -1,4 +1,8 @@
[% PROCESS variables.tt -%]
[% PROCESS variables.tt;
IF proper != '';
PROCESS "${propers_dir}/${proper}.tt";
END;
-%]
[% parts = 0 -%]
[% INCLUDE header.tt -%]
\begin{document}
+1 -8
View File
@@ -8,12 +8,5 @@
small_footer = 0
lent = 0
meditations = 0
config_dir = '../config'
library_dir = '../library'
propers_dir = '../propers/'
-%]
[% PROCESS "${config_dir}/variables.tt";
IF proper != '';
PROCESS "${propers_dir}/${proper}.tt";
END;
-%]
[% PROCESS "${config_dir}/variables.tt" -%]