Eric Blake wrote: > While playing with utimensat, I realized that the use of gettime() requires > $(LIB_CLOCK_GETTIME) in order to compile on some platforms (in this case, > developing on cygwin spoiled me, since clock_gettime() is part of -lc). Since > I'm teaching utimens about UTIME_NOW, which means a use of gettime(), this > will > impact all clients of utimens. But I had a tough time seeing whether any > additional coreutils needed to add this dependency, not to mention that there > was no obvious order in app names. OK to apply this refactoring, which preps > all programs to start with $(LDADD), making it easier to use += $(LIB_foo) one > library at a time? > > For each library chunk, the comment lists something to grep for; any time we > add a new gnulib module that adds another library dependency, it should be > easier to grep for anyone that uses that function, and update the library > section accordingly. > > The diff may be hard to read, so I've also pasted the current state > post-patch. > > From: Eric Blake <[email protected]> > Date: Fri, 9 Oct 2009 13:57:56 -0600 > Subject: [PATCH] maint: improve additional library tracking > > * src/Makefile.am (LDADD): Refactor, to make per-library additions > to individual programs easier to maintain.
Nice change. Go ahead. ... > -# This is for the '[' program. Automake transliterates '[' to '_'. > -__LDADD = $(LDADD) $(LIB_EACCESS) ... > +# Synonyms > +__LDADD = $(test_LDADD) # Automake transliterates '[' to '_'. However, please don't append " # ..." on an assignment. That is a general "good to avoid" practice, because otherwise, the variable's value contains the trailing space(s). Sometimes, such trailing spaces can cause trouble.
