From aaa4e174541bb34bea38c02cb39839f6ed4e16eb Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sun, 14 Mar 2021 18:28:05 +0100 Subject: [PATCH] Add verbose messages for early exit from -MG Should help debugging Make invocations --- src/asm/fstack.c | 8 ++++++-- src/asm/section.c | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/asm/fstack.c b/src/asm/fstack.c index c85ffb5c..61b68cd6 100644 --- a/src/asm/fstack.c +++ b/src/asm/fstack.c @@ -317,10 +317,14 @@ void fstk_RunInclude(char const *path) if (!fstk_FindFile(path, &fullPath, &size)) { free(fullPath); - if (oGeneratedMissingIncludes) + if (oGeneratedMissingIncludes) { + if (verbose) + printf("Aborting (-MG) on INCLUDE file '%s' (%s)\n", + path, strerror(errno)); oFailedOnMissingInclude = true; - else + } else { error("Unable to open included file '%s': %s\n", path, strerror(errno)); + } return; } dbgPrint("Full path: \"%s\"\n", fullPath); diff --git a/src/asm/section.c b/src/asm/section.c index eb923140..a7000486 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -761,6 +761,8 @@ void out_BinaryFile(char const *s, int32_t startPos) if (!f) { if (oGeneratedMissingIncludes) { + if (verbose) + printf("Aborting (-MG) on INCBIN file '%s' (%s)\n", s, strerror(errno)); oFailedOnMissingInclude = true; return; } @@ -828,6 +830,8 @@ void out_BinaryFileSlice(char const *s, int32_t start_pos, int32_t length) if (!f) { free(fullPath); if (oGeneratedMissingIncludes) { + if (verbose) + printf("Aborting (-MG) on INCBIN file '%s' (%s)\n", s, strerror(errno)); oFailedOnMissingInclude = true; return; }