aclocal: create local directory where to install m4 files
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 15 Mar 2012 15:50:40 +0000 (16:50 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 16 Mar 2012 08:31:27 +0000 (09:31 +0100)
commita75a1a52679feed85a181dcf514e32e17117157b
treec92827296ab8204b649c075b993eaa8a794cdf40
parent819005ae2c86c3ef4b77bea7176bb6d8b67ebd64
aclocal: create local directory where to install m4 files

Fixes automake bug#8168 and bug#10816.

A call like "aclocal -I m4 --install" used to fail if the 'm4'
directory wasn't pre-existing.  This could be particularly
annoying when running in a checked-out version from a VCS like
git, which doesn't allow empty directories to be tracked.

* aclocal.in (File::Path): New import.
(scan_m4_dirs): Don't die if the first directory of type FT_USER
doesn't exist and the '--install' option was given; that directory
will be created later ...
(install_file): ... here.  Change signature of this function: now
it takes as second argument the destination directory rather than
the destination file.  Crate the destination directory if it
doesn't already exist.  In verbose mode, tell what is being copied
where.
(write_aclocal): Update to the changes in 'install_file'.
* NEWS, THANKS: Update.
* tests/aclocal-install-fail.test: New test.
* tests/aclocal-install-mkdir.test: Likewise.
* tests/aclocal-no-install-no-mkdir.test: Likewise.
* tests/aclocal-verbose-install.test: Likewise.
* tests/list-of-tests.mk: Add them.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
THANKS
aclocal.in
tests/aclocal-install-fail.test [new file with mode: 0755]
tests/aclocal-install-mkdir.test [new file with mode: 0755]
tests/aclocal-no-install-no-mkdir.test [new file with mode: 0755]
tests/aclocal-verbose-install.test [new file with mode: 0755]
tests/list-of-tests.mk