diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/makefile | 16 |
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 | |||
11 | HTMopts+= --smart --mathml --section-divs | 11 | HTMopts+= --smart --mathml --section-divs |
12 | RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt)) | 12 | RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt)) |
13 | RIVopts = | 13 | RIVopts = |
14 | LOZENGE = ../js/lozenge.js | ||
15 | LOZupd = ../js/update-lozenge.sh | ||
14 | 16 | ||
15 | # Do everything | 17 | # Do everything |
16 | all : $(HTMLs) $(RIVERs) | 18 | .PHONY: all |
19 | all : $(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 | 29 | lozenge : $(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 | ||