Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flag files to hack dependencies #146

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ThinkerYzu
Copy link
Contributor

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.

echo Extracting binary blobs from device, which should be plugged in! ... && \
./extract-files.sh && \
echo OK
touch $(GONK_PATH)/.galaxy-s2-extract
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prevent config-galaxy-s2 from downloading blobs from devices every time. It survives even after |make clean| or |make config-*|.

@joneschrisg
Copy link
Collaborator

@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.]

@ThinkerYzu
Copy link
Contributor Author

@cgjones sorry! Got it.

@joneschrisg
Copy link
Collaborator

@michaelwu can you take a look at this? You've been fighting the build system much more bravely and heroically than I :).

@andreasgal
Copy link
Owner

This is out of date. Still needed?

@joneschrisg
Copy link
Collaborator

Yes, this work hels us get rid of the make gonk && blah hackery. |make flash| should do the right thing.

@michaelwu
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants