Re: [PATCH 0/3] Makefile: make "sparse" and "hdr-check" non-.PHONY
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 23, 2021, 01:23 UTC
- Message-ID
- <xmqqtuic2igl.fsf@gitster.g>
- In-Reply-To
- <87pmt05bww.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 11 quoted lines
> I've got some WIP efforts in other areas to do that for some other > rules. > > The problem is that you need to "mkdir .shrapnel" to create a > ".shrapnel/revision.sp". So you need the ".shrapnel/revision.sp" to > depend on the ".shrapnel". > > Except you'll find that the naïve implementation of that fails, since > any file you create will bump the mtime of the containing directory, so > you'll keep re-making ".shrapnel/revision.sp" because ".shrapnel" > changed, because ".shrapnel/revision.sp" changed...
We depend on GNU make anyway. Isn't its "order-only-prerequisites" feature what you exactly want to use for the above?