Classes.gmk revision 0
893N/A#
3909N/A# Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved.
893N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
893N/A#
893N/A# This code is free software; you can redistribute it and/or modify it
893N/A# under the terms of the GNU General Public License version 2 only, as
893N/A# published by the Free Software Foundation. Sun designates this
893N/A# particular file as subject to the "Classpath" exception as provided
893N/A# by Sun in the LICENSE file that accompanied this code.
893N/A#
893N/A# This code is distributed in the hope that it will be useful, but WITHOUT
893N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
893N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
893N/A# version 2 for more details (a copy is included in the LICENSE file that
893N/A# accompanied this code).
893N/A#
893N/A# You should have received a copy of the GNU General Public License version
893N/A# 2 along with this work; if not, write to the Free Software Foundation,
2362N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2362N/A#
2362N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
893N/A# CA 95054 USA or visit www.sun.com if you need additional information or
893N/A# have any questions.
893N/A#
893N/A
3471N/A# WARNING: This file is shared with other workspaces.
893N/A# So when it includes other files, it must use JDK_TOPDIR.
893N/A#
893N/A
893N/Ainclude $(JDK_TOPDIR)/make/common/Rules.gmk
893N/A
893N/A#
893N/A# Say you built classes into $(ALT_CLASSBINDIR) and then at the end of
893N/A# the build you might want to copy them over to $(ALT_CLASSDESTDIR);
893N/A# this rule takes care of that. No one should really set these
893N/A# variables except the bootstrap/recompile stage of the java compiler.
893N/A#
893N/Aifdef ALT_CLASSBINDIR
893N/A
893N/A# By default post-processing is copying. Suppose you want to build
893N/A# a jar file then set ALT_CLASSES_DISPOSITION to '../../dest/nameof.jar'
893N/A# before including this file.
893N/Aifndef ALT_CLASSES_DISPOSITION
893N/AALT_CLASSES_DISPOSITION = copy-classes
893N/Aendif
893N/A
893N/Abuild : $(ALT_CLASSES_DISPOSITION)
893N/A
893N/Acopy-classes:
893N/Aifneq ($(ALT_CLASSBINDIR), $(ALT_CLASSDESTDIR))
893N/A @if [ -s $(TEMPDIR)/.classes.list ]; then \
893N/A $(MKDIR) -p $(ALT_CLASSDESTDIR); \
893N/A $(ECHO) "Copying $(ALT_CLASSBINDIR)..."; \
893N/A $(ECHO) "($(CD) $(ALT_CLASSBINDIR); $(TAR) cf - .) | \
893N/A ($(CD) $(ALT_CLASSDESTDIR); $(TAR) xf -)"; \
893N/A ($(CD) $(ALT_CLASSBINDIR); $(TAR) cf - .) | \
893N/A ($(CD) $(ALT_CLASSDESTDIR); $(TAR) xf -); \
893N/A fi
893N/Aelse # ALT_CLASSBINDIR
893N/A @if [ -s $(TEMPDIR)/.classes.list ]; then \
893N/A $(ECHO) "Copy source and destination are the same: $(ALT_CLASSBINDIR) -- Copy skipped..."; \
893N/A fi
893N/Aendif # ALT_CLASSBINDIR
893N/A
893N/A.PHONY: copy-classes
893N/Aendif # ALT_CLASSBINDIR
893N/A
893N/A