Skip to content

Commit

Permalink
Merge pull request #12 from jeonghanlee/pmac
Browse files Browse the repository at this point in the history
Add the PMAC to 1.1.0-rc1
  • Loading branch information
jeonghanlee authored Aug 28, 2024
2 parents e59c496 + 000c9a3 commit fbd31b1
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure/CONFIG_MODS
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
1 change: 1 addition & 0 deletions configure/CONFIG_MODS_DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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

7 changes: 7 additions & 0 deletions configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
35 changes: 34 additions & 1 deletion configure/RULES_MODS_CONFIG
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
92 changes: 92 additions & 0 deletions docs/README.newmodule.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit fbd31b1

Please sign in to comment.