[asterisk-dev] [Code Review] Makefile clean-up

paul.belanger at polybeacon.com paul.belanger at polybeacon.com
Thu Jul 22 21:18:10 CDT 2010



> On 2010-07-12 18:12:24, Tilghman Lesher wrote:
> > /trunk/Makefile, lines 566-575
> > <https://reviewboard.asterisk.org/r/654/diff/4/?file=11537#file11537line566>
> >
> >     Could you be more explicit about what the benefit of using install is here?  Frankly, I don't see the point of checking whether the directory exists first; it appears that install already does that check by itself.
> 
> pabelanger wrote:
>     I figured it would help _clean_ up the install.  From what I was seeing $(INSTALL) would attempt the re-create the directory everytime you installed. I just added this logic today.  I'll review the possible benefits / downsides.

After more testing today, I would like to bring back this check to see if the directory exists.  It seems $(INSTALL) will blindly overwrite any existing directory and permissions, regardless if the directory already exists.

For example:

$(INSTALL) -d -m 750 -o asterisk -g asterisk /usr/sbin

Will overwrite the existing root:root permissions.

So, we are back to the original code to check if the directory exists, if not create it.


- pabelanger


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/654/#review2370
-----------------------------------------------------------


On 2010-07-16 17:57:16, pabelanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/654/
> -----------------------------------------------------------
> 
> (Updated 2010-07-16 17:57:16)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Various changes to Makefile, prefer install over mkdir, mv, chmod and chgrp.
> 
> Preface for unprivileged installations.
> 
> 
> Diffs
> -----
> 
>   /trunk/Makefile 276612 
>   /trunk/agi/Makefile 276612 
>   /trunk/sounds/Makefile 276612 
> 
> Diff: https://reviewboard.asterisk.org/r/654/diff
> 
> 
> Testing
> -------
> 
> Much more testing required. Only tested with Ubuntu.
> 
> 
> Thanks,
> 
> pabelanger
> 
>




More information about the asterisk-dev mailing list