]> sourceware.org Git - automake.git/commitdiff
Fix for PR automake/18:
authorTom Tromey <tromey@redhat.com>
Mon, 8 Nov 1999 00:24:00 +0000 (00:24 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 8 Nov 1999 00:24:00 +0000 (00:24 +0000)
* automake.in (handle_dist): Add contents of dist.am to the output
rules.
* Makefile.am (amfiles): Added dist.am.
* dist.am: New file.
(distcheck): Added uninstall and distclean checks.

ChangeLog
Makefile.am
Makefile.in
automake.in
dist.am [new file with mode: 0644]
lib/am/Makefile.am
m4/Makefile.in

index 20eb59e7d9b87d911bd8dfec62b116297482c240..fa2597b1d7ab106ce9c4ad3aed4a7299e89e37bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 1999-11-07  Tom Tromey  <tromey@cygnus.com>
 
+       Fix for PR automake/18:
+       * automake.in (handle_dist): Add contents of dist.am to the output
+       rules.
+       * Makefile.am (amfiles): Added dist.am.
+       * dist.am: New file.
+       (distcheck): Added uninstall and distclean checks.
+
        * automake.in (PATH_PATTERN): Added `-' as allowable character.
        Fixes PR automake/20.  From Matthew D. Langston.
 
index 3a4e9b2ef9b95170a082b51194877ff2da138f48..dec0f60bd5ddb207ec76dee86c6e19aa8664dba8 100644 (file)
@@ -11,12 +11,12 @@ bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi
 
 amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
-data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \
-footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \
-library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \
-ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am multilib.am \
-program.am progs-clean.am progs.am remake-hdr.am remake.am scripts.am \
-subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
+data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
+dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
+kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
+lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
+multilib.am program.am progs-clean.am progs.am remake-hdr.am remake.am \
+scripts.am subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
 
 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
 $(amfiles)
index 2fe76a98e5a1ddc33baa1e63f6230e20d0c8057f..e70a9de1720fdf5ab16973e751f5f3b80890a9cc 100644 (file)
@@ -76,12 +76,12 @@ bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi
 
 amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
-data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \
-footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \
-library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \
-ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am multilib.am \
-program.am progs-clean.am progs.am remake-hdr.am remake.am scripts.am \
-subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
+data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
+dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
+kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
+lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
+multilib.am program.am progs-clean.am progs.am remake-hdr.am remake.am \
+scripts.am subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
 
 
 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
@@ -446,6 +446,7 @@ maintainer-clean-tags:
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 
+
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
@@ -462,7 +463,11 @@ distcheck: dist
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) dist
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && $(MAKE) $(AM_MAKEFLAGS) distclean \
+         && test `find . -type f -print | wc -l` -eq 0
        -rm -rf $(distdir)
        @banner="$(distdir).tar.gz is ready for distribution"; \
        dashes=`echo "$$banner" | sed s/./=/g`; \
index 988cc53150e49f151df91262026090ae17261901..11074bef9414660d107e453e71594a354beedcd5 100755 (executable)
@@ -2865,38 +2865,18 @@ sub handle_dist
     if ($relative_dir eq '.')
     {
        # Rule to check whether a distribution is viable.
-       $output_rules .= ('# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       -rm -rf $(distdir)
-       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
-       mkdir $(distdir)/=build
-       mkdir $(distdir)/=inst
-       dc_install_base=`cd $(distdir)/=inst && pwd` \\'
-                         . (&target_defined ('distcheck-hook')
-                            ? ("\n\t  && \$(MAKE) \$(AM_MAKEFLAGS)"
-                               . " distcheck-hook \\")
-                            : '')
-                         . '
-         && cd $(distdir)/=build \\
-         && ../configure '
-
-                         . ($seen_gettext ? '--with-included-gettext ' : '')
-                         . '--srcdir=.. --prefix=$$dc_install_base \\
-         && $(MAKE) $(AM_MAKEFLAGS) \\
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \\
-         && $(MAKE) $(AM_MAKEFLAGS) check \\
-         && $(MAKE) $(AM_MAKEFLAGS) install \\
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \\
-         && $(MAKE) $(AM_MAKEFLAGS) dist
-       -rm -rf $(distdir)
-       @banner="$(distdir).tar.gz is ready for distribution"; \\
-       dashes=`echo "$$banner" | sed s/./=/g`; \\
-       echo "$$dashes"; \\
-       echo "$$banner"; \\
-       echo "$$dashes"
-');
+       local ($xform) = '';
+
+       if (! &target_defined ('distcheck-hook'))
+       {
+           $xform .= 's/^DISTHOOK.*$//;';
+       }
+       if (! $seen_gettext)
+       {
+           $xform .= 's/^GETTEXT.*$//;';
+       }
+
+       $output_rules .= &file_contents_with_transform ($xform, 'dist');
 
        local ($dist_all) = ('dist-all: distdir' . "\n"
                             . $dist_header);
diff --git a/dist.am b/dist.am
new file mode 100644 (file)
index 0000000..02d2b7d
--- /dev/null
+++ b/dist.am
@@ -0,0 +1,47 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       -rm -rf $(distdir)
+       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+       mkdir $(distdir)/=build
+       mkdir $(distdir)/=inst
+       dc_install_base=`cd $(distdir)/=inst && pwd` \
+DISTHOOK       $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
+         && cd $(distdir)/=build \
+         && ../configure --srcdir=.. --prefix=$$dc_install_base \
+GETTEXT            --with-included-gettext \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+## We use -le 1 because the `dir' file might still exist after uninstall.
+         && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && $(MAKE) $(AM_MAKEFLAGS) distclean \
+         && test `find . -type f -print | wc -l` -eq 0
+       -rm -rf $(distdir)
+       @banner="$(distdir).tar.gz is ready for distribution"; \
+       dashes=`echo "$$banner" | sed s/./=/g`; \
+       echo "$$dashes"; \
+       echo "$$banner"; \
+       echo "$$dashes"
index 3a4e9b2ef9b95170a082b51194877ff2da138f48..dec0f60bd5ddb207ec76dee86c6e19aa8664dba8 100644 (file)
@@ -11,12 +11,12 @@ bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi
 
 amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
-data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \
-footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \
-library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \
-ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am multilib.am \
-program.am progs-clean.am progs.am remake-hdr.am remake.am scripts.am \
-subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
+data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
+dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
+kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
+lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
+multilib.am program.am progs-clean.am progs.am remake-hdr.am remake.am \
+scripts.am subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
 
 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
 $(amfiles)
index 5df80850ced2ba674345232c1629fe2905a7f1ab..d74032006ffcc50110d68846bab596c16fe3afbb 100644 (file)
@@ -59,6 +59,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 AMTAR = @AMTAR@
 AMTARFLAGS = @AMTARFLAGS@
+AWK = @AWK@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
This page took 0.042502 seconds and 5 git commands to generate.