Hey Tom,
Does your new version throw an error, or just print one out? I'm not a huge .mk guy either (or java for that matter), but here is how I was going to approach it:
* Pre-compile your doclet in 1.6 and add it it to prebuilt. (Possibly throwing in a src folder there just for future edits if you were ok with it).
* Update
main.mk's java check. If it's 1.5, great, if it's 1.6 instead of crashing and burning, set a "RunOverrideCheck" type flag.
* Update
definitions.mk. I got as far as wrapping your doclet into the transform-java-to-classes definition so that it ran on the same sources, same classpath, etc. I was planning to update that to check the flag mentioned above and only run it on java 1.6 builds. If it only prints out ERROR/WARNING, then I'd wrap it in a script that will throw a true error to stop the build.
* Explicitly add -source 1.5 to the javac call that's also in that transform define, so any 1.5/1.6 issues that are caught properly by the compiler get caught.
* I don't know if there's any reason to also add a -target 1.5, question for you real java people.
I can show you what I've got going in
definitions.mk and the half-baked changes in
main.mk and see if we can pull it all together if you'd like.
-Chad