doc: update Vala documentation
[automake.git] / t / depend-postproc.sh
blob73ac8b4fda18f15277a308c2b312153c41b2db26
1 #! /bin/sh
2 # Copyright (C) 2002-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 # Check to make sure we recognize a Makefile.in, even if post-processed
18 # and renamed. The particularly tricky code for automatic dependency
19 # tracking support used to have issues with that.
21 required=cc
22 . test-init.sh
24 cat > configure.ac <<END
25 AC_INIT([$me], [1.0])
26 AM_INIT_AUTOMAKE
27 AC_PROG_CC
28 AC_CONFIG_FILES([myMakefile])
29 dnl: AC_CONFIG_LINKS([Makefile:Makefile])
30 AC_OUTPUT
31 END
33 cat > myMakefile.am <<'END'
34 bin_PROGRAMS = fred
35 fred_SOURCES = fred.c
36 END
38 $ACLOCAL
39 $AUTOCONF
40 $AUTOMAKE -- myMakefile
42 mv myMakefile.in myMakefile.old
43 echo '# Post-processed by post-processor 3.14.' > myMakefile.in
44 cat myMakefile.old >> myMakefile.in
46 ./configure
48 test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1
50 $sleep
52 cat > Makefile <<'END'
53 include myMakefile
54 END
56 sed 's/^dnl: *//' configure.ac >t
57 mv -f t configure.ac
59 $MAKE myMakefile Makefile
61 rm -rf .deps _deps
62 ./config.status
64 test ! -e fred.c
65 echo 'int main (void) { return 0; }' > fred.c
67 $MAKE
68 test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1
69 $MAKE distcheck