doc: update Vala documentation
[automake.git] / t / subobj5.sh
blob9452b264087279438e54bbbd2b77f9828874d46c
1 #! /bin/sh
2 # Copyright (C) 2001-2024 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)
7 # any later version.
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 # Test of subdir make dist rules.
18 # From Robert Collins.
20 required=cc
21 . test-init.sh
23 cat >> configure.ac << 'END'
24 AC_CONFIG_FILES([generic/Makefile])
25 AC_PROG_CC
26 AC_OUTPUT
27 END
29 cat > Makefile.am << 'END'
30 AUTOMAKE_OPTIONS = subdir-objects
31 bin_PROGRAMS = wish
32 wish_SOURCES = generic/a.c
34 .PHONY: test-distdir test-build
35 test-distdir: distdir
36 ls -l $(distdir) $(distdir)/* ;: For debugging.
37 test ! -r $(distdir)/a.c
38 test -f $(distdir)/generic/a.c
39 test-build: all
40 ls -l . generic ;: For debugging.
41 test -f generic/a.$(OBJEXT)
42 test -f wish$(EXEEXT)
43 test ! -r a.$(OBJEXT)
44 test ! -r a$(EXEEXT)
45 test ! -r generic/wish$(EXEEXT)
46 test ! -r generic/a$(EXEEXT)
47 END
49 mkdir generic
50 : > generic/Makefile.am
52 cat > generic/a.c << 'END'
53 int main (void)
55 return 0;
57 END
59 $ACLOCAL
60 $AUTOCONF
61 $AUTOMAKE --include-deps --copy --add-missing
63 ./configure
65 $MAKE test-distdir
66 $MAKE dist
67 $MAKE test-build