From 87819e6b36ed25d5ccc438ca592e550137dd8011 Mon Sep 17 00:00:00 2001 From: kpetersn Date: Tue, 9 Apr 2019 11:26:32 -0500 Subject: [PATCH] Applied patch to update Makefiles, RELEASE and CONFIG_SITE files --- Makefile | 15 ++++++- configure/EXAMPLE_CONFIG_SITE.local | 7 +++ configure/EXAMPLE_RELEASE.local | 4 ++ configure/Makefile | 6 ++- configure/RELEASE | 42 ++--------------- iocs/Makefile | 25 +++++++++++ iocs/newFocusIOC/configure/CONFIG_SITE | 9 ++-- .../configure/EXAMPLE_CONFIG_SITE.local | 6 +++ .../configure/EXAMPLE_RELEASE.local | 6 +++ iocs/newFocusIOC/configure/RELEASE | 45 +++---------------- iocs/newFocusIOC/newFocusApp/src/Makefile | 18 +++++++- 11 files changed, 96 insertions(+), 87 deletions(-) create mode 100644 configure/EXAMPLE_CONFIG_SITE.local create mode 100644 configure/EXAMPLE_RELEASE.local create mode 100644 iocs/Makefile create mode 100644 iocs/newFocusIOC/configure/EXAMPLE_CONFIG_SITE.local create mode 100644 iocs/newFocusIOC/configure/EXAMPLE_RELEASE.local diff --git a/Makefile b/Makefile index 19c9068..57dc51e 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,10 @@ DIRS += $(wildcard *App) DIRS += $(wildcard *Top) DIRS += $(wildcard iocBoot) +ifeq ($(BUILD_IOCS), YES) +DIRS += $(wildcard iocs) +endif + # The build order is controlled by these dependency rules: # All dirs except configure depend on configure @@ -28,4 +32,13 @@ iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS)) # Add any additional dependency rules here: -include $(TOP)/configure/RULES_TOP +# iocs depend on all *Sup and *App dirs +$(foreach dir, $(filter %iocs, $(DIRS)), \ + $(eval $(dir)_DEPEND_DIRS += $(filter %Sup %App, $(DIRS)))) + +# Only support top-level targets when submodule is built stand-alone +ifeq ($(INSTALL_LOCATION),$(MOTOR)) + include $(TOP)/configure/RULES_DIRS +else + include $(TOP)/configure/RULES_TOP +endif diff --git a/configure/EXAMPLE_CONFIG_SITE.local b/configure/EXAMPLE_CONFIG_SITE.local new file mode 100644 index 0000000..9b57b80 --- /dev/null +++ b/configure/EXAMPLE_CONFIG_SITE.local @@ -0,0 +1,7 @@ +# Use settings from motor's CONFIG_SITE unless they are overridden below +-include $(MOTOR)/configure/CONFIG_SITE + +# +CHECK_RELEASE = WARN +# +#BUILD_IOCS = YES diff --git a/configure/EXAMPLE_RELEASE.local b/configure/EXAMPLE_RELEASE.local new file mode 100644 index 0000000..ed6471f --- /dev/null +++ b/configure/EXAMPLE_RELEASE.local @@ -0,0 +1,4 @@ +MOTOR= +-include $(MOTOR)/configure/RELEASE +# path to motorNewFocus is needed to build the IOC inside motorNewFocus, but outside motor +MOTOR_NEWFOCUS= diff --git a/configure/Makefile b/configure/Makefile index 9254309..69c791d 100644 --- a/configure/Makefile +++ b/configure/Makefile @@ -2,7 +2,11 @@ TOP=.. include $(TOP)/configure/CONFIG +ifeq ($(INSTALL_CONFIG),$(MOTOR)/configure) +# Don't overwrite Motor's configure files +INSTALL_CONFIG = +endif + TARGETS = $(CONFIG_TARGETS) -CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS))) include $(TOP)/configure/RULES diff --git a/configure/RELEASE b/configure/RELEASE index f95c484..9657e5c 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -1,43 +1,7 @@ # RELEASE - Location of external support modules -# -# IF YOU MAKE ANY CHANGES to this file you must subsequently -# do a "gnumake rebuild" in this application's top level -# directory. -# -# The build process does not check dependencies against files -# that are outside this application, thus you should do a -# "gnumake rebuild" in the top level directory after EPICS_BASE -# or any other external module pointed to below is rebuilt. -# -# Host- or target-specific settings can be given in files named -# RELEASE.$(EPICS_HOST_ARCH).Common -# RELEASE.Common.$(T_A) -# RELEASE.$(EPICS_HOST_ARCH).$(T_A) -# -# This file is parsed by both GNUmake and an EPICS Perl script, -# so it can ONLY contain definititions of paths to other support -# modules, variable definitions that are used in module paths, -# and include statements that pull in other RELEASE files. -# Variables may be used before their values have been set. -# Build variables that are NOT used in paths should be set in -# the CONFIG_SITE file. -# Variables and paths to dependent modules: -#MODULES = /path/to/modules -#MYMODULE = $(MODULES)/my-module - -# If using the sequencer, point SNCSEQ at its top directory: -#SNCSEQ = $(MODULES)/seq-ver - -# EPICS_BASE should appear last so earlier modules can override stuff: -EPICS_BASE = /APSshare/epics/base-3.15.6 - -# Set RULES here if you want to use build rules from somewhere -# other than EPICS_BASE: -#RULES = $(MODULES)/build-rules - -# These allow developers to override the RELEASE variable settings -# without having to modify the configure/RELEASE file itself. --include $(TOP)/../RELEASE.local +# Use motor/module's generated release file when buidling inside motor +-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local +# Use motorNewFocus's RELEASE.local when building outside motor -include $(TOP)/configure/RELEASE.local diff --git a/iocs/Makefile b/iocs/Makefile new file mode 100644 index 0000000..8e91ac8 --- /dev/null +++ b/iocs/Makefile @@ -0,0 +1,25 @@ +TOP = .. +include $(TOP)/configure/CONFIG + +DIRS += newFocusIOC + +include $(TOP)/configure/RULES_TOP + +uninstallTargets = $(foreach dir, $(DIRS), $(dir)$(DIVIDER)uninstall) +uninstall: $(uninstallTargets) +define UNINSTALL_template +$(1)$(DIVIDER)uninstall: + $(MAKE) -C $(1) uninstall +endef +$(foreach dir, $(DIRS), $(eval $(call UNINSTALL_template,$(dir)))) +.PHONY: uninstall $(uninstallTargets) + +realuninstallTargets = $(foreach dir, $(DIRS), $(dir)$(DIVIDER)realuninstall) +realuninstall: $(realuninstallTargets) +define REALUNINSTALL_template +$(1)$(DIVIDER)realuninstall: + $(MAKE) -C $(1) realuninstall +endef +$(foreach dir, $(DIRS), $(eval $(call REALUNINSTALL_template,$(dir)))) +.PHONY: realuninstall $(realuninstallTargets) + diff --git a/iocs/newFocusIOC/configure/CONFIG_SITE b/iocs/newFocusIOC/configure/CONFIG_SITE index 212485e..dac3e09 100644 --- a/iocs/newFocusIOC/configure/CONFIG_SITE +++ b/iocs/newFocusIOC/configure/CONFIG_SITE @@ -35,9 +35,10 @@ CHECK_RELEASE = YES #HOST_OPT = NO #CROSS_OPT = NO -# These allow developers to override the CONFIG_SITE variable -# settings without having to modify the configure/CONFIG_SITE -# file itself. --include $(TOP)/../CONFIG_SITE.local +# Include motor's CONFIG_SITE.local when building inside motor +-include $(TOP)/../../../../configure/CONFIG_SITE.local +# Include motorNewFocus's CONFIG_SITE.local when building inside motorNewFocus +-include $(TOP)/../../configure/CONFIG_SITE.local +# Use newFocusIOC's CONFIG_SITE.local -include $(TOP)/configure/CONFIG_SITE.local diff --git a/iocs/newFocusIOC/configure/EXAMPLE_CONFIG_SITE.local b/iocs/newFocusIOC/configure/EXAMPLE_CONFIG_SITE.local new file mode 100644 index 0000000..e56b472 --- /dev/null +++ b/iocs/newFocusIOC/configure/EXAMPLE_CONFIG_SITE.local @@ -0,0 +1,6 @@ +# Use settings from motor's CONFIG_SITE unless they are overridden below +-include $(MOTOR)/configure/CONFIG_SITE + +# +CHECK_RELEASE = WARN + diff --git a/iocs/newFocusIOC/configure/EXAMPLE_RELEASE.local b/iocs/newFocusIOC/configure/EXAMPLE_RELEASE.local new file mode 100644 index 0000000..8d0e1d4 --- /dev/null +++ b/iocs/newFocusIOC/configure/EXAMPLE_RELEASE.local @@ -0,0 +1,6 @@ +# Use the following lines if motorNewFocus was built inside motor +MOTOR= +-include $(MOTOR)/configure/RELEASE +# Use the following lines if motorNewFocus was built outside motor +#!MOTOR_NEWFOCUS= +#!-include $(MOTOR_NEWFOCUS)/configure/RELEASE.local diff --git a/iocs/newFocusIOC/configure/RELEASE b/iocs/newFocusIOC/configure/RELEASE index f95c484..a899a32 100644 --- a/iocs/newFocusIOC/configure/RELEASE +++ b/iocs/newFocusIOC/configure/RELEASE @@ -1,43 +1,8 @@ # RELEASE - Location of external support modules -# -# IF YOU MAKE ANY CHANGES to this file you must subsequently -# do a "gnumake rebuild" in this application's top level -# directory. -# -# The build process does not check dependencies against files -# that are outside this application, thus you should do a -# "gnumake rebuild" in the top level directory after EPICS_BASE -# or any other external module pointed to below is rebuilt. -# -# Host- or target-specific settings can be given in files named -# RELEASE.$(EPICS_HOST_ARCH).Common -# RELEASE.Common.$(T_A) -# RELEASE.$(EPICS_HOST_ARCH).$(T_A) -# -# This file is parsed by both GNUmake and an EPICS Perl script, -# so it can ONLY contain definititions of paths to other support -# modules, variable definitions that are used in module paths, -# and include statements that pull in other RELEASE files. -# Variables may be used before their values have been set. -# Build variables that are NOT used in paths should be set in -# the CONFIG_SITE file. -# Variables and paths to dependent modules: -#MODULES = /path/to/modules -#MYMODULE = $(MODULES)/my-module - -# If using the sequencer, point SNCSEQ at its top directory: -#SNCSEQ = $(MODULES)/seq-ver - -# EPICS_BASE should appear last so earlier modules can override stuff: -EPICS_BASE = /APSshare/epics/base-3.15.6 - -# Set RULES here if you want to use build rules from somewhere -# other than EPICS_BASE: -#RULES = $(MODULES)/build-rules - -# These allow developers to override the RELEASE variable settings -# without having to modify the configure/RELEASE file itself. --include $(TOP)/../RELEASE.local +# Use motor/module's generated release file when buidling inside motor +-include $(TOP)/../../../RELEASE.$(EPICS_HOST_ARCH).local +# Use motorNewFocus's release file when building inside motorNewFocus, but outside motor +-include $(TOP)/../../configure/RELEASE.local +# Use newFocusIOC's RELEASE.local when building outside motorNewFocus -include $(TOP)/configure/RELEASE.local - diff --git a/iocs/newFocusIOC/newFocusApp/src/Makefile b/iocs/newFocusIOC/newFocusApp/src/Makefile index 31596ca..1be1b78 100644 --- a/iocs/newFocusIOC/newFocusApp/src/Makefile +++ b/iocs/newFocusIOC/newFocusApp/src/Makefile @@ -5,6 +5,9 @@ include $(TOP)/configure/CONFIG # ADD MACRO DEFINITIONS AFTER THIS LINE #============================= +# The following are used for debugging messages. +#!USR_CXXFLAGS += -DDEBUG + #============================= # Build the IOC application @@ -16,10 +19,21 @@ DBD += newFocus.dbd newFocus_DBD += base.dbd # Include dbd files from all support applications: -#newFocus_DBD += xxx.dbd +#ifdef ASYN +newFocus_DBD += asyn.dbd +#endif +newFocus_DBD += motorSupport.dbd +newFocus_DBD += devNewFocus.dbd # Add all the support libraries needed by this IOC -#newFocus_LIBS += xxx +newFocus_LIBS += newFocus +newFocus_LIBS += motor +#ifdef ASYN +newFocus_LIBS += asyn +#endif +#ifdef SNCSEQ +newFocus_LIBS += seq pv +#endif # newFocus_registerRecordDeviceDriver.cpp derives from newFocus.dbd newFocus_SRCS += newFocus_registerRecordDeviceDriver.cpp