-
Simon Rose authoredSimon Rose authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
DEFINES_FT 1.31 KiB
# Keep always the module up-to-date
define git_update =
git submodule deinit -f $@/
rm -rf $(TOP)/.git/modules/$@
git submodule init $@/
git submodule update --init --recursive $@/.
git submodule update --remote --merge $@/
endef
define git_module_init_update =
git submodule update --init --recursive $@/.
git submodule update --remote --merge $@/
endef
define patch_site
patches=$$(ls $(TOP)/patch/*.p0.patch 2> /dev/null); \
if [ -n "$$patches" ]; then \
for i in $$patches; do \
printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
git apply --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i; \
done; \
else \
echo ">>> No patches to apply" >&2; \
fi
endef
define patch_revert_site
patches=$$(ls $(TOP)/patch/*.p0.patch 2> /dev/null); \
if [ -n "$$patches" ]; then \
for i in $$patches; do\
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 \
else \
echo ">>> No patches to revert" >&2; \
fi
endef
ifndef VERBOSE
QUIET := @
endif
### Exclude the following variables to display
VARS_EXCLUDES+=git_update
VARS_EXCLUDES+=git_module_init_update
VARS_EXCLUDES+=patch_site
VARS_EXCLUDES+=patch_revert_site
VARS_EXCLUDES+=QUIET
VARS_EXCLUDES+=SHELL