doxygen_symbol_gen: take the map path from the version being built - #776
doxygen_symbol_gen: take the map path from the version being built#776quarrel07 wants to merge 2 commits into
Conversation
Every version's ROM rule runs doxygen_symbol_gen.py, but the script hardcodes build/us/mk64.us.map. A fresh clone that builds anything other than us first therefore fails on the last line of the recipe, after the ROM it just produced is already correct. The script now takes the map as an argument and still defaults to the us one, so anything calling it bare keeps working. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| # Every version's ROM rule runs this, so take the map of the version being | ||
| # built. Hardcoding the us one means a fresh clone that builds any other | ||
| # version first fails here, after its ROM is already correct. | ||
| map_file_path = sys.argv[1] if len(sys.argv) > 1 else "build/us/mk64.us.map" |
There was a problem hiding this comment.
I don't know if I like that any input is allowed.
Shouldn't we only allow specific input such as us, eu, jp and the script figures out where to go? Or is this the best way?
|
Fair question. I pushed 22d04be in response, which drops the fallback you were looking at and makes the argument required, rather than adding a version list to the script. Reasoning for going that way: The version allowlist already exists in the Makefile: That errors on anything not in the list, and the path is mechanical from there ( My worry with moving the list into the script is that it then lives in two places. Every new version has to be added to both, and the script would have to rebuild So in the new commit:
Both call sites already pass the path, so nothing else needed touching. Checked it by hand with no argument, a missing file, and a real eu.v10 map. Happy to switch to a version name if you would still rather have it that way. |
Every version's ROM rule runs this script, but it hardcodes build/us/mk64.us.map. A fresh clone that builds anything other than us first fails on the last line of the recipe, after the ROM it just produced is already correct:
It now takes the map path as a required argument. Both call sites in the Makefile pass build//mk64..map, and the script exits with a clear message if the argument is missing or the file is not there.
Verified on a fresh clone: us builds and matches, and eu.v10 gets past the step it used to die on.