mirror of
https://github.com/dunyakirkali/letterpress.git
synced 2025-07-03 23:15:23 +00:00
39 lines
823 B
Makefile
39 lines
823 B
Makefile
SOURCE_FOLDER := source
|
|
|
|
ASCIIDOC_FILES := $(wildcard $(SOURCE_FOLDER)/*.adoc)
|
|
|
|
FIGURES = $(shell find . -name '*.svg')
|
|
|
|
PDF_NAME := book.pdf
|
|
|
|
EPUB_NAME := book.epub
|
|
|
|
ASCIIDOC_FLAGS = \
|
|
--doctype book
|
|
|
|
all: $(PDF_NAME) $(EPUB_NAME)
|
|
|
|
$(PDF_NAME): book.adoc $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml
|
|
asciidoctor-pdf book.adoc $(ASCIIDOC_FLAGS) \
|
|
-o $@ \
|
|
-r asciidoctor-diagram \
|
|
-r asciidoctor-mathematical \
|
|
-r asciidoctor-kroki \
|
|
-a allow-uri-read \
|
|
--safe-mode server
|
|
|
|
$(EPUB_NAME): book.adoc $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml
|
|
asciidoctor-epub3 book.adoc $(ASCIIDOC_FLAGS) \
|
|
-o $@ \
|
|
-r asciidoctor-diagram \
|
|
-r asciidoctor-mathematical \
|
|
-r asciidoctor-kroki \
|
|
-a allow-uri-read \
|
|
--safe-mode server
|
|
|
|
count:
|
|
wc -w source/*
|
|
|
|
clean:
|
|
rm -vrf $(PDF_NAME) $(EPUB_NAME)
|