libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

win32 short name and IFS='~'


From: Naofumi Yasufuku
Subject: win32 short name and IFS='~'
Date: Mon, 31 Mar 2003 05:52:47 +0900
User-agent: Wanderlust/2.8.1 (Something) SEMI/1.14.4 (Hosorogi) FLIM/1.14.4 (Kashiharajingū-mae) APEL/10.3 Emacs/21.2 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI)

Hi,

libtool uses '~' as IFS in some commands (ex. $archive_expsym_cmds),
so that win32 short name which includes '~' (ex. c:/progra~1/foo/...)
causes a problem. For example, if we want to build DLL which is linked
with -Lc:/progra~1/foo/lib -lbar, DLL build command fails.

I think it can be solved by putting off the command list variable
expansion until its execution loop.

In current libtool,

  # expand command list variable

  eval cmds=\"$archive_expsym_cmds\"  # $deplibs is expanded here
  ....

  # then, execute each command

  save_ifs="$IFS"; IFS='~'
  for cmd in $cmds; do
    IFS="$save_ifs"
    $show "$cmd"
    $run eval "$cmd" || exit $?
  done
  IFS="$save_ifs"

If $deplibs includes -Lc:/progra~1/foo/lib, $cmd is sepalated at
-Lc:/progra, so that DLL build fails.

If command list variable expansion is put off until execution,

  # set command list to $cmds

  cmds=$archive_expsym_cmds
  ....

  # execute each command

  save_ifs="$IFS"; IFS='~'
  for temp_cmd in $cmds; do
    IFS="$save_ifs"
    eval cmd=\"$temp_cmd\"       # $deplibs is expanded here
    $show "$cmd"
    $run eval "$cmd" || exit $?
  done
  IFS="$save_ifs"

Command list is separated by IFS='~', then -Lc:/progra~1/foo/lib is
expanded into $cmd, and DLL build works well.

It enables libtool to treat win32 short name without changing IFS
character which is currently used.

What do you think of it?

Regards,
--Naofumi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]