shithub: choc

Download patch

ref: 5d629db9beda83bc49730d22d584a4947bd1e5d6
parent: aa72812ca78c3318e726ade30accaf85ef865668
author: Mike Swanson <mikeonthecomputer@gmail.com>
date: Sat Sep 15 23:08:14 EDT 2018

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.

--- a/pkg/win32/GNUmakefile
+++ b/pkg/win32/GNUmakefile
@@ -16,7 +16,6 @@
 all: $(ZIPS)
 
 $(ZIPS):
-	unix2dos --add-bom $</*.txt
 	zip -j -r $@ $</*
 
 $(DOOM_ZIP): staging-doom hook-doom
@@ -27,12 +26,12 @@
 # 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 @@
 
 	$(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)