Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

This Makefile required a js executable.

Decided to use rhino for now.
  • Loading branch information...
commit 02763b0dad050a061051f26b6ed5dcdd838ffd5f 1 parent 59ea5fd
@ingydotnet authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/js/Makefile
View
11 src/js/Makefile
@@ -1,7 +1,7 @@
-.PHONY: check fetch compact clean
+.PHONY: got_rhino check fetch compact clean
CURL := curl
-JS := js
+JS := $(shell which rhino)
JAVA := java
RM := rm
@@ -9,8 +9,13 @@ DOT_JS := ajax-jquery.js ajax-xhr.js ajax-yui.js json-json2-internal.js json-jso
DOT_COMPACT_JS := $(DOT_JS:%.js=%.compact.js)
+all: got_rhino check
+
check: $(DOT_COMPACT_JS) $(DOT_JS)
- for file in $^; do js -e "window = { Function: { prototype: {} }, document: {} }; Jemplate = {};" -swC $$file && echo $$file pass; done
+ for file in $^; do $(JS) -e "window={Function:{prototype:{}},document:{}};Jemplate={};" $$file && echo $$file pass; done
+
+got_rhino:
+ @if [ -z "$(JS)" ]; then echo "ERROR: The 'rhino' executable is required"; exit 1; fi
compact: $(DOT_COMPACT_JS)
Please sign in to comment.
Something went wrong with that request. Please try again.