-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (65 loc) · 1.5 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
include config.mak
default: install
all: capim.js
SRC:=json2.js \
utils.js \
compat.js \
persistence.js \
dconsole.js \
combinacoes.js \
materias.js \
display.js \
combobox.js \
database.js \
state.js \
versao.js \
widgets.js \
ui_avisos.js \
ui_campus.js \
ui_combinacoes.js \
ui_horario.js \
ui_logger.js \
ui_materias.js \
ui_planos.js \
ui_saver.js \
ui_turmas.js \
ui_updates.js \
main.js
.PHONY: install
SRC:=$(addprefix js/,$(SRC))
%.gz: %
gzip --best --no-name -c frontend/$< > frontend/$@
ifeq ($(RELEASE),1)
sed_RELEASE=-e "s/if(0)/if(1)/"
endif
capim.js: $(SRC)
ifeq ($(RELEASE),1)
closure --compilation_level=SIMPLE_OPTIMIZATIONS $(addprefix --js=,$(SRC)) --js_output_file=$@
else
cat $^ > $@
endif
clean::
rm -rf capim.js index.html
rm -rf ${SITE_PATH}
rm -f $(addsuffix /*~,. c db html js py) .htaccess~ .gitignore~
rm -f capim.css.gz capim.js.gz index.html.gz
distclean: clean
rm -f .htaccess
rm -f config.mak
install-gz:: install capim.css.gz capim.js.gz index.html.gz
@echo "Installing GZ files..."
ifndef SITE_PATH
@echo "Please, set SITE_PATH variable to output directory."
@exit 1
endif
install:: all
@echo "Installing..."
ifndef SITE_PATH
@echo "Please, set SITE_PATH variable to output directory."
@exit 1
endif
mkdir -p ${SITE_PATH}
cp favicon.ico capim.css ${SITE_PATH}/
mv capim.js ${SITE_PATH}/
cp html/capim.html ${SITE_PATH}/index.html
cp .htaccess ${SITE_PATH}/