made library dependencies more dynamic
switched to absolute paths
This commit is contained in:
@@ -1,25 +1,30 @@
|
||||
build_dir = build
|
||||
config_dir = config
|
||||
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
|
||||
.PHONY: all
|
||||
TOPDIR :::= $(PWD)
|
||||
build_dir ::= $(TOPDIR)/build
|
||||
config_dir ::= $(TOPDIR)/config
|
||||
docker ::= podman
|
||||
library_dir ::= $(TOPDIR)/library
|
||||
propers_dir ::= $(TOPDIR)/propers
|
||||
template_dir ::= $(TOPDIR)/templates
|
||||
song_choices ::= $(config_dir)/song_choices.csv
|
||||
user_variables ::= $(config_dir)/variables.tt
|
||||
export
|
||||
.PHONY: clean all
|
||||
*: $(build_dir)/dynamic_deps.mk
|
||||
$(build_dir)/dynamic_deps.mk: build_dir $(template_dir)/dynamic_deps.mk.tt $(song_choices) $(user_variables)
|
||||
$(MAKE) -C $(template_dir) $@
|
||||
include $(build_dir)/dynamic_deps.mk
|
||||
clean:
|
||||
$(RM) -r build
|
||||
all: leadsheet_collection.pdf choir_scores.pdf print_a3.pdf clean_intermediate #print_a4.pdf
|
||||
%.pdf: build
|
||||
$(MAKE) -C $(build_dir) $@
|
||||
songsheet.tex: $(template_dir)/songsheet.tt $(tex_deps) $(template_dir)/header.tt $(template_dir)/head.tt $(template_dir)/footer.tt
|
||||
%.tex: build
|
||||
$(MAKE) -C $(template_dir) $@
|
||||
clean_intermediate:
|
||||
$(MAKE) -C $(build_dir) clean_intermediate
|
||||
build: build-Makefile
|
||||
mkdir -p $(build_dir) && \
|
||||
build_dir:
|
||||
mkdir -p $(build_dir)
|
||||
build: build_dir build-Makefile
|
||||
cp build-Makefile $(build_dir)/Makefile && \
|
||||
cp -r library/gregorio_scores $(build_dir)
|
||||
clean:
|
||||
$(RM) -r build
|
||||
init:
|
||||
git submodule update --init --recursive
|
||||
build_docker_image:
|
||||
@@ -27,5 +32,8 @@ build_docker_image:
|
||||
pull_docker:
|
||||
$(docker) pull gitea.leopold.fajtak.at/leopold/songsheet_generator:latest
|
||||
build_in_docker:
|
||||
$(docker) run -v `pwd`:/data songsheet_generator make
|
||||
|
||||
$(docker) run -v `pwd`:/data songsheet_generator make -j all
|
||||
tex_deps ::= $(template_dir)/variables.tt $(config_dir)/qr_codes.csv $(config_dir)/variables.tt $(dynamic_deps)
|
||||
songsheet.tex: $(template_dir)/songsheet.tt $(tex_deps) $(template_dir)/header.tt $(template_dir)/head.tt $(template_dir)/footer.tt
|
||||
%.tex: build $(tex_deps)
|
||||
$(MAKE) -C $(template_dir) $@
|
||||
|
||||
Reference in New Issue
Block a user