| 1 |
# Linux Vulnerability Mitigation |
| 2 |
# Copyright (C) 2026 Daniel Baumann <[email protected]> |
| 3 |
# |
| 4 |
# SPDX-License-Identifier: PD |
| 5 |
# |
| 6 |
# This program is free software: you have unlimited permission |
| 7 |
# to copy, distribute and modify it. |
| 8 |
# |
| 9 |
# This program is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 |
|
| 13 |
# Depends: python3-docutils |
| 14 |
|
| 15 |
RST2MAN = rst2man \ |
| 16 |
--no-datestamp \ |
| 17 |
--no-generator \ |
| 18 |
--strict \ |
| 19 |
--strip-comments \ |
| 20 |
--tab-width=4 \ |
| 21 |
--verbose |
| 22 |
|
| 23 |
VERSION := $(shell cat ../VERSION.txt) |
| 24 |
|
| 25 |
SHELL := sh -e |
| 26 |
|
| 27 |
all: build |
| 28 |
|
| 29 |
build: man |
| 30 |
|
| 31 |
rebuild: clean build |
| 32 |
|
| 33 |
man: man.in *.rst |
| 34 |
@echo -n "Creating manpages... " |
| 35 |
|
| 36 |
@for FILE in *.rst; \ |
| 37 |
do \ |
| 38 |
cp man.in $$(basename $${FILE} .rst); \ |
| 39 |
$(RST2MAN) $${FILE} | \ |
| 40 |
sed -e '/^.\\" Man page generated/d' \ |
| 41 |
-e '/^.\\" Generated by/d' \ |
| 42 |
-e "s|^\(.TH .*\) \(\"\" \"\"\) |\1 $${VERSION} linux-vulnerability-mitigation |" \ |
| 43 |
>> $$(basename $${FILE} .rst); \ |
| 44 |
echo -n "."; \ |
| 45 |
done |
| 46 |
|
| 47 |
@echo " done." |
| 48 |
|
| 49 |
clean: |
| 50 |
rm -f *.[0-9] |
| 51 |
|
| 52 |
.PHONY: all clean build rebuild man |