forked from jquery-archive/jquery-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2700: Step 6 Update build and makefiles
- Loading branch information
1 parent
8bc5e42
commit 7a65be6
Showing
2 changed files
with
50 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ DATE = $(shell date "+%Y%m%d") | |
VER = $(shell cat version.txt) | ||
|
||
# The command to replace the @VERSION in the files with the actual version | ||
SED_VER = sed "s/@VERSION/$(shell git log -1 --format=format:" Git || Date: %cd Info SHA1: %H")/" | ||
SED_VER = sed "s/@VERSION/$(shell git log -1 --format=format:" Git > Date: %cd Info SHA1: %H")/" | ||
deploy: SED_VER = sed "s/@VERSION/${VER}/" | ||
|
||
# The version of jQuery core used | ||
|
@@ -33,8 +33,9 @@ JS = ${DIR}.js | |
MIN = ${DIR}.min.js | ||
CSS = ${DIR}.css | ||
CSSMIN = ${DIR}.min.css | ||
CSSSTRUCTURE = ${DIR}.structure.css | ||
CSSSTRUCTUREMIN = ${DIR}.structure.min.css | ||
CSSCORE = ${DIR}.core.css | ||
CSSCOREMIN = ${DIR}.core.min.css | ||
CSSTHEME = default | ||
|
||
# The files to include when compiling the JS files | ||
JSFILES = js/jquery.ui.widget.js \ | ||
|
@@ -72,26 +73,26 @@ JSFILES = js/jquery.ui.widget.js \ | |
js/jquery.mobile.fixHeaderFooter.native.js \ | ||
js/jquery.mobile.init.js | ||
|
||
CSSTHEMEFILES = themes/default/jquery.mobile.theme.css | ||
CSSSTRUCTUREFILES = themes/default/jquery.mobile.core.css \ | ||
themes/default/jquery.mobile.transitions.css \ | ||
themes/default/jquery.mobile.grids.css \ | ||
themes/default/jquery.mobile.headerfooter.css \ | ||
themes/default/jquery.mobile.navbar.css \ | ||
themes/default/jquery.mobile.button.css \ | ||
themes/default/jquery.mobile.collapsible.css \ | ||
themes/default/jquery.mobile.controlgroup.css \ | ||
themes/default/jquery.mobile.dialog.css \ | ||
themes/default/jquery.mobile.forms.checkboxradio.css \ | ||
themes/default/jquery.mobile.forms.fieldcontain.css \ | ||
themes/default/jquery.mobile.forms.select.css \ | ||
themes/default/jquery.mobile.forms.textinput.css \ | ||
themes/default/jquery.mobile.listview.css \ | ||
themes/default/jquery.mobile.forms.slider.css | ||
CSSTHEMEFILES = css/themes/${CSSTHEME}/jquery.mobile.theme.css | ||
CSSCOREFILES = css/core/jquery.mobile.core.css \ | ||
css/core/jquery.mobile.transitions.css \ | ||
css/core/jquery.mobile.grids.css \ | ||
css/core/jquery.mobile.headerfooter.css \ | ||
css/core/jquery.mobile.navbar.css \ | ||
css/core/jquery.mobile.button.css \ | ||
css/core/jquery.mobile.collapsible.css \ | ||
css/core/jquery.mobile.controlgroup.css \ | ||
css/core/jquery.mobile.dialog.css \ | ||
css/core/jquery.mobile.forms.checkboxradio.css \ | ||
css/core/jquery.mobile.forms.fieldcontain.css \ | ||
css/core/jquery.mobile.forms.select.css \ | ||
css/core/jquery.mobile.forms.textinput.css \ | ||
css/core/jquery.mobile.listview.css \ | ||
css/core/jquery.mobile.forms.slider.css | ||
|
||
|
||
# The files to include when compiling the CSS files | ||
CSSFILES = ${CSSTHEMEFILES} ${CSSSTRUCTUREFILES} | ||
CSSFILES = ${CSSTHEMEFILES} ${CSSCOREFILES} | ||
|
||
# By default, this is what get runs when make is called without any arguments. | ||
# Min and un-min CSS and JS files are the only things built | ||
|
@@ -102,14 +103,14 @@ css: init | |
# Build the CSS file | ||
@@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${CSS} | ||
@@cat ${CSSFILES} >> ${OUTPUT}/${CSS} | ||
@@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${CSSSTRUCTURE} | ||
@@cat ${CSSSTRUCTUREFILES} >> ${OUTPUT}/${CSSSTRUCTURE} | ||
@@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${CSSCORE} | ||
@@cat ${CSSCOREFILES} >> ${OUTPUT}/${CSSCORE} | ||
|
||
# Build the minified CSS file | ||
cssmin: init css | ||
# Build the minified CSS file | ||
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${CSS} >> ${OUTPUT}/${CSSMIN} | ||
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${CSSSTRUCTURE} >> ${OUTPUT}/${CSSSTRUCTUREMIN} | ||
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${CSSCORE} >> ${OUTPUT}/${CSSCOREMIN} | ||
|
||
# Build the normal JS file | ||
js: init | ||
|
@@ -144,7 +145,7 @@ zip: init js min css cssmin | |
@@mkdir -p ${DIR} | ||
@@cp ${OUTPUT}/${DIR}*.js ${DIR}/ | ||
@@cp ${OUTPUT}/${DIR}*.css ${DIR}/ | ||
@@cp -R themes/default/images ${DIR}/ | ||
@@cp -R css/themes/${CSSTHEME}/images ${DIR}/ | ||
@@zip -rq ${OUTPUT}/${DIR}.zip ${DIR} | ||
@@rm -fr ${DIR} | ||
|
||
|
@@ -155,7 +156,7 @@ nightly: pull zip | |
@@mkdir -p ${VER} | ||
|
||
# Copy in the base stuff for the demos | ||
@@cp -r index.html themes experiments docs tools ${VER}/ | ||
@@cp -r index.html css experiments docs tools ${VER}/ | ||
|
||
# First change all the paths from super deep to the same level for JS files | ||
@@find ${VER} -type f -name '*.html' -exec sed -i 's|src="../../../js|src="js|g' {} \; | ||
|
@@ -169,15 +170,15 @@ nightly: pull zip | |
@@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../|rel="stylesheet" href="|g' {} \; | ||
|
||
# Change the empty paths to the location of this nightly file | ||
@@find ${VER} -type f -name '*.html' -exec sed -i 's|href="themes/default/"|href="${NIGHTLY_WEBPATH}/${DIR}.min.css"|g' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i 's|href="css/themes/${CSSTHME}/"|href="${NIGHTLY_WEBPATH}/${DIR}.min.css"|g' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/jquery.js"|src="http://code.jquery.com/jquery-${JQUERY}.min.js"|' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/"|src="${NIGHTLY_WEBPATH}/${DIR}.min.js"|g' {} \; | ||
|
||
# Move the demos into the output folder | ||
@@mv ${VER} ${OUTPUT}/demos | ||
|
||
# Copy the images as well | ||
@@cp -R themes/default/images ${OUTPUT} | ||
@@cp -R css/themes/${CSSTHME}/images ${OUTPUT} | ||
|
||
@@${RMLATEST} | ||
@@scp -r ${OUTPUT} [email protected]:/var/www/html/code.jquery.com/mobile/${NIGHTLY_OUTPUT} | ||
|
@@ -192,7 +193,7 @@ deploy: zip | |
|
||
# Deploy Demos to the jQueryMobile.com site | ||
@@mkdir -p ${VER} | ||
@@cp -r index.html themes experiments docs tools ${VER}/ | ||
@@cp -r index.html css experiments docs tools ${VER}/ | ||
|
||
@@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../../../js|src="js|g' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../../js|src="js|g' {} \; | ||
|
@@ -203,7 +204,7 @@ deploy: zip | |
@@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../../|rel="stylesheet" href="|g' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../|rel="stylesheet" href="|g' {} \; | ||
|
||
@@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' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|href="css/themes/${CSSTHEME}/"|href="http://code.jquery.com/mobile/${VER}/${DIR}.min.css"|g' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="js/jquery.js"|src="http://code.jquery.com/jquery-${JQUERY}.min.js"|' {} \; | ||
@@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="js/"|src="http://code.jquery.com/mobile/${VER}/${DIR}.min.js"|g' {} \; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters