#*************************************************************************
# Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
#     National Laboratory.
# Copyright (c) 2010 Brookhaven Science Associates, as Operator of
#     Brookhaven National Lab.
# Copyright (c) 2002 The Regents of the University of California, as
#     Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************

# This is a Makefile fragment, see src/ioc/Makefile.

THESE_RULES := $(IOCDIR)/db/RULES

dbCommon.h$(DEP): $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES) \
    $(DBDTORECTYPEH_dep)
	@$(RM) $@
	@$(DBTORECORDTYPEH) -D -I ../db  -I $(COMMON_DIR) -o $(COMMONDEP_TARGET) $< > $@

$(COMMON_DIR)/dbCommonRecord.html: ../db/dbCommon.dbd.pod

$(COMMON_DIR)/dbCommon.h: $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES) \
    $(DBDTORECTYPEH_dep)
	@$(RM) $(notdir $@)
	$(DBTORECORDTYPEH) -I ../db  -I $(COMMON_DIR) -o $(notdir $@) $<
	@$(MV) $(notdir $@) $@

$(COMMON_DIR)/menuGlobal.dbd: $(IOCDIR)/db/Makefile $(THESE_RULES)

# This is a target-specific variable
$(COMMON_DIR)/menuGlobal.dbd: DBDCAT_COMMAND = \
    $(PERL) $(INSTALL_HOST_BIN)/makeIncludeDbd.pl $(menuGlobal_DBD) $(@F)
