From: Daniel Brooks Date: Tue, 22 Feb 2011 23:13:21 +0000 (-0600) Subject: merge with annasob/0.4 X-Git-Tag: v0.4~33^2~1^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=695877e857ff3e3c41c8be2913854e320df0d849;p=popcorn-js.git merge with annasob/0.4 --- 695877e857ff3e3c41c8be2913854e320df0d849 diff --cc Makefile index c1f9f49,7420743..c820f1d mode 100755,100644..100644 --- a/Makefile +++ b/Makefile @@@ -18,7 -21,20 +21,20 @@@ POPCORN_SRC = ${PREFIX}/popcorn.j POPCORN_DIST = ${DIST_DIR}/popcorn.js POPCORN_MIN = ${DIST_DIR}/popcorn.min.js - all: popcorn min lint lint-plugins + # plugins + PLUGINS_DIST = ${DIST_DIR}/popcorn.plugins.js + PLUGINS_MIN = ${DIST_DIR}/popcorn.plugins.min.js + + # Grab all popcorn..js files from plugins dir + PLUGINS_SRC := $(filter-out %unit.js, $(shell find ${PLUGINS_DIR} -name 'popcorn.*.js' -print)) + + # popcorn + plugins + POPCORN_COMPLETE_LIST := --js ${POPCORN_SRC} $(shell for js in ${PLUGINS_SRC} ; do echo --js $$js ; done) + POPCORN_COMPLETE_DIST = ${DIST_DIR}/popcorn-complete.js + POPCORN_COMPLETE_MIN = ${DIST_DIR}/popcorn-complete.min.js + + -all: lint popcorn plugins min complete ++all: lint lint-plugins popcorn plugins min complete @@echo "Popcorn build complete." ${DIST_DIR}: @@@ -38,20 -50,29 +50,33 @@@ min: ${POPCORN_MIN} ${PLUGINS_MIN} ${PO ${POPCORN_MIN}: ${POPCORN_DIST} @@echo "Building" ${POPCORN_MIN} + $(call compile, --js ${POPCORN_DIST}, ${POPCORN_MIN}) - @@head -0 ${POPCORN_DIST} > ${POPCORN_MIN} - @@${MINJAR} --js ${POPCORN_DIST} --warning_level QUIET --js_output_file ${POPCORN_MIN}.tmp - @@cat ${POPCORN_MIN}.tmp >> ${POPCORN_MIN} - @@rm -f ${POPCORN_MIN}.tmp - + ${POPCORN_COMPLETE_MIN}: ${POPCORN_SRC} ${PLUGINS_SRC} ${DIST_DIR} + @@echo "Building" ${POPCORN_COMPLETE_MIN} + @@$(call compile, ${POPCORN_COMPLETE_LIST}, ${POPCORN_COMPLETE_MIN}) + + plugins: ${PLUGINS_DIST} + + ${PLUGINS_MIN}: ${PLUGINS_DIST} + @@echo "Building" ${PLUGINS_MIN} + $(call compile, $(shell for js in ${PLUGINS_SRC} ; do echo --js $$js ; done), ${PLUGINS_MIN}) + + ${PLUGINS_DIST}: ${PLUGINS_SRC} ${DIST_DIR} + @@echo "Building ${PLUGINS_DIST}" + @@cat ${PLUGINS_SRC} > ${PLUGINS_DIST} + + complete: ${POPCORN_SRC} ${PLUGINS_SRC} ${DIST_DIR} + @@echo "Building popcorn + plugins" + @@cat ${POPCORN_SRC} ${PLUGINS_SRC} > ${POPCORN_COMPLETE_DIST} -lint: ${POPCORN_DIST} +lint: @@echo "Checking Popcorn against JSLint..." - @@${RHINO} build/jslint-check.js + @@${RHINO} build/jslint-check.js popcorn.js + +lint-plugins: + @@echo "Checking all plugins against JSLint..." + @@${RHINO} build/jslint-check.js ${PLUGINS_SRC} clean: @@echo "Removing Distribution directory:" ${DIST_DIR}