On Fri, 8 Apr 2022 16:59:37 GMT, Erik Joelsson <er...@openjdk.org> wrote:
>> There's been unnecessary (near) duplication of functionality, and messy >> logic, in the langtools gensrc step, for a long time. (Basically since we >> got rid of the mercurial forest...) >> >> This is a first attempt at cleaning this up. The file >> GensrcCommonLangtools.gmk is removed. This contained three pieces of >> functionality. >> >> * SetupVersionProperties was moved to GensrcCommonJdk.gmk (which was renamed >> to GensrcCommon.gmk). >> * PropertiesParser was only used in one place, and moved there. >> (jdk.compiler/Gensrc.gmk). It was also heavily rewritten to show more >> clearly what it actually is doing. >> * SetupCompileProperties (from langtools) were replaced with calls to >> SetupCompileProperties (from GensrcCommon/"jdk"), which was modified >> slightly to accomodate for the differences. (Also the Java tool needed to be >> slightly modified to accept the same syntax as the JDK version of this tool.) >> >> A reasonable follow-up is to research if the two SetupCompileProperties >> tools can be unified into one. > > make/modules/jdk.compiler/Gensrc.gmk line 63: > >> 61: $(PARSEPROPERTIES_FILES)) >> 62: >> 63: PARSEPROPERTIES_ARGS := $(foreach file, $(PARSEPROPERTIES_FILES), \ > > This could be simplified by iterating over PARSEPROPERTIES_SRC. Indeed. :) I am a bit amazed that this code still had potential to be even more simplified. I don't even remember how much junk I throw away, and I still missed this. ------------- PR: https://git.openjdk.java.net/jdk/pull/8167