git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] Makefile: add a non-.PHONY "sparse-incr" target

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 28, 2021, 19:45 UTC
Message-ID
<8735powkad.fsf@evledraar.gmail.com>
In-Reply-To
<xmqqy27gk321.fsf@gitster.g>
On Tue, Sep 28 2021, Junio C Hamano wrote:
Show 8 quoted lines
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> I.e. per [2] want "make <file>.sp" to *always* run "sparse", even
>> though a corresponding "make <file>.o" would only re-run the "real"
>> compilation if needed.
>
> It is different from my reading.  If <file>.c and what it includes
> haven't changed, it would be fine not to run "sparse".
I was attempting to summarize this part of Ramsay Jones's comments in 
    [...] Prior to this patch series, 'make <file>.sp' would _always_
    run sparse over the file - it would not depend on the 'mtime' or
    existence of any other file, or run the compiler (and wouldn't leave
    any 'droppings' either). I liked that! :D
Show 8 quoted lines
> The point of
> running "make <file>.sp" is to see it fail if there is something
> problematic.  If there is any room for the word "*always*" to come
> into the observation, it would be more like "if we cannot make it
> follow the usual dependency rules like the real compilation, we can
> live with it always running, as it is fast enough".  If we can make
> it honor the dependencies, that would give the best of both worlds,
> and we do not have to add an extra target.

...which I think describe something different than what you're describing here.

I.e. I was under the impression that you didn't mind the incremental part of it (but Ramsey did), but just didn't want the initial "make sparse" to take much longer due to the *.o file compilation.

In any case, we can always tweak the "make <file>.sp" later. I don't mind it working the way it did before, I think the only time I ever make individual files is when generating the assembly output for them. So as long as I've got a "make sparse-incr" target I can use.

Do you think that approach in this v4 is OK to move forward?
Previous: Junio C Hamano
Message 28 of 28 in “Makefile: make "sparse" and "hdr-check" non-.PHONY”
  1. 0/3 Makefile: make "sparse" and "hdr-check" non-.PHONYÆvar Arnfjörð Bjarmason, Sep 21, 2021
  2. 1/3 Makefile: make the "sparse" target non-.PHONYÆvar Arnfjörð Bjarmason, Sep 21, 2021
  3. Jeff KingSep 22, 2021
  4. 2/3 Makefile: do one append in %.hcc ruleÆvar Arnfjörð Bjarmason, Sep 21, 2021
  5. 3/3 Makefile: make the "hdr-check" target non-.PHONYÆvar Arnfjörð Bjarmason, Sep 21, 2021
  6. Jeff KingSep 22, 2021
  7. Ramsay JonesSep 22, 2021
  8. Jeff KingSep 22, 2021
  9. Ramsay JonesSep 22, 2021
  10. Junio C HamanoSep 22, 2021
  11. Ævar Arnfjörð BjarmasonSep 23, 2021
  12. Junio C HamanoSep 23, 2021
  13. Ævar Arnfjörð BjarmasonSep 23, 2021
  14. Junio C HamanoSep 22, 2021
  15. Makefile: make the "sparse" target non-.PHONYÆvar Arnfjörð Bjarmason, Sep 23, 2021
  16. Jeff KingSep 23, 2021
  17. Ævar Arnfjörð BjarmasonSep 23, 2021
  18. Jeff KingSep 23, 2021
  19. Junio C HamanoSep 23, 2021
  20. Ramsay JonesSep 23, 2021
  21. Ævar Arnfjörð BjarmasonSep 24, 2021
  22. Ramsay JonesSep 24, 2021
  23. Ævar Arnfjörð BjarmasonSep 24, 2021
  24. Junio C HamanoSep 24, 2021
  25. Makefile: add a non-.PHONY "sparse-incr" targetÆvar Arnfjörð Bjarmason, Sep 28, 2021
  26. Makefile: add a non-.PHONY "sparse-incr" targetÆvar Arnfjörð Bjarmason, Sep 28, 2021
  27. Junio C HamanoSep 28, 2021
  28. Ævar Arnfjörð BjarmasonSep 28, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.