Skip to content

Commit

Permalink
Increase protection of variables and commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbarraca committed Jun 13, 2024
1 parent ba5ff84 commit 3781d95
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ setup:
@sudo apt install texlive-latex-base texlive-lang-portuguese texlive-lang-english biber texlive-latex-extra texlive-science python3-pygments python3-proselint pandoc imagemagick latexmk ghostscript lacheck chktex

build:
@mkdir -p ${OUT}/chapters
cd ${OUT} ; ${LATEXMK} ${LATEXMK_FLAGS} -cd ${SRC}/cover.tex ${SRC}/matter.tex
@mkdir -p "${OUT}/chapters"
cd "${OUT}" ; "${LATEXMK}" ${LATEXMK_FLAGS} -cd "${SRC}/cover.tex" "${SRC}/matter.tex"

preview: build
(${LATEXMK} ${LATEXMK_FLAGS} -pvc -cd ${SRC}/cover.tex & ${LATEXMK} ${LATEXMK_FLAGS} -pvc -cd ${SRC}/matter.tex)
("${LATEXMK}" ${LATEXMK_FLAGS} -pvc -cd "${SRC}/cover.tex" & "${LATEXMK}" ${LATEXMK_FLAGS} -pvc -cd "${SRC}/matter.tex")

print: build
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=${OUT}/thesis-print.pdf ${OUT}/matter.pdf
${SCRIPTS}/simplify-colors.sh ${OUT}/thesis-print.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${OUT}/thesis-print.pdf" "${OUT}/matter.pdf"
"${SCRIPTS}/simplify-colors.sh" "${OUT}/thesis-print.pdf"

ebook: build
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=${OUT}/thesis-ebook.pdf ${OUT}/matter.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${OUT}/thesis-ebook.pdf" "${OUT}/matter.pdf"

clean:
@find ${OUT} -type f ! -name '*.pdf' -delete
@find ${OUT}/* -type d -delete
@find "${OUT}" -type f ! -name '*.pdf' -delete
@find "${OUT}"/* -type d -delete

cleanall:
@rm -rf ${OUT}/*
@rm -rf "${OUT}/*"

lint:
ifeq ($(strip $(texfile)),)
Expand Down

0 comments on commit 3781d95

Please sign in to comment.