EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: RE: EPICS base R3.15.5 special CONFIG and RULE files
From: "Luchini, Kristi L." <[email protected]>
To: "'[email protected]'" <[email protected]>
Date: Thu, 9 Nov 2017 22:59:58 +0000
Hi Andrew,

>Did you mean to send this message to tech-talk, because I don't think anyone outside of SLAC can help you with what I presume to be a local feature of your installation.
>The "-1.0" on the end of your Base version number is another indicator that you have local customizations which the rest of us probably won't know anything about.
I was thinking to myself that I should remove the 1-0 in the EPICS base,  but apparently my fingers were working independently! The EPICS Base version I am referring to is the downloaded version  of R3.15.5. 

In an attempt to clarify, I have an "alhsubstitutions" file (see below),  from which I want to generate an "alhConfig" file and install into  $TOP/alh
Under EPICS R3.14.12, I created a RULES.Alarms, similar to RULES.Db, which uses MSI to generate a db file from a substitutions file.  If I look at the R3.15.5 Applications Developer Guide, sections 4.6.34 and 4.6.35, it does talk about CONFIG_<file type>  and RULES_<file type>. These files should be added to configure/Makefile.

However, my RULES file from R3.14.12, now either generate errors during the build or it will generate an empty alhConfig which it installs in to $TOP/alh.  
Is there an example of a RULES_<file type> that I can used.  Below is what I am using, which clearly is wrong.

File configure/Makefile
CHECK_RELEASE = YES
TARGETS = $(CONFIG_TARGETS)
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
CFG +=CONFIG_ALARMS RULES_ALARMS
CFG +=CONFIG_PROTOS
include $(TOP)/configure/RULES

File: configure/CONFIG_ALARMS
FILE_TYPE+=ALHS
INSTALL_ALHS = $(INSTALL_LOCATION)/alh


File:  configure/RULES_ALARMS    --- similar to R3.14.12   RULES.Db

[luchini@lcls-dev3 configure]$ cat RULES_ALARMS
# Where to install configuration files for ALH (Alarm Handler)

vpath %.alhConfig $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(ALH))
vpath %.alhsubstitutions $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)

INSTALL_ALH = $(INSTALL_LOCATION)/alh

##################################################### Restore Flags

INSTALL_ALHFLAGS = -I $(INSTALL_ALH)
RELEASE_ALHFLAGS = $(patsubst %/dbd,%/restore, $(RELEASE_DBDFLAGS))
ALHFLAGS  = $($*_ALHFLAGS) $(USR_ALHFLAGS) -I. $(GENERIC_SRC_INCLUDES) $(INSTALL_ALHFLAGS) $(RELEASE_ALHFLAGS)
ALHFLAGS += -I$(COMMON_DIR)

#####################################################  Targets

INSTALL_ALHS += $(addprefix $(INSTALL_ALH)/,$(notdir $(ALHS)))

COMMON_ALHS += $(filter $(COMMON_DIR)/%, $(foreach file, $(ALHS), \
    $(firstword  $(SOURCE_ALHS) $(COMMON_DIR)/$(file) ) ) )
SOURCE_ALHS = $(wildcard $(file) $(SOURCE_ALHS_bbb) )
SOURCE_ALHS_bbb = $(foreach dir, $(GENERIC_SRC_DIRS), $(SOURCE_ALHS_aaa)  )
SOURCE_ALHS_aaa = $(addsuffix /$(file), $(dir) )

