EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: configure/RELEASE contents
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Sat, 8 Nov 2003 01:41:33 +0100
On Friday 07 November 2003 20:32, Geoff Savage wrote:
> Hi,
>
> I have two environment variables that are set when I go to build a top
> area, EPICS_DIR and EPICS_EXTENSIONS_DIR, in addition to
> EPICS_HOST_ARCH.  I want to use these environment variables in
> configure/RELEASE to specify where the external products are located.
>
> EPICS_BASE=$(EPICS_DIR)
> SYMB=$(EPICS_EXTENSIONS_DIR)
> VXSTATS=$(EPICS_EXTENSIONS_DIR)
>
> With these definitions there are environment variables missing from
> configure/O.solaris-sparc/CONFIG_APP_INCLUDE.  For example when
> constructing dbd files that include dbCommon.dbd the dbCommon.dbd file
> is not found.
>
> When I use absolute paths everything works.  Would someone please remind
> me why I need to use absolute paths when specifying products in the
> configure/RELEASE file?  Can I specify these variables in a different
> location?

Hi Geoff,

the CONFIG_APP_INCLUDE files are generated by the perl script 
$(EPICS_BASE)/configure/tools/convertRelease.pl which parses the lcal 
configure/RELEASE[.ARCH], albeit in a rather simplistic manner. Variables 
appearing in variable definitions are not expanded, partly because only make 
knows the values of all the variables (including those inherited from the 
environment). More precisely, even make doesn't know (yet) all these values, 
because definitions of the form NAME = VALUE are evaluated lazily, i.e. on 
demand, i.e. only when the value is actually needed inside a rule.

I can imagine a possible fix: the perl script must be split in two parts, one 
that finds all definitions in RELEASE and outputs the *names* of the defined 
variables and another one that parses a list of NAME=VALUE pairs (given as 
command line arguments) and outputs the CONFIG_APP_INCLUDE. The make rules 
would be adapted along the following lines:

# the use of ':=' forces eager evaluation; it is used here only for efficiency
RELEASE_VARS := $(shell $(PERL) $(TOOLS)/releaseVars.pl <\
 $(TOP)/configure/RELEASE)

# note that RELEASE has been included in the makefile
RELEASE_DEFS := $(foreach name, $(RELEASE_NAMES), -def '$name=$($name))')

$(TOP)/configure/$(T_A)/CONFIG_APP_INCLUDE: $(TOP)/configure/RELEASE
	$(PERL) $(TOOLS)/convertRelease.pl $(RELEASE_DEFS) > $@

Ben

References:
configure/RELEASE contents Geoff Savage

Navigate by Date:
Prev: building et_wish on HP-UX Bill Cruise
Next: Re: configure/RELEASE contents Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: configure/RELEASE contents Billy R. Adams
Next: Re: configure/RELEASE contents Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·