summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-02 12:15:12 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-02 12:15:12 (EDT)
commite1274045ece68af95e5a5991313aad1e90b99374 (patch)
tree54f17aa0a8ecf94abe7bd2a8fc46ab7e8d95ba9e
parentb5ac78d3f55a42cc969f005120891d6e8e1c32f7 (diff)
Makefile.am: New "wikiman" target
-rw-r--r--Makefile.am18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 681fd47..98a2ed9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -130,6 +130,21 @@ todo:
printf '\n'; \
fi
+wikiman_script = \
+ H; \
+ $${ \
+ g; \
+ s|^.*<h1[^>]*>\([^<]*\)</h1>|[[!meta title="\1"]]|; \
+ s|<hr>\n*</body>.*$$||; \
+ p; \
+ };
+wikiman: $(man1_MANS) $(man8_MANS)
+ set -e; \
+ for f in $(man1_MANS) $(man8_MANS); do \
+ groff -m man -T html "$${f}" | sed -n '$(wikiman_script)' \
+ >"$${f}.mdwn"; \
+ done
+
install-data-local: $(locale_MESSAGES)
@$(NORMAL_INSTALL)
for f in $(locale_MESSAGES); do \
@@ -155,6 +170,9 @@ uninstall-hook:
fi; \
done
+clean-local:
+ rm -f man/*.*.mdwn
+
really-clean: distclean
rm -Rf $(srcdir)/aclocal.m4 $(srcdir)/autom4te.cache/ \
$(srcdir)/configure \