COMMONS = $(COMMON_DIR)/*.alhConfig \
          $(COMMON_DIR)/*.alhsubstitutions

#####################################################

ifndef T_A

COMMON_DIR = .
INSTALL_ALHS =
COMMON_ALHS = .
COMMONS = $(ALHS)

-include $(TOP)/configure/O.$(EPICS_HOST_ARCH)/CONFIG_APP_INCLUDE

all:    install

install: buildInstall

buildInstall : build

rebuild: clean install

.PHONY: all inc build install clean rebuild buildInstall

endif # T_A defined

ifneq (,$(strip $(ALH_INSTALLS)))
buildInstall : restoreInstalls
endif

.PHONY: restoreInstalls

build : $(COMMON_ALHS) \
        $(INSTALL_ALHS)

#clean::
clean:
        @$(RM) $(COMMONS)

##################################################### Substitution files

$(INSTALL_ALH)/%.alhsubstitutions: %.alhsubstitutions
        @echo "Installing alhsubstitutions file $@"
        @$(INSTALL) -d -m 644 $< $(@D)

.PRECIOUS: $(COMMON_DIR)/%.alhsubstitutions

##################################################### alhConfig files

$(COMMON_DIR)/%.alhConfig: %.alhsubstitutions
        @echo "Inflating alhConfig from $< using local rule"
        @$(RM) $@
        @echo "$(MSI) -S$< > $(@F) </dev/null"
        @$(MSI) -I.. $(ALHFLAGS) -S$< </dev/null > $@

$(INSTALL_ALH)/%.alhConfig: $(COMMON_DIR)/%.alhConfig
        @echo "Installing alhConfig file $@"
        @$(INSTALL) -d -m 644 $< $(@D)

$(INSTALL_ALH)/%: %
        @echo "Installing restore file $@"
        @$(INSTALL) -d -m 644 $< $(@D)

$(INSTALL_ALH)/%: ../%
        @echo "Installing restore file $@"
        @$(INSTALL) -d -m 644 $< $(@D)

restoreInstalls:  $(ALH_INSTALLS)
        @echo "Installing $(^F)"
        @$(INSTALL) -d -m 555 $^ $(INSTALL_ALH)

.PRECIOUS: $(COMMON_ALHS)

##################################################### END OF FILE



File:  Makefile:
TOP=../../..
include $(TOP)/configure/CONFIG
ALHS += ntwk_inj.alhConfig
include $(TOP)/configure/RULES
include $(TOP)/configure/RULES_ALARMS

File:  ntwk_inj.alhsubstititons: 
file ../../common/deviceTop.alhConfig
{
   pattern {  parent, grp, alias, guidance          }
           {  NULL, NTWK:INJ:1, Injector, "Injector network status"  } }

- Kristi


-----Original Message-----
From: Andrew Johnson [mailto:[email protected]]
Sent: Thursday, November 09, 2017 1:33 PM
To: Luchini, Kristi L.; '[email protected]'
Subject: Re: EPICS base R3.15.5-1.0 special CONFIG and RULE files

Hi Kristi,

On 11/09/2017 01:26 PM, Luchini, Kristi L. wrote:
> I'm upgrading an EPICS IOC Application from R3.14.12 to R3.15.5-1.0 
> and I'm using the new schema of adding  configure/CONFIG_ALARMS file 
> and including this file in the configure/Makefile.  This does indeed 
> install alhConfig files into the directory $TOP/alh. However, it 
> method does not generate alhConfig files from an alhsubstitutions
> file, without  adding configure/RULES.Alarms file.   I was told that
> I don't need a special RULES file anymore with this new version of 
> EPICS.  Am I missing something?

Did you mean to send this message to tech-talk, because I don't think anyone outside of SLAC can help you with what I presume to be a local feature of your installation. The "-1.0" on the end of your Base version number is another indicator that you have local customizations which the rest of us probably won't know anything about.

- Andrew

--
Arguing for surveillance because you have nothing to hide is no different than making the claim, "I don't care about freedom of speech because I have nothing to say." -- Edward Snowdon

Replies:
Re: EPICS base R3.15.5 special CONFIG and RULE files Andrew Johnson
Re: EPICS base R3.15.5 special CONFIG and RULE files Benjamin Franksen

Navigate by Date:
Prev: RE: How to turn off spewing messaging from asyn/stream devicse. Mark Rivers
Next: RE: How to turn off spewing messaging from asyn/stream devicse. Luchini, Kristi L.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: How to turn off spewing messaging from asyn/stream devicse. Mark Rivers
Next: Re: EPICS base R3.15.5 special CONFIG and RULE files Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·