[OpenAFS-devel] pinstall versus install-sh

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 22 Dec 2005 14:18:52 -0500


On Thursday, December 22, 2005 09:45:29 AM -0800 Russ Allbery 
<rra@stanford.edu> wrote:

> Jim Rees <rees@umich.edu> writes:
>
>> Why would we have to re-write Makefiles?  For most of them, isn't it
>> just a matter of changing $INSTALL in src/config/Makefile.config?
>
> If /usr/local/bin doesn't exist,
>
>     install foo /usr/local/bin
>
> installs foo as the file /usr/local/bin.
>
>     pinstall foo /usr/local/bin
>
> creates the directory /usr/local/bin and puts foo in it.  I'd want to
> change all of the Makefiles to explicitly list the installation target to
> avoid any ambiguity.

Also, beware that the default behavior of install-sh is to _move_ the file 
to be installed, rather than copying it.  This has the unfortunate 
side-effect of destroying the source directory.