about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2015-03-24 16:36:16 -0700
committerCase Duckworth2015-03-24 16:37:16 -0700
commit6c4eee52793bd93516516815604feac0793744fe (patch)
tree6e9ce7bc3051f3ade620197bbad21a6e468aa246
parentMakefile v.01 is alive (diff)
downloadautocento-6c4eee52793bd93516516815604feac0793744fe.tar.gz
autocento-6c4eee52793bd93516516815604feac0793744fe.zip
Update Makefile to handle lozenge.js
-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