[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54804] mex does not support setting environme
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #54804] mex does not support setting environment variables on command line |
Date: |
Tue, 9 Oct 2018 18:47:03 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 |
Update of bug #54804 (project octave):
Severity: 3 - Normal => 1 - Wish
Priority: 5 - Normal => 3 - Low
Item Group: Matlab Compatibility => Feature Request
Status: None => Need Info
Summary: mex.m does not support setting flags in the same
manner as the Matlab implementation => mex does not support setting
environment variables on command line
_______________________________________________________
Follow-up Comment #1:
This does seem like an interesting and useful feature to integrate into the
compiler wrapper. Maybe we want to include the same syntax in mkoctfile as
well.
Does this apply to calling the mex program directly as well? It does seem to
if I read the Matlab help page correctly. This means it's not just a feature
of the mex.m wrapper function, it needs to be supported in the mkoctfile
program itself.
Is there a discrete list of environment variables that can be passed this way?
Does it accept any argument that looks like an environment variable? Does it
have to be all uppercase or will it accept 'cflags=-g' for example? Will it
accept 'OCTAVE=yes'? Can you think of a way to test whether that sets a custom
environment variables?
The other interesting bit is that it looks like mex parses the value of the
environment variable and does parameter expansion itself. The docs say to use
single quotes, for example CXXFLAGS='$CXXFLAGS -Wall' as you showed. The
single quotes means that the shell isn't expanding that, the mex program must
be doing that expansion itself.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54804>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/