5 DOCS_DIR = ${PREFIX}/docs
6 TEST_DIR = ${PREFIX}/test
7 DIST_DIR = ${PREFIX}/dist
10 BASE_FILES = ${SRC_DIR}/jquery/jquery.js\
11 ${SRC_DIR}/selector/selector.js\
12 ${SRC_DIR}/event/event.js\
13 ${SRC_DIR}/ajax/ajax.js\
16 PLUGINS = ${PLUG_DIR}/button/*\
19 ${PLUG_DIR}/dimensions/*\
20 ${PLUG_DIR}/metadata/*\
22 ${PLUG_DIR}/greybox/greybox.js\
23 ${PLUG_DIR}/interface/*\
25 ${PLUG_DIR}/tablesorter/*\
27 ${PLUG_DIR}/tooltip/jquery.tooltip.js\
28 ${PLUG_DIR}/accordion/jquery.accordion.js
30 MODULES = ${SRC_DIR}/intro.js\
34 MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
39 JQ = ${DIST_DIR}/jquery.js
40 JQ_LITE = ${DIST_DIR}/jquery.lite.js
41 JQ_MIN = ${DIST_DIR}/jquery.min.js
42 JQ_PACK = ${DIST_DIR}/jquery.pack.js
44 JQ_VER = `cat version.txt`
45 VER = sed s/@VERSION/${JQ_VER}/
47 JAR = java -jar ${BUILD_DIR}/js.jar
49 all: jquery lite pack docs test
50 @@echo "jQuery build complete."
53 @@mkdir -p ${DIST_DIR}
55 jquery: ${DIST_DIR} ${JQ}
58 @@echo "Building" ${JQ}
60 @@mkdir -p ${DIST_DIR}
61 @@cat ${MODULES} | ${VER} > ${JQ};
66 with_plugins: ${MODULES_WITH_PLUGINS}
67 @@echo "Building" ${JQ}
69 @@mkdir -p ${DIST_DIR}
70 @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
78 @@echo "Building" ${JQ_LITE}
80 @@echo " - Removing ScriptDoc from" ${JQ}
81 @@${JAR} ${BUILD_DIR}/build/lite.js ${JQ} ${JQ_LITE}
83 @@echo ${JQ_LITE} "Built"
89 @@echo "Building" ${JQ_PACK}
91 @@echo " - Compressing using Packer"
92 @@${JAR} ${BUILD_DIR}/build/pack.js ${JQ} ${JQ_PACK}
94 @@echo ${JQ_PACK} "Built"
100 @@echo "Building" ${JQ_MIN}
102 @@echo " - Compressing using Minifier"
103 @@${JAR} ${BUILD_DIR}/build/min.js ${JQ} ${JQ_MIN}
105 @@echo ${JQ_MIN} "Built"
109 @@echo "Building Test Suite"
111 @@echo " - Making Test Suite Directory:" ${TEST_DIR}
112 @@mkdir -p ${TEST_DIR}
114 @@echo " - Removing any old tests"
115 @@rm -f ${TEST_DIR}/tests/*
117 @@echo " - Copying over script files."
118 @@cp -fR ${BUILD_DIR}/test/data ${TEST_DIR}/data
119 @@cp -f ${BUILD_DIR}/test/index.html ${TEST_DIR}
120 @@cp -f ${BUILD_DIR}/test/fx.html ${TEST_DIR}
121 @@cp -f ${BUILD_DIR}/test/cow.jpg ${TEST_DIR}
123 @@echo " - Compiling Test Cases"
124 @@${JAR} ${BUILD_DIR}/test/test.js ${JQ} ${TEST_DIR}
126 @@echo "Test Suite Built"
130 @@echo "Building Documentation"
132 @@echo " - Making Documentation Directory:" ${DOCS_DIR}
133 @@mkdir -p ${DOCS_DIR}
134 @@mkdir -p ${DOCS_DIR}/data
136 @@echo " - Copying over htaccess file."
137 @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
139 @@echo " - Copying over script files."
140 @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
142 @@echo " - Copying over style files."
143 @@cp -fR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
145 @@echo " - Extracting ScriptDoc from" ${JQ}
146 @@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}
148 @@echo "Documentation Built"
152 @@echo "Removing Distribution directory:" ${DIST_DIR}
155 @@echo "Removing Test Suite directory:" ${TEST_DIR}
158 @@echo "Removing Documentation directory:" ${DOCS_DIR}