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 (28)
Showing
with 80 additions and 173 deletions
......@@ -15,3 +15,4 @@ core.*
*.local
e3.cfg
tools/ess-env.conf
.vscode
......@@ -3,7 +3,7 @@
# However, it also could be overrided in CONFIG_MODULE.local.
# Be careful to touch this file
#
EPICS_MODULE_TAG:=tags/3.2.0
EPICS_MODULE_TAG:=tags/3.3.0
#
EPICS_MODULE_NAME:=${E3_REQUIRE_NAME}
#
......@@ -11,7 +11,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
#
#
#
......
......@@ -2,7 +2,7 @@ EPICS_MODULE_TAG:=master
#
EPICS_MODULE_NAME:=${E3_REQUIRE_NAME}
#
E3_MODULE_SRC_PATH:=$(EPICS_MODULE_NAME)-dev
E3_MODULE_SRC_PATH:=$(EPICS_MODULE_NAME)
E3_MODULE_MAKEFILE:=$(EPICS_MODULE_NAME).Makefile
E3_MODULE_NAME:=$(EPICS_MODULE_NAME)
......
......@@ -12,6 +12,16 @@ 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"
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 '')"
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=
endif
E3_MODULE_MAKE_CMDS:=make $(E3_REQUIRE_MAKEFILE_INPUT_OPTIONS)
......
......@@ -16,6 +16,10 @@ 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
......@@ -34,8 +38,9 @@ export M_SSCAN
export M_SNCSEQ
export M_IP
export M_IPAC
export M_ADSUPPORT
export M_ADCORE
export M_OPCUA
### Exclude the following variables to display
VARS_EXCLUDES+=COMMUNITY_EPICS_MODULES
......@@ -55,3 +60,7 @@ 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
......@@ -2,11 +2,13 @@
# 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"
SUDO_CMD := $(shell which sudo)
ifneq (,$(findstring devtoolset,$(SUDO_CMD)))
# Found, devtoolset-{7,8} has -E option within sudo shell
SUDO = $(SUDO_CMD)
else
SUDO = $(SUDO_CMD) -E
......@@ -15,7 +17,7 @@ SUDOBASH := $(SUDO) bash -c
else
SUDO :=
SUDOBASH = bash -c
endif
endif
# Valid for only Development Mode, because we clone/remove them
......@@ -30,10 +32,8 @@ endif
VARS_EXCLUDES+=SUDO
VARS_EXCLUDES+=SUDOBASH
VARS_EXCLUDES+=SUDO_INFO
VARS_EXCLUDES+=SUDO_CMD
VARS_EXCLUDES+=E3_MODULE_SRC_PATH_INFO
......@@ -16,22 +16,20 @@ endef
define patch_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\
printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
patch -d $(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 < $$i;\
git apply --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i;\
done
endef
define patch_revert_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\
printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
patch -R -d $(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 < $$i;\
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
......@@ -48,3 +46,4 @@ VARS_EXCLUDES+=patch_site
VARS_EXCLUDES+=patch_revert_site
VARS_EXCLUDES+=QUIET
VARS_EXCLUDES+=SHELL
......@@ -5,11 +5,12 @@
.PHONY: help default install uninstall build rebuild clean conf all
default: help
# # help is defined in
# # https://gist.github.com/rcmachado/af3db315e31383502660
help:
$(info --------------------------------------- )
$(info --------------------------------------- )
$(info Available targets)
$(info --------------------------------------- )
$(QUIET) awk '/^[a-zA-Z\-\_0-9]+:/ { \
......@@ -22,20 +23,15 @@ help:
print $$1 "\t" helpMsg; \
} \
{ helpMsg = $$0 }' \
$(MAKEFILE_LIST) | column -ts:
$(MAKEFILE_LIST) | column -ts:
default: help
## Install : $(E3_MODULE_NAME)
install: uninstall requireconf
install: requireconf
$(QUIET) $(SUDOBASH) '$(E3_MODULE_MAKE_CMDS) install'
## Uninstall : $(E3_MODULE_NAME)
uninstall: conf
$(QUIET) $(SUDOBASH) '$(E3_MODULE_MAKE_CMDS) uninstall'
......@@ -50,12 +46,12 @@ build: conf checkout
## Clean, build, and install the EPICS Module : $(E3_MODULE_NAME)
rebuild: clean build install
all: init patch rebuild
## Clean : $(E3_MODULE_NAME)
clean: conf
$(QUIET) $(E3_MODULE_MAKE_CMDS) clean
all: init patch rebuild
## Copy $(E3_MODULE_MAKEFILE) into $(E3_MODULE_SRC_PATH)
conf:
......@@ -66,7 +62,8 @@ conf:
.PHONY: init git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
## Initialize : $(E3_MODULE_SRC_PATH)
init: git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
init: git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
git-submodule-sync:
$(QUIET) git submodule sync
......@@ -75,6 +72,7 @@ git-submodule-sync:
$(E3_MODULE_SRC_PATH):
$(QUIET) $(git_update)
checkout:
cd $(E3_MODULE_SRC_PATH) && git checkout $(EPICS_MODULE_TAG)
......
......@@ -6,7 +6,7 @@ DEP_MODULES:=$(filter %_DEP_VERSION, $(E3_MODULES_VARIABLES))
LEVEL?=2
.PHONY : vars env header vers dep _dep1
.PHONY: env vars header vers dep _dep1
vars: header
$(foreach v, $(E3_MODULES_VARIABLES), $(info $(v) = $($(v)))) @#noop
......@@ -16,12 +16,14 @@ env: vars
header:
$(QUIET)echo ""
$(QUIET)echo "------------------------------------------------------------"
$(QUIET)echo ">>>> Current EPICS and E3 Envrionment Variables <<<<"
$(QUIET)echo ">>>> Current EPICS and E3 Environment Variables <<<<"
$(QUIET)echo "------------------------------------------------------------"
$(QUIET)echo ""
existent:
ifeq (, $(shell which tree))
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/"
else
......@@ -37,8 +39,8 @@ _dep1:
vers:
$(QUIET)echo "EPICS_MODULE_TAG:=$(EPICS_MODULE_TAG)"
$(QUIET)echo "E3_MODULE_VERSION:=$(E3_MODULE_VERSION)"
$(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
......@@ -46,5 +48,5 @@ dep3:
# https://www.cmcrossroads.com/article/printing-value-makefile-variable
print-%:
@echo $* = $($*)
@echo $*\'s origin is $(origin $*)
$(QUIET)echo $* = $($*)
$(QUIET)echo $*\'s origin is $(origin $*)
EPICS_BASE=/epics/base-7.0.4
E3_REQUIRE_NAME:=require
E3_REQUIRE_VERSION:=3.2.0
E3_REQUIRE_VERSION:=3.3.0
# 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.2.0
E3_REQUIRE_VERSION:=3.3.0
# The definitions shown below can also be placed in an untracked RELEASE.local
......
......@@ -2,11 +2,11 @@
include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION
include $(REQUIRE_CONFIG)/CONFIG_REQUIRE
include $(REQUIRE_CONFIG)/CONFIG_SUDO
include $(REQUIRE_CONFIG)/CONFIG_CELL
include $(REQUIRE_CONFIG)/CONFIG_E3_PATH
include $(REQUIRE_CONFIG)/CONFIG_E3_MAKEFILE
include $(REQUIRE_CONFIG)/CONFIG_EPICS
include $(REQUIRE_CONFIG)/CONFIG_SUDO
include $(REQUIRE_CONFIG)/CONFIG_DKMS
include $(REQUIRE_CONFIG)/CONFIG_EXPORT
......
......@@ -12,4 +12,8 @@ E3_CELL_PATH=$(TOP)/cellMods
-include $(TOP)/../CONFIG_CELL.local
-include $(TOP)/configure/CONFIG_CELL.local
E3_MODULES_PATH=$(E3_CELL_PATH)
# If we are doing cellinstall, we should not use SUDO. This is a local install.
SUDO=
endif
......@@ -12,9 +12,21 @@ 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; 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 '')"
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=
endif
E3_MODULE_MAKE_CMDS:=make $(E3_REQUIRE_MAKEFILE_INPUT_OPTIONS)
## the following variables to display
VARS_EXCLUDES+=E3_REQUIRE_MAKEFILE_INPUT_OPTIONS
......@@ -34,7 +34,7 @@ EXPORT_VARS+=E3_MODULES_VENDOR_LIBS_LOCATION
#EXPORT_VARS+=E3_MODULES_INSTALL_LOCATION_INC
#EXPORT_VARS+=E3_MODULES_INSTALL_LOCATION_DB
#EXPORT_VARS+=E3_MODULES_INSTALL_LOCATION_BIN
#EXPORT_VARS+=E3_MODULES_INSTALL_LOCATION_LIB
EXPORT_VARS+=E3_MODULES_INSTALL_LOCATION_LIB
#EXPORT_VARS+=E3_MODULES_INSTALL_LOCATION_LIB_LINK
# It is a bit weird, it would be better to implement within driver.makefile later
......
......@@ -13,7 +13,7 @@ SUDO = $(SUDO_CMD)
else
SUDO = $(SUDO_CMD) -E
endif
SUDOBASH := $(SUDO) bash -c
SUDOBASH = $(SUDO) bash -c
else
SUDO :=
SUDOBASH = bash -c
......
# *** ISSUES
# driver.makefile recursively read all include directories which were installed.
# The only way to exclude header files is....
# The only way to exclude header files is to set $(module)_VERSION to a blank.
ess_VERSION=
iocStats_VERSION=
autosave_VERSION=
caPutLog_VERSION=
asyn_VERSION=
busy_VERSION=
modbus_VERSION=
ipmiComm_VERSION=
sequencer_VERSION=
sscan_VERSION=
std_VERSION=
ip_VERSION=
calc_VERSION=
delaygen_VERSION=
pcre_VERSION=
stream_VERSION=
s7plc_VERSION=
recsync_VERSION=
MCoreUtils_VERSION=
lua_VERSION=
devlib2_VERSION=
mrfioc2_VERSION=
exprtk_VERSION=
motor_VERSION=
ecmc_VERSION=
EthercatMC_VERSION=
ecmctraining_VERSION=
ecmccfg_VERSION=
ads_VERSION=
BeckhoffADS_VERSION=
keypress_VERSION=
sysfs_VERSION=
symbolname_VERSION=
memDisplay_VERSION=
regdev_VERSION=
i2cDev_VERSION=
tosca_VERSION=
tsclib_VERSION=
ifcdaqdrv_VERSION=
ifcdaqdrv2_VERSION=
## The main issue is nds3, it is mandatory to disable it
##
nds3_VERSION=
nds3epics_VERSION=
ifc14edrv_VERSION=
ifcfastint_VERSION=
nds_VERSION=
loki_VERSION=
nds_VERSION=
sis8300drv_VERSION=
sis8300_VERSION=
sis8300llrfdrv_VERSION=
sis8300llrf_VERSION=
ADSupport_VERSION=
ADCore_VERSION=
NDDriverStdArrays_VERSION=
ADSimDetector_VERSION=
ADCSimDetector_VERSION=
ADAndor_VERSION=
ADAndor3_VERSION=
ADPointGrey_VERSION=
ADProsilica_VERSION=
ADPluginEdge_VERSION=
ADPluginCalib_VERSION=
ADGenICam_VERSION=
ADSpinnaker_VERSION=
amcpico8_VERSION=
adpico8_VERSION=
adsis8300_VERSION=
adsis8300bcm_VERSION=
adsis8300bpm_VERSION=
adsis8300fc_VERSION=
pvCommon_VERSION=
pvData_VERSION=
pvAccess_VERSION=
pva2pva_VERSION=
pvDatabase_VERSION=
normativeTypes_VERSION=
pvaClient_VERSION=
opcua_VERSION=
snmp_VERSION=
admisc_VERSION=
ethmod_VERSION=
huginn_VERSION=
rs_nrp_VERSION=
mebtemudaq_VERSION=
# We first collect all installed modules from $(E3_SITEMODS_PATH) ...
$(foreach dir,$(patsubst $(E3_SITEMODS_PATH)/%,%,$(wildcard $(E3_SITEMODS_PATH)/*)),$(eval DECOUPLE_MODULES += $(dir)))
# ... except that we don't want to overwrite the versions from required modules, so keep those.
$(foreach mod,$(filter-out $(REQ),$(DECOUPLE_MODULES)),$(eval $(mod)_VERSION =))
# In addition to decouple the existent e3 module,
# We use this opportunatiy in order to apply global configuration
......
......@@ -16,7 +16,7 @@ endef
define patch_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\
printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
patch -d $(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 < $$i;\
git apply --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i;\
done
endef
......@@ -24,7 +24,7 @@ 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"; \
patch -R -d $(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 < $$i;\
git apply -R --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i;\
done
endef
......
# Extra rules to expand .dbd files. Taken from $(EPICS_BASE)/configure/RULES.Db
#
#
DBDCAT_SOURCES += $(foreach file, $($*_DBD), $(DBDCAT_SOURCE) )
DBDCAT_SOURCE = $(firstword $(wildcard $(file) $(foreach dir, \
$(DBD_SEARCH_DIRS),$(addsuffix /$(file),$(dir)))) \
$(COMMON_DIR)/$(file))
DBDCAT_COMMAND = $(if $(DBDCAT_SOURCES),\
$(CAT) $(DBDCAT_SOURCES) > $(notdir $@),\
@echo "No input files for $(notdir $@)")
INSTALL_DBDS += $(addprefix $(INSTALL_DBD)/,$(DBDCAT))
define DBDCAT_template
$$(COMMON_DIR)/$(1).dbd: ../Makefile $$(foreach file, $$($(1)_DBD),$$(DBDCAT_SOURCE) )
endef
$(foreach name,$(subst .dbd,,$(DBDCAT)), $(eval $(call DBDCAT_template,$(name))))
$(DBDCAT):$(COMMON_DIR)/%.dbd:
$(ECHO) "Creating dbd file $(notdir $@)"
@$(RM) $(notdir $@)
$(DBDCAT_COMMAND)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.dbd:
$(ECHO) "Creating dbd file $(notdir $@)"
@$(RM) $(notdir $@)
$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $($*_DBD)
@$(MV) $(notdir $@) $@
\ No newline at end of file
......@@ -36,6 +36,7 @@ nonexists:
$(QUIET)echo ""
else
devdebug: debug
devbuild: build
devclean: clean
devinstall: install
......