Skip to content
Snippets Groups Projects
Commit 2464032a authored by Simon Rose's avatar Simon Rose
Browse files

Merge branch 'E3-385' into 'master'

E3 385: Update patching mechanism

See merge request e3/e3-require!32
parents 84847f6e 9ec850d6
No related branches found
No related tags found
No related merge requests found
# -*- mode: Makefile;-*- # -*- mode: Makefile;-*-
# Update the module version (for numeric versions) with a build number of 0 if none is specified # Update the module version (for numeric versions) with a build number of 0 if none is specified
E3_MODULE_VERSION_ORIG:=$(E3_MODULE_VERSION)
E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell [[ "$(E3_MODULE_VERSION)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]] && echo +0) E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell [[ "$(E3_MODULE_VERSION)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]] && echo +0)
include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION
......
...@@ -15,7 +15,7 @@ git submodule update --remote --merge $@/ ...@@ -15,7 +15,7 @@ git submodule update --remote --merge $@/
endef endef
define patch_site define patch_site
patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION_ORIG)-*.p0.patch 2> /dev/null); \ patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)/*.p0.patch 2> /dev/null); \
if [ -n "$$patches" ]; then \ if [ -n "$$patches" ]; then \
for i in $$patches; do \ for i in $$patches; do \
printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \ printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
...@@ -27,7 +27,7 @@ fi ...@@ -27,7 +27,7 @@ fi
endef endef
define patch_revert_site define patch_revert_site
patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch 2> /dev/null); \ patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)/*.p0.patch 2> /dev/null); \
if [ -n "$$patches" ]; then \ if [ -n "$$patches" ]; then \
for i in $$patches; do\ for i in $$patches; do\
printf "\nReverting applied patch %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \ printf "\nReverting applied patch %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
......
.PHONY: patch patchrevert .PHONY: patch patchrevert
.PHONY: check_for_old_patches
check_for_old_patches:
$(if $(wildcard $(TOP)/patch/Site/$(patsubst %+0,%,$(E3_MODULE_VERSION))*.p0.patch),$(warning Warning: old-style patches detected. Please move them to patch/Site/$$E3_MODULE_VERSION/.))
## Apply Patch Files ## Apply Patch Files
patch: patch: check_for_old_patches
$(QUIET) $(call patch_site) $(QUIET) $(call patch_site)
## Revert Patch Files ## Revert Patch Files
patchrevert: patchrevert: check_for_old_patches
$(QUIET) $(call patch_revert_site) $(QUIET) $(call patch_revert_site)
diff --git App/tools/expandDBD.tcl App/tools/expandDBD.tcl
index 0539876..747208b 100755
--- App/tools/expandDBD.tcl
+++ App/tools/expandDBD.tcl
@@ -1,4 +1,6 @@
-#!/usr/bin/tclsh
+#!/bin/sh
+# the next line restarts using tclsh \
+exec tclsh "$0" "$@"
package require Tclx
diff --git App/tools/expandDBD.tcl App/tools/expandDBD.tcl
index 0539876..747208b 100755
--- App/tools/expandDBD.tcl
+++ App/tools/expandDBD.tcl
@@ -1,4 +1,6 @@
-#!/usr/bin/tclsh
+#!/bin/sh
+# the next line restarts using tclsh \
+exec tclsh "$0" "$@"
package require Tclx
# what_ever_filename.p0.patch
Generic Description.....
* created by Jeong Han Lee, han.lee@esss.se
* related URL or reference https://github.com/icshwi
* Tuesday, February 13 13:24:57 CET 2018
# Site Specific EPICS Module Patch Files
## Changes
The changes were tested in local environemnt, and commits to the forked repository and do pull request to the epics community module repository.
* Check the original HASH, and your own master
* feb8856 : The original HASH
* master : Changed
## How to create a p0 patch file between commits
* Show what the difference between commits
* Create p0 patch
```
$git diff feb8856 master --no-prefix > ../patch/Site/what_ever_filename.p0.patch
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment