Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 200 lines (164 sloc) 8.394 kB
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
1 # The system generated date in YYYYMMDD format
2 DATE = $(shell date "+%Y%m%d")
ac62052 @jeresig Add a way to build copies of jQuery Mobile.
jeresig authored
3
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
4 # The version according to the source file. If this is the nightly build, use a different version
ac62052 @jeresig Add a way to build copies of jQuery Mobile.
jeresig authored
5 VER = $(shell cat version.txt)
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
6
7 # The command to replace the @VERSION in the files with the actual version
19c952a @eddiemonge For all versions of make except for deploy, the outputted scripts wil…
eddiemonge authored
8 SED_VER = sed "s/@VERSION/$(shell git log -1 --format=format:" Git Build\n * Git Info SHA1: %H Date: %cd")/"
9 deploy: SED_VER = sed "s/@VERSION/${VER}/"
ac62052 @jeresig Add a way to build copies of jQuery Mobile.
jeresig authored
10
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
11 # The version of jQuery core used
55d82f4 @eddiemonge makefile reads jquery core version from the file
eddiemonge authored
12 JQUERY = $(shell grep Library js/jquery.js | sed s'/ \* jQuery JavaScript Library v//')
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
13
14 # The directory to create the zipped files in and also serves as the filenames
0e76a6c @jeresig Add a way to generate a single zip file of a release.
jeresig authored
15 DIR = jquery.mobile-${VER}
757dda9 @eddiemonge Makefile: Remove log as the info is now in the files from the nightly…
eddiemonge authored
16 nightly: DIR = jquery.mobile
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
17
18 # The output folder for the finished files
19 OUTPUT = compiled
20
250fc19 @eddiemonge use a log and a cron
eddiemonge authored
21 # Command to remove the latest directory from the CDN before uploading, only if using latest target
0bc9f7e @eddiemonge blank commands are not so good.
eddiemonge authored
22 RMLATEST = echo ""
250fc19 @eddiemonge use a log and a cron
eddiemonge authored
23
5f487bb @eddiemonge add images to path, remove nightly folder before moving to there so i…
eddiemonge authored
24 # The output folder for the nightly files.
a65ac5f @eddiemonge change makefile to point to CDN
eddiemonge authored
25 NIGHTLY_OUTPUT = nightlies/${DATE}
ca55d18 @eddiemonge makefile for lateset
eddiemonge authored
26 ifeq (${NIGHTLY_OUTPUT}, latest)
27 RMLATEST = ssh jqadmin@code.origin.jquery.com 'rm -rf /var/www/html/code.jquery.com/mobile/latest'
28 endif
a65ac5f @eddiemonge change makefile to point to CDN
eddiemonge authored
29 NIGHTLY_WEBPATH = http://code.jquery.com/mobile/${NIGHTLY_OUTPUT}
5f487bb @eddiemonge add images to path, remove nightly folder before moving to there so i…
eddiemonge authored
30
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
31 # The filenames
32 JS = ${DIR}.js
0e76a6c @jeresig Add a way to generate a single zip file of a release.
jeresig authored
33 MIN = ${DIR}.min.js
34 CSS = ${DIR}.css
35 CSSMIN = ${DIR}.min.css
ac62052 @jeresig Add a way to build copies of jQuery Mobile.
jeresig authored
36
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
37 # The files to include when compiling the JS files
38 JSFILES = js/jquery.ui.widget.js \
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
39 js/jquery.mobile.widget.js \
40 js/jquery.mobile.media.js \
41 js/jquery.mobile.support.js \
42 js/jquery.mobile.vmouse.js \
43 js/jquery.mobile.event.js \
44 js/jquery.mobile.hashchange.js \
45 js/jquery.mobile.page.js \
46 js/jquery.mobile.core.js \
47 js/jquery.mobile.navigation.js \
19c0695 @jblas Changes to allow 3rd party transitions. Developers can now register a…
jblas authored
48 js/jquery.mobile.transition.js \
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
49 js/jquery.mobile.fixHeaderFooter.js \
50 js/jquery.mobile.forms.checkboxradio.js \
51 js/jquery.mobile.forms.textinput.js \
52 js/jquery.mobile.forms.select.js \
53 js/jquery.mobile.buttonMarkup.js \
54 js/jquery.mobile.forms.button.js \
55 js/jquery.mobile.forms.slider.js \
56 js/jquery.mobile.collapsible.js \
57 js/jquery.mobile.controlGroup.js \
58 js/jquery.mobile.fieldContain.js \
59 js/jquery.mobile.listview.js \
60 js/jquery.mobile.listview.filter.js \
61 js/jquery.mobile.dialog.js \
62 js/jquery.mobile.navbar.js \
63 js/jquery.mobile.grid.js \
64 js/jquery.mobile.init.js
65
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
66 # The files to include when compiling the CSS files
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
67 CSSFILES = themes/default/jquery.mobile.theme.css \
68 themes/default/jquery.mobile.core.css \
69 themes/default/jquery.mobile.transitions.css \
70 themes/default/jquery.mobile.grids.css \
71 themes/default/jquery.mobile.headerfooter.css \
72 themes/default/jquery.mobile.navbar.css \
73 themes/default/jquery.mobile.button.css \
74 themes/default/jquery.mobile.collapsible.css \
75 themes/default/jquery.mobile.controlgroup.css \
76 themes/default/jquery.mobile.dialog.css \
77 themes/default/jquery.mobile.forms.checkboxradio.css \
78 themes/default/jquery.mobile.forms.fieldcontain.css \
79 themes/default/jquery.mobile.forms.select.css \
80 themes/default/jquery.mobile.forms.textinput.css \
81 themes/default/jquery.mobile.listview.css \
82 themes/default/jquery.mobile.forms.slider.css
83
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
84 # By default, this is what get runs when make is called without any arguments.
85 # Min and un-min CSS and JS files are the only things built
86 all: init js min css cssmin notify
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
87
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
88 # Build the normal CSS file.
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
89 css: init
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
90 # Build the CSS file
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
91 @@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${CSS}
92 @@cat ${CSSFILES} >> ${OUTPUT}/${CSS}
93
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
94 # Build the minified CSS file
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
95 cssmin: init css
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
96 # Build the minified CSS file
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
97 @@java -jar build/yuicompressor-2.4.4.jar --type css ${OUTPUT}/${CSS} >> ${OUTPUT}/${CSSMIN}
98
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
99 # Build the normal JS file
100 js: init
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
101 # Build the JavaScript file
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
102 @@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${JS}
103 @@cat ${JSFILES} >> ${OUTPUT}/${JS}
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
104
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
105 # Create the output directory. This is in a separate step so its not dependant on other targets
106 init:
107 # Building jQuery Mobile in the "${OUTPUT}" folder
108 @@rm -rf ${OUTPUT}
109 @@mkdir ${OUTPUT}
110
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
111 # Build the minified JS file
112 min: init js
7a01d70 @eddiemonge trying to sneak this in as well
eddiemonge authored
113 # Build the minified JavaScript file
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
114 @@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${MIN}
f29f19c @eddiemonge update compiler link in Makefile
eddiemonge authored
115 @@java -jar build/google-compiler-20110405.jar --js ${OUTPUT}/${JS} --warning_level QUIET --js_output_file ${MIN}.tmp
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
116 @@cat ${MIN}.tmp >> ${OUTPUT}/${MIN}
117 @@rm -f ${MIN}.tmp
118
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
119 # Let the user know the files were built and where they are
120 notify:
121 @@echo "The files have been built and are in " $$(pwd)/${OUTPUT}
122
123 # Pull the latest commits. This is used for the nightly build but can be used to save some keystrokes
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
124 pull:
e4b2f3b @eddiemonge Change git pull to be just 'git pull'
eddiemonge authored
125 @@git pull --quiet
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
126
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
127 # Zip the 4 files and the theme images into one convenient package
128 zip: init js min css cssmin
47a45f5 @jeresig Add deploy functionality to the build script.
jeresig authored
129 @@mkdir -p ${DIR}
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
130 @@cp ${OUTPUT}/${DIR}*.js ${DIR}/
131 @@cp ${OUTPUT}/${DIR}*.css ${DIR}/
47a45f5 @jeresig Add deploy functionality to the build script.
jeresig authored
132 @@cp -R themes/default/images ${DIR}/
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
133 @@zip -rq ${OUTPUT}/${DIR}.zip ${DIR}
8822132 @eddiemonge Feature Request for issue 1177: Make Makefile output cleaner stuff
eddiemonge authored
134 @@rm -fr ${DIR}
47a45f5 @jeresig Add deploy functionality to the build script.
jeresig authored
135
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
136
137 # Used by the jQuery team to make the nightly builds
138 nightly: pull zip
139 # Create the folder to hold the files for the demos
140 @@mkdir -p ${VER}
141
142 # Copy in the base stuff for the demos
143 @@cp -r index.html themes experiments docs ${VER}/
144
145 # First change all the paths from super deep to the same level for JS files
146 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="../../../js|src="js|g' {} \;
147 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="../../js|src="js|g' {} \;
148 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="../js|src="js|g' {} \;
149
150 # Then change all the paths from super deep to the same level for CSS files
151 @@find ${VER} -type f -name '*.html' -exec sed -i 's|media="only all"||g' {} \;
152 @@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../../../|rel="stylesheet" href="|g' {} \;
153 @@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../../|rel="stylesheet" href="|g' {} \;
154 @@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../|rel="stylesheet" href="|g' {} \;
155
156 # Change the empty paths to the location of this nightly file
5f487bb @eddiemonge add images to path, remove nightly folder before moving to there so i…
eddiemonge authored
157 @@find ${VER} -type f -name '*.html' -exec sed -i 's|href="themes/default/"|href="${NIGHTLY_WEBPATH}/${DIR}.min.css"|g' {} \;
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
158 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/jquery.js"|src="http://code.jquery.com/jquery-${JQUERY}.min.js"|' {} \;
5f487bb @eddiemonge add images to path, remove nightly folder before moving to there so i…
eddiemonge authored
159 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/"|src="${NIGHTLY_WEBPATH}/${DIR}.min.js"|g' {} \;
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
160
161 # Move the demos into the output folder
162 @@mv ${VER} ${OUTPUT}/demos
163
5f487bb @eddiemonge add images to path, remove nightly folder before moving to there so i…
eddiemonge authored
164 # Copy the images as well
165 @@cp -R themes/default/images ${OUTPUT}
166
ca55d18 @eddiemonge makefile for lateset
eddiemonge authored
167 @@${RMLATEST}
a65ac5f @eddiemonge change makefile to point to CDN
eddiemonge authored
168 @@scp -r ${OUTPUT} jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/${NIGHTLY_OUTPUT}
169 @@rm -rf ${OUTPUT}
38b8ee5 @eddiemonge Changed Makefile to include nightly build script and other misc fixes
eddiemonge authored
170
47a45f5 @jeresig Add deploy functionality to the build script.
jeresig authored
171 # Used by the jQuery team to deploy a build to the CDN
172 deploy: zip
7e115d6 @jeresig Add in ability to push demos to the jQueryMobile.com server.
jeresig authored
173 # Deploy to CDN
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
174 @@mv ${OUTPUT} ${VER}
f9ec1e4 @jeresig Fix mistake in Makefile deploy script.
jeresig authored
175 @@scp -r ${VER} jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
176 @@mv ${VER} ${OUTPUT}
7e115d6 @jeresig Add in ability to push demos to the jQueryMobile.com server.
jeresig authored
177
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
178 # Deploy Demos to the jQueryMobile.com site
7e115d6 @jeresig Add in ability to push demos to the jQueryMobile.com server.
jeresig authored
179 @@mkdir -p ${VER}
180 @@cp -r index.html themes experiments docs ${VER}/
e2fa299 @jeresig Adjust sub-directory URLs before deploying the demos.
jeresig authored
181
ac519ba @jeresig Simplifying the build script some more.
jeresig authored
182 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../../../js|src="js|g' {} \;
183 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../../js|src="js|g' {} \;
184 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../js|src="js|g' {} \;
e2fa299 @jeresig Adjust sub-directory URLs before deploying the demos.
jeresig authored
185
950784e @jeresig Make some tweaks to the deploy script.
jeresig authored
186 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|media="only all"||g' {} \;
e2fa299 @jeresig Adjust sub-directory URLs before deploying the demos.
jeresig authored
187 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../../../|rel="stylesheet" href="|g' {} \;
188 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../../|rel="stylesheet" href="|g' {} \;
189 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../|rel="stylesheet" href="|g' {} \;
190
38f09ee @jblas Sweep through all files to add a trailing slash to <link> tags that i…
jblas authored
191 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|href="themes/default/"|href="http://code.jquery.com/mobile/${VER}/${DIR}.min.css"|g' {} \;
96c1647 @eddiemonge Changes so make can be run with just make nightly for the nightly builds
eddiemonge authored
192 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="js/jquery.js"|src="http://code.jquery.com/jquery-${JQUERY}.min.js"|' {} \;
950784e @jeresig Make some tweaks to the deploy script.
jeresig authored
193 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="js/"|src="http://code.jquery.com/mobile/${VER}/${DIR}.min.js"|g' {} \;
e2fa299 @jeresig Adjust sub-directory URLs before deploying the demos.
jeresig authored
194
7e115d6 @jeresig Add in ability to push demos to the jQueryMobile.com server.
jeresig authored
195 @@scp -r ${VER} jqadmin@jquerymobile.com:/srv/jquerymobile.com/htdocs/demos/
19c952a @eddiemonge For all versions of make except for deploy, the outputted scripts wil…
eddiemonge authored
196
83fe254 @eddiemonge Makefile: Updated the deploy script and added comments for the regula…
eddiemonge authored
197 # Clean up the local files
198 @@rm -rf ${VER}
199 @@echo "All Done"
Something went wrong with that request. Please try again.