Understanding OpenJDK 6 and 7 incremental builds
The process of OpenJDK compilation is very time consuming. It is very boring, especially when one is developing a small part of the whole project, which needs full recompilation for testing purposes. To do it in a simple way and to compile only the necessary parts, there are incremental builds.
Getting ready
We need to download the OpenJDK (6 or 7) source code. You may need libmotif installed. Windows users may need to install Cygwin.
How to do it...
We will see how OpenJDK is built incrementally, avoiding adding any nasty bugs.
First, let's build OpenJDK for the first time:
make allThis will take some time, so have a cup of tea.
Then, we will build it for the second time:
make allYou can see from the input that nothing was actually built.
Then, let's insignificantly change some source file (for example,
cardTableModRefBS.cpp).Let's
makeOpenJDK again, but this time we willgrepthe output:make all | grep -i .cppWe see that, in the output, only...