re: request for feature: umask control with GNU make

Brian Vandenberg <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Organization http://groups.google.com
Message-ID <[email protected]>
This is in response to an older thread from quite a few years back:
http://groups.google.com/group/gnu.utils.bug/browse_thread/thread/277afe41cc5c0d67/22cc0a52143931ea?lnk=st&q=makefile+umask&rnum=1&hl=en&pli=1

The original problem and suggested solution were: how to control umask
globally from the makefile (assuming make never implemented a native
feature for it), and the suggested solution was:

SHELL = umask 002; exec /bin/sh

This approach only works on some platforms.  In Solaris, for example,
it causes segfaults.

A more robust solution (using bash; I'm sure there's an 'sh'
equivalent):

SHELL = /bin/bash --noprofile -c 'umask 002; shift; eval "$$2"' --

-Brian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.