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\
17 ${SRC_DIR}/dimensions.js
19 PLUGINS = ${PLUG_DIR}/button/*\
22 ${PLUG_DIR}/dimensions/*\
23 ${PLUG_DIR}/metadata/*\
25 ${PLUG_DIR}/greybox/greybox.js\
26 ${PLUG_DIR}/interface/*\
28 ${PLUG_DIR}/tablesorter/*\
30 ${PLUG_DIR}/tooltip/jquery.tooltip.js\
31 ${PLUG_DIR}/accordion/jquery.accordion.js
33 MODULES = ${SRC_DIR}/intro.js\
37 MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
42 JQ = ${DIST_DIR}/jquery.js
43 JQ_LITE = ${DIST_DIR}/jquery.lite.js
44 JQ_MIN = ${DIST_DIR}/jquery.min.js
45 JQ_PACK = ${DIST_DIR}/jquery.pack.js
47 JQ_VER = `cat version.txt`
48 VER = sed s/@VERSION/${JQ_VER}/
50 JAR = java -jar ${BUILD_DIR}/js.jar
52 all: jquery lite min pack speed
53 @@echo "jQuery build complete."
56 @@mkdir -p ${DIST_DIR}
58 jquery: ${DIST_DIR} ${JQ}
61 @@echo "Building" ${JQ}
63 @@mkdir -p ${DIST_DIR}
64 @@cat ${MODULES} | ${VER} > ${JQ};
69 with_plugins: ${MODULES_WITH_PLUGINS}
70 @@echo "Building" ${JQ}
72 @@mkdir -p ${DIST_DIR}
73 @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
81 @@echo "Building" ${JQ_LITE}
85 @@echo ${JQ_LITE} "Built"
91 @@echo "Building" ${JQ_PACK}
93 @@echo " - Compressing using Packer"
94 @@${JAR} ${BUILD_DIR}/build/pack.js ${JQ} ${JQ_PACK}
96 @@echo ${JQ_PACK} "Built"
102 @@echo "Building" ${JQ_MIN}
104 @@echo " - Compressing using Minifier"
105 @@${JAR} ${BUILD_DIR}/build/min.js ${JQ} ${JQ_MIN}
107 @@echo ${JQ_MIN} "Built"
111 @@echo "Building Test Suite"
112 @@echo "Test Suite Built"
116 @@echo "Running Automated Test Suite"
117 @@${JAR} ${BUILD_DIR}/runtest/test.js
119 @@echo "Test Suite Finished"
123 @@echo "Building Documentation"
125 @@echo " - Making Documentation Directory:" ${DOCS_DIR}
126 @@mkdir -p ${DOCS_DIR}
127 @@mkdir -p ${DOCS_DIR}/data
129 @@echo " - Copying over htaccess file."
130 @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
132 @@echo " - Copying over script files."
133 @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
135 @@echo " - Copying over style files."
136 @@cp -fR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
138 @@echo " - Extracting ScriptDoc from" ${JQ}
139 @@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}
141 @@echo "Documentation Built"
145 @@echo "Building Speed Test Suite"
147 @@echo " - Making Speed Test Suite Directory:" ${SPEED_DIR}
148 @@mkdir -p ${SPEED_DIR}
150 @@echo " - Copying over script files."
151 @@cp -f ${BUILD_DIR}/speed/index.html ${SPEED_DIR}
152 @@cp -f ${BUILD_DIR}/speed/benchmarker.css ${SPEED_DIR}
153 @@cp -f ${BUILD_DIR}/speed/benchmarker.js ${SPEED_DIR}
154 @@cp -f ${BUILD_DIR}/speed/jquery-basis.js ${SPEED_DIR}
156 @@echo "Speed Test Suite Built"
160 @@echo "Removing Distribution directory:" ${DIST_DIR}
163 @@echo "Removing Documentation directory:" ${DOCS_DIR}
166 @@echo "Removing Speed Test Suite directory:" ${SPEED_DIR}
167 @@rm -rf ${SPEED_DIR}