diff --git a/configure/CONFIG_MODS b/configure/CONFIG_MODS index 19042f1..07b7836 100644 --- a/configure/CONFIG_MODS +++ b/configure/CONFIG_MODS @@ -39,6 +39,7 @@ SRC_GITURL_SNMP:=$(strip $(SRC_URL_JEONGHANLEE))/$(strip $(SRC_NAME_SNMP)) SRC_GITURL_MOTORSIM:=$(strip $(SRC_URL_MOTOR))/$(strip $(SRC_NAME_MOTORSIM)) SRC_GITURL_PYDEVSUP:=$(strip $(SRC_URL_MD))/$(strip $(SRC_NAME_PYDEVSUP)) SRC_GITURL_PVXS:=$(strip $(SRC_URL_MD))/$(strip $(SRC_NAME_PVXS)) +SRC_GITURL_PMAC:=$(strip $(SRC_URL_PMAC))/$(strip $(SRC_NAME_PMAC)) # MODS_INSTALL_LOCATIONS_VARS:=$(filter-out %_EPICS %_ %_BASE %_MODS, $(filter INSTALL_LOCATION_%, $(.VARIABLES))) MODS_INSTALL_LOCATIONS:=$(foreach v, $(MODS_INSTALL_LOCATIONS_VARS), $($(v))) diff --git a/configure/CONFIG_MODS_DEPS b/configure/CONFIG_MODS_DEPS index daa96c2..4fa50b7 100644 --- a/configure/CONFIG_MODS_DEPS +++ b/configure/CONFIG_MODS_DEPS @@ -47,4 +47,5 @@ mca_DEPS:=null.base build.asyn build.calc build.sscan build.busy build.scaler bu measComp_DEPS:=null.base build.asyn build.calc build.sscan build.busy build.scaler build.sequencer build.autosave build.std build.mca motor_DEPS:=null.base build.sequencer build.busy build.lua build.modbus motorMotorSim_DEPS:=null.base build.motor +pmac_DEPS:=null.base build.asyn build.calc build.motor build.busy diff --git a/configure/RELEASE b/configure/RELEASE index 574b9b2..4bc8202 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -189,6 +189,13 @@ SRC_NAME_PVXS:=pvxs SRC_TAG_PVXS:=tags/1.3.1 SRC_VER_PVXS:=1.3.1 # +# https://github.com/DiamondLightSource/pmac +# 2024-07-15 dls-master +SRC_URL_PMAC:=https://github.com/DiamondLightSource +SRC_NAME_PMAC:=pmac +SRC_TAG_PMAC:=3d2e73f +SRC_VER_PMAC:=3d2e73fi +# -include $(TOP)/../RELEASE.local -include $(TOP)/configure/RELEASE.local # diff --git a/configure/RULES_MODS_CONFIG b/configure/RULES_MODS_CONFIG index f4614ab..fa765eb 100644 --- a/configure/RULES_MODS_CONFIG +++ b/configure/RULES_MODS_CONFIG @@ -14,7 +14,7 @@ MODS_ZERO_SHOW:=$(addsuffix .show, $(MODS_ZERO_VARS)) MODS_LIBERA_VARS:=conf.iocStats conf.retools conf.caPutLog conf.recsync conf.autosave conf.sncseq conf.sscan conf.pcas conf.asyn.libera MODS_LIBERA_SHOW:=$(addsuffix .show, $(MODS_LIBERA_VARS)) -MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca conf.measComp conf.motor conf.motorMotorSim +MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca conf.measComp conf.motor conf.motorMotorSim conf.pmac MODS_ONE_SHOW:=$(addsuffix .show, $(MODS_ONE_VARS)) .PHONY: conf.release.modules conf.release.modules.show update.pvxs @@ -348,3 +348,36 @@ conf.motorMotorSim: conf.motorMotorSim.show: conf.release.modules.show cat -b $(TOP)/$(SRC_PATH_MOTORSIM)/configure/CONFIG_SITE cat -b $(TOP)/$(SRC_PATH_MOTORSIM)/configure/RELEASE + + +# Somehow, pkg-config libssh2 --libs does not return its -L (libpath), +# So we need to find a hack to switch two different paths among Redhat variants and Debian based one. +# For the static link of powerPmacAsynPortSrc +# We don't need to define SSH_INCLUDE, since it is in the default folder +conf.pmac: + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE.linux-x86_64.Common + @echo "INSTALL_LOCATION:=$(INSTALL_LOCATION_PMAC)" > $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "CHECK_RELEASE = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "BUILD_IOCS = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USE_GRAPHICSMAGICK = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH = YES" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE +ifneq ($(wildcard /usr/lib/x86_64-linux-gnu/.*),) + @echo "SSH_LIB = /usr/lib/x86_64-linux-gnu" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE +else + @echo "SSH_LIB = /usr/lib64" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE +endif + @echo "SSH_INCLUDE =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "WITH_BOOST = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USR_LDFLAGS += -lssh2 -lssl -ldl -pthread -lcrypto -ldl -pthread -lz" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "PROD_LDFLAGS += -lssh2 -lssl -ldl -pthread -lcrypto -ldl -pthread -lz" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local.linux-x86_64 + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.linux-x86_64.Common + @echo "ASYN=$(INSTALL_LOCATION_ASYN)" > $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "BUSY=$(INSTALL_LOCATION_BUSY)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "CALC=$(INSTALL_LOCATION_CALC)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "MOTOR=$(INSTALL_LOCATION_MOTOR)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "EPICS_BASE:=$(INSTALL_LOCATION_BASE)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + +conf.pmac.show: conf.release.modules.show + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local diff --git a/docs/README.newmodule.md b/docs/README.newmodule.md new file mode 100644 index 0000000..39fa51a --- /dev/null +++ b/docs/README.newmodule.md @@ -0,0 +1,92 @@ +# New Module + +I would like to add the following repository for the production environemnt. + +https://github.com/DiamondLightSource/pmac + +## + +The commit is July 15, 2024 at the `dls-master` branch +In `configure/RELEASE` + + +```bash +# https://github.com/DiamondLightSource/pmac +# 2024-07-15 dls-master +SRC_URL_PMAC:=https://github.com/DiamondLightSource/pmac¶ +SRC_NAME_PMAC:=pmac +SRC_TAG_PMAC:=3d2e73f +SRC_VER_PMAC:=3d2e73f +``` + + Edit `configure/CONFIG_MODS` if the module URL is not `github/epics-modules` + +``` +SRC_GITURL_PMAC:=$(strip $(SRC_URL_PMAC))/$(strip $(SRC_NAME_PMAC)) +``` + + Edit `configure/CONFIG_MODS_DEPS` + +```bash +pmac_DEPS:=null.base build.asyn build.calc build.motor build.busy¶ +``` + + + +* Edit `configure/RULES_MODS_CONFIG` + +Please consult `XXXApp/src/Makefile` to check its real dependency and add the proper configuration name in one of the following variables. + + - `MOD_ZERO_VARS` : This module has only EPICS base dependency. + - `MOD_ONE_VARS` : This module has multiple EPICS modules dependencies. + +pmac has asyn, calc, motor, busy dependencies. So add conf.pmc into MODS_ONE_VARS + +```bash +MODS_ONE_VARS:=conf.calc conf.asyn conf.modbus conf.lua conf.std conf.StreamDevice conf.busy conf.scaler conf.mca conf.pmac +``` +Then, add `conf.pmac` and `conf.pmac.show` as follows + +```bash +conf.pmac: + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE.linux-x86_64.Common + @echo "INSTALL_LOCATION:=$(INSTALL_LOCATION_PMAC)" > $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "CHECK_RELEASE = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "BUILD_IOCS = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USE_GRAPHICSMAGICK = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH_LIB =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "SSH_INCLUDE =" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "WITH_BOOST = NO" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @echo "USR_LDFLAGS += -lssh2" >> $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local.linux-x86_64 + @-rm -f $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.linux-x86_64.Common + @echo "ASYN=$(INSTALL_LOCATION_ASYN)" > $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "BUSY=$(INSTALL_LOCATION_BUSY)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "CALC=$(INSTALL_LOCATION_CALC)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "MOTOR=$(INSTALL_LOCATION_MOTOR)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + @echo "EPICS_BASE:=$(INSTALL_LOCATION_BASE)" >> $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local + +conf.pmac.show: conf.release.modules.show + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/CONFIG_SITE + cat -b $(TOP)/$(SRC_PATH_PMAC)/configure/RELEASE.local +``` + +* Commands + +```bash +make reconf.modules +make init.modules +make conf.pmac +make conf.pmac.show + 1 EPICS_BASE:=/home/jeonglee/epics/debian/10/e881cb1/base + 2 SUPPORT= + 1 CHECK_RELEASE = NO + 1 INSTALL_LOCATION:=/home/jeonglee/epics/debian/10/e881cb1/modules/scaler-c7c0bf9 + 1 ASYN=/home/jeonglee/epics/debian/10/e881cb1/modules/asyn-4.41 + 2 AUTOSAVE=/home/jeonglee/epics/debian/10/e881cb1/modules/autosave-5.10.2 +make build.pmac +make install.pmac +make symlinks +``` +