bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiply distributed files


From: Akim Demaille
Subject: Multiply distributed files
Date: Fri, 19 May 2006 15:16:08 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

I have a Makefile snippet which is part of a directory which I ship as
is (EXTRA_DIST) in my tarballs (something comparable to gnulib if you
wish).  I include this Makefile snippet elsewhere, and as a result,
Automake will distribute it.  Hence this file is "listed" twice to be
shipped.

In such a setup distcheck will necessarily fail, because at one point
we have read-only srcdir, and a use of cp -p, hence, when distdir
tries to copy the directory, I have permission denied failure.  Am I
clear enough?  These are the relevant portion of the logs (distdir is
set -x'ed):

(in the following list, note that ../../doc/share/make/share.mk
../../doc/share/make/tex.mk are listed, and them ../../doc/share is
listed.)

+ list='ref.tar.gz README.pdf README.tex README.html FAQ.pdf FAQ.tex FAQ.html 
NEWS.pdf NEWS.tex NEWS.html README-IO.pdf README-IO.tex README-IO.html 
../../doc/Makefile.am ../../doc/Makefile.in ../../doc/doc.doxy.in 
../../doc/doc.mk ../../doc/share/make/share.mk ../../doc/share/make/tex.mk   
README.txt FAQ.txt NEWS.txt README-IO.txt share'
+ for file in '$list'
+ echo '========================== ref.tar.gz'
========================== ref.tar.gz
[...]

+ echo '========================== ../../doc/share/make/share.mk'
========================== ../../doc/share/make/share.mk
+ case $file in
++ echo ../../doc/share/make/share.mk
++ sed 's|^........./||'
+ file=share/make/share.mk
+ test -f share/make/share.mk
+ test -d share/make/share.mk
+ d=../../doc
++ echo share/make/share.mk
++ sed -e 's,/[^/]*$,,'
+ dir=share/make
+ test share/make '!=' share/make/share.mk
+ test share/make '!=' .
+ dir=/share/make
+ mkdir -p -- 
/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc/share/make
+ test -d ../../doc/share/make/share.mk
+ test -f 
/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc/share/make/share.mk
+ cp -p ../../doc/share/make/share.mk 
/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc/share/make/share.mk
+ for file in '$list'
+ echo '========================== ../../doc/share/make/tex.mk'
========================== ../../doc/share/make/tex.mk
+ case $file in
++ sed 's|^........./||'
++ echo ../../doc/share/make/tex.mk
+ file=share/make/tex.mk
+ test -f share/make/tex.mk
+ test -d share/make/tex.mk
+ d=../../doc
++ echo share/make/tex.mk
++ sed -e 's,/[^/]*$,,'
+ dir=share/make
+ test share/make '!=' share/make/tex.mk
+ test share/make '!=' .
+ dir=/share/make
+ mkdir -p -- 
/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc/share/make
+ test -d ../../doc/share/make/tex.mk
+ test -f 
/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc/share/make/tex.mk
+ cp -p ../../doc/share/make/tex.mk 
/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc/share/make/tex.mk
[...]

All is well, the two makefile snippets are copied in the distdir.

And then the failure:

+ for file in '$list'
+ echo '========================== share'
========================== share
+ case $file in
+ test -f share
+ test -d share
+ d=../../doc
++ echo share
++ sed -e 's,/[^/]*$,,'
+ dir=share
+ test share '!=' share
+ dir=
+ test -d ../../doc/share
+ test -d ../../doc/share
+ test ../../doc '!=' ../../doc
+ cp -pR ../../doc/share 
/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc
cp: cannot create regular file `/home/akim/src/vaucanson/_build/vaucanson-0.8pre
1173/_build/vaucanson-0.8pre1173/doc/share/make/share.mk': Permission denied
cp: cannot create regular file 
`/home/akim/src/vaucanson/_build/vaucanson-0.8pre1173/_build/vaucanson-0.8pre1173/doc/share/make/tex.mk':
 Permission denied
+ exit 1
make: *** [distdir] Error 1



As far as I'm concerned, I don't think the distcheck sequence is
correct:

| distcheck: dist
|       case '$(DIST_ARCHIVES)' in \
|       *.tar.gz*) \
|         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|       *.tar.bz2*) \
|         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|       *.tar.Z*) \
|         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|       *.shar.gz*) \
|         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|       *.zip*) \
|         unzip $(distdir).zip ;;\
|       esac
|       chmod -R a-w $(distdir); chmod a+w $(distdir)
|       mkdir $(distdir)/_build
|       mkdir $(distdir)/_inst
|       chmod a-w $(distdir)

Starting from here, the distdir, which is the current srcdir, is
readonly.

|       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
|         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|         && cd $(distdir)/_build \
|         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
|           $(DISTCHECK_CONFIGURE_FLAGS) \
|         && $(MAKE) $(AM_MAKEFLAGS) \
|         && $(MAKE) $(AM_MAKEFLAGS) dvi \
|         && $(MAKE) $(AM_MAKEFLAGS) check \
|         && $(MAKE) $(AM_MAKEFLAGS) install \
|         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
|         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
|         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" 
\
|               distuninstallcheck \
|         && chmod -R a-w "$$dc_install_base" \
|         && ({ \
|              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|             } || { rm -rf "$$dc_destdir"; exit 1; }) \
|         && rm -rf "$$dc_destdir" \

So the "dist" immediately below is executed with a read-only source
tree.  This seems wrong to me, I suggest restoring the rights first.
Something like

      && chmod -R a+w ..

should suffice (it does for my case).

|         && $(MAKE) $(AM_MAKEFLAGS) dist \
|         && rm -rf $(DIST_ARCHIVES) \
|         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|       $(am__remove_distdir)
|       @(echo "$(distdir) archives ready for distribution: "; \
|         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'


Thanks!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]