summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-09-12 21:23:43 +0200
committerJim Meyering <meyering@redhat.com>2008-09-14 17:42:48 +0200
commite10e4b669715aa2ca8059987c9ae08b2a1ad7a14 (patch)
tree9d3c779eff3730ff5c32417c064d7dbcffaefe85 /maint.mk
parentcddcb5d468e5aae408cea018002e2fdfd3b983a8 (diff)
downloadcoreutils-e10e4b669715aa2ca8059987c9ae08b2a1ad7a14.tar.xz
various VPATH-related fixes
* maint.mk (VC_LIST): Prepend '$(srcdir)/'. (patch-check): Fix to make it work with a VPATH build. * src/Makefile.am (sc_tight_scope): Likewise. * man/Makefile.am (.x.1): Do not make outputs unwritable.
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/maint.mk b/maint.mk
index 492fb0f60..f3bbf9afa 100644
--- a/maint.mk
+++ b/maint.mk
@@ -31,7 +31,7 @@ GIT = git
VC = $(GIT)
VC-tag = git tag -s -m '$(VERSION)'
-VC_LIST = build-aux/vc-list-files
+VC_LIST = $(srcdir)/build-aux/vc-list-files
VC_LIST_EXCEPT = \
$(VC_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
@@ -507,11 +507,16 @@ epoch_date = 1970-01-01 00:00:00.000000000 +0000
# Ensure that the c99-to-c89 patch applies cleanly.
patch-check:
rm -rf src-c89 $@.1 $@.2
- cp -a src src-c89
- (cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \
+ cp -a $(srcdir)/src src-c89
+ if test "x$(srcdir)" != x.; then \
+ cp -a src/* src-c89; \
+ dotfiles=`ls src/.[!.]* 2>/dev/null`; \
+ test -z "$$dotfiles" || cp -a src/.[!.]* src-c89; \
+ fi
+ (cd src-c89; patch -p1 -V never --fuzz=0) < $(srcdir)/src/c99-to-c89.diff \
> $@.1 2>&1
if test "$(REGEN_PATCH)" = yes; then \
- diff -upr src src-c89 | sed 's,src-c89/,src/,' \
+ diff -upr $(srcdir)/src src-c89 | sed 's,$(srcdir)/src-c89/,src/,' \
| grep -vE '^(Only in|File )' \
| perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/;' \
-e 's/^ $$//' \