Skip to content

Commit 9498518

Browse files
Split off toolchain and native library installs in build.xml
This doesn't change anything except a bit of ordering in the build, but prepares for making these steps optional.
1 parent ea8b7ff commit 9498518

File tree

1 file changed

+52
-38
lines changed

1 file changed

+52
-38
lines changed

build/build.xml

+52-38
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
<fail message="wrong platform (${os.name})" />
199199
</target>
200200

201-
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
201+
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build, macosx-native-libs, macosx-toolchains" description="Build Mac OS X version">
202202
<mkdir dir="macosx/work" />
203203

204204
<!-- assemble the pde -->
@@ -222,9 +222,12 @@
222222
<fileset file="shared/revisions.txt" />
223223
</copy>
224224

225-
<!-- Unzip AVR tools -->
226-
<!-- <unzip dest="macosx/work/Arduino.app/Contents/Resources/Java/hardware" src="macosx/dist/tools-universal.zip" overwrite="false"/> -->
225+
<antcall target="assemble">
226+
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
227+
</antcall>
228+
</target>
227229

230+
<target name="macosx-toolchains">
228231
<exec executable="unzip">
229232
<arg value="-q" />
230233
<arg value="-n" />
@@ -243,10 +246,6 @@
243246
<fileset file="macosx/dist/eeprom.h" />
244247
</copy>
245248

246-
<antcall target="assemble">
247-
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
248-
</antcall>
249-
250249
<antcall target="unzip-arm-toolchain">
251250
<param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" />
252251
<param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" />
@@ -259,7 +258,9 @@
259258
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man/**/*"/>
260259
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man"/>
261260
</delete>
261+
</target>
262262

263+
<target name="macosx-native-libs">
263264
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" />
264265
<unzip src="macosx/libastylej-2.03.zip" dest="macosx" overwrite="true"/>
265266
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" />
@@ -460,7 +461,22 @@
460461

461462
<copy todir="linux/work" file="linux/dist/arduino" />
462463
<chmod perm="755" file="linux/work/arduino" />
464+
</target>
465+
466+
<target name="linux-native-libs">
467+
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" />
468+
<unzip src="linux/libastylej-2.03.zip" dest="linux" overwrite="true"/>
469+
<copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
470+
<chmod perm="755" file="linux/work/lib/libastylej.so" />
471+
</target>
472+
473+
<target name="linux32-build" depends="linux-build, linux32-toolchains, linux-native-libs"
474+
description="Build linux (32-bit) version" />
463475

476+
<target name="linux64-build" depends="linux-build, linux64-toolchains, linux-native-libs"
477+
description="Build linux (64-bit) version" />
478+
479+
<target name="linux-toolchains">
464480
<mkdir dir="linux/work/hardware/tools" />
465481
<copy file="linux/dist/tools/adk2install" todir="linux/work/hardware/tools" />
466482
<copy file="linux/dist/tools/adk2tool" todir="linux/work/hardware/tools" />
@@ -472,14 +488,9 @@
472488
<chmod perm="755" file="linux/work/hardware/tools/bossac" />
473489
<chmod perm="755" file="linux/work/hardware/tools/adk2tool" />
474490
<chmod perm="755" file="linux/work/hardware/tools/adk2install" />
475-
476-
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" />
477-
<unzip src="linux/libastylej-2.03.zip" dest="linux" overwrite="true"/>
478-
<copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
479-
<chmod perm="755" file="linux/work/lib/libastylej.so" />
480491
</target>
481492

482-
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
493+
<target name="linux32-toolchains" depends="linux-toolchains">
483494
<!-- Unzip ARM tools -->
484495
<antcall target="unzip-arm-toolchain">
485496
<param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" />
@@ -492,10 +503,9 @@
492503
<arg value="-xjf"/>
493504
<arg value="../../avr_tools_linux32.tar.bz2"/>
494505
</exec>
495-
496506
</target>
497507

498-
<target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
508+
<target name="linux64-toolchains" depends="linux-toolchains">
499509
<!-- Unzip ARM tools -->
500510
<antcall target="unzip-arm-toolchain">
501511
<param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" />
@@ -630,7 +640,7 @@
630640
</target>
631641

632642
<target name="windows-build"
633-
depends="revision-check, windows-checkos, subprojects-build"
643+
depends="revision-check, windows-checkos, subprojects-build, windows-toolchains, windows-native-libs"
634644
description="Build windows version">
635645
<mkdir dir="windows/work" />
636646

@@ -656,28 +666,6 @@
656666
<fileset dir="windows/dist" includes="drivers/**" />
657667
</copy>
658668

659-
<!-- Unzip AVR tools -->
660-
<get src="http://downloads.arduino.cc/WinAVR-20081205-arduino-2.zip" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" />
661-
<unzip dest="windows/work/hardware" src="windows/WinAVR-20081205-arduino-2.zip" overwrite="false"/>
662-
663-
<copy todir="windows/work/hardware/tools/avr/avr/include/avr">
664-
<fileset file="windows/eeprom.h" />
665-
</copy>
666-
667-
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" />
668-
<unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
669-
<copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" />
670-
671-
<!-- Copy bossac.exe tool -->
672-
<copy todir="windows/work/hardware/tools">
673-
<fileset file="windows/bossac.exe" />
674-
<fileset file="windows/listComPorts.exe" />
675-
</copy>
676-
<chmod perm="755">
677-
<fileset file="windows/work/hardware/tools/bossac.exe" />
678-
<fileset file="windows/work/hardware/tools/listComPorts.exe" />
679-
</chmod>
680-
681669
<antcall target="assemble">
682670
<param name="target.path" value="windows/work" />
683671
</antcall>
@@ -699,6 +687,32 @@
699687
<chmod perm="755">
700688
<fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" />
701689
</chmod>
690+
</target>
691+
692+
<target name="windows-native-libs">
693+
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" />
694+
<unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
695+
<copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" />
696+
</target>
697+
698+
<target name="windows-toolchains">
699+
<!-- Unzip AVR tools -->
700+
<get src="http://downloads.arduino.cc/WinAVR-20081205-arduino-2.zip" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" />
701+
<unzip dest="windows/work/hardware" src="windows/WinAVR-20081205-arduino-2.zip" overwrite="false"/>
702+
703+
<copy todir="windows/work/hardware/tools/avr/avr/include/avr">
704+
<fileset file="windows/eeprom.h" />
705+
</copy>
706+
707+
<!-- Copy bossac.exe tool -->
708+
<copy todir="windows/work/hardware/tools">
709+
<fileset file="windows/bossac.exe" />
710+
<fileset file="windows/listComPorts.exe" />
711+
</copy>
712+
<chmod perm="755">
713+
<fileset file="windows/work/hardware/tools/bossac.exe" />
714+
<fileset file="windows/work/hardware/tools/listComPorts.exe" />
715+
</chmod>
702716

703717
<!-- Unzip ARM toolchain -->
704718
<antcall target="unzip-arm-toolchain">

0 commit comments

Comments
 (0)