[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] proposed patch for getline / getndelim2 when both are used
From: |
Paul Eggert |
Subject: |
[Bug-gnulib] proposed patch for getline / getndelim2 when both are used |
Date: |
04 Aug 2003 23:54:37 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
I ran into a problem when merging the recent gnulib changes for
getline and getndelim2 into coreutils. Coreutils uses both getline
and getndelim2, so I invoked both AM_FUNC_GETLINE and gl_GETNDELIM2
and appended getndelim2.h getndelim2.c to EXTRA_DIST (as
modules/getline suggests) and also appended the same two files to
LIB_SOURCES (as modules/getndelim2 suggests). But Automake 1.7.6
rejected this, and other plausible variants of this, with this
diagnostic:
make[2]: Entering directory `/home/eggert/src/gnu/coreutils-cum/lib'
cd .. && \
/bin/sh /home/eggert/src/gnu/coreutils-cum/config/missing --run
automake-1.7 --gnits lib/Makefile
lib/Makefile.am:130: automatically discovered file `getndelim2.c' should
not be explicitly mentioned
make[2]: *** [Makefile.in] Error 1
Here is a proposed patch. The basic idea is to always build
getndelim2.o if you use either module. This has the downside of
sometimes building getndelim2.o even when the package doesn't need it,
but at least the executables work correctly and I couldn't see a
simpler fix.
2003-08-04 Paul Eggert <address@hidden>
* m4/getline.m4 (AM_FUNC_GETLINE): Do not use AC_LIBOBJ(getndelim2);
always build getndelim2.o.
* modules/getline (Depends-on): Add getndelim2.
(EXTRA_DIST): Remove; getndelim2.h and getndelim2.c are no longer
extra.
Index: m4/getline.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/getline.m4,v
retrieving revision 1.12
diff -p -u -r1.12 getline.m4
--- m4/getline.m4 18 Jul 2003 16:58:06 -0000 1.12
+++ m4/getline.m4 5 Aug 2003 06:50:20 -0000
@@ -56,7 +56,6 @@ AC_DEFUN([AM_FUNC_GETLINE],
AC_DEFINE([getline], [gnu_getline],
[Define to a replacement function name for getline().])
AC_LIBOBJ(getline)
- AC_LIBOBJ(getndelim2)
gl_PREREQ_GETLINE
gl_PREREQ_GETNDELIM2
fi
Index: modules/getline
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/getline,v
retrieving revision 1.6
diff -p -u -r1.6 getline
--- modules/getline 18 Jul 2003 16:58:06 -0000 1.6
+++ modules/getline 5 Aug 2003 06:50:20 -0000
@@ -11,6 +11,7 @@ m4/getndelim2.m4
m4/ssize_t.m4
Depends-on:
+getndelim2
unlocked-io
configure.ac:
@@ -18,7 +19,6 @@ AM_FUNC_GETLINE
Makefile.am:
lib_SOURCES += getline.h
-EXTRA_DIST += getndelim2.h getndelim2.c
Include:
"getline.h"
- [Bug-gnulib] proposed patch for getline / getndelim2 when both are used,
Paul Eggert <=