author | dcherepanov |
Thu, 09 Jul 2009 15:18:50 -0400 | |
changeset 3233 | abdab1f90b46 |
parent 2967 | faa3111c009c |
child 3879 | 0d9209bdf36c |
permissions | -rw-r--r-- |
6 | 1 |
# |
2204 | 2 |
# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved. |
6 | 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 |
|
7 |
# published by the Free Software Foundation. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun in the LICENSE file that accompanied this code. |
|
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 |
# |
|
21 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
24 |
# |
|
25 |
||
26 |
# Makefile for jaxp: wrapper around Ant build.xml file |
|
27 |
||
28 |
# |
|
29 |
# On Solaris, the 'make' utility from Sun will not work with these makefiles. |
|
30 |
# This little rule is only understood by Sun's make, and is harmless |
|
31 |
# when seen by the GNU make tool. If using Sun's make, this causes the |
|
32 |
# make command to fail. |
|
33 |
# |
|
34 |
SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 |
|
35 |
||
36 |
ifdef QUIET |
|
37 |
ANT_OPTIONS += -quiet |
|
38 |
endif |
|
39 |
||
40 |
ifdef VERBOSE |
|
41 |
ANT_OPTIONS += -verbose |
|
42 |
endif |
|
43 |
||
44 |
ifdef JDK_VERSION |
|
45 |
ANT_OPTIONS += -Djdk.version=$(JDK_VERSION) |
|
46 |
endif |
|
47 |
||
48 |
ifdef FULL_VERSION |
|
49 |
ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces |
|
50 |
endif |
|
51 |
||
52 |
ifdef MILESTONE |
|
53 |
ANT_OPTIONS += -Dmilestone=$(MILESTONE) |
|
54 |
endif |
|
55 |
||
56 |
ifdef BUILD_NUMBER |
|
57 |
ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER) |
|
58 |
else |
|
59 |
ifdef JDK_BUILD_NUMBER |
|
60 |
ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER) |
|
61 |
endif |
|
62 |
endif |
|
63 |
||
64 |
ifeq ($(VARIANT), DBG) |
|
65 |
ANT_OPTIONS += -Djavac.debug=true |
|
66 |
else |
|
67 |
ifeq ($(VARIANT), OPT) |
|
68 |
ANT_OPTIONS += -Djavac.debug=false |
|
69 |
endif |
|
70 |
endif |
|
71 |
||
2830
2c7571fb9056
6829575: 100028: Debug information is incomplete or missing
aph
parents:
2204
diff
changeset
|
72 |
ifeq ($(DEBUG_CLASSFILES), true) |
2c7571fb9056
6829575: 100028: Debug information is incomplete or missing
aph
parents:
2204
diff
changeset
|
73 |
ANT_OPTIONS += -Djavac.debug=true |
2c7571fb9056
6829575: 100028: Debug information is incomplete or missing
aph
parents:
2204
diff
changeset
|
74 |
endif |
2c7571fb9056
6829575: 100028: Debug information is incomplete or missing
aph
parents:
2204
diff
changeset
|
75 |
|
6 | 76 |
# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN) |
77 |
# and the somewhat misnamed CLASS_VERSION (-target NN) |
|
78 |
ifdef TARGET_CLASS_VERSION |
|
79 |
ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION) |
|
80 |
else |
|
81 |
ifdef JAVAC_TARGET_ARG |
|
82 |
ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG) |
|
83 |
endif |
|
2966 | 84 |
endif |
85 |
||
86 |
ifdef SOURCE_LANGUAGE_VERSION |
|
87 |
ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION) |
|
88 |
else |
|
89 |
ifdef JAVAC_SOURCE_ARG |
|
90 |
ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG) |
|
91 |
endif |
|
92 |
endif |
|
6 | 93 |
|
94 |
ifdef ALT_BOOTDIR |
|
95 |
ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR) |
|
96 |
endif |
|
97 |
||
98 |
ifdef ALT_OUTPUTDIR |
|
99 |
OUTPUTDIR = $(ALT_OUTPUTDIR) |
|
100 |
ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build |
|
101 |
ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist |
|
102 |
else |
|
103 |
OUTPUTDIR = .. |
|
104 |
endif |
|
105 |
||
106 |
ifdef ALT_LANGTOOLS_DIST |
|
107 |
ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap |
|
108 |
endif |
|
109 |
||
110 |
ifdef FINDBUGS_HOME |
|
111 |
ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME) |
|
112 |
endif |
|
113 |
||
114 |
ifdef ANT_HOME |
|
115 |
ANT = $(ANT_HOME)/bin/ant |
|
116 |
ifneq ($(shell test -x $(ANT); echo $$?), 0) |
|
117 |
$(error "$(ANT) not found; please update ANT_HOME") |
|
118 |
endif |
|
119 |
else |
|
120 |
ANT = ant |
|
121 |
ifneq ($(shell which $(ANT) > /dev/null; echo $$?), 0) |
|
122 |
$(error "\"ant\" not found; please set ANT_HOME or put \"ant\" on your PATH") |
|
123 |
endif |
|
124 |
endif |
|
125 |
||
126 |
# Default target and expected 'do everything' target |
|
127 |
all: build |
|
128 |
||
129 |
# Standard make clobber target |
|
130 |
clobber: clean |
|
131 |
||
132 |
# All ant targets of interest |
|
133 |
ANT_TARGETS = build clean sanity # for now |
|
134 |
||
135 |
# Create a make target for each |
|
136 |
$(ANT_TARGETS): |
|
137 |
$(ANT_JAVA_HOME) $(ANT) -version |
|
138 |
$(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@ |
|
139 |
||
140 |
# Targets for Sun's internal JPRT build system |
|
153
510a9a867e27
6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents:
6
diff
changeset
|
141 |
JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip |
6 | 142 |
jprt_build_product jprt_build_debug jprt_build_fastdebug: all |
153
510a9a867e27
6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents:
6
diff
changeset
|
143 |
$(RM) $(JPRT_ARCHIVE_BUNDLE) |
510a9a867e27
6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents:
6
diff
changeset
|
144 |
( cd $(OUTPUTDIR)/dist && \ |
510a9a867e27
6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents:
6
diff
changeset
|
145 |
zip -q -r $(JPRT_ARCHIVE_BUNDLE) . ) |
6 | 146 |
|
147 |
# Declare these phony (not filenames) |
|
148 |
.PHONY: $(ANT_TARGETS) all clobber \ |
|
149 |
jprt_build_product jprt_build_debug jprt_build_fastdebug |