Re: Generating missing depfiles by an automake based makefile

2023-02-10 Thread Tom Tromey
I finally went back to the top of the thread. Dmitry> Here is a rule from an automake generated makefile. Dmitry> Below is a sample bash session with gnu make which demonstrates how a Dmitry> dummy shuffle.Po makefile fails to have shuffle.o rebuilt when Dmitry> shuffle.h changes. Dmitry> $ rm

Re: Generating missing depfiles by an automake based makefile

2023-02-10 Thread Bob Friesenhahn
On Fri, 10 Feb 2023, Edward Welbourne wrote: Dmitry Goncharov (10 February 2023 00:24) wrote: When a depfile is missing (for any reason) the current automake makefile creates a dummy depfile. This seems misguided. Better to include $(wildcard $(DEPFILES)) This sounds like a GNU make

Re: Generating missing depfiles by an automake based makefile

2023-02-10 Thread Edward Welbourne
Dmitry Goncharov (10 February 2023 00:24) wrote: > When a depfile is missing (for any reason) the current automake > makefile creates a dummy depfile. This seems misguided. Better to include $(wildcard $(DEPFILES)) instead, so there are no misleading depfiles lying around to cause make to

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Jacob Bachmeyer
Dmitry Goncharov wrote: On Thursday, February 9, 2023, Tom Tromey wrote: It's been a long time since I worked on automake, but the dependency tracking in automake is designed not to need to rebuild or pre-build dep files. Doing that means invoking the compiler twice, which is slow.

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Dmitry Goncharov
On Thursday, February 9, 2023, Tom Tromey wrote: > > > It's been a long time since I worked on automake, but the dependency > tracking in automake is designed not to need to rebuild or pre-build dep > files. Doing that means invoking the compiler twice, which is slow. > Instead, automake

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Tom Tromey
Dmitry> i am not looking forward to -include (even though -include is Dmitry> supported by bmake, gnu make and sun make). Dmitry> -include robs the user the error message should make fails to rebuild a depfile. Dmitry> i'd rather introduce rules to rebuild depfiles, as presented in the Dmitry>

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Dmitry Goncharov
On Thu, Feb 9, 2023 at 12:15 PM Jan Engelhardt wrote: > On Thursday 2023-02-09 22:53, Dmitry Goncharov wrote: > It would probably take a new m4 macro AM_MAKE_SILENT_INCLUDE that tests > for the availability of "-include", and if found, also somehow changes > the rest of the depfile logic to use

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Jan Engelhardt
On Thursday 2023-02-09 22:53, Dmitry Goncharov wrote: > >> If you try this with e.g. >> OpenBSD make, it will complain. > >That's why i asked those questions about portability. >Do i understand it correctly, that a need to support bmake forces >automake to abandon a good mechanism to rebuild

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Dmitry Goncharov
On Thu, Feb 9, 2023 at 11:41 AM Jan Engelhardt wrote: > This is a GNU extension. Not only gnu. Also supported by sun make. > If you try this with e.g. > OpenBSD make, it will complain. That's why i asked those questions about portability. Do i understand it correctly, that a need to support

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Jan Engelhardt
On Thursday 2023-02-09 22:33, Dmitry Goncharov wrote: > >> .Po file contents control when an .o file -- and thus also >> the .Po file itself -- is remade. >> If a .Po file has no practical content, there is no indication >> that it needs to be remade. > >Absence of the depfile is such an

Re: Generating missing depfiles by an automake based makefile

2023-02-09 Thread Dmitry Goncharov
On Wed, Feb 8, 2023 at 11:54 AM Jan Engelhardt wrote: > depfiles are created ahead of make so that the include command > in Makefiles succeeds (include-with-ignore is non-portable AFAIR). Atleast, gnu make and sun make can build included files. > depfiles are not specifically tracked; this is

Re: Generating missing depfiles by an automake based makefile

2023-02-08 Thread Jan Engelhardt
On Wednesday 2023-02-08 03:39, Dmitry Goncharov wrote: > >This rule restores a missing depfile file by creating a file with one >line '# dummy'. (Next version of automake will create an empty one). >There must have been a reason for generating such a depfile. depfiles are created ahead of make

Generating missing depfiles by an automake based makefile

2023-02-08 Thread Dmitry Goncharov
Good morning. Here is a rule from an automake generated makefile. $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ This rule restores a missing depfile file by creating a file with one line '# dummy'. (Next version of automake will create an empty