Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • e3/wrappers/e3-require
  • waynelewis/e3-require
  • krisztianloki/e3-require
  • timokorhonen/e3-require
  • juntongliu/e3-require
  • roryclarke/e3-require
  • alfiorizzo/e3-require
  • lucasmagalhaes/e3-require
  • lucas-module-testgroup/e3-require
  • grzegorzkowalski/e3-require
  • anderslindh1/e3-require
11 results
Show changes
Commits on Source (710)
Showing
with 164 additions and 238 deletions
......@@ -16,3 +16,6 @@ core.*
e3.cfg
tools/ess-env.conf
.vscode
require-ess/require.Makefile
require-ess/Db/*.db
require-ess/Db/*.d
\ No newline at end of file
[submodule "require"]
path = require
url = https://gitlab.esss.lu.se/epics-modules/require.git
# 3.3.0
# CHANGELOG
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [3.4.0]
3.4.0 is also a fairly major release, that fixes many bugs but that also enables use of cellmode, to facilitate work against a shared build.
### New Features
* Added back `promptE3Env.bash`, which runs `setE3Env.bash` and then sets the bash prompt.
* Added descriptions for more targets when running `make help`
* Added a new test target for individual modules, available as `make test`
* Added script in `tools/test_installed_modules.sh` that tests all modules in an installation
* Build numbers are now prefixed with a `+`.
* Cell mode: When using `make cellinstall`, the module is installed in the path
`${E3_CELL_PATH}/${EPICS_BASE_VERSION}/${E3_REQUIRE_VERSION}/module_name`. This allows
us to distinguish which version of base and require were used for the build.
* A new make target, `cellbuild` has been added. This simply allows you to build (not install)
while still possibly linking with other Cell mode modules.
### Bugfixes
* Removed `loadIocsh` function, which was just a cover for `runScript`.
* Removed references to `INSTBASE`
* Fixed issue where `make cellinstall` would recompile a module.
* Fixed permissions on `cellinstall`.
* Fixed issue where `make debug` would recompile a module.
* Fixed issue where `make install` would fail if you had not run `make build` first.
* Removed all references to `sudo`. If `sudo` needs to be used, it should be done manually.
* Fixed issue with module name checking which caused modules to fail to build on certain linux distributions
* Exact module version is fetched correctly at build-time to ensure that new releases do not affect upstream dependencies
* Issue involving priority between some test versions fixed
* `make patch` when there are no patch files will no longer return an error code.
### Other changes
* Removed `require` as a submodule and merged it into `e3-require`.
* Add `CONFIG_SHELL` to define standard shell (*bash*) used by *Make*
* Removed `plotdep` target.
## [3.3.0]
3.3.0 is a relatively major release with many bugfixes and a number of features added based on consultation
with developers. One major change is that versions are now parsed as MAJOR.MINOR.PATCH-BUILD (with build
number being optional, assumed to be zero if not present). This has proven to be necessary in the NFS
......@@ -11,8 +51,7 @@ setting for a number of separate reasons to handle dependencies properly. Note t
A second major change (mostly via bugfixes) is that the local install command, `make cellinstall` which installs the module in a local directory now works properly, which allows developers and integrators to simply mount the NFS E3 build and work with that instead of needing to install E3 locally.
## New Features
### New Features
* Removed all EPICS 3.* and VxWorks code, as these are not to be supported at ESS.
* Consistent with the philosophy of not requiring module version pinning, if one specifies a dependent
module with e.g. `REQUIRED += asyn` then the latest version of asyn will be used. No version need
......@@ -30,8 +69,7 @@ A second major change (mostly via bugfixes) is that the local install command, `
* Added a `prebuild` target that runs before build so module developers can run specific code before the build process.
* A module developer can now install dbd files separate from the module dbd file by using `DBD_INSTALLS += file.dbd`.
## Bugfixes
### Bugfixes
* Ensures that lowercase module names are enforced consistently
* Vendor libraries are only installed at install time, not at build time
* Vendor libraries are uninstalled when `make uninstall` is run
......@@ -45,8 +83,7 @@ A second major change (mostly via bugfixes) is that the local install command, `
* Assorted minor typos in scripts
* Re-added functionality to have `iocsh.bash` automagically source `setE3Env.bash`.
# 3.2.0
## [3.2.0]
Require 3.2.0 is the first version of require used during our initial return to the NFS implementation
of E3. It maintains some of the work done there (modules are lowercased for consistency), but mostly
reverts back to a similar version to require 3.1.2. One major difference is that module pinning is not
......@@ -54,14 +91,18 @@ reverts back to a similar version to require 3.1.2. One major difference is that
form `require module` instead of `require module,version` as was the case in 3.1.2. An IOC developer can
of course pin a specific module version. If they do not, then the highest numeric version will be chosen.
## New Features
### New Features
* Added -dg, -dv options to run gdb and valgrind using `iocsh.bash`
* If `IOCNAME` is defined, then it is used in the PV names set by require instead of `REQMOD:$(hostname)-$(pid)`.
* Reverted changes from conda require to return to NFS
* Moved tools files from e3-require to require submodule
## Bugfixes
### Bugfixes
* Fixed issue where a second user running `iocsh.bash` on a machine would be unable to create the temporary
startup script
[Unreleased]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/3.4.0...master
[3.4.0]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/3.3.0...3.4.0
[3.3.0]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/3.2.0...3.3.0
[3.2.0]: https://gitlab.esss.lu.se/e3/e3-require/-/tree/3.2.0
# e3-require
The e3 version of `require` based on the PSI version of [`require`](https://github.com/paulscherrerinstitute/require).
There are significant diferences between the two modules, significant enough that it is not proper to call it a fork
any longer.
## Setup
At its heart, `require` performs:
* Dynamic loading of EPICS modules and rudimentary dependency resolution
* Loading of IOCs using a custom startup script calling `softIocPVA`
* Building of EPICS modules into standardized packages
```
e3-require (master)$ make init
e3-require (master)$ make vars
e3-require (master)$ make build
e3-require (master)$ make install
```
For more documentation on this, please see [e3.pages](http://e3.pages.esss.lu.se/design/2_require.html).
## Update shell environment
```
e3-require (master)$ make requireconf
```
## Structural differences between PSI require and ESS require
## Execute iocsh.bash
The main differences between the two is that ESS `require` includes a number of configuration files defining special
build targets for EPICS modules. For example, the following targets are defined.
* `make build` - Runs the custom build process defined in `require`.
* `make vars` - Displays a number of custom build variables e.g. install locations, etc.
* `make debug` - Runs a debug build process, displaying information about the current build
* `make cellinstall` - Installs the module in a local directory, e.g. for testing purposes
For more special rules, look at the files in [configure/modules].
```
e3-require (master)$ source tools/setE3Env.bash
Set the ESS EPICS Environment as follows:
THIS Source NAME : setE3Env.bash
THIS Source PATH : /home/jhlee/e3/e3-require/tools
EPICS_BASE : /epics/base-3.15.5
EPICS_HOST_ARCH : linux-x86_64
E3_REQUIRE_LOCATION : /epics/base-3.15.5/require/3.0.0
PATH : /epics/base-3.15.5/require/3.0.0/bin:/epics/base-3.15.5/bin/linux-x86_64:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/jhlee/bin
LD_LIBRARY_PATH : /epics/base-3.15.5/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/siteLibs/linux-x86_64
Enjoy E3!
jhlee@faiserver: e3-require (master)$ iocsh.bash
#
# Start at "2018-W35-Aug28-0012-23-CEST"
#
# Version information:
# European Spallation Source ERIC : iocsh.bash (v0.3.1-6690f8a.PID-9225)
#
# --->--> snip -->-->
# Please Use Version and other environment variables
# in order to report or debug this shell
#
# HOSTDISPLAY=""
# WINDOWID="54535878"
# PWD="/home/jhlee/e3/e3-require"
# USER="jhlee"
# LOGNAME="jhlee"
# EPICS_HOST_ARCH="linux-x86_64"
# EPICS_BASE="/epics/base-3.15.5"
# E3_REQUIRE_NAME="require"
# E3_REQUIRE_VERSION="3.0.0"
# E3_REQUIRE_LOCATION="/epics/base-3.15.5/require/3.0.0"
# E3_REQUIRE_BIN="/epics/base-3.15.5/require/3.0.0/bin"
# E3_REQUIRE_DB="/epics/base-3.15.5/require/3.0.0/db"
# E3_REQUIRE_DBD="/epics/base-3.15.5/require/3.0.0/dbd"
# E3_REQUIRE_INC="/epics/base-3.15.5/require/3.0.0/include"
# E3_REQUIRE_LIB="/epics/base-3.15.5/require/3.0.0/lib"
# E3_SITEAPPS_PATH="/epics/base-3.15.5/require/3.0.0/siteApps"
# E3_SITELIBS_PATH="/epics/base-3.15.5/require/3.0.0/siteLibs"
# E3_SITEMODS_PATH="/epics/base-3.15.5/require/3.0.0/siteMods"
# EPICS_DRIVER_PATH="/epics/base-3.15.5/require/3.0.0/siteMods"
# EPICS_CA_AUTO_ADDR_LIST="no"
# EPICS_CA_ADDR_LIST="10.0.6.172 10.0.6.60"
# PATH="/epics/base-3.15.5/require/3.0.0/bin:/epics/base-3.15.5/bin/linux-x86_64:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/jhlee/bin"
# LD_LIBRARY_PATH="/epics/base-3.15.5/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/siteLibs/linux-x86_64"
# --->--> snip -->-->
#
# Set REQUIRE_IOC for its internal PVs
epicsEnvSet REQUIRE_IOC "E3R:FAISERVER"
#
# Set E3_IOCSH_TOP for the absolute path where iocsh.bash is executed.
epicsEnvSet E3_IOCSH_TOP "/home/jhlee/e3/e3-require"
#
#
# Load require module, which has the version 3.0.0
#
dlload /epics/base-3.15.5/require/3.0.0/lib/linux-x86_64/librequire.so
dbLoadDatabase /epics/base-3.15.5/require/3.0.0/dbd/require.dbd
require_registerRecordDeviceDriver
Loading module info records for require
#
# Set the IOC Prompt String One
epicsEnvSet IOCSH_PS1 "6690f8a.faiserver.9240 > "
#
#
iocInit
Starting iocInit
############################################################################
## EPICS R3.15.5-E3-3.15.5-patch
## EPICS Base built Aug 27 2018
############################################################################
iocRun: All initialization complete
6690f8a.faiserver.9240 >
The main parts that we have taken from PSI `require` are `require.c` and `driver.makefile`, which respectively
load modules dynamically at run-time, and which run the custom build process. However, both of these have been
modified significantly for the purposes of e3.
Furthermore, we have added the custom startup script `iocsh.bash` which sets up the IOC's environment before
running `softIocPVA` from EPICS base.
## Building `require`
In order to build require, you must first have EPICS base installed. After that, you must configure `CONFIG_MODULE`
and `RELEASE` to specify the require version and the location of EPICS base. Having done so, run
```bash
$ make build
$ make install
```
To test your build, run
```bash
$ source ${EPICS_BASE}/require/${E3_REQUIRE_VERSION}/bin/setE3Env.bash
$ iocsh.bash
```
## TODO
which should start up an IOC and load require.
......@@ -24,7 +24,6 @@ include $(TOP)/configure/E3/CONFIG_REQUIRE
include $(TOP)/configure/E3/CONFIG_E3_PATH
include $(TOP)/configure/E3/CONFIG_E3_MAKEFILE
include $(TOP)/configure/E3/CONFIG_EPICS
include $(TOP)/configure/E3/CONFIG_SUDO
include $(TOP)/configure/E3/CONFIG_EXPORT
......
......@@ -3,15 +3,14 @@
# However, it also could be overrided in CONFIG_MODULE.local.
# Be careful to touch this file
#
EPICS_MODULE_TAG:=tags/3.3.0
#
EPICS_MODULE_NAME:=${E3_REQUIRE_NAME}
#
E3_MODULE_SRC_PATH:=$(EPICS_MODULE_NAME)
E3_MODULE_SRC_PATH:=$(EPICS_MODULE_NAME)-ess
E3_MODULE_MAKEFILE:=$(EPICS_MODULE_NAME).Makefile
#
E3_MODULE_NAME:=$(EPICS_MODULE_NAME)
E3_MODULE_VERSION:=3.3.0
E3_MODULE_VERSION:=3.4.0
#
#
#
......
......@@ -6,7 +6,7 @@ E3_MODULE_SRC_PATH:=$(EPICS_MODULE_NAME)
E3_MODULE_MAKEFILE:=$(EPICS_MODULE_NAME).Makefile
E3_MODULE_NAME:=$(EPICS_MODULE_NAME)
E3_MODULE_VERSION:=${E3_REQUIRE_VERSION}
E3_MODULE_VERSION:=3.3.0
#
#
#
......
......@@ -11,11 +11,16 @@ E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += PROJECT="$(E3_MODULE_NAME)"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += EPICS_MODULES="$(E3_MODULES_PATH)"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += EPICS_LOCATION="$(EPICS_BASE)"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += BUILDCLASSES="Linux"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITEMODS_PATH="$(E3_SITEMODS_PATH)"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITEAPPS_PATH="$(E3_SITEAPPS_PATH)"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITELIBS_PATH="$(E3_SITELIBS_PATH)"
ifeq ($(shell git status > /dev/null 2>&1; echo $$?),0)
GIT_REMOTE_NAME := $(shell git remote | head -n 1)
ifeq ($(shell git status &> /dev/null; echo $?),0)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_DESC="$(shell git describe --tags 2> /dev/null || git rev-parse HEAD 2> /dev/null || echo 'Not a git repository')"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_STATUS="[ $(shell git status --porcelain | sed 's/^/\\\\\\\"/' | sed 's/$$/\\\\\\\", /')]"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_URL="$(shell git remote get-url origin 2> /dev/null || echo '')"
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_URL="$(shell git config --get remote.$(GIT_REMOTE_NAME).url 2> /dev/null || echo '')"
else
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_DESC=
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_STATUS=
......
......@@ -4,15 +4,3 @@ E3_SITEMODS_PATH:=$(E3_REQUIRE_LOCATION)/siteMods
E3_SITELIBS_PATH:=$(E3_REQUIRE_LOCATION)/siteLibs
E3_SITEAPPS_PATH:=$(E3_REQUIRE_LOCATION)/siteApps
INSTALLED_EPICS_BASE_ARCHS_PATHS=$(sort $(dir $(wildcard $(EPICS_BASE)/bin/*/)))
TEMP_INSTALLED_EPICS_BASE_ARCHS=$(INSTALLED_EPICS_BASE_ARCHS_PATHS:$(EPICS_BASE)/bin/%=%)
INSTALLED_EPICS_BASE_ARCHS=$(TEMP_INSTALLED_EPICS_BASE_ARCHS:/=)
### Exclude the following variables to display
VARS_EXCLUDES+=TEMP_INSTALLED_EPICS_BASE_ARCHS
VARS_EXCLUDES+=INSTALLED_EPICS_BASE_ARCHS_PATHS
......@@ -22,7 +22,6 @@ EXPORT_VARS+=$(filter E3_REQUIRE_%,$(.VARIABLES))
EXPORT_VARS+=QUIET
EXPORT_VARS+=$(filter %_DEP_VERSION,$(.VARIABLES))
EXPORT_VARS+=$(filter WITH_%,$(.VARIABLES))
EXPORT_VARS+=$(filter SUDO%,$(.VARIABLES))
export_version=$(eval export $1)
$(eval $(foreach v,$(EXPORT_VARS),$(call export_version,$v)))
......
# IF EPICS_BASE is not WRITABLE, SUDO and SUDOBASH should be used
# SUDO_INFO 1 : SUDO is needed (NOT writable)
# SUDO_INFO 0 : SUDO is not needed
SUDO_INFO := $(shell test -w $(EPICS_BASE) 1>&2 2> /dev/null; echo $$?)
SUDO_CMD := $(shell which sudo)
# For CentOS, devtoolset-{7,8} has -E option within sudo shell
# So we have to remove -E option as well if we would like to use devtoolset
#
ifeq "$(SUDO_INFO)" "1"
ifneq (,$(findstring devtoolset,$(SUDO_CMD)))
SUDO = $(SUDO_CMD)
else
SUDO = $(SUDO_CMD) -E
endif
SUDOBASH := $(SUDO) bash -c
else
SUDO :=
SUDOBASH = bash -c
endif
# Valid for only Development Mode, because we clone/remove them
# See RULES_DEV
# E3_MODULE_SRC_PATH_INFO 1 : the directory is not there
# E3_MODULE_SRC_PATH_INFO 0 : the directory is there
E3_MODULE_SRC_PATH_INFO := $(shell test -d $(E3_MODULE_SRC_PATH) 1>&2 2> /dev/null; echo $$?)
ifeq "$(E3_MODULE_SRC_PATH_INFO)" "1"
INIT_E3_MODULE_SRC = 1
endif
VARS_EXCLUDES+=SUDO
VARS_EXCLUDES+=SUDOBASH
VARS_EXCLUDES+=SUDO_INFO
VARS_EXCLUDES+=SUDO_CMD
VARS_EXCLUDES+=E3_MODULE_SRC_PATH_INFO
......@@ -20,25 +20,17 @@ for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\
done
endef
define patch_revert_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\
printf "\nReverting applied patch %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
git apply -R --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i;\
done
endef
ifndef VERBOSE
QUIET := @
endif
ifdef DEBUG_SHELL
SHELL = /bin/sh -x
endif
### Exclude the following variables to display
VARS_EXCLUDES+=git_update
VARS_EXCLUDES+=git_module_init_update
......
......@@ -10,8 +10,12 @@ devinit: git-submodule-sync
git clone $(E3_MODULE_DEV_GITURL) $(E3_MODULE_SRC_PATH)
cd $(E3_MODULE_SRC_PATH) && git checkout $(EPICS_MODULE_TAG)
# E3_MODULE_SRC_PATH_FLAG 1 : the directory is not there
# E3_MODULE_SRC_PATH_FLAG 0 : the directory is there
E3_MODULE_SRC_PATH_FLAG := $(shell test -d $(E3_MODULE_SRC_PATH) 1>&2 2> /dev/null; echo $$?)
ifeq "$(INIT_E3_MODULE_SRC)" "1"
# Note that this is re-defined in CONFIG_MODULE_DEV, which is included if you do a `make dev*`.
ifeq "$(E3_MODULE_SRC_PATH_FLAG)" "1"
devbuild: nonexists
devclean: nonexists
......
......@@ -28,53 +28,44 @@ help:
## Install : $(E3_MODULE_NAME)
install: requireconf
$(QUIET) $(SUDOBASH) '$(E3_MODULE_MAKE_CMDS) install'
## Uninstall : $(E3_MODULE_NAME)
uninstall: conf
$(QUIET) $(SUDOBASH) '$(E3_MODULE_MAKE_CMDS) uninstall'
## Install require to $(EPICS_BASE)/require/$(E3_MODULE_VERSION)
install: requireconf install_module
install_module: build db
$(QUIET) $(E3_MODULE_MAKE_CMDS) install
## Build the EPICS Module : $(E3_MODULE_NAME)
# Build always the Module with the EPICS_MODULES_TAG
build: conf checkout
## Uninstall the current module
uninstall: conf
ifeq (,$(strip $(wildcard $(E3_SITEMODS_PATH)/*)))
$(QUIET) $(E3_MODULE_MAKE_CMDS) uninstall
else
$(error Cannot run 'make uninstall': please manually uninstall everything in $(E3_SITEMODS_PATH))
endif
# We should be able to force an uninstall of require if we need to; this should not be done without some care and thought, however!
## Uninstall, including deleting siteMods directory.
forceuninstall: conf
$(QUIET) $(E3_MODULE_MAKE_CMDS) uninstall
## Build current module.
build: conf
$(QUIET) $(E3_MODULE_MAKE_CMDS) build
## Displays information about the build process
debug: conf
$(QUIET) $(E3_MODULE_MAKE_CMDS) debug
## Clean, build, and install the EPICS Module : $(E3_MODULE_NAME)
## Clean, build, and install the current module
rebuild: clean build install
## Clean : $(E3_MODULE_NAME)
## Deletes temporary build files
clean: conf
$(QUIET) $(E3_MODULE_MAKE_CMDS) clean
all: init patch rebuild
## Copy $(E3_MODULE_MAKEFILE) into $(E3_MODULE_SRC_PATH)
# Copy $(E3_MODULE_MAKEFILE) into $(E3_MODULE_SRC_PATH)
conf:
$(QUIET) install -m 644 $(TOP)/$(E3_MODULE_MAKEFILE) $(E3_MODULE_SRC_PATH)/
.PHONY: init git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
## Initialize : $(E3_MODULE_SRC_PATH)
init: git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
git-submodule-sync:
$(QUIET) git submodule sync
$(E3_MODULE_SRC_PATH):
$(QUIET) $(git_update)
checkout:
cd $(E3_MODULE_SRC_PATH) && git checkout $(EPICS_MODULE_TAG)
init:
......@@ -8,8 +8,8 @@
# epics:
# $(QUIET)echo "EPICS_BASE=$(EPICS_BASE)" > $(TOP)/$(E3_MODULE_SRC_PATH)/configure/RELEASE
# $(QUIET)echo "INSTALL_LOCATION=$(M_IOCSTATS)" > $(TOP)/$(E3_MODULE_SRC_PATH)/configure/CONFIG_SITE
# $(SUDOBASH) "$(MAKE) -C $(E3_MODULE_SRC_PATH)"
# $(MAKE) -C $(E3_MODULE_SRC_PATH)
#epics-clean:
# $(SUDOBASH) "$(MAKE) -C $(E3_MODULE_SRC_PATH) clean"
# $(MAKE) -C $(E3_MODULE_SRC_PATH) clean
......@@ -12,36 +12,38 @@ IOCSH_HASH_VERSION?=$(EPICS_MODULE_TAG)
FILE_FILTER:= %~ %\#
E3_ESSENVCFG_FILE := $(TOP)/tools/ess-env.conf
E3_CONFIG_FILE := $(TOP)/tools/e3.cfg
E3_TEST_SCRIPT := $(TOP)/tools/test_installed_modules.sh
#
E3_SHELL_FILES := $(wildcard $(E3_MODULE_SRC_PATH)/tools/iocsh*.bash)
E3_IOC_CFG_FILES := $(E3_MODULE_SRC_PATH)/tools/iocsh_functions
E3_IOC_CFG_FILES += $(E3_ESSENVCFG_FILE)
#E3_IOC_CFG_FILES += $(E3_CONFIG_FILE)
E3_IOC_CFG_FILES += $(E3_MODULE_SRC_PATH)/tools/setE3Env.bash
#E3_IOC_CFG_FILES += $(E3_MODULE_SRC_PATH)/tools/promptE3Env.bash
E3_IOC_CFG_FILES += $(E3_MODULE_SRC_PATH)/tools/promptE3Env.bash
E3_REQUIRE_CONF_FILES := $(filter-out $(FILE_FILTER), $(wildcard $(TOP)/configure/modules/*))
.PHONY: e3-site-conf e3-site-path requireconf
requireconf: e3-site-path e3-site-conf e3-require-path
$(QUIET) $(SUDO) install -m 755 $(wildcard $(E3_MODULE_SRC_PATH)/App/tools/*.tcl) $(E3_REQUIRE_TOOLS)/
$(QUIET) $(SUDO) install -m 644 $(E3_MODULE_SRC_PATH)/App/tools/driver.makefile $(E3_REQUIRE_TOOLS)/
$(QUIET) $(SUDO) install -m 755 $(E3_SHELL_FILES) $(E3_REQUIRE_BIN)/
$(QUIET) $(SUDO) install -m 644 $(E3_IOC_CFG_FILES) $(E3_REQUIRE_BIN)/
$(QUIET) $(SUDO) install -m 644 $(E3_REQUIRE_CONF_FILES) $(E3_REQUIRE_CONFIG)/
$(QUIET) install -m 755 $(wildcard $(E3_MODULE_SRC_PATH)/tools/*.tcl) $(E3_REQUIRE_TOOLS)/
$(QUIET) install -m 644 $(E3_MODULE_SRC_PATH)/tools/driver.makefile $(E3_REQUIRE_TOOLS)/
$(QUIET) install -m 755 $(E3_MODULE_SRC_PATH)/tools/*.sh $(E3_REQUIRE_TOOLS)/
$(QUIET) install -m 755 $(E3_SHELL_FILES) $(E3_REQUIRE_BIN)/
$(QUIET) install -m 644 $(E3_IOC_CFG_FILES) $(E3_REQUIRE_BIN)/
$(QUIET) install -m 644 $(E3_REQUIRE_CONF_FILES) $(E3_REQUIRE_CONFIG)/
e3-require-path:
$(QUIET) $(SUDO) install -d -m 755 $(E3_REQUIRE_TOOLS)
$(QUIET) $(SUDO) install -d -m 755 $(E3_REQUIRE_BIN)
$(QUIET) $(SUDO) install -d -m 755 $(E3_REQUIRE_CONFIG)
$(QUIET) install -d -m 755 $(E3_REQUIRE_TOOLS)
$(QUIET) install -d -m 755 $(E3_REQUIRE_BIN)
$(QUIET) install -d -m 755 $(E3_REQUIRE_CONFIG)
e3-site-path:
$(QUIET) $(SUDO) install -d -m 755 $(E3_SITELIBS_PATH)
$(QUIET) $(SUDO) install -d -m 755 $(E3_SITEMODS_PATH)
$(QUIET) $(SUDO) install -d -m 755 $(E3_SITEAPPS_PATH)
$(QUIET) install -d -m 755 $(E3_SITELIBS_PATH)
$(QUIET) install -d -m 755 $(E3_SITEMODS_PATH)
$(QUIET) install -d -m 755 $(E3_SITEAPPS_PATH)
e3-site-conf:
......
......@@ -6,13 +6,15 @@ DEP_MODULES:=$(filter %_DEP_VERSION, $(E3_MODULES_VARIABLES))
LEVEL?=2
.PHONY: env vars header vers dep _dep1
## Print relevant environment variables
.PHONY: env
env: vars
.PHONY: vars
vars: header
$(foreach v, $(E3_MODULES_VARIABLES), $(info $(v) = $($(v)))) @#noop
env: vars
.PHONY: header
header:
$(QUIET)echo ""
$(QUIET)echo "------------------------------------------------------------"
......@@ -20,9 +22,8 @@ header:
$(QUIET)echo "------------------------------------------------------------"
$(QUIET)echo ""
## Show installed versions of the current module
existent:
ifeq (,$(shell which tree))
$(QUIET)ls -d $(E3_MODULES_PATH)/$(E3_MODULE_NAME)
$(QUIET)find $(E3_MODULES_PATH)/$(E3_MODULE_NAME)/ -maxdepth $(LEVEL) | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/:---\1/"
......@@ -30,22 +31,17 @@ else
$(QUIET)tree -L $(LEVEL) $(E3_MODULES_PATH)/$(E3_MODULE_NAME)
endif
dep: _dep1
$(foreach v, $(DEP_MODULES), $(info $(v) = $($(v)))) @#noop
_dep1:
.PHONY: dep
dep:
$(QUIET)echo "require $(E3_MODULE_NAME),$(E3_MODULE_VERSION)"
$(QUIET)echo "< configured ..."
$(foreach v, $(DEP_MODULES), $(info $(v) = $($(v)))) @#noop
.PHONY: vers
vers:
$(QUIET)echo "EPICS_MODULE_TAG:=$(EPICS_MODULE_TAG), origin : $(origin EPICS_MODULE_TAG)"
$(QUIET)echo "E3_MODULE_VERSION:=$(E3_MODULE_VERSION), origin : $(origin E3_MODULE_VERSION)"
dep3:
$(foreach v, $(DEP_MODULES), $(info $(v) = $($(v)))) @#noop
# https://www.cmcrossroads.com/article/printing-value-makefile-variable
print-%:
$(QUIET)echo $* = $($*)
......
EPICS_BASE=/epics/base-7.0.4
EPICS_BASE=/epics/base-7.0.5
E3_REQUIRE_NAME:=require
E3_REQUIRE_VERSION:=3.3.0
E3_REQUIRE_VERSION=$(E3_MODULE_VERSION)
# The definitions shown below can also be placed in an untracked RELEASE.local
......
EPICS_BASE=/epics/base-7.0.4
E3_REQUIRE_NAME:=require
E3_REQUIRE_VERSION:=3.3.0
E3_REQUIRE_VERSION=$(E3_MODULE_VERSION)
# The definitions shown below can also be placed in an untracked RELEASE.local
......
# -*- mode: Makefile;-*-
# Update the module version (for numeric versions) with a build number of 0 if none is specified
E3_MODULE_VERSION_ORIG:=$(E3_MODULE_VERSION)
E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell [[ "$(E3_MODULE_VERSION)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]] && echo +0)
include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION
include $(REQUIRE_CONFIG)/CONFIG_REQUIRE
include $(REQUIRE_CONFIG)/CONFIG_SUDO
include $(REQUIRE_CONFIG)/CONFIG_SHELL
include $(REQUIRE_CONFIG)/CONFIG_CELL
include $(REQUIRE_CONFIG)/CONFIG_E3_PATH
include $(REQUIRE_CONFIG)/CONFIG_E3_MAKEFILE
include $(REQUIRE_CONFIG)/CONFIG_TEST
include $(REQUIRE_CONFIG)/CONFIG_EPICS
include $(REQUIRE_CONFIG)/CONFIG_DKMS
include $(REQUIRE_CONFIG)/CONFIG_EXPORT
......