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}/core.js\
12 ${SRC_DIR}/selector.js\
18 PLUGINS = ${PLUG_DIR}/button/*\
21 ${PLUG_DIR}/dimensions/*\
22 ${PLUG_DIR}/metadata/*\
24 ${PLUG_DIR}/greybox/greybox.js\
25 ${PLUG_DIR}/interface/*\
27 ${PLUG_DIR}/tablesorter/*\
29 ${PLUG_DIR}/tooltip/jquery.tooltip.js\
30 ${PLUG_DIR}/accordion/jquery.accordion.js
32 MODULES = ${SRC_DIR}/intro.js\
36 MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
41 JQ = ${DIST_DIR}/jquery.js
42 JQ_LITE = ${DIST_DIR}/jquery.lite.js
43 JQ_MIN = ${DIST_DIR}/jquery.min.js
44 JQ_PACK = ${DIST_DIR}/jquery.pack.js
46 JQ_VER = `cat version.txt`
47 VER = sed s/@VERSION/${JQ_VER}/
49 JAR = java -jar ${BUILD_DIR}/js.jar
51 all: jquery lite min pack speed
52 @@echo "jQuery build complete."
55 @@mkdir -p ${DIST_DIR}
57 jquery: ${DIST_DIR} ${JQ}
60 @@echo "Building" ${JQ}
62 @@mkdir -p ${DIST_DIR}
63 @@cat ${MODULES} | ${VER} > ${JQ};
68 with_plugins: ${MODULES_WITH_PLUGINS}
69 @@echo "Building" ${JQ}
71 @@mkdir -p ${DIST_DIR}
72 @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
80 @@echo "Building" ${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"
111 @@echo "Test Suite Built"
115 @@echo "Running Automated Test Suite"
116 @@${JAR} ${BUILD_DIR}/runtest/test.js
118 @@echo "Test Suite Finished"
122 @@echo "Building Documentation"
124 @@echo " - Making Documentation Directory:" ${DOCS_DIR}
125 @@mkdir -p ${DOCS_DIR}
126 @@mkdir -p ${DOCS_DIR}/data
128 @@echo " - Copying over htaccess file."
129 @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
131 @@echo " - Copying over script files."
132 @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
134 @@echo " - Copying over style files."
135 @@cp -fR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
137 @@echo " - Extracting ScriptDoc from" ${JQ}
138 @@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}
140 @@echo "Documentation Built"
144 @@echo "Building Speed Test Suite"
146 @@echo " - Making Speed Test Suite Directory:" ${SPEED_DIR}
147 @@mkdir -p ${SPEED_DIR}
149 @@echo " - Copying over script files."
150 @@cp -f ${BUILD_DIR}/speed/index.html ${SPEED_DIR}
151 @@cp -f ${BUILD_DIR}/speed/benchmarker.css ${SPEED_DIR}
152 @@cp -f ${BUILD_DIR}/speed/benchmarker.js ${SPEED_DIR}
153 @@cp -f ${BUILD_DIR}/speed/jquery-basis.js ${SPEED_DIR}
155 @@echo "Speed Test Suite Built"
159 @@echo "Removing Distribution directory:" ${DIST_DIR}
162 @@echo "Removing Documentation directory:" ${DOCS_DIR}
165 @@echo "Removing Speed Test Suite directory:" ${SPEED_DIR}
166 @@rm -rf ${SPEED_DIR}