2 # Copyright (C) 2012 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)
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, see <http://www.gnu.org/licenses/>.
17 # Check that 'dist-hook' works. See automake bug#10878.
21 echo AC_OUTPUT
>> configure.ac
23 cat > Makefile.am
<<'END'
24 EXTRA_DIST = write execute removed doc
27 echo I will be deleted > $@
28 DISTCLEANFILES = removed
31 chmod u+w $(distdir)/write $(distdir)/doc
32 chmod u+x $(distdir)/execute
33 rm -f $(distdir)/removed
34 rm -f $(distdir)/doc/HACKING
35 rm -f $(distdir)/doc/RELEASE-DATE
36 date > $(distdir)/doc/RELEASE-DATE
37 echo all is ok > $(distdir)/write
40 ls -l $(srcdir) $(srcdir)/doc
41 test "`cat $(srcdir)/write`" = "all is ok"
42 test -f $(srcdir)/doc/README
43 test -f $(srcdir)/doc/RELEASE-DATE
44 test ! -f $(srcdir)/removed
45 test ! -r $(srcdir)/removed
46 test ! -f $(srcdir)/doc/HACKING
47 test ! -r $(srcdir)/doc/HACKING
49 $(srcdir)/execute | grep 'I run successfully'
51 echo ok > $(srcdir)/../distcheck-run
62 echo will be clobbered
> write
65 echo I run successfully
72 ls -l $distdir $distdir/doc
74 test "$(cat write)" = "all is ok"
77 test -f doc
/RELEASE-DATE
80 .
/execute |
grep 'I run successfully'