From eb9b93128b2525dbd16a820fb459541720790a33 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Sun, 10 May 2015 09:04:29 -0500 Subject: [PATCH 01/10] Make discount build on Plan 9 again. The Makefile we end up with on Plan 9 doesn't know how to build mktags. So where a *NIX make does something like: cc mktags.c -o mktags && ./mktags > blocktags on Plan 9 we don't compile mktags.c at all, and build Stops there. Plan9/mkfile now includes script to build mktags and deliver its output to the blocktags file before building markdown binary. --- Plan9/mkfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan9/mkfile b/Plan9/mkfile index f15f9878..cd309542 100644 --- a/Plan9/mkfile +++ b/Plan9/mkfile @@ -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 From 20b5de8cb4465be0a73450705954437b87764cf1 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Sun, 10 May 2015 14:40:03 -0500 Subject: [PATCH 02/10] Honor the CC variable we already set up in mkfile, so that mktags compiled with same args as everything else. --- Plan9/mkfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan9/mkfile b/Plan9/mkfile index cd309542..ccbda59f 100644 --- a/Plan9/mkfile +++ b/Plan9/mkfile @@ -2,7 +2,7 @@ BIN=/$objtype/bin CC='cc -D_BSD_EXTENSION -D_C99_SNPRINTF_EXTENSION' markdown: - ape/psh -c 'cd .. && cc mktags.c -o mktags && ./mktags > blocktags && make' + ape/psh -c 'cd .. && $CC mktags.c -o mktags && ./mktags > blocktags && make' none:V: markdown From 01d838d14cb2df3eaaca7f9d698e1df516756576 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Sun, 10 May 2015 23:10:32 -0500 Subject: [PATCH 03/10] Strip out references to 'relaxed-emphasis' configuration option. Relaxed-emphasis is now always built, then controlled with a runtime off switch. This commit manually follows upstream commit b787bc3459ad4a641d8d71b9f5cc31b2b6fc4944 to synchronize (about relax) with the discount source root one directory up. --- Plan9/README | 1 - Plan9/markdown.2 | 2 +- Plan9/markdown.6 | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Plan9/README b/Plan9/README index 255b212a..042dfd80 100644 --- a/Plan9/README +++ b/Plan9/README @@ -17,7 +17,6 @@ --enable-pandoc-header Use pandoc-style header blocks --enable-superscript A^B becomes AB --enable-amalloc Enable memory allocation debugging - --relaxed-emphasis underscores aren't special in the middle of words --with-tabstops=N Set tabstops to N characters (default is 4) --enable-div Enable >%id% divisions --enable-alpha-list Enable (a)/(b)/(c) lists diff --git a/Plan9/markdown.2 b/Plan9/markdown.2 index 9cb1c9d4..d5ee04c1 100644 --- a/Plan9/markdown.2 +++ b/Plan9/markdown.2 @@ -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 diff --git a/Plan9/markdown.6 b/Plan9/markdown.6 index fdefcd48..6bc9d62d 100644 --- a/Plan9/markdown.6 +++ b/Plan9/markdown.6 @@ -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 From 905ebd89ef8b43443475b15389244d37b79b1ac1 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Mon, 11 May 2015 03:17:03 -0500 Subject: [PATCH 04/10] Update the example build to pass ../tests/dl.t. Must have --with-dl=both to pass all included tests. Change the example and explain. Note that on *NIX a bare ./configure.sh && make test passes all. --- Plan9/README | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Plan9/README b/Plan9/README index 042dfd80..ce7188ba 100644 --- a/Plan9/README +++ b/Plan9/README @@ -1,19 +1,23 @@ % Discount on Plan 9 % Josh Wood -% 2009-06-12 +% 2015-05-11 # *Discount* Markdown compiler on Plan 9 -## Build +## Build, test, install: - % CONFIG='--enable-all-features' mk config + % CONFIG='--with-dl=both' mk config + % mk test % mk install % markdown -V - markdown: discount X.Y.Z DL_TAG HEADER DEBUG SUPERSCRIPT RELAXED DIV + markdown: discount X.Y.Z DL=BOTH -`--enable-all-features` may be replaced by zero or more of: +`--with-dl=both` may be replaced by zero or more of: - --enable-dl-tag Use the DL tag extension + --enable-dl-tag Use the definition list tag extension with the + default tag style + --with-dl=T Set the tags that define DLs to T, one of discount, + extra, or both. Implies --enable-dl-tag. --enable-pandoc-header Use pandoc-style header blocks --enable-superscript A^B becomes AB --enable-amalloc Enable memory allocation debugging @@ -27,6 +31,7 @@ The supplied mkfile merely drives Discount's own configure script and then APE's *psh* environment to build the Discount source, then copies the result(s) to locations appropriate for system-wide use on Plan 9. + There are a few other *mk*(1) targets: `install.libs`: Discount includes a C library and header. @@ -37,3 +42,6 @@ Installation is optional. Plan 9 binaries are statically linked. `install.progs`: Extra programs. *makepage* writes complete XHTML documents, rather than fragments. *mkd2html* is similar, but produces HTML. + +`CONFIG` must contain at least `--with-dl=both` to produce a binary that +passes `../discount/tests/dl.t`. From 4ef38719590dd260db2217085925ac5d5a935347 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Mon, 11 May 2015 04:56:37 -0500 Subject: [PATCH 05/10] Doc fmt. Simplify tabbiness and use markdown more in README. --- Plan9/README | 62 ++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/Plan9/README b/Plan9/README index ce7188ba..08092ccb 100644 --- a/Plan9/README +++ b/Plan9/README @@ -4,44 +4,40 @@ # *Discount* Markdown compiler on Plan 9 -## Build, test, install: - - % CONFIG='--with-dl=both' mk config +## Build + % CONFIG='--with-dl=both' mk config % mk test - % mk install - % markdown -V - markdown: discount X.Y.Z DL=BOTH - -`--with-dl=both` may be replaced by zero or more of: - - --enable-dl-tag Use the definition list tag extension with the - default tag style - --with-dl=T Set the tags that define DLs to T, one of discount, - extra, or both. Implies --enable-dl-tag. - --enable-pandoc-header Use pandoc-style header blocks - --enable-superscript A^B becomes AB - --enable-amalloc Enable memory allocation debugging - --with-tabstops=N Set tabstops to N characters (default is 4) - --enable-div Enable >%id% divisions - --enable-alpha-list Enable (a)/(b)/(c) lists - --enable-all-features Turn on all stable optional features + % 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 `
`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 AB +* `--enable-amalloc`: Enable memory allocation debugging +* `--with-tabstops=`*N*: Set tabstops to *N* characters (default 4) +* `--enable-div`: Enable >%id% divisions +* `--enable-alpha-list`: Enable `(a)/(b)/(c)` list markers +* `--enable-all-features`: Turn on all stable optional features ## Notes - -The supplied mkfile merely drives Discount's own configure script and -then APE's *psh* environment to build the Discount source, then copies -the result(s) to locations appropriate for system-wide use on Plan 9. - -There are a few other *mk*(1) targets: - -`install.libs`: Discount includes a C library and header. +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(1) and (6). - -`install.progs`: Extra programs. *makepage* writes complete XHTML + * `install.man`: Add manual pages for markdown(1) and (6). + * `install.progs`: Extra programs. *makepage* writes complete XHTML documents, rather than fragments. *mkd2html* is similar, but produces HTML. -`CONFIG` must contain at least `--with-dl=both` to produce a binary that +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`. From 463a7251cc2aa820006cb6bd77dfcc2ddfefca15 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Mon, 11 May 2015 05:02:13 -0500 Subject: [PATCH 06/10] Remove mention of --enable-div from README. I don't see enable-div mentioned upstairs, and ../tests/div.t passes without this option in CONFIG. --- Plan9/README | 1 - 1 file changed, 1 deletion(-) diff --git a/Plan9/README b/Plan9/README index 08092ccb..b07d879f 100644 --- a/Plan9/README +++ b/Plan9/README @@ -20,7 +20,6 @@ To select features and extensions, `--with-dl=both` may be replaced by zero or m * `--enable-superscript`: `A^B` becomes AB * `--enable-amalloc`: Enable memory allocation debugging * `--with-tabstops=`*N*: Set tabstops to *N* characters (default 4) -* `--enable-div`: Enable >%id% divisions * `--enable-alpha-list`: Enable `(a)/(b)/(c)` list markers * `--enable-all-features`: Turn on all stable optional features From 28e84f1336bbd3248abfc0198e3538275d1b786b Mon Sep 17 00:00:00 2001 From: Josh Wood Date: Tue, 12 May 2015 10:23:45 -0500 Subject: [PATCH 07/10] Rename README to README.md --- Plan9/{README => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Plan9/{README => README.md} (100%) diff --git a/Plan9/README b/Plan9/README.md similarity index 100% rename from Plan9/README rename to Plan9/README.md From a89240ec01c6b00d5cac18caa9bf9d600ccad0c1 Mon Sep 17 00:00:00 2001 From: Josh Wood Date: Tue, 12 May 2015 10:32:12 -0500 Subject: [PATCH 08/10] Update README.md Remove the pandoc header. --- Plan9/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Plan9/README.md b/Plan9/README.md index b07d879f..b867e6ab 100644 --- a/Plan9/README.md +++ b/Plan9/README.md @@ -1,7 +1,3 @@ -% Discount on Plan 9 -% Josh Wood -% 2015-05-11 - # *Discount* Markdown compiler on Plan 9 ## Build From f1231f0e4d0b1d361ceb3a89d893e7bab76bac54 Mon Sep 17 00:00:00 2001 From: Josh Wood Date: Tue, 12 May 2015 19:36:15 -0500 Subject: [PATCH 09/10] Doc: update README.md Clarify englishing. --- Plan9/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan9/README.md b/Plan9/README.md index b867e6ab..701a0032 100644 --- a/Plan9/README.md +++ b/Plan9/README.md @@ -29,7 +29,7 @@ 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(1) and (6). + * `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. From 2ac3986522e4e954f06c09f744c58434b433eda7 Mon Sep 17 00:00:00 2001 From: Josh Wood Date: Wed, 13 May 2015 06:46:11 -0500 Subject: [PATCH 10/10] Doc: tweakme Correct capitalization typo. --- Plan9/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan9/README.md b/Plan9/README.md index 701a0032..342a93e1 100644 --- a/Plan9/README.md +++ b/Plan9/README.md @@ -29,7 +29,7 @@ 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.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.