8003562: Provide a CLI tool to analyze class dependencies
Reviewed-by: jjg, alanb, ulfzibis, erikj
--- a/jdk/make/common/Release.gmk Fri Dec 28 17:36:41 2012 -0800
+++ b/jdk/make/common/Release.gmk Fri Dec 28 22:21:40 2012 -0800
@@ -375,6 +375,7 @@
com/sun/tools/javadoc \
com/sun/tools/javah \
com/sun/tools/javap \
+ com/sun/tools/jdeps \
com/sun/tools/corba \
com/sun/tools/internal/xjc \
com/sun/tools/internal/ws \
@@ -457,6 +458,7 @@
javadoc$(EXE_SUFFIX) \
javah$(EXE_SUFFIX) \
javap$(EXE_SUFFIX) \
+ jdeps$(EXE_SUFFIX) \
jcmd$(EXE_SUFFIX) \
jdb$(EXE_SUFFIX) \
jps$(EXE_SUFFIX) \
@@ -564,6 +566,7 @@
$(ECHO) "sun/tools/javac/" >> $@
$(ECHO) "com/sun/tools/classfile/" >> $@
$(ECHO) "com/sun/tools/javap/" >> $@
+ $(ECHO) "com/sun/tools/jdeps/" >> $@
$(ECHO) "sun/tools/jcmd/" >> $@
$(ECHO) "sun/tools/jconsole/" >> $@
$(ECHO) "sun/tools/jps/" >> $@
--- a/jdk/make/docs/NON_CORE_PKGS.gmk Fri Dec 28 17:36:41 2012 -0800
+++ b/jdk/make/docs/NON_CORE_PKGS.gmk Fri Dec 28 22:21:40 2012 -0800
@@ -76,7 +76,7 @@
JCONSOLE_PKGS = com.sun.tools.jconsole
-TREEAPI_PKGS = com.sunsource.doctree \
+TREEAPI_PKGS = com.sun.source.doctree \
com.sun.source.tree \
com.sun.source.util
--- a/jdk/make/launchers/Makefile Fri Dec 28 17:36:41 2012 -0800
+++ b/jdk/make/launchers/Makefile Fri Dec 28 22:21:40 2012 -0800
@@ -63,6 +63,7 @@
$(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , )
$(call make-launcher, javah, com.sun.tools.javah.Main, , )
$(call make-launcher, javap, com.sun.tools.javap.Main, , )
+$(call make-launcher, jdeps, com.sun.tools.jdeps.Main, , )
$(call make-launcher, jcmd, sun.tools.jcmd.JCmd, , )
$(call make-launcher, jconsole, sun.tools.jconsole.JConsole, \
-J-Djconsole.showOutputViewer, )
--- a/jdk/make/launchers/Makefile.launcher Fri Dec 28 17:36:41 2012 -0800
+++ b/jdk/make/launchers/Makefile.launcher Fri Dec 28 22:21:40 2012 -0800
@@ -62,6 +62,10 @@
WILDCARDS=true
NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
endif
+ifeq ($(PROGRAM),jdeps)
+ WILDCARDS=true
+ NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
+endif
ifeq ($(PROGRAM),javah)
WILDCARDS=true
NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
--- a/jdk/makefiles/CompileLaunchers.gmk Fri Dec 28 17:36:41 2012 -0800
+++ b/jdk/makefiles/CompileLaunchers.gmk Fri Dec 28 22:21:40 2012 -0800
@@ -267,6 +267,11 @@
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
+$(eval $(call SetupLauncher,jdeps,\
+ -DEXPAND_CLASSPATH_WILDCARDS \
+ -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+ -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }'))
+
BUILD_LAUNCHER_jconsole_CFLAGS_windows:=-DJAVAW
BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib
--- a/jdk/makefiles/CreateJars.gmk Fri Dec 28 17:36:41 2012 -0800
+++ b/jdk/makefiles/CreateJars.gmk Fri Dec 28 22:21:40 2012 -0800
@@ -738,6 +738,7 @@
com/sun/tools/javadoc \
com/sun/tools/javah \
com/sun/tools/javap \
+ com/sun/tools/jdeps \
com/sun/tools/corba \
com/sun/tools/internal/xjc \
com/sun/tools/internal/ws \
--- a/jdk/makefiles/Images.gmk Fri Dec 28 17:36:41 2012 -0800
+++ b/jdk/makefiles/Images.gmk Fri Dec 28 22:21:40 2012 -0800
@@ -100,6 +100,7 @@
javadoc$(EXE_SUFFIX) \
javah$(EXE_SUFFIX) \
javap$(EXE_SUFFIX) \
+ jdeps$(EXE_SUFFIX) \
jcmd$(EXE_SUFFIX) \
jdb$(EXE_SUFFIX) \
jps$(EXE_SUFFIX) \