Mercurial > hg > octave-lyh > gnulib-hg
changeset 17005:f471a51b1369
maint.mk: new rule: refresh-gnulib-patches
I noticed that 8 of coreutils' 9 gl/**/*.diff files was stale.
Use this rule to refresh them.
* top/maint.mk (refresh-gnulib-patches): New rule.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Fri, 27 Jul 2012 12:12:42 +0200 |
parents | 1a403c75d360 |
children | f2da6ed0256a |
files | ChangeLog top/maint.mk |
diffstat | 2 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-07-27 Jim Meyering <meyering@redhat.com> + + maint.mk: new rule: refresh-gnulib-patches + I noticed that 8 of coreutils' 9 gl/**/*.diff files was stale. + Use this rule to refresh them. + * top/maint.mk (refresh-gnulib-patches): New rule. + 2012-07-24 Bruno Haible <bruno@clisp.org> gnulib-tool: Fix handling of inctests variable.
--- a/top/maint.mk +++ b/top/maint.mk @@ -1429,6 +1429,31 @@ coverage: init-coverage build-coverage gen-coverage +# Some projects carry local adjustments for gnulib modules via patches in +# a gnulib patch directory whose default name is gl/ (defined in bootstrap +# via local_gl_dir=gl). Those patches become stale as the originals evolve +# in gnulib. Use this rule to refresh any stale patches. It applies each +# patch to the original in $(gnulib_dir) and uses the temporary result to +# generate a fuzz-free .diff file. If you customize the name of your local +# gnulib patch directory via bootstrap.conf, this rule detects that name. +# Run this from a non-VPATH (i.e., srcdir) build directory. +.PHONY: refresh-gnulib-patches +refresh-gnulib-patches: + gl=gl; \ + if test -f bootstrap.conf; then \ + t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;' \ + -e 'END{defined $$d and print $$d}' bootstrap.conf); \ + test -n "$$t" && gl=$$t; \ + fi; \ + for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \ + b=$$(printf %s "$$diff"|sed 's/\.diff$$//'); \ + VERSION_CONTROL=none \ + patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \ + ( cd $(gnulib_dir) || exit 1; \ + git diff "$$b" > "../$$gl/$$diff"; \ + git checkout $$b ) || exit 1; \ + done + # Update gettext files. PACKAGE ?= $(shell basename $(PWD)) PO_DOMAIN ?= $(PACKAGE)