summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorlbonn <lbonn@users.noreply.github.com>2024-03-05 16:22:47 +0100
committerGitHub <noreply@github.com>2024-03-05 16:22:47 +0100
commit433f9664e93e7354c3c5dee0d8bfb234ae1ee8d7 (patch)
tree6e692e08076c5294a7ec0addec4ffeaa1b119e67 /Makefile.am
parent3d29715e1edb073ed1e0494cdfd8aef7b0637ca5 (diff)
[Doc] Switch to pandoc and remove generated files (#1955)
* [Build] Add missing dist files from libnkutils * [Doc] Switch to pandoc and remove generated files * [Doc] Rewrite markdown for conversion to man * convert existing markup to use definition list (a bit hacky...) * rewrite title to pandoc man metadata * reduce heading nesting to match most man pages * inline code displayed as bold, also common man style * [Doc] New installation with autoconf and meson - autoconf: * generate in source directory if pandoc found * install from source directory - meson: * generate and install with build directory if pandoc found * try to install from source directory if pandoc not found * bail otherwise * [Doc] Make pandoc filter 2.9 compatible Man pages look better with pandoc >= 2.17
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am59
1 files changed, 41 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index acf567ef..adcda08c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,19 +172,52 @@ rofi_LDADD=\
$(LIBS)
##
-# Manpage
+# Manpages
##
+
+.PHONY: generate-manpage
+
+if FOUND_PANDOC
+
+generate-manpage: doc/rofi.1\
+ doc/rofi-sensible-terminal.1\
+ doc/rofi-theme-selector.1\
+ doc/rofi-debugging.5\
+ doc/rofi-dmenu.5\
+ doc/rofi-keys.5\
+ doc/rofi-script.5\
+ doc/rofi-theme.5
+
+doc/rofi.1: doc/rofi.1.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-sensible-terminal.1: doc/rofi-sensible-terminal.1.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-theme-selector.1: doc/rofi-theme-selector.1.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-debugging.5: doc/rofi-debugging.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-dmenu.5: doc/rofi-dmenu.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-keys.5: doc/rofi-keys.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-script.5: doc/rofi-script.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+doc/rofi-theme.5: doc/rofi-theme.5.markdown
+ pandoc --standalone --to=man --lua-filter=$(top_srcdir)/doc/man_filter.lua -f markdown-tex_math_dollars -o ./$@ ./$<
+
+endif
+
dist_man1_MANS=\
doc/rofi.1\
- doc/rofi-theme-selector.1\
- doc/rofi-sensible-terminal.1
+ doc/rofi-sensible-terminal.1\
+ doc/rofi-theme-selector.1
dist_man5_MANS=\
- doc/rofi-theme.5\
doc/rofi-debugging.5\
- doc/rofi-keys.5\
doc/rofi-dmenu.5\
- doc/rofi-script.5
+ doc/rofi-keys.5\
+ doc/rofi-script.5\
+ doc/rofi-theme.5
EXTRA_DIST += \
doc/rofi-theme.5.markdown \
@@ -254,19 +287,7 @@ EXTRA_DIST+=\
doc/default_configuration.rasi\
doc/default_theme.rasi\
Changelog
-##
-# Indent
-##
-update-manpage: $(top_srcdir)/doc/rofi-theme-selector.1.markdown $(top_srcdir)/doc/rofi.1.markdown $(top_srcdir)/doc/rofi-theme.5.markdown $(top_srcdir)/doc/rofi-script.5.markdown ${top_srcdir}/doc/rofi-sensible-terminal.1.markdown ${top_srcdir}/doc/rofi-keys.5.markdown ${top_srcdir}/doc/rofi-dmenu.5.markdown $(top_srcdir)/doc/rofi-debugging.5.markdown
- go-md2man -in $(top_srcdir)/doc/rofi.1.markdown -out $(top_srcdir)/doc/rofi.1
- go-md2man -in $(top_srcdir)/doc/rofi-theme-selector.1.markdown -out $(top_srcdir)/doc/rofi-theme-selector.1
- go-md2man -in $(top_srcdir)/doc/rofi-theme.5.markdown -out $(top_srcdir)/doc/rofi-theme.5
- go-md2man -in $(top_srcdir)/doc/rofi-debugging.5.markdown -out $(top_srcdir)/doc/rofi-debugging.5
- go-md2man -in $(top_srcdir)/doc/rofi-keys.5.markdown -out $(top_srcdir)/doc/rofi-keys.5
- go-md2man -in $(top_srcdir)/doc/rofi-script.5.markdown -out $(top_srcdir)/doc/rofi-script.5
- go-md2man -in $(top_srcdir)/doc/rofi-dmenu.5.markdown -out $(top_srcdir)/doc/rofi-dmenu.5
- go-md2man -in $(top_srcdir)/doc/rofi-sensible-terminal.1.markdown -out $(top_srcdir)/doc/rofi-sensible-terminal.1
##
# Rofi test program
@@ -656,6 +677,8 @@ EXTRA_DIST += \
subprojects/libgwater/wayland-server/meson.build \
subprojects/libgwater/meson.build \
subprojects/libgwater/win/meson.build \
+ subprojects/libnkutils/bindings/meson.build \
+ subprojects/libnkutils/core/meson.build \
subprojects/libnkutils/meson.build \
subprojects/libnkutils/meson_options.txt \
subprojects/libgwater/wayland/libgwater-wayland.h \