]> sourceware.org Git - automake.git/commitdiff
* Makefile.am (path-check): Make sure distdir is writeable before
authorTom Tromey <tromey@redhat.com>
Sat, 13 Nov 1999 00:15:57 +0000 (00:15 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 13 Nov 1999 00:15:57 +0000 (00:15 +0000)
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.

ChangeLog
Makefile.am
Makefile.in
automake.in
dist.am
lib/am/Makefile.am
m4/Makefile.in
stamp-vti
tests/Makefile.in
version.texi

index 5605c7f40ce78d2f3cedf51be6507df056245e51..a6a3cedbc940ecca13f822b3d4e44f099da7926d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 1999-11-12  Tom Tromey  <tromey@cygnus.com>
 
+       * 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.
 
index dec0f60bd5ddb207ec76dee86c6e19aa8664dba8..4c2dac4af44726ed7e6000e504c03bf72afdc4c4 100644 (file)
@@ -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
index e70a9de1720fdf5ab16973e751f5f3b80890a9cc..1a515a5909c1fea586149d2e693b22188e9502cb 100644 (file)
@@ -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.
index 883bfabb4efd1df9bb6a6cbb3154e12a3f466319..1a0494545d13a40a07faf8cec687625e996a17dd 100755 (executable)
@@ -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 ef064c7c93e3bad493e478148389c473ce7b3e6b..347ac16727b0baf436f7e509b8c8b095d9312800 100644 (file)
--- a/dist.am
+++ b/dist.am
 # 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"; \
index dec0f60bd5ddb207ec76dee86c6e19aa8664dba8..4c2dac4af44726ed7e6000e504c03bf72afdc4c4 100644 (file)
@@ -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
index d74032006ffcc50110d68846bab596c16fe3afbb..41f7a36d82478b7a03997a708f6499786393d71c 100644 (file)
@@ -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
index 4643e8ceda934c63450a5aefd0a4747be2164788..20c10b2b4787b3776d5ced34753299805fcdc304 100644 (file)
--- 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
index 16167ed4b315438b8bb56d2768429468399dadab..b435a17f3c36443db25b7ab4b8a50df8af3bc16c 100644 (file)
@@ -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
index 4643e8ceda934c63450a5aefd0a4747be2164788..20c10b2b4787b3776d5ced34753299805fcdc304 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 20 June 1999
+@set UPDATED 12 November 1999
 @set EDITION 1.4a
 @set VERSION 1.4a
This page took 0.044558 seconds and 5 git commands to generate.