Mostly true for jdk7 except that the control/make/Makefile
is now at the top of the repository forest.
The Mercurial transition moved the control files to the outermost
enclosing repository, and the Makefile to the very top.

Some of it doesn't make sense for the openjdk because there is no 'deploy' or
'motif' sources in the openjdk.

-kto


Ted Neward wrote:
Kelly—

How much of this blog post is still true?

Ted Neward

Java, .NET, XML Services

Consulting, Teaching, Speaking, Writing

http://www.tedneward.com

*Feed:* Kelly O'Hair's Blog
*Posted on:* Friday, December 15, 2006 11:04 AM
*Author:* kellyohair
*Subject:* JDK6 Build Cheat Sheet

JDK6 Build Cheat Sheet Just thought I'd list a few ways that the JDK can be built. These apply to JDK6 and JDK7, JDK5 building is a little different but has some of the same settings. The gnumake used...


View article... <http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html>

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.9/1197 - Release Date: 12/25/2007 8:04 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.13/1208 - Release Date: 1/3/2008 3:52 PM


------------------------------------------------------------------------

The Source for Java Technology Collaboration <http://www.java.net>        
*User:* *Password:*
* Register <https://www.dev.java.net/servlets/Join> | Login help <https://www.dev.java.net/servlets/TLogin> *

My pages <https://www.dev.java.net/servlets/StartPage> Projects <http://community.java.net/projects/> Communities <http://community.java.net> java.net <http://www.java.net>


*Get Involved*
java-net Project <https://java-net.dev.java.net/>
Request a Project <http://www.java.net/request_project.csp>
Project Help Wanted Ads <http://community.java.net/help_wanted/>
Publicize your Project <http://community.java.net/projects/publicize.csp>
Submit Content <http://today.java.net/cs/user/create/bl>
*Get Informed*
About java.net <http://www.java.net/about.csp>
Articles <http://today.java.net/pub/q/articles>
Blogs <http://weblogs.java.net/>
Events <http://www.java.net/events>
Also in Java Today <http://today.java.net/today/alsotoday.csp>
java.net Online Books <http://safari.java.net>
java.net Archives <http://today.java.net/today/archive/>
*Get Connected*
java.net Forums <http://forums.java.net>
Wiki <http://wiki.java.net/> and Javapedia <http://wiki.java.net/bin/view/Javapedia/WebHome> People <http://wiki.java.net/bin/view/People/WebHome>, Partners <http://partners.java.net>, and Jobs <http://wiki.java.net/bin/view/Javanet/JobsWiki>
Java User Groups <http://community.java.net/jugs/listing.csp>
RSS Feeds <http://today.java.net/pub/q/rsschannels>
*Search*
Web and Projects:

Online Books:

Advanced Search <http://www.java.net/search.csp>

        
        
Syndicate this blog (XML) <http://weblogs.java.net/blog/kellyohair/index.rdf>
Kelly O'Hair


    Kelly O'Hair's Blog <http://weblogs.java.net/blog/kellyohair/>

«My Dog is now Open Source <http://weblogs.java.net/blog/kellyohair/archive/2006/11/my_dog_is_now_o.html> | Main <http://weblogs.java.net/blog/kellyohair/> | My Ant Adventure (Updated 1/23/2007) » <http://weblogs.java.net/blog/kellyohair/archive/2007/01/my_ant_adventur.html>


      JDK6 Build Cheat Sheet

Posted by *kellyohair* on December 15, 2006 at 11:04 AM | Comments (2) <http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html#comments>


    JDK6 Build Cheat Sheet

Just thought I'd list a few ways that the JDK can be built. These apply to JDK6 and JDK7, JDK5 building is a little different but has some of the same settings. The |gnumake| used here is the GNU make 3.78.1 or newer.

    * On Solaris systems with the Companion CD installed, it can usually
      be found with the name |gmake| in |/usr/sfw/bin/| or |/opt/sfw/bin/|.
    * On Linux just use |make| from |/usr/bin/|
    * On Windows and using CYGWIN, just use |make| from CYGWIN's
      |/usr/bin/| (but make sure it's not 3.81, which seems to have
      taken away the ability to use paths with the ':' character, like
      |C:/anything|.)
    * On Windows with MKS, you will need a GNU make built for MKS.

