tentative fix for issue 3 (ex 53)
[mplib] / build.cross
1 #!/bin/sh
2
3 # cross-compile on linux using mingw32 for windows
4
5 MAKE=make
6 STRIP=strip
7 PATH=/usr/mingw32/mingw32/bin:$PATH
8
9 rm -rf build-win
10 mkdir build-win
11 mkdir build-win/texk
12 cd build-win/texk
13
14 ../../src/texk/configure --host=i386-linux --enable-shared=no || exit 1 
15 # make the kpathsea library
16 (cd kpathsea && $MAKE ../kpathsea/libkpathsea.la ) || exit 1
17
18 # make the library
19 mkdir web2c
20 mkdir web2c/mpdir
21 mkdir web2c/mpdir/lib
22 cd web2c/mpdir/lib
23 (../../../../../src/texk/web2c/mpdir/lib/configure \
24     --host=i386-linux --enable-shared=no ; $MAKE )|| exit 1 
25
26 # make the newmpost binary
27 cd .. 
28 ln -s ../../../../src/texk/web2c/mpdir/Makefile .
29 ln -s ../../../../src/texk/web2c/mpdir/mpost.w .
30 $MAKE || exit 1
31
32 # strip them
33 mv  newmpost newmpost.exe
34 $STRIP newmpost.exe
35 cd ../../../..
36 # show the results
37 ls -l build-win/texk/web2c/mpdir/newmpost.exe
38
39