2
|
1 |
#
|
5506
|
2 |
# Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
|
2
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
#
|
|
5 |
# This code is free software; you can redistribute it and/or modify it
|
|
6 |
# under the terms of the GNU General Public License version 2 only, as
|
5506
|
7 |
# published by the Free Software Foundation. Oracle designates this
|
2
|
8 |
# particular file as subject to the "Classpath" exception as provided
|
5506
|
9 |
# by Oracle in the LICENSE file that accompanied this code.
|
2
|
10 |
#
|
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
# accompanied this code).
|
|
16 |
#
|
|
17 |
# You should have received a copy of the GNU General Public License version
|
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
#
|
5506
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
# or visit www.oracle.com if you need additional information or have any
|
|
23 |
# questions.
|
2
|
24 |
#
|
|
25 |
|
|
26 |
# WARNING: This file is shared with other workspaces.
|
|
27 |
# So when it includes other files, it must use JDK_TOPDIR.
|
|
28 |
#
|
|
29 |
|
|
30 |
include $(JDK_TOPDIR)/make/common/Rules.gmk
|
|
31 |
|
|
32 |
#
|
|
33 |
# Say you built classes into $(ALT_CLASSBINDIR) and then at the end of
|
|
34 |
# the build you might want to copy them over to $(ALT_CLASSDESTDIR);
|
|
35 |
# this rule takes care of that. No one should really set these
|
|
36 |
# variables except the bootstrap/recompile stage of the java compiler.
|
|
37 |
#
|
|
38 |
ifdef ALT_CLASSBINDIR
|
|
39 |
|
|
40 |
# By default post-processing is copying. Suppose you want to build
|
|
41 |
# a jar file then set ALT_CLASSES_DISPOSITION to '../../dest/nameof.jar'
|
|
42 |
# before including this file.
|
|
43 |
ifndef ALT_CLASSES_DISPOSITION
|
|
44 |
ALT_CLASSES_DISPOSITION = copy-classes
|
|
45 |
endif
|
|
46 |
|
|
47 |
build : $(ALT_CLASSES_DISPOSITION)
|
|
48 |
|
|
49 |
copy-classes:
|
|
50 |
ifneq ($(ALT_CLASSBINDIR), $(ALT_CLASSDESTDIR))
|
|
51 |
@if [ -s $(TEMPDIR)/.classes.list ]; then \
|
|
52 |
$(MKDIR) -p $(ALT_CLASSDESTDIR); \
|
|
53 |
$(ECHO) "Copying $(ALT_CLASSBINDIR)..."; \
|
|
54 |
$(ECHO) "($(CD) $(ALT_CLASSBINDIR); $(TAR) cf - .) | \
|
|
55 |
($(CD) $(ALT_CLASSDESTDIR); $(TAR) xf -)"; \
|
|
56 |
($(CD) $(ALT_CLASSBINDIR); $(TAR) cf - .) | \
|
|
57 |
($(CD) $(ALT_CLASSDESTDIR); $(TAR) xf -); \
|
|
58 |
fi
|
|
59 |
else # ALT_CLASSBINDIR
|
|
60 |
@if [ -s $(TEMPDIR)/.classes.list ]; then \
|
|
61 |
$(ECHO) "Copy source and destination are the same: $(ALT_CLASSBINDIR) -- Copy skipped..."; \
|
|
62 |
fi
|
|
63 |
endif # ALT_CLASSBINDIR
|
|
64 |
|
|
65 |
.PHONY: copy-classes
|
|
66 |
endif # ALT_CLASSBINDIR
|
|
67 |
|