See the JDK build instructions for more information. <http://download.java.net/jdk6/6u1/promoted/b01/docs/build/README-builds.html#gnumake> *NOTE:* Any variables described below that start with |ALT_| can be set on the |gnumake| command line, or be set in your environment. None of the Makefiles should be setting these variables internally, so no internal make variable setting should change your environment variable setting of them. The command line variable settings will override any setting inside the Makefiles.


      Control Builds

 >From the control/make/Makefile:

    * Build everything for a developer:

      |gnumake dev|
      OR
      |gnumake DEV_ONLY=true|

    * Skip the fastdebug build (just builds the product bits):

      |gnumake SKIP_FASTDEBUG_BUILD=true DEV_ONLY=true|

    * Don't build the fastdebug bits, and skip the hotspot and deploy
      areas:

      |gnumake BUILD_HOTSPOT=false BUILD_DEPLOY=false
      ALT_JDK_IMPORT=/jdk1.6.0 SKIP_FASTDEBUG_BUILD=true DEV_ONLY=true|

    * Build just the j2se debug image:

      |gnumake BUILD_HOTSPOT=false BUILD_DEPLOY=false
      ALT_JDK_IMPORT=/jdk1.6.0 SKIP_FASTDEBUG_BUILD=true
      SKIP_DEBUG_BUILD=false DEV_ONLY=true debug_build|

Here is a short list of the make variables that can be set on the |gnumake| command line:

    * |BUILD_HOTSPOT|

      Set to |false| to avoid building the hotspot VM, but you will need
      to also set |ALT_JDK_IMPORT_PATH| to a built jdk product of the
      same version you are building. I recommend setting this to |false|
      all the time, unless you are changing the hotspot VM.

    * |BUILD_DEPLOY|

      Set to |false| to avoid building javaws or the plugins. I
      recommend setting this to |false| all the time.

    * |BUILD_INSTALL|

      Set to |false| to avoid building install bundles (you should never
      need to do this). I recommend setting this to |false| all the time.

    * |BUILD_J2SE|

      Set to |false| to avoid the core j2se, which is unlikely you'd
      want to do this. I'd leave this one alone, unless you are only
      working on the hotspot VM.

    * |BUILD_MOTIF|

      Set to |false| to avoid building the Motif libraries, but you
      would need to then set |ALT_MOTIF_DIR| to where to get the built
      Motif libraries. This doesn't take long to build so I have never
      played with this, and I'm not even sure it's necessary

    * |NO_DOCS|

      Set to |true| to avoid any javadoc generation.

    * |NO_IMAGES|

      Set to |true| to avoid any images generation. This means the
      creation of the more formal JDK install-like image with the rt.jar
      and tools.jar files. When the images are not built, the JDK is
      left in the |OUTPUTDIR| area as a simple set of |bin|, |lib|,
      |include|, and |classes| directories. Which can be run as-is, but
      do not represent the form that a JDK install image will take. The
      creation of the images is mostly a disk movement activity, and on
      some machines this is very fast, and with others it can be slow.

    * |SKIP_FASTDEBUG_BUILD|

      Set to |true| to skip building any fastdebug bits (a set of -g -O
      built images with full runtime assert checking enabled).

    * |SKIP_DEBUG_BUILD|

      Set to |false| to build the debug images (-g with full runtime
      assert checking).

    * |DEV_ONLY|

      Set to |true| to get the settings: |SKIP_COMPARE_IMAGES=true
      BUILD_INSTALL=false NO_DOCS=true|.

    * |SKIP_COMPARE_IMAGES|

      Set to |true| to avoid a comparison of previous release build
      bundles with the ones you have created. You normally won't want
      this, so always set this to |true|.

    * |ALT_OUTPUTDIR|

      Alternative output directory rather than |control/build|. I
      recommend that the sources and this output directory be on your
      build machines local disk, for best build time performance.

    * |ALT_BOOTDIR|

      Alternative location for a bootstrap JDK, or install image of the
      previously released JDK (e.g. jdk1.5.0 for building jdk1.6.0). You
      really should set this all the time, just to make sure you get a
      local disk copy, for best build time performance. In theory, this
      doesn't have to be jak1.5.0, but could be a newer JDK, even the
      same version being built. But normally it's the previously release
      JDK.

    * |ALT_JDK_IMPORT_PATH|

      Alternative location for a JDK build of the same release as what
      you are building. If you skip building some components, the
      Makefiles will try and copy over the pre-built bits from this
      location, e.g. if you use BUILD_HOTSPOT=false (or don't have a
      |hotspot| directory), then the hotspot built images will be copied
      from this location.

Also try running |gnumake help| for more help on building options.


      J2SE Builds

If you only want to work with the j2se and not the VM, you might consider just going into the |j2se/make| directory and running |gnumake| from there. Just run |gnumake help| for some help.

I'd recommend setting |ALT_BOOTDIR| and |ALT_JDK_IMPORT_DIR| (as described above).


      Hotspot Builds

