From: David Humphrey Date: Thu, 17 Mar 2011 19:10:34 +0000 (-0400) Subject: Makefile changes for players, complete, lint-players [ticket #420]. X-Git-Tag: v0.4~4^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=df98c221a14612e5eaa0c45c5956accdfee79d71;p=popcorn-js.git Makefile changes for players, complete, lint-players [ticket #420]. --- diff --git a/Makefile b/Makefile index 6648241..c4b0e93 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ BUILD_DIR = ${PREFIX}/build DIST_DIR = ${PREFIX}/dist PLUGINS_DIR = ${PREFIX}/plugins PARSERS_DIR = ${PREFIX}/parsers +PLAYERS_DIR = ${PREFIX}/players #Version VERSION ?= $(error Specify a version for your release (e.g., VERSION=0.5)) @@ -33,21 +34,29 @@ PLUGINS_MIN = ${DIST_DIR}/popcorn.plugins.min.js PARSERS_DIST = ${DIST_DIR}/popcorn.parsers.js PARSERS_MIN = ${DIST_DIR}/popcorn.parsers.min.js +# players +PLAYERS_DIST = ${DIST_DIR}/popcorn.players.js +PLAYERS_MIN = ${DIST_DIR}/popcorn.players.min.js + # Grab all popcorn..js files from plugins dir PLUGINS_SRC := $(filter-out %unit.js, $(shell find ${PLUGINS_DIR} -name 'popcorn.*.js' -print)) # Grab all popcorn..js files from plugins dir PARSERS_SRC := $(filter-out %unit.js, $(shell find ${PARSERS_DIR} -name 'popcorn.*.js' -print)) +# Grab all popcorn..js files from players dir +PLAYERS_SRC := $(filter-out %unit.js, $(shell find ${PLAYERS_DIR} -name 'popcorn.*.js' -print)) + # popcorn + plugins POPCORN_COMPLETE_LIST := --js ${POPCORN_SRC} \ $(shell for js in ${PLUGINS_SRC} ; do echo --js $$js ; done) \ - $(shell for js in ${PARSERS_SRC} ; do echo --js $$js ; done) + $(shell for js in ${PARSERS_SRC} ; do echo --js $$js ; done) \ + $(shell for js in ${PLAYERS_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 lint-plugins lint-parsers popcorn plugins parsers complete min +all: lint lint-plugins lint-parsers lint-players popcorn plugins parsers players complete min @@echo "Popcorn build complete." ${DIST_DIR}: @@ -58,8 +67,8 @@ popcorn: ${POPCORN_DIST} ${POPCORN_DIST}: ${POPCORN_SRC} | ${DIST_DIR} @@echo "Building" ${POPCORN_DIST} @@cat ${POPCORN_SRC} | sed -e 's/@VERSION/${VERSION}/' > ${POPCORN_DIST} - -min: ${POPCORN_MIN} ${PLUGINS_MIN} ${PARSERS_MIN} ${POPCORN_COMPLETE_MIN} + +min: ${POPCORN_MIN} ${PLUGINS_MIN} ${PARSERS_MIN} ${PLAYERS_MIN} ${POPCORN_COMPLETE_MIN} ${POPCORN_MIN}: ${POPCORN_DIST} @@echo "Building" ${POPCORN_MIN} @@ -89,9 +98,19 @@ ${PARSERS_DIST}: ${PARSERS_SRC} ${DIST_DIR} @@echo "Building ${PARSERS_DIST}" @@cat ${PARSERS_SRC} > ${PARSERS_DIST} -complete: ${POPCORN_SRC} ${PLUGINS_SRC} ${DIST_DIR} - @@echo "Building popcorn + plugins + parsers" - @@cat ${POPCORN_SRC} ${PLUGINS_SRC} ${PARSERS_SRC} | sed -e 's/@VERSION/${VERSION}/' > ${POPCORN_COMPLETE_DIST} +players: ${PLAYERS_DIST} + +${PLAYERS_MIN}: ${PLAYERS_DIST} + @@echo "Building" ${PLAYERS_MIN} + $(call compile, $(shell for js in ${PLAYERS_SRC} ; do echo --js $$js ; done), ${PLAYERS_MIN}) + +${PLAYERS_DIST}: ${PLAYERS_SRC} ${DIST_DIR} + @@echo "Building ${PLAYERS_DIST}" + @@cat ${PLAYERS_SRC} > ${PLAYERS_DIST} + +complete: ${POPCORN_SRC} ${PARSERS_SRC} ${PLUGINS_SRC} ${PLAYERS_SRC} ${DIST_DIR} + @@echo "Building popcorn + plugins + parsers + players" + cat ${POPCORN_SRC} ${PLUGINS_SRC} ${PARSERS_SRC} ${PLAYERS_SRC} | sed -e 's/@VERSION/${VERSION}/' > ${POPCORN_COMPLETE_DIST} lint: @@echo "Checking Popcorn against JSLint..." @@ -105,6 +124,10 @@ lint-parsers: @@echo "Checking all parsers against JSLint..." @@${RHINO} build/jslint-check.js ${PARSERS_SRC} +lint-players: + @@echo "Checking all players against JSLint..." + @@${RHINO} build/jslint-check.js ${PLAYERS_SRC} + clean: @@echo "Removing Distribution directory:" ${DIST_DIR} @@rm -rf ${DIST_DIR}