comparison mk-dist @ 2945:92d86e3e9173

improve mk-dist script
author John W. Eaton <jwe@octave.org>
date Fri, 04 Jan 2013 23:50:37 -0500
parents e7bd76ab0710
children 1afd21db3bf1
comparison
equal deleted inserted replaced
2944:484c88cf1ecf 2945:92d86e3e9173
1 #! /bin/bash 1 #! /bin/bash
2 2
3 set -e 3 set -e
4 4
5 jobs=9
6
7 while [ $# -gt 0 ]; do
8 case "$1" in
9 --jobs)
10 shift
11 if [ $# -gt 0 ]; then
12 jobs=$1
13 shift
14 else
15 echo "mk-dist: expecting argument for --jobs option" 1>&2
16 exit 1
17 fi
18 ;;
19 *)
20 echo "mk-dist: unrecognized option: $1" 1>&2
21 exit 1
22 ;;
23 esac
24 done
25
5 TOPDIR=$(pwd) 26 TOPDIR=$(pwd)
6 PATH=/scratch/jwe/src/mxe-octave/usr/bin:$PATH 27 PATH=$TOPDIR/usr/bin:$PATH
28 PREFIX=/usr
7 TARGET=i686-pc-mingw32 29 TARGET=i686-pc-mingw32
8 BUILD=x86_64-unwknown-linux-gnu 30 BUILD=x86_64-unwknown-linux-gnu
9 STRIP=$TARGET-strip 31 STRIP=$TARGET-strip
10 32
11 echo "deleting previous dist directory..." 33 echo "deleting previous dist directory..."
12 rm -rf dist 34 rm -rf dist
13 mkdir -p dist/octave 35 mkdir -p dist/octave
14 36
15 echo "building octave and dependencies..." 37 echo "building octave and dependencies..."
16 make octave native-gcc native-binutils JOBS=9 38 make octave native-gcc native-binutils JOBS=$jobs
39
40 exit 1
17 41
18 echo "copying files..." 42 echo "copying files..."
19 cd $TOPDIR/cross-tools/$PREFIX/$TARGET 43 cd $TOPDIR/cross-tools/$TOPDIR/$PREFIX/$TARGET
20 find . -type f -o -type l | sed "s,./,," > $TOPDIR/excluded-gcc-files 44 find . -type f -o -type l | sed "s,./,," > $TOPDIR/excluded-gcc-files
21 cd $TOPDIR/usr/$TARGET 45 cd $TOPDIR/usr/$TARGET
22 tar -c -h -X $TOPDIR/excluded-gcc-files -f - . | ( cd $TOPDIR/dist/octave ; tar xpf - ) 46 tar -c -h -X $TOPDIR/excluded-gcc-files -f - . | ( cd $TOPDIR/dist/octave ; tar xpf - )
23 47
24 cat > $TOPDIR/excluded-native-files << EOF 48 cat > $TOPDIR/excluded-native-files << EOF