libtool fixes
Adriaan de Groot <adridg-FlD2LfDziEhmR6Xm/[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
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.
libtool.diff
(text/x-diff, 1.6 KB)
Index: libtool.aap
===================================================================
RCS file: /cvsroot/a-a-p/Exec/modules/libtool.aap,v
retrieving revision 1.4
diff -u -3 -p -r1.4 libtool.aap
--- libtool.aap 18 Oct 2003 15:14:10 -0000 1.4
+++ libtool.aap 23 Oct 2003 22:05:42 -0000
@@ -91,24 +91,29 @@ _top.INSTALL_LTLIB = ""
# This rule is still here so you can use the { filetype= }
# attribute to select to build a program with libtool or without.
:action build ltexe default
- :sys $LIBTOOL --silent --mode=link --tag=CXX
+ :sys $LIBTOOL --mode=link --tag=CXX
g++ -o $target $source $LDFLAGS $?LTLIBS $?LIBS
# :do installtlib
:action installltlib default
@for i in var2dictlist(source):
- @if not i.get("installvar"):
+ @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 += "/" + i["installdir"] + "/"
@destltlib = os.path.abspath(destltlib)
@try:
@os.makedirs(destltlib)
@except OSError:
- :print $destltlib already exists
- @destltlib = destltlib + "/" + i["name"]
+ :log $destltlib already exists
+ @if i.has_key("keepdir"):
+ @destltlib = destltlib + "/" + i["name"]
+ @else:
+ @destltlib = destltlib + "/" + os.path.basename(i["name"])
@destltlib = os.path.abspath(destltlib)
:sys $LIBTOOL --mode=install /usr/bin/install `i["name"]` $destltlib