From 9a287aaa3ab41292c35fa24cd54887d84ad78da2 Mon Sep 17 00:00:00 2001 From: ohair Date: Fri, 18 Apr 2008 12:47:38 -0700 Subject: [PATCH] 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 --- make/common/Rules.gmk | 12 +++++---- make/javax/Makefile | 21 +-------------- make/javax/others/Makefile | 52 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 25 deletions(-) create mode 100644 make/javax/others/Makefile diff --git a/make/common/Rules.gmk b/make/common/Rules.gmk index 6fb7ca1cf..5325eeaed 100644 --- a/make/common/Rules.gmk +++ b/make/common/Rules.gmk @@ -231,12 +231,14 @@ classes : $(CLASSES_INIT) .delete.classlist .compile.classlist .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) diff --git a/make/javax/Makefile b/make/javax/Makefile index c81d5f103..678fe8926 100644 --- a/make/javax/Makefile +++ b/make/javax/Makefile @@ -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 @@ all build: clean clobber:: $(SUBDIRS-loop) -# -# Rules -# -include $(BUILDDIR)/common/Classes.gmk - diff --git a/make/javax/others/Makefile b/make/javax/others/Makefile new file mode 100644 index 000000000..f5ce89013 --- /dev/null +++ b/make/javax/others/Makefile @@ -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 + -- GitLab