Skip to content

Commit

Permalink
fix title pages
Browse files Browse the repository at this point in the history
  • Loading branch information
totalspectrum committed Sep 21, 2019
1 parent 22628a9 commit 2fcb4c0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
8 changes: 3 additions & 5 deletions Makefile
Expand Up @@ -30,7 +30,7 @@ default: flexgui.zip
VPATH=.:spin2cpp/doc

ifdef PANDOC_EXISTS
PDFFILES=pandoc.yml spin2cpp/Fastspin.pdf spin2cpp/doc/basic.pdf spin2cpp/doc/c.pdf spin2cpp/doc/spin.pdf
PDFFILES=spin2cpp/Fastspin.pdf spin2cpp/doc/basic.pdf spin2cpp/doc/c.pdf spin2cpp/doc/spin.pdf
endif

BINFILES=bin/fastspin.exe bin/proploader.exe bin/loadp2.exe
Expand All @@ -44,7 +44,7 @@ BINFILES=bin/fastspin.exe bin/proploader.exe bin/loadp2.exe

SIGN ?= ./spin2cpp/sign.dummy.sh

flexgui.zip: src/version.tcl flexgui.exe $(BINFILES) $(PDFFILES) flexgui_dir
flexgui.zip: src/version.tcl src/makepandoc.tcl flexgui.exe $(BINFILES) $(PDFFILES) flexgui_dir
rm -f flexgui.zip
zip -r flexgui.zip flexgui

Expand Down Expand Up @@ -106,13 +106,11 @@ loadp2/build-win32/loadp2.exe:
make -C loadp2 CROSS=win32

%.pdf: %.md
tclsh src/makepandoc.tcl $< > pandoc.yml
$(PANDOC) --metadata-file=pandoc.yml -s --toc -f gfm -t latex -o $@ $<

$(RESOBJ): $(RES_RC)
$(WINRC) -o $@ --define STATIC_BUILD --include "$(TCLROOT)/tk/generic" --include "$(TCLROOT)/tcl/generic" --include "$(RESDIR)" "$<"

src/version.tcl: version.inp spin2cpp/version.h
cpp -DTCL_SRC < version.inp > $@

pandoc.yml: src/version.tcl src/makepandoc.tcl
tclsh src/makepandoc.tcl > $@
21 changes: 20 additions & 1 deletion src/makepandoc.tcl
Expand Up @@ -2,13 +2,32 @@ source src/version.tcl

proc makepandoc {} {
global spin2gui_version
global title
set now [clock seconds]
set date [clock format $now -format %D]
puts "documentclass: book"
puts "title: FlexGUI Reference"
puts "title: $title"
puts "subtitle: $spin2gui_version"
puts "author: Total Spectrum Software"
puts "date: $date"
}

set filebase [lindex $argv 0]
#puts "original filebase = $filebase"
set filebase [file tail $filebase]
#puts "tail filebase = $filebase"

if { $filebase eq "" } {
puts "Usage: makepandoc.tcl filename.md"
exit 2
}
if { $filebase eq "basic.md" } {
set title "FlexBASIC Language Reference"
} elseif { $filebase eq "c.md" } {
set title "FlexC Language Reference"
} elseif { $filebase eq "spin.md" } {
set title "FlexSpin Language Reference"
} else {
set title "FastSpin Reference"
}
makepandoc

0 comments on commit 2fcb4c0

Please sign in to comment.