Add or bump a module
A module enters the Experimental Physics and Industrial Control System
(EPICS) environment through a pin in configure/RELEASE, and make derives its
clone, configuration, build, and install targets from that pin. This page
changes the pin of one module, or adds a module, and builds only that module.
The module set explains how the declarations
fit together. Run every command from the top of the EPICS-env checkout. The example bumps
caPutLog from dafb0b2 to 6f9eb3f.
Prerequisites
- EPICS base is installed at the install location; see Build and install the environment.
make initandmake confhave run in the checkout, so the source trees of the module’s dependencies and the top-levelRELEASE.localexist.- The module key, the module name, and the current pin of an existing module are listed in Module pins and dependencies.
-
Optional: To list the modules whose pin differs from the latest upstream tag or commit, survey the pins without changing any file:
tools/update-release.bash checkThe survey reads
configure/RELEASE, not the.localoverride files. The entry forcaPutLogreads:CAPUTLOG : UPDATE AVAILABLE Current: dafb0b2 Latest: 6f9eb3f Date: 2026-02-26 >> Diff Link: https://github.com/epics-modules/caPutLog/compare/dafb0b2...6f9eb3fThe command exits 0 when every pin was surveyed, 1 when a repository was unreachable or a pin has no repository Uniform Resource Locator (URL) comment, and 2 when a repository has no release tag.
-
Set the pin of the module.
a. To bump a module, set
SRC_TAG_<module_key>to the tag or commit to check out andSRC_VER_<module_key>to the version that names the install directory. Inconfigure/RELEASEthe change becomes the pin of the release; inconfigure/RELEASE.localit applies to this checkout only, because make readsconfigure/RELEASE.localafterconfigure/RELEASE:SRC_TAG_CAPUTLOG:=6f9eb3f SRC_VER_CAPUTLOG:=6f9eb3fA tag pin takes the form
tags/<tag>, such astags/R4-46, or the bare tag name, such as2-7-9forpmac.b. To add a module, add a block before the two
-includelines at the end ofconfigure/RELEASE. The comment line holds the repository URL thattools/update-release.bashsurveys:## https://github.com/<organization>/<module> SRC_NAME_<module_key>:=<module> SRC_TAG_<module_key>:=<tag_or_commit> SRC_VER_<module_key>:=<version><organization>is the GitHub organization or user that hosts the repository, such asepics-modules.<module_key>is an upper-case key of your choice, such asCAPUTLOG.<module>is the repository name; the source directory is<module>-src, and the module targets use<module>, such asbuild.<module>.<tag_or_commit>and<version>are the pin and the version as in sub-step a. -
If you are adding a module that is not hosted under
https://github.com/epics-modules, set its repository URL inconfigure/CONFIG_MODS, next to the otherSRC_GITURL_*lines:SRC_GITURL_<module_key>:=$(strip $(SRC_URL_<org_key>))/$(strip $(SRC_NAME_<module_key>))<org_key>is the upper-case key of an organization URL thatconfigure/RELEASEdefines. Most of these URLs are at the top of the file, such asSRC_URL_MD; a few are in the block of their module, such asSRC_URL_PMAC. When none matches, add a line such asSRC_URL_<org_key>:=https://github.com/<organization>to the block of the module. -
If you are adding a module, declare its build prerequisites and its configuration type. In
configure/CONFIG_MODS_DEPS, declare the prerequisites:<module>_DEPS:=null.base build.<dependency><module>_DEPSstarts withnull.baseand lists, in build order, thebuild.<dependency>target of each module that must be built first; a module that needs only EPICS base usesnull.basealone. Inconfigure/CONFIG_MODS_TYPES, declare the configuration type:<module>_CONF_TYPE:=custom<module>_CONF_TYPEisautoorcustom. Make stops every command withMissing <module>_CONF_TYPE declarationuntil this line exists. -
If you are adding a module, provide its configuration target.
a. For an
automodule, make generatesconf.<module>, which writesINSTALL_LOCATIONinto the module’sconfigure/CONFIG_SITE.local. Chooseautoonly when the module’s ownconfigure/CONFIG_SITEreads$(TOP)/configure/CONFIG_SITE.localand the module needs no dependency path; otherwise the module installs into its source tree. Three optional variables inconfigure/CONFIG_MODS_DEPSextend the generated target, as foriocStats,retools, andMCoreUtils:iocStats_CONF_RELEASE_LINES:=MAKE_TEST_IOC_APP=NO retools_CONF_SITE_LINES:=USR_CPPFLAGS += -DUSE_TYPED_RSET MCoreUtils_CONF_PLATFORM:=LinuxThe target writes
<module>_CONF_RELEASE_LINESinto the module’sconfigure/RELEASE.localand appends<module>_CONF_SITE_LINESto itsconfigure/CONFIG_SITE.local. When<module>_CONF_PLATFORMis set, the target acts only on a host whoseuname -soutput matches it.b. For a
custommodule, addconf.<module>andconf.<module>.showtoconfigure/RULES_MODS_CONFIG. The rule writes each dependency path from itsINSTALL_LOCATION_<module_key>variable, asconf.modbusdoes:conf.modbus: @echo "ASYN=$(INSTALL_LOCATION_ASYN)" > $(TOP)/$(SRC_PATH_MODBUS)/configure/RELEASE.local @echo "INSTALL_LOCATION:=$(INSTALL_LOCATION_MODBUS)" > $(TOP)/$(SRC_PATH_MODBUS)/configure/CONFIG_SITE.local conf.modbus.show: conf.release.modules.show cat -b $(TOP)/$(SRC_PATH_MODBUS)/configure/RELEASE.local cat -b $(TOP)/$(SRC_PATH_MODBUS)/configure/CONFIG_SITE.localAlso list
conf.<module>.showinQUERY_SHOW_TARGETSinconfigure/CONFIG_GOALS, so the target takes the query-only path.c. For a
custommodule, appendconf.<module>toMODS_ZERO_CUSTOM_VARSwhen the module needs only EPICS base, or toMODS_ONE_VARSwhen it needs other modules, inconfigure/RULES_MODS_CONFIG. Do not editMODS_ZERO_VARS: make builds it fromMODS_ZERO_CUSTOM_VARSand the generatedautotargets.These lists group configuration targets;
<module>_DEPScontrols build order. QPC and sscan belong toMODS_ONE_VARSbecause their effective configuration namesASYNandSNCSEQ, respectively. -
If another module’s configuration names the added module by its key, map the key to the module name in
configure/CONFIG_MODS_AUDIT, so the dependency audit resolves it:AUDIT_MODULE_ALIASES+=<module_key>=<module> -
Optional: To force regeneration of
configure/MODULESGEN.mk, which holds each module’s repository URL, source directory, and install directory, run:make reconf.modulesMake regenerates this file automatically when
configure/RELEASEorconfigure/CONFIG_SITEchanges, or when the effective module triples change. Creating, editing, or removing a pin override inconfigure/RELEASE.localor../RELEASE.localtakes effect on the next action invocation. Variable queries use the effective pins immediately without generating or rewriting the cache. This optional command removes the generated files underconfigure/and regeneratesMODULESGEN.mkfrom the current settings. -
Print the install directory of the module:
make print-INSTALL_LOCATION_CAPUTLOGThe last path component carries the version from step 2:
<install_location>/1.4.0/debian-13/7.0.10/modules/caPutLog-6f9eb3f<install_location>is theINSTALL_LOCATIONof the checkout. -
If you are bumping a module, remove its source tree, because the clone target skips a directory that exists:
rm -rf caPutLog-src -
Clone the module and check out its pin:
make CAPUTLOGThe target is the module key. The last line of the output names the checked-out commit:
HEAD is now at 6f9eb3f Bumped compatibility to EPICS 3.15.9 in the documentation -
Write the configuration files of the module:
make conf.caPutLogA few configuration targets differ from the module name, such as
conf.sncseqforsequencer; see Source configuration targets. -
Check the declared dependencies against the module source:
make check.module-deps MODULE=caPutLogThe report ends with the findings of the module:
Module: caPutLog Declared: null.base Observed: Findings: noneThe command exits 2 when the source uses a module that
<module>_DEPSdoes not declare, or a token that no module name or alias matches. -
Build and install the module:
make build.caPutLogThe target builds the modules in
<module>_DEPSfirst, and each module installs as it builds. -
Point the unversioned link of the module at the install directory from step 8:
make symlink.caPutLog -
If other modules list
build.<module>in their_DEPS, reconfigure and rebuild them, because their configuration names the install directory of the pin they were built with; see Build and install the environment.
Verification
List the installed module directory:
make ls.INSTALL_LOCATION_CAPUTLOG
The directory holds the installed module:
configure
dbd
include
lib
Show the link in the modules directory:
make ls.INSTALL_LOCATION_MODS LSOPTS=-l | grep caPutLog
<user> is your user and group. The link points at the directory of the pin
from step 2. A bump does not
remove the install directory of the replaced pin, so caPutLog-dafb0b2
stays in place:
lrwxrwxrwx 1 <user> <user> 18 Sep 26 23:49 caPutLog -> ./caPutLog-6f9eb3f
drwxrwxr-x 6 <user> <user> 120 Sep 26 23:49 caPutLog-6f9eb3f
drwxrwxr-x 6 <user> <user> 120 Sep 26 22:48 caPutLog-dafb0b2