[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation flags per object file
From: |
Mark D. Baushke |
Subject: |
Re: compilation flags per object file |
Date: |
Fri, 25 Aug 2006 09:01:03 -0700 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ralf Wildenhues <address@hidden> writes:
> Hello Bruno,
>
> * Bruno Haible wrote on Fri, Aug 25, 2006 at 03:07:26PM CEST:
> >
> > I would love to replace
> >
> > DEFS += -DLIBDIR=\"$(libdir)\"
> >
> > with
> >
> > localcharset_CPPFLAGS = $(AM_CPPFLAGS) -DLIBDIR=\"$(libdir)\"
> >
> > but does automake support per-object-file settings?
>
> No. You can workaround by making your object be the only one in a
> noinst_[LT]LIBRARY and setting per-target flags for that.
>
> > If not, then this is a feature request :-)
>
> If you ask me: don't hold your breath. You should note that object file
> names are an internal Automake detail, so the naming of the respective
> *_CPPFLAGS variable is not clear, for starters. Above would conflict
> with a program named localcharset.
There should be no ambiguity if you add the $(ext) to the
makefile macro name:
localcharset.o_CPPFLAGS = $(AM_CPPFLAGS) -DLIBDIR=\"$(libdir)\"
and then use $($*$(ext)_CPPDFLAGS) in rules that need it.
Although to be honest, I would find it easier to read and use
CPPFLAFGS_localcharset$(ext) = $(AM_CPPFLAGS) -DLIBDIR=\"$(libdir)\"
Then the rule could add $(CPPFLAGS_$*$(ext)) to the compilation line
for the file.
-- Mark
>
> Cheers,
> Ralf
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)
iD8DBQFE7x6/Cg7APGsDnFERAm55AJ48uDIXkJZgYlisyFps2x7SiJySLQCgw2fh
8UHpgWdDcmlHTk2IA7iAaRQ=
=Qln4
-----END PGP SIGNATURE-----
- Re: proposed gnulib module 'configmake', plus use by 'localcharset', (continued)
- Re: proposed gnulib module 'configmake', plus use by 'localcharset', Paul Eggert, 2006/08/25
- Re: [bug-gnulib] Re: proposed gnulib module 'configmake', plus use by 'localcharset', Bruno Haible, 2006/08/29
- Re: [bug-gnulib] Re: proposed gnulib module 'configmake', plus use by 'localcharset', Paul Eggert, 2006/08/29
- Re: [bug-gnulib] Re: proposed gnulib module 'configmake', plus use by 'localcharset', Bruno Haible, 2006/08/29
- Re: proposed gnulib module 'configmake', plus use by 'localcharset', Jim Meyering, 2006/08/29
- Re: proposed gnulib module 'configmake', plus use by 'localcharset', Ralf Wildenhues, 2006/08/29
- Re: proposed gnulib module 'configmake', plus use by 'localcharset', Jim Meyering, 2006/08/29
- Re: proposed gnulib module 'configmake', plus use by 'localcharset', Ralf Wildenhues, 2006/08/29
Re: compilation flags per object file, Bruno Haible, 2006/08/25
Re: compilation flags per object file, Paul Eggert, 2006/08/25