This is a collection of makefile components that may be useful.
File: pdfbase.mk
The base file. Will automatically include other modules, provides goals to generate and print pdf files
- PROJECTS: The projects to build to PDFs (without file extensions)
- LIBRARIES: Other files in this makefile component bundle to include
- all: Build all in
PROJECTS
- print: Print all in
PROJECTS
print-$(PROJECT)
: Print a single file
File: R.mk
- %.Rmd -> %.md: Knit a Rmarkdown file into plain markdown
- %.Rnw -> %.tex: Knit a Rnoweb file into latex with additions
File: markdown.mk
Using pandoc
, convert markdown files to various other formats
- %.md -> %.html
- %.md -> %.pdf
- PANDOC_OPTS: Options to pass to pandoc
- PANDOC_HTML_OPTS: Options to pass to pandoc for the HTML output format
- PANDOC_PDF_OPTS: Options to pass to pandoc for the PDF output format
File: latex.mk
Using latexmk
, builds latex documents with proper dependency tracking
- %.tex -> %.pdf: Build a pdf from any same-named tex file
- clean-% (requires %.tex): Remove temporary build files for a given tex file
- LATEXMKOPTS: Options to pass to
latexmk