summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-02 12:27:55 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-02 12:27:55 (EDT)
commitf6f4e858207d7df649d9848fa91458925b7b1794 (patch)
tree13012905a5bb8115ddfe052763e516c52a566469 /Makefile.am
parent9376578379d78147e620acf14c5892c3ef5c75f2 (diff)
Makefile.am: New "wikiman" target
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 64501a1..c835b73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,6 +74,21 @@ do_subst = sed \
all-local: $(locale_MESSAGES) $(archtab_sources)
+wikiman_script = \
+ H; \
+ $${ \
+ g; \
+ s|^.*<h1[^>]*>\([^<]*\)</h1>|[[!meta title="\1"]]|; \
+ s|<hr>\n*</body>.*$$||; \
+ p; \
+ };
+wikiman: $(man1_MANS)
+ set -e; \
+ for f in $(man1_MANS); do \
+ groff -m man -T html "$${f}" | sed -n '$(wikiman_script)' \
+ >"$${f}.mdwn"; \
+ done
+
install-data-local: $(locale_MESSAGES) $(archtab_sources)
@$(NORMAL_INSTALL)
for f in $(locale_MESSAGES); do \
@@ -121,6 +136,9 @@ uninstall-hook:
fi; \
done
+clean-local:
+ rm -f man/*.*.mdwn
+
really-clean: distclean
rm -Rf $(srcdir)/aclocal.m4 $(srcdir)/autom4te.cache/ \
$(srcdir)/configure \