2 # Copyright (C) 2002, 2003, 2007 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 3, 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 # Make sure `check:' and `install:' honor $(BUILT_SOURCES).
24 cat >> configure.
in << 'END'
25 AC_CONFIG_FILES
([dir
/Makefile
])
31 cat > Makefile.am
<< 'END'
32 BUILT_SOURCES
= command1.inc
36 (echo '#! /bin/sh'; cat command1.inc
) > $@
39 echo 'dir/echo.sh' > $@
40 CLEANFILES
= subrun.sh command1.inc
43 cat > dir
/Makefile.am
<< 'END'
44 BUILT_SOURCES
= command2.inc
45 check_SCRIPTS
= echo.sh
47 ## The next line ensures that command1.inc has been built before
48 ## recurring into the subdir.
49 test -f ..
/command1.inc
50 (echo '#! /bin/sh'; cat command2.inc
) > $@
53 echo 'echo Hello' > $@
54 CLEANFILES
= echo.sh command2.inc
60 .
/configure
--prefix "`pwd`/inst"
63 grep 'PASS: subrun.sh' stdout
65 # check should depend directly on check-am (similar tests are
66 # in check.test and check2.test).
67 $FGREP 'check: $(BUILT_SOURCES)' Makefile.
in
68 $FGREP 'check: $(BUILT_SOURCES)' dir
/Makefile.
in
72 test ! -f command1.inc
73 test ! -f dir
/command2.inc
74 # Now make sure these two files are rebuilt during make install.
77 test -f dir
/command2.inc