groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: groffer.am uses DESTDIR incorrectly


From: G. Branden Robinson
Subject: Re: groffer.am uses DESTDIR incorrectly
Date: Sun, 17 Jul 2022 18:01:50 -0500

Hi phoebos,

At 2022-07-17T23:12:38+0100, phoebos wrote:
> From contrib/groffer/groffer.am lines 93-103:
> 
>     groffer: $(GROFFER_PERL) $(GROFFER_REST) $(SH_DEPS_SED_SCRIPT)
>         $(AM_V_GEN)sed -f "$(SH_DEPS_SED_SCRIPT)" \
>            -e "s|[@]g[@]|$(g)|g" \
>            -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
>            -e "s|[@]libdir[@]|$(DESTDIR)$(libdir)|g" \
>            -e "s|[@]groffer_dir[@]|$(DESTDIR)$(groffer_dir)|g" \
>            -e "s|[@]VERSION[@]|$(VERSION)|g" \
>            -e "$(SH_SCRIPT_SED_CMD)" \
>            $(groffer_srcdir)/groffer.pl \
>            >$@ \
>         && chmod +x $@;
> 
> This use of DESTDIR, modifying the internal paths used in groffer,
> causes it not to work: I build then run `make DESTDIR=/tmp/g install`,
> for example, so that I can externally document what files are
> installed by groff, and then install the project to /usr/bin,
> /usr/lib, etc.  DESTDIR is conventionally used in this way as a
> temporary directory, not considered to be the final location of files
> to be installed.  However, after this, my /usr/bin/groffer file looks
> on line 136 for /tmp/g/usr/lib/groff/groffer, which does not exist,
> but /usr/lib/groff/groffer does. So, groffer exits early.
> 
> Could this issue be fixed? (Simply remove $(DESTDIR) from the above
> lines.)

Unfortunately the answer is "no", simply because groffer is not going to
be part of the next groff release.  We removed it in April 2020 and it
was not part of the 1.23.0.rc1 release candidate.

https://alpha.gnu.org/gnu/groff/groff-1.23.0.rc1.tar.gz
https://alpha.gnu.org/gnu/groff/groff-1.23.0.rc1.tar.gz.sig

On the bright side, after the above release, "grog" was extensively
revised and refactored, fixing many bugs.  You might want to write a
shell alias or function that wraps it to easily launch groff using your
preferred output device or other options.  grog has also been
restructured so that it exists in a single script file now, so it is
easy to email around.  I am therefore attaching a copy.

Regards,
Branden

Attachment: grog.pl
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]