2 # Copyright (C) 1999-2017 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 <https://www.gnu.org/licenses/>.
17 # Grepping checks on subdir objects with C and C++.
21 cat >> configure.ac
<<'END'
25 AC_CONFIG_FILES([sub/Makefile])
32 cat > Makefile.am
<< 'END'
35 wish_SOURCES
= generic
/a.c
36 wish_SOURCES
+= another
/z.cxx
40 cat > sub
/Makefile.am
<< 'END'
41 dream_SOURCES
= generic
/b.c more
/r.y
46 $AUTOMAKE --add-missing 2>stderr ||
{ cat stderr
>&2; exit 1; }
48 # Make sure compile is installed, and that Automake says so.
49 grep '^configure\.ac:[48]:.*install.*compile' stderr
52 grep '^generic/a\.\$(OBJEXT):' Makefile.
in
53 grep '^generic/b\.\$(OBJEXT):' sub
/Makefile.
in
54 grep '^another/z\.\$(OBJEXT):' Makefile.
in
55 $EGREP '(^|[^/])[abz]\.\$(OBJEXT)' Makefile.
in sub
/Makefile.
in && exit 1
57 # Opportunistically test for a different bug.
58 grep '^another/z\.\$(OBJEXT):.*dirstamp' Makefile.
in
59 grep '^generic/b\.\$(OBJEXT):.*dirstamp' sub
/Makefile.
in