On 2015-05-05 16:03, Erik Joelsson wrote:
Hello,
Currently it's possible to do this:
src/$module/share/native/libfoo/foo.c
src/$module/linux/native/libfoo/foo.c
And the result will be that the most specific file, linux in this
case, file will get compiled and the other one ignored. The same works
for custom (closed) files overriding open. In addition to native code,
this also works for files being copied by the SetupJavaCompilation
macro, typically properties or other resources.
For java code this does not work however and in the cases where such
overrides are used, the makefiles need explicit excludes of the
overridden file. I have implemented a solution for this that covers
java files and cleaned files in addition to the copied files in
SetupJavaCompilation, so we get consistent behavior for all sorts of
sources.
Along with the new functionality I removed all the now redundant
excludes. I've added tests for the new functionality in
SetupJavaCompilation as well as the new macro in MakeBase.
I've also added a debugging convenience macro in MakeBase that isn't
currently used, but makes my life easier when needing to print
variables. Now I can write:
$(call PrintVar, VARNAME)
and it will print:
VARNAME >$(VARNAME)<
Bug: https://bugs.openjdk.java.net/browse/JDK-8079344
Webrev: http://cr.openjdk.java.net/~erikj/8079344/webrev.01/
Looks good to me. I'm happy to see that you are implementing test cases
for this! (And also, of course, that we finally get this behavior
consistent across macros.)
/Magnus