Here is a patch which has the primary purpose of eliminating a certain makefile construct that was introduced in build-infra and used in langtools and corba. The trick was clever, but unfortunately had the drawback of the build not always failing on errors, or giving very weird error messages. Here is the bug and the patch:

Bug: https://bugs.openjdk.java.net/browse/JDK-8026773
Webrev: http://cr.openjdk.java.net/~erikj/8026773/webrev.01/

A bit of background is probably needed. The problem that needs to be solved is that when we use SetupJavaCompilation to compile java, all the source files must exist on disk when make starts parsing the makefile. Any non existing java files will not be discovered by the macro and will then not be compiled. So if there are java sources being generated by a rule in the same makefile, these will not be visible to SetupJavaCompilation.

In the jdk repo this is solved by separating source generation and java compilation into different makefiles and make explicit calls to them in order. While this would work here to, I don't think we should enforce separation for implementation purposes when it doesn't really make sense from a logical grouping point of view. In the case of Corba and Langtools, I do not think this separation makes sense for code readability, so I chose to solve it with a recursive call back to the same makefile for specific parts of the file.

While working in this area, I couldn't help but spend some time cleaning up. The Langtools and Corba repos were the first to be converted to build-infra, and didn't follow styles and conventions that were introduced later. I also cleaned up comments.

/Erik

Reply via email to