Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 120 lines (90 sloc) 2.696 kb
0688344 @azatoth Makefile: cleanup
azatoth authored
1 V ?= 0
2
f01c002 @jeresig Added the new Makefile.
jeresig authored
3 SRC_DIR = src
0688344 @azatoth Makefile: cleanup
azatoth authored
4 TEST_DIR = test
f01c002 @jeresig Added the new Makefile.
jeresig authored
5 BUILD_DIR = build
51dd373 @jeresig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
6
fc5ab8d @jeresig Made a bunch of changes to the build system.
jeresig authored
7 PREFIX = .
8 DIST_DIR = ${PREFIX}/dist
f01c002 @jeresig Added the new Makefile.
jeresig authored
9
0688344 @azatoth Makefile: cleanup
azatoth authored
10 RHINO ?= java -jar ${BUILD_DIR}/js.jar
11
ae772e7 @jeresig Updating the copy of Google Closure Compiler.
jeresig authored
12 CLOSURE_COMPILER = ${BUILD_DIR}/google-compiler-20100917.jar
0688344 @azatoth Makefile: cleanup
azatoth authored
13
14 MINJAR ?= java -jar ${CLOSURE_COMPILER}
15
b4e23b5 @jeresig Reorganzing the jQuery source (first phase).
jeresig authored
16 BASE_FILES = ${SRC_DIR}/core.js\
afaae84 @jeresig support.js needs to come before event.js (also placed in a temporary set...
jeresig authored
17 ${SRC_DIR}/support.js\
4afa608 @flesler jquery data: Closes #3539. Exposed jQuery.queue. Moved all the data and ...
flesler authored
18 ${SRC_DIR}/data.js\
ebad701 @jeresig Split the queue code out from data.js into a dedicated queue.js file (al...
jeresig authored
19 ${SRC_DIR}/queue.js\
8e53f7b @jeresig Fixed typo in logic, also disabled function setters in this case to all...
jeresig authored
20 ${SRC_DIR}/attributes.js\
520f1a2 @jeresig Broke the logic for .clean() wrap out into a separate, static, data stru...
jeresig authored
21 ${SRC_DIR}/event.js\
b4e23b5 @jeresig Reorganzing the jQuery source (first phase).
jeresig authored
22 ${SRC_DIR}/selector.js\
7c04a64 @brandonaaron breaking jquery out into smaller modules. added attributes.js, manipulat...
brandonaaron authored
23 ${SRC_DIR}/traversing.js\
24 ${SRC_DIR}/manipulation.js\
d7d908b @brandonaaron decoupling styles retrieval from the attr method
brandonaaron authored
25 ${SRC_DIR}/css.js\
ac80ca2 Replaced spaces with a tab in Makefile.
jaubourg authored
26 ${SRC_DIR}/ajax.js\
27 ${SRC_DIR}/xhr.js\
28 ${SRC_DIR}/transports/jsonp.js\
29 ${SRC_DIR}/transports/script.js\
30 ${SRC_DIR}/transports/xhr.js\
b70872f @jeresig Renamed the 'fx' module to 'effects'. Should've been done a long time ag...
jeresig authored
31 ${SRC_DIR}/effects.js\
aea452f @brandonaaron Merged dimensions with core
brandonaaron authored
32 ${SRC_DIR}/offset.js\
33 ${SRC_DIR}/dimensions.js
3980dc9 @wycats Added comments to various plugins and added make and ant options to make...
wycats authored
34
35 MODULES = ${SRC_DIR}/intro.js\
36 ${BASE_FILES}\
37 ${SRC_DIR}/outro.js
38
51dd373 @jeresig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
39 JQ = ${DIST_DIR}/jquery.js
4434b5a @jeresig Added support for making a minified version of jQuery.
jeresig authored
40 JQ_MIN = ${DIST_DIR}/jquery.min.js
51dd373 @jeresig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
41
0688344 @azatoth Makefile: cleanup
azatoth authored
42 SIZZLE_DIR = ${SRC_DIR}/sizzle
43 QUNIT_DIR = ${TEST_DIR}/qunit
766c376 @jeresig Now have accurate version information built into jquery.js - will build ...
jeresig authored
44
0688344 @azatoth Makefile: cleanup
azatoth authored
45 JQ_VER = $(shell cat version.txt)
9bd9ebd @jeresig Allow for versions with spaces in them, in the Makefile.
jeresig authored
46 VER = sed "s/@VERSION/${JQ_VER}/"
e943090 @jeresig Moved the test directory.
jeresig authored
47
0688344 @azatoth Makefile: cleanup
azatoth authored
48 DATE=$(shell git log -1 --pretty=format:%ad)
192d6cd @jeresig Moved the copyright to the intro file, added a ! so that it passes throu...
jeresig authored
49
0688344 @azatoth Makefile: cleanup
azatoth authored
50 all: init jquery min lint
fc5ab8d @jeresig Made a bunch of changes to the build system.
jeresig authored
51 @@echo "jQuery build complete."
51dd373 @jeresig Moved docs stuff to build, to be created when the docs are actually buil...
jeresig authored
52
53 ${DIST_DIR}:
fc5ab8d @jeresig Made a bunch of changes to the build system.
jeresig authored
54 @@mkdir -p ${DIST_DIR}
f01c002 @jeresig Added the new Makefile.
jeresig authored
55
0688344 @azatoth Makefile: cleanup
azatoth authored
56 ifeq ($(strip $(V)),0)
57 verbose = --quiet
58 else ifeq ($(strip $(V)),1)
59 verbose =
60 else
61 verbose = --verbose
62 endif
63
64 define clone_or_pull
65 -@@if test ! -d $(strip ${1})/.git; then \
66 echo "Cloning $(strip ${1})..."; \
67 git clone $(strip ${verbose}) --depth=1 $(strip ${2}) $(strip ${1}); \
68 else \
69 echo "Pulling $(strip ${1})..."; \
70 git --git-dir=$(strip ${1})/.git pull $(strip ${verbose}) origin master; \
71 fi
72
73 endef
74
81f65ce @jeresig Pull in the Sizzle library dynamically using a submodule and make it par...
jeresig authored
75 init:
0688344 @azatoth Makefile: cleanup
azatoth authored
76 $(call clone_or_pull, ${QUNIT_DIR}, git://github.com/jquery/qunit.git)
77 $(call clone_or_pull, ${SIZZLE_DIR}, git://github.com/jeresig/sizzle.git)
81f65ce @jeresig Pull in the Sizzle library dynamically using a submodule and make it par...
jeresig authored
78
0688344 @azatoth Makefile: cleanup
azatoth authored
79 jquery: ${JQ}
80 jq: ${JQ}
f01c002 @jeresig Added the new Makefile.
jeresig authored
81
0688344 @azatoth Makefile: cleanup
azatoth authored
82 ${JQ}: ${MODULES} ${DIST_DIR}
fc5ab8d @jeresig Made a bunch of changes to the build system.
jeresig authored
83 @@echo "Building" ${JQ}
f01c002 @jeresig Added the new Makefile.
jeresig authored
84
192d6cd @jeresig Moved the copyright to the intro file, added a ! so that it passes throu...
jeresig authored
85 @@cat ${MODULES} | \
1ed4051 @jeresig Trim out the module wrappers during the build process. Follow-up to #701...
jeresig authored
86 sed 's/.function..jQuery...{//' | \
87 sed 's/}...jQuery..;//' | \
192d6cd @jeresig Moved the copyright to the intro file, added a ! so that it passes throu...
jeresig authored
88 sed 's/Date:./&'"${DATE}"'/' | \
89 ${VER} > ${JQ};
f01c002 @jeresig Added the new Makefile.
jeresig authored
90
0688344 @azatoth Makefile: cleanup
azatoth authored
91 ${SRC_DIR}/selector.js: ${SIZZLE_DIR}/sizzle.js
81f65ce @jeresig Pull in the Sizzle library dynamically using a submodule and make it par...
jeresig authored
92 @@echo "Building selector code from Sizzle"
0688344 @azatoth Makefile: cleanup
azatoth authored
93 @@sed '/EXPOSE/r src/sizzle-jquery.js' ${SIZZLE_DIR}/sizzle.js | grep -v window.Sizzle > ${SRC_DIR}/selector.js
81f65ce @jeresig Pull in the Sizzle library dynamically using a submodule and make it par...
jeresig authored
94
950b5d6 @jeresig Added in integrated JSLint checking against the jQuery source. Just run ...
jeresig authored
95 lint: ${JQ}
96 @@echo "Checking jQuery against JSLint..."
97 @@${RHINO} build/jslint-check.js
98
4434b5a @jeresig Added support for making a minified version of jQuery.
jeresig authored
99 min: ${JQ_MIN}
100
101 ${JQ_MIN}: ${JQ}
102 @@echo "Building" ${JQ_MIN}
103
2c04035 @jeresig Fix broken min file header generation.
jeresig authored
104 @@head -15 ${JQ} > ${JQ_MIN}
105 @@${MINJAR} --js ${JQ} --warning_level QUIET --js_output_file ${JQ_MIN}.tmp
106 @@cat ${JQ_MIN}.tmp >> ${JQ_MIN}
107 @@rm -f ${JQ_MIN}.tmp
4434b5a @jeresig Added support for making a minified version of jQuery.
jeresig authored
108
f01c002 @jeresig Added the new Makefile.
jeresig authored
109 clean:
e943090 @jeresig Moved the test directory.
jeresig authored
110 @@echo "Removing Distribution directory:" ${DIST_DIR}
fc5ab8d @jeresig Made a bunch of changes to the build system.
jeresig authored
111 @@rm -rf ${DIST_DIR}
81f65ce @jeresig Pull in the Sizzle library dynamically using a submodule and make it par...
jeresig authored
112
113 @@echo "Removing built copy of Sizzle"
6803bf1 @rdworth Minor fix to Makefile so that 'make clean' doesn't fail when run immedia...
rdworth authored
114 @@rm -f src/selector.js
5480cd3 @jeresig Shortened the build messages in the Makefile and added test/qunit and sr...
jeresig authored
115
116 @@echo "Removing cloned directories"
117 @@rm -rf test/qunit src/sizzle
0688344 @azatoth Makefile: cleanup
azatoth authored
118
119 .PHONY: all jquery lint min init jq clean
Something went wrong with that request. Please try again.