Mercurial > mxe-octave
annotate mk-dist @ 3322:41645c0a134c
Remove *.dll files placed by Qt in lib directory, put them in bin directory instead.
* src/qt.mk: Remove *.dll files placed by Qt in lib directory, put them in bin
directory instead.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 14 Nov 2013 07:42:11 -0800 |
parents | 819e316a7977 |
children | ab6116aa1039 |
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 |
3316
f11beaa3e1f0
mk-dist: Don't set -j option to 9 by default. Use --jobs or settings.mk file to override.
Rik <rik@octave.org>
parents:
3274
diff
changeset
|
5 ## Override with --jobs option or set JOBS variable in settings.mk |
f11beaa3e1f0
mk-dist: Don't set -j option to 9 by default. Use --jobs or settings.mk file to override.
Rik <rik@octave.org>
parents:
3274
diff
changeset
|
6 jobs=0 |
2945 | 7 |
2957 | 8 OCTAVE_TARGET=octave |
2987
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
9 |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
10 strip=yes |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
11 installer=no |
2945 | 12 while [ $# -gt 0 ]; do |
13 case "$1" in | |
14 --jobs) | |
15 shift | |
16 if [ $# -gt 0 ]; then | |
17 jobs=$1 | |
18 shift | |
19 else | |
20 echo "mk-dist: expecting argument for --jobs option" 1>&2 | |
21 exit 1 | |
22 fi | |
23 ;; | |
2957 | 24 --stable) |
25 OCTAVE_TARGET=stable-octave | |
26 shift | |
27 ;; | |
2987
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
28 --no-strip) |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
29 strip=no |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
30 shift |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
31 ;; |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
32 --installer) |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
33 installer=yes |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
34 echo "making installer" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
35 shift |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
36 ;; |
2945 | 37 *) |
38 echo "mk-dist: unrecognized option: $1" 1>&2 | |
39 exit 1 | |
40 ;; | |
41 esac | |
42 done | |
43 | |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 TOPDIR=$(pwd) |
2945 | 45 PATH=$TOPDIR/usr/bin:$PATH |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 TARGET=i686-pc-mingw32 |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
3010
diff
changeset
|
47 PREFIX=/usr/$TARGET |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
48 STRIP=$TARGET-strip |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
49 DATE=$(date +%Y-%m-%d-%H-%M) |
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
50 OCTAVE_DIST_DIR=$TOPDIR/dist/$OCTAVE_TARGET-$DATE |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
51 INSTALLER_PKG= |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
52 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
53 if [ $installer = "yes" ]; then |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
54 echo "Adding installer to build dependancies" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
55 INSTALLER_PKG="nsis" |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
56 fi |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 echo "deleting previous dist directory..." |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
59 rm -rf $TOPDIR/dist |
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
60 mkdir -p $OCTAVE_DIST_DIR |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 echo "building octave and dependencies..." |
3316
f11beaa3e1f0
mk-dist: Don't set -j option to 9 by default. Use --jobs or settings.mk file to override.
Rik <rik@octave.org>
parents:
3274
diff
changeset
|
63 if [ $jobs -gt 0 ]; then |
f11beaa3e1f0
mk-dist: Don't set -j option to 9 by default. Use --jobs or settings.mk file to override.
Rik <rik@octave.org>
parents:
3274
diff
changeset
|
64 make $OCTAVE_TARGET $INSTALLER_PKG msys-base native-gcc native-binutils octave-forge-packages npp units JOBS=$jobs |
f11beaa3e1f0
mk-dist: Don't set -j option to 9 by default. Use --jobs or settings.mk file to override.
Rik <rik@octave.org>
parents:
3274
diff
changeset
|
65 else |
f11beaa3e1f0
mk-dist: Don't set -j option to 9 by default. Use --jobs or settings.mk file to override.
Rik <rik@octave.org>
parents:
3274
diff
changeset
|
66 make $OCTAVE_TARGET $INSTALLER_PKG msys-base native-gcc native-binutils octave-forge-packages npp units |
f11beaa3e1f0
mk-dist: Don't set -j option to 9 by default. Use --jobs or settings.mk file to override.
Rik <rik@octave.org>
parents:
3274
diff
changeset
|
67 fi |
2945 | 68 |
2956 | 69 echo "generating lists of files to exclude..." |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 |
2956 | 71 echo " native files..." |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 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
|
73 ./$TARGET |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 ./bin/$TARGET-*.exe |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 EOF |
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 |
2956 | 77 echo " gcc cross compiler files..." |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
3010
diff
changeset
|
78 cd $TOPDIR/cross-tools/$TOPDIR/$PREFIX |
2956 | 79 find . -type f -o -type l | sed "s,./,," > $TOPDIR/excluded-gcc-files |
80 | |
81 echo "copying files..." | |
82 | |
83 echo " octave and dependencies..." | |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
3010
diff
changeset
|
84 cd $TOPDIR/$PREFIX |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
85 tar -c -h -X $TOPDIR/excluded-gcc-files -f - . | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) |
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
86 cp $TOPDIR/build_packages.m $OCTAVE_DIST_DIR/src |
2957 | 87 |
2965 | 88 echo " octaverc file..." |
89 cp $TOPDIR/octaverc $OCTAVE_DIST_DIR/share/octave/site/m/startup/octaverc | |
90 | |
2956 | 91 echo " native tools..." |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
92 cd $TOPDIR/native-tools/usr |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
93 tar -c -h -X $TOPDIR/excluded-native-files -f - . | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
94 |
2956 | 95 echo " libgcc_s_dw2-1.dll to bin directory" |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
96 cd $OCTAVE_DIST_DIR |
2956 | 97 cp lib/gcc/i686-pc-mingw32/libgcc_s_dw2-1.dll bin |
98 | |
99 echo " msys base files..." | |
100 cd $TOPDIR/msys-base | |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
101 tar -c -h -f - . | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) |
2956 | 102 |
2964 | 103 echo " notepad++..." |
104 cd $TOPDIR | |
105 tar -c -h -f - notepad++ | ( cd $OCTAVE_DIST_DIR ; tar xpf - ) | |
106 cp $TOPDIR/build_packages.m $OCTAVE_DIST_DIR/src | |
107 | |
2930 | 108 echo "making all files writable by user..." |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
109 chmod -R u+w $OCTAVE_DIST_DIR |
2930 | 110 |
2987
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
111 if [ $strip = "yes" ]; then |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
112 echo "stripping files..." |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
113 cd $OCTAVE_DIST_DIR |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
114 for f in $(find . -name '*.dll' -o -name '*.exe'); do |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
115 echo " $f" |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
116 $STRIP $f |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
117 done |
eb1643bd900c
mk-dist: new argument, --no-strip
John W. Eaton <jwe@octave.org>
parents:
2965
diff
changeset
|
118 fi |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
119 |
2956 | 120 #echo "creating tar file..." |
121 #cd $TOPDIR/dist | |
2962
486c081fd0b5
mk-dist: create octave file with date info
John W. Eaton <jwe@octave.org>
parents:
2958
diff
changeset
|
122 #tar -c -j -f $OCTAVE_TARGET-$DATE.tar.bz2 $OCTAVE_TARGET-$DATE |
2956 | 123 |
2921
f129bd6b8d6b
script for building a tar.bz2 file with Octave and dependncies
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
124 cd $TOPDIR/dist |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
125 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
126 if [ $installer = "yes" ]; then |
3317
819e316a7977
mk-dist: Don't use $SHELL in case it is anything other than bash.
Rik <rik@octave.org>
parents:
3316
diff
changeset
|
127 ../makeinst-script.sh $OCTAVE_TARGET-$DATE |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
128 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
129 echo "Generating installer ..." |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
130 $TOPDIR/usr/bin/$TARGET-makensis octave.nsi > /dev/null |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
131 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
132 if [ -e Octave-Installer.exe ]; then |
3010
8ac67219c241
Updates for nsis build and installer creation
John Donoghue <john.donoghue@ieee.org>
parents:
2992
diff
changeset
|
133 echo "Installer created" |
2992
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
134 rm octave.nsi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
135 fi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
136 |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
137 else |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
138 echo "creating zip file..." |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
139 zip -q -9 -r $OCTAVE_TARGET-$DATE.zip $OCTAVE_TARGET-$DATE |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
140 fi |
4b450c162e39
Add ability to create simple NSIS installer
John Donoghue <john.donoghue@ieee.org>
parents:
2987
diff
changeset
|
141 |