summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1996-11-16 01:43:23 +0000
committerTom Tromey <tromey@redhat.com>1996-11-16 01:43:23 +0000
commit2a4fc173032edbf5826e60842e24d57990bdf1fa (patch)
tree9c373dccfc7d15ec00a2dbef10f4290530cd2bc9
parentb736f0ee831671e11eaffdf598b24d69fe237d4b (diff)
downloadautomake-2a4fc173032edbf5826e60842e24d57990bdf1fa.tar.gz
Installed Gord's library changes
-rw-r--r--ChangeLog16
-rw-r--r--NEWS1
-rwxr-xr-xautomake.in64
-rw-r--r--automake.texi17
-rw-r--r--lib/am/library.am8
-rw-r--r--lib/am/libs.am8
-rw-r--r--library.am8
-rw-r--r--libs-clean.am2
-rw-r--r--libs.am8
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/Makefile.am2
-rwxr-xr-xtests/alllib.test4
-rwxr-xr-xtests/canon4.test4
-rwxr-xr-xtests/libfiles.test21
-rwxr-xr-xtests/libobj.test6
-rwxr-xr-xtests/libobj2.test6
-rwxr-xr-xtests/ranlib.test2
-rw-r--r--version.texi2
18 files changed, 76 insertions, 108 deletions
diff --git a/ChangeLog b/ChangeLog
index 85486d58e..32ab1cebc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,22 @@
+Fri Nov 15 16:22:15 1996 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * library.am: Fixed references to LIBRARY according to new scheme.
+
+ * libs.am, libs-clean.am: Removed references to LIBFILES.
+
+ * automake.texi (A Library): doc fix
+
+ * automake.in (handle_libraries): Deleted references to *LIBFILES,
+ since we now have the full library name in the *LIBRARIES
+ variable.
+ (am_install_var): Removed `-no-all' option, which was only required
+ for the LIBFILES hack.
+
Fri Nov 15 16:39:29 1996 Tom Tromey <tromey@cygnus.com>
* automake.in: Applied libtool-related patches from Gord.
+ (scan_configure): Set CC configure var if AM_PROG_LIBTOOL seen.
+ Also indicate that AC_CANONICAL_HOST was run.
* Makefile.am (pkgdata_DATA): Removed aclocal.m4.
diff --git a/NEWS b/NEWS
index f362eb449..9d7143fbe 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,7 @@ New in 1.1h:
* Special --cygnus mode
* OMIT_DEPENDENCIES can now hold list of dependencies to be omitted
when making distribution. Some dependencies are auto-ignored.
+* Changed how libraries are specified in _LIBRARIES variable
New in 1.0:
* Bug fixes
diff --git a/automake.in b/automake.in
index d4e0da00f..c43d0d794 100755
--- a/automake.in
+++ b/automake.in
@@ -1201,7 +1201,7 @@ sub handle_programs
# Handle libraries.
sub handle_libraries
{
- local (@liblist) = &am_install_var ('-no-all', '-clean',
+ local (@liblist) = &am_install_var ('-clean',
'libs', 'LIBRARIES',
'lib', 'pkglib', 'noinst', 'check');
return if ! @liblist;
@@ -1223,47 +1223,21 @@ sub handle_libraries
}
}
- # Generate _LIBFILES variables. Too bad we can't do this in
- # am_install_var.
- local ($onedir, $onelib);
- local (@outlist);
- local (@libfiles_list);
- foreach $onedir (keys %valid)
- {
- if (&variable_defined ($onedir . '_LIBRARIES'))
- {
- @outlist = ();
- foreach $onelib (&variable_value_as_list ($onedir . '_LIBRARIES'))
- {
- # FIXME: configure substitutions are just preserved.
- # So your configure.in must say MYLIB=libfoo.a instead
- # of MYLIB=foo. Otherwise, you end up with an entry
- # like lib@MYLIB@.a in LIBFILES, which can turn into
- # "lib.a" -- major lossage. Something better must be
- # done here.
- if (/^\@.*\@$/)
- {
- push (@outlist, $onelib);
- }
- else
- {
- push (@outlist, 'lib' . $onelib . '.a');
- }
- }
- &define_pretty_variable ($onedir . '_LIBFILES', @outlist);
- }
-
- push (@libfiles_list, '$(' . $onedir . '_LIBFILES)')
- unless $onedir eq 'EXTRA';
- }
- push (@all, '$(LIBFILES)');
-
+ local ($onelib);
local ($obj) = &get_object_extension;
local ($munge);
local ($xlib);
local ($seen_libobjs) = 0;
foreach $onelib (@liblist)
{
+ # Check that the library fits the standard naming convention.
+ if ($onelib !~ /^lib.*\.a$/)
+ {
+ # FIXME this should only be a warning for foreign packages
+ &am_line_error ($onelib . $xt,
+ "\`$onelib' is not a standard library name");
+ }
+
# Canonicalize names.
($xlib = $onelib) =~ tr/A-Za-z0-9_/_/c;
if ($xlib ne $onelib)
@@ -1271,7 +1245,7 @@ sub handle_libraries
local ($xt);
foreach $xt ('_LIBADD', '_SOURCES', '_OBJECTS', '_DEPENDENCIES')
{
- &am_line_error ($one_file . $xt,
+ &am_line_error ($onelib . $xt,
"invalid variable \`" . $onelib . $xt
. "'; should be \`" . $xlib . $xt . "'")
if &variable_defined ($onelib . $xt);
@@ -1314,14 +1288,6 @@ sub handle_libraries
}
}
- # Turn "foo" into "libfoo.a" and include macro definition.
- grep (($_ = 'lib' . $_ . '.a') && 0, @liblist);
-
- if (! &variable_defined ('LIBFILES'))
- {
- &define_pretty_variable ('LIBFILES ', @libfiles_list);
- }
-
&define_variable ('AR', 'ar');
&define_configure_variable ('RANLIB');
}
@@ -3191,6 +3157,10 @@ sub scan_configure
$seen_libtool = 1;
$libtool_line = $.;
$configure_vars{'RANLIB'} = 1;
+ $configure_vars{'CC'} = 1;
+ # AM_PROG_LIBTOOL runs AC_CANONICAL_HOST. Make sure we
+ # never downgrade (if we've seen AC_CANONICAL_SYSTEM).
+ $seen_canonical = $AC_CANONICAL_HOST if ! $seen_canonical;
}
}
@@ -4030,10 +4000,6 @@ sub am_install_var
{
$do_clean = 1;
}
- elsif ($args[0] eq '-no-all')
- {
- $do_all = 0;
- }
elsif ($args[0] !~ /^-/)
{
last;
diff --git a/automake.texi b/automake.texi
index 501864e5a..5c6f89810 100644
--- a/automake.texi
+++ b/automake.texi
@@ -938,18 +938,19 @@ Building a library is much like building a program. In this case, the
name of the primary is @samp{LIBRARIES}. Libraries can be installed in
@code{libdir} or @code{pkglibdir}.
-Each @samp{_LIBRARIES} variable is a list of the base names of
-libraries to be built. For instance to create a library named
-@file{libcpio.a}, but not install it, you would write:
+Each @samp{_LIBRARIES} variable is a list of the libraries to be built.
+For instance to create a library named @file{libcpio.a}, but not install
+it, you would write:
@example
-noinst_LIBRARIES = cpio
+noinst_LIBRARIES = libcpio.a
@end example
The sources that go into a library are determined exactly as they are
-for programs, via the @samp{_SOURCES} variables. Note that programs and
-libraries share a namespace, so one cannot have a program (@file{lob}) and
-a library (@file{liblob.a}) with the same name in one directory.
+for programs, via the @samp{_SOURCES} variables. Note that the library
+name is canonicalized (@pxref{Canonicalization}), so the @samp{_SOURCES}
+variable corresponding to @file{liblob.a} is @samp{liblob_a_SOURCES},
+not @samp{liblob.a_SOURCES}.
Extra objects can be added to a library using the @samp{library_LIBADD}
variable. This should be used for objects determined by
@@ -958,7 +959,7 @@ variable. This should be used for objects determined by
@vindex LIBADD
@example
-cpio_LIBADD = @@LIBOBJS@@ @@ALLOCA@@
+libcpio_a_LIBADD = @@LIBOBJS@@ @@ALLOCA@@
@end example
diff --git a/lib/am/library.am b/lib/am/library.am
index 00e09705a..a24744895 100644
--- a/lib/am/library.am
+++ b/lib/am/library.am
@@ -15,7 +15,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-lib@LIBRARY@.a: $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_DEPENDENCIES)
- rm -f lib@LIBRARY@.a
- $(AR) cru lib@LIBRARY@.a $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_LIBADD)
- $(RANLIB) lib@LIBRARY@.a
+@LIBRARY@: $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_DEPENDENCIES)
+ rm -f @LIBRARY@
+ $(AR) cru @LIBRARY@ $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_LIBADD)
+ $(RANLIB) @LIBRARY@
diff --git a/lib/am/libs.am b/lib/am/libs.am
index 324128d64..a5a449a9b 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -15,12 +15,12 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
+install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES)
$(NORMAL_INSTALL)
$(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- list="$(@DIR@_LIBFILES)"; for p in $$list; do \
+ list="$(@DIR@_LIBRARIES)"; for p in $$list; do \
if test -f $$p; then \
$(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \
else :; fi; \
@@ -31,7 +31,7 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
## useless; sh never actually executes this command. Read the GNU
## Standards for a little enlightenment on this.
$(POST_INSTALL)
- list="$(@DIR@_LIBFILES)"; for p in $$list; do \
+ list="$(@DIR@_LIBRARIES)"; for p in $$list; do \
if test -f $$p; then \
## Must ranlib after installing because mod time changes.
$(RANLIB) $(@DIR@dir)/$$p; \
@@ -39,6 +39,6 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
done
uninstall-@DIR@LIBRARIES:
- list="$(@DIR@_LIBFILES)"; for p in $$list; do \
+ list="$(@DIR@_LIBRARIES)"; for p in $$list; do \
rm -f $(@DIR@dir)/$$p; \
done
diff --git a/library.am b/library.am
index 00e09705a..a24744895 100644
--- a/library.am
+++ b/library.am
@@ -15,7 +15,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-lib@LIBRARY@.a: $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_DEPENDENCIES)
- rm -f lib@LIBRARY@.a
- $(AR) cru lib@LIBRARY@.a $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_LIBADD)
- $(RANLIB) lib@LIBRARY@.a
+@LIBRARY@: $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_DEPENDENCIES)
+ rm -f @LIBRARY@
+ $(AR) cru @LIBRARY@ $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_LIBADD)
+ $(RANLIB) @LIBRARY@
diff --git a/libs-clean.am b/libs-clean.am
index aadfac6b5..0f7f0fa18 100644
--- a/libs-clean.am
+++ b/libs-clean.am
@@ -18,7 +18,7 @@
mostlyclean-@DIR@LIBRARIES:
clean-@DIR@LIBRARIES:
- test -z "$(@DIR@_LIBFILES)" || rm -f $(@DIR@_LIBFILES)
+ test -z "$(@DIR@_LIBRARIES)" || rm -f $(@DIR@_LIBRARIES)
distclean-@DIR@LIBRARIES:
diff --git a/libs.am b/libs.am
index 324128d64..a5a449a9b 100644
--- a/libs.am
+++ b/libs.am
@@ -15,12 +15,12 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
+install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES)
$(NORMAL_INSTALL)
$(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- list="$(@DIR@_LIBFILES)"; for p in $$list; do \
+ list="$(@DIR@_LIBRARIES)"; for p in $$list; do \
if test -f $$p; then \
$(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \
else :; fi; \
@@ -31,7 +31,7 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
## useless; sh never actually executes this command. Read the GNU
## Standards for a little enlightenment on this.
$(POST_INSTALL)
- list="$(@DIR@_LIBFILES)"; for p in $$list; do \
+ list="$(@DIR@_LIBRARIES)"; for p in $$list; do \
if test -f $$p; then \
## Must ranlib after installing because mod time changes.
$(RANLIB) $(@DIR@dir)/$$p; \
@@ -39,6 +39,6 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
done
uninstall-@DIR@LIBRARIES:
- list="$(@DIR@_LIBFILES)"; for p in $$list; do \
+ list="$(@DIR@_LIBRARIES)"; for p in $$list; do \
rm -f $(@DIR@dir)/$$p; \
done
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 54a140ce9..7b6527a9b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,10 @@
Fri Nov 15 00:09:18 1996 Tom Tromey <tromey@cygnus.com>
+ * libfiles.test: Removed (obsolete).
+
+ * libobj.test, canon4.test, libobj2.test, alllib.test,
+ ranlib.test: Fixed for Gord's changes to library handling.
+
* Many files: Use AC_PROG_CC to avoid error.
Thu Oct 24 15:22:53 1996 Tom Tromey <tromey@cygnus.com>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 031acc82c..4263d4df4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -10,7 +10,7 @@ target.test extra.test noinst.test instman.test mkinstall.test auxdir.test \
canon3.test mdate2.test subdir.test backsl.test package.test number.test \
insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
yacc.test mkinst2.test texinfo2.test ansi.test depacl.test depacl2.test \
-error.test colon.test vtexi2.test tags.test comment.test libfiles.test \
+error.test colon.test vtexi2.test tags.test comment.test \
man.test info.test obsolete.test lex.test scripts.test subdir2.test \
exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
order.test libobj2.test interp.test alllib.test block.test libobj3.test \
diff --git a/tests/alllib.test b/tests/alllib.test
index 8b63aeb43..2f6425e79 100755
--- a/tests/alllib.test
+++ b/tests/alllib.test
@@ -11,8 +11,8 @@ AC_PROG_RANLIB
END
cat > Makefile.am << 'END'
-lib_LIBRARIES = V
-EXTRA_LIBRARIES = Vm
+lib_LIBRARIES = libV.a
+EXTRA_LIBRARIES = libVm.a
END
$AUTOMAKE || exit 1
diff --git a/tests/canon4.test b/tests/canon4.test
index 7207fd1ee..6c8742451 100755
--- a/tests/canon4.test
+++ b/tests/canon4.test
@@ -10,8 +10,8 @@ AC_PROG_RANLIB
END
cat > Makefile.am << 'END'
-noinst_LIBRARIES = x-y
-x_y_SOURCES = xy.c
+noinst_LIBRARIES = libx-y.a
+libx_y_a_SOURCES = xy.c
END
$AUTOMAKE || exit 1
diff --git a/tests/libfiles.test b/tests/libfiles.test
deleted file mode 100755
index 429282cd0..000000000
--- a/tests/libfiles.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh
-
-# Test for bug reported by Gord Matzigkeit. If user-defined prefix is
-# used with library, _LIBFILES is never generated.
-
-. $srcdir/defs || exit 1
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AC_PROG_RANLIB
-END
-
-cat > Makefile.am << 'END'
-blibdir = $(top_builddir)/lib
-blib_LIBRARIES = foo
-foo_SOURCES = foo.c
-END
-
-$AUTOMAKE || exit 1
-
-grep '^blib_LIBFILES' Makefile.in
diff --git a/tests/libobj.test b/tests/libobj.test
index 9fe17b783..f9465311c 100755
--- a/tests/libobj.test
+++ b/tests/libobj.test
@@ -17,9 +17,9 @@ AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
-noinst_LIBRARIES = tu
-tu_SOURCES =
-tu_LIBADD = @LIBOBJS@
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
END
: > fsusage.c
diff --git a/tests/libobj2.test b/tests/libobj2.test
index 85f8d89e7..ad745c3b9 100755
--- a/tests/libobj2.test
+++ b/tests/libobj2.test
@@ -18,9 +18,9 @@ END
mkdir subdir
cat > subdir/Makefile.am << 'END'
-noinst_LIBRARIES = tu
-tu_SOURCES =
-tu_LIBADD = @LIBOBJS@
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
END
: > subdir/fsusage.c
diff --git a/tests/ranlib.test b/tests/ranlib.test
index c18a21f8a..d977a392b 100755
--- a/tests/ranlib.test
+++ b/tests/ranlib.test
@@ -11,7 +11,7 @@ AC_CHECK_TOOL(RANLIB, ranlib, :)
END
cat > Makefile.am << 'END'
-noinst_LIBRARIES = joe
+noinst_LIBRARIES = libjoe.a
END
: > config.guess
diff --git a/version.texi b/version.texi
index b9c052e43..4b0b234d6 100644
--- a/version.texi
+++ b/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 14 November 1996
+@set UPDATED 15 November 1996
@set EDITION 1.1h
@set VERSION 1.1h