mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
We invoke make twice to work around a bug in the build system which causes (some) generated java files not to be picked up and compiled the first time around. The issue is in jdk/make/common/Rules.gmk the way $(JAVA_SOURCE_LIST) is generated. That happens as a side-effect of the */%.class rules which are triggered due to $(FILES_class) being listed as prerequisites of $(JAVA_SOURCE_LIST). That means $(FILES_class) -- which ultimately is based on a shell invocation which finds .java files via find -- is evaluated in the first pass, i.e. long before the generated source files are made. Hence they aren't compiled and will be missing from rt.jar. Running make a second time works around the issue, since the source files will already be present then.