commit ff4f35963b84c7a39b4e55d17ebfef9728582246
parent 219bd6244dc2223d0da58a40a650c2162ee2585d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 26 Apr 2024 19:08:29 +0200
Fix Makefile “lint” target
Add man page generation as a prerequisite
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -70,13 +70,18 @@ src/green-version.h: src/green-version.h.in
$(CC) $(CFLAGS) $(DPDC_CFLAGS) -c $< -o $@
################################################################################
-# Installation
+# Manual pages
################################################################################
+man: doc/sgreen.1
+
doc/sgreen.1: doc/sgreen.1.in
sed -e 's#@GREEN_ARGS_DEFAULT_VERBOSE_LEVEL@#$(GREEN_ARGS_DEFAULT_VERBOSE_LEVEL)#g'\
$@.in > $@
-install: build_executable doc/sgreen.1
+################################################################################
+# Installation
+################################################################################
+install: build_executable man
@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/bin" sgreen
@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" doc/sgreen.1
@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/sgreen-input.5
@@ -103,7 +108,7 @@ clean:
distclean: clean
rm -f $(DEP)
-lint:
+lint: man
shellcheck -o all make.sh
mandoc -Tlint -Wall doc/sgreen.1 || [ $$? -le 1 ]
mandoc -Tlint -Wall doc/sgreen-input.5 || [ $$? -le 1 ]