Merge branch 'simplify-exit-trap-workaround' into maint
[platform/upstream/automake.git] / t / stamph2.sh
1 #! /bin/sh
2 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
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/>.
16
17 # Make sure stamp-h* files are created where we expect
18 . ./defs || exit 1
19
20 cat >> configure.ac << END
21 AM_CONFIG_HEADER([1.h
22                   2.h:config.hin
23                   3.h:sdir1/config1.hin])
24 # AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
25 AC_CONFIG_HEADERS([sdir1/4.h
26                    sdir1/5.h:config.hin
27                    sdir1/6.h:sdir1/config1.hin
28                    sdir1/7.h:sdir2/config2.hin])
29 AC_OUTPUT
30 END
31
32 : > Makefile.am
33 mkdir sdir1
34 mkdir sdir2
35 : > config.hin
36 : > 1.h.in
37 : > sdir1/4.h.in
38 : > sdir1/config1.hin
39 : > sdir2/config2.hin
40
41 $ACLOCAL
42 $AUTOCONF
43 $AUTOMAKE
44 ./configure
45
46 test -f stamp-h1
47 test -f stamp-h2
48 test -f stamp-h3
49 test -f sdir1/stamp-h4
50 test -f sdir1/stamp-h5
51 test -f sdir1/stamp-h6
52 test -f sdir1/stamp-h7
53
54 # Make sure './config.status foo' creates the right stamp file.
55 # Report from Sander Niemeijer.
56
57 rm -f stamp-h*
58 rm -f sdir1/stamp-h*
59
60 ./config.status sdir1/7.h 2.h sdir1/4.h
61 test ! -f stamp-h1
62 test -f stamp-h2
63 test ! -f stamp-h3
64 test -f sdir1/stamp-h4
65 test ! -f sdir1/stamp-h5
66 test ! -f sdir1/stamp-h6
67 test -f sdir1/stamp-h7
68
69 :