#
# Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#

#
# Re-compile .java files compiled with a bootstrap compiler with the
# current compiler in the source tree. This is so we always ship
# .class files generated by the latest compiler.
#

BUILDDIR = ../../../..
PACKAGE = java.lang
PRODUCT = java
include $(BUILDDIR)/common/Defs.gmk

#
# Files-to-compile
#

include $(BUILDDIR)/java/java/FILES_java.gmk
include $(BUILDDIR)/java/zip/FILES_java.gmk
FILES_java  = $(JAVA_JAVA_java) $(JAVA_ZIP_java)
ifeq ($(PLATFORM), windows)
FILES_java += $(TARGDIR)java/io/Win32FileSystem.java
else
FILES_java += $(TARGDIR)java/lang/UNIXProcess.java
FILES_java += $(TARGDIR)java/io/UnixFileSystem.java
endif

#
# Override destination directory
#

ALT_CLASSBINDIR   = $(TEMPDIR)/library/newclasses
ALT_CLASSDESTDIR := $(CLASSDESTDIR)
CLASSDESTDIR      = $(ALT_CLASSBINDIR)
CLASSBINDIR       = $(ALT_CLASSBINDIR)

# The javac classpath includes $(SHARE_SRC)/classes so that the build picks up
# the java.text.Normalizer classes, which for licensing reasons are checked
# into the source tree as class files.  The java/redist Makefile will already
# have copied these files into the true CLASSDESTDIR.

JAVAC_CP = "$(ALT_CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes"

#
# Rules
#

include $(BUILDDIR)/common/Classes.gmk

# Don't leave old classes lying around in 'newclasses' !

clean clobber::
	$(RM) -r $(TEMPDIR)/library/newclasses
