Hi Hovanes Egiyan –
The issue is that at least in the lastest versions of EPICS base, if you generate a .db file (or several other file types) it is also expected that you will have a .db.d file (a dependency
file) as well. See
https://github.com/epics-base/epics-base/blob/7.0/configure/RULES.Db#L269 for some examples:
%.db$(DEP): %$(SUBST_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
%.db$(DEP): ../%$(SUBST_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
%.db$(DEP): %$(TEMPL_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
%.db$(DEP): ../%$(TEMPL_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
Normally .db files are generated as above from .substitutions or .template files, not out of thin air.
One such example is from sequencer, see here:
https://gitlab.esss.lu.se/epics-modules/sequencer-2-2/-/blob/master/test/validate/Makefile?ref_type=heads#L124-L125
In short, it should be enough for you to add the lines
test.db$(DEP): ../Makefile
@echo "$(COMMON_DIR)/test.db: ../Makefile" > $@
To your makefile.
Cheers,
Simon
Hi,
I have an old EPICS application that automatically creates an EPICS db-file and then installs it into the application's top db-directory. The Makefile worked fine using base R3-14-12-4 (using RHEL7). Now I am trying to migrate it to EPICS base R7-0-8 (but using
RHEL9) , and now I am having problems with the Makefile. I attached a much simplified version of the Makefile of the Db directory to this message. Basically, I am creating a db-file called "test.db" using the "touch" command (instead of the actual script)
and I try to install it into the db-directory. While it works fine with EPICS base base R3-14-12-4, when I run the "make" command using EPICS base 7, the file test.db actually does get installed , but then I get these error messages (see below), and the "make"
process quits .
hd-rhel9:Db> make rebuild
rm -rf O.linux-x86_64 O.Common
perl -CSD /gluex/controls/epics/R7-0-8-RHEL9/base/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../../..
mkdir -p O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
T_A=linux-x86_64 install
make[1]: Entering directory '/gluonfs1/home/hovanes/test/newEPICS/epics7exampleApp/Db/O.linux-x86_64'
touch ../O.Common/test.db
Installing created db file ../../../db/test.db
make[1]: *** No rule to make target 'test.db.d', needed by 'build'. Stop.
make[1]: Leaving directory '/gluonfs1/home/hovanes/test/newEPICS/epics7exampleApp/Db/O.linux-x86_64'
make: *** [/gluex/controls/epics/R7-0-8-RHEL9/base/configure/RULES_ARCHS:58: install.linux-x86_64] Error 2
hd-rhel9:Db>
I have not tried the new EPICS base 7 on RHEL7, but I do not think RHEL9 is the problem. I would appreciate any help debugging this problem.