Re: "make pdf" fails on macOS due to incompatibility of echo

Ethan A Merritt <[email protected]> Thu, 15 Dec 2022 12:16:18 -0800
Newsgroups gmane.comp.graphics.gnuplot.devel
Message-ID <CALUAmEs1QcHM4jRiEq+ZwqtzuYopcGDp7x48mS9BoN6MivsevQ@mail.gmail.com>
On Thursday, 15 December 2022 08:02:45 PST Jun. T wrote:
> With the current git master, 'make pdf' fails on two of my Macs.

Got it. Thanks.

The various Makefile.am rules in other subdirectories also
use "echo" rather than "printf".   Was this rule the only
point of failure?

        Ethan



> The problem is in docs/Makefile.am:
>
> 201       ( echo "\usepackage{graphicx}" > gpinsetfigure.tex ; \
> 202         echo "\usepackage{picins}" >> gpinsetfigure.tex ; \
> 203         echo "\newcommand{\gpinsetfigure}[1]{" >> gpinsetfigure.tex ; \
> 204         echo "  \parpic[r][rt]{\includegraphics[width=3in,keepaspectratio]{#1}}" >> gpinsetfigure.tex ; \
> 205         echo "}" >> gpinsetfigure.tex ; \
> 206       ) ; \
> 207     $(AM_V_GEN)touch $@
> 208     $(AM_V_GEN)touch figurestyle
>
> [1] On macOS (at least on some versions), echo builtin of /bin/sh interprets
>  '\n' as a newline, and the line 203 will output:
>
> (blank line)
> ewcommand{\gpinsetfigure}[1]{
>
> to gpinsetfigure.tex, and pdflatex fails.
> (I don't know whether this is a bug or feature of macOS)
>
> [2] (also on Linux, not serious) the '\' at the end of line 206
> should be removed. Otherwise, 'make V=0 pdf' gives an error:
>
>     @echo "  GEN     " pdf_figures;touch pdf_figures
> /bin/sh: @echo: command not found
>
> A possible patch is attached.
>
> printf builtin is more portable than echo.
>
> One of $(AM_V_GEN) is replaced by $(AM_V_at) because they give the
> same output when 'make V=0'.
>
>


--
Ethan A Merritt
Biomolecular Structure Center,  K-428 Health Sciences Bldg
MS 357742,   University of Washington, Seattle 98195-7742


_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta