diff --git a/ChangeLog b/ChangeLog index 6a1d84fa..9e6cb210 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-11-09 Ralf Wildenhues + New config files output variable `top_build_prefix'. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Substitute + `top_build_prefix'. + * doc/autoconf.texi (Preset Output Variables): Document it. + * NEWS: Update. + Report by Bob Friesenhahn. + Avoid expr for arithmetic evaluation if the shell accepts $((...)). * lib/autotest/general.m4 (AT_INIT) : New function, to parametrize arithmetic with expr vs. the shell. diff --git a/NEWS b/NEWS index 77cd6f50..854c54a1 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ GNU Autoconf NEWS - User visible changes. Further, for config headers, the total size of values is not limited by the POSIX length limit of text lines any more, only each single line. +** New config variable `top_build_prefix'. + ** Autoconf is now licensed under the General Public License version 3 or later (GPLv3+). As with earlier versions, the license includes an exception clause so that you may release a configure script diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 9025359d..421056e0 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2436,6 +2436,16 @@ The relative name of the top level of the current build tree. In the top-level directory, this is the same as @code{builddir}. @end defvar +@defvar top_build_prefix +@ovindex top_build_prefix +The relative name of the top level of the current build tree with final +slash if nonemtpy. This is the same as @code{top_builddir}, except that +it contains of zero of more runs of @code{../}, so it should not be +appended with a slash for concatenation. This helps for @command{make} +implementations that otherwise do not treat @file{./file} and @file{file} +as equal in the toplevel build directory. +@end defvar + @defvar abs_top_builddir @ovindex abs_top_builddir Absolute name of @code{top_builddir}. diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index 350d370e..4412df0f 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -622,6 +622,7 @@ dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE. s&@configure_input@&$configure_input&;t t dnl During the transition period, this is a special case: s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir]) +s&@top_build_prefix@&$ac_top_build_prefix&;t t[]AC_SUBST_TRACE([top_build_prefix]) m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir, builddir, abs_builddir, abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [[, MKDIR_P]]),