Paul Eggert wrote: > Currently, in-place builds for coreutils generte output that looks > like this: > > gcc -std=gnu99 -DHAVE_CONFIG_H -DLIBDIR=\"/usr/local/lib\" -I. -I. -I. > -g -O2 -c allocsa.c > gcc -std=gnu99 -DHAVE_CONFIG_H -DLIBDIR=\"/usr/local/lib\" -I. -I. -I. > -g -O2 -c base64.c > gcc -std=gnu99 -DHAVE_CONFIG_H -DLIBDIR=\"/usr/local/lib\" -I. -I. -I. > -g -O2 -c diacrit.c > ... > > This is hard to read, and I'd like to make it shorter. One obvious > candidate is the ' -DLIBDIR=\"/usr/local/lib\"' string, which is > needed only for compiling localcharset.c.
I would love to replace DEFS += -DLIBDIR=\"$(libdir)\" with localcharset_CPPFLAGS = $(AM_CPPFLAGS) -DLIBDIR=\"$(libdir)\" but does automake support per-object-file settings? The automake manual documents only setting compilation flags per library or per executable, not per compilation unit. If not, then this is a feature request :-) Bruno