1 # |
1 # |
2 # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2007, 2012 Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
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 |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. Oracle designates this |
7 # published by the Free Software Foundation. Oracle designates this |
113 |
113 |
114 JAVAC_JAR = $(LIB_DIR)/javac.jar |
114 JAVAC_JAR = $(LIB_DIR)/javac.jar |
115 JAVADOC_JAR = $(LIB_DIR)/javadoc.jar |
115 JAVADOC_JAR = $(LIB_DIR)/javadoc.jar |
116 JAVAH_JAR = $(LIB_DIR)/javah.jar |
116 JAVAH_JAR = $(LIB_DIR)/javah.jar |
117 JAVAP_JAR = $(LIB_DIR)/javap.jar |
117 JAVAP_JAR = $(LIB_DIR)/javap.jar |
118 APT_JAR = $(LIB_DIR)/apt.jar |
|
119 |
118 |
120 CLASSES_JAR = $(DIST_DIR)/classes.jar |
119 CLASSES_JAR = $(DIST_DIR)/classes.jar |
121 SRC_ZIP = $(DIST_DIR)/src.zip |
120 SRC_ZIP = $(DIST_DIR)/src.zip |
122 |
121 |
123 BUILDTOOLSRC_DIR = tools |
122 BUILDTOOLSRC_DIR = tools |
317 $(MKDIR) -p $(CLASSES_DIR) |
316 $(MKDIR) -p $(CLASSES_DIR) |
318 $(BOOT_JAVAC) -sourcepath "" -classpath $(CLASSES_DIR) -d $(CLASSES_DIR) -target $(TARGET_LEVEL) $(JAVAP_JAVA_FILES) |
317 $(BOOT_JAVAC) -sourcepath "" -classpath $(CLASSES_DIR) -d $(CLASSES_DIR) -target $(TARGET_LEVEL) $(JAVAP_JAVA_FILES) |
319 ( $(ECHO) Main-Class: sun.tools.javap.Main ) > $(BUILD_DIR)/javap.mf |
318 ( $(ECHO) Main-Class: sun.tools.javap.Main ) > $(BUILD_DIR)/javap.mf |
320 $(BOOTJAR) -cfm $@ $(BUILD_DIR)/javap.mf $(patsubst %,-C $(CLASSES_DIR) %, $(JAVAP_DIRS)) |
319 $(BOOTJAR) -cfm $@ $(BUILD_DIR)/javap.mf $(patsubst %,-C $(CLASSES_DIR) %, $(JAVAP_DIRS)) |
321 |
320 |
322 #----- apt |
|
323 |
|
324 APT_DIRS = \ |
|
325 com/sun/mirror \ |
|
326 com/sun/tools/apt |
|
327 |
|
328 APT_RESOURCE_FILES = \ |
|
329 $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(APT_DIRS)) -name SCCS -prune -o -name \*.properties -print ) |
|
330 |
|
331 APT_JAVA_FILES = \ |
|
332 $(shell find $(patsubst %,$(SRC_CLASSES_DIR)/%,$(APT_DIRS)) -name SCCS -prune -o -name \*.java -print ) \ |
|
333 $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(APT_RESOURCE_FILES)) |
|
334 |
|
335 $(APT_JAR): $(APT_JAVA_FILES) $(JAVAC_JAR) \ |
|
336 $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(APT_RESOURCE_FILES)) |
|
337 $(MKDIR) -p $(CLASSES_DIR) $(@D) |
|
338 $(BOOT_JAVAC) -sourcepath "" -classpath $(CLASSES_DIR) -d $(CLASSES_DIR) -target $(TARGET_LEVEL) $(NO_PROPRIETARY_API_WARNINGS) \ |
|
339 $(APT_JAVA_FILES) \ |
|
340 $(patsubst $(SRC_CLASSES_DIR)/%.properties,$(GENSRC_DIR)/%.java,$(APT_RESOURCE_FILES)) |
|
341 ( $(ECHO) Main-Class: com.sun.tools.apt.Main ; $(ECHO) Class-Path: javac.jar ) > $(BUILD_DIR)/apt.mf |
|
342 $(BOOTJAR) -cfm $@ $(BUILD_DIR)/apt.mf $(patsubst %,-C $(CLASSES_DIR) %, $(APT_DIRS)) |
|
343 |
|
344 #----- |
321 #----- |
345 |
322 |
346 build-tools: $(BUILDTOOLCLASSES_DIR)/CompileProperties/CompileProperties.class |
323 build-tools: $(BUILDTOOLCLASSES_DIR)/CompileProperties/CompileProperties.class |
347 |
324 |
348 $(GENSRC_DIR)/%.java: $(SRC_CLASSES_DIR)/%.properties $(BUILDTOOLCLASSES_DIR)/CompileProperties/CompileProperties.class |
325 $(GENSRC_DIR)/%.java: $(SRC_CLASSES_DIR)/%.properties $(BUILDTOOLCLASSES_DIR)/CompileProperties/CompileProperties.class |
399 quick-check: $(patsubst %, $(DIST_LIB_DIR)/%.jar, $(TOOLS)) |
376 quick-check: $(patsubst %, $(DIST_LIB_DIR)/%.jar, $(TOOLS)) |
400 $(TESTJAVA) -jar $(JAVAC_JAR) -version |
377 $(TESTJAVA) -jar $(JAVAC_JAR) -version |
401 - $(TESTJAVA) -jar $(JAVADOC_JAR) -version |
378 - $(TESTJAVA) -jar $(JAVADOC_JAR) -version |
402 $(TESTJAVA) -jar $(JAVAH_JAR) -version |
379 $(TESTJAVA) -jar $(JAVAH_JAR) -version |
403 - $(TESTJAVA) -jar $(JAVAP_JAR) -version |
380 - $(TESTJAVA) -jar $(JAVAP_JAR) -version |
404 $(TESTJAVA) -jar $(APT_JAR) -version |
|
405 |
381 |
406 #----- |
382 #----- |
407 |
383 |
408 .PHONY: \ |
384 .PHONY: \ |
409 all \ |
385 all \ |