fix: manual latex build with proper build dir

This commit is contained in:
relikd
2023-03-03 23:13:05 +01:00
parent 938b5bdc13
commit 2911bfe705
2 changed files with 17 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
PROJDIR := src
LEKTOR := lektor --project $(PROJDIR)
BUILD_DIR := $$($(LEKTOR) project-info --output-path)
RESOLVED_BUILD_DIR := $$( \
if [ $$(readlink 'src/content/recipes') == "../../data/distribution/" ]; \
then echo "$(PWD)/bin"; \
else echo "$(BUILD_DIR)"; fi)
.PHONY: help
help:
@@ -73,8 +77,10 @@ deploy:
# technically this isnt needed anymore but it simplyfies latex development
.PHONY: pdf
pdf:
@echo
@echo 'Generating PDF from tex source ...'
@SECONDS=0; \
"$(PROJDIR)/_tex-to-pdf/build_manually.sh" \
"$(PROJDIR)/_tex-to-pdf/build_manually.sh" "$(RESOLVED_BUILD_DIR)" \
&& echo "done. finished after $${SECONDS}s."
# Helper methods on all recipes