Skip to content
This repository
tree: 2a18b4b9b9
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 83 lines (68 sloc) 2.672 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
##------------------------------------------------------------------------------------##
##------------------------------------------------------------------------------------##
## Content: Open-Science-Paper LaTeX-Makefile
## Usage: Compile Open-Science-Papers
## Author: Claas-Thido Pfaff
##------------------------------------------------------------------------------------##
##------------------------------------------------------------------------------------##

# Maindocument
DOCUMENT = open_science_paper

# Dependencies maindocument
DEPENDENCIES = $(DOCUMENT).Rnw subdocuments/open_science_paper.cls subdocuments/*.Rnw

# Used Programs
KNITR = knit
BIBTEX = biber
PDFLATEX = pdflatex
PACKER= tar -czf
REMOVER = @-rm -r
PRINTER = @-echo
GREPPER = @-grep
COPY = @-cp
PDFVIEWER = okular
DATE = $(shell date +%y%m%d)

# Example and Empty files
SUBDOCFOLDER = subdocuments/
EXMPLDOCS = subdocuments/exmpl/*
TEMPDOCS = subdocuments/temp/*

# Archive document
ARCHNAME = $(DOCUMENT)_$(DATE).tar.gz
ARCHFILES = $(DOCUMENT).pdf $(DOCUMENT).Rnw subdocuments data graphics makefile

# Clean up the document folder
CLEANFILES = graphics/dynamic/* cache/* *.xdy *tikzDictionary *.idx *.mtc* *.glo *.maf *.ptc *.tikz *.lot *.dpth *.figlist *.dep *.log *.makefile *.out *.map *.tex *.toc *.aux *.tmp *.bbl *.blg *.lof *.acn *.acr *.alg *.glg *.gls *.ilg *.ind *.ist *.slg *.syg *.syi minimal.acn minimal.dvi minimal.ist minimal.syg minimal.synctex.gz *.bcf *.run.xml *-blx.bib

# General rule
all: $(DOCUMENT).pdf

$(DOCUMENT).pdf: $(DEPENDENCIES)
$(KNITR) $(DOCUMENT).Rnw $(DOCUMENT).tex --pdf
$(PDFLATEX) $(DOCUMENT).tex
$(BIBTEX) $(DOCUMENT)
$(PDFLATEX) $(DOCUMENT).tex

# Special rules
showpdf:
$(PDFVIEWER) $(DOCUMENT).pdf &

warnings:
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Multiple defined lables!"
$(PRINTER) ""
$(GREPPER) 'multiply defined' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Undefined lables!"
$(PRINTER) ""
$(GREPPER) 'undefined' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Warnings!"
$(PRINTER) ""
$(GREPPER) 'Warning' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"
$(PRINTER) "Over- and Underfull boxes!"
$(PRINTER) ""
$(GREPPER) 'Overfull' $(DOCUMENT).log
$(GREPPER) 'Underfull' $(DOCUMENT).log
$(PRINTER) "----------------------------------------------------o"

archive:
$(PACKER) $(ARCHNAME) $(ARCHFILES)

clean:
$(REMOVER) $(CLEANFILES)

expldoc:
$(COPY) $(EXMPLDOCS) $(SUBDOCFOLDER)

tmpdoc:
$(COPY) $(TEMPDOCS) $(SUBDOCFOLDER)
Something went wrong with that request. Please try again.