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.
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)
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 \
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.
&& $(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`; \
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);
--- /dev/null
+## 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"
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)
POST_UNINSTALL = :
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
+AWK = @AWK@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PERL = @PERL@