Re: libtool fixes

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de Groot wrote:

> find attached a patch for the libtool module. the module wasn't
> dealing with {keepdir} and {installdir} attributes properly. note that
> it still uses "/" as a path separator. python purists may modify as
> they see fit.

Thanks, I'll include it.

It's easy to use os.path.join() in a couple of places, I'll change that.

I notice you use the Python "+=" assignment.  That doesn't work with
Python 1.5, which we try to support when possible.  Using os.path.join()
will solve that.

This is the installltlib action that I made now, please check!

# :do installtlib
:action installltlib default
  @for i in var2dictlist(source):
      @if i.has_key("installvar") and not i.get("installvar"):
	  @continue
      destltlib = $DESTDIR/$PREFIX/$DLLDIR
      @if i.has_key("installdir") and i.has_key("keepdir"):
	  :error Library $i has both {installdir} and {keepdir} set.
      @if i.has_key("installdir"):
          @destltlib = os.path.join(destltlib, i["installdir"])
      @destltlib = os.path.abspath(destltlib)
      @try:
          @os.makedirs(destltlib)
      @except OSError:
          :log $destltlib already exists
      @if i.has_key("keepdir"):
          @destltlib = os.path.join(destltlib, i["name"])
      @else:
	  @destltlib = os.path.join(destltlib, os.path.basename(i["name"]))
      @destltlib = os.path.abspath(destltlib)
      :sys $LIBTOOL --mode=install /usr/bin/install `i["name"]` $destltlib


-- 
    [clop clop]
MORTICIAN:  Who's that then?
CUSTOMER:   I don't know.
MORTICIAN:  Must be a king.
CUSTOMER:   Why?
MORTICIAN:  He hasn't got shit all over him.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.