Mercurial > mxe-octave
annotate mk-dist @ 2921:f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 12 Dec 2012 12:46:04 -0500 |
parents | |
children | e7bd76ab0710 |
rev | line source |
---|---|
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 #! /bin/bash |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 set -e |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 TOPDIR=$(pwd) |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 PATH=/scratch/jwe/src/mxe-octave/usr/bin:$PATH |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 TARGET=i686-pc-mingw32 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 BUILD=x86_64-unwknown-linux-gnu |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 STRIP=$TARGET-strip |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 echo "deleting previous dist directory..." |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
12 rm -rf dist |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
13 mkdir -p dist/octave |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
14 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
15 echo "building octave and dependencies..." |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 make octave native-gcc native-binutils JOBS=9 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 echo "copying files..." |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 cd $TOPDIR/cross-tools/$PREFIX/$TARGET |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 find . -type f -o -type l | sed "s,./,," > $TOPDIR/excluded-gcc-files |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 cd $TOPDIR/usr/$TARGET |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
22 tar -c -h -X $TOPDIR/excluded-gcc-files -f - . | ( cd $TOPDIR/dist/octave ; tar xpf - ) |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
23 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
24 cat > $TOPDIR/excluded-native-files << EOF |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 ./$TARGET |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 ./bin/$TARGET-*.exe |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 EOF |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 cd $TOPDIR/native-tools/usr |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 tar -c -h -X $TOPDIR/excluded-native-files -f - . | ( cd $TOPDIR/dist/octave ; tar xpf - ) |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 cd $TOPDIR/dist/octave |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 for f in $(find . -name '*.dll'); do |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 echo stripping $f... |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 $STRIP $f |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 done |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 echo "creating tar file..." |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 cd $TOPDIR/dist |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 tar -c -j -f octave.tar.bz2 octave |