This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Voeg Makefile toe voor compilatie van het .tex-bestand naar PDF
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Makefile for compiling a LaTeX document | ||
# | ||
# This Makefile is somewhat generic for a project with a single LaTeX document | ||
# Set the name of the main document without extension in $(main_document) and | ||
# optionally change the compiler (XeLaTeX). | ||
|
||
##---------- Preliminaries ---------------------------------------------------- | ||
.POSIX: # Get reliable POSIX behaviour | ||
.SUFFIXES: # Clear built-in inference rules | ||
.DELETE_ON_ERROR: # Delete incomplete pdf/aux/idx files when TeX aborts with an error | ||
##---------- Variables -------------------------------------------------------- | ||
latex2pdf := xelatex -synctex=1 -interaction=nonstopmode -shell-escape | ||
bibliography := biber | ||
|
||
main_document := bachproef-gids | ||
|
||
##---------- Build targets ---------------------------------------------------- | ||
|
||
help: ## Show this help message (default) | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
all: $(main_document).pdf ## Build the PDF | ||
|
||
%.pdf %.aux: %.tex | ||
$(latex2pdf) $< | ||
while grep 'Rerun to get ' $*.log ; do $(latex2pdf) $< ; done | ||
$(bibliography) $(main_document) | ||
$(latex2pdf) $< | ||
while grep 'Rerun to get ' $*.log ; do $(latex2pdf) $< ; done | ||
|
||
.PHONY: clean mrproper | ||
|
||
clean: ## Verwijder LaTeX hulpbestanden | ||
rm -f ./*.{bak,aux,log,nav,out,snm,ptc,toc,bbl,blg,idx,ilg,ind,tcp,vrb,tps,log,lot,synctex.gz,fls,fdb_latexmk,bcf,run.xml,xdv} | ||
|
||
mrproper: clean ## Verwijder LaTeX hulpbestanden én PDFs | ||
rm -f *.pdf | ||
|