pandoc-pages/pages/mipt_cxx1/Makefile

23 lines
434 B
Makefile
Raw Permalink Normal View History

2023-09-21 19:42:51 +03:00
BUILDDIR ?= build
PAGE := $(shell basename $(shell pwd))
PREFIX := $(BUILDDIR)/page/$(PAGE)
MARKDOWN_FILES := $(wildcard *.md)
MARKDOWN_TARGETS = $(patsubst %.md,$(PREFIX)/%.html,$(MARKDOWN_FILES))
all: $(MARKDOWN_TARGETS) index
$(PREFIX)/%.html: %.md
@mkdir -p $(@D)
pandoc $< --to html --output $@ --standalone
2023-09-21 22:34:53 +03:00
$(PREFIX)/index.html:
2023-09-21 19:42:51 +03:00
@mkdir -p $(@D)
2023-09-21 22:34:53 +03:00
./generate_index.sh > $@
2023-09-21 19:42:51 +03:00
index: $(PREFIX)/index.html
.PHONY: all index