[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generating pc file
From: |
Nick Bowler |
Subject: |
Re: generating pc file |
Date: |
Thu, 20 Sep 2012 16:42:18 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2012-09-20 13:14 -0700, Russ Allbery wrote:
> Nick Bowler <address@hidden> writes:
>
> > I wonder if all that's needed is an option to override a configure- time
> > decision when you run config.status? Then you could use the
> > config.status machinery to perform substitutions by calling it at make
> > time, and not have to maintain your own code that does the same thing.
> > Then the makefile could have a rule (either automatically provided by
> > Automake or hand-written by the user) that looks something like:
>
> config.status also doesn't fully expand the variables, though, which is
> something that you'd want for this sort of application. Otherwise, you
> have to know all of the possible ways in which one variable could
> reference another so that you can set all of them (and you can only write
> files that have a variable resolution system, although pkg-config does
> have one). Note that the user can do things like
> --libdir='${datadir}/foo' at configure time, even if it's not common.
Ah, but make will fully expand the variables.
Suppose you have:
prefix = /usr
datadir = ${prefix}/share
then with my example make rule extended to include an override for
datadir, it would have
$(SHELL) $(top_builddir)/config.status --override datadir=$(datadir)
...
and config.status will see
--override datadir=/usr/share
so it would replace @datadir@ with /usr/share.
Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
- Re: generating pc file, David A. Wheeler, 2012/09/20
- Re: generating pc file, Nick Bowler, 2012/09/20
- Re: generating pc file, Russ Allbery, 2012/09/20
- Re: generating pc file,
Nick Bowler <=
- Re: generating pc file, Russ Allbery, 2012/09/20
- Re: generating pc file, Nick Bowler, 2012/09/20
- Re: generating pc file, Russ Allbery, 2012/09/20
- Re: generating pc file, Bob Friesenhahn, 2012/09/20
- Re: generating pc file, Russ Allbery, 2012/09/20
- Re: generating pc file, Bob Friesenhahn, 2012/09/20