* tests/Makefile.am (XFAIL_TESTS): Removed distcommon.test.
[automake.git] / dist.am
blobb3952281b688035b4f77933018412a722ecab5ce
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 ## 02111-1307, USA.
18 # This target untars the dist file and tries a VPATH configuration.  Then
19 # it guarantees that the distribution is self-contained by making another
20 # tarfile.
21 distcheck: dist
22 ## Make sure we can remove distdir before trying to remove it.
23         -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
24         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
25 ## Make the new source tree read-only.  Distributions ought to work in
26 ## this case.  However, make the top-level directory writable so we
27 ## can make our new subdirs.
28         chmod -R a-w $(distdir); chmod a+w $(distdir)
29         mkdir $(distdir)/=build
30         mkdir $(distdir)/=inst
31 ## Undo the write access.
32         chmod a-w $(distdir)
33         dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
34 DISTHOOK          && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
35           && cd $(distdir)/=build \
36           && ../configure --srcdir=.. --prefix=$$dc_install_base \
37 GETTEXT     --with-included-gettext \
38           && $(MAKE) $(AM_MAKEFLAGS) \
39           && $(MAKE) $(AM_MAKEFLAGS) dvi \
40           && $(MAKE) $(AM_MAKEFLAGS) check \
41           && $(MAKE) $(AM_MAKEFLAGS) install \
42           && $(MAKE) $(AM_MAKEFLAGS) installcheck \
43           && $(MAKE) $(AM_MAKEFLAGS) uninstall \
44 ## We use -le 1 because the `dir' file might still exist after uninstall.
45           && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
46           && $(MAKE) $(AM_MAKEFLAGS) dist \
47           && $(MAKE) $(AM_MAKEFLAGS) distclean \
48 ## Make sure to remove the dist file we created in the test build
49 ## directory.
50           && rm -f $(distdir).tar.gz \
51           && test `find . -type f -print | wc -l` -eq 0
52         -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
53         @banner="$(distdir).tar.gz is ready for distribution"; \
54         dashes=`echo "$$banner" | sed s/./=/g`; \
55         echo "$$dashes"; \
56         echo "$$banner"; \
57         echo "$$dashes"