Преглед изворни кода

Update README and Makefile for the latexmk existence check

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
Chun-Hung Tseng пре 3 година
родитељ
комит
16fe2e9eb0
2 измењених фајлова са 3 додато и 0 уклоњено
  1. 1 0
      Makefile
  2. 2 0
      README.md

+ 1 - 0
Makefile

@@ -2,6 +2,7 @@ PROJ = lkmpg
 all: $(PROJ).pdf
 
 $(PROJ).pdf: lkmpg.tex
+	@if ! hash latexmk; then echo "No Latexmk found. See https://mg.readthedocs.io/latexmk.html for installation."; exit 1; fi
 	rm -rf _minted-$(PROJ)
 	latexmk -shell-escape lkmpg.tex -pdf
 

+ 2 - 0
README.md

@@ -40,6 +40,8 @@ $ brew install --cask mactex
 $ sudo tlmgr update --self
 ```
 
+Note that `latexmk` is required to generated PDF, and it probably has been installed on your OS already. If not, please follow the [installation guide](https://mg.readthedocs.io/latexmk.html#installation).
+
 Alternatively, using [Docker](https://docs.docker.com/) is recommended, as it guarantees the same dependencies with our GitHub Actions workflow.
 After install [docker engine](https://docs.docker.com/engine/install/) on your machine, pull the docker image [twtug/lkmpg](https://hub.docker.com/r/twtug/lkmpg) and run in isolated containers.