epics-modules / asyn

EPICS module for driver and device support
http://epics-modules.github.io/asyn/
Other
37 stars 75 forks source link

`make build` fails #189

Closed simon-ess closed 10 months ago

simon-ess commented 1 year ago

If you do the following:

then you will have a failed build failing with

make[1]: *** No rule to make target `devAsynOctet.dbd', needed by `/devEpics.dbd'.  Stop.
make: *** [asyn.build] Error 2

The reason appears to be the following code from asyn/Makefile (https://github.com/epics-modules/asyn/blob/master/asyn/Makefile#L340):

ifdef DBDCAT_COMMAND
  # Override the default command when generating devEpics.dbd
  $(COMMON_DIR)/devEpics.dbd: DBDCAT_COMMAND = \
      $(PERL) $(TOOLS)/makeIncludeDbd.pl $(devEpics_DBD) $(notdir $@)
else
  # 3.14 didn't have the DBDCAT rule:
  build: $(COMMON_DIR)/devEpics.dbd
  $(COMMON_DIR)/devEpics.dbd: $(devEpics_DBD)
    $(ECHO) "Creating dbd file $(notdir $@)"
    @$(RM) $(notdir $@)
    $(PERL) $(TOOLS)/makeIncludeDbd.pl $(devEpics_DBD) $(notdir $@)
    @$(MV) $(notdir $@) $@
endif

From what I can see, the issue is that on the first pass through in EPICS base (https://github.com/epics-base/epics-base/blob/7.0/configure/RULES) T_A is not defined which means we do not define DBDCAT_COMMAND (from RULES.Db), which adds the dependency

build: $(COMMON_DIR)/devEpics.dbd

However, on this pass COMMON_DIR is also not yet defined, so we are saying that build depends on /devEpics.dbd, which of course there is no rule to create.

A few comments: