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

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

 



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

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux