automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARFLAGS when only EXTRA_LIBRARIES


From: Alexandre Duret-Lutz
Subject: Re: ARFLAGS when only EXTRA_LIBRARIES
Date: Fri, 14 May 2004 22:13:09 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "Kevin" == Kevin Ryde <address@hidden> writes:

 Kevin> When the only ar style library is in an EXTRA_LIBRARIES, I believe
 Kevin> there are no default settings for AR and ARFLAGS put into Makefile.in.

Good catch!  I'm installing the following on HEAD and branch-1-8.

2004-05-14  Alexandre Duret-Lutz  <address@hidden>

        * lib/am/libs.am (AR, ARFLAGS): Move these definition ...
        * automake.in (handle_libraries): ... here, so that they are
        output even for EXTRA_LIBRARIES.
        * tests/ar2.test: New file.
        * tests/Makefile.am (TESTS): Add it.
        Report from Kevin Ryde.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1526.2.12
diff -u -r1.1526.2.12 automake.in
--- automake.in 13 May 2004 20:39:43 -0000      1.1526.2.12
+++ automake.in 14 May 2004 20:08:58 -0000
@@ -2248,6 +2248,9 @@
       $var->requires_variables ('library used', 'RANLIB');
     }
 
+  &define_variable ('AR', 'ar', INTERNAL);
+  &define_variable ('ARFLAGS', 'cru', INTERNAL);
+
   foreach my $pair (@liblist)
     {
       my ($where, $onelib) = @$pair;
Index: lib/am/libs.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/libs.am,v
retrieving revision 1.25.2.1
diff -u -r1.25.2.1 libs.am
--- lib/am/libs.am      28 Jan 2004 20:50:59 -0000      1.25.2.1
+++ lib/am/libs.am      14 May 2004 20:08:58 -0000
@@ -18,17 +18,6 @@
 ## 02111-1307, USA.
 
 
-## ----------- ##
-## Variables.  ##
-## ----------- ##
-
-if %?FIRST%
-AR = ar
-ARFLAGS = cru
-## For now this is detected when we see AC_PROG_RANLIB
-## RANLIB = @RANLIB@
-endif %?FIRST%
-
 ## ------------ ##
 ## Installing.  ##
 ## ------------ ##
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.539.2.11
diff -u -r1.539.2.11 Makefile.am
--- tests/Makefile.am   10 Apr 2004 17:15:05 -0000      1.539.2.11
+++ tests/Makefile.am   14 May 2004 20:08:58 -0000
@@ -45,6 +45,7 @@
 ansi9.test \
 ansi10.test \
 ar.test \
+ar2.test \
 asm.test \
 autohdr.test \
 autohdr2.test \
Index: tests/ar2.test
===================================================================
RCS file: tests/ar2.test
diff -N tests/ar2.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/ar2.test      14 May 2004 20:08:59 -0000
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2004  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 2, 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure AR and ARFLAGS are defined for EXTRA_LIBRARIES.
+# Report from Kevin Ryde.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+EXTRA_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+END
+
+$ACLOCAL
+$AUTOMAKE
+grep 'ARFLAGS =' Makefile.in
+grep 'AR =' Makefile.in


-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]