Re: libtool updates
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Adriaan de Groot wrote:
> > In the search for a valid libtool I don't see why /bin/false is in the
> > list. I assume it was there because you copied this from a shell
> > script, I'll remove it for now.
>
> I forget why I did that too. If no libtool is found, then the import should
> fail with an exception.
OK. Is there a specific reason to reject versions before 1.5? Is this
a generic thing or specific when used with qt?
> > It is a bit unusual to use $libtool instead of $LIBTOOL. Was there a
> > specific reason for this? The documentation should mention that
> > m_libtool.libtool holds the name of the program.
>
> Originally I used $LIBTOOL, then though that was confusing wrt. environment
> variables and local settings. At one point I had
>
> libtool = $?_recipe.LIBTOOL
> @if not libtool:
> libtool = $_top.LIBTOOL
>
> or something like that, before you added the funky module-variable-scoping.
The idea I came up with for variable naming:
ALL_CAPS: used by the Aap distribution
lowercase: local variables
MixedCase: global user variables
Following this it should be $LIBTOOL. OK?
> > Another solution would be to invoke the tool-specific compile action
> > with a prefix argument, since it appears that libtool prepends a few
> > things to the compile command without changing it otherwise. Something
> > like $CMD_PREFIX or a cmd_prefix attribute on the action. Would that
> > work?
>
> yes, that would work. libtool (like depcomp) is intended to be prefixed to a
> "normal" compile command, and then it mutates that command to produce libtool
> output instead of normal stuff (in the case of C++ compiles with gcc, it
> changes -o <foo>.o to -o .libs/<foo>.o).
OK. Then we need to change all compile actions to support a prefix
command. $PREFIXCMD? It can simply be passed as an attribute to ":do".
Thus the C compile action would be:
:action compile object,default c
@if not _no.get("target"):
target = `src2obj(fname)`
act = $?C_COMPILE_ACTION
@if not act:
act = $?COMPILE_ACTION # be backwards compatible
@if act:
:do $act {target = $target} $source
@else:
:buildcheck $OPTIMIZE $?DEBUG
:sys $?PREFIXCMD $CC $CPPFLAGS $?DEFINE $?INCLUDE `cflags_normal()` $CFLAGS
-c -o $target $source
Perhaps you can try this out in the libtool module. If I'm not
forgetting something, then it should become a lot simpler, since you
don't have to copy the commands from the default C compile action to the
libtool C compile action. Just use something like this:
cmd = $LIBTOOL and arguments
:do compile {PREFIXCMD = $cmd} $source
--
I AM THANKFUL...
...for the mess to clean after a party because it means I have
been surrounded by friends.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf