Add 'version' target for javascript.

This commit is contained in:
Oliver Buchtala 2014-03-06 06:29:00 +01:00
commit 57491eaa81
2 changed files with 40 additions and 13 deletions

View file

@ -656,7 +656,40 @@ javascript_run: javascript_custom_interpreter
# TODO: make node configurable and detected via ./configure
javascript_run_node:
node runme.js
@NODEJS@ runme.js
# -----------------------------------------------------------------
# Version display
# -----------------------------------------------------------------
ifeq (, $(ENGINE))
javascript_version:
@ if [ "@NODEJS@" != "" ]; then \
echo "Node.js: `(@NODEJS@ --version)`"; \
else \
echo "Version depends on the interpreter"; \
fi
endif
ifeq (node, $(ENGINE))
javascript_version:
@NODEJS@ --version
endif
ifeq (jsc, $(ENGINE))
javascript_version:
@ if [ "@JSCOREVERSION@" != "" ]; then \
echo "@JSCOREVERSION@"; \
else \
echo "Unknown JavascriptCore version."; \
fi
endif
ifeq (v8, $(ENGINE))
javascript_version:
echo "Unknown v8 version."
endif
# -----------------------------------------------------------------
# Cleaning the javascript examples