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

RFD - Some restructuring of the make and module system #2289

Closed
TerryE opened this issue Mar 4, 2018 · 2 comments
Closed

RFD - Some restructuring of the make and module system #2289

TerryE opened this issue Mar 4, 2018 · 2 comments

Comments

@TerryE
Copy link
Collaborator

TerryE commented Mar 4, 2018

Background

This subject has been triggered by the LFS implementation raised in issue #2068. As I discuss in the whitepaper, in order to enables this I have had to bring the luac.cross build into the main make hierarchy. And part of this is involves some general rationalisations that I am raising for comment here. If thee is no negative feedback then they are getting incorporated into the patch.

Changes

  • app/includes/modules.h contains a number of built-in directives. But in practice these are either mandatory (e.g. base, string, table,) or they were never properly implemented nor tested so won't work (e.g. io and os). Since I don't want to go round a set of useless test cases, the LUA_USE_BUILTIN_* directives will be dropped (and ignored if present). The ones that work are in the core build and the ones that don't aren't.
  • The lua build tools are no longer required so will be removed. The build no longer needs lua to be installed on the host
  • The app/lua/luac_cross sub-make always builds luac.cross
  • luac.cross has an extra -f flag which instructs it to build a LFS image instead of the standard lc binary format.
  • luac.cross has an extra -e flag which allows it to execute a lua source file on the host. This is primarily to support host-based testing of the NodeMCU lua core.
  • The tools spiffsimage target will use luac.cross to compile all lua files in the local/luadirectory into an image which is build into the standard spiffs image.
  • The app Makefile now contains some extra make magic so by default those modules which use an external subdirectory (e.g. mqtt will only have the subdirectory built if the module is enabled.
@TerryE
Copy link
Collaborator Author

TerryE commented Mar 8, 2018

All of these changes will be implemented as part of #2292.

@TerryE TerryE changed the title RFD - Some restructuring of the make amd module system RFD - Some restructuring of the make and module system Mar 8, 2018
@TerryE
Copy link
Collaborator Author

TerryE commented May 23, 2018

No comments and in patch so closing.

@TerryE TerryE closed this as completed May 23, 2018
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

1 participant