Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 159 lines (113 sloc) 3.371 kb
f01c002 John Resig Added the new Makefile.
jeresig authored
1 SRC_DIR = src
2 BUILD_DIR = build
51dd373 John Resig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
3
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
4 PREFIX = .
5 DOCS_DIR = ${PREFIX}/docs
6 TEST_DIR = ${PREFIX}/test
7 DIST_DIR = ${PREFIX}/dist
3980dc9 Yehuda Katz Added comments to various plugins and added make and ant options to make...
wycats authored
8 PLUG_DIR = ../plugins
f01c002 John Resig Added the new Makefile.
jeresig authored
9
a2ab7ef Jörn Zaefferer Tried to fix make build, PLEASE TEST
jzaefferer authored
10 BASE_FILES = ${SRC_DIR}/jquery/jquery.js\
c3d8cb0 John Resig Moved the bulk of the selector code out into a separate file, changed th...
jeresig authored
11 ${SRC_DIR}/selector/selector.js\
a2ab7ef Jörn Zaefferer Tried to fix make build, PLEASE TEST
jzaefferer authored
12 ${SRC_DIR}/event/event.js\
13 ${SRC_DIR}/ajax/ajax.js
4434b5a John Resig Added support for making a minified version of jQuery.
jeresig authored
14 #${SRC_DIR}/fx/fx.js\
15 #${SRC_DIR}/ajax/ajax.js
3980dc9 Yehuda Katz Added comments to various plugins and added make and ant options to make...
wycats authored
16
17 PLUGINS = ${PLUG_DIR}/button/*\
18 ${PLUG_DIR}/center/*\
19 ${PLUG_DIR}/cookie/*\
78ed830 Yehuda Katz Added metadata (fully documented)
wycats authored
20 ${PLUG_DIR}/dimensions/*\
21 ${PLUG_DIR}/metadata/*\
3980dc9 Yehuda Katz Added comments to various plugins and added make and ant options to make...
wycats authored
22 ${PLUG_DIR}/form/*\
23 ${PLUG_DIR}/greybox/greybox.js\
24 ${PLUG_DIR}/interface/*\
25 ${PLUG_DIR}/pager/*\
26 ${PLUG_DIR}/tablesorter/*\
a2ab7ef Jörn Zaefferer Tried to fix make build, PLEASE TEST
jzaefferer authored
27 ${PLUG_DIR}/tabs/*\
28 ${PLUG_DIR}/tooltip/jquery.tooltip.js\
29 ${PLUG_DIR}/accordion/jquery.accordion.js
3980dc9 Yehuda Katz Added comments to various plugins and added make and ant options to make...
wycats authored
30
31 MODULES = ${SRC_DIR}/intro.js\
32 ${BASE_FILES}\
33 ${SRC_DIR}/outro.js
34
35 MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
36 ${BASE_FILES}\
37 ${PLUGINS}\
87284a8 Jörn Zaefferer Fixed typo, thanks Patrick
jzaefferer authored
38 ${SRC_DIR}/outro.js
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
39
51dd373 John Resig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
40 JQ = ${DIST_DIR}/jquery.js
41 JQ_LITE = ${DIST_DIR}/jquery.lite.js
4434b5a John Resig Added support for making a minified version of jQuery.
jeresig authored
42 JQ_MIN = ${DIST_DIR}/jquery.min.js
51dd373 John Resig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
43 JQ_PACK = ${DIST_DIR}/jquery.pack.js
44
766c376 John Resig Now have accurate version information built into jquery.js - will build ...
jeresig authored
45 JQ_VER = `cat version.txt`
46 VER = sed s/@VERSION/${JQ_VER}/
47
e943090 John Resig Moved the test directory.
jeresig authored
48 JAR = java -jar ${BUILD_DIR}/js.jar
49
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
50 all: jquery lite pack docs test
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
51 @@echo "jQuery build complete."
51dd373 John Resig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
52
53 ${DIST_DIR}:
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
54 @@mkdir -p ${DIST_DIR}
f01c002 John Resig Added the new Makefile.
jeresig authored
55
51dd373 John Resig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
56 jquery: ${DIST_DIR} ${JQ}
f01c002 John Resig Added the new Makefile.
jeresig authored
57
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
58 ${JQ}: ${MODULES}
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
59 @@echo "Building" ${JQ}
f01c002 John Resig Added the new Makefile.
jeresig authored
60
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
61 @@mkdir -p ${DIST_DIR}
766c376 John Resig Now have accurate version information built into jquery.js - will build ...
jeresig authored
62 @@cat ${MODULES} | ${VER} > ${JQ};
f01c002 John Resig Added the new Makefile.
jeresig authored
63
e943090 John Resig Moved the test directory.
jeresig authored
64 @@echo ${JQ} "Built"
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
65 @@echo
f01c002 John Resig Added the new Makefile.
jeresig authored
66
3980dc9 Yehuda Katz Added comments to various plugins and added make and ant options to make...
wycats authored
67 with_plugins: ${MODULES_WITH_PLUGINS}
68 @@echo "Building" ${JQ}
69
70 @@mkdir -p ${DIST_DIR}
71 @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
72
73 @@echo ${JQ} "Built"
74 @@echo
75
51dd373 John Resig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
76 lite: ${JQ_LITE}
77
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
78 ${JQ_LITE}: ${JQ}
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
79 @@echo "Building" ${JQ_LITE}
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
80
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
81 @@echo " - Removing ScriptDoc from" ${JQ}
e943090 John Resig Moved the test directory.
jeresig authored
82 @@${JAR} ${BUILD_DIR}/build/lite.js ${JQ} ${JQ_LITE}
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
83
e943090 John Resig Moved the test directory.
jeresig authored
84 @@echo ${JQ_LITE} "Built"
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
85 @@echo
f01c002 John Resig Added the new Makefile.
jeresig authored
86
51dd373 John Resig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
87 pack: ${JQ_PACK}
f01c002 John Resig Added the new Makefile.
jeresig authored
88
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
89 ${JQ_PACK}: ${JQ}
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
90 @@echo "Building" ${JQ_PACK}
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
91
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
92 @@echo " - Compressing using Packer"
e943090 John Resig Moved the test directory.
jeresig authored
93 @@${JAR} ${BUILD_DIR}/build/pack.js ${JQ} ${JQ_PACK}
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
94
e943090 John Resig Moved the test directory.
jeresig authored
95 @@echo ${JQ_PACK} "Built"
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
96 @@echo
f01c002 John Resig Added the new Makefile.
jeresig authored
97
4434b5a John Resig Added support for making a minified version of jQuery.
jeresig authored
98 min: ${JQ_MIN}
99
100 ${JQ_MIN}: ${JQ}
101 @@echo "Building" ${JQ_MIN}
102
103 @@echo " - Compressing using Minifier"
104 @@${JAR} ${BUILD_DIR}/build/min.js ${JQ} ${JQ_MIN}
105
106 @@echo ${JQ_MIN} "Built"
107 @@echo
108
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
109 test: ${JQ}
e943090 John Resig Moved the test directory.
jeresig authored
110 @@echo "Building Test Suite"
111
112 @@echo " - Making Test Suite Directory:" ${TEST_DIR}
113 @@mkdir -p ${TEST_DIR}
7448c61 John Resig Massive overhauls to the test suite - it is now generated dynamically, a...
jeresig authored
114
115 @@echo " - Removing any old tests"
116 @@rm -f ${TEST_DIR}/tests/*
e943090 John Resig Moved the test directory.
jeresig authored
117
118 @@echo " - Copying over script files."
9203775 John Resig Added .filter("expr",ifCallback,elseCallback) (works for find, not, clon...
jeresig authored
119 @@cp -fR ${BUILD_DIR}/test/data ${TEST_DIR}/data
f6ecc6a Jörn Zaefferer Refactored test suite: All tests are now compiled into one file, runs mu...
jzaefferer authored
120 @@cp -f ${BUILD_DIR}/test/index.html ${TEST_DIR}
e943090 John Resig Moved the test directory.
jeresig authored
121
122 @@echo " - Compiling Test Cases"
123 @@${JAR} ${BUILD_DIR}/test/test.js ${JQ} ${TEST_DIR}
124
125 @@echo "Test Suite Built"
126 @@echo
f01c002 John Resig Added the new Makefile.
jeresig authored
127
128 docs: ${JQ}
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
129 @@echo "Building Documentation"
130
131 @@echo " - Making Documentation Directory:" ${DOCS_DIR}
132 @@mkdir -p ${DOCS_DIR}
133 @@mkdir -p ${DOCS_DIR}/data
134
2d56dbc John Resig Added .htaccess file for docs directory.
jeresig authored
135 @@echo " - Copying over htaccess file."
136 @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
137
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
138 @@echo " - Copying over script files."
269ff25 John Resig Changed the -n flag of cp to -f, not equivalent, but it gets the job don...
jeresig authored
139 @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
140
141 @@echo " - Copying over style files."
269ff25 John Resig Changed the -n flag of cp to -f, not equivalent, but it gets the job don...
jeresig authored
142 @@cp -fR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
143
144 @@echo " - Extracting ScriptDoc from" ${JQ}
e943090 John Resig Moved the test directory.
jeresig authored
145 @@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
146
e943090 John Resig Moved the test directory.
jeresig authored
147 @@echo "Documentation Built"
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
148 @@echo
f01c002 John Resig Added the new Makefile.
jeresig authored
149
150 clean:
e943090 John Resig Moved the test directory.
jeresig authored
151 @@echo "Removing Distribution directory:" ${DIST_DIR}
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
152 @@rm -rf ${DIST_DIR}
e943090 John Resig Moved the test directory.
jeresig authored
153
154 @@echo "Removing Test Suite directory:" ${TEST_DIR}
155 @@rm -rf ${TEST_DIR}
156
157 @@echo "Removing Documentation directory:" ${DOCS_DIR}
fc5ab8d John Resig Made a bunch of changes to the build system.
jeresig authored
158 @@rm -rf ${DOCS_DIR}
Something went wrong with that request. Please try again.