markfinal/BuildAMation

Where to write built SDKs and cache them

Opened this issue · 0 comments

I've been pondering how to create SDKs (#398) for a while. An extra bonus of doing this would be to hive off SDKs out of the current build root, so that they are not deleted, but instead can be re-used. This would dramatically reduce build times.

This would also pave the way for using C++ package managers like Conan, I believe, although BAM does do a lot of management already, so that may not be necessary.

I am thinking that I need to take a page out of other build system's books, and introduce a prefix path. This is where SDK files would be installed, and cleaned separately to the build root.

I'd like to be able to build dependencies standalone, but this would require a rethink on site policies, since building a dependency from source will inherit the site policy of the application, so may build with different options to standalone.
You could also build dependencies within application, and then hive off the SDKs to their respective prefix paths.

In these prefix paths, a .cs script is needed that allows integration as prebuilts into another build step, so the part of 'installing' will also need to write BAM scripts. Reading this in will need to do the same as for other packages and set up resources for package directories.

A full build of an application could then hive off all SDKs, so that the subsequent build will pick up the install prefixes.
There must be an option to switch out a dependency from an installed build to a source build, including adding this to a generated IDE project. This may be a dumb option, like deleting the BAM install prefix for the dependency, although I'd prefer something more concrete so that you can interatively build.