From 12a55aca3946cd39840081d81b53d901678ed1b9 Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Wed, 12 Feb 2025 01:17:56 +0100
Subject: [PATCH] add help targets

---
 Makefile | 10 ++++++----
 vars     |  7 ++++++-
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index bd4f4f8..5d94113 100644
--- a/Makefile
+++ b/Makefile
@@ -16,12 +16,14 @@ $(DROSS)/test.pdf: $(ALL_FILES) $(DROSS)
 	$(GLOS) test
 	$(RUN) test.tex
 
-docs.pdf: images/wide.jpg STYLE_FILES | $(DROSS)
+$(DBOOK): docs.pdf
+	$(CP) $< $@
+docs.pdf: images/wide.jpg STYLE_FILES | $(DROSS) ## Make documentation
 	$(RUN) docs.tex
 	$(GLOS) docs
 	$(RUN) docs.tex
 	$(CP) $(DROSS)/docs.pdf docs.pdf
-character_sheets.pdf: HANDOUTS STYLE_FILES | $(DROSS)
+character_sheets.pdf: HANDOUTS STYLE_FILES | $(DROSS) ## Character sheets
 	$(RUN) character_sheets.tex
 	$(RUN) character_sheets.tex
 	$(CP) $(DROSS)/character_sheets.pdf character_sheets.pdf
@@ -36,10 +38,10 @@ booklet.pdf: | STYLE_FILES HANDOUTS $(DROSS)
 
 /tmp/p_2.pdf: booklet.pdf
 	pdfjam --angle '-90' $< 2 --outfile $@
-rules.pdf: /tmp/p_1.pdf /tmp/p_2.pdf
+rules.pdf: /tmp/p_1.pdf /tmp/p_2.pdf ## One-page rules summary
 	pdfunite $^ $@
 
-markets.pdf: config/market.sty $(wildcard config/markets/*) | $(DROSS)
+markets.pdf: config/market.sty $(wildcard config/markets/*) | $(DROSS) ## Price-sheets for baileys and town
 	$(RUN) -jobname markets markets/all.tex
 	$(RUN) -jobname markets markets/all.tex
 	$(CP) $(DROSS)/$@ .
diff --git a/vars b/vars
index e35b2b1..fdc8089 100644
--- a/vars
+++ b/vars
@@ -16,10 +16,13 @@ GLOS := makeglossaries -d $(DROSS)
 RUN := lualatex -output-directory $(DROSS) -shell-escape
 CLEAN := $(RM) -r $(DROSS) $(LOCAL_DROSS) qr.tex *.pdf .switch-gls svg-inkscape
 
-
+.PHONY: book
+book: $(RELEASE) ## Compile the pdf
 $(RELEASE): $(DBOOK)
 	@$(CP) $< $@
 
+targets += $(RELEASE)
+
 .PHONY: LOCTEX
 LOCTEX: $(wildcard *.tex)
 
@@ -55,6 +58,8 @@ check: ## Check you have the project dependencies
 	@command -v latexmk >/dev/null || ( echo install latexmk && exit 1 )
 	@command -v inkscape >/dev/null || ( echo install inkscape && exit 1 )
 
+targets += check
+
 help: ## Print the help message
 	@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
 		sort | \
-- 
GitLab