bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compilation flags per object file


From: Bruno Haible
Subject: Re: compilation flags per object file
Date: Fri, 25 Aug 2006 15:07:26 +0200
User-agent: KMail/1.9.1

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]