[Top][All Lists]

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

Re: win32 short name and IFS='~'

From: Guido Draheim
Subject: Re: win32 short name and IFS='~'
Date: Mon, 31 Mar 2003 00:10:10 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313

I have a similar problem on a different account: the version
management system at my employer uses "~" in directory names
to flag different branches and subversions of projects and
their checkout areas. The libtool has the tendency to
resolve some symlinks, so it does not help to put some
directories elsewhere. It was impossible to build with
libtool in this environment - after some time I did write
up an ac-macro that changes the _cmds IFS from "~" into "?"
which is much more uncommon to exist in either a filename
or a _cmds specification. Add the following macro after
OUTPUT, and you should be fine with any "~" in file or
directory names in the system:

Btw, I wouldn't mind if libtool would simply not use "~" as
the IFS in its original source, so this libtool-patching
could get obsolete once and for all. -- cheers, guido

Naofumi Yasufuku wrote:

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
    $show "$cmd"
    $run eval "$cmd" || exit $?

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


  # execute each command

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

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?


Libtool mailing list

reply via email to

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