about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/makefile b/src/makefile index 800f8a0..dc8835c 100644 --- a/src/makefile +++ b/src/makefile
@@ -11,9 +11,12 @@ HTMopts = --template=$(HTMLdir)/.template.html
11HTMopts+= --smart --mathml --section-divs 11HTMopts+= --smart --mathml --section-divs
12RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt)) 12RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt))
13RIVopts = 13RIVopts =
14LOZENGE = ../js/lozenge.js
15LOZupd = ../js/update-lozenge.sh
14 16
15# Do everything 17# Do everything
16all : $(HTMLs) $(RIVERs) 18.PHONY: all
19all : $(HTMLs) $(RIVERs) lozenge
17 20
18# Generic rule for HTML targets and Markdown sources 21# Generic rule for HTML targets and Markdown sources
19%.html : %.txt 22%.html : %.txt
@@ -23,5 +26,12 @@ all : $(HTMLs) $(RIVERs)
23%.river : %.txt 26%.river : %.txt
24 pandoc $< -f markdown -t $(LUAdir)/river.lua $(RIVopts) -o $(RIVdir)/$@ 27 pandoc $< -f markdown -t $(LUAdir)/river.lua $(RIVopts) -o $(RIVdir)/$@
25 28
26# TODO: add lozenge updating 29lozenge : $(HTMLdir)/$(HTMLs)
27# AND compiling hapax 30 @echo "Updating lozenge.js..."
31 @list=`ls $(HTMLdir)/*.html |\
32 sed -e 's,../,,g' |\
33 tr '\n' ' ' |\
34 sed -e 's/\(\S\+.html\) /"\1",/g'\
35 -e 's/^\(.*\),$$/var files=[\1]/'` &&\
36 sed -i "s/var files=.*/$$list/" $(LOZENGE)
37# TODO: add compiling hapax