diff options
author | Jim Meyering <meyering@redhat.com> | 2008-06-03 10:33:17 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-06-03 10:33:17 +0200 |
commit | 4b9261294459979686940563334111311a5e57d7 (patch) | |
tree | a120d8d1b103d73a6dcfbbbf3a97a7323215222c /maint.mk | |
parent | 896b672499d6a31a6caf85411bcbdde6edc57668 (diff) | |
download | coreutils-4b9261294459979686940563334111311a5e57d7.tar.xz |
adjust c99-to-c89 patch as well as the code to generate it
* maint.mk (patch-check) [REGEN_PATCH]: Eliminate date-related
differences in generated diffs.
* src/c99-to-c89.diff: Adjust offsets.
Diffstat (limited to 'maint.mk')
-rw-r--r-- | maint.mk | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -456,15 +456,18 @@ update-NEWS-hash: NEWS perl -pi -e 's/^(old_NEWS_hash = ).*/$${1}'"$(NEWS_hash)/" \ $(srcdir)/cfg.mk +epoch_date = 1970-01-01 00:00:00.000000000 +0000 # Ensure that the c99-to-c89 patch applies cleanly. patch-check: rm -rf src-c89 $@.1 $@.2 cp -a src src-c89 (cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \ > $@.1 2>&1 - if test "$$REGEN_PATCH" = yes; then \ + if test "$(REGEN_PATCH)" = yes; then \ diff -upr src src-c89 | sed 's,src-c89/,src/,' \ - | grep -v '^Only in' > new-diff || : ; fi + | grep -vE '^(Only in|File )' \ + | perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/' \ + > new-diff || : ; fi grep -v '^patching file ' $@.1 > $@.2 || : msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \ rm -f src-c89/*.o || msg='rm failed'; \ |