| 1 |
#!/bin/sh |
| 2 |
# Helper script to cross-compile Windows/MinGW distribution. |
| 3 |
# Since Windows doesn't understand shebang magic, we make the gauche |
| 4 |
# scripts (e.g. gauche-install) to exe files. |
| 5 |
# |
| 6 |
|
| 7 |
set -e |
| 8 |
|
| 9 |
target=$1 |
| 10 |
|
| 11 |
cat <<EOF |
| 12 |
#include "gauche.h" |
| 13 |
|
| 14 |
static const char* script = "\\n" |
| 15 |
EOF |
| 16 |
|
| 17 |
sed -e 's@\\@\\\\@g' -e 's@"@\\"@g' -e 's@^.*$@"&\\n"@g' $1 |
| 18 |
|
| 19 |
cat <<EOF |
| 20 |
; |
| 21 |
|
| 22 |
int main(int argc, const char **argv) |
| 23 |
{ |
| 24 |
Scm_Init(GAUCHE_SIGNATURE); |
| 25 |
Scm_SimpleMain(argc, argv, script, 0); |
| 26 |
return 0; |
| 27 |
} |
| 28 |
EOF |