[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #51495] Notice when a rule changed, so target needs rebuilding
From: |
Nadav Har'El |
Subject: |
[bug #51495] Notice when a rule changed, so target needs rebuilding |
Date: |
Tue, 18 Jul 2017 03:07:32 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 |
URL:
<http://savannah.gnu.org/bugs/?51495>
Summary: Notice when a rule changed, so target needs
rebuilding
Project: make
Submitted by: nyh
Submitted on: Tue 18 Jul 2017 07:07:31 AM UTC
Severity: 3 - Normal
Item Group: Enhancement
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: None
Operating System: Any
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
It's no secret that in recent years, many alternatives to the classic "make"
have come up. Most of them differ from "make" in non-interesting ways, which
reflects more on their author's preferences than they are actual improvements.
However, there are cases where such alternative build systems actually came up
with new ideas which can be adopted by "make" without rewriting it. The idea I
propose here comes from the "ninja" build system:
The problem this idea is trying to solve is that sometimes you modify the
Makefile and change one or many of the rules (either directly or indirectly by
modifying some variable), and running "make" does not rebuild anything because
none of the dependency files changed. Sure, one can do "make clean; make". But
it's very easy to forget and end up with a broken build.
What ninja does is to keep a file (.ninja_log in the build directory) which
lists each of the targets that were built, with a hash of the rule that was
used to build it. When building again, we consider a target as outdated not
only if one of its dependencies is changed, but also if the target's rule no
longer matches the saved hash.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51495>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #51495] Notice when a rule changed, so target needs rebuilding,
Nadav Har'El <=