Fixed a bug in .dir() where it would return non-element nodes.
[jquery.git] / Makefile
blob64dd418beaae5a79185e70a3d821ba0bd8926406
1 SRC_DIR = src
2 BUILD_DIR = build
4 PREFIX = .
5 DOCS_DIR = ${PREFIX}/docs
6 TEST_DIR = ${PREFIX}/test
7 DIST_DIR = ${PREFIX}/dist
8 SPEED_DIR = ${PREFIX}/speed
9 PLUG_DIR = ../plugins
11 BASE_FILES = ${SRC_DIR}/core.js\
12 ${SRC_DIR}/selector.js\
13 ${SRC_DIR}/event.js\
14 ${SRC_DIR}/ajax.js\
15 ${SRC_DIR}/fx.js\
16 ${SRC_DIR}/offset.js
18 PLUGINS = ${PLUG_DIR}/button/*\
19 ${PLUG_DIR}/center/*\
20 ${PLUG_DIR}/cookie/*\
21 ${PLUG_DIR}/dimensions/*\
22 ${PLUG_DIR}/metadata/*\
23 ${PLUG_DIR}/form/*\
24 ${PLUG_DIR}/greybox/greybox.js\
25 ${PLUG_DIR}/interface/*\
26 ${PLUG_DIR}/pager/*\
27 ${PLUG_DIR}/tablesorter/*\
28 ${PLUG_DIR}/tabs/*\
29 ${PLUG_DIR}/tooltip/jquery.tooltip.js\
30 ${PLUG_DIR}/accordion/jquery.accordion.js
32 MODULES = ${SRC_DIR}/intro.js\
33 ${BASE_FILES}\
34 ${SRC_DIR}/outro.js
36 MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
37 ${BASE_FILES}\
38 ${PLUGINS}\
39 ${SRC_DIR}/outro.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."
54 ${DIST_DIR}:
55 @@mkdir -p ${DIST_DIR}
57 jquery: ${DIST_DIR} ${JQ}
59 ${JQ}: ${MODULES}
60 @@echo "Building" ${JQ}
62 @@mkdir -p ${DIST_DIR}
63 @@cat ${MODULES} | ${VER} > ${JQ};
65 @@echo ${JQ} "Built"
66 @@echo
68 with_plugins: ${MODULES_WITH_PLUGINS}
69 @@echo "Building" ${JQ}
71 @@mkdir -p ${DIST_DIR}
72 @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
74 @@echo ${JQ} "Built"
75 @@echo
77 lite: ${JQ_LITE}
79 ${JQ_LITE}: ${JQ}
80 @@echo "Building" ${JQ_LITE}
82 @@echo " - Removing ScriptDoc from" ${JQ}
83 @@${JAR} ${BUILD_DIR}/build/lite.js ${JQ} ${JQ_LITE}
85 @@echo ${JQ_LITE} "Built"
86 @@echo
88 pack: ${JQ_PACK}
90 ${JQ_PACK}: ${JQ}
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"
97 @@echo
99 min: ${JQ_MIN}
101 ${JQ_MIN}: ${JQ}
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"
108 @@echo
110 test: ${JQ}
111 @@echo "Building Test Suite"
112 @@echo "Test Suite Built"
113 @@echo
115 runtest: ${JQ} test
116 @@echo "Running Automated Test Suite"
117 @@${JAR} ${BUILD_DIR}/runtest/test.js
119 @@echo "Test Suite Finished"
120 @@echo
122 docs: ${JQ}
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"
142 @@echo
144 speed: ${JQ}
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-1.1.2.js ${SPEED_DIR}
156 @@echo "Speed Test Suite Built"
157 @@echo
159 clean:
160 @@echo "Removing Distribution directory:" ${DIST_DIR}
161 @@rm -rf ${DIST_DIR}
163 @@echo "Removing Test Suite directory:" ${TEST_DIR}
164 @@rm -rf ${TEST_DIR}
166 @@echo "Removing Documentation directory:" ${DOCS_DIR}
167 @@rm -rf ${DOCS_DIR}
169 @@echo "Removing Speed Test Suite directory:" ${SPEED_DIR}
170 @@rm -rf ${SPEED_DIR}