+2008-08-12 Peter Rosin <peda@lysator.liu.se>
+
+ * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) <postlink_cmds>:
+ New tag variable.
+ [ cygwin, mingw, cegcc ] <cl*>: Embed the manifest file as a
+ resource.
+ (_LT_LANG_CXX_CONFIG): Likewise.
+ * libltdl/config/ltmain.m4sh (func_mode_link): After linking
+ a program, replace @OUTPUT@ in $postlink_cmds and then execute
+ the commands.
+
2008-08-12 Peter Rosin <peda@lysator.liu.se>
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): Disable nocase
exit_status=0
func_show_eval "$link_command" 'exit_status=$?'
+ if test -n "$postlink_cmds"; then
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
# Delete the generated files.
if test -f "$output_objdir/${outputname}S.${objext}"; then
func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
$opt_dry_run || $RM $output
# Link the executable and exit
func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
exit $EXIT_SUCCESS
fi
func_show_eval "$link_command" 'exit $?'
+ if test -n "$postlink_cmds"; then
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
# Now create the wrapper script.
func_verbose "creating $output"
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
_LT_TAGVAR(compile_tag, $1)=-TC
_LT_TAGVAR(dashl_xform, $1)='s/\(.*\)/\1.lib/'
+ _LT_TAGVAR(postlink_cmds, $1)='if test -e "@OUTPUT@.exe.manifest"; then
+ mt -manifest "@OUTPUT@.exe.manifest" -outputresource:"@OUTPUT@.exe";
+ $RM "@OUTPUT@.exe.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
[Symbols that must always be exported])
_LT_TAGDECL([], [prelink_cmds], [2],
[Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
_LT_TAGDECL([], [file_list_spec], [1],
[Specify filename containing input files])
_LT_TAGDECL([], [dashL_envvar], [1],
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
_LT_TAGVAR(compile_tag, $1)=-TP
_LT_TAGVAR(dashl_xform, $1)='s/\(.*\)/\1.lib/'
+ _LT_TAGVAR(postlink_cmds, $1)='if test -e "@OUTPUT@.exe.manifest"; then
+ mt -manifest "@OUTPUT@.exe.manifest" -outputresource:"@OUTPUT@.exe";
+ $RM "@OUTPUT@.exe.manifest";
+ fi'
;;
*)
# g++