~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+New in 1.13.4:
+
+* Bugs fixed:
+
+ - Fix a minor regression introduced in Automake 1.13.3: when two or more
+ user-defined suffix rules were present in a single Makefile.am,
+ automake would needlessly include definition of some make variables
+ related to C compilation in the generated Makefile.in (bug#14560).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
New in 1.13.3:
* Documentation fixes:
Rafael Laboissiere laboissiere@psy.mpg.de
Rainer Tammer tammer@tammer.net
Raja R Harinath harinath@cs.umn.edu
-Ralf Corsepius corsepiu@faw.uni-ulm.de
+Ralf Corsepius ralf.corsepius@gmail.com
Ralf Menzel menzel@ls6.cs.uni-dortmund.de
Ralf Wildenhues Ralf.Wildenhues@gmx.de
Ralph Schleicher rs@purple.UL.BaWue.DE
# If the project is entirely C++ or entirely Fortran 77 (i.e., 1
# suffix rule was learned), don't bother with the C stuff. But if
# anything else creeps in, then use it.
- $needs_c = 1
- if $need_link || suffix_rules_count > 1;
-
- if ($needs_c)
+ my @languages_seen = map { $languages{$extension_map{$_}}->name }
+ (keys %extension_seen);
+ @languages_seen = uniq (@languages_seen);
+ $needs_c = 1 if @languages_seen > 1;
+ if ($need_link || $needs_c)
{
define_compiler_variable ($languages{'c'})
unless defined $done{$languages{'c'}};
require Exporter;
use vars '@ISA', '@EXPORT', '@EXPORT_OK';
@ISA = qw/Automake::Item Exporter/;
-@EXPORT = qw (reset register_suffix_rule suffix_rules_count
- next_in_suffix_chain
+@EXPORT = qw (reset register_suffix_rule next_in_suffix_chain
suffixes rules $KNOWN_EXTENSIONS_PATTERN
depend %dependencies %actions register_action
accept_extensions
}
}
-=item C<$count = suffix_rules_count>
-
-Return the number of suffix rules added while processing the current
-F<Makefile> (excluding predefined suffix rules).
-
-=cut
-
-sub suffix_rules_count ()
-{
- return (scalar keys %_suffix_rules) - (scalar keys %_suffix_rules_builtin);
-}
-
=item C<@list = suffixes>
Return the list of known suffixes.
t/mkinst3.sh \
t/mmode.sh \
t/mmodely.sh \
+t/no-extra-c-stuff.sh \
t/no-extra-makefile-code.sh \
t/no-spurious-install-recursive.sh \
t/nobase.sh \
t/suffix-custom-pr14441.sh \
t/suffix-custom-subobj.sh \
t/suffix-custom-subobj-and-specflg.sh \
+t/suffix-extra-c-stuff-pr14560.sh \
t/symlink.sh \
t/symlink2.sh \
t/syntax.sh \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program 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 2, or (at your option)
+# any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that Automake doesn't generated rules or definitions related
+# to compilation of C sources for a project that doesn't use nor need
+# a C Compiler. Inspired by the issues reported in automake bug#14560.
+
+am_create_testdir=empty
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([
+ Makefile
+ sub/Makefile
+ sub2/Makefile
+])
+AC_PROG_CXX
+AC_PROG_F77
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+SUBDIRS = sub sub2
+bin_PROGRAMS = bar
+bar_SOURCES = bar.cc
+END
+
+mkdir sub sub2
+
+cat > sub/Makefile.am <<END
+bin_PROGRAMS = foo
+foo_SOURCES = foo.f
+END
+
+cat > sub2/Makefile.am <<END
+bin_PROGRAMS = baz
+baz_SOURCES = baz.cxx
+END
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+test -f install-sh
+test ! -e compile
+
+# Sanity checks.
+$FGREP '$(CXX)' Makefile.in
+$FGREP '$(CXX)' sub2/Makefile.in
+$FGREP '$(F77)' Makefile.in sub2/Makefile.in && exit 1
+$FGREP '$(F77)' sub/Makefile.in
+$FGREP '$(CXX)' sub/Makefile.in && exit 1
+
+$EGREP '(^COMPILE|$\(CC\)|AM_V_CC)' \
+ Makefile.in sub/Makefile.in sub2/Makefile.in && exit 1
+
+:
#!/bin/sh
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
: > Makefile.am
+# Automake shouldn't need nor require these.
rm -f depcomp compile
$ACLOCAL
+
+# Don't use '--add-missing' here, so that we can implicitly
+# check that the auxiliary scripts 'compile' and 'depcomp'
+# are not spuriously required by Automake.
$AUTOMAKE
-$EGREP 'DEFAULT_INCLUDES|@am__isrc@|-compile|\$\(OBJEXT\)|tab\.[ch]' \
+$EGREP 'INCLUDES|@am__isrc@|-compile|\$\(OBJEXT\)|tab\.[ch]' \
Makefile.in && exit 1
:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program 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 2, or (at your option)
+# any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Automake bug#14560: if multiple user-specified suffix rules were
+# present, Automake could generate useless definitions and rules
+# related to C compilation.
+
+. test-init.sh
+
+cat > Makefile.am <<'END'
+.foo.bar:
+ foo2bar -o $@ $<
+.baz.qux:
+ baz2qux -o $@ $<
+bin_SCRIPTS = a.bar b.qux
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+$EGREP '\$\(CC\)|COMPILE|AM_V_CC|-compile|INCLUDES' Makefile.in && exit 1
+
+: