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 (504)
Showing with 1048 additions and 134 deletions
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*\.h>'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 3
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
PPIndentWidth: -1
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
- ParseTestProto
- ParsePartialTestProto
CanonicalDelimiter: pb
BasedOnStyle: google
ReferenceAlignment: Pointer
ReflowComments: true
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Auto
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...
[flake8]
ignore = E501, E203, W503
# E501, E203: black
# W503: PEP8
*.makefile gitlab-language=make
......@@ -17,7 +17,11 @@ core.*
cellMods
*.log
__pycache__
.iocsh_history
.gdb_history
venv
require-ess/require.Makefile
require-ess/O.*
require-ess/Db/*.db
require-ess/Db/*.d
---
variables:
E3_CI_MODIFIED_BASE_VERSION: "7.0.8.1-68332f4-20240917T140931" # strip the first part of the tag name - see E3-1529
stages:
- check
- build
......@@ -7,16 +10,11 @@ stages:
default:
tags:
- docker
image: registry.esss.lu.se/ics-docker/centos-e3:$E3_CI_DOCKER_VERSION
### stage: check
image: registry.esss.lu.se/ics-docker/centos-e3:latest
run pre-commit:
stage: check
image: registry.esss.lu.se/ics-docker/pre-commit:latest
script:
- pre-commit run --all-files
include:
- project: "ics-infrastructure/gitlab-ci-yml"
file: "PreCommit.gitlab-ci.yml"
shellcheck:
image: pipelinecomponents/shellcheck:latest
......@@ -39,15 +37,16 @@ shfmt:
before_script:
- shfmt -version
script:
- shfmt -i 2 -ci -d . # 2 spaces indent, indent switch-case statements, show diff (don't apply change)
- shfmt -i 2 -ci -d . # 2 spaces indent, indent switch-case statements, show diff (don't apply change)
build require:
stage: build
before_script:
- curl -L -o epics.tar.gz https://artifactory.esss.lu.se/artifactory/e3/epics-base-$E3_CI_BASE_VERSION.tar.gz
- curl -L -o epics.tar.gz https://artifactory.esss.lu.se/artifactory/e3/epics-base-$E3_CI_MODIFIED_BASE_VERSION.tar.gz
- tar -zxvf epics.tar.gz
- export BASE_PATH=$(ls -d $(pwd)/epics/base-*)
- echo "EPICS_BASE:=${BASE_PATH}" >> configure/RELEASE.local
- echo "E3_REQUIRE_VERSION:=${CI_COMMIT_SHORT_SHA}" >> configure/CONFIG_MODULE.local
- chmod +w "${BASE_PATH}"/configure/CONFIG_SITE
- echo 'INSTALL_LOCATION:=$(TOP)' >> "${BASE_PATH}"/configure/CONFIG_SITE
- export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BASE_PATH}/lib/linux-x86_64"
......@@ -63,7 +62,9 @@ build require:
test require:
stage: test
before_script:
- source $(pwd)/epics/base-*/require/*/bin/setE3Env.bash
- source $(pwd)/epics/base-*/require/*/bin/activate
# We need to allow file:// protocol for all of the tests to work
- git config --global procotol.file.allow always
script:
- make test
needs:
......
repos:
- repo: https://github.com/ambv/black
rev: 21.12b0
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- repo: https://gitlab.com/PyCQA/flake8
rev: 3.9.2
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.238
hooks:
- id: flake8
- id: ruff
- repo: https://github.com/PyCQA/doc8.git
rev: v1.0.0 # 1.1.0 drops python3.6 support
hooks:
- id: doc8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.0.1 # 4.2.0 drops python3.6 support
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black"]
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v13.0.0
hooks:
......
# 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/),
......@@ -7,11 +8,125 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### New Features
* Remove `--realtime` option from `iocsh`
* Add timestamp for `LoadedModules`
* Deprecate `IOCNAME` environment variable in favour of `--iocname` argument for `iocsh`
* Add environment variable `E3_STRICT_CC`: if set to `YES` then driver.Makefile will
fail if a cross-compiler is missing
* Support for e3 on Mac OS (both intel and apple silicon)
### Bugfixes
* Decouple `build` and `install` targets
* Exit `iocsh` if file to run does not exist
* Add trigger mapping on `LoadedModules` to silence QSRV2 warning
* Silence warnings on submodule initialisation
* Automatically use cell path with `test` target (no longer any need to activate an environment as part of the test rule)
## [5.1.1]
### Bugfixes
* Fix memory leaks on IOC exit
* Fix dirty terminal after IOC exit for some distributions
* Fix crash when running `make test` without having activated an environment
* Resolve `E3_CMD_TOP` when a startup script is being run with `iocsh` (previously expanded to just `.`)
* Fix truncated errorlog messages
## [5.1.0]
### New Features
* Allow for module-specific build rules (see: sequencer) to be installed and used
within e3
* Automatically install LICENSE files with modules
* `afterInit` can now run commands of arbitrary length. Note: The syntax has changed from
```
afterInit foo bar baz
```
to
```
afterInit 'foo bar baz'
```
* Add NTTable PV for module and version information as `LoadedModules`
### Bugfixes
* Fixed an issue where .template and .substitutions files with the same name would build incorrectly
* Fixed an issue where filenames with spaces in them that had been modified
in the wrapper would cause all of the module `make` commands to fail.
* Removed a number of memory leaks found by valgrind
* Fixed issue where failure of one of the patches to apply wouldn't stop the build
* Fixed memory leak in `afterInit`
### Other changes
* Rewrite `iocsh` converting it from being a shell script to a python (3.6) script
* Remove support for file extensions: `.so`, `.dbd`, `.db`, `.substitutions`, `.template`, `.iocsh`
* Remove support for `nice`
* Remove support for sequencer programs
* Remove optional argument passing to `gdb`
* Change the IOC shell to use both stdout and stderr (previously only stdout)
* Change default prompt
* Change fallback IOC-name (used when `IOCNAME` is not set)
* Multiple argument changes; e.g.
* Shortened argument for printing version and exit changed from `-v` to `-V`
* Make running IOC as realtime or with debuggers mutually exclusive
* Change how arguments are passed to `gdb` and `valgrind` (see help: `--help`)
* Removed `tclx` script to expand .dbd in favour of `dbdExpand.pl` from EPICS base
* Removed `hdrs` target. Note that this has been entirely replaced by the automatic db expansion.
* Removed ability to pass `args` to require (which have not been used within e3)
* Removed `require module,ifexists` option
* Stop require from looking in legacy locations for various files
* Rewrite internal linked list to have better memory safety
* Removed enabling of core dump generation and max file size limit to allow developers more flexibility (enable and set limit by calling `ulimit -S -c x` where x is max size in blocks before IOC startup)
* Remove `ARCH_FILTER` support; from now on, only `EXCLUDE_ARCHS` is used.
* Remove `setE3Env.bash` alias (for `activate`)
* Remove custom `dbLoadTemplate` in favour of the one supplied by EPICS base
* Note that this amounts to a change where double quotes (`"`) must be used in substitutions files when using macros in patterns
## [5.0.0]
### New Features
* Recursive dependency for headers at build-time. This is a more major change that involves:
* Module dependecies are now fetched from `CONFIG_MODULE` in the sense that `X_DEP_VERSION` is parsed as a
dependency on the module `x`
* It is no longer necessary to specify `REQUIRED += ...` nor `x_VERSION = $(X_DEP_VERSION)` within the module makefile
* Check inconsistent versions between dependencies at build time. If an inconsistency is found the build will fail.
### Bugfixes
* Fixed issue where updated dependencies of substitution files did not retrigger a .db expansion.
* db expansion happens at build time, not at install time.
### Other changes
* Remove `IOCNAME:exit` PV. Stop loading `softIocExit.db` and now it's require that exposes the `BaseVersion` PV.
* Patch system now applies all patches in the `patch/` directory. Versioning for patches should be handled by git,
not by require.
* The loop over `EPICSVERSION` in `driver.makefile` has been removed; various other cleanup has been performed.
* Improved output during IOC startup
* e3-sequencer tests added, as well as removing pre-processing of .stt files.
* Remove Win32 and CYGWIN32 support
* Remove `/tools` directory, including `test_installed_modules.sh` utility
* Remove `runScript`
* Drop file extension from `build_number.sh`
* Rename `setE3Env.bash` to `activate`
* Add alias from `setE3Env.bash` to `activate`
* Updated PV-names to be ESS compliant, and remove VERSIONS PV
* Changed from `build number` to `revision number`
* Added revision number parsing for test versions
* Joined together the variables `REQUIRE_CONFIG` and `E3_REQUIRE_CONFIG`
* Removed legacy file `DECOUPLE_FLAGS`
## [4.0.0]
### New Features
* Block module loading after iocInit has been invoked.
* Arguments have been added to `iocsh.bash` to enable user to pass any debugger options to GDB and Valgrind.
* Autocompletion for `iocsh.bash` has been added
* Removed `iocsh_gdb.bash` and `iocsh_nice.bash`, both of whose functionality can be called via `iocsh.bash -dg` and `iocsh.bash -n`, respectively.
* Patch file location has been change from `patch/Site/$VERSION-description.p0.patch` to `patch/Site/$VERSION/description.p0.patch`
* Require will automatically build `.template` and `.substitutions` files into the common build directory instead of into the source Db path
* Require will automatically build `.template` and `.substitutions` files into the common build directory instead of into the source Db path
* Rudimentary testing has been added:
* * Tests that the correct version is loaded
* * Tests that elementary patching/building works as expected
......@@ -29,8 +144,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Removed `dev` targets from modules that function in "local source mode"
* Fixed issue where `.hpp` files were not installed correctly with `KEEP_HEADER_SUBDIRS`
* Missing `REQUIRED` dependencies now cause the build to fail instead of providing a warning
* Fixed issue where consecutive builds might not track updated dependencies
* Fixed an issue related to buffering of data being written to a shared filesystem which produced garbled `.dep` files
### Other changes
* Rename `iocsh.bash` to `iocsh`
* Removed `<module>_TEMPLATES` in favour of `<module>_DB`
* Removed unnecessary code from `make init`.
* removed `e3.cfg`, `ess-env.conf` and `DEFINES_REQUIRE` files and associated codes in `RULES_REQUIRE`, `setE3Env.bash` and `.gitignore`.
......@@ -148,7 +266,11 @@ of course pin a specific module version. If they do not, then the highest numeri
startup script
[Unreleased]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/3.4.1...master
[Unreleased]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/5.1.1...master
[5.1.1]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/5.1.0...5.1.1
[5.1.0]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/5.0.0...5.1.0
[5.0.0]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/4.0.0...5.0.0
[4.0.0]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/3.4.1...4.0.0
[3.4.1]: https://gitlab.esss.lu.se/e3/e3-require/-/compare/3.4.0...3.4.1
[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
......
Copyright (C) 2024 European Spallation Source ERIC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This diff is collapsed.
......@@ -26,7 +26,7 @@ The main parts that we have taken from PSI `require` are `require.c` and `driver
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
Furthermore, we have added the custom startup script `iocsh` which sets up the IOC's environment before
running `softIocPVA` from EPICS base.
## Building `require`
......@@ -40,8 +40,8 @@ $ make install
To test your build, run
```bash
$ source ${EPICS_BASE}/require/${E3_REQUIRE_VERSION}/bin/setE3Env.bash
$ iocsh.bash
$ source ${EPICS_BASE}/require/${E3_REQUIRE_VERSION}/bin/activate
$ iocsh
```
which should start up an IOC and load require.
......@@ -19,16 +19,16 @@ endif
E3_MODULES_PATH:=$(EPICS_BASE)
REQUIRE_CONFIG:=$(TOP)/configure/E3
E3_REQUIRE_CONFIG:=$(TOP)/configure/E3
include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION
include $(REQUIRE_CONFIG)/CONFIG_REQUIRE
include $(REQUIRE_CONFIG)/CONFIG_SHELL
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_EXPORT
include $(E3_REQUIRE_CONFIG)/CONFIG_REQUIRE
include $(E3_REQUIRE_CONFIG)/CONFIG_SHELL
include $(E3_REQUIRE_CONFIG)/CONFIG_E3_PATH
include $(E3_REQUIRE_CONFIG)/CONFIG_E3_MAKEFILE
include $(E3_REQUIRE_CONFIG)/CONFIG_E3_META
include $(E3_REQUIRE_CONFIG)/CONFIG_TEST
include $(E3_REQUIRE_CONFIG)/CONFIG_EXPORT
# Exclude generated EPICS base variables from make vars report.
VARS_EXCLUDES+=BASE_3_14
......
# -*- mode: Makefile;-*-
# Update the module version (for numeric versions) with a build number of 0 if none is specified
E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell [[ "$(E3_MODULE_VERSION)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]] && echo +0)
# Update the module version (for numeric versions) with a revision number of 0 if none is specified
E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell (echo "$(E3_MODULE_VERSION)" | grep -Eq "^[0-9]+\.[0-9]+\.[0-9]+\$$") && echo +0)
E3_MODULES_PATH?=$(E3_SITEMODS_PATH)
E3_REQUIRE_CONFIG:=$(E3_REQUIRE_LOCATION)/configure
include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION
include $(REQUIRE_CONFIG)/CONFIG_REQUIRE
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
include $(E3_REQUIRE_CONFIG)/CONFIG_REQUIRE
include $(E3_REQUIRE_CONFIG)/CONFIG_SHELL
include $(E3_REQUIRE_CONFIG)/CONFIG_CELL
include $(E3_REQUIRE_CONFIG)/CONFIG_PATCH
include $(E3_REQUIRE_CONFIG)/CONFIG_TEST
include $(E3_REQUIRE_CONFIG)/CONFIG_E3_PATH
include $(E3_REQUIRE_CONFIG)/CONFIG_E3_MAKEFILE
include $(E3_REQUIRE_CONFIG)/CONFIG_E3_META
include $(E3_REQUIRE_CONFIG)/CONFIG_DKMS
include $(E3_REQUIRE_CONFIG)/CONFIG_EXPORT
VARS_EXCLUDES+=BASE_3_14
VARS_EXCLUDES+=BASE_3_15
......
# TOP is e3-MODULENAME
ifneq (,$(findstring cell,$(MAKECMDGOALS)))
# Check if non cell targets are being called
NON_CELL_TARGETS=install uninstall build debug rebuild vars
ifneq (,$(filter $(NON_CELL_TARGETS),$(MAKECMDGOALS)))
$(error cell targets cannot be called with non cell targets on the same command line)
endif
## Default is e3-MODULENAME/cellMods
E3_CELL_PATH=$(TOP)/cellMods
##
......
......@@ -2,26 +2,25 @@
#
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS := -C $(E3_MODULE_SRC_PATH)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += -f $(E3_MODULE_MAKEFILE)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += -f ../$(E3_MODULE_MAKEFILE)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += LIBVERSION="$(E3_MODULE_VERSION)"
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)"
ifeq ($(shell git status > /dev/null 2>&1; echo $$?),0)
GIT_REMOTE_NAME := $(shell git remote | head -n 1)
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 config --get remote.$(GIT_REMOTE_NAME).url 2> /dev/null | sed 's%^https://[^@]*@%https://%')"
$(E3_MODULE_NAME)_E3_GIT_DESC="$(shell git rev-parse HEAD 2> /dev/null || echo 'Not a git repository')"
$(E3_MODULE_NAME)_E3_GIT_URL="$(shell git config --get remote.$(GIT_REMOTE_NAME).url 2> /dev/null | sed 's%^https://[^@]*@%https://%')"
else
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_DESC=
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_STATUS=
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_URL=
$(E3_MODULE_NAME)_E3_GIT_DESC=
$(E3_MODULE_NAME)_E3_GIT_URL=
endif
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_DESC=$($(E3_MODULE_NAME)_E3_GIT_DESC)
E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += $(E3_MODULE_NAME)_E3_GIT_URL=$($(E3_MODULE_NAME)_E3_GIT_URL)
E3_MODULE_MAKE_CMDS:=make $(E3_REQUIRE_MAKEFILE_INPUT_OPTIONS)
......@@ -30,3 +29,5 @@ E3_MODULE_MAKE_CMDS:=make $(E3_REQUIRE_MAKEFILE_INPUT_OPTIONS)
VARS_EXCLUDES+=E3_REQUIRE_MAKEFILE_INPUT_OPTIONS
VARS_EXCLUDES+=GIT_REMOTE_NAME
VARS_EXCLUDES+=$(E3_MODULE_NAME)_E3_GIT_URL
VARS_EXCLUDES+=$(E3_MODULE_NAME)_E3_GIT_DESC
EPICSVERSION = $(patsubst base-%,%,$(notdir $(EPICS_BASE)))
COMMON_DIR = $(TOP)/$(E3_MODULE_SRC_PATH)/O.$(EPICSVERSION)_Common
METAFILE = $(E3_MODULE_NAME)_meta.yaml
MODULE_INSTALL_LOCATION = $(E3_MODULES_PATH)/$(E3_MODULE_NAME)/$(E3_MODULE_VERSION)
COMMUNITY_EPICS_MODULES:=$(EPICS_BASE)/epics-modules
M_AUTOSAVE:=$(COMMUNITY_EPICS_MODULES)/autosave
M_DEVLIB2:=$(COMMUNITY_EPICS_MODULES)/devlib2
M_IOCSTATS:=$(COMMUNITY_EPICS_MODULES)/iocStats
M_ASYN:=$(COMMUNITY_EPICS_MODULES)/asyn
M_BUSY:=$(COMMUNITY_EPICS_MODULES)/busy
M_MODBUS:=$(COMMUNITY_EPICS_MODULES)/modbus
M_MRFIOC2:=$(COMMUNITY_EPICS_MODULES)/mrfioc2
M_LUA:=$(COMMUNITY_EPICS_MODULES)/lua
M_IPMICOMM:=$(COMMUNITY_EPICS_MODULES)/ipmiComm
M_STREAM:=$(COMMUNITY_EPICS_MODULES)/stream
M_CALC:=$(COMMUNITY_EPICS_MODULES)/calc
M_MOTOR:=$(COMMUNITY_EPICS_MODULES)/motor
M_SSCAN:=$(COMMUNITY_EPICS_MODULES)/sscan
M_SNCSEQ:=$(COMMUNITY_EPICS_MODULES)/seq
M_IP:=$(COMMUNITY_EPICS_MODULES)/ip
M_IPAC:=$(COMMUNITY_EPICS_MODULES)/ipac
M_ADSUPPORT:=$(COMMUNITY_EPICS_MODULES)/adsupport
M_ADCORE:=$(COMMUNITY_EPICS_MODULES)/adcore
M_OPCUA:=$(COMMUNITY_EPICS_MODULES)/opcua
export M_AUTOSAVE
export M_DEVLIB2
export M_IOCSTATS
export M_ASYN
export M_BUSY
export M_MODBUS
export M_MRFIOC2
export M_LUA
export M_IPMICOMM
export M_STREAM
export M_CALC
export M_MOTOR
export M_SSCAN
export M_SNCSEQ
export M_IP
export M_IPAC
export M_ADSUPPORT
export M_ADCORE
export M_OPCUA
## This is needed since the target "epics" (in configure/RULES_MODULE in most modules)
## uses SUDOBASH to run the make process
SUDOBASH := bash -c
### Exclude the following variables to display
VARS_EXCLUDES+=COMMUNITY_EPICS_MODULES
VARS_EXCLUDES+=M_AUTOSAVE
VARS_EXCLUDES+=M_DEVLIB2
VARS_EXCLUDES+=M_IOCSTATS
VARS_EXCLUDES+=M_ASYN
VARS_EXCLUDES+=M_BUSY
VARS_EXCLUDES+=M_MODBUS
VARS_EXCLUDES+=M_MRFIOC2
VARS_EXCLUDES+=M_LUA
VARS_EXCLUDES+=M_IPMICOMM
VARS_EXCLUDES+=M_STREAM
VARS_EXCLUDES+=M_CALC
VARS_EXCLUDES+=M_MOTOR
VARS_EXCLUDES+=M_SSCAN
VARS_EXCLUDES+=M_SNCSEQ
VARS_EXCLUDES+=M_IP
VARS_EXCLUDES+=M_IPAC
VARS_EXCLUDES+=M_ADSUPPORT
VARS_EXCLUDES+=M_ADCORE
VARS_EXCLUDES+=M_OPCUA
VARS_EXCLUDES+=SUDOBASH
......@@ -10,10 +10,11 @@ EXPORT_VARS+=MSI
EXPORT_VARS+=E3_MODULE_NAME
EXPORT_VARS+=E3_MODULE_VERSION
EXPORT_VARS+=E3_SITEMODS_PATH
EXPORT_VARS+=E3_MODULES_PATH
EXPORT_VARS+=$(filter E3_REQUIRE_%,$(.VARIABLES))
EXPORT_VARS+=QUIET
EXPORT_VARS+=$(filter %_DEP_VERSION,$(.VARIABLES))
EXPORT_VARS+=$(foreach v,$(.VARIABLES),$(if $(findstring _DEP_VERSION,$v),$v))
EXPORT_VARS+=$(filter WITH_%,$(.VARIABLES))
EXPORT_VARS+=$(filter %_EXTERNAL,$(.VARIABLES))
......
# We want to sort these alphabetically to allow for defined ordering of application of patches.
# Note that make 4.3 onwards sorts correctly, but not necessarily the version we use.
PATCHES:=$(shell ls $(TOP)/patch/*.p0.patch 2> /dev/null)
......@@ -10,4 +10,3 @@ E3_REQUIRE_LIB:=$(E3_REQUIRE_LOCATION)/lib
E3_REQUIRE_DB:=$(E3_REQUIRE_LOCATION)/db
E3_REQUIRE_DBD:=$(E3_REQUIRE_LOCATION)/dbd
E3_REQUIRE_INC:=$(E3_REQUIRE_LOCATION)/include
E3_REQUIRE_CONFIG:=$(E3_REQUIRE_LOCATION)/configure
ifdef DEBUG_SHELL
SHELL = /bin/sh -x
else
SHELL = /usr/bin/bash
SHELL = /usr/bin/env bash
endif
VARS_EXCLUDES+=SHELL