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 --pretty=format:%ad`
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/.function..jQuery...{//' | \
60 sed 's/}...jQuery..;//' | \
61 sed 's/Date:./&'"${DATE}"'/' | \
64 selector: ${DIST_DIR} init
65 @@echo "Building selector code from Sizzle"
66 @@sed '/EXPOSE/r src/sizzle-jquery.js' src/sizzle/sizzle.js | grep -v window.Sizzle > src/selector.js
69 @@echo "Checking jQuery against JSLint..."
70 @@${RHINO} build/jslint-check.js
75 @@echo "Building" ${JQ_MIN}
77 @@head -15 ${JQ} > ${JQ_MIN}
78 @@${MINJAR} --js ${JQ} --warning_level QUIET >> ${JQ_MIN}
81 @@echo "Removing Distribution directory:" ${DIST_DIR}
84 @@echo "Removing built copy of Sizzle"
85 @@rm -f src/selector.js
87 @@echo "Removing cloned directories"
88 @@rm -rf test/qunit src/sizzle