Use flag files to hack dependencies#146
Use flag files to hack dependencies#146ThinkerYzu wants to merge 12 commits intoandreasgal:masterfrom
Conversation
There was a problem hiding this comment.
Prevent config-galaxy-s2 from downloading blobs from devices every time. It survives even after |make clean| or |make config-*|.
|
@ThinkerYzu these changes look righteous, but in the future please split work into smaller chunks. There are several orthogonal projects contained in these patches. Putting them all together makes review much harder, which means more waiting time. [Edit: with a separate pull request per chunk.] |
|
@cgjones sorry! Got it. |
|
@michaelwu can you take a look at this? You've been fighting the build system much more bravely and heroically than I :). |
|
This is out of date. Still needed? |
|
Yes, this work hels us get rid of the make gonk && blah hackery. |make flash| should do the right thing. |
|
It's not really needed for the make gonk && make hack. The proper fix is to integrate into the android build system, which someone has already done. |
The flag files, here, mean files as timestamps to track changes and updates of a set of files or modules. This branch uses flag files as placeholders of files and modules to define makefile rules. For example, we use .gecko-chg as the flag file for all source files of gecko. The flag file will be touched for changes of source files. We use .gecko-build-done as the flag file for all binary files or data files generated from gecko source files. .gecko-build-done depends on .gecko-chg. Once .gecko-chg have been touched for changes of source files, rules for .gecko-build-done are triggered.
MAKE_CHANGE_FLAG is a macro defined in Makefile of B2G for this branch. It provides a framework to define flag files. For any flag "foo", it defines two flag files, ".foo-chg" and ".foo-build-done". Once you define flag "foo" in Makefile, it checks source files of given modules and update ".foo-chg" for necessary before doing any task (any target). For more information of MAKE_CHANGE_FLAG, check definitions and use cases in Makefile.
This branch also makes gecko and gaia as a part of building process of gonk. glue/gonk/vendor/mozilla/gonk/Android.mk defines modules for gecko and gaia. They call back to *-gonk-install targets in /Makefile of B2G. It avoids to call building system of gonk for multiple times, and save time. Once any source file of gonk, gecko and gaia is changed, relative modules are rebuilt automatically. For example, it takes 15s for changes of gaia to build system image. It takes 1.5s to check soruce files for my desktop if nothing have been changed.