[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: referencing top_srcdir/top_builddir in an autoconf test?
From: |
Eric Blake |
Subject: |
Re: referencing top_srcdir/top_builddir in an autoconf test? |
Date: |
Fri, 10 Jul 2009 06:14:58 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Monty Taylor on 5/13/2009 1:32 PM:
Hello Monty, and sorry for the delay,
>>> Obviously would need a -I${top_srcdir}. I'm fine with hacking that in to
>>> the test - except there doesn't seem to be an available autoconf
>>> variable I can use to fill in the value of top_srcdir in that context.
>> You can use $srcdir, and some other variables documented in
>> info Autoconf "Configuration Actions"
>
> AWESOME. Exactly what I was looking for.
>
>> Maybe the manual should state that they're also available during the
>> execution of configure, as opposed to only at config.status time.
>
> Perhaps ... it certainly was not evident to me when looking through the
> manual that I should have looked in that section.
Does this help?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkpXMMIACgkQ84KuGfSFAYB8QwCgi+U5boOqF/7ZMyBhE+Zk2QY5
ZMMAni9JOPp81K1jodJdWGV3b/zv6fDA
=AsEe
-----END PGP SIGNATURE-----
>From 58cbe7b1eade23c6106a0180e75d87b1cc1967b3 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Fri, 10 Jul 2009 06:11:24 -0600
Subject: [PATCH] Document that $srcdir can be used during configure.
* doc/autoconf.texi (Preset Output Variables): Add a paragraph.
* THANKS: UPdate.
Reported by Monty Taylor.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 7 +++++++
doc/autoconf.texi | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d256710..6fb2622 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-10 Eric Blake <address@hidden>
+
+ Document that $srcdir can be used during configure.
+ * doc/autoconf.texi (Preset Output Variables): Add a paragraph.
+ * THANKS: UPdate.
+ Reported by Monty Taylor.
+
2009-07-09 Eric Blake <address@hidden>
Fix test typo.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 3528f53..2fefd58 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -2180,7 +2180,6 @@ Configuration Actions
The name of the top source directory, assuming that the working
directory is the current build directory.
-
@item ac_top_build_prefix
The name of the top build directory, assuming that the working
directory is the current build directory.
@@ -2332,6 +2331,14 @@ Preset Output Variables
precious variables (@pxref{Setting Output Variables},
@code{AC_ARG_VAR}).
+The preset variables which are available during @file{config.status}
+(@pxref{Configuration Actions}) may also be used during
address@hidden tests. For example, it is permissible to reference
address@hidden when constructing an option @option{-I} list of include
+directories. When used in this manner, coupled with the fact that
address@hidden is always run from the top build directory, it is
+sufficient to use just @samp{$srcdir} instead of @samp{$top_srcdir}.
+
@c Just say no to ASCII sorting! We're humans, not computers.
@c These variables are listed as they would be in a dictionary:
@c actor
--
1.6.3.3.334.g916e1
- Re: referencing top_srcdir/top_builddir in an autoconf test?,
Eric Blake <=