mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 03:52:08 +00:00
Add -MG
This option allows for automatic dependency detection and generation: as soon as a missing file is found, it is output to the dep file, and assembly immediately aborts. (No .o file is produced, even if `-o` was speicified.) This doesn't cause an error, either; the point is that once the file is added to the dep file, the Makefile is re-parsed, and this time the file will be generated, so the dep list builds up automatically. This mimicks GCC's option and behavior.
This commit is contained in:
@@ -880,8 +880,13 @@ void out_BinaryFile(char *s)
|
||||
FILE *f;
|
||||
|
||||
f = fstk_FindFile(s, NULL);
|
||||
if (f == NULL)
|
||||
if (f == NULL) {
|
||||
if (oGeneratedMissingIncludes) {
|
||||
oFailedOnMissingInclude = true;
|
||||
return;
|
||||
}
|
||||
err(1, "Unable to open incbin file '%s'", s);
|
||||
}
|
||||
|
||||
int32_t fsize;
|
||||
|
||||
@@ -915,8 +920,13 @@ void out_BinaryFileSlice(char *s, int32_t start_pos, int32_t length)
|
||||
fatalerror("Number of bytes to read must be greater than zero");
|
||||
|
||||
f = fstk_FindFile(s, NULL);
|
||||
if (f == NULL)
|
||||
if (f == NULL) {
|
||||
if (oGeneratedMissingIncludes) {
|
||||
oFailedOnMissingInclude = true;
|
||||
return;
|
||||
}
|
||||
err(1, "Unable to open included file '%s'", s);
|
||||
}
|
||||
|
||||
int32_t fsize;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user