Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESS EPICS Environment
wrappers
e3-require
Commits
11ae3946
Commit
11ae3946
authored
3 years ago
by
Simon Rose
Browse files
Options
Downloads
Patches
Plain Diff
Added check that RULES_SITEMODS is loaded correctly
parent
02dfce1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!42
E3-311: Check that wrappers have the correct RULES file
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure/modules/RULES_CHECKS
+22
-0
22 additions, 0 deletions
configure/modules/RULES_CHECKS
configure/modules/RULES_E3
+10
-20
10 additions, 20 deletions
configure/modules/RULES_E3
with
32 additions
and
20 deletions
configure/modules/RULES_CHECKS
0 → 100644
+
22
−
0
View file @
11ae3946
.PHONY: consistency_checks
consistency_checks: module_name_check sitemods_check loc-check
# Check that the module name satisfies a few conditions before we go on.
module_name_check:
ifneq ($(shell echo $(E3_MODULE_NAME) | grep -q '^[a-z_][a-z0-9_]*$$' ; echo $$?),0)
$(error E3_MODULE_NAME '$(E3_MODULE_NAME)' is not valid. It should consist only of lowercase letters, numbers, and underscores.)
endif
# Check that a module is including RULES_SITEMODS instead of RULES_SITEAPPS or manually including RULES_E3
.PHONY: sitemods_check
sitemods_check:
ifeq ($(filter RULES_SITEMODS,$(notdir $(MAKEFILE_LIST))),)
$(error RULES_E3 should only be loaded from RULES_SITEMODS)
endif
# Check that e3 wrappers are using EPICS_MODULE_TAG to manage local source mode
.PHONU: loc-check
loc-check:
ifneq (,$(findstring -loc,$(E3_MODULE_SRC_PATH)))
$(error DEPRECATED: Local source mode "-loc" has being deprecated. Please comment out the EPICS_MODULE_TAG to use local source mode.)
endif
This diff is collapsed.
Click to expand it.
configure/modules/RULES_E3
+
10
−
20
View file @
11ae3946
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
default: help
default: help
# # help is defined in
# # help is defined in
# # https://gist.github.com/rcmachado/af3db315e31383502660
# # https://gist.github.com/rcmachado/af3db315e31383502660
help:
help:
$(info --------------------------------------- )
$(info --------------------------------------- )
$(info Available targets)
$(info Available targets)
$(info --------------------------------------- )
$(info --------------------------------------- )
$(QUIET) awk '/^[a-zA-Z\-\_0-9]+:/ { \
$(QUIET) awk '/^[a-zA-Z\-\_0-9]+:/ { \
...
@@ -23,7 +23,7 @@ help:
...
@@ -23,7 +23,7 @@ help:
print $$1 "\t" helpMsg; \
print $$1 "\t" helpMsg; \
} \
} \
{ helpMsg = $$0 }' \
{ helpMsg = $$0 }' \
$(MAKEFILE_LIST) | column -ts:
$(MAKEFILE_LIST) | column -ts:
...
@@ -63,7 +63,7 @@ db_internal: conf
...
@@ -63,7 +63,7 @@ db_internal: conf
$(QUIET) $(E3_MODULE_MAKE_CMDS) db_internal
$(QUIET) $(E3_MODULE_MAKE_CMDS) db_internal
## Clean, build, and install the current module
## Clean, build, and install the current module
rebuild: clean build install
rebuild: clean build install
## Deletes temporary build files
## Deletes temporary build files
clean: conf
clean: conf
...
@@ -73,34 +73,25 @@ clean: conf
...
@@ -73,34 +73,25 @@ clean: conf
all: init patch rebuild
all: init patch rebuild
# Copy $(E3_MODULE_MAKEFILE) into $(E3_MODULE_SRC_PATH)
# Copy $(E3_MODULE_MAKEFILE) into $(E3_MODULE_SRC_PATH)
conf: module_name_check
include $(REQUIRE_CONFIG)/RULES_CHECKS
conf: consistency_checks
$(QUIET) install -p -m 644 $(TOP)/$(E3_MODULE_MAKEFILE) $(E3_MODULE_SRC_PATH)/
$(QUIET) install -p -m 644 $(TOP)/$(E3_MODULE_MAKEFILE) $(E3_MODULE_SRC_PATH)/
# We should check that the module name satisfies a few conditions before we go on.
module_name_check:
ifneq ($(shell echo $(E3_MODULE_NAME) | grep -q '^[a-z_][a-z0-9_]*$$' ; echo $$?),0)
$(error E3_MODULE_NAME '$(E3_MODULE_NAME)' is not valid. It should consist only of lowercase letters, numbers, and underscores.)
endif
.PHONY: init git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
.PHONY: init git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
ifeq (,$(strip $(EPICS_MODULE_TAG)))
ifeq (,$(strip $(EPICS_MODULE_TAG)))
E3_LOCAL_SOURCE:=1
E3_LOCAL_SOURCE:=1
endif
endif
ifneq (,$(findstring -loc,$(E3_MODULE_SRC_PATH)))
$(warning DEPRECATED: Local source mode "-loc" is being deprecated. Please comment out the EPICS_MODULE_TAG to use local source mode.)
E3_LOCAL_SOURCE:=1
endif
ifeq ($(E3_LOCAL_SOURCE),1)
ifeq ($(E3_LOCAL_SOURCE),1)
init:
init:
$(QUIET) echo ">> You are in the local source mode."
$(QUIET) echo ">> You are in the local source mode."
$(QUIET) echo ">> Nothing happens."
$(QUIET) echo ">> Nothing happens."
checkout:
checkout:
else
else
## Syncs and checks out the tag $(EPICS_MODULE_TAG) for the submodule
## Syncs and checks out the tag $(EPICS_MODULE_TAG) for the submodule
init: git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
init: git-submodule-sync $(E3_MODULE_SRC_PATH) checkout
...
@@ -108,13 +99,12 @@ git-submodule-sync:
...
@@ -108,13 +99,12 @@ git-submodule-sync:
$(QUIET) git submodule sync
$(QUIET) git submodule sync
$(E3_MODULE_SRC_PATH):
$(E3_MODULE_SRC_PATH):
$(QUIET) $(git_update)
$(QUIET) $(git_update)
checkout:
checkout:
cd $(E3_MODULE_SRC_PATH) && git checkout $(EPICS_MODULE_TAG)
cd $(E3_MODULE_SRC_PATH) && git checkout $(EPICS_MODULE_TAG)
endif
endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment