5 DIST_DIR = ${PREFIX}/dist
7 BASE_FILES = ${SRC_DIR}/core.js\
11 ${SRC_DIR}/attributes.js\
13 ${SRC_DIR}/selector.js\
14 ${SRC_DIR}/traversing.js\
15 ${SRC_DIR}/manipulation.js\
18 ${SRC_DIR}/effects.js\
20 ${SRC_DIR}/dimensions.js
22 MODULES = ${SRC_DIR}/intro.js\
26 JQ = ${DIST_DIR}/jquery.js
27 JQ_MIN = ${DIST_DIR}/jquery.min.js
29 JQ_VER = `cat version.txt`
30 VER = sed s/@VERSION/${JQ_VER}/
32 RHINO = java -jar ${BUILD_DIR}/js.jar
33 MINJAR = java -jar ${BUILD_DIR}/google-compiler-20091218.jar
35 DATE=`git log -1 | grep Date: | sed 's/[^:]*: *//'`
38 @@echo "jQuery build complete."
41 @@mkdir -p ${DIST_DIR}
44 @@echo "Grabbing external dependencies..."
45 @@if test ! -d test/qunit/.git; then git clone git://github.com/jquery/qunit.git test/qunit; fi
46 @@if test ! -d src/sizzle/.git; then git clone git://github.com/jeresig/sizzle.git src/sizzle; fi
47 - @@cd src/sizzle && git pull origin master > /dev/null 2>&1
48 - @@cd test/qunit && git pull origin master > /dev/null 2>&1
50 jquery: ${DIST_DIR} selector ${JQ}
53 ${JQ}: selector ${MODULES}
54 @@echo "Building" ${JQ}
56 @@mkdir -p ${DIST_DIR}
59 sed 's/Date:./&'"${DATE}"'/' | \
62 selector: ${DIST_DIR} init
63 @@echo "Building selector code from Sizzle"
64 @@sed '/EXPOSE/r src/sizzle-jquery.js' src/sizzle/sizzle.js | grep -v window.Sizzle > src/selector.js
67 @@echo "Checking jQuery against JSLint..."
68 @@${RHINO} build/jslint-check.js
73 @@echo "Building" ${JQ_MIN}
75 @@head -15 ${JQ} > ${JQ_MIN}
76 @@${MINJAR} --js ${JQ} --warning_level QUIET >> ${JQ_MIN}
79 @@echo "Removing Distribution directory:" ${DIST_DIR}
82 @@echo "Removing built copy of Sizzle"
85 @@echo "Removing cloned directories"
86 @@rm -rf test/qunit src/sizzle