[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 06/12] [ng] cleanup: remove obsolete special-handli
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 06/12] [ng] cleanup: remove obsolete special-handling of default source for libs |
Date: |
Mon, 21 May 2012 09:36:23 +0200 |
Since we are already breaking backward-compatibility in small ways in
Automake-NG, we can snatch the occasion to do some cleanup of obsolescent
behaviours and backward-compatibility hacks. This is the first of such
cleanups.
* automake.in (handle_source_transform): The default source for libfoo.la
is libfoo.c, but for backward compatibility we used look for libfoo_la.c
first. Don't do that anymore now.
* t/ltlibsrc.sh: Remove as obsolete.
* NG-NEWS: Update.
Signed-off-by: Stefano Lattarini <address@hidden>
---
NG-NEWS | 8 +++++++
automake.in | 19 ---------------
t/ltlibsrc.sh | 74 ---------------------------------------------------------
3 files changed, 8 insertions(+), 93 deletions(-)
delete mode 100755 t/ltlibsrc.sh
diff --git a/NG-NEWS b/NG-NEWS
index 4eab948..8a9fb9a 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -192,6 +192,14 @@ Miscellaneous
Do not use any of these variables in your Makefiles!
+* If the sources for a target library like 'libfoo.a' or 'libbar.la' are
+ not explicitly specified, mainline Automake looks also (respectively)
+ for the files 'libfoo_a.c' or 'libbar_la.c' as possible default sources.
+ Such a behaviour is deprecated though, and is present only for the sake
+ of backward-compatibility. Automake-NG has thus dropped the behaviour,
+ and will only look for (respectively) 'libfoo.c' and 'libbar.c' as
+ possible default sources.
+
-----
Copyright (C) 2012 Free Software Foundation, Inc.
diff --git a/automake.in b/automake.in
index 039b269..d141321 100644
--- a/automake.in
+++ b/automake.in
@@ -2023,30 +2023,11 @@ sub handle_source_transform ($$$$%)
my @keys = sort keys %used_pfx;
if (scalar @keys == 0)
{
- # The default source for libfoo.la is libfoo.c, but for
- # backward compatibility we first look at libfoo_la.c,
- # if no default source suffix is given.
- my $old_default_source = "$one_file.c";
my $ext_var = var ('AM_DEFAULT_SOURCE_EXT');
my $default_source_ext = $ext_var ? variable_value ($ext_var) : '.c';
msg_var ('unsupported', $ext_var, $ext_var->name . " can assume at most
one value")
if $default_source_ext =~ /[\t ]/;
(my $default_source = $unxformed) =~
s,(\.[^./\\]*)?$,$default_source_ext,;
- if ($old_default_source ne $default_source
- && !$ext_var
- && (rule $old_default_source
- || rule '$(srcdir)/' . $old_default_source
- || rule '${srcdir}/' . $old_default_source
- || -f $old_default_source))
- {
- my $loc = $where->clone;
- $loc->pop_context;
- msg ('obsolete', $loc,
- "the default source for '$unxformed' has been changed "
- . "to '$default_source'.\n(Using '$old_default_source' for "
- . "backward compatibility.)");
- $default_source = $old_default_source;
- }
&define_variable ($one_file . "_SOURCES", $default_source, $where);
push (@sources, $default_source);
push (@dist_sources, $default_source);
diff --git a/t/ltlibsrc.sh b/t/ltlibsrc.sh
deleted file mode 100755
index 11e2a1d..0000000
--- a/t/ltlibsrc.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003-2012 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/>.
-
-# Test to make sure a sensible default source for libraries is used.
-
-required='cc libtool'
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_AR
-AC_PROG_LIBTOOL
-AC_OUTPUT
-END
-
-mkdir zoo.d
-
-cat > Makefile.am << 'END'
-AM_LDFLAGS = -module
-pkglib_LTLIBRARIES = zoo.d/bar.la old.la
-noinst_LTLIBRARIES = foo.la zoo.d/old2.la
-
-$(srcdir)/zoo_d_old2_la.c: $(srcdir)/old_la.c
- cp $(srcdir)/old_la.c $@
-END
-
-cat > foo.c << 'END'
-int foo (void)
-{
- return 0;
-}
-END
-
-cp foo.c zoo.d/bar.c
-cp foo.c old_la.c
-
-libtoolize
-$ACLOCAL
-$AUTOCONF
-AUTOMAKE_fails -a
-grep '^Makefile\.am:2:.*old_la\.c' stderr
-grep '^Makefile\.am:2:.*old\.c' stderr
-grep '^Makefile\.am:3:.*zoo_d_old2_la\.c' stderr
-grep '^Makefile\.am:3:.*zoo\.d/old2\.c' stderr
-
-$AUTOMAKE -Wno-obsolete
-
-mkdir sub
-cd sub
-
-../configure
-$MAKE
-
-test -f foo.la
-test -f zoo.d/bar.la
-test -f old.la
-test -f zoo.d/old2.la
-
-$MAKE distcheck
-
-:
--
1.7.9.5
- [Automake-NG] [PATCH 00/12] Several cleanups (with small backward incompatibilities), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 01/12] [ng] push_dist_common: don't directly append to an Automake::Variable, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 04/12] [ng] cleanup: remove a workaround for BSD make (comments continaution), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 02/12] [ng] cleanup: remove a workaround only needed by Solaris make, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 03/12] [ng] cleanup: remove obsolescent comments about subdir-objects and deptrack, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 06/12] [ng] cleanup: remove obsolete special-handling of default source for libs,
Stefano Lattarini <=
- [Automake-NG] [PATCH 05/12] [ng] cleanup: remove a workaround for BSD make (default sources and VPATH), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 08/12] [ng] config.h.{bot, top}: don't support anymore (distribution and deps), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 07/12] [ng] acconfig.h: don't support anymore (distribution and dependencies), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 12/12] [ng] cleanup: don't support $(ACLOCAL_M4_SOURCES) anymore, it's obsolete, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 11/12] [ng] compile: don't support $(INCLUDES) anymore, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 10/12] [ng] mkinstalldirs: remove support for the script and the variable, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 09/12] [ng] cleanup: minor cleanups in remake-hdr.am, Stefano Lattarini, 2012/05/21
- Re: [Automake-NG] [PATCH 00/12] Several cleanups (with small backward incompatibilities), Akim Demaille, 2012/05/21