[Buildroot] [PATCH v2] build: fix umask test
Peter Korsgaard
peter at korsgaard.com
Tue May 31 10:24:53 UTC 2016
>>>>> "Kurt" == Kurt Van Dijck <dev.kurt at vandijck-laurijssen.be> writes:
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -26,7 +26,7 @@
>> >
>> > # Trick for always running with a fixed umask
>> > UMASK = 0022
>> > -ifneq ($(shell umask),$(UMASK))
>> > +ifneq (00$(shell umask | sed -e "s/^0*//g"),$(UMASK))
>>
>> Doesn't this makes the assumption that "umask" will always return a
>> value that starts with two zeros ?
> No.
> the "umask | sed -e ..." strips leading 0's, when present.
> "00$(...)" glues 00 in front of the stripped umask, so it is compatible
> again.
True. I still think moving the SHELL= line to the very top of the file
is a safer/cleaner approach, so the same shell is used everywhere in
Buildroot.
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list