From 9aa695174dff1212041c0909ae371a66b52a3cae Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 17 Aug 2006 10:03:05 +0000 Subject: * Makefile.maint (patch-check): Adapt to work now that the patch modifies more than one file in src/. --- ChangeLog | 3 +++ Makefile.maint | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f807410b..9075a7644 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-08-17 Jim Meyering + * Makefile.maint (patch-check): Adapt to work now that the patch + modifies more than one file in src/. + With this patch, permit building with Solaris cc on Solaris 7. * src/c99-to-c89.diff: Add diffs to convert more c99-isms. This integrates patches from Bruno Haible. diff --git a/Makefile.maint b/Makefile.maint index 1f3cd00bf..17b9d9be9 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -283,15 +283,15 @@ sc_useless_cpp_parens: 1>&2; exit 1; } || : # Ensure that the c99-to-c89 patch applies cleanly. -# For now, it affects only remove.c. Eventually, we'll probably -# have to copy all of src/ before running patch. patch-check: - cp src/remove.c tmp-remove.c - patch -V never --fuzz=0 tmp-remove.c src/c99-to-c89.diff \ + rm -rf src-c89 $@.1 $@.2 + cp -a src src-c89 + (cd src-c89; patch -V never --fuzz=0) < src/c99-to-c89.diff \ > $@.1 2>&1 - sed -n '2p' $@.1 > $@.2 - test -s $@.2 && exit 1 || : - rm -f tmp-remove.c $@.1 $@.2 + grep -v '^patching file ' $@.1 > $@.2 || : + fail=0; test -s $@.2 && fail=1 || : ; \ + rm -rf src-c89 $@.1 $@.2; \ + test $$fail = 0 # Ensure that date's --help output stays in sync with the info # documentation for GNU strftime. The only exception is %N, -- cgit v1.2.3-70-g09d2