If you only want to work with the hotspot and not the VM, you might consider just going into the |hotspot/make| directory and running |gnumake| from there. Just run |gnumake help| for some help.

I'd recommend setting |ALT_BOOTDIR| and |ALT_JDK_IMPORT_DIR| (as described above).

Traditionally the hotspot build procedure have differed greatly from the rest of the JDK. This is mostly due to the fact that for the most part, it's more like building a large C++ library rather than anything else. Building each of the platforms was slightly different, for example on Windows the tool |NMAKE.EXE| was used instead of |gnumake|. It's the Makefiles and build scripts in the hotspot/build directory that contain the "real" hotspot build procedures. In JDK6 a |gnumake| Makefile was added at |hotspot/make/Makefile| which will use the Makefiles in the |hotspot/build| area, providing you a more generic hotspot building experience. More experienced hotspot builders may prefer to dive into the |hotspot/build| area.


      Summary

So as you can see, some similarities, some differences between these build rules.

Hope this was helpful, if you have more questions please post comments.

-kto


Bookmark blog post: del.icio.us <http://del.icio.us/post?title=JDK6 Build Cheat Sheet&url=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html> del.icio.us <http://del.icio.us/post?title=JDK6 Build Cheat Sheet&url=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html> Digg <http://digg.com/submit?phase=2&title=JDK6 Build Cheat Sheet> Digg <http://digg.com/submit?phase=2&title=JDK6 Build Cheat Sheet&url=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html> DZone <http://www.dzone.com/links/add.html?url=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html&title=JDK6 Build Cheat Sheet> DZone <http://www.dzone.com/links/add.html?url=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html&title=JDK6 Build Cheat Sheet> Furl <http://www.furl.net/storeIt.jsp?t=JDK6 Build Cheat Sheet&u=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html> Furl <http://www.furl.net/storeIt.jsp?t=JDK6 Build Cheat Sheet&u=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html> Reddit <http://reddit.com/submit?title=JDK6 Build Cheat Sheet&url=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html> Reddit <http://reddit.com/submit?title=JDK6 Build Cheat Sheet&url=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html>


          Comments

Comments are listed in date ascending order (oldest first) | Post Comment <#post>

    *
      Thank you, Kelly, the write up is nice. I was wondering if there
      is a way to build the vm with just the interpreter, as I assume
      that's what you'd do when you start porting it. ---
      * You will need to talk to the HotSpot team about this, try
      sending email to one of the aliases documented at:
      https://openjdk.dev.java.net/hotspot/.
      -kto *

      Posted by: robilad on December 15, 2006 at 09:00 PM

    *
      Very nice! ALT_MOTIF_DIR was created so static/and or different
      builds of motif could be used. Motif used to cause a lot of
      problems on platforms such as ppc etc. We (even before
      blackdown.org) added motif patches for the jdk so needed our own
      libraries. ALT_MOTIF_DIR didn't need to be set in the past, it was
      just an easy method to use different libraries if needed :-) (Just
      for historical sake)... It was also a bit hard to follow the logic
      of the thing (how ALT_MOTIF_DIR worked).
      * I have found that figuring out the ALT_MOTIF_DIR layout was
      bizarre too. Hopefully, someday, we can just use the shared
      library versions on the system. I am not a fan of using static
      libraries, unless there is a critical reason for it.
      -kto *

      Posted by: scotthutinger on December 18, 2006 at 02:25 PM



*Only logged in users may post comments. Login Here </cs/user/login?x-redirect=http://weblogs.java.net/blog/kellyohair/archive/2006/12/jdk6_build_chea.html>.*


This work is licensed under a Creative Commons License <http://creativecommons.org/licenses/by-nc-sa/2.0/>. Creative Commons License <http://creativecommons.org/licenses/by-nc-sa/2.0/>

*Powered by*
Movable Type 3.01D <http://www.movabletype.org>

Feed <http://today.java.net/pub/q/java_net_rss> java.net RSS Feeds <http://today.java.net/pub/q/java_net_rss>

<http://www.sun.com>      
Feedback <https://java-net.dev.java.net/feedback.html> | FAQ <http://java.net/faq.csp> | Press <http://java.net/presscenter/> | Terms of Use <http://java.net/terms.csp> Privacy <http://www.sun.com/privacy/> | Trademarks <http://www.sun.com/suntrademarks/> | Site Map <https://java-net.dev.java.net/sitemap.html> Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation <http://java.net/terms.csp>. Copyright © 1995-2007 Sun Microsystems, Inc.
        
Oreilly Logo <http://www.oreilly.com>Collabnet Logo <http://www.collab.net/>
Powered by Sun Microsystems, Inc.,
O'Reilly and CollabNet

Reply via email to