[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.
CHECK_RELEASE = YES
TARGETS = $(CONFIG_TARGETS)
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
CFG +=CONFIG_ALARMS RULES_ALARMS
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
@echo "Inflating alhConfig from $< using local rule"
@echo "$(MSI) -S$< > $(@F) </dev/null"
@$(MSI) -I.. $(ALHFLAGS) -S$< </dev/null > $@
which I would re-write as
$(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
ALHS += ntwk_inj.alhConfig
is automatically done by the base rules.