[visit-developers] configure tip

tom fogal tfogal at alumni.unh.edu
Thu Oct 9 13:22:18 EDT 2008


Mark Miller <miller86 at llnl.gov> writes:
> 
> I think the upshot is that you should probably ignore my 'tip' and I
> should probably not suggest 'tips' that I don't fully understand.

Nah, it's better habit to get the old practice out of one's head,
since the new way works `everywhere' and the old way works `some
places'.

I found a short thread explaining why we get lucky:

   http://www.nabble.com/Issue-in-autoconf-with-config.status-generation-td19556659.html

CXXFLAGS, etc. are probably automagically declared `precious'.

-tom

> On Wed, 2008-10-08 at 20:17, Meredith, Jeremy S. wrote:
> > I apologize for being dense here, but I'll continue to blame it on jet
> > lag.  Let me go through in excruciating detail and maybe we can figure
> > out what we're all saying:
> > 
> > Suppose you run:
> > env CXXFLAGS=-g CXX=icc ./configure
> > 
> > Then, at the end of configure, it generates config.status, which
> > contains:
> > s, at CXX@,icc,;t t
> > s, at CXXFLAGS@,-g,;t t
> > 
> > And then, configure runs that config.status, which uses these
> > substitutions to convert Makefile.in's into Makefile's.
> > 
> > The only part that I can think of that even looks at environment
> > variables is where configure takes them as arguments, and then creates
> > them as substitutions (through AC_SUBST) in the config.status script.
> > 
> > Re-running *configure* you have to remember to re-set your environment
> > variables again, of course, and I can't think of a way around that.
> > (Using this trick it will at least print them in human-readable form
> > into the output files, though, which is very useful, but it doesn't
> > automate anything.)
> > 
> > But they should already be encoded into config.status, so that if you
> > just want to re-run config.status, there's no longer any reason to
> > specify the env vars.
> > 
> > So that's my thinking.  Hopefully that's enough info to have someone
> > explain my mental deficiency.  :-)
> > 
> > 
> > --
> > Jeremy Meredith
> > Oak Ridge National Laboratory
> > 
> > 
> > > -----Original Message-----
> > > From: visit-developers-bounces at email.ornl.gov
> > [mailto:visit-developers-
> > > bounces at email.ornl.gov] On Behalf Of tom fogal
> > > Sent: Wednesday, October 08, 2008 11:36 AM
> > > To: VisIt Developers
> > > Subject: Re: [visit-developers] configure tip
> > > 
> > > "Meredith, Jeremy S." <jsmeredith at ornl.gov> writes:
> > > > Is this a problem for CXXFLAGS specifically?
> > > 
> > > Haven't verified, but as I recall, it's for all variables.
> > > 
> > > It's also an issue for AC_CONFIG_SUBDIRS-projects, but we don't
> > > currently have any so we get lucky.
> > > 
> > > -tom
> > > 
> > > > > -----Original Message-----
> > > > > From: visit-developers-bounces at email.ornl.gov
> > > > [mailto:visit-developers-
> > > > > bounces at email.ornl.gov] On Behalf Of Mark Miller
> > > > > Sent: Monday, October 06, 2008 9:34 PM
> > > > > To: VisIt Developers
> > > > > Subject: [visit-developers] configure tip
> > > > >
> > > > > Hi All,
> > > > >
> > > > > I think Tom Treadway mentioned this in an email a long while back
> > > but
> > > > > since I happened to be dealing with it today, I thought I would
> > re-
> > > > > mention it.
> > > > >
> > > > > Many developers commonly run configure like so...
> > > > >
> > > > > env CXXFLAGS=-g ./configure --with-hdf5=...
> > > > >
> > > > > The problem with this invokation is that everything between 'env'
> > > and
> > > > > './configure' is UNKNOWN to autoconf. So, later if you want to
> > > > re-build
> > > > > your makefiles for the SAME state you currently are configured for
> > > and
> > > > > you use './config.status' to do it, it won't know about your env
> > > > > settings. Here is a 'better' invokation...
> > > > >
> > > > > ./configure CXXFLAGS=-g --with-hdf5=...
> > > > >
> > > > > Later, if you type './config-status' it will re-build everything
> > to
> > > > > this
> > > > > same state, including the env. settings.
> > > > >
> > > > > I believe all versions of autoconf above 2.59 support this.
> > > > >
> > > > > Mark
> > > > >
> > > > > --
> > > > > Mark C. Miller, Lawrence Livermore National Laboratory
> > > > > email: mailto:miller86 at llnl.gov
> > > > > (M/T/W) (925)-423-5901 (!!LLNL BUSINESS ONLY!!)
> > > > > (Th/F)  (530)-753-8511 (!!LLNL BUSINESS ONLY!!)
> > > >
> -- 
> Mark C. Miller, Lawrence Livermore National Laboratory
> email: mailto:miller86 at llnl.gov
> (M/T/W) (925)-423-5901 (!!LLNL BUSINESS ONLY!!)
> (Th/F)  (530)-753-8511 (!!LLNL BUSINESS ONLY!!)
> 


More information about the visit-developers mailing list