Skip to content

Commit

Permalink
Merge pull request #123 from joshix/master
Browse files Browse the repository at this point in the history
Build mktags and >buildtags to make discount build on Plan 9 again.
  • Loading branch information
David Parsons committed Jun 25, 2015
2 parents 32974ae + 2ac3986 commit af67d35
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 45 deletions.
40 changes: 0 additions & 40 deletions Plan9/README

This file was deleted.

38 changes: 38 additions & 0 deletions Plan9/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# *Discount* Markdown compiler on Plan 9

## Build
% CONFIG='--with-dl=both' mk config
% mk test
% mk install
% markdown -V
markdown: discount X.Y.Z DL=BOTH

### Configuration
To select features and extensions, `--with-dl=both` may be replaced by zero or more of:

* `--enable-dl-tag`: Enable the definition list tag extension with the default (`discount`) tag style
* `--with-dl=`*tagstyle*: Set the tags that define `<dl>`s to *tagstyle*. *Tagstyle* must be one of `discount`, `extra`, or `both`. Implies `--enable-dl-tag`.
* `--enable-pandoc-header`: Use pandoc-style header blocks
* `--enable-superscript`: `A^B` becomes A<sup>B</sup>
* `--enable-amalloc`: Enable memory allocation debugging
* `--with-tabstops=`*N*: Set tabstops to *N* characters (default 4)
* `--enable-alpha-list`: Enable `(a)/(b)/(c)` list markers
* `--enable-all-features`: Turn on all stable optional features

## Notes
1. This is not a port from POSIX to native Plan 9 APIs. The supplied
`mkfile` merely drives Discount's own `configure.sh` through Plan 9's
*APE* environment (in *pcc*(1)) to build the Discount source, then
copies the result to locations appropriate for system-wide use on
Plan 9.

2. There are a few other *mk*(1) targets:
* `install.libs`: Discount includes a C library and header.
Installation is optional. Plan 9 binaries are statically linked.
* `install.man`: Add manual pages for *markdown* in sections 1, 2, and 6.
* `install.progs`: Extra programs. *makepage* writes complete XHTML
documents, rather than fragments. *mkd2html* is similar, but produces
HTML.

3. `CONFIG`, the argument list given to `../configure.sh`, must contain at least `--with-dl=both` to produce a binary that
passes `../discount/tests/dl.t`.
2 changes: 1 addition & 1 deletion Plan9/markdown.2
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ tags from the output.
Suppress Smartypants-style replacement of quotes, dashes, or ellipses.
.TP
.B MKD_STRICT
Disable superscript and relaxed emphasis processing if configured; otherwise a no-op.
Disable superscript and relaxed emphasis processing.
.TP
.B MKD_TAGTEXT
Process as inside an
Expand Down
4 changes: 1 addition & 3 deletions Plan9/markdown.6
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,7 @@ cell in the column.
A colon at both ends of a column's header dashes indicates center alignment.
.TP
Relaxed Emphasis
If configured with
.BR --relaxed-emphasis ,
the rules for emphasis are changed so that a single
The rules for emphasis are changed so that a single
.B _
will not count as an emphasis character in the middle of a word.
This is useful for documenting some code where
Expand Down
2 changes: 1 addition & 1 deletion Plan9/mkfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BIN=/$objtype/bin
CC='cc -D_BSD_EXTENSION -D_C99_SNPRINTF_EXTENSION'

markdown:
ape/psh -c 'cd .. && make'
ape/psh -c 'cd .. && $CC mktags.c -o mktags && ./mktags > blocktags && make'

none:V: markdown

Expand Down

0 comments on commit af67d35

Please sign in to comment.