From: Tom Tromey Date: Sat, 13 Nov 1999 00:15:57 +0000 (+0000) Subject: * Makefile.am (path-check): Make sure distdir is writeable before X-Git-Tag: Release-1-4b~181 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=688621b6379a73a3954686a834b6beb5ec7a3a6c;p=automake.git * Makefile.am (path-check): Make sure distdir is writeable before removing it. * automake.in (handle_texinfo): Added `cm' and `ov' extensions. (handle_dist_worker): Make sure distdir is writeable before removing it. (initialize_global_constants [$dist_trailer]): Make sure distdir is writeable before removing it. * dist.am (distcheck): Make the new source tree read-only before compiling. Idea from Karl Berry. --- diff --git a/ChangeLog b/ChangeLog index 5605c7f4..a6a3cedb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 1999-11-12 Tom Tromey + * Makefile.am (path-check): Make sure distdir is writeable before + removing it. + * automake.in (handle_texinfo): Added `cm' and `ov' extensions. + (handle_dist_worker): Make sure distdir is writeable before + removing it. + (initialize_global_constants [$dist_trailer]): Make sure distdir + is writeable before removing it. + * dist.am (distcheck): Make the new source tree read-only before + compiling. Idea from Karl Berry. + * automake.texi (Gnits): Allow COPYING.LIB again. * automake.in (check_gnits_standards): Allow COPYING.LIB again. diff --git a/Makefile.am b/Makefile.am index dec0f60b..4c2dac4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -131,5 +131,5 @@ path-check: distdir ## of files on stdin, at least. find . -print | xargs pathchk -p); \ status=$$?; \ - rm -rf $(distdir); \ + chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir); \ exit $$status diff --git a/Makefile.in b/Makefile.in index e70a9de1..1a515a59 100644 --- a/Makefile.in +++ b/Makefile.in @@ -270,9 +270,8 @@ uninstall-info: @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ - d=$(srcdir); \ - echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file"; \ - install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file; \ + echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \ + install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @@ -300,7 +299,7 @@ mostlyclean-aminfo: automake.fns automake.pgs automake.ky automake.kys \ automake.ps automake.log automake.pg automake.toc automake.tp \ automake.tps automake.vr automake.vrs automake.op automake.tr \ - automake.cv automake.cn + automake.cv automake.cn automake.cm automake.ov clean-aminfo: @@ -451,10 +450,12 @@ top_distdir = $(distdir) # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - -rm -rf $(distdir) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/=build mkdir $(distdir)/=inst + chmod a-w $(distdir) dc_install_base=`cd $(distdir)/=inst && pwd` \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ @@ -467,8 +468,9 @@ distcheck: dist && test `find $$dc_install_base -type f -print | wc -l` -le 1 \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && $(MAKE) $(AM_MAKEFLAGS) distclean \ + && rm -f $(distdir).tar.gz \ && test `find . -type f -print | wc -l` -eq 0 - -rm -rf $(distdir) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ @@ -480,20 +482,20 @@ dist: distdir ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) $(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz - -rm -rf $(distdir) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) dist-all: distdir -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) $(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz - -rm -rf $(distdir) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) distdir: $(DISTFILES) @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1; \ fi - -rm -rf $(distdir) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) mkdir $(distdir) here=`cd $(top_builddir) && pwd`; \ top_distdir=`cd $(distdir) && pwd`; \ @@ -503,7 +505,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pR $$d/$$file $(distdir); \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -563,6 +565,7 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: + -rm -f Makefile.in mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-tags \ mostlyclean-generic @@ -682,7 +685,7 @@ path-check: distdir (cd $(distdir) && \ find . -print | xargs pathchk -p); \ status=$$?; \ - rm -rf $(distdir); \ + chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir); \ exit $$status # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/automake.in b/automake.in index 883bfabb..1a049454 100755 --- a/automake.in +++ b/automake.in @@ -2297,9 +2297,10 @@ sub handle_texinfo # this explicitly because otherwise too many things could be # removed. In particular the ".log" extension might # reasonably be used in other contexts by the user. + # FIXME: this is really out of control. foreach $tc_cursor ('aux', 'cp', 'cps', 'dvi', 'fn', 'fns', 'pgs', 'ky', 'kys', 'ps', 'log', 'pg', 'toc', 'tp', 'tps', - 'vr', 'vrs', 'op', 'tr', 'cv', 'cn') + 'vr', 'vrs', 'op', 'tr', 'cv', 'cn', 'cm', 'ov') { push (@texi_cleans, $infobase . '.' . $tc_cursor); } @@ -2608,7 +2609,7 @@ sub handle_dist_worker # Create dist directory. - $output_rules .= ("\t-rm -rf \$(distdir)\n" + $output_rules .= ("\t-chmod -R a+w \$(distdir) > /dev/null 2>&1; rm -rf \$(distdir)\n" . "\tmkdir \$(distdir)\n"); } @@ -6722,7 +6723,7 @@ sub initialize_global_constants $dist{'dist'} = ("\t" . '$(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz' . "\n"); - $dist_trailer = "\t" . '-rm -rf $(distdir)' . "\n"; + $dist_trailer = "\t" . '-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)' . "\n"; } # (Re)-Initialize per-Makefile.am variables. diff --git a/dist.am b/dist.am index ef064c7c..347ac167 100644 --- a/dist.am +++ b/dist.am @@ -19,10 +19,17 @@ # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - -rm -rf $(distdir) +## Make sure we can remove distdir before trying to remove it. + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - +## 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) mkdir $(distdir)/=build mkdir $(distdir)/=inst +## Undo the write access. + chmod a-w $(distdir) dc_install_base=`cd $(distdir)/=inst && pwd` \ DISTHOOK && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && cd $(distdir)/=build \ @@ -42,7 +49,7 @@ GETTEXT --with-included-gettext \ ## directory. && rm -f $(distdir).tar.gz \ && test `find . -type f -print | wc -l` -eq 0 - -rm -rf $(distdir) + -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index dec0f60b..4c2dac4a 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -131,5 +131,5 @@ path-check: distdir ## of files on stdin, at least. find . -print | xargs pathchk -p); \ status=$$?; \ - rm -rf $(distdir); \ + chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir); \ exit $$status diff --git a/m4/Makefile.in b/m4/Makefile.in index d7403200..41f7a36d 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -132,7 +132,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pR $$d/$$file $(distdir); \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -175,6 +175,7 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: + -rm -f Makefile.in mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am diff --git a/stamp-vti b/stamp-vti index 4643e8ce..20c10b2b 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,3 +1,3 @@ -@set UPDATED 20 June 1999 +@set UPDATED 12 November 1999 @set EDITION 1.4a @set VERSION 1.4a diff --git a/tests/Makefile.in b/tests/Makefile.in index 16167ed4..b435a17f 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -341,7 +341,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pR $$d/$$file $(distdir); \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -435,6 +435,7 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: + -rm -f Makefile.in mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am diff --git a/version.texi b/version.texi index 4643e8ce..20c10b2b 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 20 June 1999 +@set UPDATED 12 November 1999 @set EDITION 1.4a @set VERSION 1.4a