Wed, 17 Apr 2013 11:11:33 +0100
8011181: javac, empty UTF8 entry generated for inner class
Reviewed-by: jjg
duke@1 | 1 | # |
katleman@1448 | 2 | # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | # |
duke@1 | 5 | # This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | # under the terms of the GNU General Public License version 2 only, as |
ohair@554 | 7 | # published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | # particular file as subject to the "Classpath" exception as provided |
ohair@554 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | # |
duke@1 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | # accompanied this code). |
duke@1 | 16 | # |
duke@1 | 17 | # You should have received a copy of the GNU General Public License version |
duke@1 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | # |
ohair@554 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@554 | 22 | # or visit www.oracle.com if you need additional information or have any |
ohair@554 | 23 | # questions. |
duke@1 | 24 | # |
duke@1 | 25 | |
duke@1 | 26 | # |
duke@1 | 27 | # Makefile for building the langtools workspace. |
duke@1 | 28 | # |
duke@1 | 29 | |
duke@1 | 30 | # |
jjg@582 | 31 | # On Solaris, the standard 'make' utility will not work with these makefiles. |
jjg@582 | 32 | # This little rule is only understood by Solaris make, and is harmless |
jjg@582 | 33 | # when seen by the GNU make tool. If using Solaris make, this causes the |
duke@1 | 34 | # make command to fail. |
duke@1 | 35 | # |
duke@1 | 36 | SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 |
duke@1 | 37 | |
duke@1 | 38 | #----- cancel implicit rules |
duke@1 | 39 | |
duke@1 | 40 | %: %.o |
duke@1 | 41 | %: %.obj |
duke@1 | 42 | %: %.dll |
duke@1 | 43 | %: %.c |
duke@1 | 44 | %: %.cc |
duke@1 | 45 | %: %.C |
duke@1 | 46 | %: %.p |
duke@1 | 47 | %: %.f |
duke@1 | 48 | %: %.s |
duke@1 | 49 | %: %.F |
duke@1 | 50 | %: %.r |
duke@1 | 51 | %: %.S |
duke@1 | 52 | %: %.mod |
duke@1 | 53 | %: %.sh |
duke@1 | 54 | %: %,v |
duke@1 | 55 | %: RCS/%,v |
duke@1 | 56 | |
duke@1 | 57 | #----- imports |
duke@1 | 58 | |
duke@1 | 59 | ifdef ALT_BOOT_JAVA_HOME |
duke@1 | 60 | BOOT_JAVA_HOME = $(ALT_BOOT_JAVA_HOME) |
duke@1 | 61 | else |
duke@1 | 62 | ifdef ALT_BOOTDIR |
duke@1 | 63 | BOOT_JAVA_HOME = $(ALT_BOOTDIR) |
duke@1 | 64 | else |
duke@1 | 65 | BOOT_JAVA_HOME=/java/re/jdk/1.5.0/archive/fcs/binaries/solaris-sparc |
duke@1 | 66 | endif |
duke@1 | 67 | endif |
duke@1 | 68 | |
duke@1 | 69 | BOOT_JAVA=$(BOOT_JAVA_HOME)/bin/java |
duke@1 | 70 | BOOT_JAVAC=$(BOOT_JAVA_HOME)/bin/javac |
duke@1 | 71 | BOOTJAR=$(BOOT_JAVA_HOME)/bin/jar |
duke@1 | 72 | |
duke@1 | 73 | ifdef ALT_TESTJAVA_HOME |
duke@1 | 74 | TESTJAVA_HOME = $(ALT_TESTJAVA_HOME) |
duke@1 | 75 | else |
duke@1 | 76 | TESTJAVA_HOME=/java/re/jdk/1.6.0/archive/fcs/binaries/solaris-sparc |
duke@1 | 77 | endif |
duke@1 | 78 | |
duke@1 | 79 | TESTJAVA=$(TESTJAVA_HOME)/bin/java |
duke@1 | 80 | |
duke@1 | 81 | ifdef ALT_FINDBUGS_HOME |
duke@1 | 82 | FINDBUGS_HOME = $(ALT_FINDBUGS_HOME) |
duke@1 | 83 | else |
duke@1 | 84 | FINDBUGS_HOME = /java/devtools/share/findbugs/1.1.2-rc4 |
duke@1 | 85 | endif |
duke@1 | 86 | |
duke@1 | 87 | FINDBUGS = $(FINDBUGS_HOME)/bin/findbugs |
duke@1 | 88 | |
duke@1 | 89 | #----- commands |
duke@1 | 90 | |
duke@1 | 91 | CHMOD = chmod |
duke@1 | 92 | CP = cp |
duke@1 | 93 | ECHO = echo # FIXME |
duke@1 | 94 | FIND = find |
duke@1 | 95 | MKDIR = mkdir |
duke@1 | 96 | SED = sed |
duke@1 | 97 | ZIP = zip |
duke@1 | 98 | |
duke@1 | 99 | #----- locations and deliverables |
duke@1 | 100 | |
duke@1 | 101 | TOPDIR = .. |
duke@1 | 102 | SRC_BIN_DIR = $(TOPDIR)/src/share/bin |
duke@1 | 103 | SRC_CLASSES_DIR = $(TOPDIR)/src/share/classes |
duke@1 | 104 | |
duke@1 | 105 | BUILD_DIR = $(TOPDIR)/build |
duke@1 | 106 | |
duke@1 | 107 | CLASSES_DIR = $(BUILD_DIR)/classes |
duke@1 | 108 | GENSRC_DIR = $(BUILD_DIR)/gensrc |
duke@1 | 109 | |
duke@1 | 110 | DIST_DIR = $(TOPDIR)/dist |
duke@1 | 111 | BIN_DIR = $(DIST_DIR)/bin |
duke@1 | 112 | LIB_DIR = $(DIST_DIR)/lib |
duke@1 | 113 | |
duke@1 | 114 | JAVAC_JAR = $(LIB_DIR)/javac.jar |
duke@1 | 115 | JAVADOC_JAR = $(LIB_DIR)/javadoc.jar |
duke@1 | 116 | JAVAH_JAR = $(LIB_DIR)/javah.jar |
duke@1 | 117 | JAVAP_JAR = $(LIB_DIR)/javap.jar |
duke@1 | 118 | |
duke@1 | 119 | CLASSES_JAR = $(DIST_DIR)/classes.jar |
duke@1 | 120 | SRC_ZIP = $(DIST_DIR)/src.zip |
duke@1 | 121 | |
duke@1 | 122 | BUILDTOOLSRC_DIR = tools |
duke@1 | 123 | BUILDTOOLCLASSES_DIR = $(BUILD_DIR)/toolclasses |
duke@1 | 124 | |
duke@1 | 125 | #----- |
duke@1 | 126 | |
duke@1 | 127 | ifndef JDK_MAJOR_VERSION |
duke@1 | 128 | JDK_MAJOR_VERSION = 1 |
duke@1 | 129 | endif |
duke@1 | 130 | |
duke@1 | 131 | ifndef JDK_MINOR_VERSION |
duke@1 | 132 | JDK_MINOR_VERSION = 7 |
duke@1 | 133 | endif |
duke@1 | 134 | |
duke@1 | 135 | ifndef JDK_MICRO_VERSION |
duke@1 | 136 | JDK_MICRO_VERSION = 0 |
duke@1 | 137 | endif |
duke@1 | 138 | |
duke@1 | 139 | ifndef JDK_VERSION |
duke@1 | 140 | JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION) |
duke@1 | 141 | endif |
duke@1 | 142 | |
duke@1 | 143 | ifndef MILESTONE |
duke@1 | 144 | MILESTONE = internal |
duke@1 | 145 | endif |
duke@1 | 146 | |
duke@1 | 147 | # RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set |
duke@1 | 148 | ifneq ($(MILESTONE),fcs) |
duke@1 | 149 | RELEASE = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE) |
duke@1 | 150 | else |
duke@1 | 151 | RELEASE = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE) |
duke@1 | 152 | endif |
duke@1 | 153 | |
duke@1 | 154 | # FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set |
duke@1 | 155 | ifdef BUILD_NUMBER |
duke@1 | 156 | FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) |
duke@1 | 157 | else |
duke@1 | 158 | BUILD_NUMBER = b00 |
duke@1 | 159 | USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`) |
duke@1 | 160 | FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER) |
duke@1 | 161 | endif |
duke@1 | 162 | |
duke@1 | 163 | #----- useful macros |
duke@1 | 164 | |
darcy@1194 | 165 | TOOLS = javac javadoc javah javap |
duke@1 | 166 | |
duke@1 | 167 | SOURCE_LEVEL = 5 |
duke@1 | 168 | BOOTSTRAP_TARGET_LEVEL = 5 |
duke@1 | 169 | TARGET_LEVEL = 6 |
duke@1 | 170 | |
duke@1 | 171 | ifndef TARGET_JAVA |
duke@1 | 172 | TARGET_JAVA = java |
duke@1 | 173 | endif |
duke@1 | 174 | |
duke@1 | 175 | NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true |
duke@1 | 176 | |
duke@1 | 177 | SELF = $(lastword $(MAKEFILE_LIST)) |
duke@1 | 178 | |
duke@1 | 179 | #----- |
duke@1 | 180 | |
duke@1 | 181 | # the default is to generate the following: |
duke@1 | 182 | # dist/{bin,lib}: |
duke@1 | 183 | # lang tools compiled to run on the target JDK |
duke@1 | 184 | |
duke@1 | 185 | default: |
duke@1 | 186 | $(MAKE) -f $(SELF) \ |
duke@1 | 187 | MILESTONE=bootstrap \ |
duke@1 | 188 | TARGET_LEVEL=$(BOOTSTRAP_TARGET_LEVEL) \ |
duke@1 | 189 | TARGET_JAVA=$(BOOT_JAVA_HOME)/bin/java \ |
duke@1 | 190 | GENSRC_DIR=$(BUILD_DIR)/bootstrap/gensrc \ |
duke@1 | 191 | CLASSES_DIR=$(BUILD_DIR)/bootstrap/classes \ |
duke@1 | 192 | BIN_DIR=$(BUILD_DIR)/bootstrap/bin \ |
duke@1 | 193 | LIB_DIR=$(BUILD_DIR)/bootstrap/lib \ |
duke@1 | 194 | $(BUILD_DIR)/bootstrap/lib/javac.jar \ |
duke@1 | 195 | $(BUILD_DIR)/bootstrap/bin/javac |
duke@1 | 196 | $(MAKE) -f $(SELF) \ |
duke@1 | 197 | BOOT_JAVAC=$(BUILD_DIR)/bootstrap/bin/javac \ |
duke@1 | 198 | tools |
duke@1 | 199 | |
duke@1 | 200 | # for jdk, we generate the following: |
duke@1 | 201 | # dist/bootstrap/{bin,lib}: |
duke@1 | 202 | # lang tools compiled to run on the boot JDK |
duke@1 | 203 | # dist/lib/classes.jar: |
duke@1 | 204 | # lang tools recompiled to run on the target JDK, |
duke@1 | 205 | # ready for inclusion in rt.jar and tools.jar |
duke@1 | 206 | # dist/lib/src.zip |
duke@1 | 207 | # .properties and .java files for classes in classes.jar, |
duke@1 | 208 | # ready for jdk src.zip |
duke@1 | 209 | |
duke@1 | 210 | jdk: |
duke@1 | 211 | $(MAKE) -f $(SELF) \ |
duke@1 | 212 | MILESTONE=bootstrap \ |
duke@1 | 213 | TARGET_LEVEL=$(BOOTSTRAP_TARGET_LEVEL) \ |
duke@1 | 214 | TARGET_JAVA=$(BOOT_JAVA_HOME)/bin/java \ |
duke@1 | 215 | GENSRC_DIR=$(BUILD_DIR)/bootstrap/gensrc \ |
duke@1 | 216 | CLASSES_DIR=$(BUILD_DIR)/bootstrap/classes \ |
duke@1 | 217 | BIN_DIR=$(DIST_DIR)/bootstrap/bin \ |
duke@1 | 218 | LIB_DIR=$(DIST_DIR)/bootstrap/lib \ |
duke@1 | 219 | tools |
duke@1 | 220 | $(MAKE) -f $(SELF) \ |
duke@1 | 221 | BOOT_JAVAC=$(DIST_DIR)/bootstrap/bin/javac \ |
duke@1 | 222 | LIB_DIR=$(BUILD_DIR)/jdk/lib \ |
duke@1 | 223 | $(DIST_DIR)/lib/classes.jar \ |
duke@1 | 224 | $(DIST_DIR)/lib/src.zip |
duke@1 | 225 | |
duke@1 | 226 | tools: $(TOOLS:%=$(LIB_DIR)/%.jar) $(TOOLS:%=$(BIN_DIR)/%) |
duke@1 | 227 | |
duke@1 | 228 | clean: |
duke@1 | 229 | $(RM) -r $(BUILD_DIR) |
duke@1 | 230 | |
duke@1 | 231 | really-clean: clean |
duke@1 | 232 | $(RM) -r $(DIST_DIR) |
duke@1 | 233 | |
duke@1 | 234 | jprt_product_build \ |
duke@1 | 235 | jprt_debug_build \ |
duke@1 | 236 | jprt_fastdebug_build: lib |
duke@1 | 237 | |
duke@1 | 238 | #----- javac |
duke@1 | 239 | |
duke@1 | 240 | JAVAC_DIRS = \ |
duke@1 | 241 | javax/annotation/processing \ |
duke@1 | 242 | javax/lang/model \ |
duke@1 | 243 | javax/tools \ |
darcy@1540 | 244 | jdk/ \ |
duke@1 | 245 | com/sun/source \ |
duke@1 | 246 | com/sun/tools/javac |
duke@1 | 247 | |
duke@1 | 248 | JAVAC_RESOURCE_FILES = \ |
duke@1 | 249 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVAC_DIRS)) -name SCCS -prune -o -name \*.properties -print ) |
duke@1 | 250 | |
duke@1 | 251 | JAVAC_JAVA_FILES = \ |
duke@1 | 252 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVAC_DIRS)) -name SCCS -prune -o -name \*.java -print ) \ |
duke@1 | 253 | $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(JAVAC_RESOURCE_FILES)) \ |
duke@1 | 254 | $(GENSRC_DIR)/com/sun/tools/javac/resources/version.java |
duke@1 | 255 | |
duke@1 | 256 | $(JAVAC_JAR): $(JAVAC_JAVA_FILES) |
duke@1 | 257 | $(MKDIR) -p $(CLASSES_DIR) $(@D) |
duke@1 | 258 | $(BOOT_JAVAC) -d $(CLASSES_DIR) -target $(TARGET_LEVEL) $(NO_PROPRIETARY_API_WARNINGS) $(JAVAC_JAVA_FILES) |
duke@1 | 259 | ( $(ECHO) Main-Class: com.sun.tools.javac.Main ) > $(BUILD_DIR)/javac.mf |
duke@1 | 260 | $(BOOTJAR) -cfm $@ $(BUILD_DIR)/javac.mf $(patsubst %,-C $(CLASSES_DIR) %, $(JAVAC_DIRS)) |
duke@1 | 261 | |
duke@1 | 262 | #----- javadoc |
duke@1 | 263 | |
duke@1 | 264 | ### FIXME -- javadoc has a couple of extra non-property resource files |
duke@1 | 265 | ### that need to be included |
duke@1 | 266 | |
duke@1 | 267 | JAVADOC_DIRS = \ |
duke@1 | 268 | com/sun/javadoc \ |
duke@1 | 269 | com/sun/tools/doclets \ |
duke@1 | 270 | com/sun/tools/javadoc |
duke@1 | 271 | |
duke@1 | 272 | JAVADOC_RESOURCE_FILES = \ |
duke@1 | 273 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVADOC_DIRS)) -name SCCS -prune -o -name \*.properties -print ) |
duke@1 | 274 | |
duke@1 | 275 | JAVADOC_JAVA_FILES = \ |
duke@1 | 276 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVADOC_DIRS)) -name SCCS -prune -o -name \*.java -print ) \ |
duke@1 | 277 | $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(JAVADOC_RESOURCE_FILES)) |
duke@1 | 278 | |
duke@1 | 279 | $(JAVADOC_JAR): $(JAVADOC_JAVA_FILES) $(JAVAC_JAR) |
duke@1 | 280 | $(MKDIR) -p $(CLASSES_DIR) $(@D) |
duke@1 | 281 | $(BOOT_JAVAC) -sourcepath "" -classpath $(JAVAC_JAR) -d $(CLASSES_DIR) -target $(TARGET_LEVEL) $(JAVADOC_JAVA_FILES) |
duke@1 | 282 | ( $(ECHO) Main-Class: com.sun.tools.javadoc.Main ; $(ECHO) Class-Path: javac.jar ) > $(BUILD_DIR)/javadoc.mf |
duke@1 | 283 | $(BOOTJAR) -cfm $@ $(BUILD_DIR)/javadoc.mf $(patsubst %,-C $(CLASSES_DIR) %, $(JAVADOC_DIRS)) |
duke@1 | 284 | |
duke@1 | 285 | #----- javah |
duke@1 | 286 | |
duke@1 | 287 | JAVAH_DIRS = \ |
duke@1 | 288 | com/sun/tools/javah |
duke@1 | 289 | |
duke@1 | 290 | JAVAH_RESOURCE_FILES = \ |
duke@1 | 291 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVAH_DIRS)) -name SCCS -prune -o -name \*.properties -print ) |
duke@1 | 292 | |
duke@1 | 293 | JAVAH_JAVA_FILES = \ |
duke@1 | 294 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVAH_DIRS)) -name SCCS -prune -o -name \*.java -print ) \ |
duke@1 | 295 | $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(JAVAH_RESOURCE_FILES)) |
duke@1 | 296 | |
duke@1 | 297 | $(JAVAH_JAR): $(JAVAH_JAVA_FILES) $(JAVADOC_JAR) |
duke@1 | 298 | $(MKDIR) -p $(CLASSES_DIR) $(@D) |
duke@1 | 299 | $(BOOT_JAVAC) -sourcepath "" -classpath $(CLASSES_DIR) -d $(CLASSES_DIR) -target $(TARGET_LEVEL) $(JAVAH_JAVA_FILES) |
duke@1 | 300 | ( $(ECHO) Main-Class: com.sun.tools.javah.Main ; $(ECHO) Class-Path: javadoc.jar ) > $(BUILD_DIR)/javah.mf |
duke@1 | 301 | $(BOOTJAR) -cfm $@ $(BUILD_DIR)/javah.mf $(patsubst %,-C $(CLASSES_DIR) %, $(JAVAH_DIRS)) |
duke@1 | 302 | |
duke@1 | 303 | #----- javap |
duke@1 | 304 | |
duke@1 | 305 | JAVAP_DIRS = \ |
duke@1 | 306 | sun/tools/javap |
duke@1 | 307 | |
duke@1 | 308 | JAVAP_RESOURCE_FILES = \ |
duke@1 | 309 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVAP_DIRS)) -name SCCS -prune -o -name \*.properties -print ) |
duke@1 | 310 | |
duke@1 | 311 | JAVAP_JAVA_FILES = \ |
duke@1 | 312 | $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(JAVAP_DIRS)) -name SCCS -prune -o -name \*.java -print ) \ |
duke@1 | 313 | $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(JAVAP_RESOURCE_FILES)) |
duke@1 | 314 | |
duke@1 | 315 | $(JAVAP_JAR): $(JAVAP_JAVA_FILES) \ |
duke@1 | 316 | $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(JAVAP_RESOURCE_FILES)) |
duke@1 | 317 | $(MKDIR) -p $(CLASSES_DIR) |
duke@1 | 318 | $(BOOT_JAVAC) -sourcepath "" -classpath $(CLASSES_DIR) -d $(CLASSES_DIR) -target $(TARGET_LEVEL) $(JAVAP_JAVA_FILES) |
duke@1 | 319 | ( $(ECHO) Main-Class: sun.tools.javap.Main ) > $(BUILD_DIR)/javap.mf |
duke@1 | 320 | $(BOOTJAR) -cfm $@ $(BUILD_DIR)/javap.mf $(patsubst %,-C $(CLASSES_DIR) %, $(JAVAP_DIRS)) |
duke@1 | 321 | |
duke@1 | 322 | #----- |
duke@1 | 323 | |
duke@1 | 324 | build-tools: $(BUILDTOOLCLASSES_DIR)/CompileProperties/CompileProperties.class |
duke@1 | 325 | |
duke@1 | 326 | $(GENSRC_DIR)/%.java: $(SRC_CLASSES_DIR)/%.properties $(BUILDTOOLCLASSES_DIR)/CompileProperties/CompileProperties.class |
duke@1 | 327 | $(MKDIR) -p $(@D) |
duke@1 | 328 | $(BOOT_JAVA) -cp $(BUILDTOOLCLASSES_DIR)/CompileProperties CompileProperties $< $(patsubst $(CLASSES_DIR)/%.class,$(GENSRC_DIR)/%.java,$@) |
duke@1 | 329 | |
duke@1 | 330 | $(GENSRC_DIR)/%.java: $(GENSRC_DIR)/%.properties $(BUILDTOOLCLASSES_DIR)/CompileProperties/CompileProperties.class |
duke@1 | 331 | $(MKDIR) -p $(@D) |
duke@1 | 332 | $(BOOT_JAVA) -cp $(BUILDTOOLCLASSES_DIR)/CompileProperties CompileProperties $< $(patsubst $(CLASSES_DIR)/%.class,$(GENSRC_DIR)/%.java,$@) |
duke@1 | 333 | |
duke@1 | 334 | $(GENSRC_DIR)/%.properties: $(SRC_CLASSES_DIR)/%.properties-template |
duke@1 | 335 | $(MKDIR) -p $(@D) |
duke@1 | 336 | $(SED) -e 's/$$(JDK_VERSION)/$(JDK_VERSION)/' \ |
duke@1 | 337 | -e 's/$$(FULL_VERSION)/$(FULL_VERSION)/' \ |
duke@1 | 338 | -e 's/$$(RELEASE)/$(RELEASE)/' \ |
duke@1 | 339 | < $< > $@ |
duke@1 | 340 | |
duke@1 | 341 | $(BUILDTOOLCLASSES_DIR)/%.class : $(BUILDTOOLSRC_DIR)/%.java |
duke@1 | 342 | $(MKDIR) -p $(@D) |
duke@1 | 343 | $(BOOT_JAVAC) -d $(@D) $< |
duke@1 | 344 | |
duke@1 | 345 | #----- all classes |
duke@1 | 346 | |
darcy@1194 | 347 | $(DIST_DIR)/%/classes.jar: $(JAVAC_JAR) $(JAVADOC_JAR) $(JAVAH_JAR) $(JAVAP_JAR) |
duke@1 | 348 | $(MKDIR) -p $(@D) |
duke@1 | 349 | $(BOOTJAR) -cf $@ -C $(CLASSES_DIR) . |
duke@1 | 350 | |
duke@1 | 351 | #----- src.zip |
duke@1 | 352 | |
duke@1 | 353 | SRC_ZIP_FILES = $(shell $(FIND) $(SRC_CLASSES_DIR) \( -name SCCS -o -name \*-template \) -prune -o -type f -print ) |
duke@1 | 354 | |
duke@1 | 355 | $(DIST_DIR)/%/src.zip: $(SRC_ZIP_FILES) |
duke@1 | 356 | abs_src_zip=`cd $(@D) ; pwd`/$(@F) ; \ |
duke@1 | 357 | ( cd $(SRC_CLASSES_DIR) ; $(FIND) . \( -name SCCS -o -name \*-template \) -prune -o -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ; \ |
duke@1 | 358 | ( cd $(SRC_CLASSES_DIR) ; $(FIND) . -name SCCS -prune -o -name \*-template -print | $(SED) -e 's/-template//' ) | ( cd $(GENSRC_DIR) ; $(ZIP) -q $$abs_src_zip -@ ) |
duke@1 | 359 | |
duke@1 | 360 | #----- bin files |
duke@1 | 361 | |
duke@1 | 362 | $(BIN_DIR)/%: $(SRC_BIN_DIR)/launcher.sh-template |
duke@1 | 363 | $(MKDIR) -p $(@D) |
duke@1 | 364 | $(SED) -e 's|#PROGRAM#|$(@F)|' -e 's|#TARGET_JAVA#|$(TARGET_JAVA)|' $< > $@ |
duke@1 | 365 | $(CHMOD) +x $@ |
duke@1 | 366 | |
duke@1 | 367 | #----- |
duke@1 | 368 | |
duke@1 | 369 | findbugs: $(BUILD_DIR)/findbugs.txt |
duke@1 | 370 | |
duke@1 | 371 | $(BUILD_DIR)/findbugs.txt: $(CLASSES_JAR) |
duke@1 | 372 | $(MKDIR) -p $(@D) |
duke@1 | 373 | $(FINDBUGS) -textui -javahome $(BOOT_JAVA_HOME) -high -emacs -outputFile $@ $< |
duke@1 | 374 | |
duke@1 | 375 | #----- |
duke@1 | 376 | |
duke@1 | 377 | quick-check: $(patsubst %, $(DIST_LIB_DIR)/%.jar, $(TOOLS)) |
duke@1 | 378 | $(TESTJAVA) -jar $(JAVAC_JAR) -version |
duke@1 | 379 | - $(TESTJAVA) -jar $(JAVADOC_JAR) -version |
duke@1 | 380 | $(TESTJAVA) -jar $(JAVAH_JAR) -version |
duke@1 | 381 | - $(TESTJAVA) -jar $(JAVAP_JAR) -version |
duke@1 | 382 | |
duke@1 | 383 | #----- |
duke@1 | 384 | |
duke@1 | 385 | .PHONY: \ |
duke@1 | 386 | all \ |
duke@1 | 387 | build \ |
duke@1 | 388 | build-tools \ |
duke@1 | 389 | clean \ |
duke@1 | 390 | default \ |
duke@1 | 391 | findbugs \ |
duke@1 | 392 | jprt_product_build \ |
duke@1 | 393 | jprt_debug_build \ |
duke@1 | 394 | jprt_fastdebug_build \ |
duke@1 | 395 | tools |
duke@1 | 396 |