58 lines
1.1 KiB
Makefile
58 lines
1.1 KiB
Makefile
PDF_TITLE ?= "Report.pdf"
|
|
TEX_TITLE ?= "Report.tex"
|
|
HTML_TITLE ?= "report.html"
|
|
OUT_FILE ?= "Report.md"
|
|
OUT_DIR ?= "outfiles"
|
|
PDF_TEST_TITLE ?= "Report.test.pdf"
|
|
|
|
.PHONY: gen
|
|
gen:
|
|
@OUT_FILE="${OUT_DIR}/${OUT_FILE}" ./scripts/gen.sh
|
|
|
|
.PHONY: pdf
|
|
pdf: gen
|
|
@pandoc --pdf-engine=xelatex \
|
|
-H resources/head.tex \
|
|
-H "${OUT_DIR}/footer.tex" \
|
|
-o ${PDF_TITLE} \
|
|
"${OUT_DIR}/${OUT_FILE}" \
|
|
resources/Definitions.md \
|
|
&& open ${PDF_TITLE} \
|
|
&& osascript ./scripts/notify.scpt
|
|
|
|
.PHONY: pdf-test
|
|
pdf-test:
|
|
@pandoc --pdf-engine=xelatex \
|
|
-H resources/head.tex \
|
|
-H "${OUT_DIR}/footer.tex" \
|
|
-o "${OUT_DIR}/${PDF_TEST_TITLE}" \
|
|
"${OUT_DIR}/${OUT_FILE}" \
|
|
resources/Definitions.md
|
|
|
|
.PHONY: tex
|
|
tex: gen
|
|
@pandoc \
|
|
-H resources/head.tex \
|
|
-H "${OUT_DIR}/footer.tex" \
|
|
-o "${OUT_DIR}/${TEX_TITLE}" \
|
|
"${OUT_DIR}/${OUT_FILE}"
|
|
|
|
.PHONY: html
|
|
html: gen
|
|
@pandoc \
|
|
-o "${OUT_DIR}/${HTML_TITLE}" \
|
|
"${OUT_DIR}/${OUT_FILE}" \
|
|
&& open "${OUT_DIR}/${HTML_TITLE}"
|
|
|
|
.PHONY: install
|
|
install:
|
|
@brew install pandoc \
|
|
mactex-no-gui \
|
|
imagemagick \
|
|
gettext
|
|
|
|
@.PHONY: clean
|
|
clean:
|
|
@rm -rf outfiles
|
|
@mkdir outfiles
|