diff options
Diffstat (limited to 'Makefile.maint')
-rw-r--r-- | Makefile.maint | 14 |
1 files changed, 7 insertions, 7 deletions
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, |