这是我的生成文件:
.SILENT:
latexargs = -output-directory=temp -interaction=batchmode -file-line-error-style
thesis: mktemp
latex $(latexargs) thesis || make errors
bibtex -terse temp/A || make errors
bibtex -terse temp/B || make errors
latex $(latexargs) thesis || make errors
pdflatex $(latexargs) thesis || make errors
cat temp/thesis.pdf > thesis.pdf
diff: mktemp
latex $(latexargs) thesis-diff || make errors
bibtex temp/A || make errors
bibtex temp/B || make errors
latex $(latexargs) thesis-diff || make errors
pdflatex $(latexargs) thesis-diff || make errors
rm thesis-diff.tex
clean:
test -e temp
rm -f temp/*
mktemp:
mkdir -p temp
errors:
grep ":[^:]*:" temp/thesis.log
false
如果命令以非零代码退出,是否没有更好的方法来运行某些东西?
我查看了手册,但找不到任何用于此目的的特殊目标。