2011-02-04 03:15:16 +00:00
|
|
|
.SUFFIXES: .nw .js .pdf .html .tex
|
|
|
|
|
|
|
|
NOTANGLE= notangle
|
|
|
|
NOWEAVE= noweave
|
|
|
|
ECHO= /bin/echo
|
|
|
|
|
|
|
|
all: index.html store.js
|
|
|
|
|
2016-04-05 20:40:44 +00:00
|
|
|
init:
|
|
|
|
bower install jquery backbone underscore
|
|
|
|
npm install
|
|
|
|
|
2011-02-04 03:15:16 +00:00
|
|
|
.nw.html:
|
|
|
|
$(NOWEAVE) -filter l2h -delay -x -index -autodefs c -html $*.nw > $*.html
|
|
|
|
|
|
|
|
.nw.tex:
|
|
|
|
$(NOWEAVE) -x -delay $*.nw > $*.tex #$
|
|
|
|
|
|
|
|
.tex.pdf:
|
|
|
|
xelatex $*.tex; \
|
|
|
|
while grep -s 'Rerun to get cross-references right' $*.log; \
|
|
|
|
do \
|
|
|
|
xelatex *$.tex; \
|
|
|
|
done
|
|
|
|
|
|
|
|
.nw.js:
|
|
|
|
@ $(ECHO) $(NOTANGLE) -c -R$@ $<
|
|
|
|
@ - $(NOTANGLE) -c -R$@ $< > $*.nw-js-tmp
|
|
|
|
@ if [ -s "$*.nw-js-tmp" ]; then \
|
|
|
|
mv $*.nw-js-tmp $@; \
|
|
|
|
else \
|
|
|
|
echo "$@ not found in $<"; \
|
|
|
|
rm $*.nw-js-tmp; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
store.js: backbonestore.nw
|
|
|
|
@ $(ECHO) $(NOTANGLE) -c -R$@ $<
|
|
|
|
@ - $(NOTANGLE) -c -R$@ $< > $*.nw-html-tmp
|
|
|
|
@ if [ -s "$*.nw-html-tmp" ]; then \
|
|
|
|
mv $*.nw-html-tmp $@; \
|
|
|
|
else \
|
|
|
|
echo "$@ not found in $<"; \
|
|
|
|
rm $*.nw-tmp; \
|
|
|
|
fi
|
|
|
|
|
2011-08-08 00:44:17 +00:00
|
|
|
index.html: backbonestore.nw
|
2011-02-04 03:15:16 +00:00
|
|
|
@ $(ECHO) $(NOTANGLE) -c -R$@ $<
|
|
|
|
@ - $(NOTANGLE) -c -R$@ $< > $*.nw-html-tmp
|
|
|
|
@ if [ -s "$*.nw-html-tmp" ]; then \
|
|
|
|
mv $*.nw-html-tmp $@; \
|
|
|
|
else \
|
|
|
|
echo "$@ not found in $<"; \
|
|
|
|
rm $*.nw-tmp; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
- rm -f *.tex *.dvi *.aux *.toc *.log *.out *.html *.js
|
|
|
|
|
|
|
|
realclean: clean
|
|
|
|
- rm -f *.pdf
|
|
|
|
|