add initial version of pandoc filter
This commit is contained in:
parent
22b4411641
commit
d88c4c14b3
5 changed files with 64 additions and 2 deletions
14
Makefile
14
Makefile
|
@ -12,20 +12,30 @@ OUTPUTSTYLE = $(patsubst %,$(BUILDDIR)/%,$(STYLE))
|
|||
|
||||
OUTPUT = $(OUTPUTPAGES) $(OUTPUTSTYLE)
|
||||
|
||||
LANGFILTER = $(TMPDIR)/langfilter
|
||||
EXECS = $(LANGFILTER)
|
||||
|
||||
.PHONY: all
|
||||
all: build
|
||||
|
||||
.PHONY: build
|
||||
build: $(OUTPUT)
|
||||
|
||||
$(BUILDDIR)/%.html: $(PAGESDIR)/%.md $(TEMPLATE)
|
||||
$(BUILDDIR)/%.html: $(PAGESDIR)/%.md $(TEMPLATE) $(LANGFILTER)
|
||||
mkdir -p $(dir $@)
|
||||
pandoc -s --toc --template $(TEMPLATE) -o $@ $<
|
||||
pandoc -s --toc --template $(TEMPLATE) --filter $(LANGFILTER) -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%: %
|
||||
mkdir -p $(dir $@)
|
||||
cp $< $@
|
||||
|
||||
$(LANGFILTER): langfilter/*.hs langfilter/langfilter.cabal
|
||||
mkdir -p $(dir $@)
|
||||
cabal build -v0 all
|
||||
find dist-newstyle -name $(notdir $@) \
|
||||
-print -type f -exec cp {} $(TMPDIR) \;
|
||||
|
||||
|
||||
.PHONY: clean distclean
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue