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}/event
/event.js\
13 ${SRC_DIR}/ajax
/ajax.js
15 PLUGINS
= ${PLUG_DIR}/button
/*\
18 ${PLUG_DIR}/dimensions
/*\
19 ${PLUG_DIR}/metadata
/*\
21 ${PLUG_DIR}/greybox
/greybox.js\
22 ${PLUG_DIR}/interface
/*\
24 ${PLUG_DIR}/tablesorter
/*\
26 ${PLUG_DIR}/tooltip
/jquery.tooltip.js\
27 ${PLUG_DIR}/accordion
/jquery.accordion.js
29 MODULES
= ${SRC_DIR}/intro.js\
33 MODULES_WITH_PLUGINS
= ${SRC_DIR}/intro.js\
38 JQ
= ${DIST_DIR}/jquery.js
39 JQ_LITE
= ${DIST_DIR}/jquery.lite.js
40 JQ_PACK
= ${DIST_DIR}/jquery.pack.js
42 JQ_VER
= `cat version.txt`
43 VER
= sed s
/@VERSION
/${JQ_VER}/
45 JAR
= java
-jar
${BUILD_DIR}/js.jar
47 all: jquery lite pack docs
test
48 @@echo
"jQuery build complete."
51 @@mkdir
-p
${DIST_DIR}
53 jquery
: ${DIST_DIR} ${JQ}
56 @@echo
"Building" ${JQ}
58 @@mkdir
-p
${DIST_DIR}
59 @@cat
${MODULES} |
${VER} > ${JQ};
64 with_plugins
: ${MODULES_WITH_PLUGINS}
65 @@echo
"Building" ${JQ}
67 @@mkdir
-p
${DIST_DIR}
68 @@cat
${MODULES_WITH_PLUGINS} |
${VER} > ${JQ};
76 @@echo
"Building" ${JQ_LITE}
78 @@echo
" - Removing ScriptDoc from" ${JQ}
79 @@
${JAR} ${BUILD_DIR}/build
/lite.js
${JQ} ${JQ_LITE}
81 @@echo
${JQ_LITE} "Built"
87 @@echo
"Building" ${JQ_PACK}
89 @@echo
" - Compressing using Packer"
90 @@
${JAR} ${BUILD_DIR}/build
/pack.js
${JQ} ${JQ_PACK}
92 @@echo
${JQ_PACK} "Built"
96 @@echo
"Building Test Suite"
98 @@echo
" - Making Test Suite Directory:" ${TEST_DIR}
99 @@mkdir
-p
${TEST_DIR}
101 @@echo
" - Removing any old tests"
102 @@
rm -f
${TEST_DIR}/tests
/*
104 @@echo
" - Copying over script files."
105 @@cp
-fR
${BUILD_DIR}/test/data
${TEST_DIR}/data
106 @@cp
-f
${BUILD_DIR}/test/index.html
${TEST_DIR}
108 @@echo
" - Compiling Test Cases"
109 @@
${JAR} ${BUILD_DIR}/test/test.js
${JQ} ${TEST_DIR}
111 @@echo
"Test Suite Built"
115 @@echo
"Building Documentation"
117 @@echo
" - Making Documentation Directory:" ${DOCS_DIR}
118 @@mkdir
-p
${DOCS_DIR}
119 @@mkdir
-p
${DOCS_DIR}/data
121 @@echo
" - Copying over htaccess file."
122 @@cp
-fR
${BUILD_DIR}/docs
/.htaccess
${DOCS_DIR}
124 @@echo
" - Copying over script files."
125 @@cp
-fR
${BUILD_DIR}/docs
/js
${DOCS_DIR}/js
127 @@echo
" - Copying over style files."
128 @@cp
-fR
${BUILD_DIR}/docs
/style
${DOCS_DIR}/style
130 @@echo
" - Extracting ScriptDoc from" ${JQ}
131 @@
${JAR} ${BUILD_DIR}/docs
/docs.js
${JQ} ${DOCS_DIR}
133 @@echo
"Documentation Built"
137 @@echo
"Removing Distribution directory:" ${DIST_DIR}
140 @@echo
"Removing Test Suite directory:" ${TEST_DIR}
143 @@echo
"Removing Documentation directory:" ${DOCS_DIR}