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