【问题标题】:Makefile clean doesn't rm remove the files I wantMakefile clean 不会 rm 删除我想要的文件
【发布时间】:2020-08-26 17:32:42
【问题描述】:

我的 Makefile 如下所示:

all:
        pdflatex file.tex
        pdflatex file.tex
        pdflatex file.tex
        bibtex file
        pdflatex file.tex
        pdflatex file.tex

clean:
        rm -rf *.aux *.toc *.log *.out *.bbl *.blg

一切正常,最后,没有具有上述扩展名的文件被删除。

我没有收到任何错误消息,因为输出的结尾如下:

Output written on file.pdf (175 pages, 35867283 bytes).
Transcript written on file.log.

你猜为什么?谢谢!

【问题讨论】:

    标签: makefile latex rm


    【解决方案1】:

    在命令行中输入“make clean”,它会清理那些

    【讨论】:

    • 非常感谢!很明显我是 Makefile 的新手,对吧? :D
    【解决方案2】:

    你可以编译而不是执行很多不必要的命令

     latexmk -c -pdf file
    

    latexmk 将自动确定需要运行哪些和多少次 latex、bibtex 等,并且使用 -c 选项,所有非必要文件都将被清理

    【讨论】:

      猜你喜欢
      • 2014-10-09
      • 2014-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-17
      • 2017-06-06
      • 2016-01-24
      • 2020-02-04
      相关资源
      最近更新 更多