Added a fix for $("object *") in IE7.
[jquery.git] / Makefile
blob4fc64b9ccfaa5d8997549785f326d85b5f389c01
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 PLUG_DIR = ../plugins
10 BASE_FILES = ${SRC_DIR}/jquery/jquery.js\
11 ${SRC_DIR}/selector/selector.js\
12 ${SRC_DIR}/event/event.js\
13 ${SRC_DIR}/fx/fx.js\
14 ${SRC_DIR}/ajax/ajax.js
16 PLUGINS = ${PLUG_DIR}/button/*\
17 ${PLUG_DIR}/center/*\
18 ${PLUG_DIR}/cookie/*\
19 ${PLUG_DIR}/dimensions/*\
20 ${PLUG_DIR}/metadata/*\
21 ${PLUG_DIR}/form/*\
22 ${PLUG_DIR}/greybox/greybox.js\
23 ${PLUG_DIR}/interface/*\
24 ${PLUG_DIR}/pager/*\
25 ${PLUG_DIR}/tablesorter/*\
26 ${PLUG_DIR}/tabs/*\
27 ${PLUG_DIR}/tooltip/jquery.tooltip.js\
28 ${PLUG_DIR}/accordion/jquery.accordion.js
30 MODULES = ${SRC_DIR}/intro.js\
31 ${BASE_FILES}\
32 ${SRC_DIR}/outro.js
34 MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
35 ${BASE_FILES}\
36 ${PLUGINS}\
37 ${SRC_DIR}/outro.js
39 JQ = ${DIST_DIR}/jquery.js
40 JQ_LITE = ${DIST_DIR}/jquery.lite.js
41 JQ_PACK = ${DIST_DIR}/jquery.pack.js
43 JQ_VER = `cat version.txt`
44 VER = sed s/@VERSION/${JQ_VER}/
46 JAR = java -jar ${BUILD_DIR}/js.jar
48 all: jquery lite pack docs test
49 @@echo "jQuery build complete."
51 ${DIST_DIR}:
52 @@mkdir -p ${DIST_DIR}
54 jquery: ${DIST_DIR} ${JQ}
56 ${JQ}: ${MODULES}
57 @@echo "Building" ${JQ}
59 @@mkdir -p ${DIST_DIR}
60 @@cat ${MODULES} | ${VER} > ${JQ};
62 @@echo ${JQ} "Built"
63 @@echo
65 with_plugins: ${MODULES_WITH_PLUGINS}
66 @@echo "Building" ${JQ}
68 @@mkdir -p ${DIST_DIR}
69 @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
71 @@echo ${JQ} "Built"
72 @@echo
74 lite: ${JQ_LITE}
76 ${JQ_LITE}: ${JQ}
77 @@echo "Building" ${JQ_LITE}
79 @@echo " - Removing ScriptDoc from" ${JQ}
80 @@${JAR} ${BUILD_DIR}/build/lite.js ${JQ} ${JQ_LITE}
82 @@echo ${JQ_LITE} "Built"
83 @@echo
85 pack: ${JQ_PACK}
87 ${JQ_PACK}: ${JQ}
88 @@echo "Building" ${JQ_PACK}
90 @@echo " - Compressing using Packer"
91 @@${JAR} ${BUILD_DIR}/build/pack.js ${JQ} ${JQ_PACK}
93 @@echo ${JQ_PACK} "Built"
94 @@echo
96 test: ${JQ}
97 @@echo "Building Test Suite"
99 @@echo " - Making Test Suite Directory:" ${TEST_DIR}
100 @@mkdir -p ${TEST_DIR}
102 @@echo " - Removing any old tests"
103 @@rm -f ${TEST_DIR}/tests/*
105 @@echo " - Copying over script files."
106 @@cp -fR ${BUILD_DIR}/test/data ${TEST_DIR}/data
107 @@cp -f ${BUILD_DIR}/test/index.html ${TEST_DIR}
109 @@echo " - Compiling Test Cases"
110 @@${JAR} ${BUILD_DIR}/test/test.js ${JQ} ${TEST_DIR}
112 @@echo "Test Suite Built"
113 @@echo
115 docs: ${JQ}
116 @@echo "Building Documentation"
118 @@echo " - Making Documentation Directory:" ${DOCS_DIR}
119 @@mkdir -p ${DOCS_DIR}
120 @@mkdir -p ${DOCS_DIR}/data
122 @@echo " - Copying over htaccess file."
123 @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
125 @@echo " - Copying over script files."
126 @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
128 @@echo " - Copying over style files."
129 @@cp -fR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
131 @@echo " - Extracting ScriptDoc from" ${JQ}
132 @@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}
134 @@echo "Documentation Built"
135 @@echo
137 clean:
138 @@echo "Removing Distribution directory:" ${DIST_DIR}
139 @@rm -rf ${DIST_DIR}
141 @@echo "Removing Test Suite directory:" ${TEST_DIR}
142 @@rm -rf ${TEST_DIR}
144 @@echo "Removing Documentation directory:" ${DOCS_DIR}
145 @@rm -rf ${DOCS_DIR}