Makefile.in |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 1ddf8a3a2c1edaf17fadd26201c1bc6280ee793d
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Sep 23 21:45:32 2014 +0300

    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

diff --git a/Makefile.in b/Makefile.in
index 914699e..0cbd026 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to