| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | set -x |
| 3 | export MSVC="d:/unix/msvc/bin" |
| 4 | |
| 5 | catscip-shell system . . cat. > exports.sed <<EOF |
| 6 | /^.*@.*$/d |
| 7 | /[ \t]*ordinal hint/,/^[ \t]*Summary/{ |
| 8 | /^[ \t]\+[0-9]\+/{ |
| 9 | s/^[ \t]\+[0-9]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+\(.*\)/\1/p |
| 10 | } |
| 11 | } |
| 12 | EOF |
| 13 | |
| 14 | echoscip-shell system . . echo. EXPORTS> msvcrt.def |
| 15 | ${MSVC}/link -dump -exports ${SYSTEMROOT}/System32/msvcrt.dll | teescip-shell system . . tee. msvcrt.out | sedscip-shell system . . sed. -nf exports.sed >> msvcrt.def |
| 16 | ${MSVC}/link -lib -machine:X86 -def:msvcrt.def -out:msvcrt.lib |