Commit graph

2 commits

Author SHA1 Message Date
Colin Cross
463a90e587 use init functions to register module types, etc.
Instead of putting all the blueprint registrations in soong_build,
put them all in init() functions.  This puts the registration next
to the implementation.

Change-Id: Ide1a749518f5e9d1367a18ab3bb1d91da3310c76
2015-07-09 17:57:18 -07:00
Colin Cross
68f55102da Support dependencies on environment variables
Ninja can't depend on environment variables, so modifying build
behavior based on environment variables requires coordinating
between the soong script that invokes ninja and the soong_build
manifest generator.

Allow any module to call Config.Getenv to get the contents of an
environment variable while registering a dependency on it.
After all modules have been processed write out the state of
all used environment variables to a JSON file called
.soong.environment.  During the next build the soong script
will use the soong_env tool to compare the contents of
.soong.environment to the current environment, and force a
build manifest regeneration by deleting the .soong.environment
file if any variables have changed.

Change-Id: Id0d81933a857bc2fc1cd7a393a3c6cec73dc4824
2015-03-26 14:13:49 -07:00