5 DOCS_DIR = ${PREFIX}/docs
6 TEST_DIR = ${PREFIX}/test
7 DIST_DIR = ${PREFIX}/dist
8 SPEED_DIR = ${PREFIX}/speed
11 BASE_FILES = ${SRC_DIR}/jquery/jquery.js\
12 ${SRC_DIR}/selector/selector.js\
13 ${SRC_DIR}/event/event.js\
14 ${SRC_DIR}/ajax/ajax.js\
17 PLUGINS = ${PLUG_DIR}/button/*\
20 ${PLUG_DIR}/dimensions/*\
21 ${PLUG_DIR}/metadata/*\
23 ${PLUG_DIR}/greybox/greybox.js\
24 ${PLUG_DIR}/interface/*\
26 ${PLUG_DIR}/tablesorter/*\
28 ${PLUG_DIR}/tooltip/jquery.tooltip.js\
29 ${PLUG_DIR}/accordion/jquery.accordion.js
31 MODULES = ${SRC_DIR}/intro.js\
35 MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
40 JQ = ${DIST_DIR}/jquery.js
41 JQ_LITE = ${DIST_DIR}/jquery.lite.js
42 JQ_MIN = ${DIST_DIR}/jquery.min.js
43 JQ_PACK = ${DIST_DIR}/jquery.pack.js
45 JQ_VER = `cat version.txt`
46 VER = sed s/@VERSION/${JQ_VER}/
48 JAR = java -jar ${BUILD_DIR}/js.jar
50 all: jquery lite min pack docs test speed
51 @@echo "jQuery build complete."
54 @@mkdir -p ${DIST_DIR}
56 jquery: ${DIST_DIR} ${JQ}
59 @@echo "Building" ${JQ}
61 @@mkdir -p ${DIST_DIR}
62 @@cat ${MODULES} | ${VER} > ${JQ};
67 with_plugins: ${MODULES_WITH_PLUGINS}
68 @@echo "Building" ${JQ}
70 @@mkdir -p ${DIST_DIR}
71 @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
79 @@echo "Building" ${JQ_LITE}
81 @@echo " - Removing ScriptDoc from" ${JQ}
82 @@${JAR} ${BUILD_DIR}/build/lite.js ${JQ} ${JQ_LITE}
84 @@echo ${JQ_LITE} "Built"
90 @@echo "Building" ${JQ_PACK}
92 @@echo " - Compressing using Packer"
93 @@${JAR} ${BUILD_DIR}/build/pack.js ${JQ} ${JQ_PACK}
95 @@echo ${JQ_PACK} "Built"
101 @@echo "Building" ${JQ_MIN}
103 @@echo " - Compressing using Minifier"
104 @@${JAR} ${BUILD_DIR}/build/min.js ${JQ} ${JQ_MIN}
106 @@echo ${JQ_MIN} "Built"
110 @@echo "Building Test Suite"
112 @@echo " - Making Test Suite Directory:" ${TEST_DIR}
113 @@mkdir -p ${TEST_DIR}
115 @@echo " - Removing any old tests"
116 @@rm -f ${TEST_DIR}/tests/*
118 @@echo " - Copying over script files."
119 @@cp -fR ${BUILD_DIR}/test/data ${TEST_DIR}/data
120 @@cp -f ${BUILD_DIR}/test/index.html ${TEST_DIR}
122 @@echo " - Compiling Test Cases"
123 @@${JAR} ${BUILD_DIR}/test/test.js ${JQ} ${TEST_DIR}
125 @@echo "Test Suite Built"
129 @@echo "Running Automated Test Suite"
130 @@${JAR} ${BUILD_DIR}/runtest/test.js
132 @@echo "Test Suite Finished"
136 @@echo "Building Documentation"
138 @@echo " - Making Documentation Directory:" ${DOCS_DIR}
139 @@mkdir -p ${DOCS_DIR}
140 @@mkdir -p ${DOCS_DIR}/data
142 @@echo " - Copying over htaccess file."
143 @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
145 @@echo " - Copying over script files."
146 @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
148 @@echo " - Copying over style files."
149 @@cp -fR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
151 @@echo " - Extracting ScriptDoc from" ${JQ}
152 @@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}
154 @@echo "Documentation Built"
158 @@echo "Building Speed Test Suite"
160 @@echo " - Making Speed Test Suite Directory:" ${SPEED_DIR}
161 @@mkdir -p ${SPEED_DIR}
163 @@echo " - Copying over script files."
164 @@cp -f ${BUILD_DIR}/speed/index.html ${SPEED_DIR}
165 @@cp -f ${BUILD_DIR}/speed/benchmarker.css ${SPEED_DIR}
166 @@cp -f ${BUILD_DIR}/speed/benchmarker.js ${SPEED_DIR}
167 @@cp -f ${BUILD_DIR}/speed/jquery-1.1.2.js ${SPEED_DIR}
169 @@echo "Speed Test Suite Built"
173 @@echo "Removing Distribution directory:" ${DIST_DIR}
176 @@echo "Removing Test Suite directory:" ${TEST_DIR}
179 @@echo "Removing Documentation directory:" ${DOCS_DIR}
182 @@echo "Removing Speed Test Suite directory:" ${SPEED_DIR}
183 @@rm -rf ${SPEED_DIR}