mirror of https://github.com/c3d2/slidenado/
Makefile how has dynamic dependencies for each presentation
The dependencies are read from each LaTeX file by searching for calls to \includedeck.
This commit is contained in:
parent
802e0abbb9
commit
f685674548
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…
Reference in New Issue