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  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: EPICS base R3.15.5 special CONFIG and RULE files
From: Benjamin Franksen <benjamin.franksen@helmholtz-berlin.de>
To: "'tech-talk@aps.anl.gov'" <tech-talk@aps.anl.gov>
Date: Fri, 10 Nov 2017 13:38:26 +0100
[sorry for possible duplicates, forgot to reply to the list]

On 11/09/2017 11:59 PM, Luchini, Kristi L. wrote:
> 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

This is no longer needed as there are now a similar definitions in base,
which use ALH, not ALHS. You can keep you won FILE_TYPE, though, since
due to the different name there is no conflict.

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

This is a mistake. RULES.Db is an overly complicated monster. I wish
there was a way to completely disable it.

All you need is the vpaths:

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

however, these are not good. I would rather use

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

(Presumably alhsubstitutions are sources, while alhConfig may be sources
or produced by the rule below.)

The only rule you need is

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

which I would re-write as

$(COMMON_DIR)/%.alhConfig: %.alhsubstitutions
	$(ECHO) "Inflating alhConfig from $< using local rule"
	$(MSI) -I.. $(ALHFLAGS) -S$< > $@.tmp
	$(MV) $@.tmp $@

(Why suppress echoing of the command line and then echo manually in a
separate command, just so you don't see the $(ALHFLAGS) parameter? The
"output to .tmp, then mv" pattern is to make parallel make more reliable.)

Also, the include of RULES_ALARMS below

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

is automatically done by the base rules.

Cheers
Ben
-- 
"Make it so they have to reboot after every typo." ― Scott Adams

Attachment: signature.asc
Description: OpenPGP digital signature


Replies:
Re: EPICS base R3.15.5 special CONFIG and RULE files Bruce Hill
References:
RE: EPICS base R3.15.5 special CONFIG and RULE files Luchini, Kristi L.

Navigate by Date:
Prev: Re: EPICS base R3.15.5 special CONFIG and RULE files Andrew Johnson
Next: Re: EPICS base R3.15.5 special CONFIG and RULE files Bruce Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: EPICS base R3.15.5 special CONFIG and RULE files Andrew Johnson
Next: Re: EPICS base R3.15.5 special CONFIG and RULE files Bruce Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 10 Nov 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·