Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio_mebibou
Commits
922333a7
Commit
922333a7
authored
Aug 21, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile only used for query parser generation now
parent
baedd341
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
60 deletions
+2
-60
Makefile
Makefile
+2
-60
No files found.
Makefile
View file @
922333a7
# dir
JIO_DIR
=
src/jio
STORAGE_DIR
=
src/jio.storage
QUERIES_DIR
=
src/queries
# files
...
...
@@ -11,69 +9,13 @@ COMPLEX_MIN = complex_queries.min.js
PARSER_PAR
=
$(QUERIES_DIR)
/parser.par
PARSER_OUT
=
$(QUERIES_DIR)
/parser.js
## install npm package system wide -> npm -g install <package>
JSCC_CMD
=
node ./node_modules/jscc-node/jscc.js
-t
./node_modules/jscc-node/driver_node.js_
## js/cc using rhino
#JSCC_CMD = rhino ~/modules/jscc/jscc.js -t ~/modules/jscc/driver_web.js_
# sh -c 'cd ; npm install jscc-node'
JSCC_CMD
=
node ~/node_modules/jscc-node/jscc.js
-t
~/node_modules/jscc-node/driver_node.js_
# sh -c 'cd ; npm install jslint'
LINT_CMD
=
$(
shell
which jslint
||
echo
node ~/node_modules/jslint/bin/jslint.js
)
--terse
# sh -c 'cd ; npm install uglify-js'
UGLIFY_CMD
=
$(
shell
which uglifyjs
||
echo
node ~/node_modules/uglify-js/bin/uglifyjs
)
# sh -c 'cd ; npm install phantomjs'
PHANTOM_CMD
=
$(
shell
which phantomjs
||
echo
~/node_modules/phantomjs/bin/phantomjs
)
auto
:
compile
auto
:
compile build lint
build
:
concat uglify
# The order is important!
CONCAT_JIO_NAMES
=
intro exceptions jio.intro storages/
*
commands/
*
jobs
/status/
*
jobs
/job announcements/announcement activityUpdater announcements/announcer
jobs
/jobIdHandler
jobs
/jobManager
jobs
/jobRules jio.core jio.outro jioNamespace outro
CONCAT_STORAGE_NAMES
=
*
CONCAT_QUERIES_NAMES
=
begin parser-begin parser parser-end tool queryfactory query simplequery complexquery end
LINT_NAMES
=
exceptions storages/
*
commands/
*
jobs
/status/
*
jobs
/
*
announcements/
*
activityUpdater jio.core jioNamespace
CONCAT_QUERIES_FILES
=
$
(
CONCAT_QUERIES_NAMES:%
=
$(QUERIES_DIR)
/%.js
)
CONCAT_JIO_FILES
=
$
(
CONCAT_JIO_NAMES:%
=
$(JIO_DIR)
/%.js
)
LINT_FILES
=
$
(
LINT_NAMES:%
=
$(JIO_DIR)
/%.js
)
$
(
CONCAT_STORAGE_NAMES:%
=
$(STORAGE_DIR)
/%.js
)
test
/jio/
*
.js
test
/jio.storage/
*
.js
test
/queries/
*
.js
# build parser.js
compile
:
#
############################## Compile Query Parser ##############################
$(JSCC_CMD)
-o
$(PARSER_OUT)
$(PARSER_PAR)
# concat source files into jio.js and complex-queries.js
concat
:
#
############################## Concat JIO and Queries ##############################
cat
$(CONCAT_JIO_FILES)
>
"
$(JIO)
"
cat
$(CONCAT_QUERIES_FILES)
>
"
$(COMPLEX)
"
# uglify into jio.min.js and complex.min.js
uglify
:
#
############################## Uglify JIO and Queries ##############################
$(UGLIFY_CMD)
"
$(JIO)
"
>
"
$(JIO_MIN)
"
$(UGLIFY_CMD)
"
$(COMPLEX)
"
>
"
$(COMPLEX_MIN)
"
# lint all files in JIO and STORAGE and QUERIES DIR
# command: jslint [options] file
# [options] are defined at the top of the source file:
# Example:
# /*jslint indent: 2, maxlen: 80 */
# /*global hex_sha256: true, jQuery: true */
lint
:
#
############################## Lint All files ##############################
echo
;
a
=
"
$$
(
$(LINT_CMD)
$(LINT_FILES)
)"
;
[
$$
?
!=
0
]
&&
echo
"
$$
a"
|
grep
-v
'OK\.$$'
|
uniq
&&
false
phantom
:
#
############################## Phantom ##############################
$(PHANTOM_CMD)
test/run-qunit.js
test/jiotests_withoutrequirejs.html
|
awk
'BEGIN {print "<!DOCTYPE html><html>"} /^<head>$$/, /^<\/body>$$/ {print} END {print "</html>"}'
|
sed
-e
's,^ *<\(/\|\)script.*>$$,,g'
>
test/unit_test_result.html
grep
'^ <title>✔ '
test/unit_test_result.html
>
/dev/null
.phony
:
clean
clean
:
find
-name
'*~'
-delete
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment