From 90a1b7ad20d69ced8e5e43eed8d044aa577f8f22 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 3 Nov 2022 07:10:54 -1000 Subject: [PATCH] dev: make man-watch-PROG --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3fe8f3a73..336c652e1 100644 --- a/Makefile +++ b/Makefile @@ -109,8 +109,7 @@ SHELLTESTOPTS=--execdir --threads=64 --exclude=/_ #SHELLTESTSTK=shelltest -w `stack exec which hledger` $(SHELLTESTOPTS) SHELLTESTSTK=COLUMNS=80 $(STACK) exec -- shelltest $(SHELLTESTOPTS) -# # used for make auto, http://joyful.com/repos/searchpath -# SP=sp +WATCHEXEC=watchexec PACKAGES=\ hledger-lib \ @@ -845,6 +844,10 @@ manuals-watch: Shake \ $(call def-help,manuals-watch, rerender manuals when their source files change ) ls $(DOCSOURCEFILES) | entr ./Shake -VV manuals +man-watch-%: Shake \ + $(call def-help,man-watch-PROG, run man on the given man page when its source file changes. Eg make man-watch-hledger-web ) + $(WATCHEXEC) -r -w $*/$*.m4.md './Shake $*/$*.1 && man $*/$*.1' + shakehelp-watch: \ $(call def-help,shakehelp-watch, rerender Shake.hs's help when it changes) ls Shake.hs | entr -c ./Shake.hs