doc: update Vala documentation
[automake.git] / t / distcom-subdir.sh
blob9688783cae1fd8e748a3cb2d19c17eb89e4938aa
1 #! /bin/sh
2 # Copyright (C) 2004-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 to make sure that if an auxfile (here depcomp) is required
18 # by a subdir Makefile.am, it is distributed by that Makefile.am.
20 required=cc
21 . test-init.sh
23 cat >> configure.ac << 'END'
24 AC_CONFIG_FILES([subdir/Makefile])
25 AC_PROG_CC
26 AC_PROG_FGREP
27 AC_OUTPUT
28 END
30 cat > Makefile.am << 'END'
31 SUBDIRS = subdir
32 test-distdir: distdir
33 test -f $(distdir)/depcomp
34 .PHONY: test-distdir
35 check-local: test-distdir
36 END
38 rm -f depcomp
39 mkdir subdir
41 cat > subdir/Makefile.am << 'END'
42 .PHONY: test-distcom
43 test-distcom:
44 echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
45 END
47 $ACLOCAL
48 $AUTOCONF
49 $AUTOMAKE
50 test ! -e depcomp
52 cat >> subdir/Makefile.am << 'END'
53 bin_PROGRAMS = foo
54 .PHONY: test-distcom
55 test-distcom:
56 echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
57 check-local: test-distcom
58 END
60 cat > subdir/foo.c <<'END'
61 int main (void)
63 return 0;
65 END
67 $AUTOMAKE -a subdir/Makefile
68 test -f depcomp
70 ./configure
71 (cd subdir && $MAKE test-distcom)
72 $MAKE test-distdir
74 $MAKE distcheck