Re: remove zephyr-env.sh


Perez-Gonzalez, Inaky <inaky.perez-gonzalez@...>
 

On Wed, 2016-04-20 at 19:53 +0000, Boie, Andrew P wrote:

From: Perez-Gonzalez, Inaky [mailto:inaky.perez-gonzalez(a)intel.com]
Currently we require the user to source the zephyr-env.sh
environment to
set up the build environment. This is awkward; things build fine
without
it and the user still has to manually setup ZEPHYR_BASE,
ZEPHYR_GCC_VARIANT and ZEPHYR_SDK_INSTALL_DIR. zephyr-env.sh has
grown to
I don't believe this is the case.

You do have to set ZEPHYR_GCC_VARIANT and ZEPHYR_SDK_INSTALL_DIR. I
put them in my .bashrc:

export ZEPHYR_GCC_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk/

However, ZEPHYR_BASE is specific to what Zephyr tree you are working
in. I personally have several that I work in. This is not something I
would want to globally set in my .bashrc. At minimum we would need to
transplant this logic to the Makefiles.
Certainly, ZEPHYR_BASE is tree-specific (so could be the other in
certain cases, but uncommon). I also do set it manually (in fact, as I
said somewhere, I feed it to make's command line)

From looking at the script it additionally:

1. Appends the ZEPHYR_BASE/scripts directory to the PATH
This is the only one that might have some use--however, it still forces
you to work on the same session; if you fly through windows and tabs,
like I do, it's not as useful.

2. Sources ~/.zephyrrc if it exists (not sure what the use-case for
this is, I don't personally use it).
I haven't heard of anyone ever using this (hopefully they'll come up in
this thread).

Both of these seem optional, but to run stuff like sanitycheck from
the command line you'd have to include a full path.
Can we fold a 'make sanitycheck'-like solution? After all, if we can
figure out access to the Makefile, we can use it for accessing the
scripts too?

Join devel@lists.zephyrproject.org to automatically receive all group messages.