+ <target name="qunit-clone" unless="qunit">
+ <exec executable="git" outputproperty="git-qunit" >
+ <arg line="clone git://github.com/jquery/qunit.git test/qunit" />
+ </exec>
+ <echo message="git clone qunit: ${git-qunit}" />
+ </target>
+ <target name="qunit-pull" if="qunit">
+ <exec executable="git" outputproperty="git-qunit" dir="test/qunit" >
+ <arg line="pull origin master" />
+ </exec>
+ <echo message="git pull sizzle: ${git-qunit}" />
+ </target>
+ <target name="sizzle-clone" unless="sizzle">
+ <exec executable="git" outputproperty="git-sizzle" >
+ <arg line="clone git://github.com/jeresig/sizzle.git src/sizzle" />
+ </exec>
+ <echo message="git clone sizzle: ${git-sizzle}" />
+ </target>
+ <target name="sizzle-pull" if="sizzle">
+ <exec executable="git" outputproperty="git-sizzle" dir="src/sizzle" >
+ <arg line="pull origin master" />
+ </exec>
+ <echo message="git pull sizzle: ${git-sizzle}" />
+ </target>
+
+ <target name="init" depends="qunit-clone,qunit-pull,sizzle-clone,sizzle-pull" />
+
+ <target name="selector" depends="init" description="Builds the selector library for jQuery from Sizzle.">
+ <copy file="src/sizzle/sizzle.js" tofile="src/selector.js" overwrite="true" />
+ <replaceregexp match="// EXPOSE(.*) " replace="// EXPOSE\1 ${sizzle-exports}" file="src/selector.js" />
+ <replaceregexp match="window.Sizzle(.*) " replace="" file="src/selector.js" />
+ </target>
+
+ <target name="jquery" depends="init,selector" description="Main jquery build, concatenates source files and replaces @VERSION">
+ <echo message="Building ${JQ}" />
+ <mkdir dir="${dist}" />
+ <concat destfile="${JQ}">
+ <fileset file="src/intro.js" />
+ <fileset file="src/core.js" />
+ <fileset file="src/support.js" />
+ <fileset file="src/data.js" />
+ <fileset file="src/queue.js" />
+ <fileset file="src/attributes.js" />
+ <fileset file="src/event.js" />
+ <fileset file="src/selector.js" />
+ <fileset file="src/traversing.js" />
+ <fileset file="src/manipulation.js" />
+ <fileset file="src/css.js" />
+ <fileset file="src/ajax.js" />
+ <fileset file="src/effects.js" />
+ <fileset file="src/offset.js" />
+ <fileset file="src/dimensions.js" />
+ <fileset file="src/outro.js" />
+ </concat>
+ <replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${JQ}" />
+ <exec executable="git" outputproperty="date">
+ <arg line="log -1 --pretty=format:%ad" />
+ </exec>
+ <replaceregexp match="Date: " replace="Date: ${date}" file="${JQ}" />
+ <echo message="${JQ} built." />
+ </target>