Permalink
Browse files

This Makefile required a js executable.

Decided to use rhino for now.
  • Loading branch information...
1 parent 59ea5fd commit 02763b0dad050a061051f26b6ed5dcdd838ffd5f @ingydotnet committed Jul 14, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/js/Makefile
View
11 src/js/Makefile
@@ -1,16 +1,21 @@
-.PHONY: check fetch compact clean
+.PHONY: got_rhino check fetch compact clean
CURL := curl
-JS := js
+JS := $(shell which rhino)
JAVA := java
RM := rm
DOT_JS := ajax-jquery.js ajax-xhr.js ajax-yui.js json-json2-internal.js json-json2.js json-yui.js json2.js kernel.js xhr-gregory.js xhr-ilinsky.js xxx.js
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)

0 comments on commit 02763b0

Please sign in to comment.