[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] various VPATH-related fixes
From: |
Ralf Wildenhues |
Subject: |
[PATCH] various VPATH-related fixes |
Date: |
Fri, 12 Sep 2008 21:23:43 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* 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.
---
Hello Jim,
this makes maintainer-distcheck work better in a VPATH build setup.
Sorry, but non-VPATH builds simply are too much of a hassle for me
(why should I keep around two source trees of coreutils for the
root and the non-root build?).
I needed to remove the chmod for the man pages and rebuild them,
otherwise I would get weird errors like
| make[2]: Entering directory `/home/ralf/coreutils/build/man'
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././uname.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././df.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././chroot.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././users.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././hostid.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././pinky.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././stty.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././uptime.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././who.1': Permission denied
| cp: cannot create regular file
`../coreutils-6.12.170-ccbcb-dirty/man/././nice.1': Permission denied
| make[2]: *** [distdir] Error 1
With this patch, I get as far as the sc_tight_scope test, which then
fails with
| ls_mode
| ls_mode
| ls_mode
| uname_mode
| uname_mode
| the above variables should have static scope
| make[1]: *** [sc_tight_scope] Error 1
| make[1]: Leaving directory `/home/ralf/coreutils/build/src'
| make: *** [sc_tight_scope] Error 2
I'll fix the distcheck Automake issue next.
Cheers,
Ralf
maint.mk | 13 +++++++++----
man/Makefile.am | 1 -
src/Makefile.am | 13 ++++++++++---
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/maint.mk b/maint.mk
index eb241b6..81abd74 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 address@hidden address@hidden
- 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 \
> address@hidden 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/^ $$//' \
diff --git a/man/Makefile.am b/man/Makefile.am
index 67ac4bd..415eb82 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -161,7 +161,6 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/;
s/^test$$/[/'`
--output=$t/$@ $t/$*; \
} \
&& sed 's|$*\.td/||g' $t/$@ > $@ \
- && chmod a-w $@ \
&& rm -rf $t ;; \
esac
diff --git a/src/Makefile.am b/src/Makefile.am
index 9ff6455..e5e273b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -443,10 +443,17 @@ sc_tight_scope: $(all_programs)
@t=exceptions-$$$$; \
trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15; \
( printf 'main\nusage\n'; \
- grep -h -A1 '^extern .*[^;]$$' $(SOURCES) \
+ src=`for f in $(SOURCES); do \
+ if test -f $$f; then echo $$f; \
+ else echo $(srcdir)/$$f; fi; \
+ done`; \
+ hdr=`for f in $(noinst_HEADERS); do \
+ if test -f $$f; then echo $$f; \
+ else echo $(srcdir)/$$f; fi; \
+ done`; \
+ grep -h -A1 '^extern .*[^;]$$' $$src \
| grep -vE '^(extern |--)' | sed 's/ .*//'; \
- perl -ne '/^extern \S+ (\S*) \(/ and print "$$1\n"' \
- $(noinst_HEADERS); \
+ perl -ne '/^extern \S+ (\S*) \(/ and print "$$1\n"' $$hdr; \
) | $(ASSORT) -u | sed 's/^/^/;s/$$/$$/' > $$t; \
nm -e *.$(OBJEXT) \
| sed -n 's/.* T //p' \
--
1.6.0.1.286.g599f2
- [PATCH] various VPATH-related fixes,
Ralf Wildenhues <=