Skip to content

Commit

Permalink
Build an EPUB manual; deprecate Info and Texinfo formats.
Browse files Browse the repository at this point in the history
FossilOrigin-Name: f3b76e4ebd42493c37290cabdf82121ca7d36610dced1f8718c053793b757695
  • Loading branch information
programandala-net committed Nov 28, 2020
1 parent b1888a7 commit a4b7334
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 25 deletions.
57 changes: 33 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# This file is part of Fendo
# http://programandala.net/en.program.fendo.html

# Last modified 202011282104
# Last modified 202011282127

# ==============================================================
# Author
# Author {{{1

# Marcos Cruz (programandala.net), 2017, 2018, 2020.

Expand All @@ -18,7 +18,7 @@
# license. There is no warranty.

# ==============================================================
# Requirements
# Requirements {{{1

# Asciidoctor (by Dan Allen and Sara White)
# http://asciidoctor.org
Expand All @@ -38,12 +38,12 @@
# http://john-macfarlane.net/pandoc

# ==============================================================
# History
# History {{{1

# See at the end of the file.

# ==============================================================
# Notes about make
# Notes about make {{{1

# $@ = the name of the target of the rule
# $< = the name of the first prerequisite
Expand All @@ -53,7 +53,7 @@
# `%` works only at the start of the filter pattern

# ==============================================================
# Config
# Config {{{1

VPATH = ./

Expand All @@ -62,11 +62,26 @@ MAKEFLAGS = --no-print-directory
#.ONESHELL:

# ==============================================================
# Main
# Interface {{{1

.PHONY: all
all: doc

.PHONY: doc
doc: epub html pdf

.PHONY: epub
epub: \
doc/fendo_manual.epub \

.PHONY: html
html: \
doc/fendo_manual.html \

.PHONY: pdf
pdf: \
doc/fendo_manual.pdf

.PHONY: clean
clean: cleandoc

Expand All @@ -75,25 +90,20 @@ cleandoc:
-rm -f doc/* tmp/*

# ==============================================================
# Documentation

.PHONY: doc
doc: \
doc/fendo_manual.html \
doc/fendo_manual.dbk \
doc/fendo_manual.info \
doc/fendo_manual.texi \
doc/fendo_manual.pdf
# Documentation {{{1

# ----------------------------------------------
# Common rules
# Common rules {{{2

doc/%.pdf: tmp/%.adoc
asciidoctor-pdf --out-file $@ $<

%.html: %.adoc
doc/%.html: tmp/%.adoc
asciidoctor --out-file=$@ $<

doc/%.epub: tmp/%.adoc
asciidoctor-epub3 --out-file=$@ $<

doc/%.dbk: tmp/%.adoc
asciidoctor --backend=docbook --out-file=$@ $<

Expand All @@ -103,11 +113,8 @@ doc/%.dbk: tmp/%.adoc
%.texi: %.dbk
pandoc -f docbook -o $@ $<

%.info: %.texi
makeinfo -o $@ $<

# ----------------------------------------------
# Main
# Main {{{2

fendo_files=$(wildcard *.fs)
lib_files=$(wildcard doc_src/galope/*.fs)
Expand All @@ -131,7 +138,7 @@ tmp/fendo_manual.adoc: tmp/manual_skeleton.adoc tmp/glossary.adoc
cat $^ > $@

# ==============================================================
# Change log
# Change log {{{1

# 2018-12-07: Start. Adapted from Galope
# (http://programandala.net/en.program.galope.html).
Expand All @@ -140,4 +147,6 @@ tmp/fendo_manual.adoc: tmp/manual_skeleton.adoc tmp/glossary.adoc
#
# 2020-11-28: Fix parameters to convert DocBook to Texinfo. Replace ".docbook"
# extension with ".dbk". Include the documentation of Galope library modules
# (at the moment only the `begin-translation` module) into the glossary.
# (at the moment only the `begin-translation` module) into the glossary. Build
# also an EPUB manual. Don't build Info and Texinfo by default, the conversions
# have problems.
2 changes: 1 addition & 1 deletion VERSION.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
\ This file is part of Fendo
\ (http://programandala.net/en.program.fendo.html).

: fendo_version ( -- ca len ) s" 0.6.0-pre.74+20201128" ;
: fendo_version ( -- ca len ) s" 0.6.0-pre.75+20201128" ;

\ vim: filetype=gforth

0 comments on commit a4b7334

Please sign in to comment.