[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files
From: |
Jim Meyering |
Subject: |
[bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files |
Date: |
Sat, 29 Jan 2005 01:31:30 +0100 |
FYI,
I proposed this conversion (adding AC_LIBSOURCES) over a month ago and
everyone but Bruno seemed to like it. I never heard back from Bruno
after this message,
http://lists.gnu.org/archive/html/bug-gnulib/2004-12/msg00042.html
so maybe he was convinced :)
There are still many lib/*.[ch] files in coreutils that lack a .m4 file,
so I'll be adding some of those to complete the process.
m4:
2005-01-29 Jim Meyering <address@hidden>
Use AC_LIBSOURCES to list corresponding source (.c, .h, .y) files
so that automake automatically knows to distribute those files.
Use AC_LIBOBJ to ensure that automake automatically knows the
names of always-compiled source files. Automake already knows
the names of conditionally compiled ones, e.g., due to preexisting
uses of AC_LIBOBJ and AC_REPLACE_FUNCS.
[This is a start. Many still remain to be fixed...]
* acl.m4, backupfile.m4, c-strtod.m4, canon-host.m4:
* canonicalize.m4, cloexec.m4, closeout.m4, dirfd.m4, dirname.m4:
* exclude.m4, exitfail.m4, file-type.m4, filemode.m4, fpending.m4:
* fsusage.m4, getdate.m4, getline.m4, getpagesize.m4, getpass.m4:
* gettime.m4, getugroups.m4, group-member.m4, hard-locale.m4:
* hash.m4, human.m4, idcache.m4, long-options.m4, makepath.m4:
* md5.m4, memcoll.m4, modechange.m4, mountlist.m4, nanosleep.m4:
* path-concat.m4, pathmax.m4, physmem.m4, posixtm.m4, posixver.m4:
* quote.m4, quotearg.m4, readtokens.m4, readutmp.m4, safe-read.m4:
* safe-write.m4, same.m4, savedir.m4, setenv.m4, settime.m4:
* sha1.m4, sig2str.m4, strdup.m4, strftime.m4, strndup.m4:
* strverscmp.m4, timespec.m4, unlocked-io.m4, userspec.m4:
* utimecmp.m4, utimens.m4, xalloc.m4, yesno.m4:
lib:
2005-01-29 Jim Meyering <address@hidden>
* Makefile.am (libfetish_a_SOURCES): Remove many files from this
list, now that automake determines their names automatically,
thanks to the new AC_LIBSOURCES and AC_LIBOBJ uses in the
corresponding ../m4/*.m4 files.
(EXTRA_DIST): Add getdate.c here, so that we continue to distribute it.
--------------
Many of .m4 changes looked like this,
though some didn't need (and shouldn't have) a new AC_LIBOBJ use.
Index: closeout.m4
===================================================================
RCS file: /fetish/cu/m4/closeout.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -u -2 -r1.3 -r1.4
--- closeout.m4 23 Jan 2005 09:07:57 -0000 1.3
+++ closeout.m4 29 Jan 2005 00:16:39 -0000 1.4
@@ -7,4 +7,7 @@ dnl with or without modifications, as lo
AC_DEFUN([gl_CLOSEOUT],
[
+ AC_LIBSOURCES([closeout.c, closeout.h])
+ AC_LIBOBJ([closeout])
+
dnl Prerequisites of lib/closeout.c.
:
Here's the lib/Makefile.am change:
Index: lib/Makefile.am
===================================================================
RCS file: /fetish/cu/lib/Makefile.am,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -p -u -r1.208 -r1.209
--- lib/Makefile.am 21 Jan 2005 00:21:01 -0000 1.208
+++ lib/Makefile.am 29 Jan 2005 00:20:50 -0000 1.209
@@ -25,111 +25,44 @@ LDADD = $(noinst_LIBRARIES)
AM_CPPFLAGS = -I.. -I$(srcdir)
DEFS += -DLIBDIR=\"$(libdir)\"
-## Put relatively complex files at the beginning of the list so
-## that parallel compiles finish a tiny bit sooner. I don't see
-## a way to make regex.c appear earlier in the list, since it's
-## added by automake, but on systems with an up to date GNU libc,
-## regex.c isn't even compiled.
libfetish_a_SOURCES = \
- acl.h acl.c \
- getdate.h getdate.y \
- posixtm.c posixtm.h \
- posixver.c posixver.h \
- strftime.c strftime.h \
- hash.c hash.h \
- hash-pjw.c hash-pjw.h \
- __fpending.h \
allocsa.c allocsa.h \
argmatch.c argmatch.h \
- backupfile.c backupfile.h \
- basename.c \
- c-strtod.c c-strtod.h c-strtold.c \
- canon-host.c \
- canonicalize.c canonicalize.h \
- cloexec.c cloexec.h \
- closeout.c closeout.h \
cycle-check.c cycle-check.h \
dev-ino.h \
diacrit.c diacrit.h \
- dirname.c dirname.h \
- dirfd.h \
dup-safer.c \
euidaccess.h \
- exclude.c exclude.h \
exit.h \
- exitfail.c exitfail.h \
fcntl-safer.h \
- filemode.c filemode.h \
- file-type.c file-type.h \
fopen-safer.c \
- fsusage.h \
fts.c fts_.h \
full-read.c full-read.h \
full-write.c full-write.h \
getcwd.h \
- getline.h \
- getpagesize.h \
- getpass.h \
- gettime.c \
gettext.h \
- getugroups.c \
- group-member.h \
- hard-locale.c hard-locale.h \
- human.c human.h \
- idcache.c \
imaxtostr.c \
linebuffer.c linebuffer.h \
localcharset.c localcharset.h \
- long-options.c long-options.h \
- makepath.c makepath.h \
mbswidth.c mbswidth.h \
- md5.c md5.h \
memcasecmp.c memcasecmp.h \
- memcoll.c memcoll.h \
- modechange.c modechange.h \
- mountlist.h \
offtostr.c \
open-safer.c \
- path-concat.c path-concat.h \
- pathmax.h \
- physmem.c physmem.h \
- quote.c quote.h \
- quotearg.c quotearg.h \
readtokens0.c readtokens0.h \
- readtokens.c readtokens.h \
- readutmp.h \
regex.h \
root-dev-ino.c root-dev-ino.h \
- safe-read.c safe-read.h \
- safe-write.c safe-write.h \
- same.c same.h \
- savedir.c savedir.h \
- setenv.h \
- settime.c \
- sha1.c sha1.h \
- sig2str.h \
stat-macros.h \
stdio-safer.h \
stripslash.c \
- strdup.h \
- strndup.h \
- strverscmp.h \
time_r.c time_r.h \
- timespec.h \
umaxtostr.c \
unicodeio.c unicodeio.h \
unistd-safer.h \
- unlocked-io.h \
- userspec.c userspec.h \
- utimecmp.c utimecmp.h \
- utimens.c utimens.h \
version-etc.c version-etc.h version-etc-fsf.c \
- xalloc.h \
xalloc-die.c \
xfts.c xfts.h \
xgetcwd.c xgetcwd.h \
xgethostname.c xgethostname.h \
- xmalloc.c \
xmemcoll.c xmemcoll.h \
xnanosleep.c xnanosleep.h \
xreadlink.c xreadlink.h \
@@ -138,8 +71,7 @@ libfetish_a_SOURCES = \
xstrtoimax.c \
xstrtol.c xstrtol.h \
xstrtoul.c \
- xstrtoumax.c \
- yesno.c yesno.h
+ xstrtoumax.c
libfetish_a_SOURCES += \
printf-args.h \
@@ -159,7 +91,7 @@ MAINTAINERCLEANFILES = $(BUILT_SOURCES)
MOSTLYCLEANFILES =
SUFFIXES =
-EXTRA_DIST = config.charset ref-add.sin ref-del.sin \
+EXTRA_DIST = getdate.c config.charset ref-add.sin ref-del.sin \
getndelim2.c getndelim2.h \
inttostr.c inttostr.h
- [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files,
Jim Meyering <=
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, Bruno Haible, 2005/01/29
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, James Youngman, 2005/01/29
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, Jim Meyering, 2005/01/29
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, Alexandre Duret-Lutz, 2005/01/29
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, Jim Meyering, 2005/01/29
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, Alexandre Duret-Lutz, 2005/01/30
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, Jim Meyering, 2005/01/31
- Re: [bug-gnulib] FYI: adding AC_LIBSOURCES/AC_LIBOBJ in coreutils .m4 files, Alexandre Duret-Lutz, 2005/01/31