]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* Makefile.maint (patch-check): Adapt to work now that the patch
authorJim Meyering <jim@meyering.net>
Thu, 17 Aug 2006 10:03:05 +0000 (10:03 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 17 Aug 2006 10:03:05 +0000 (10:03 +0000)
modifies more than one file in src/.

ChangeLog
Makefile.maint

index 2f807410b34c0c41a35a93697462fb270f07da3c..9075a7644e16f7135af39a572a34573175a6ac44 100644 (file)
--- 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.
index 1f3cd00bfa9e82ca4f0d297a1f7898b2bd7b0731..17b9d9be994f19ecee0b19c1d6b8f4d8ac6d0f73 100644 (file)
@@ -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,