]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* lib/am/libs.am (ARFLAGS): Define.
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 6 Apr 2003 18:31:12 +0000 (18:31 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 6 Apr 2003 18:31:12 +0000 (18:31 +0000)
* automake.in (handle_libraries): Use `$(ARFLAGS)' instead of
hard-coding `cru'.
* automake.texi (A Library): Explain how AR, ARFLAGS and RANLIB
are used, and how they can be overridden.
(Program and Library Variables): Adjust to show `$(ARFLAGS)'
instead of `cru'
* tests/ar.test: Rewrite to test for AR, ARFLAGS, and RANLIB.
* tests/ranlib.test: Delete, obsoleted by ar.test.
* tests/Makefile.am (TESTS): Remove ranlib.test.
Report from Paul Thomas.

12 files changed:
ChangeLog
NEWS
THANKS
automake.in
automake.texi
lib/am/libs.am
stamp-vti
tests/Makefile.am
tests/Makefile.in
tests/ar.test
tests/ranlib.test [deleted file]
version.texi

index be2bb66a0575761400ce8498621fdf07ce2a29f5..948eb8603e44832dae441ab533b61d32caddeaf0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2003-04-06  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * lib/am/libs.am (ARFLAGS): Define.
+       * automake.in (handle_libraries): Use `$(ARFLAGS)' instead of
+       hard-coding `cru'.
+       * automake.texi (A Library): Explain how AR, ARFLAGS and RANLIB
+       are used, and how they can be overridden.
+       (Program and Library Variables): Adjust to show `$(ARFLAGS)'
+       instead of `cru'
+       * tests/ar.test: Rewrite to test for AR, ARFLAGS, and RANLIB.
+       * tests/ranlib.test: Delete, obsoleted by ar.test.
+       * tests/Makefile.am (TESTS): Remove ranlib.test.
+       Report from Paul Thomas.
+
 2003-04-03  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * automake.in (check_trailing_slash): New function (variation on
diff --git a/NEWS b/NEWS
index ec13ece9c8103f956b0ff53fb600cdbbcb17bb3a..1b422a54d6daf8519a14b2232f50729fa18c09b3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,11 @@ New in 1.7a:
 
 * Texinfo rules back up and restore info files when makeinfo fails.
 
+* AR's `cru' flags are now set in a global ARFLAGS variable instead
+  of being hard-coded in each $(AR) invocation, so they can be
+  substituted from configure.ac.  This has been requested by people
+  dealing with non-POSIX ar implementations.
+
 \f
 New in 1.7:
 * Autoconf 2.54 is required.
diff --git a/THANKS b/THANKS
index 441eee16f274601eca806c9201ebed6bc8faa4c8..4b92c8300859f7699c7ec44118c77b4c2c837346 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -163,6 +163,7 @@ Paul D. Smith               psmith@BayNetworks.COM
 Paul Eggert            eggert@twinsun.com
 Paul Jarc              prj@po.cwru.edu
 Paul Martinolich       martinol@datasync.com
+Paul Thomas            PTHOMAS@novell.com
 Pavel Roskin           pavel_roskin@geocities.com
 Per Bothner            bothner@cygnus.com
 Per Cederqvist         ceder@lysator.liu.se
index 5983ce9035fe4db4d97dc6dfbdfbdf8aa1f4cb32..1df692850ac830cc1feb570a0ff32264b9dc8f85 100755 (executable)
@@ -3355,7 +3355,7 @@ sub handle_libraries
 
       if (! variable_defined ($xlib . '_AR'))
        {
-         &define_variable ($xlib . '_AR', '$(AR) cru', $where);
+         &define_variable ($xlib . '_AR', '$(AR) $(ARFLAGS)', $where);
        }
 
       # Generate support for conditional object inclusion in
index e7559861ff003ef7632abc88b84555b76d5cc39a..870347005d3e5240d417ed3a984495e76fa2005b 100644 (file)
@@ -2366,6 +2366,17 @@ In addition, sources for extra objects that will not exist until
 configure-time must be added to the @code{BUILT_SOURCES} variable
 (@pxref{Sources}).
 
+Building a static library is done by compiling all object files, then
+by invoking @code{$(AR) $(ARFLAGS)} followed by the name of the
+library and the list of objects, and finally by calling
+@code{$(RANLIB)} on that library.  You should call
+@code{AC_PROG_RANLIB} from your @file{configure.in} to define
+@code{RANLIB} (Automake will complain otherwise).  @code{AR} and
+@code{ARFLAGS} default to @code{ar} and @code{cru} respectively; you
+can override these two variables my setting them in your
+@file{Makefile.am}, by @code{AC_SUBST}ing them from your
+@file{configure.in}, or by defining a per-library @code{maude_AR}
+variable (@pxref{Program and Library Variables}).
 
 @node A Shared Library, Program and Library Variables, A Library, Programs
 @section Building a Shared Library
@@ -2510,13 +2521,13 @@ This variable also supports @samp{dist_} and @samp{nodist_} prefixes,
 e.g., @samp{nodist_EXTRA_maude_SOURCES}.
 
 @item maude_AR
-A static library is created by default by invoking @code{$(AR) cru}
-followed by the name of the library and then the objects being put into
-the library.  You can override this by setting the @samp{_AR} variable.
-This is usually used with C++; some C++ compilers require a special
-invocation in order to instantiate all the templates which should go
-into a library.  For instance, the SGI C++ compiler likes this variable set
-like so:
+A static library is created by default by invoking @code{$(AR)
+$(ARFLAGS)} followed by the name of the library and then the objects
+being put into the library.  You can override this by setting the
+@samp{_AR} variable.  This is usually used with C++; some C++
+compilers require a special invocation in order to instantiate all the
+templates which should go into a library.  For instance, the SGI C++
+compiler likes this variable set like so:
 @example
 libmaude_a_AR = $(CXX) -ar -o
 @end example
index ba7fd53cbda6ec562acb09098fa040a5da6102d8..92193e85539f9adda67f5c6fddb7cfec45000c25 100644 (file)
@@ -1,5 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003
+## 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
@@ -23,6 +24,7 @@
 
 if %?FIRST%
 AR = ar
+ARFLAGS = cru
 ## For now this is detected when we see AC_PROG_RANLIB
 ## RANLIB = @RANLIB@
 endif %?FIRST%
index 7013658eaddb8208dfe291bd848e9425a76a5a87..24a373866d8cb2b176406d6e39e73e9de830cb1a 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 20 March 2003
-@set UPDATED-MONTH March 2003
+@set UPDATED 6 April 2003
+@set UPDATED-MONTH April 2003
 @set EDITION 1.7a
 @set VERSION 1.7a
index 864dc612b013b32d969d9428f3f62bb855dbf08c..3f70ff58f40a9cbaa90fe736d9cd9ff241f9cee7 100644 (file)
@@ -339,7 +339,6 @@ proginst.test \
 python.test \
 python2.test \
 python3.test \
-ranlib.test \
 recurs.test \
 recurs2.test \
 remake.test \
index 69cafd72958f04b697ca0336a624ac1ec7c88041..809143119b63b2212e348a21cb2e042c17203563 100644 (file)
@@ -433,7 +433,6 @@ proginst.test \
 python.test \
 python2.test \
 python3.test \
-ranlib.test \
 recurs.test \
 recurs2.test \
 remake.test \
index 84f29398f45d21f7c02c35c09b96eb656063c813..e3ed869380a209b172b319fd9885bbfa2a0d44d5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-# Test for setting AR in configure.in.
+# Make sure that AR, ARFLAGS, and RANLIB can be substituted from configure.in.
 
 . ./defs || exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE($me, 1.0)
-AC_PROG_CC
-AC_PROG_RANLIB
-AC_PATH_PROG(AR, arppc)
-AC_CONFIG_FILES(Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([AR], ['echo it works'])
+AC_SUBST([ARFLAGS], ['>'])
+AC_SUBST([RANLIB], ['echo really works >>'])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 lib_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = maude.c
+libfoo_a_SOURCES =
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
-
-grep 'AR = ar' Makefile.in && exit 1
-exit 0
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE
+grep 'it works' libfoo.a
+grep 'really works' libfoo.a
diff --git a/tests/ranlib.test b/tests/ranlib.test
deleted file mode 100755 (executable)
index bd7ca9d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 2001, 2002  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 autoconf; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Test to make sure AC_PROG_RANLIB can be overridden.  Idea from Tatu
-# Ylonen.
-
-. ./defs || exit 1
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-END
-
-cat > Makefile.am << 'END'
-noinst_LIBRARIES = libjoe.a
-END
-
-: > config.guess
-: > config.sub
-
-$ACLOCAL || exit 1
-$AUTOMAKE
index 7013658eaddb8208dfe291bd848e9425a76a5a87..24a373866d8cb2b176406d6e39e73e9de830cb1a 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 20 March 2003
-@set UPDATED-MONTH March 2003
+@set UPDATED 6 April 2003
+@set UPDATED-MONTH April 2003
 @set EDITION 1.7a
 @set VERSION 1.7a