Mozilla code base is really huge and has variety of files which are built in a variety of ways. It was sort of always confusing for me to figure out where all I should run make after I change any of the files. I generally asked on the IRC and someone just told me where to run make.
Today it was the same thing. But I also thought I would as well learn the logic to decide for myself the next time. Here is the chat transcript of NeilAway answering these questions.
The MDC page (https://developer.mozilla.org/en/Incremental_Build) has almost the same content for the native code. Neil here explains it for all the types of files involved.
Also to add to the following things running : "make check" from the objdir will run the automated tests.
- For xul/js/css/xbl it usually suffices to find the jar.mn (it may be in an ancestor folder) and make realchrome in the corresponding objdir
- For idl you're often looking at a full rebuild, depending on how widely it's used
- For .cpp and .h you obviously have to make in the folder itself, and then look for a corresponding build folder
- Except for uriloader where you use docshell/build and content, dom, editor and view use layout/build
- If you're building libxul or static then this is all wrong
- You don't look for a build folder, I think for libxul you build in toolkit/library and for static you build in browser/app