EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Proposal for an addition to configure/tools/convertRelease.pl
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Mon, 29 Jan 2007 13:51:45 +0100
With the following addition to convertRelease.pl, an additional variable 
RELEASE_DBFLAGS will be generated:

# diff convertRelease.orig.pl convertRelease.pl
216a217,221
>     foreach $app (@includes) {
>       $path = $macros{$app};
>       next unless (-d "$path/db");
>       print OUT "RELEASE_DBFLAGS += -I\$(strip \$($app))/db\n";
>     }

This variable can then be added to DBFLAGS (so that e.g. MSI gets the 
correct search path, including the db subdirs of support modules) and 
also to generate the environment needed for vdct's flatdb tool. Flatdb 
needs EPICS_DB_INCLUDE_PATH to be set to a search path for vdb template 
files (it has no command line argument to extend the search path).

Thus, currently we have the following additional rules in our 
application level configure/RULES file:

vpath %.vdb $(RELEASE_DBFLAGS:-I%=%)
vpath %.template $(RELEASE_DBFLAGS:-I%=%)

DBFLAGS += $(RELEASE_DBFLAGS)

FLATDB_ENV = EPICS_DB_INCLUDE_PATH=`echo "$(DBFLAGS:-I%=%)" | tr ' ' 
':'`

define FLATDB_COMMANDS
	@echo Flattening $< to $(COMMON_DIR)/$@
	@$(RM) $@
	# too bad flatdb doesn't return a usable exit code
	-$(FLATDB_ENV) $(FLATDB) $(FLATDB_FLAGS) -d $1 $< $(COMMON_DIR)/$@ $2
endef

ifdef DBDNAME # if a common DBDNAME is defined, use it for flatdb
%.template: %.vdb $(COMMON_DIR)/$(DBDNAME)
	$(call FLATDB_COMMANDS,$(COMMON_DIR)/$(DBDNAME),| grep -vi warning)
%.db$(RAW): %.vdb $(COMMON_DIR)/$(DBDNAME)
	$(call FLATDB_COMMANDS,$(COMMON_DIR)/$(DBDNAME),)
else # no common dbd file, use target specific one
%.template: %.vdb $(COMMON_DIR)/%.dbd
	$(call FLATDB_COMMANDS,$(COMMON_DIR)/$*.dbd,| grep -vi warning)
%.db$(RAW): %.vdb $(COMMON_DIR)/%.dbd
	$(call FLATDB_COMMANDS,$(COMMON_DIR)/$*.dbd,)
endif

Note: We generate .template from .vdb for expansion by .substitutions 
files. Alternatively, final .db files can be generated via vdct's own 
'substitution' facility (i.e. macros/ports).

(It may be useful to include flatdb rules into base, but I am not 
proposing this at this moment. This message is about creating the 
RELEASE_DBFLAGS variable via convertRelease.pl.)

Cheers
Ben
--
"Programming = Mathematics + Murphy's Law" (Dijkstra in EWD1008)

Navigate by Date:
Prev: Re: diagnostics related to discarding an intermediate CA subscription update Claude Saunders
Next: Re: AppDevGuide not up-to-date on devLib Andrew Johnson
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: diagnostics related to discarding an intermediate CA subscription update Claude Saunders
Next: Re: necessary changes in caServer code for redundancy support Jeffrey O. Hill
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·