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}
121 @@cp -f ${BUILD_DIR}/test/fx.html ${TEST_DIR}
122 @@cp -f ${BUILD_DIR}/test/cow.jpg ${TEST_DIR}
124 @@echo " - Compiling Test Cases"
125 @@${JAR} ${BUILD_DIR}/test/test.js ${JQ} ${TEST_DIR}
127 @@echo "Test Suite Built"
131 @@echo "Building Documentation"
133 @@echo " - Making Documentation Directory:" ${DOCS_DIR}
134 @@mkdir -p ${DOCS_DIR}
135 @@mkdir -p ${DOCS_DIR}/data
137 @@echo " - Copying over htaccess file."
138 @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
140 @@echo " - Copying over script files."
141 @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
143 @@echo " - Copying over style files."
144 @@cp -fR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
146 @@echo " - Extracting ScriptDoc from" ${JQ}
147 @@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}
149 @@echo "Documentation Built"
153 @@echo "Building Speed Test Suite"
155 @@echo " - Making Speed Test Suite Directory:" ${SPEED_DIR}
156 @@mkdir -p ${SPEED_DIR}
158 @@echo " - Copying over script files."
159 @@cp -f ${BUILD_DIR}/speed/index.html ${SPEED_DIR}
160 @@cp -f ${BUILD_DIR}/speed/benchmarker.css ${SPEED_DIR}
161 @@cp -f ${BUILD_DIR}/speed/benchmarker.js ${SPEED_DIR}
162 @@cp -f ${BUILD_DIR}/speed/jquery-1.1.2.js ${SPEED_DIR}
164 @@echo "Speed Test Suite Built"
168 @@echo "Removing Distribution directory:" ${DIST_DIR}
171 @@echo "Removing Test Suite directory:" ${TEST_DIR}
174 @@echo "Removing Documentation directory:" ${DOCS_DIR}
177 @@echo "Removing Speed Test Suite directory:" ${SPEED_DIR}
178 @@rm -rf ${SPEED_DIR}