[nycbug-talk] umask in Makefile

George Georgalis george
Tue Jan 31 19:14:26 EST 2006


On Tue, Jan 31, 2006 at 03:21:06PM -0500, Johnny Lam wrote:
>George Georgalis wrote:
>>Is there any way to set the umask within a makefile for all the
>>files it creates? with a default umask of 002 in my shell, I'd
>>like to have make use 022 without starting each line that creates
>>a file with "umask 022 ;"
>>
>>I don't particulary want to write a wrapper to call make, but that
>>seems the only way. Ideas?
>
>I think that's the only sane way to do it with BSD make.  The other 
>ways, e.g. hacking the file named by $ENV, etc., are all too gimmicky. 
>Alternatively, you could just fix permissions after the targets are 
>created -- that's what I do for some simple websites that I manage using 
>makefiles.

"fix permissions after" is probably the better way, eg extract to
$PWD/target/ then "install" target to /$PREFIX however in this
case writing to /$PREFIX is perfectly fine and the next one off
in 1/2 time makes it a better option sometimes... I'm gona try
defining SHELL and see what happens ;)

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george at galis.org



More information about the talk mailing list