mirror of
https://github.com/dunyakirkali/letterpress.git
synced 2025-01-22 19:38:30 +00:00
1890774875
* Enable vale in CI * Add vale config * Tweak vale * Update config * Update .gitignore * Switch back * Rename CI * Add badges * Tidy up CI * Change image * Configure vale * Delint * Update README
41 lines
771 B
Makefile
41 lines
771 B
Makefile
SOURCE_FOLDER := source
|
|
|
|
ASCIIDOC_FILES := $(wildcard $(SOURCE_FOLDER)/*.adoc)
|
|
|
|
FIGURES = $(shell find . -name '*.svg')
|
|
|
|
PDF_NAME := book.pdf
|
|
PDF_PATH := output/$(PDF_NAME)
|
|
|
|
EPUB_NAME := book.epub
|
|
EPUB_PATH := output/$(EPUB_NAME)
|
|
|
|
ASCIIDOC_FLAGS = \
|
|
--doctype book
|
|
|
|
all: $(PDF_PATH) $(EPUB_PATH)
|
|
|
|
$(PDF_PATH): $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml | output
|
|
asciidoctor-pdf book.adoc $(ASCIIDOC_FLAGS) \
|
|
-o $@ \
|
|
-r asciidoctor-diagram \
|
|
-r asciidoctor-mathematical
|
|
|
|
$(EPUB_PATH): $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml | output
|
|
asciidoctor-epub3 book.adoc $(ASCIIDOC_FLAGS) \
|
|
-o $@ \
|
|
-r asciidoctor-diagram \
|
|
-r asciidoctor-mathematical
|
|
|
|
count:
|
|
wc -w source/*
|
|
|
|
output:
|
|
mkdir output
|
|
|
|
clean:
|
|
rm -vrf output
|
|
|
|
lint:
|
|
vale source/
|