Browse Source

Makefile how has dynamic dependencies for each presentation

The dependencies are read from each LaTeX file by searching for calls to
\includedeck.
pull/6/head
Daniel Borchmann 4 years ago
parent
commit
f685674548
Signed by untrusted user who does not match committer: dbo
GPG Key ID: 4F63DB96D45AA9C6
  1. 7
      Makefile

7
Makefile

@ -15,9 +15,14 @@ distclean: clean
presentations/$(BUILD_DIR)/%:
mkdir -p $@
define presentation_dependencies
$(shell cat $(1) | perl -ne '/includedeck\{(.*)\}/ && print "presentations/content/", $$1, ".tex "')
endef
define PRESENTATION_template
.ONESHELL: $(1)
$(1): $(subst .pdf,.tex,$(1)) $(BUILD_DECKS)
$(1): $(subst .pdf,.tex,$(1)) $(call presentation_dependencies,$(subst .pdf,.tex,$(1)))
echo $$^
cd presentations
$(LATEX) $$(notdir $$<)
$(LATEX) $$(notdir $$<)

Loading…
Cancel
Save