tikzexternalize produz um makefile quebrado no FreeBSD

tikzexternalize produz um makefile quebrado no FreeBSD

O seguinte mwe.texcria um makefile, que não funciona no FreeBSD; é principalmente retirado do pgfplotsmanual.

\documentclass{article}

\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize[mode=list and make]

\begin{document}

\begin{figure}
\begin{tikzpicture}
\begin{axis}
\addplot {x^2};
\end{axis}
\end{tikzpicture}
\caption{Our first external graphics example}
\end{figure}

\end{document}

Ele é compilado pdflatex mwe.texe o seguinte makefile é gerado.

ALL_FIGURE_NAMES=$(shell cat mwe.figlist)
ALL_FIGURES=$(ALL_FIGURE_NAMES:%=%.pdf)

allimages: $(ALL_FIGURES)
    @echo All images exist now. Use make -B to re-generate them.

FORCEREMAKE:

include $(ALL_FIGURE_NAMES:%=%.dep)

%.dep:
    mkdir -p "$(dir $@)"
    touch "$@" # will be filled later.

mwe-figure0.pdf: 
    pdflatex -halt-on-error -interaction=batchmode -jobname "mwe-figure0" "\def\tikzexternalrealjob{mwe}\input{mwe}"

mwe-figure0.pdf: mwe-figure0.md5

que falha na chamada make -f mwe.makefilecom a seguinte saída

/tmp/tmp.GXQ4YxVM [ make -f mwe.makefile                                                        ] 4:18 nachm.
make: "/tmp/tmp.GXQ4YxVM/mwe.makefile" line 9: Could not find .dep
make: Fatal errors encountered -- cannot continue
make: stopped in /tmp/tmp.GXQ4YxVM

Responder1

FreeBSDtem sua própria implementação makeque não é totalmente compatível com oGNUimplementação; o makefile gerado pela externalizebiblioteca está usando mais do que oPOSIXconjunto de recursos de make.

Usando oGNU makefornecido pelo FreeBSD o comando gmake, o comando gmake -f mwe.makefilegera a seguinte saída

mkdir -p "./"
touch "mwe-figure0.dep" # will be filled later.
pdflatex -halt-on-error -interaction=batchmode -jobname "mwe-figure0" "\def\tikzexternalrealjob{mwe}\input{mwe}"
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
All images exist now. Use make -B to re-generate them.

informação relacionada