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.
This commit is contained in:
Mike Swanson 2018-09-16 03:08:14 -07:00
parent aa72812ca7
commit 5d629db9be

View file

@ -16,7 +16,6 @@ DLL_FILES=$(TOPLEVEL)/src/SDL.dll \
all: $(ZIPS) all: $(ZIPS)
$(ZIPS): $(ZIPS):
unix2dos --add-bom $</*.txt
zip -j -r $@ $</* zip -j -r $@ $</*
$(DOOM_ZIP): staging-doom hook-doom $(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. # Special hooks to custom modify files for particular games.
hook-doom: staging-doom 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: # Chocolate Strife has its own custom README file:
hook-strife: staging-strife 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. # Build up a staging dir for a particular game.
@ -49,11 +48,12 @@ staging-%:
$(STRIP) $@/*.exe $@/*.dll $(STRIP) $@/*.exe $@/*.dll
for f in $(DOC_FILES); do \ -for f in $(DOC_FILES); do \
cp $(TOPLEVEL)/$$f $@/$$(basename $$f .md).txt; \ pandoc -f gfm -o $@/$$(basename $$f .md).html \
-s $(TOPLEVEL)/$$f; \
done done
cp $(TOPLEVEL)/man/CMDLINE.$* $@/CMDLINE.txt -pandoc -f gfm -s -o $@/CMDLINE.html $(TOPLEVEL)/man/CMDLINE.$*.md
cp $(TOPLEVEL)/man/INSTALL.$* $@/INSTALL.txt -pandoc -f gfm -s -o $@/INSTALL.html $(TOPLEVEL)/man/INSTALL.$*
clean: clean:
rm -f $(ZIPS) rm -f $(ZIPS)