On 2017-04-20 01:11, Mandy Chung wrote:
On Apr 19, 2017, at 3:54 PM, Mandy Chung <mandy.ch...@oracle.com> wrote:


On Apr 19, 2017, at 5:36 AM, Magnus Ihse Bursie wrote:

WebRev: http://cr.openjdk.java.net/~ihse/JDK-8178038-javadoc-specs/webrev.01
368 JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
One more thing: jdwp-protocol belongs to jdk.jdwp.agent module.
It would be nice if Gensrc-jdk.jdi.gmk can be cleaned up.
I agree that it would be nice if Gensrc-jdk.jdi.gmk can be cleaned up. Unfortunately it's a bit tangled up right now, and a proper solution might be too radical for this change. But let's see if we can sort this out, perhaps with your module expertise a solution is possible.

We need to gensrc three files:
1) $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
2) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java
3) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html

1 and 2 are being created by the same call to the build tool, and 3 is created by a separate call. I'm not sure if this is possible to change. It looks like it might.

1 already belongs to jdk.jdwp.agent, and 3 could easily be moved there. The problem is 2, which is needed when compiling the jdk.jdi module.

I have two suggestions, but I don't know if either of them is possible:
1) Move the JDWP.java file to jdk.jdwp.agent, and make sure it's properly exported from jdk.jdwp.agent to jdk.jdi. (From my point of view, this seems like the logical thing to do.) In this case, the entire gensrc:ing could move to jdk.jdwp.agent, and possibly even into a single call to the build tool to generate all three files.

2) Split the gensrc into one for jdk.jdwp.agent that generated 1 and 3, and one for jdk.jdi that generates 2. It might require us to generate a dummy 2 and 1 that are just thrown away, if the tool cannot be told not to generate both 1 and 2 at the same time.

/Magnus


Mandy

369 $(eval $(call SetupCopyFiles, COPY_JDWP_PROTOCOL, \
370     FILES := $(JDWP_PROTOCOL), \
371     DEST := $(JAVADOC_OUTPUTDIR)/specs/jdwp, \
372 ))

Is there any reason why jdwp-protocol.html is not copied to the “specs” 
directory?

docs-docs-specs copies specs to jdk docs.  I would expect there will be 
docs-javase-specs to copy specs from Java SE modules to javase-docs/specs but 
missing.

Mandy

Reply via email to