foxygit / doom Log in
commit aa72812ca78c3318e726ade30accaf85ef865668
Author:     Mike Swanson <mikeonthecomputer@gmail.com>
AuthorDate: Sun Sep 16 04:51:35 2018 -0700
Commit:     Mike Swanson <mikeonthecomputer@gmail.com>
CommitDate: Sun Sep 16 05:28:25 2018 -0700

    man: Generate Markdown versions of CMDLINE
---
 man/.gitignore          |  4 ++++
 man/CMDLINE.template.md |  8 ++++++++
 man/Makefile.am         | 38 ++++++++++++++++++++++++++++++++------
 3 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/man/.gitignore b/man/.gitignore
index 502283ac..d974b54e 100644
--- a/man/.gitignore
+++ b/man/.gitignore
@@ -1,7 +1,11 @@
 CMDLINE.doom
+CMDLINE.doom.md
 CMDLINE.heretic
+CMDLINE.heretic.md
 CMDLINE.hexen
+CMDLINE.hexen.md
 CMDLINE.strife
+CMDLINE.strife.md
 INSTALL.doom
 INSTALL.heretic
 INSTALL.hexen
diff --git a/man/CMDLINE.template.md b/man/CMDLINE.template.md
new file mode 100644
index 00000000..b7c800a7
--- /dev/null
+++ b/man/CMDLINE.template.md
@@ -0,0 +1,8 @@
+# Command line parameters
+
+This is a full list of the supported command line parameters. A number of
+additional parameters are supported in addition to those present in the DOS
+version.
+
+@content
+
diff --git a/man/Makefile.am b/man/Makefile.am
index 9388d60d..915cb206 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -17,12 +17,6 @@ strifedocsdir = ${docdir}/../${PROGRAM_PREFIX}strife

 if HAVE_PYTHON

-if HAVE_WINDRES
-
-WIN32=-D_WIN32
-
-endif
-
 GENERATED_MAN_PAGES =               \
            @PROGRAM_PREFIX@doom.6         \
            default.cfg.5            \
@@ -52,6 +46,17 @@ hereticdocs_DATA = INSTALL.heretic CMDLINE.heretic
 hexendocs_DATA   = INSTALL.hexen   CMDLINE.hexen
 strifedocs_DATA  = INSTALL.strife  CMDLINE.strife

+if HAVE_WINDRES
+
+WIN32=-D_WIN32
+
+doomdocs_DATA += CMDLINE.doom.md
+hereticdocs_DATA += CMDLINE.heretic.md
+hexendocs_DATA += CMDLINE.hexen.md
+strifedocs_DATA += CMDLINE.strife.md
+
+endif
+
 CLEANFILES = $(GENERATED_MAN_PAGES) $(SETUP_MAN_PAGES) \
              $(doomdocs_DATA) $(hereticdocs_DATA) \
              $(hexendocs_DATA) $(strifedocs_DATA)
@@ -78,6 +83,11 @@ CMDLINE.doom : CMDLINE.template $(top_srcdir)/src $(top_srcdir)/src/doom
                   -p $(srcdir)/CMDLINE.template \
                   $(top_srcdir)/src/ $(top_srcdir)/src/doom/ > $@

+CMDLINE.doom.md : CMDLINE.template.md $(top_srcdir)/src $(top_srcdir)/src/doom
+	$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
+                  -M $(srcdir)/CMDLINE.template.md \
+                  $(top_srcdir)/src/ $(top_srcdir)/src/doom/ > $@
+
 CMDLINE.doom.wikitext : $(top_srcdir)/src $(top_srcdir)/src/doom
 	$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
                   -w $(top_srcdir)/src/ $(top_srcdir)/src/doom/ > $@
@@ -108,6 +118,11 @@ CMDLINE.heretic : CMDLINE.template $(top_srcdir)/src $(top_srcdir)/src/heretic
                  -p $(srcdir)/CMDLINE.template \
                   $(top_srcdir)/src/ $(top_srcdir)/src/heretic/ > $@

+CMDLINE.heretic.md : CMDLINE.template.md $(top_srcdir)/src $(top_srcdir)/src/heretic
+	$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
+                 -M $(srcdir)/CMDLINE.template.md \
+                  $(top_srcdir)/src/ $(top_srcdir)/src/heretic/ > $@
+
 INSTALL.heretic: INSTALL.template
 	$(srcdir)/simplecpp -DHERETIC $(WIN32) \
             -DLONG_GAME_NAME="@PACKAGE_SHORTNAME@ Heretic" \
@@ -135,6 +150,11 @@ CMDLINE.hexen : CMDLINE.template $(top_srcdir)/src $(top_srcdir)/src/hexen
                   -p $(srcdir)/CMDLINE.template \
                   $(top_srcdir)/src/ $(top_srcdir)/src/hexen/ > $@

+CMDLINE.hexen.md : CMDLINE.template.md $(top_srcdir)/src $(top_srcdir)/src/hexen
+	$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
+                  -M $(srcdir)/CMDLINE.template.md \
+                  $(top_srcdir)/src/ $(top_srcdir)/src/hexen/ > $@
+
 INSTALL.hexen: INSTALL.template
 	$(srcdir)/simplecpp -DHEXEN $(WIN32) \
             -DLONG_GAME_NAME="@PACKAGE_SHORTNAME@ Hexen" \
@@ -172,6 +192,11 @@ CMDLINE.strife : CMDLINE.template $(top_srcdir)/src $(top_srcdir)/src/strife
                   -p $(srcdir)/CMDLINE.template \
                   $(top_srcdir)/src/ $(top_srcdir)/src/strife/ > $@

+CMDLINE.strife.md : CMDLINE.template.md $(top_srcdir)/src $(top_srcdir)/src/strife
+	$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
+                  -M $(srcdir)/CMDLINE.template.md \
+                  $(top_srcdir)/src/ $(top_srcdir)/src/strife/ > $@
+
 INSTALL.strife: INSTALL.template
 	$(srcdir)/simplecpp -DSTRIFE $(WIN32) \
             -DLONG_EXE_NAME="@PROGRAM_PREFIX@strife" \
@@ -190,6 +215,7 @@ endif
 EXTRA_DIST = $(man_MANS) $(MANPAGE_GEN_FILES)        \
              wikipages                               \
              CMDLINE.template                        \
+             CMDLINE.template.md                     \
              INSTALL.template                        \
              simplecpp