-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
61 lines (43 loc) · 1.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.PHONY: themes jsapi doc mimes theme jscode all js
MIMES_FILES=$(shell cd objects && ./compiler.py ls)
help:
@echo ""
@echo "Targets:"
@echo ""
@echo " themes: build 'static/css/theme.css' from 'themes/' (requires lessc -- see default.less file)"
@echo " doc: Build Sphinx doc"
@echo " js: **jsapi + jscode"
@echo " jsapi: extract reST text from 'static/application.js' and save it to 'doc/source/dev/'"
@echo " jscode: *Generate static/nano.js code from src/jscode folder, including mimes/ information"
@echo " mimes: Update changes made into objects folder"
@echo " all: all at once"
@echo ""
@echo " ** In order to debug, run 'JSMIN=cat make js' instead of 'make js'"
JSAPI=doc/source/dev/jsapi.rst
JSFILES=src/jscode/jsbase.js src/jscode/startup.js src/jscode/templates.js src/jscode/resources.js src/jscode/ui.js src/jscode/core.js
JSMIN?=jsmin
theme: themes
themes:
cd themes && make
@ echo "################# DONE: themes #################"
js: jsapi jscode
@ echo "################# DONE: Javascript #################"
jsapi: ${JSAPI}
@ echo "################# DONE: Javascript API #################"
jscode: static/nano.js
@ echo "################# DONE: Javascript Code (minify) #################"
static/nano.js: ${JSFILES} objects/mimes.js
cat $^ | ${JSMIN} > $@
objects/mimes.js: ${MIMES_FILES}
(cd objects && ./compiler.py)
mimes: objects/mimes.js
@echo "################# DONE: Mime types database #################"
doc: jsapi
@(cd doc && make html)
@echo "################# DONE: Documentation #################"
src/jscode/body.rst: ${JSFILES}
@echo "################# Generating Documentation content #################"
./_makejsdoc.sh $^ > $@
${JSAPI}: src/jscode/head.rst src/jscode/body.rst src/jscode/tail.rst
cat $^ > $@
all: mimes themes js doc