Fixed Makefile, added epubtest.
This commit is contained in:
parent
3c0394b8a0
commit
45f40d0d8d
2 changed files with 9 additions and 5 deletions
|
@ -9,11 +9,9 @@ cache:
|
||||||
timeout: 1500
|
timeout: 1500
|
||||||
directories:
|
directories:
|
||||||
- out/
|
- out/
|
||||||
- lua_modules/
|
|
||||||
- $HOME/.stack
|
- $HOME/.stack
|
||||||
- $HOME/.agda
|
- $HOME/.agda
|
||||||
- $HOME/.local
|
- $HOME/.local
|
||||||
- $HOME/.luarocks
|
|
||||||
- $HOME/agda-$AGDA_VERSION
|
- $HOME/agda-$AGDA_VERSION
|
||||||
- $HOME/agda-stdlib-$AGDA_STDLIB_VERSION
|
- $HOME/agda-stdlib-$AGDA_STDLIB_VERSION
|
||||||
- $HOME/acknowledgements-master
|
- $HOME/acknowledgements-master
|
||||||
|
@ -45,11 +43,10 @@ script:
|
||||||
- agda --version
|
- agda --version
|
||||||
- acknowledgements --version
|
- acknowledgements --version
|
||||||
- pandoc --version
|
- pandoc --version
|
||||||
- lua -v
|
|
||||||
- luarocks --version
|
|
||||||
- make build
|
- make build
|
||||||
- make test-offline # disable to only build cache
|
- make test-offline # disable to only build cache
|
||||||
- make epub
|
- make epub
|
||||||
|
- make epubcheck
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- acknowledgements -i _config.yml >> _config.yml
|
- acknowledgements -i _config.yml >> _config.yml
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -3,6 +3,8 @@ AGDA_FILES := $(shell find . -type f -and \( -path '*/src/*' -or -path '*/course
|
||||||
AGDAI_FILES := $(shell find . -type f -and \( -path '*/src/*' -or -path '*/courses/*' \) -and -name '*.agdai')
|
AGDAI_FILES := $(shell find . -type f -and \( -path '*/src/*' -or -path '*/courses/*' \) -and -name '*.agdai')
|
||||||
MARKDOWN_FILES := $(subst courses/,out/,$(subst src/,out/,$(subst .lagda.md,.md,$(AGDA_FILES))))
|
MARKDOWN_FILES := $(subst courses/,out/,$(subst src/,out/,$(subst .lagda.md,.md,$(AGDA_FILES))))
|
||||||
PLFA_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
PLFA_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||||
|
PANDOC := pandoc
|
||||||
|
EPUBCHECK := epubcheck
|
||||||
RUBY := ruby
|
RUBY := ruby
|
||||||
GEM := $(RUBY) -S gem
|
GEM := $(RUBY) -S gem
|
||||||
BUNDLE := $(RUBY) -S bundle
|
BUNDLE := $(RUBY) -S bundle
|
||||||
|
@ -53,11 +55,14 @@ out/:
|
||||||
|
|
||||||
epub: out/epub/plfa.epub
|
epub: out/epub/plfa.epub
|
||||||
|
|
||||||
|
epubcheck: out/epub/plfa.epub
|
||||||
|
$(EPUBCHECK) out/epub/plfa.epub
|
||||||
|
|
||||||
out/epub/:
|
out/epub/:
|
||||||
mkdir -p out/epub/
|
mkdir -p out/epub/
|
||||||
|
|
||||||
out/epub/plfa.epub: out/epub/ | $(AGDA_FILES) $(LUA_FILES) epub/main.css out/epub/acknowledgements.md
|
out/epub/plfa.epub: out/epub/ | $(AGDA_FILES) $(LUA_FILES) epub/main.css out/epub/acknowledgements.md
|
||||||
pandoc --strip-comments \
|
$(PANDOC) --strip-comments \
|
||||||
--css=epub/main.css \
|
--css=epub/main.css \
|
||||||
--epub-embed-font='assets/fonts/mononoki.woff' \
|
--epub-embed-font='assets/fonts/mononoki.woff' \
|
||||||
--epub-embed-font='assets/fonts/FreeMono.woff' \
|
--epub-embed-font='assets/fonts/FreeMono.woff' \
|
||||||
|
@ -76,6 +81,8 @@ out/epub/plfa.epub: out/epub/ | $(AGDA_FILES) $(LUA_FILES) epub/main.css out/epu
|
||||||
out/epub/acknowledgements.md: src/plfa/acknowledgements.md _config.yml
|
out/epub/acknowledgements.md: src/plfa/acknowledgements.md _config.yml
|
||||||
$(RUBY) epub/render-liquid-template.rb _config.yml $< $@
|
$(RUBY) epub/render-liquid-template.rb _config.yml $< $@
|
||||||
|
|
||||||
|
.phony: epub epubcheck
|
||||||
|
|
||||||
|
|
||||||
# Convert literal Agda to Markdown
|
# Convert literal Agda to Markdown
|
||||||
define AGDA_template
|
define AGDA_template
|
||||||
|
|
Loading…
Add table
Reference in a new issue