Mercurial > mxe-octave
view mk-dist @ 2956:dfa81fbfc1f5
msys binary packages
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 11 Jan 2013 22:33:56 -0500 |
parents | f0fe5698ee67 |
children | 0c4eab3a7903 |
line wrap: on
line source
#! /bin/bash set -e jobs=9 while [ $# -gt 0 ]; do case "$1" in --jobs) shift if [ $# -gt 0 ]; then jobs=$1 shift else echo "mk-dist: expecting argument for --jobs option" 1>&2 exit 1 fi ;; *) echo "mk-dist: unrecognized option: $1" 1>&2 exit 1 ;; esac done TOPDIR=$(pwd) PATH=$TOPDIR/usr/bin:$PATH PREFIX=/usr TARGET=i686-pc-mingw32 BUILD=x86_64-unwknown-linux-gnu STRIP=$TARGET-strip echo "deleting previous dist directory..." rm -rf dist mkdir -p dist/octave echo "building octave and dependencies..." make octave msys-base native-gcc native-binutils JOBS=$jobs echo "generating lists of files to exclude..." echo " native files..." cat > $TOPDIR/excluded-native-files << EOF ./$TARGET ./bin/$TARGET-*.exe EOF echo " gcc cross compiler files..." cd $TOPDIR/cross-tools/$TOPDIR/$PREFIX/$TARGET find . -type f -o -type l | sed "s,./,," > $TOPDIR/excluded-gcc-files echo "copying files..." echo " octave and dependencies..." cd $TOPDIR/usr/$TARGET tar -c -h -X $TOPDIR/excluded-gcc-files -f - . | ( cd $TOPDIR/dist/octave ; tar xpf - ) echo " native tools..." cd $TOPDIR/native-tools/usr tar -c -h -X $TOPDIR/excluded-native-files -f - . | ( cd $TOPDIR/dist/octave ; tar xpf - ) echo " libgcc_s_dw2-1.dll to bin directory" cd $TOPDIR/dist/octave cp lib/gcc/i686-pc-mingw32/libgcc_s_dw2-1.dll bin echo " msys base files..." cd $TOPDIR/msys-base tar -c -h -f - . | ( cd $TOPDIR/dist/octave ; tar xpf - ) echo "making all files writable by user..." chmod -R u+w $TOPDIR/dist/octave echo "stripping files..." cd $TOPDIR/dist/octave for f in $(find . -name '*.dll' -o -name '*.exe'); do echo " $f" $STRIP $f done #echo "creating tar file..." #cd $TOPDIR/dist #tar -c -j -f octave.tar.bz2 octave echo "creating zip file..." cd $TOPDIR/dist zip -q -9 -r octave.zip octave