+2007-11-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix default includes ordering to be `-I. -I$(srcdir) ...' again.
+ * automake.in (handle_compile): Put -I$(srcdir) before include
+ paths for config headers, as was done before Automake 1.10, but
+ keep uniquified list without multiple adjacent spaces.
+ * doc/automake.texi (Program variables): List include paths
+ in order.
+ * NEWS: Mention 1.10 regression.
+ * tests/stdinc.test: New test.
+ * tests/Makefile.am: Adjust.
+ * THANKS: Update.
+ Report by Kent Boortz.
+
2007-11-08 Akim Demaille <akim@lrde.epita.fr>
- Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
- Bob Proulx <bob@proulx.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Bob Proulx <bob@proulx.com>
Implement colorized test output.
* automake.in (handle_tests): Set COLOR depending on `color-tests'.
- $(EXEEXT) is automatically appended to filenames of XFAIL_TESTS
that have been declared as programs in the same Makefile.
This is for consistency with the analogous change to TESTS in 1.10.
+
+ - Fix order of standard includes to again be `-I. -I$(srcdir)',
+ followed by directories containing config headers.
\f
New in 1.10:
Karl Berry kb@cs.umb.edu
Karl Heuer kwzh@gnu.org
Kelley Cook kcook@gcc.gnu.org
+Kent Boortz kent@mysql.com
Kevin Dalley kevin@aimnet.com
Kevin P. Fleming. kpfleming@cox.net
Kevin Ryde user42@zip.com.au
my $default_includes = '';
if (! option 'nostdinc')
{
- my @incs = ('-I.');
+ my @incs = ('-I.', subst ('am__isrc'));
my $var = var 'CONFIG_HEADER';
if ($var)
# and unaesthetic in non-VPATH builds. We use `-I.@am__isrc@`
# instead. It will be replaced by '-I.' or '-I. -I$(srcdir)'.
# Items in CONFIG_HEADER are never in $(srcdir) so it is safe
- # to just append @am__isrc@.
- $default_includes = ' ' . uniq (@incs) . subst ('am__isrc');
+ # to just put @am__isrc@ right after `-I.', without a space.
+ ($default_includes = ' ' . uniq (@incs)) =~ s/ @/@/;
+ print "D: $default_includes";
}
my (@mostly_rms, @dist_rms);
Automake already provides some @option{-I} options automatically, in a
separate variable that is also passed to every compilation that invokes
-the C preprocessor. In particular it generates @samp{-I$(srcdir)},
-@samp{-I.}, and a @option{-I} pointing to the directory holding
+the C preprocessor. In particular it generates @samp{-I.},
+@samp{-I$(srcdir)}, and a @option{-I} pointing to the directory holding
@file{config.h} (if you've used @code{AC_CONFIG_HEADERS} or
@code{AM_CONFIG_HEADER}). You can disable the default @option{-I}
options using the @option{nostdinc} option.
spell3.test \
spelling.test \
spy.test \
+stdinc.test \
stamph2.test \
stdlib.test \
stdlib2.test \
spell3.test \
spelling.test \
spy.test \
+stdinc.test \
stamph2.test \
stdlib.test \
stdlib2.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test to make sure the standard include order is stable.
+# Report by Kent Boortz.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_CONFIG_HEADERS([sub/config.h])
+AC_CONFIG_FILES([sub/bar.h])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c
+BUILT_SOURCES = bar.h
+END
+
+mkdir sub
+
+cat >foo.c <<'END'
+#include <config.h>
+#include <bar.h>
+int main() { return bar (); }
+END
+cat >bar.h <<'END'
+int bar () { return 0; }
+END
+cat >sub/bar.h.in <<'END'
+choke me
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE
+
+mkdir build
+cd build
+../configure -C
+$MAKE
+
+cd ..
+./configure -C
+$MAKE