about summary refs log tree commit diff stats
path: root/src/makefile
diff options
context:
space:
mode:
authorCase Duckworth2015-03-25 21:49:45 -0700
committerCase Duckworth2015-03-25 21:54:26 -0700
commitecda49e0b20ad3bd52449356dccf2f8095ecfb70 (patch)
tree4789dd035fa827edf280fd8234d014b171de1c38 /src/makefile
parentFix makefile re: RIVER crashing (diff)
downloadautocento-ecda49e0b20ad3bd52449356dccf2f8095ecfb70.tar.gz
autocento-ecda49e0b20ad3bd52449356dccf2f8095ecfb70.zip
Flatten directory structure
All content files (*.txt, *.html, *.river) are now in /.
I did this to simplify the compilation step, and to make
linking easier.  I'm still thinking about whether I should
move the contents of js/, img/, and lua/ into /, or into
an 'assets' folder of some sort.  We'll see.
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/makefile b/src/makefile deleted file mode 100644 index b637494..0000000 --- a/src/makefile +++ /dev/null
@@ -1,44 +0,0 @@
1# Produce HTML & RIVER outputs with pandoc
2# Case Duckworth | autocento.me
3# inspired by Lincoln Mullen | lincolnmullen.com
4
5# Define directories, file lists, and options
6HTMLdir = ..
7RIVdir = ../river
8LUAdir = ../lua
9HTMLs := $(patsubst %.txt,%.html,$(wildcard *.txt))
10HTMopts = --template=$(HTMLdir)/.template.html
11HTMopts+= --smart --mathml --section-divs
12RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt))
13RIVopts =
14LOZENGE = ../js/lozenge.js
15LOZupd = ../js/update-lozenge.sh
16
17# Do everything
18.PHONY: all html river lozenge
19all : html river lozenge
20html : $(HTMLs)
21river : $(RIVERs)
22lozenge : $(LOZENGE)
23
24# Generic rule for HTML targets and Markdown sources
25%.html : %.txt
26 pandoc $< -f markdown -t html5 $(HTMopts) -o $(HTMLdir)/$@
27
28# Generic rule for RIVER targets and Markdown sources
29%.river : %.txt
30 @echo River-ing $@
31 @sed -e '/^---$$/,/^...$$/d'\
32 -e "s/[^][A-Za-z0-9\/\"':.-]/ /g" $< |\
33 pandoc - -f markdown -t $(LUAdir)/river.lua $(RIVopts) -o $(RIVdir)/$@
34
35$(LOZENGE) : $(HTMLdir)/$(HTMLs)
36 @echo "Updating lozenge.js..."
37 @list=`ls $(HTMLdir)/*.html |\
38 sed -e 's,../,,g' |\
39 tr '\n' ' ' |\
40 sed -e 's/\(\S\+.html\) /"\1",/g'\
41 -e 's/^\(.*\),$$/var files=[\1]/'` &&\
42 sed -i "s/var files=.*/$$list/" $(LOZENGE)
43# TODO: add compiling hapax
44# TODO: add first line compiler