Conversation
ISSOtm
left a comment
There was a problem hiding this comment.
This will not work for nested dependencies, nor RGBDS if there are two generated files necessary in a row. RGBASM needs to be run in a loop until the object file exists.
|
How does the previous design avoid the need to run Would resolving gbdev/rgbds#903 (comment) be sufficient? As for nested dependencies, I don't see how the current design handles them either. Every .asm file gets a .o+.mk file, and only .inc files are supposed to be |
That behaviour is built into Make.
No. You need to re-build the build graph after discovering new dependencies.
It wouldn't; instead, it would re-run |
|
Thanks for running the CI. It does at least now build on Windows, and on macOS without having to |
|
CI passes with this change because the default project only has a single generated dependency at all; if a more complex project (I could think of Shock Lobster, Esprit, and Rhythm Land) can build successfully with this change, then it would be appropriate to merge. |
|
I don't see a way to avoid the need for running |
My goal here is to make issue #1 a moot point, since no file timestamps will be involved.
Instead of storing the
rgbasm -Moutput in a .mk file for each .o and thenincludeing all those .mk files in the Makefile, this just directly dumps thergbasm -Moutput into the Makefile.This is similar to how pokecrystal's Makefile works, using
scan_includesinstead ofrgbasm -M.It has to work around the fact that
$(shell)unavoidably turns newlines into spaces, bytring them into pipe characters and thensubstituting to undo the transformation. (The pipe|is highly unlikely to be in any Linux filenames, and is outright forbidden on Windows.)I did have an issue with building this from scratch on macOS, where
makewould fail (Error opening INCBIN file 'assets/crash_font.1bpp.pb8': No such file or directory) but running it again would succeed. This was becausergbasm -Mwas not outputting theassets/crash_font.1bpp.pb8target unlessassets/crash_font.1bpp.pb8.sizeexisted. I think that's a bug with RGBDS; see gbdev/rgbds#903 (comment). Anyway, having .pb8.size depend on .pb8 directly fixes it too.