summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-06-03 10:33:17 +0200
committerJim Meyering <meyering@redhat.com>2008-06-03 10:33:17 +0200
commit4b9261294459979686940563334111311a5e57d7 (patch)
treea120d8d1b103d73a6dcfbbbf3a97a7323215222c /maint.mk
parent896b672499d6a31a6caf85411bcbdde6edc57668 (diff)
downloadcoreutils-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.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/maint.mk b/maint.mk
index f4b0bae32..ee0e28916 100644
--- a/maint.mk
+++ b/maint.mk
@@ -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'; \