From 8e90add4d4187a55120d1b7bf7b06e80fd97fe9b Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Mon, 7 Sep 2015 17:44:26 +0200 Subject: [PATCH] Fix the dbd vpath (again). Problem: circ dep when src dbd file and project dbd file have the same name (even in different sub dir). --- App/tools/driver.makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/App/tools/driver.makefile b/App/tools/driver.makefile index 3eb17cf..43d3329 100644 --- a/App/tools/driver.makefile +++ b/App/tools/driver.makefile @@ -679,10 +679,13 @@ EPICS_INCLUDES += -I$(EPICS_BASE_INCLUDE) -I$(EPICS_BASE_INCLUDE)/os/$(OS_CLASS) # Setup searchpaths from all used files # find all sources whatever suffix $(foreach filetype,SRCS TEMPLS SCR,$(foreach ext,$(sort $(suffix ${${filetype}})),$(eval vpath %${ext} $(sort $(dir $(filter %${ext},${${filetype}:%=../%})))))) -# find dbd files but remove ../ to avoid circular dependency if source dbd has the same name as the project dbd -vpath %.dbd $(filter-out ../,$(sort $(dir ${DBDFILES:%=../%}))) -# but the %Record.h rules need %Record.dbd which may be in .. -vpath %Record.dbd .. + +# Do not tread %.dbd the same way because it creates a circular dependency +# if a source dbd has the same name as the project dbd. +# But the %Record.h and menu%.h rules need to find their dbd files (example: asyn) +vpath %Record.dbd $(sort $(dir ${DBDFILES:%=../%})) +vpath menu%.dbd $(sort $(dir ${DBDFILES:%=../%})) + # find header files to install vpath %.h $(addprefix ../,$(sort $(dir ${HDRS} ${SRCS})))