Code Review for jdk

Prepared by:simonis on Thu Aug 28 17:02:32 CEST 2014
Workspace:/net/usr.work/d046063/OpenJDK/jdk9-dev/jdk
Compare against: http://hg.openjdk.java.net/jdk9/dev/jdk
Compare against version:10550
Summary of changes: 22 lines changed: 4 ins; 12 del; 6 mod; 1260 unchg
Changeset: jdk.changeset
Bug id: JDK-8056246 : Fix AIX build after the Modular Source Code change 8054834
Author comments:

This change fixes the AIX build and does some small cleanups after change 8054834: Modular Source Code. Most of the changes are straight forward and shouldn't affect other platforms. The remaining, shared changes will be detailed below:

make/lib/Awt2dLibraries.gmk

LIBAWT_CFLAGS contains quite some duplicate include parameters which can be removed.

  • -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt isn't required because the path $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt is already part of LIBAWT_DIRS and the corresponding include parameter is already generated by $(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d))
  • $(foreach dir, $(LIBAWT_DIRS), -I$(dir)) isn't required either, because $(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d)) not only creates include parameters for every sub-directory contained in LIBAWT_DIRS, but also for the directories themselves.

make/rmic/Rmic-java.management.gmk

This change is a little bit hacky, but it's the best I could find for the moment. The problem is that find on AIX (but also GNU find before version 4.2) are buggy in the sense that they will report an error if "-exec \+" is used in cases where the find command won't find any files.

Therefore, the following make rule will fail for incremental builds if the $(RMIC_GENSRC_DIR) directory won't contain any *.class files any more. These class files are deleted during the first invocation of the rule. However, the rule will be re-executed for every new build because its target depends on the deleted files.

$(RMIC_GENSRC_DIR)/_the.classes.removed: $(RMI_IIOP) $(RMI_SRC)
       $(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
       $(TOUCH) $@

I've therefore added the file _the.classes.removed to the find pattern. That way, the find command will always match at least one file and the buggy "-exec \+" won't complain.

$(RMIC_GENSRC_DIR)/_the.classes.removed: $(RMI_IIOP) $(RMI_SRC)
       $(FIND) $(RMIC_GENSRC_DIR) \( -name "*.class" -o -name $(@F) \) $(FIND_DELETE)
       $(TOUCH) $@

Notice, that deleting _the.classes.removed is no problem here, because the the file will be recreated by the following touch command.

Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw make/lib/Awt2dLibraries.gmk

rev 10551 : 8056246: Fix AIX build after the Modular Source Code change 8054834
9 lines changed: 4 ins; 3 del; 2 mod; 1019 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw make/lib/NetworkingLibraries.gmk

rev 10551 : 8056246: Fix AIX build after the Modular Source Code change 8054834
1 line changed: 0 ins; 0 del; 1 mod; 79 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw make/lib/NioLibraries.gmk

rev 10551 : 8056246: Fix AIX build after the Modular Source Code change 8054834
11 lines changed: 0 ins; 9 del; 2 mod; 94 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw make/rmic/Rmic-java.management.gmk

rev 10551 : 8056246: Fix AIX build after the Modular Source Code change 8054834
1 line changed: 0 ins; 0 del; 1 mod; 68 unchg

This code review page was prepared using /usr/work/d046063/OpenJDK/webrev/webrev.ksh (vers 25.2-hg+openjdk.java.net).