logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: dd3e46487b980fd0f2b9aa017b27e1af2f2bd07a
parent 76c98a18dfe8459c09ee051c8860a406c527687b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  1 Oct 2021 21:19:58 +0200

Make: Add manpage linting

mandb / GNU groff seems to have less tolerance than mandoc for rendering
slightly broken manpages, which is rather annoying in my case.

Diffstat:

MMakefile1+
MREADME.md4+++-
Mconfigure11+++++++++++
3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -54,6 +54,7 @@ uri_test: uri.o uri_test.o .PHONY: test test: $(EXE_test) + $(MANDOC) -Tlint -Wunsupp,error,warning ./badwolf.1 .PHONY: install install: all diff --git a/README.md b/README.md @@ -53,12 +53,14 @@ You need to have gettext installed. If you want a GUI, poedit exists and Weblate ## Manual Installation Dependencies are: +- POSIX-compatible Shell (ie. mrsh, dash, lksh) - C11 Compiler (such as clang or gcc) - [WebKitGTK](https://webkitgtk.org/), only the latest stable(2.32.0+) is supported - [libxml-2.0](http://www.xmlsoft.org/), no known version limitation - POSIX make with extension for shell in variables (works with GNU, {Net,Free,Open}BSD) - A pkg-config implementation (pkgconf is recommended) -- (optionnal) gettext implementation (such as GNU Gettext) +- (optional) gettext implementation (such as GNU Gettext) +- (optional, test) [mandoc](https://mdocml.bsd.lv/) (the command) for linting the manpage Compilation is done with `./configure && make`, install with `make install` (`DESTDIR` and `PREFIX` environment variables are supported, amongs other common ones). An example AppArmor profile is provided at `usr.bin.badwolf`, please do some long runtime checks before shipping it or a modified version, help can be provided but with no support. diff --git a/configure b/configure @@ -13,6 +13,7 @@ MSGFMT="${MSGFMT:-msgfmt}" INKSCAPE="${INKSCAPE:-inkscape}" CC="${CC:-cc}" CFLAGS="${CFLAGS:--g -O2 -pie -fPIE} -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wconversion -Wsign-conversion -Werror=implicit-function-declaration -Werror=implicit-int -Werror=vla ${EXTRA_CFLAGS}" +MANDOC="mandoc" DEPS="gtk+-3.0 libxml-2.0" @@ -44,6 +45,15 @@ command -v "${PKGCONFIG}" >/dev/null ; required printf 'Checking %s command existance ...' "${CC}" command -v "${CC}" >/dev/null ; required +printf 'Checking %s command existance ...' "${MANDOC}" +if command -v "${CC}" >/dev/null ; is_ok +then + : +else + MANDOC="true" +fi + + for dep in ${DEPS} do pkg_config_check --exists "$dep" || exit 1 @@ -100,6 +110,7 @@ CC = ${CC} INKSCAPE = ${INKSCAPE} MSGFMT = ${MSGFMT} DBG = ${DBG} +MANDOC = ${MANDOC} CFLAGS = ${CFLAGS} -DDATADIR=\"\${DATADIR}\" -DPACKAGE=\"\${PACKAGE}\" -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"\${VERSION_FULL}\" ${DEPS_cflags} LIBS = ${DEPS_libs}