Re: ylwrap needs a "mkdir -p"?

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.printing.groff.general
Message-ID <20251208103402.o2krmd43sqyqtoac@illithid>
Hi Bruno,

At 2025-12-08T11:21:54+0100, Bruno Haible wrote:
> G. Branden Robinson wrote:
> > how do I patch "build-aux/ylwrap" in situ
> > so that I can hobble along until gnulib has an official fix?
> 
> https://www.gnu.org/software/gnulib/manual/html_node/Extending-Gnulib.html

Thanks!  I'll study that.

> > While compiling groff recently I had a failure.
> > 
> >   YACC     src/preproc/pic/pic.cpp
> > /.../src/GIT/groff/build/../src/preproc/pic/pic.ypp:93.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
> >    93 | %expect 2
> >       | ^~~~~~~
> > /.../src/GIT/groff/build/../src/preproc/pic/pic.ypp:1456.11-1461.17: warning: rule useless in parser due to conflicts [-Wother]
> >  1456 |         | ORDINAL LAST object_type relative_path
> >       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > updating src/preproc/pic/pic.output
> > mv: cannot move 'tmp-pic.output' to '../src/preproc/pic/pic.output': No such file or directory
> > ../build-aux/ylwrap: line 206: ../src/preproc/pic/pic.cpp: No such file or directory
> > updating src/preproc/pic/pic.hpp
> > mv: cannot move 'tmp-pic.hpp' to '../src/preproc/pic/pic.hpp': No such file or directory
> > make[2]: *** [Makefile:11822: src/preproc/pic/pic.cpp] Error 1
> 
> Usually it's the responsibility the of the Makefile to create
> directories.

Agreed.

> When you compile a .c file to a .o file, or when you create a file in
> some other ways — from 'cat' to 'sed' — the creation of the target
> directory is part of the Makefile rule, not of the 'gcc', 'cat', or
> 'sed' command.  Why should it be different for 'ylwrap'?

Another part of the GNU build system claimed responsibility for this
task.

> So, how does your Makefile rule for src/preproc/pic/pic.cpp look like?

I don't have one.  I'm relying on Automake.

Here's what it puts in groff's build/Makefile.

.ypp.cpp:
	$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)

Just that one line.

Regards,
Branden
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmk2qY8ACgkQ0Z6cfXEm
bc5YSRAAg4dTO+NxreUj3v9jtH8CVFzhgbRIjeDK6MpPOZKTqwvnl2R1SiUYkHni
CHsAJ1sPzbxMRRDdB9643QTcZBkroS/EsRfOZSZeWpsHkq6r/DGXLN1EnGiSbrCu
RQ6jSBr3DUpTyoHEoksZ03r4QFCjKUt6vXAcAKkg6ajK2jIFCiGyRNCzcqjrrVIH
kH53iixzYkuO1tiHzq7GrocWm2A/kiCZWwSWNCG/Uv5wqVdrDR25wIILGccQqG1X
UPdF+4YV0Q+v4inCiSvLVpfEm0d23QOvCvt8t2/AH4ObKOC6uzsDcenbkygoCN/j
Iz+7uO61wl7zxN1OTuHWw7FQ7VT9Pn4JE/kGwukU5/DuLZ2bdVGf7tFlelsfufZ8
NKXMy5Yz0BOgb84QkaLD9VylepQawVmcnF8OZnwu9yo67t/91RGytAvRJqg1HjOJ
dp0knM75smlqfnj6h9i4q/zY9N7eOB7p3tsrEaUFbcS9kjJS1CQ8+v/M8t7UgdU6
yzuNvS4E/F53sGqnbmEUqGuOVZYv+k3QNa6bL85UBikPc4GuuwQwcdgh+9xffg0E
E9gTVBxz78wWVltOZdCggEY00vR4d9K0DO9eppAEk+h77YYshAqppFDTEAYukxnY
FOIhuTfvdbhHu0dbMQAsl4ilhgvRDelGBJWy0tmbed6lQb5M3tE=
=FuK7
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.