foxygit / doom Log in
commit 5d629db9beda83bc49730d22d584a4947bd1e5d6
Author:     Mike Swanson <mikeonthecomputer@gmail.com>
AuthorDate: Sun Sep 16 03:08:14 2018 -0700
Commit:     Mike Swanson <mikeonthecomputer@gmail.com>
CommitDate: Sun Sep 16 05:28:28 2018 -0700

    pkg/win32: Use pandoc to create HTML versions of the docs

    While plain-text versions generally worked, they have been slightly
    littered recently with Markdown syntax.  We should be able to assume
    every Windows user has a web browser and can view these documents
    in nicely-formatted HTML pages instead of opening Notepad.
---
 pkg/win32/GNUmakefile | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/pkg/win32/GNUmakefile b/pkg/win32/GNUmakefile
index 9a26d11a..594481ca 100644
--- a/pkg/win32/GNUmakefile
+++ b/pkg/win32/GNUmakefile
@@ -16,7 +16,6 @@ DLL_FILES=$(TOPLEVEL)/src/SDL.dll                      \
 all: $(ZIPS)

 $(ZIPS):
-	unix2dos --add-bom $</*.txt
 	zip -j -r $@ $</*

 $(DOOM_ZIP): staging-doom hook-doom
@@ -27,12 +26,12 @@ $(STRIFE_ZIP): staging-strife hook-strife
 # Special hooks to custom modify files for particular games.

 hook-doom: staging-doom
-	cp $(TOPLEVEL)/NOT-BUGS.md $</NOT-BUGS.txt
+	-pandoc -f gfm -s -o $</NOT-BUGS.html $(TOPLEVEL)/NOT-BUGS.md

 # Chocolate Strife has its own custom README file:

 hook-strife: staging-strife
-	cp $(TOPLEVEL)/README.Strife.md $</README.txt
+	-pandoc -f gfm -s -o $</README.html $(TOPLEVEL)/README.Strife.md

 # Build up a staging dir for a particular game.

@@ -49,11 +48,12 @@ staging-%:

 	$(STRIP) $@/*.exe $@/*.dll

-	for f in $(DOC_FILES); do                                \
-		cp $(TOPLEVEL)/$$f $@/$$(basename $$f .md).txt;  \
+	-for f in $(DOC_FILES); do                              \
+		pandoc  -f gfm -o $@/$$(basename $$f .md).html  \
+			-s $(TOPLEVEL)/$$f;                     \
 	done
-	cp $(TOPLEVEL)/man/CMDLINE.$* $@/CMDLINE.txt
-	cp $(TOPLEVEL)/man/INSTALL.$* $@/INSTALL.txt
+	-pandoc -f gfm -s -o $@/CMDLINE.html $(TOPLEVEL)/man/CMDLINE.$*.md
+	-pandoc -f gfm -s -o $@/INSTALL.html $(TOPLEVEL)/man/INSTALL.$*

 clean:
 	rm -f $(ZIPS)