forked from signalpoint/DrupalGap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile_full
110 lines (101 loc) · 3.6 KB
/
makefile_full
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# To run this makefile, you must have all the necessary tools installed.
#
# To install all the necessary tools, simply run the following...
#
# sudo make -B tools
#
# Create the list of files
lintfiles = src/drupalgap.js\
src/includes/autocomplete.inc.js\
src/includes/block.inc.js\
src/includes/common.inc.js\
src/includes/form.elements.inc.js\
src/includes/form.inc.js\
src/includes/form.submission.inc.js\
src/includes/form.theme.inc.js\
src/includes/go.inc.js\
src/includes/page.inc.js\
src/includes/region.inc.js\
src/includes/menu.inc.js\
src/includes/theme.inc.js\
src/includes/title.inc.js\
src/modules/comment/comment.js\
src/modules/contact/contact.js\
src/modules/entity/entity.js\
src/modules/field/field.js\
src/modules/file/file.js\
src/modules/image/image.js\
src/modules/menu/menu.js\
src/modules/mvc/mvc.js\
src/modules/node/node.js\
src/modules/search/search.js\
src/modules/services/services.js\
src/modules/system/system.js\
src/modules/user/user.js\
src/modules/user/user.forms.js\
src/modules/taxonomy/taxonomy.js\
src/modules/views/views.js\
files = src/drupalgap.js\
src/includes/autocomplete.inc.js\
src/includes/block.inc.js\
src/includes/common.inc.js\
src/includes/form.elements.inc.js\
src/includes/form.inc.js\
src/includes/form.submission.inc.js\
src/includes/form.theme.inc.js\
src/includes/go.inc.js\
src/includes/page.inc.js\
src/includes/region.inc.js\
src/includes/menu.inc.js\
src/includes/theme.inc.js\
src/includes/title.inc.js\
src/modules/comment/comment.js\
src/modules/contact/contact.js\
src/modules/entity/entity.js\
src/modules/field/field.js\
src/modules/file/file.js\
src/modules/image/image.js\
src/modules/menu/menu.js\
src/modules/mvc/mvc.js\
src/modules/node/node.js\
src/modules/search/search.js\
src/modules/services/services.js\
src/modules/system/system.js\
src/modules/user/user.js\
src/modules/user/user.forms.js\
src/modules/taxonomy/taxonomy.js\
src/modules/views/views.js\
.DEFAULT_GOAL := all
all: jslint js
# Perform a jsLint on all the files.
jslint: ${lintfiles}
gjslint $^
# Create an aggregated js file and a compressed js file.
js: ${files}
@echo "Generating aggregated bin/drupalgap.js file"
@cat > bin/drupalgap.js $^
# @echo "Generating compressed bin/drupalgap.min.js file"
# curl -s \
# -d compilation_level=SIMPLE_OPTIMIZATIONS \
# -d output_format=text \
# -d output_info=compiled_code \
# --data-urlencode "js_code@bin/drupalgap.js" \
# http://closure-compiler.appspot.com/compile \
# > bin/drupalgap.min.js
# Create the documentation from source code.
jsdoc: ${files}
@echo "Generating documetation."
@java -jar tools/jsdoc-toolkit/jsrun.jar tools/jsdoc-toolkit/app/run.js -a -t=tools/jsdoc-toolkit/templates/jsdoc -d=doc $^
# Fix the js style on all the files.
fixjsstyle: ${files}
fixjsstyle $^
# Install the necessary tools.
tools:
apt-get install python-setuptools
apt-get install unzip
easy_install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
wget http://jsdoc-toolkit.googlecode.com/files/jsdoc_toolkit-2.4.0.zip -P tools
unzip tools/jsdoc_toolkit-2.4.0.zip -d tools
mv tools/jsdoc_toolkit-2.4.0/jsdoc-toolkit tools/jsdoc-toolkit
rm -rd tools/jsdoc_toolkit-2.4.0
rm tools/jsdoc_toolkit-2.4.0.zip