make: Auto-build autoslide

This commit is contained in:
Glenn Y. Rolland 2023-04-06 20:15:54 +02:00
parent 434c3d72e0
commit 9fd96ed628

View file

@ -38,9 +38,11 @@ SLIDES_MD=$(shell find $(SLIDES_DIR) \( -name '*.md' ! -name '_*' \)) $(SLIDES_M
SLIDES_MD_PDF=$(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MD))
SLIDES_MD_PPTX=$(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pptx,$(SLIDES_MD))
SLIDES_MD_ALL=$(SLIDES_MDPP_MD) $(SLIDES_MD)
SLIDES_PDF_ALL=$(SLIDES_MDPP_MD_PDF) $(SLIDES_MD_PDF)
SLIDES_PPTX_ALL=$(SLIDES_MDPP_MD_PPTX) $(SLIDES_MD_PPTX)
SLIDES_MD_ALL=$(SLIDES_MDPP_MD) $(SLIDES_MD) $(SLIDES_DIR)/autoslide.md
SLIDES_PDF_ALL=$(SLIDES_MDPP_MD_PDF) $(SLIDES_MD_PDF) $(BUILD_SLIDES_DIR)/autoslide.pdf
SLIDES_PPTX_ALL=$(SLIDES_MDPP_MD_PPTX) $(SLIDES_MD_PPTX) $(BUILD_SLIDES_DIR)/autoslide.pptx
DOCS_MD=$(shell find $(DOCS_DIR) \( -name '*.md' ! -name '_*' \))
## Find .uml graphs
DOCS_IMAGES_UML=$(shell find $(IMAGES_DIR) \( -name '*.uml' ! -name '_*' \))
@ -121,7 +123,9 @@ watch: ## run development server
$(MAKE) autoslide
pipenv run honcho start
autoslide:
autoslide: $(SLIDES_DIR)/autoslide.md | $(BUILD_SLIDES_DIR)
$(SLIDES_DIR)/autoslide.md: $(DOCS_MD)
find $(DOCS_DIR) -regextype sed -regex '.*/[0-9][^/]*\.md' -print0 \
| sort -z |xargs -0 cat \
> $(SLIDES_DIR)/autoslide.md