autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does mkdir_p use a relative path to install-sh?


From: Ralf Wildenhues
Subject: Re: Why does mkdir_p use a relative path to install-sh?
Date: Thu, 01 Sep 2011 07:41:53 +0200

Hello Benoit,

* tsuna wrote on Wed, Aug 31, 2011 at 11:47:06PM CEST:
> my project includes a shell script where I need to portably create a
> new directory.  I added MKDIR_P="@MKDIR_P@" and I get config.status to
> do the substitution by listing that script in my AC_CONFIG_FILES.
> What I didn't expect is that sometimes the value looks like this:
> (from config.log)
> mkdir_p='$(top_builddir)/../build-aux/install-sh -c -d'
> The issue is that my script is in the build-aux directory itself, so
> the relative path is incorrect for that script.
> It's kinda curious that it uses a relative path when:
> install_sh='$(SHELL) /absolute/path/to/build-aux/install-sh'
> It also means I can't install that script during make install, because
> it will reference the install-sh from the source tree.
> 
> So I was just curious as to why mkdir_p was made to use a relative
> path to install-sh.

So that it could work in a directory with an absolute name that contains
white space.

In your script, you can "cd" to the directory your Makefile is expanded
in, for that it should have the correct relative name to install-sh.

Hope that helps.

Cheers,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]