Book Image

OpenJDK Cookbook

Book Image

OpenJDK Cookbook

Overview of this book

Table of Contents (20 chapters)
OpenJDK Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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.

  1. First, let's build OpenJDK for the first time:

    make all
    
  2. This will take some time, so have a cup of tea.

  3. Then, we will build it for the second time:

    make all
    
  4. You can see from the input that nothing was actually built.

  5. Then, let's insignificantly change some source file (for example, cardTableModRefBS.cpp).

  6. Let's make OpenJDK again, but this time we will grep the output:

    make all | grep -i .cpp
    
  7. We see that, in the output, only...