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.
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,