forked from arangodb/arangodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.files
161 lines (138 loc) · 8.61 KB
/
Makefile.files
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# -*- mode: Makefile; -*-
## -----------------------------------------------------------------------------
## --SECTION-- JAVASCRIPT
## -----------------------------------------------------------------------------
################################################################################
### @brief JavaScript modules for browser
################################################################################
JAVASCRIPT_BROWSER = \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/index.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/arango-collection.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/arango-database.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/arango-query-cursor.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/arango-statement.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/arangosh.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/general-graph.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/graph.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/graph-blueprint.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/is.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/simple-query.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/tutorial.js \
\
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/common.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/arango-collection-common.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/arango-statement-common.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/graph-common.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/graph/traversal.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/aql/explainer.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/aql/functions.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/aql/queries.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/mimetypes.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/replication.js \
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/simple-query-common.js \
\
js/apps/system/_admin/aardvark/APP/frontend/js/bootstrap/modules/internal.js \
js/apps/system/_admin/aardvark/APP/frontend/js/bootstrap/modules/console.js \
js/apps/system/_admin/aardvark/APP/frontend/js/bootstrap/errors.js \
js/apps/system/_admin/aardvark/APP/frontend/js/bootstrap/monkeypatches.js \
\
js/apps/system/_admin/aardvark/APP/frontend/js/client/client.js \
js/apps/system/_admin/aardvark/APP/frontend/js/client/bootstrap/modules/internal.js
BUILT_SOURCES += $(JAVASCRIPT_BROWSER)
################################################################################
### @brief files for jslint
################################################################################
JAVASCRIPT_JSLINT = \
`find @srcdir@/js/actions -name "*.js"` \
`find @srcdir@/js/common/bootstrap -name "*.js"` \
`find @srcdir@/js/client/bootstrap -name "*.js"` \
`find @srcdir@/js/server/bootstrap -name "*.js"` \
\
`find @srcdir@/js/common/modules/@arangodb -name "*.js"` \
`find @srcdir@/js/client/modules/@arangodb -name "*.js"` \
`find @srcdir@/js/server/modules/@arangodb -name "*.js"` \
`find @srcdir@/js/server/tests -name "*.js" | grep -v "ranges-combined"` \
`find @srcdir@/js/common/tests -name "*.js"` \
`find @srcdir@/js/client/tests -name "*.js"` \
\
`find @srcdir@/js/apps/system/_system/cerberus/APP -name "*.js"` \
`find @srcdir@/js/apps/system/_api/gharial/APP -name "*.js"` \
`find @srcdir@/js/apps/system/_system/sessions/APP -name "*.js"` \
`find @srcdir@/js/apps/system/_system/simple-auth/APP -name "*.js"` \
`find @srcdir@/js/apps/system/_system/users/APP -name "*.js"` \
\
`find @srcdir@/js/apps/system/_admin/aardvark/APP/frontend/js/models -name "*.js"` \
`find @srcdir@/js/apps/system/_admin/aardvark/APP/frontend/js/views -name "*.js"` \
`find @srcdir@/js/apps/system/_admin/aardvark/APP/frontend/js/collections -name "*.js"` \
`find @srcdir@/js/apps/system/_admin/aardvark/APP/frontend/js/routers -name "*.js"` \
`find @srcdir@/js/apps/system/_admin/aardvark/APP/frontend/js/arango -name "*.js"` \
`find @srcdir@/js/apps/system/_admin/aardvark/APP/frontend/js/shell -name "*.js"` \
`find @srcdir@/js/apps/system/_admin/aardvark/APP/test/specs -name "*.js"` \
`find @srcdir@/js/apps/system/_admin/aardvark/APP/test/clusterSpecs -name "*.js"` \
\
`find @srcdir@/scripts -name "*.js"` \
\
@srcdir@/js/common/modules/jsunity.js \
@srcdir@/js/client/client.js \
@srcdir@/js/server/server.js \
@srcdir@/js/server/upgrade-database.js \
\
@srcdir@/js/apps/system/_admin/aardvark/APP/frontend/js/shell/browser.js
################################################################################
### @brief executes jslint
################################################################################
.PHONY: jslint jshint
jslint:
@RESULT=0; \
FILELIST=""; \
for file in $(JAVASCRIPT_JSLINT); do FILELIST="$$FILELIST --jslint $$file"; done; \
@builddir@/bin/arangosh \
-c none \
--log.level error \
--server.password "" \
--javascript.startup-directory @srcdir@/js \
$$FILELIST; \
if [ "$$?x" != "0x" ]; then RESULT=1; fi; \
exit $$RESULT
jshint: jslint
gitjslint:
if test "`git status --short | grep '^\(.[MAU]\|[MAU].\) .*js$$' | wc -l`" -eq 0; then \
exit 0; \
fi
for file in ` git status --short | grep '^\(.[MAU]\|[MAU].\) .*js$$' | cut -d " " -f 3`; do \
bin/arangosh -c etc/relative/arangosh.conf --jslint $$file || exit 1; \
done
################################################################################
### @brief sets up the directories
################################################################################
BUILT_SOURCES += @builddir@/.setup-js-directories
@builddir@/.setup-js-directories:
@test -d js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/graph || mkdir -p js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/graph
@test -d js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/common/arangodb/aql || mkdir -p js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/@arangodb/aql
@test -d js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/aql || mkdir -p js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/@arangodb/aql
@test -d js/apps/system/_admin/aardvark/APP/frontend/js/bootstrap || mkdir -p js/apps/system/_admin/aardvark/APP/frontend/js/bootstrap
@test -d js/apps/system/_admin/aardvark/APP/frontend/js/client/bootstrap || mkdir -p js/apps/system/_admin/aardvark/APP/frontend/js/client/bootstrap
@touch $@
################################################################################
### @brief copy JavaScript files
################################################################################
js/apps/system/_admin/aardvark/APP/frontend/js/bootstrap/%.js: @srcdir@/js/common/bootstrap/%.js .setup-js-directories
cat $< > $@
js/apps/system/_admin/aardvark/APP/frontend/js/client/bootstrap/%.js: @srcdir@/js/client/bootstrap/%.js .setup-js-directories
cat $< > $@
js/apps/system/_admin/aardvark/APP/frontend/js/client/%.js: @srcdir@/js/client/%.js .setup-js-directories
cat $< > $@
################################################################################
### @brief converts JavaScript files to header files
################################################################################
js/apps/system/_admin/aardvark/APP/frontend/js/modules/common/%.js: @srcdir@/js/common/modules/%.js .setup-js-directories
(echo "module.define(\"$(patsubst js/common/modules/%.js,%,$<)\", function(exports, module) {" && cat $< && echo "});") > $@
js/apps/system/_admin/aardvark/APP/frontend/js/modules/client/%.js: @srcdir@/js/client/modules/%.js .setup-js-directories
(echo "module.define(\"$(patsubst js/client/modules/%.js,%,$<)\", function(exports, module) {" && cat $< && echo "});") > $@
## -----------------------------------------------------------------------------
## --SECTION-- END-OF-FILE
## -----------------------------------------------------------------------------
## Local Variables:
## mode: outline-minor
## outline-regexp: "### @brief\\|## --SECTION--\\|# -\\*- "
## End: