On 2012-03-20 16:01 +0200, Andrew W. Nosenko wrote:
> On Tue, Mar 20, 2012 at 15:47, Nick Bowler <nbow...@elliptictech.com> wrote:
[...]
> >  SUFFIXES = .sh
> >
> >  .sh:
> >        $(shbin_verbose) cp $< $@.tmp
> >        $(AM_V_at) chmod +x $@.tmp
> >        $(AM_V_at) mv -f $@.tmp $@
> >
> 
> Why do not use install(1) instead of cp(1)+chmod(1) or cp(1)+chmod(1)+mv(1)?

Unfortunately, use of the install tool is not portable (it's not even in
POSIX).  However, automake-using packages provide a replacement on
systems where a working install tool is not available.

Therefore, in this instance, you could alternately use a single call to
$(INSTALL) (which gets set appropriately by AC_PROG_INSTALL) instead of
the 3-command dance above.

On the other hand, install ignores the process umask (unlike the above),
which is appropriate when installing files to the system, but may not be
suitable for files the build tree.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)


Reply via email to