libtool fix; add bdir()
Adriaan de Groot <[email protected]> Thu, 24 Nov 2005 23:38:48 +0100
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
--nextPart1208361.T37pEnCbTj
Content-Type: multipart/mixed;
boundary="Boundary-01=_5DkhDt9BWd7z1dE"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--Boundary-01=_5DkhDt9BWd7z1dE
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Attached are two patches against AAP CVS HEAD. The change to default.aap fi=
xes=20
a NameError that is raised when trying to use a libtool build target --=20
forgotten quotes. The change in RecPython is twofold: it adds a "noinstall"=
=20
attribute, which might be useful for building test programs that don't need=
=20
to be installed. Secondly, it adds a bdir() function that prepends $BDIR in=
a=20
smart fashion to a target. This is quite useful in shell commands where you=
=20
want to read an input file (which might be in $BDIR) and write it to an=20
output which is definitely in $BDIR.
I'd commit myself, but it seems my write access died of old age.
=2D-=20
These are your friends - Adem
GPG: FEA2 A3FE Adriaan de Groot
--Boundary-01=_5DkhDt9BWd7z1dE
Content-Type: text/x-diff;
charset="us-ascii";
name="RecPython.py.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="RecPython.py.diff"
Index: RecPython.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/a-a-p/Exec/RecPython.py,v
retrieving revision 1.42
diff -u -3 -p -r1.42 RecPython.py
=2D-- RecPython.py 30 May 2005 11:39:49 -0000 1.42
+++ RecPython.py 24 Nov 2005 22:34:58 -0000
@@ -336,6 +336,27 @@ def srcitem2obj(recdict, name, attrdict=20
attrdict["prefix"] + os.path.basenam=
e(n))
return n
=20
+def bdir(name,with_attr=3D1):
+ """Prepend $BDIR to name if there is no BDIR there already.
+ If (optional) with_attr is 0, strip attributes and return
+ only a filename."""
+ from Dictlist import dictlist2str
+ bdir=3Dget_var_val(0,Global.globals,"_no","BDIR")
+ bdirprefix=3D"build-"+get_var_val(0,Global.globals,"_no","OSNAME")
+ res=3Dvar2dictlist(name)
+ for i in res:
+ filename=3Di["name"]
+ # Common case: no bdir found
+ if filename.find(bdirprefix) < 0 :
+ i["name"]=3Dos.path.join(bdir,filename)
+ if with_attr:
+ return dictlist2str(res)
+ else:
+ rv =3D ""
+ for i in res:
+ rv +=3D (i["name"]+" ")
+ return rv
+
=20
def get_attr(fname):
"""Obtain the attribute dictionary for a file name.
@@ -1122,6 +1143,8 @@ def install_files(desttail, source, mode
else:
destloc =3D dest
=20
+ if item.get("noinstall"):
+ continue
if item.get("installdir"):
destloc =3D os.path.join(destloc, item.get("installdir"))
if item.get("keepdir"):
--Boundary-01=_5DkhDt9BWd7z1dE
Content-Type: text/x-diff;
charset="us-ascii";
name="default.aap.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="default.aap.diff"
Index: default.aap
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/a-a-p/Exec/default.aap,v
retrieving revision 1.64
diff -u -3 -p -r1.64 default.aap
=2D-- default.aap 16 Aug 2005 10:19:08 -0000 1.64
+++ default.aap 24 Nov 2005 22:34:31 -0000
@@ -422,7 +422,7 @@ YACCPP ?=3D
if _no.get("C_BUILD_ACTION"):
return var2string(_no.C_BUILD_ACTION)
if _no.get("LTLIBS"):
=2D return ltbuild
+ return "ltbuild"
return None
act.defer_action_name =3D default_build_defer_name
=20
--Boundary-01=_5DkhDt9BWd7z1dE--
--nextPart1208361.T37pEnCbTj
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)
iD8DBQBDhkD5dqzuAf6io/4RAiaXAJ40hQ59Bw4m9kzT6k/NKlkYciyt3QCbBuHd
463rF4A35AsZ82vIK95SI4M=
=zAfC
-----END PGP SIGNATURE-----
--nextPart1208361.T37pEnCbTj--
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click