From ba57c22c55a064446fe6c52175e9f226e6083837 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 8 Nov 1999 00:24:00 +0000 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ Makefile.am | 12 ++++++------ Makefile.in | 19 ++++++++++++------- automake.in | 44 ++++++++++++------------------------------- dist.am | 47 ++++++++++++++++++++++++++++++++++++++++++++++ lib/am/Makefile.am | 12 ++++++------ m4/Makefile.in | 1 + 7 files changed, 91 insertions(+), 51 deletions(-) create mode 100644 dist.am diff --git a/ChangeLog b/ChangeLog index 20eb59e7..fa2597b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 1999-11-07 Tom Tromey + 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. diff --git a/Makefile.am b/Makefile.am index 3a4e9b2e..dec0f60b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/Makefile.in b/Makefile.in index 2fe76a98..e70a9de1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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`; \ diff --git a/automake.in b/automake.in index 988cc531..11074bef 100755 --- a/automake.in +++ b/automake.in @@ -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 index 00000000..02d2b7d5 --- /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" diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 3a4e9b2e..dec0f60b 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -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) diff --git a/m4/Makefile.in b/m4/Makefile.in index 5df80850..d7403200 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -59,6 +59,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : AMTAR = @AMTAR@ AMTARFLAGS = @AMTARFLAGS@ +AWK = @AWK@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PERL = @PERL@ -- 2.43.5