Permalink
Browse files

2700: Step 6 Update build and makefiles

  • Loading branch information...
eddiemonge committed Oct 17, 2011
1 parent 8bc5e42 commit 7a65be6d88718bc6e8b30e76a37743af48eda155
Showing with 50 additions and 55 deletions.
  1. +30 −29 Makefile
  2. +20 −26 build.xml
View
@@ -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} jqadmin@code.origin.jquery.com:/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' {} \;
View
@@ -1,24 +1,25 @@
<?xml version="1.0"?>
<project name="jquery-mobile" basedir="." default="merge">
- <property name="cssdir" location="themes/default"/>
<property name="jsdir" location="js"/>
- <property name="css-theme-sources" value="jquery.mobile.theme.css"/>
- <property name="css-structure-sources" value="jquery.mobile.core.css,
- jquery.mobile.transitions.css,
- jquery.mobile.grids.css,
- jquery.mobile.headerfooter.css,
- jquery.mobile.navbar.css,
- jquery.mobile.button.css,
- jquery.mobile.collapsible.css,
- jquery.mobile.controlgroup.css,
- jquery.mobile.dialog.css,
- jquery.mobile.forms.checkboxradio.css,
- jquery.mobile.forms.fieldcontain.css,
- jquery.mobile.forms.select.css,
- jquery.mobile.forms.textinput.css,
- jquery.mobile.listview.css,
- jquery.mobile.forms.slider.css"/>
+ <property name="csstheme-dir" location="css/themes/default"/>
+ <property name="csstheme-sources" value="jquery.mobile.theme.css"/>
+ <property name="csscore-dir" location="css/core"/>
+ <property name="csscore-sources" value="jquery.mobile.core.css,
+ jquery.mobile.transitions.css,
+ jquery.mobile.grids.css,
+ jquery.mobile.headerfooter.css,
+ jquery.mobile.navbar.css,
+ jquery.mobile.button.css,
+ jquery.mobile.collapsible.css,
+ jquery.mobile.controlgroup.css,
+ jquery.mobile.dialog.css,
+ jquery.mobile.forms.checkboxradio.css,
+ jquery.mobile.forms.fieldcontain.css,
+ jquery.mobile.forms.select.css,
+ jquery.mobile.forms.textinput.css,
+ jquery.mobile.listview.css,
+ jquery.mobile.forms.slider.css"/>
<property name="js-sources" value="jquery.ui.widget.js,
jquery.mobile.widget.js,
jquery.mobile.media.js,
@@ -56,20 +57,13 @@
<target name="merge">
<antcall target="merge_css" />
- <antcall target="merge_stucture_css" />
<antcall target="merge_js" />
</target>
<target name="merge_css">
<concat destfile="combine/jquery.mobile.css">
- <filelist dir="${cssdir}" files="${css-theme-sources}"/>
- <filelist dir="${cssdir}" files="${css-structure-sources}"/>
- </concat>
- </target>
-
- <target name="merge_structure_css">
- <concat destfile="combine/jquery.mobile.structure.css">
- <filelist dir="${cssdir}" files="${css-structure-sources}"/>
+ <filelist dir="${csstheme-dir}" files="${csstheme-sources}"/>
+ <filelist dir="${csscore-dir}" files="${csscore-sources}"/>
</concat>
</target>

0 comments on commit 7a65be6

Please sign in to comment.