doc: typos in test file.
[automake.git] / t / mkdir_p.sh
blobc2467bc9115dc7cf0c9261600458d5490335a2fe
1 #! /bin/sh
2 # Copyright (C) 2012-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 # AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
18 # compatibility.
20 . test-init.sh
22 cat >> configure.ac << 'END'
23 AC_CONFIG_FILES([sub/Makefile])
24 AC_OUTPUT
25 END
27 cat > Makefile.am << 'END'
28 SUBDIRS = sub
29 all-local:
30 $(mkdir_p) . dir1/a
31 @mkdir_p@ . dir2/b
32 check-local: all
33 test -d dir1/a
34 test -d dir2/b
35 test -d dir3/c
36 test -d dir3/d
37 END
39 mkdir sub
40 cat > sub/Makefile.am << 'END'
41 # '$(mkdir_p)' should continue to work even in subdir makefiles.
42 all-local:
43 $(mkdir_p) .. ../dir3/c
44 @mkdir_p@ .. ../dir3/d
45 END
47 $ACLOCAL
48 $AUTOCONF -Werror -Wall
49 $AUTOMAKE
51 ./configure
52 $MAKE check-local
53 $MAKE distcheck