[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: conditional install dirs vs. mkdir_p
From: |
Ralf Corsepius |
Subject: |
Re: conditional install dirs vs. mkdir_p |
Date: |
Fri, 09 Jan 2004 03:07:31 +0100 |
On Fri, 2004-01-09 at 00:31, Alexandre Duret-Lutz wrote:
> >>> "Ralf" == Ralf Corsepius <address@hidden> writes:
>
> Ralf> Given a Makefile.am, that conditionally installs headers to a directory
> Ralf> defined inside of the condition, similar to this:
> Ralf> make install
> Ralf> make[1]: Entering directory `/tmp/autobug'
> Ralf> make[1]: Nothing to be done for `install-exec-am'.
> Ralf> mkdir -m 0755 -p --
> Ralf> mkdir: too few arguments
> Ralf> Try `mkdir --help' for more information.
> Ralf> make[1]: *** [install-include_fooHEADERS] Error 1
> Ralf> make[1]: Leaving directory `/tmp/autobug'
>
> -> mkdir -p is invoked with an empty directory and chokes.
>
> Damned. And so would `install-sh -d'. Worse, `install-sh -d'
> does not accept multiple arguments, but $(mkdir_p) is used that
> way in `make installdirs'.
>
> I'm installing the following patch on HEAD and branch-1-8.
This patch seems to remedy the problem above, but there seems to be more:
Given this Makefile.am:
if HAVE_FOO
include_HEADERS = foo.h
endif
Configuring with an includedir, which neither exists nor do I have write
access to:
# configure --includedir=/usr/local/foo/bar
[/usr/local exists, but /usr/local/foo/bar doesn't]
This happens with current automake-1.8/CVS:
# make install
make[1]: Entering directory `/users/corsepiu/autobug-0.1'
make[1]: Nothing to be done for `install-exec-am'.
mkdir -p -- . /usr/local/foo/bar
mkdir: cannot create directory `/usr/local/foo': Permission denied
make[1]: *** [install-includeHEADERS] Error 1
make[1]: Leaving directory `/users/corsepiu/autobug-0.1'
make: *** [install-am] Error 2
=> automake tries to create the directory, though it is not used.
This only happens if using include_HEADERS, but doesn't happen with my 1
example (include_foo_HEADERS).
Wouldn't rewriting the installation rules into something similar to
this:
if test x'$(xxx_HEADERS)' != x; then mkdir $xxxdir; \
list='$(xxx_HEADERS)'; for i in $$list; do \
[..]
fi
help?
Ralf