Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hashed library builds - environment variables #1758

Closed
frankdownunder opened this issue Jul 8, 2019 · 1 comment
Closed

Hashed library builds - environment variables #1758

frankdownunder opened this issue Jul 8, 2019 · 1 comment

Comments

@frankdownunder
Copy link
Contributor

With regard to to hashed library builds - #1724, I noticed the following sllghtly quirky thing:
cd Basic_Blink
export SMING_ARCH=Host
make
export SMING_ARCH=Esp8266
make

I would have expected the second invocation of make to use the different Arch setting. Passing it on the command line works as expected.

@mikee47
Copy link
Contributor

mikee47 commented Jul 8, 2019

If you haven't found Sming/building.md have a read, hopefully make things clearer.

This behaviour is by design. Cached variables always take priority over the environment (including project makefile / component.mk settings and Eclipse). Some advantages:

  • Switching between eclipse and CLI is simpler because they'll use the same settings, regardless of what's been set elsewhere.
  • Variables are stored with each project (and build type)
  • If computer is rebooted, crashes, etc. you can get straight back to where you were without having to run a load of exports.

To get your example to work, do this:

cd Basic_Blink
export SMING_ARCH=Host
make
export SMING_ARCH=Esp8266
make config-clean
make

but the easier way is:

cd Basic_Blink
make SMING_ARCH=Host
make SMING_ARCH=Esp8266

And you don't have to set the variables every time you run the command. See make list-config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants