changeset 173:b1bbd90b0c4f

6641585: jdk/make/javax/Makefile should not have both SUBDIRS and AUTO_FILES_JAVA_DIRS Summary: Separated Makefile logic, subtree walk vs. javac compiles. Also fixed minor issue in Rules.gmk. Reviewed-by: tbell
author ohair
date Fri, 18 Apr 2008 12:47:38 -0700
parents 68b85ce111f2
children fb57027902e0
files make/common/Rules.gmk make/javax/Makefile make/javax/others/Makefile
diffstat 3 files changed, 60 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Rules.gmk	Mon Apr 14 14:52:27 2008 -0700
+++ b/make/common/Rules.gmk	Fri Apr 18 12:47:38 2008 -0700
@@ -231,12 +231,14 @@
 
 .compile.classlist : $(JAVA_SOURCE_LIST)
 	@$(MKDIR) -p $(CLASSDESTDIR)
-	@if [ `$(CAT) $(JAVA_SOURCE_LIST) | $(WC) -l` -ge 1 ] ; then \
-	  $(ECHO) "# Java sources to be compiled: (listed in file $(JAVA_SOURCE_LIST))"; \
-	  $(CAT) $(JAVA_SOURCE_LIST); \
+	@$(RM) $<.filtered
+	@$(CAT) $< | $(NAWK) 'length>0' | $(SORT) -u > $<.filtered
+	@if [ `$(CAT) $<.filtered | $(WC) -l` -ge 1 ] ; then \
+	  $(ECHO) "# Java sources to be compiled: (listed in file $<)"; \
+	  $(CAT) $<.filtered; \
 	  $(ECHO) "# Running javac:"; \
-	  $(ECHO) $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
-	  $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
+	  $(ECHO) $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered; \
+	  $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered; \
 	fi
 	@$(java-vm-cleanup)
 
--- a/make/javax/Makefile	Mon Apr 14 14:52:27 2008 -0700
+++ b/make/javax/Makefile	Fri Apr 18 12:47:38 2008 -0700
@@ -30,24 +30,10 @@
 BUILDDIR = ..
 include $(BUILDDIR)/common/Defs.gmk
 
-#
-# Files to compile
-#
-AUTO_FILES_JAVA_DIRS =       \
-    javax/naming             \
-    com/sun/naming/internal  \
-    javax/net                \
-    javax/script             \
-    javax/security/auth      \
-    javax/security/cert      \
-    javax/security/sasl      \
-    javax/smartcardio        \
-    javax/tools              \
-    javax/xml
-
 # imageio uses xml, so build it last
 
 SUBDIRS = \
+	others \
 	accessibility \
 	print \
 	swing \
@@ -63,8 +49,3 @@
 clean clobber::
 	$(SUBDIRS-loop)
 
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/javax/others/Makefile	Fri Apr 18 12:47:38 2008 -0700
@@ -0,0 +1,52 @@
+#
+# Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+#
+# Makefile for building javax (other classes)
+#
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files to compile
+#
+AUTO_FILES_JAVA_DIRS =       \
+    javax/naming             \
+    com/sun/naming/internal  \
+    javax/net                \
+    javax/script             \
+    javax/security/auth      \
+    javax/security/cert      \
+    javax/security/sasl      \
+    javax/smartcardio        \
+    javax/tools              \
+    javax/xml
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Classes.gmk
+