diff options
Diffstat (limited to 'doc/Makefile')
-rw-r--r-- | doc/Makefile | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..47e8669 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,48 @@ +# Makefile for manual pages +# Copyright (C) 2025 Nguyễn Gia Phong +# +# This file is part of scadere. +# +# Scadere is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Scadere is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with scadere. If not, see <https://www.gnu.org/licenses/>. + +.POSIX: +.PHONY: all clean install uninstall + +PREFIX ?= /usr/local +BINDIR ::= $(DESTDIR)$(PREFIX)/bin +MANDIR ::= $(DESTDIR)$(PREFIX)/share/man +MAN1 ::= scadere-check.1 scadere-listen.1 +MAN1FLAGS ::= -s 1 --source=Scadere --locale=en_US.UTF-8\ + --include=common.h2m --no-info + +all: $(MAN1) + +scadere-check.1: $(BINDIR)/scadere-check check.h2m common.h2m + help2man --name='TLS certificate expiration checker'\ + $(MAN1FLAGS) --include=check.h2m --output=$@ $< + +scadere-listen.1: $(BINDIR)/scadere-listen listen.h2m common.h2m + help2man --name='Atom feed server to remind of TLS certificate renewal'\ + $(MAN1FLAGS) --include=listen.h2m --output=$@ $< + +clean: + rm -f $(MAN1) + +install: $(MAN:%.1=$(MANDIR)/man1/%.1) + +$(MANDIR)/man1/%.1: %.1 + install -Dm 644 $< $@ + +uninstall: + rm -f $(MAN:%.1=$(MANDIR)/man1/%.1) |