Skip to content

Commit e696d95

Browse files
committed
Make compile_cross generic
1 parent ed15d43 commit e696d95

File tree

2 files changed

+5
-24
lines changed

2 files changed

+5
-24
lines changed
File renamed without changes.

package-openocd.bash

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,18 @@ OUTPUT_VERSION=0.10.0-arduino7-static
2020
export OS=`uname -o || uname`
2121
export TARGET_OS=$OS
2222

23-
if [ -d tools ]; then
24-
rm -rf tools
23+
if [ x$CROSS_COMPILER == x ]; then
24+
CROSS_COMPILER=${CROSS_COMPILE}-gcc
2525
fi
2626

27-
./make_prereq.sh
28-
export PATH=$PWD/tools/bin:$PATH
27+
OUTPUT_TAG=`$CROSS_COMPILER -v 2>&1 | awk '/Target/ { print $2 }'`
2928

30-
which automake
31-
32-
if [[ $CROSS_COMPILE == "mingw" ]] ; then
33-
34-
./compile_win_openocd.sh
35-
36-
else
37-
38-
./compile_unix_openocd.sh
39-
40-
fi
41-
42-
rm -f *.zip
43-
rm -f *.bz2
29+
./compile_cross.sh
4430

4531
cd distrib
46-
OUTPUT_TAG=`ls`
47-
if [[ $CROSS_COMPILE == "mingw" ]] ; then
32+
if [[ $CROSS_COMPILE == *mingw* ]] ; then
4833
zip -r ../openocd-${OUTPUT_VERSION}-${OUTPUT_TAG}.zip *
4934
else
5035
tar -cjvf ../openocd-${OUTPUT_VERSION}-${OUTPUT_TAG}.tar.bz2 *
5136
fi
5237
cd -
53-
54-
55-
56-

0 commit comments

Comments
 (0)