[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: request for feature: umask control with GNU make
From: |
Brian Vandenberg |
Subject: |
re: request for feature: umask control with GNU make |
Date: |
Wed, 28 Mar 2012 18:24:11 -0000 |
User-agent: |
G2/1.0 |
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
- re: request for feature: umask control with GNU make,
Brian Vandenberg <=