On 2012-09-20 13:14 -0700, Russ Allbery wrote: > Nick Bowler <nbowler@xxxxxxxxxxxxxxxx> 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/) _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf