Mercurial > mxe-octave
diff src/build-msvctools/lt-postproc @ 3144:433d1bb3cafb
[MSVC] enable octave compilation
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Mon, 15 Jul 2013 21:29:42 -0400 |
parents | f8299bb6c872 |
children | 2443a342151b |
line wrap: on
line diff
--- a/src/build-msvctools/lt-postproc Mon Jul 15 21:29:42 2013 -0400 +++ b/src/build-msvctools/lt-postproc Mon Jul 15 21:29:42 2013 -0400 @@ -2,11 +2,13 @@ prefix= suffix= +no_auto_export=false -while getopts ":p:s:" opt; do +while getopts ":p:s:x" opt; do case $opt in s) suffix="$OPTARG" ;; p) prefix="$OPTARG" ;; + x) no_auto_export=true ;; esac done shift $((OPTIND-1)) @@ -17,11 +19,18 @@ libtool_files="$@" fi +SED_ARGS= +if $no_auto_export; then + SED_ARGS="$SED_ARGS -e 's/^always_export_symbols=.*/always_export_symbols=/'" +fi + for ltfile in $libtool_files; do sed -i \ -e "s/^soname_spec=\"\\(.*\\)\\\${shared_ext}\"/soname_spec=\"$prefix\\1$suffix\\\${shared_ext}\"/" \ -e "s/\.dll\.lib/\.lib/" \ -e "s/^\(deplibs_check_method\)=.*/\1=\"pass_all\"/" \ -e "s/-link\\>//" \ + -e "/^archive_cmds=/ { s/-Wl,-dll~/&,-IMPLIB:\\\\\\\"\\\$tool_output_objdir\\\$libname.lib\\\\\\\"/; }" \ + $SED_ARGS \ $ltfile done