Skip to content

Instantly share code, notes, and snippets.

@kdungs
Created June 22, 2014 18:56
Show Gist options
  • Save kdungs/12c0198a5330cccbf61a to your computer and use it in GitHub Desktop.
Save kdungs/12c0198a5330cccbf61a to your computer and use it in GitHub Desktop.
A Makefile for LaTeX with intermediate running of biber.
PROJECT=main
build/${PROJECT}.pdf: build/${PROJECT}.bbl
lualatex --output-directory=build ${PROJECT}
build/${PROJECT}.bbl: build/${PROJECT}.bcf
biber build/${PROJECT}
build/${PROJECT}.bcf: ${PROJECT}.tex
lualatex --output-directory=build ${PROJECT}
clean:
rm -f build/*
@madmann91
Copy link

To solve that problem, try to back up the bcf file before running lualatex/pdflatex/xelatex:

build/${PROJECT}.pdf: ${PROJECT}.bbl
	mv build/${PROJECT}.bcf build/${PROJECT}.bcf.bak
	lualatex --output-directory=build ${PROJECT}
	mv build/${PROJECT}.bcf.bak build/${PROJECT}.bcf

@kdungs
Copy link
Author

kdungs commented Nov 9, 2020

Oh this is horribly outdated. In 2020, just use latexmk, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment