2 # Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Make sure `check:' and `install:' honor $(BUILT_SOURCES).
28 cat >> configure.
in << 'END'
29 AC_CONFIG_FILES
([dir
/Makefile
])
35 cat > Makefile.am
<< 'END'
36 BUILT_SOURCES
= command1.inc
40 (echo '#! /bin/sh'; cat command1.inc
) > $@
43 echo 'dir/echo.sh' > $@
44 CLEANFILES
= subrun.sh command1.inc
47 cat > dir
/Makefile.am
<< 'END'
48 BUILT_SOURCES
= command2.inc
49 check_SCRIPTS
= echo.sh
51 ## The next line ensures that command1.inc has been built before
52 ## recurring into the subdir.
53 test -f ..
/command1.inc
54 (echo '#! /bin/sh'; cat command2.inc
) > $@
57 echo 'echo Hello' > $@
58 CLEANFILES
= echo.sh command2.inc
64 .
/configure
--prefix "`pwd`/inst"
67 grep 'PASS: subrun.sh' stdout
69 # check should depend directly on check-am (similar tests are
70 # in check.test and check2.test).
71 $FGREP 'check: $(BUILT_SOURCES)' Makefile.
in
72 $FGREP 'check: $(BUILT_SOURCES)' dir
/Makefile.
in
76 test ! -f command1.inc
77 test ! -f dir
/command2.inc
78 # Now make sure these two files are rebuilt during make install.
81 test -f dir
/command2.inc