Kaydet (Commit) 1ddf8a3a authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Andras Timar

Add targets 'patch' and 'unpatch' to assist in handling of temporary patches

'make patch' applies any patch file in the uncommitted-patches
directory, if it exists. These files should be as produced by git
format-patch. 'make unpatch' correspondingly undos what 'make patch'
did. None of this is done using git, that is the very point.

Change-Id: I348d96be54bc8e544e833206c922cb4bdcbabc4c

Conflicts:
	Makefile.in
üst fa12e107
......@@ -9,7 +9,7 @@
gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck
.PHONY : all bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
.PHONY : all bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS) patch unpatch
MAKECMDGOALS?=all
build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
......@@ -374,4 +374,22 @@ $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide))))
endif # MAKE_RESTARTS
patch:
test -d uncommitted-patches || exit 0
for F in uncommitted-patches/*.patch; do \
patch --dry-run -p1 <$$F || exit 1; \
done
mkdir -p uncommitted-patches.applied
for F in uncommitted-patches/*.patch; do \
patch -p1 <$$F || exit 1; \
cp $$F uncommitted-patches.applied; \
done
unpatch:
test -d uncommitted-patches.applied || exit 0
for F in uncommitted-patches.applied/*.patch; do \
patch -R -p1 <$$F || exit 1; \
rm $$F; \
done
# vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment