From 84595dc32f11002255c2caf8d04fa7cf43c7cf3d Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Fri, 4 Oct 2024 10:35:36 +0000 Subject: [PATCH] docs: Move quickemu_conf manual to section 5 (#1454) * docs: Simplify make rules for pandoc This removes a --standalone duplicate and counter-productive indirections like $(MANSECTION) because it prevents having more than one and docs/Makefile hardcodes the section anyway. * docs: Move quickemu_conf manual to section 5 Where it technically belongs... With the new make rules for pandoc, it's actually much easier to manage manuals in several sections without much overhead. * docs: Remove potential quickemu_conf.1 leftover --- docs/Makefile | 10 ++++++---- docs/pandoc-man.mk | 12 ++++-------- docs/quickemu.1 | 2 +- docs/quickemu.1.md | 2 +- docs/{quickemu_conf.1 => quickemu_conf.5} | 2 +- docs/{quickemu_conf.1.md => quickemu_conf.5.md} | 2 +- docs/quickget.1 | 2 +- docs/quickget.1.md | 2 +- package.nix | 2 +- 9 files changed, 17 insertions(+), 19 deletions(-) rename docs/{quickemu_conf.1 => quickemu_conf.5} (99%) rename docs/{quickemu_conf.1.md => quickemu_conf.5.md} (99%) diff --git a/docs/Makefile b/docs/Makefile index 1f865d8284..f4d2dd7e8d 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -9,16 +9,18 @@ datadir := $(datarootdir) mandir := $(datarootdir)/man bindir := $(PREFIX)/bin -all: quickget.1 quickemu.1 quickemu_conf.1 +all: quickget.1 quickemu.1 quickemu_conf.5 clean: - rm *.1 + rm *.1 *.5 install_docs: all install -d $(DESTDIR)$(mandir)/man1 + install -d $(DESTDIR)$(mandir)/man5 install -m 644 quickget.1 $(DESTDIR)$(mandir)/man1 install -m 644 quickemu.1 $(DESTDIR)$(mandir)/man1 - install -m 644 quickemu_conf.1 $(DESTDIR)$(mandir)/man1 + install -m 644 quickemu_conf.5 $(DESTDIR)$(mandir)/man5 + rm -f $(DESTDIR)$(mandir)/man1/quickemu_conf.1 # install -m 644 quickgui.1 $(DESTDIR)$(mandir)/man1 @@ -34,7 +36,7 @@ install: install_bins install_docs uninstall:: rm -f $(DESTDIR)$(mandir)/man1/quickget.1 rm -f $(DESTDIR)$(mandir)/man1/quickemu.1 - rm -f $(DESTDIR)$(mandir)/man1/quickemu_conf.1 + rm -f $(DESTDIR)$(mandir)/man5/quickemu_conf.5 rm -f $(DESTDIR)$(bindir)/quickget rm -f $(DESTDIR)$(bindir)/quickemu rm -f $(DESTDIR)$(bindir)/quickreport diff --git a/docs/pandoc-man.mk b/docs/pandoc-man.mk index a6390e7a79..67c4bb3600 100644 --- a/docs/pandoc-man.mk +++ b/docs/pandoc-man.mk @@ -1,11 +1,7 @@ PANDOC ?= pandoc +PANDOC_OPTIONS = -f gfm+definition_lists -MANSECTION ?= 1 +.SUFFIXES: .1.md .1 .5.md .5 -PANDOC_OPTIONS=-f gfm+definition_lists --standalone - - -MANPAGE.md = $(PANDOC) --standalone $(PANDOC_OPTIONS) --to man - -%.$(MANSECTION): %.$(MANSECTION).md - $(MANPAGE.md) $< -o $@ \ No newline at end of file +.1.md.1 .5.md.5: + $(PANDOC) --standalone $(PANDOC_OPTIONS) --to man -o $@ $< diff --git a/docs/quickemu.1 b/docs/quickemu.1 index 328d57d1fb..eab67eacfb 100644 --- a/docs/quickemu.1 +++ b/docs/quickemu.1 @@ -1325,6 +1325,6 @@ Full sources at: \c .UR https://github.com/quickemu-project/quickemu .UE \c .PP -quickemu_conf(1), quickget(1), quickgui(1) +quickemu_conf(5), quickget(1), quickgui(1) .SH AUTHORS Martin Wimpress. diff --git a/docs/quickemu.1.md b/docs/quickemu.1.md index 753d801b70..ac986f1cf5 100644 --- a/docs/quickemu.1.md +++ b/docs/quickemu.1.md @@ -849,4 +849,4 @@ Submit bug reports online at: Full sources at: -quickemu_conf(1), quickget(1), quickgui(1) +quickemu_conf(5), quickget(1), quickgui(1) diff --git a/docs/quickemu_conf.1 b/docs/quickemu_conf.5 similarity index 99% rename from docs/quickemu_conf.1 rename to docs/quickemu_conf.5 index ca950b1c21..f8e05faa77 100644 --- a/docs/quickemu_conf.1 +++ b/docs/quickemu_conf.5 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 3.3 .\" -.TH "QUICKEMU_CONF" "1" "August 2, 2024" "quickemu_conf" "Quickemu Configuration Manual" +.TH "QUICKEMU_CONF" "5" "August 2, 2024" "quickemu_conf" "Quickemu Configuration Manual" .SH NAME quickemu_conf \- Options and parameters in the quickemu .conf .SH DESCRIPTION diff --git a/docs/quickemu_conf.1.md b/docs/quickemu_conf.5.md similarity index 99% rename from docs/quickemu_conf.1.md rename to docs/quickemu_conf.5.md index 8cc9f135fd..acf4a7f1b8 100644 --- a/docs/quickemu_conf.1.md +++ b/docs/quickemu_conf.5.md @@ -3,7 +3,7 @@ author: Martin Wimpress date: August 2, 2024 footer: quickemu_conf header: Quickemu Configuration Manual -section: 1 +section: 5 title: QUICKEMU_CONF --- diff --git a/docs/quickget.1 b/docs/quickget.1 index 3849e31854..0fed9aaaf0 100644 --- a/docs/quickget.1 +++ b/docs/quickget.1 @@ -701,6 +701,6 @@ Full sources at: \c .UR https://github.com/quickemu-project/quickemu .UE \c .PP -quickemu(1), quickemu_conf(1), quickgui(1) +quickemu(1), quickemu_conf(5), quickgui(1) .SH AUTHORS Martin Wimpress. diff --git a/docs/quickget.1.md b/docs/quickget.1.md index 453910b20f..8c5b7892df 100644 --- a/docs/quickget.1.md +++ b/docs/quickget.1.md @@ -485,4 +485,4 @@ Submit bug reports online at: Full sources at: -quickemu(1), quickemu_conf(1), quickgui(1) +quickemu(1), quickemu_conf(5), quickgui(1) diff --git a/package.nix b/package.nix index 55e33b0394..f4765cfdcd 100644 --- a/package.nix +++ b/package.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.1 + installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.5 install -Dm755 -t "$out/bin" chunkcheck quickemu quickget quickreport # spice-gtk needs to be put in suffix so that when virtualisation.spiceUSBRedirection