Re: remove zephyr-env.sh


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

On Wed, 2016-04-20 at 19:35 +0000, Cufi, Carles wrote:
Hi Inaky,

From: Perez-Gonzalez, Inaky [mailto:inaky.perez-gonzalez(a)intel.com]
 
https://jira.zephyrproject.org/browse/ZEP-211 has been entered to
track
a proposal to remove zephyr-env.sh.

<<from the ticket>>
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. 
I might be mistaken but I believe ZEPHYR_BASE is indeed set by
zephyr-env.sh, so it does not need to be set manually. In fact I ran
into an issue where I had my own ZEPHYR_BASE set to
"/home/me/src/zephyr" but was working on a separate
"/home/me/src/zephyr-upstream/" copy of the repo and my changes to
Kconfig obviously never showed up, leaving me puzzled. It is somehow
convenient to be able to set the ZEPHYR_BASE to whatever copy of the
repo one is building, but it would be even better if make itself
would do that when building instead, based on the path where one
executes it.
to avoid those issues I usually run make ZEPHYR_BASE=DIR <blah>, which
is kind of more verbose, but gets the trick done.

However, I hear your call. I think it's worthwhile to consider the
posibility of having the Makefile "look" for the source (looking in top
level directories, following a symlink, $ZEPHYR_BASE or fail) -- the
trick is how to do it so it does not require a huge chunk of code in
each app's Makefile (it can't be in a library as we'd have to point to
it)

By the way, and as a side comment, paths containing "~" do not seem
to work in ZEPHYR_BASE and <toolchain>_TOOLCHAIN_PATH. Instead one
has to explicitly set "/home/me".
Mind filing a ticket for it, please?

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