summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-08-17 10:03:05 +0000
committerJim Meyering <jim@meyering.net>2006-08-17 10:03:05 +0000
commit9aa695174dff1212041c0909ae371a66b52a3cae (patch)
treea1652a1548cbbe02b09ccca0bc254eebb31debc4
parenta771318b59fdd79323c9b3a0c12764268a0e42c9 (diff)
downloadcoreutils-9aa695174dff1212041c0909ae371a66b52a3cae.tar.xz
* Makefile.maint (patch-check): Adapt to work now that the patch
modifies more than one file in src/.
-rw-r--r--ChangeLog3
-rw-r--r--Makefile.maint14
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 <jim@meyering.net>
+ * 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,