AlanRosenthal opened a new issue #5205:
URL: https://github.com/apache/incubator-nuttx/issues/5205


   Hi Folks, I've been working to improve the NuttX Makefiles over the last few 
weeks. See my contributions here: 
https://github.com/apache/incubator-nuttx/pulls?q=is%3Apr+is%3Aclosed+author%3AAlanRosenthal
   
   Now that I'm more familiar with the codebase/Makefiles, I have some higher 
level thoughts on how to improve the Makefiles. This is a loose plan, but I'd 
appreciate any feedback / guidance!
   
   Today, the configure and build stages are slightly intermingled. We should 
create a clear separation. This will both improve developer ergonomics, but 
will enable faster incremental builds.
   My proposal is:
   the **configure stage** is responsible for:
   * Generating the .config file
   * Setting up symlinks
   * Extracting tar files if required
   
   The **build stage** is responsible for:
   * Generating the nuttx elf
     * Generating the .a files that the nuttx elf requires
       * Generating the .o files that the .a files require
         * Generating the .c/.h files that the .o files require
   * Running Post-build commands
   
   The best way to isolate these stages, is to create separate Makefiles for 
the configure and build stage. For example, instead of the context rule 
existing in Unix.mk, it will exist in UnixConfigure.mk.
   
   Any changes to the configuration stage, will first require a clean build, to 
ensure that everything is in the correct state.
   Any changes to the build stage, will not require the configuration stage to 
be rerun.
   
   cc @Ouss4 @xiaoxiang781216 @gustavonihei 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to