Mercurial > mxe-octave
annotate src/build-msvctools/lt-postproc @ 3156:36ac78f420b4
[MSVC] remove debug mode in lt-postproc
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sat, 20 Jul 2013 15:23:11 -0400 |
parents | 2443a342151b |
children |
rev | line source |
---|---|
3061
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
2 |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
3 prefix= |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
4 suffix= |
3144
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
5 no_auto_export=false |
3061
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
6 |
3144
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
7 while getopts ":p:s:x" opt; do |
3061
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
8 case $opt in |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
9 s) suffix="$OPTARG" ;; |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
10 p) prefix="$OPTARG" ;; |
3144
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
11 x) no_auto_export=true ;; |
3061
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
12 esac |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
13 done |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
14 shift $((OPTIND-1)) |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
15 |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
16 if [ "$1" = "" ]; then |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
17 libtool_files=`find . -name libtool` |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
18 else |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
19 libtool_files="$@" |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
20 fi |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
21 |
3144
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
22 SED_ARGS= |
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
23 if $no_auto_export; then |
3148
2443a342151b
[MSVC] fix invalid sed replacement to disable libtool auto-export
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3144
diff
changeset
|
24 SED_ARGS="$SED_ARGS -e s/^always_export_symbols=.*/always_export_symbols=/" |
3144
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
25 fi |
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
26 |
3061
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
27 for ltfile in $libtool_files; do |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
28 sed -i \ |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
29 -e "s/^soname_spec=\"\\(.*\\)\\\${shared_ext}\"/soname_spec=\"$prefix\\1$suffix\\\${shared_ext}\"/" \ |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
30 -e "s/\.dll\.lib/\.lib/" \ |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
31 -e "s/^\(deplibs_check_method\)=.*/\1=\"pass_all\"/" \ |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
32 -e "s/-link\\>//" \ |
3148
2443a342151b
[MSVC] fix invalid sed replacement to disable libtool auto-export
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3144
diff
changeset
|
33 -e '/^archive_cmds=/ { s/-Wl,-dll~/-Wl,-dll,-IMPLIB:\\\\\\"\\$tool_output_objdir\\$libname.lib\\\\\\"~/; }' \ |
3144
433d1bb3cafb
[MSVC] enable octave compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3061
diff
changeset
|
34 $SED_ARGS \ |
3061
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
35 $ltfile |
f8299bb6c872
Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
36 done |