From 3046799bb397449b9fbe3d9e1fc5b8c80ed18e4a Mon Sep 17 00:00:00 2001 From: kpetersn Date: Wed, 3 Apr 2019 10:12:21 -0500 Subject: [PATCH] Added a modules dir, in which the stand-alone driver modules will reside. --- .gitignore | 1 + Makefile | 3 ++ configure/CONFIG_SITE | 27 ++++++++++----- configure/EXAMPLE_CONFIG_SITE.local | 2 ++ configure/RULES_TOP | 3 ++ modules/CONFIG_SITE.local | 9 +++++ modules/Makefile | 53 +++++++++++++++++++++++++++++ 7 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 configure/EXAMPLE_CONFIG_SITE.local create mode 100644 modules/CONFIG_SITE.local create mode 100644 modules/Makefile diff --git a/.gitignore b/.gitignore index fae3cabb..1263d689 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ dllPath.bat auto_settings.sav* auto_positions.sav* .ccfxprepdir/ +*.local diff --git a/Makefile b/Makefile index 5bec5721..0f2d7957 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ include $(TOP)/configure/CONFIG DIRS += configure motorApp motorApp_DEPEND_DIRS = configure +DIRS += modules +modules_DEPEND_DIRS = motorApp + # To build motor examples; # 1st - uncomment lines below. # 2nd - uncomment required support module lines at the bottom of diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 72b399d4..7e82c7e2 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -13,21 +13,30 @@ # Normally CHECK_RELEASE should be set to YES. # Set CHECK_RELEASE to NO to disable checking completely. # Set CHECK_RELEASE to WARN to perform consistency checking but -# continue building anyway if conflicts are found. +# continue building even if conflicts are found. CHECK_RELEASE = YES # Set this when you only want to compile this application # for a subset of the cross-compiled target architectures # that Base is built for. -#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 +#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32 # To install files into a location other than $(TOP) define # INSTALL_LOCATION here. -#INSTALL_LOCATION= +#INSTALL_LOCATION= -# Set this when your IOC and the host use different paths -# to access the application. This will be needed to boot -# from a Microsoft FTP server or with some NFS mounts. -# You must rebuild in the iocBoot directory for this to -# take effect. -#IOCS_APPL_TOP = +# Set this when the IOC and build host use different paths +# to the install location. This may be needed to boot from +# a Microsoft FTP server say, or on some NFS configurations. +#IOCS_APPL_TOP = + +# For application debugging purposes, override the HOST_OPT and/ +# or CROSS_OPT settings from base/configure/CONFIG_SITE +#HOST_OPT = NO +#CROSS_OPT = NO + +# Don't build iocs in motor/modules/motorVendor/iocs by default +BUILD_IOCS = NO + +# Overrides for the settings above may appear in a CONFIG_SITE.local file +-include $(or $(MOTOR),$(TOP))/configure/CONFIG_SITE.local diff --git a/configure/EXAMPLE_CONFIG_SITE.local b/configure/EXAMPLE_CONFIG_SITE.local new file mode 100644 index 00000000..0f391bf7 --- /dev/null +++ b/configure/EXAMPLE_CONFIG_SITE.local @@ -0,0 +1,2 @@ +# Uncomment the following line to build iocs in motor/modules/motorVendor/iocs +BUILD_IOCS = YES diff --git a/configure/RULES_TOP b/configure/RULES_TOP index d09d668d..ebaaafb1 100644 --- a/configure/RULES_TOP +++ b/configure/RULES_TOP @@ -1,3 +1,6 @@ #RULES_TOP +ifeq ($(INSTALL_LOCATION),$(MOTOR)) + INSTALL_CONFIG = +endif include $(CONFIG)/RULES_TOP diff --git a/modules/CONFIG_SITE.local b/modules/CONFIG_SITE.local new file mode 100644 index 00000000..cdcda02e --- /dev/null +++ b/modules/CONFIG_SITE.local @@ -0,0 +1,9 @@ +# Use motor's CONFIG_SITE (this is where BUILD_IOCS is defined) +-include $(MOTOR)/configure/CONFIG_SITE + +# When building submodules, this should always be true: +INSTALL_LOCATION = $(MOTOR) + +# Stop submodules from installing their configuration files: +CONFIG_INSTALLS = + diff --git a/modules/Makefile b/modules/Makefile new file mode 100644 index 00000000..a96e3e1c --- /dev/null +++ b/modules/Makefile @@ -0,0 +1,53 @@ +TOP = .. +include $(TOP)/configure/CONFIG + +# Submodules +#SUBMODULES += motorVendor + +# Allow sites to add extra submodules +-include Makefile.local + +# Add only checked-out submodules to DIRS +DIRS += $(subst /Makefile,,$(wildcard $(addsuffix /Makefile, $(SUBMODULES)))) + +include $(TOP)/configure/RULES_DIRS + +INSTALL_LOCATION_ABS := $(abspath $(INSTALL_LOCATION)) +RELEASE_LOCAL := RELEASE.$(EPICS_HOST_ARCH).local + +# Ensure that RELEASE..local exists before doing anything else +all host $(DIRS) $(ARCHS) $(ACTIONS) $(dirActionTargets) $(dirArchTargets) \ + $(dirActionArchTargets) $(actionArchTargets): | $(RELEASE_LOCAL) + +$(RELEASE_LOCAL): + $(ECHO) Creating $@, MOTOR = $(INSTALL_LOCATION_ABS) + @echo MOTOR = $(INSTALL_LOCATION_ABS)> $@ +ifdef ASYN + $(ECHO) Creating $@, ASYN = $(ASYN) + @echo ASYN = $(ASYN)>> $@ +endif +ifdef SNCSEQ + $(ECHO) Creating $@, SNCSEQ = $(SNCSEQ) + @echo SNCSEQ = $(SNCSEQ)>> $@ +endif +ifdef BUSY + $(ECHO) Creating $@, BUSY = $(BUSY) + @echo BUSY = $(BUSY)>> $@ +endif +ifdef IPAC + $(ECHO) Creating $@, IPAC = $(IPAC) + @echo IPAC = $(IPAC)>> $@ +endif +ifdef MX + $(ECHO) Creating $@, MX = $(MX) + @echo MX = $(MX)>> $@ +endif +ifdef LUA + $(ECHO) Creating $@, LUA = $(LUA) + @echo LUA = $(LUA)>> $@ +endif + $(ECHO) Creating $@, EPICS_BASE = $(EPICS_BASE) + @echo EPICS_BASE = $(EPICS_BASE)>> $@ + +realclean: + $(RM) $(RELEASE_LOCAL)