aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-05-18 18:47:51 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-05-21 02:49:44 +0200
commitf69126d5d45d0f8a243880c5919efc45a0a0197f (patch)
treee9a21e6f13d0698eeac99f122eb602bc0e75c36c /Documentation
parentd22015775e0b76ccf64ad1f8afc68443c308fbce (diff)
downloadsparse-dev-f69126d5d45d0f8a243880c5919efc45a0a0197f.tar.gz
doc: use reST for manpages
MarkDown is really nice and easy to get something quickly but for manpages, the rendering is not really nice and lack index entries. reST has a special syntax for option lists but: 1) not all option syntax are recognized (for example when we use [xyz] to to show that xyz is optionnal). 2) when converted to HTML, a table is used for the list but: * options that are too long break the presentation * unrecognized options break the table 3) the options are also not put in the index Solve this by using reST with '.. option::' directives. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/Makefile2
-rw-r--r--Documentation/dev-options.md42
-rw-r--r--Documentation/dev-options.rst45
3 files changed, 46 insertions, 43 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 64dc0f66..2e8cbdfd 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -20,7 +20,7 @@ help:
$(targets): conf.py Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
-%.1: %.md man
+%.1: %.rst man
@mv build/man/$@ $@
.PHONY: Makefile # avoid circular deps with the catch-all rule
diff --git a/Documentation/dev-options.md b/Documentation/dev-options.md
deleted file mode 100644
index 8b1b30bc..00000000
--- a/Documentation/dev-options.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# sparse - extra options for developers
-
-## SYNOPSIS
-`tools` [`options`]... `file.c`
-
-## DESCRIPTION
-
-This file is a complement of sparse's man page meant to
-document options only useful for development on sparse itself.
-
-## DEVELOPER OPTIONS
-
--f<name-of-the-pass>[-disable|-enable|=last]
-
- If `=last` is used, all passes after the specified one are disabled.
- By default all passes are enabled.
-
- The passes currently understood are:
-
- * `mem2reg`
- * `optim`
-
-### DEBUGGING
-
--fdump-ir[=pass[,pass...]]
-
- Dump the IR at each of the given passes.
-
- The passes currently understood are:
-
- * `linearize`
- * `mem2reg`
- * `final`
-
- The default pass is `linearize`.
-
--v<debug-flag>
-
- Add or display some debug info. The flag can be one of:
-
- * `dead`: annotate dead pseudos.
- * `entry`: dump the IR after all optimization passes.
diff --git a/Documentation/dev-options.rst b/Documentation/dev-options.rst
new file mode 100644
index 00000000..1f213afe
--- /dev/null
+++ b/Documentation/dev-options.rst
@@ -0,0 +1,45 @@
+sparse - extra options for developers
+=====================================
+
+SYNOPSIS
+--------
+``tools`` [`options`]... `file.c``
+
+DESCRIPTION
+-----------
+
+This file is a complement of sparse's man page meant to
+document options only useful for development on sparse itself.
+
+OPTIONS
+-------
+
+.. option:: -fdump-ir=pass,[pass]
+
+ Dump the IR at each of the given passes.
+
+ The passes currently understood are:
+
+ * ``linearize``
+ * ``mem2reg``
+ * ``final``
+
+ The default pass is ``linearize``.
+
+.. option:: -f<name-of-the-pass>[-disable|-enable|=last]
+
+ If ``=last`` is used, all passes after the specified one are disabled.
+ By default all passes are enabled.
+
+ The passes currently understood are:
+
+ * ``mem2reg``
+ * ``optim``
+
+.. option:: -vdead
+
+ Add ``OP_DEATHNOTE`` annotations to dead pseudos.
+
+.. option:: -ventry
+
+ Dump the IR after all optimization passes.