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

Fixing patch behavior to allow renaming files using 'git apply' instead of 'patch'

parent 1455265d
No related branches found
No related tags found
No related merge requests found
...@@ -16,22 +16,20 @@ endef ...@@ -16,22 +16,20 @@ endef
define patch_site define patch_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\ 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"; \ 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 done
endef endef
define patch_revert_site define patch_revert_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\ 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"; \ 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 done
endef endef
ifndef VERBOSE ifndef VERBOSE
QUIET := @ QUIET := @
endif endif
...@@ -48,3 +46,4 @@ VARS_EXCLUDES+=patch_site ...@@ -48,3 +46,4 @@ VARS_EXCLUDES+=patch_site
VARS_EXCLUDES+=patch_revert_site VARS_EXCLUDES+=patch_revert_site
VARS_EXCLUDES+=QUIET VARS_EXCLUDES+=QUIET
VARS_EXCLUDES+=SHELL VARS_EXCLUDES+=SHELL
...@@ -16,7 +16,7 @@ endef ...@@ -16,7 +16,7 @@ endef
define patch_site define patch_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\ 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"; \ 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 done
endef endef
...@@ -24,7 +24,7 @@ endef ...@@ -24,7 +24,7 @@ endef
define patch_revert_site define patch_revert_site
for i in $(wildcard $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch); do\ 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"; \ 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 done
endef endef
......
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