1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

[sam] refactored build.xml to ensure compatibility with ant 1.7.1

This commit is contained in:
Cristian Maglie
2012-05-16 17:35:54 +02:00
parent d9d08402d5
commit 844f559439

View File

@ -150,16 +150,16 @@
<!-- Download of toolchains for ARM --> <!-- Download of toolchains for ARM -->
<!-- - - - - - - - - - - - - - - - - - - --> <!-- - - - - - - - - - - - - - - - - - - -->
<target name="get-arm-toolchain" description="Download and unpack toolchain for ARM"> <target name="unzip-arm-toolchain" description="Unpack toolchain for ARM. Also download latest distribution file if needed.">
<antcall target="${platform}-get-arm-toolchain" /> <antcall target="${platform}-unzip-arm-toolchain" />
</target> </target>
<target name="get-arm-toolchain-help" if="arm_not_available"> <target name="get-arm-toolchain-help" unless="arm_available">
<echo> <echo>
========================================================= =========================================================
To download and install ARM-gcc toolchain use the command To download and install ARM-gcc toolchain use the command
ant get-arm-toolchain ant unzip-arm-toolchain
========================================================= =========================================================
</echo> </echo>
</target> </target>
@ -246,28 +246,30 @@
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/> <exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
</target> </target>
<target name="macosx-check-arm-toolchain-distfile">
<available file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macosx.tar.gz" property="arm_distfile_available" />
</target>
<target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain-distfile" unless="arm_distfile_available">
<!-- Retrieve ARM toolchain -->
<get
src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"
dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" verbose="true" />
</target>
<target name="macosx-check-arm-toolchain"> <target name="macosx-check-arm-toolchain">
<available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi" <available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi"
property="arm_available" /> property="arm_available" />
<condition property="arm_not_available">
<not>
<isset property="arm_available" />
</not>
</condition>
</target> </target>
<target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain" if="arm_not_available"> <target name="macosx-unzip-arm-toolchain" depends="macosx-get-arm-toolchain, macosx-check-arm-toolchain" unless="arm_available">
<!-- Retrieve ARM toolchain... -->
<get
src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"
dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"
skipexisting="true" verbose="true" />
<checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha" <checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha"
fileext=".sha" verifyproperty="checksum.matches"/> fileext=".sha" verifyproperty="checksum.matches"/>
<condition property="checksum.matches.fail"> <condition property="checksum.matches.fail">
<equals arg1="${checksum.matches}" arg2="false"/> <equals arg1="${checksum.matches}" arg2="false"/>
</condition> </condition>
<fail if="checksum.matches.fail"> <fail if="checksum.matches.fail">Checksum failed.
File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum. File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum.
Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again. Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again.
</fail> </fail>
@ -433,32 +435,35 @@
<exec executable="./linux/work/arduino" spawn="false"/> <exec executable="./linux/work/arduino" spawn="false"/>
</target> </target>
<target name="linux-check-arm-toolchain"> <target name="linux-check-arm-toolchain-distfile">
<available file="linux/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> <available file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" property="arm_distfile_available" />
<condition property="arm_not_available">
<not>
<isset property="arm_available" />
</not>
</condition>
</target> </target>
<target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain" if="arm_not_available"> <target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available">
<!-- Retrieve ARM toolchain... --> <!-- Retrieve ARM toolchain -->
<get <get
src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"
dest="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" dest="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"
skipexisting="true" verbose="true" /> verbose="true" />
</target>
<target name="linux-check-arm-toolchain">
<available file="linux/work/hardware/tools/g++_arm_none_eabi" property="arm_available" />
</target>
<target name="linux-unzip-arm-toolchain" depends="linux-get-arm-toolchain, linux-check-arm-toolchain" unless="arm_available">
<checksum file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" algorithm="sha" <checksum file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" algorithm="sha"
fileext=".sha" verifyproperty="checksum.matches"/> fileext=".sha" verifyproperty="checksum.matches"/>
<condition property="checksum.matches.fail"> <condition property="checksum.matches.fail">
<equals arg1="${checksum.matches}" arg2="false"/> <equals arg1="${checksum.matches}" arg2="false"/>
</condition> </condition>
<fail if="checksum.matches.fail"> <fail if="checksum.matches.fail">Checksum failed.
File gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz failed checksum. File gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz failed checksum.
Please remove "linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" to download again. Please remove "linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" to download it again.
</fail> </fail>
<!-- ...and unzip on the destination folder --> <!-- Unzip toolchain to the destination folder -->
<exec executable="tar" output="/dev/null" os="Linux"> <exec executable="tar" output="/dev/null" os="Linux">
<arg value="xfz"/> <arg value="xfz"/>
<arg value="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"/> <arg value="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"/>
@ -466,10 +471,14 @@
</exec> </exec>
</target> </target>
<target name="linux64-get-arm-toolchain" depends="linux-check-arm-toolchain" if="arm_not_available"> <target name="linux64-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available">
<antcall target="linux-get-arm-toolchain" /> <antcall target="linux-get-arm-toolchain" />
</target> </target>
<target name="linux64-unzip-arm-toolchain" depends="linux-get-arm-toolchain" unless="arm_available">
<antcall target="linux-unzip-arm-toolchain" />
</target>
<target name="linux-dist" depends="build" <target name="linux-dist" depends="build"
description="Build .tar.gz of linux version"> description="Build .tar.gz of linux version">