The-Backbone-Store/Makefile

71 lines
1.5 KiB
Makefile
Raw Normal View History

.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:
2016-04-05 20:52:44 +00:00
mkdir -p thestore/lib
2016-04-05 20:40:44 +00:00
bower install jquery backbone underscore
2016-04-05 20:52:44 +00:00
cp bower_components/backbone/backbone.js thestore/lib
cp bower_components/jquery/dist/jquery.js thestore/lib
cp bower_components/underscore/underscore.js thestore/lib
2016-04-05 20:40:44 +00:00
npm install
2016-04-05 20:52:44 +00:00
serve:
./node_modules/.bin/http-server thestore/
.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
@ $(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
2016-04-05 20:52:44 +00:00
- rm -fr bower_components node_modules thestore/lib