-${JQ_MIN}: ${JQ}
- @@echo "Building" ${JQ_MIN}
-
- @@head -$(shell grep -m 1 -n '*/' ${JQ} | cut -f1 -d:) ${JQ} > ${JQ_MIN}
- @@${MINJAR} --js ${JQ} --warning_level QUIET --js_output_file ${JQ_MIN}
+${JQ_MIN}: jquery
+ @@if test ! -z ${JS_ENGINE}; then \
+ echo "Minifying jQuery" ${JQ_MIN}; \
+ ${COMPILER} ${JQ} > ${JQ_MIN}.tmp; \
+ sed '$ s#^\( \*/\)\(.\+\)#\1\n\2;#' ${JQ_MIN}.tmp > ${JQ_MIN}; \
+ rm -rf ${JQ_MIN}.tmp; \
+ else \
+ echo "You must have NodeJS installed in order to minify jQuery."; \
+ fi
+