User:Timdream/Gaia build requirements
Gaia build requirements
Status: personal note to what's needed for Gaia build script.
- Split steps into configure/config.status/build steps, copying what's done in GNU Build System and Gecko.
- Allow developer to specify build_stage dir (similar to objdir-gecko)
- Allow developer to reuse different favor of builds by switching between build_stage dirs.
- Properly set Makefile rules, reuse what's cached in build_stage and don't re-run steps and commands when the source did not change.
- no-op build should be as fast as possible.
- Provide Makefile (w/ exact file name) in dirs within build_stage so that people can |make -C dir| to run a subset of build commands within that dir.
- Block user from invoking the above command to ensure the correctness of the build ("STOP! Configure has changed. Please re-run from source dir.” and |exit 1|):
- when build config changes (per build_stage dir)
- when configure source script changes
Interface with app build scripts
- Provide a hook to sub-project in the source tree (e.g. we will call |configure| and/or |make| on the source dir of the app and pass all the arguments) and let it build
- Provide a hook to sub-project to specify it's own set of output files, so our follow-up commands (packing etc) can depend on them, OR,
- When the sub-project build command unable to produce the list of output files, properly set our commands as PHONY targets that runs every time when it's build script is run.
- No logic in $GAIA/Makefile