2003-09-12 20:35:20 -04:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
## Win32 cross-compilation for Elk -- Sam Hocevar <sam@zoy.org>
|
|
|
|
## $Id$
|
|
|
|
|
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
|
2003-09-13 02:33:51 -04:00
|
|
|
# Clean up our working directory
|
2003-09-12 20:35:20 -04:00
|
|
|
DIRNAME="elk-`sed -ne '/^VERSION/s/[^0-9]*//p' Makefile`"
|
|
|
|
DESTDIR="`pwd`/${DIRNAME}"
|
|
|
|
rm -Rf "${DIRNAME}"
|
|
|
|
rm -f "${DIRNAME}.zip"
|
|
|
|
mkdir "${DIRNAME}"
|
2003-09-13 02:33:51 -04:00
|
|
|
|
|
|
|
# To build for win32, I use ./configure --host=i586-mingw32msvc
|
2003-09-12 20:35:20 -04:00
|
|
|
(cd src && make && cp elk.exe "${DESTDIR}")
|
|
|
|
(cd scm && make install DESTDIR="${DESTDIR}" datadir="/")
|
|
|
|
mv "${DESTDIR}/elk" "${DESTDIR}/scm"
|
|
|
|
|
2003-09-13 02:33:51 -04:00
|
|
|
# Pack the directory
|
2003-09-12 20:35:20 -04:00
|
|
|
zip "${DIRNAME}.zip" `find "${DIRNAME}"`
|
|
|
|
rm -Rf "${DIRNAME}"
|
|
|
|
|