mirror of https://github.com/c3d2/slidenado/
Simplify generation of build directory
Just make it, don’t look on the exact dependencies of the current presentation.
This commit is contained in:
parent
27d66a7b58
commit
82b6ee3274
11
Makefile
11
Makefile
|
@ -1,6 +1,6 @@
|
|||
PRESENTATIONS=$(patsubst %.tex, %.pdf, $(wildcard presentations/*.tex))
|
||||
BUILD_DIR=build
|
||||
BUILD_DECKS=$(subst presentations, presentations/$(BUILD_DIR), $(wildcard presentations/content/*))
|
||||
BUILD_DECKS=$(subst presentations/,$(BUILD_DIR)/,$(wildcard presentations/content/*))
|
||||
LATEX=pdflatex -output-directory $(BUILD_DIR)
|
||||
|
||||
all: ${PRESENTATIONS}
|
||||
|
@ -11,14 +11,6 @@ clean:
|
|||
distclean: clean
|
||||
rm -f presentations/*.pdf
|
||||
|
||||
# A rule to make build directories when needed; the call to .SECONDARY ensures
|
||||
# that these directories are not deleted when they are generated as intermediate
|
||||
# targets
|
||||
|
||||
.SECONDARY: $(BUILD_DECKS)
|
||||
presentations/$(BUILD_DIR)/%:
|
||||
mkdir -p $@
|
||||
|
||||
# Extract dependencies for presentations by looking at the source code and
|
||||
# extracting all calls to \includedeck from them; it returns a list of elements
|
||||
# like ’presentations/content/ccc/ccc_lokal.tex’
|
||||
|
@ -37,6 +29,7 @@ define PRESENTATION_template
|
|||
$(1): $(subst .pdf,.tex,$(1)) $(call presentation_dependencies,$(subst .pdf,.tex,$(1)))
|
||||
echo $$^
|
||||
cd presentations
|
||||
mkdir -p $(BUILD_DECKS)
|
||||
$(LATEX) $$(notdir $$<)
|
||||
$(LATEX) $$(notdir $$<)
|
||||
mv $(subst presentations/,$(BUILD_DIR)/,$(1)) .
|
||||
|
|
Loading…
Reference in New Issue