2006-12-05 Stepan Kasal * lib/am/distdir.am (distcheck): Move the srcdir below `$(distdir)/_dist', so that `_build' and `_inst' are not below it. * tests/insthook.test: Do not depend on the actual implementation of `distcheck'. Index: lib/am/distdir.am =================================================================== RCS file: /cvs/automake/automake/lib/am/distdir.am,v retrieving revision 1.69 diff -u -r1.69 distdir.am --- lib/am/distdir.am 15 Oct 2006 16:37:22 -0000 1.69 +++ lib/am/distdir.am 5 Dec 2006 18:31:05 -0000 @@ -315,26 +315,25 @@ # tarfile. .PHONY: distcheck distcheck: dist - case '$(DIST_ARCHIVES)' in \ + mkdir $(distdir) + mkdir $(distdir)/_dist + $(am__cd) $(distdir)/_dist && case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gunzip -c ../../$(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bunzip2 -c ../../$(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + uncompress -c ../../$(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gunzip -c ../../$(distdir).shar.gz | unshar ;;\ *.zip*) \ - unzip $(distdir).zip ;;\ + unzip ../../$(distdir).zip ;;\ esac ## Make the new source tree read-only. Distributions ought to work in -## this case. However, make the top-level directory writable so we -## can make our new subdirs. - chmod -R a-w $(distdir); chmod a+w $(distdir) +## this case. + chmod -R a-w $(distdir)/_dist mkdir $(distdir)/_build mkdir $(distdir)/_inst -## Undo the write access. - chmod a-w $(distdir) ## Compute the absolute path of `_inst'. Strip any leading DOS drive ## to allow DESTDIR installations. Otherwise "$(DESTDIR)$(prefix)" would ## expand to "c:/temp/am-dc-5668/c:/src/package/package-1.0/_inst". @@ -344,8 +343,8 @@ ## create very long directory names. && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ?DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build \ + && ../_dist/$(distdir)/configure --srcdir=../_dist/$(distdir) --prefix="$$dc_install_base" \ ?GETTEXT? --with-included-gettext \ ## Additional flags for configure. Keep this last in the configure ## invocation so the user can override previous options. Index: tests/insthook.test =================================================================== RCS file: /cvs/automake/automake/tests/insthook.test,v retrieving revision 1.12 diff -u -r1.12 insthook.test --- tests/insthook.test 14 May 2005 20:28:55 -0000 1.12 +++ tests/insthook.test 5 Dec 2006 18:31:06 -0000 @@ -40,7 +40,7 @@ installcheck-local: test -f $(bindir)/foo test -f $(bindir)/foo-$(VERSION) - : > $(top_srcdir)/../ok + test -n "$$stampdir" && : > $$stampdir/ok END echo 1 > foo @@ -50,7 +50,7 @@ $AUTOMAKE ./configure -$MAKE distcheck +stampdir=`pwd` $MAKE -e distcheck # Sanity check to make sure installcheck-local was run. test -f ok