Re: git-version-gen doc: writing to intermediate file

2025-01-14 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > Simon Josefsson wrote: >> I pushed the attached patch to make >> the usage of 'dist-hook' a bit more consistent across gnulib. > >> # tarball-version > > Isn't there a colon missing in this line? Yes, fixed now! Thank you. /Simon signature.asc Description: PGP signatur

Re: git-version-gen doc: writing to intermediate file

2025-01-14 Thread Bruno Haible via Gnulib discussion list
Simon Josefsson wrote: > I pushed the attached patch to make > the usage of 'dist-hook' a bit more consistent across gnulib. > # tarball-version Isn't there a colon missing in this line?

gnulib makefile snippets (was: Re: git-version-gen doc: writing to intermediate file)

2025-01-13 Thread Simon Josefsson via Gnulib discussion list
The git-version-gen thread reminded me that having include'able snippets of these statements is increasingly useful... I get tired of manually syncing the Makefile.am snippets from gnulib manual on every update in gnulib. What do you think of a etc/make/git-version-gen.mk include snippet? There

Re: git-version-gen doc: writing to intermediate file

2025-01-13 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible via Gnulib discussion list writes: > Basil L. Contovounesios wrote: >> Should 'make dist' also fail when $(srcdir)/.git does not exist > > Definitely not. It would prevent "make dist" from succeeding when > run from an unpacked tarball. Agreed. Thanks for these fixes! I pushed the

Re: git-version-gen doc: writing to intermediate file

2025-01-12 Thread Bruno Haible via Gnulib discussion list
Basil L. Contovounesios wrote: > Should 'make dist' also fail when $(srcdir)/.git does not exist Definitely not. It would prevent "make dist" from succeeding when run from an unpacked tarball. Bruno

Re: git-version-gen doc: writing to intermediate file

2025-01-12 Thread Basil L. Contovounesios
Bruno Haible [2025-01-10 12:58 +0100] wrote: > Basil L. Contovounesios wrote: >> Does this imply that writing to a temporary file first is never needed >> under distdir? > > No. It's never needed under $(distdir) *if* the Makefile rule fails when the > command fails. [...] > What is desired, is th

Re: git-version-gen doc: writing to intermediate file

2025-01-10 Thread Bruno Haible via Gnulib discussion list
Basil L. Contovounesios wrote: > >> dist-hook: > >> echo '$(VERSION)' > $(distdir)/.tarball-version > >> > >> whereas the other writes the target directly. > > > > Here it does so because the file is inside a temporary directory. If > > the "make dist" rule fails, the user has to remove

Re: git-version-gen doc: writing to intermediate file

2025-01-10 Thread Basil L. Contovounesios
Bruno Haible [2024-07-26 16:27 +0200] wrote: > Basil L. Contovounesios wrote: >> The commentary in build-aux/git-version-gen illustrates how the files >> .version and .tarball-version could be generated: >> >> $(top_srcdir)/.version: >> echo '$(VERSION)' > $@-t >> mv $@-t $@ >>

Re: git-version-gen doc: writing to intermediate file

2024-07-26 Thread Basil L. Contovounesios
Bruno Haible [2024-07-26 16:27 +0200] wrote: > Basil L. Contovounesios wrote: > >> $(top_srcdir)/.version: >> echo '$(VERSION)' > $@-t >> mv $@-t $@ >> ... >> I'm curious why one recipe writes a temporary file first > The real reason is that if the disk is full, the rule would l

Re: git-version-gen doc: writing to intermediate file

2024-07-26 Thread Bruno Haible
Basil L. Contovounesios wrote: > The commentary in build-aux/git-version-gen illustrates how the files > .version and .tarball-version could be generated: > > $(top_srcdir)/.version: > echo '$(VERSION)' > $@-t > mv $@-t $@ > ... > I'm curious why one recipe writes a temporary fil

git-version-gen doc: writing to intermediate file

2024-07-26 Thread Basil L. Contovounesios
The commentary in build-aux/git-version-gen illustrates how the files .version and .tarball-version could be generated: $(top_srcdir)/.version: echo '$(VERSION)' > $@-t mv $@-t $@ dist-hook: echo '$(VERSION)' > $(distdir)/.tarball-version I'm curious why one recipe wri