[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #55242] Included Makefile not found, no rule to build it but make d
From: |
Dmitry Goncharov |
Subject: |
[bug #55242] Included Makefile not found, no rule to build it but make does not fail |
Date: |
Sat, 11 Apr 2020 08:26:57 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Follow-up Comment #1, bug #55242 (project make):
Here is a patch against the current master
(0c326a66c9eb3a3b5e4ab7892578b016b0590b1f).
This patch causes make to re-execute itself to read the included makefile.
diff --git a/src/remake.c b/src/remake.c
index fb237c5..4dc91d8 100644
--- a/src/remake.c
+++ b/src/remake.c
@@ -175,24 +175,30 @@ update_goal_chain (struct goaldep *goaldeps)
}
else
{
- FILE_TIMESTAMP mtime = MTIME (file);
+ struct file *oldfile = file;
check_renamed (file);
- if (file->updated && g->changed &&
- mtime != file->mtime_before_update)
+ if (file->updated && g->changed)
{
- /* Updating was done. If this is a makefile and
- just_print_flag or question_flag is set
(meaning
- -n or -q was given and this file was specified
- as a command-line target), don't change STATUS.
- If STATUS is changed, we will get re-exec'd,
and
- enter an infinite loop. */
- if (!rebuilding_makefiles
- || (!just_print_flag && !question_flag))
- status = us_success;
- if (rebuilding_makefiles && file->dontcare)
- /* This is a default makefile; stop remaking.
*/
- stop = 1;
+ FILE_TIMESTAMP lm = oldfile->last_mtime;
+ FILE_TIMESTAMP mtime =
+ lm == UNKNOWN_MTIME || lm == NONEXISTENT_MTIME ?
+ f_mtime (oldfile, 0) : lm;
+ if (mtime != file->mtime_before_update)
+ {
+ /* Updating was done. If this is a makefile
and
+ just_print_flag or question_flag is set
(meaning
+ -n or -q was given and this file was
specified
+ as a command-line target), don't change
STATUS.
+ If STATUS is changed, we will get re-exec'd,
and
+ enter an infinite loop. */
+ if (!rebuilding_makefiles
+ || (!just_print_flag && !question_flag))
+ status = us_success;
+ if (rebuilding_makefiles && file->dontcare)
+ /* This is a default makefile; stop remaking.
*/
+ stop = 1;
+ }
}
}
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55242>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #55242] Included Makefile not found, no rule to build it but make does not fail,
Dmitry Goncharov <=