Skip to content

Commit

Permalink
use doc/raddb/ instead of asciidoci/ for output
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 6, 2019
1 parent 3856a53 commit 422377c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Expand Up @@ -71,7 +71,3 @@ appendonly*.aof

# Local scripts
run.sh

# Doc directory
asciidoc

20 changes: 10 additions & 10 deletions Makefile
Expand Up @@ -340,10 +340,10 @@ whitespace:
@perl -p -i -e 'trim' $$(git ls-files src/)

CONF_FILES := $(filter-out %~,$(wildcard raddb/*conf raddb/mods-available/* raddb/sites-available/* raddb/dictionary))
ADOC_FILES := $(patsubst raddb/%,asciidoc/%.adoc,$(CONF_FILES))
ADOC_FILES += $(patsubst raddb/%.md,asciidoc/%.adoc,$(shell find raddb -name "*\.md" -print))
PDF_FILES := $(patsubst asciidoc/%.adoc,asciidoc/%.pdf,$(ADOC_FILES))
HTML_FILES := $(patsubst asciidoc/%.adoc,asciidoc/%.html,$(ADOC_FILES))
ADOC_FILES := $(patsubst raddb/%,doc/raddb/%.adoc,$(CONF_FILES))
ADOC_FILES += $(patsubst raddb/%.md,doc/raddb/%.adoc,$(shell find raddb -name "*\.md" -print))
PDF_FILES := $(patsubst doc/raddb/%.adoc,doc/raddb/%.pdf,$(ADOC_FILES))
HTML_FILES := $(patsubst doc/raddb/%.adoc,doc/raddb/%.html,$(ADOC_FILES))

#
# Pandoc v2 onwards renamed --latex-engine to --pdf-engine
Expand All @@ -362,32 +362,32 @@ endif
# format to read/write than asciidoc. But we want a consistent "look
# and feel" for the documents, so we make all of them asciidoc.
#
asciidoc/%.adoc: raddb/%.md
doc/raddb/%.adoc: raddb/%.md
@echo PANDOC $^
@mkdir -p $(dir $@)
@pandoc --filter=scripts/asciidoc/pandoc-filter -w asciidoc -o $@ $^

#
# Conf files get converted to Asciidoc via our own magic script.
#
asciidoc/%.adoc: raddb/%
doc/raddb/%.adoc: raddb/%
@echo ADOC $^
@mkdir -p $(dir $@)
@./scripts/asciidoc/conf2adoc -a ${top_srcdir}/asciidoc -o $@ < $^

asciidoc/%.html: asciidoc/%.adoc
doc/%.html: doc/%.adoc
@echo HTML $^
@asciidoctor $< -b html5 -o $@ $<

asciidoc/%.pdf: asciidoc/%.adoc
doc/%.pdf: doc/%.adoc
@echo PDF $^
@asciidoctor $< -b docbook5 -o - | \
pandoc -f docbook -t latex --${PANDOC_ENGINE}-engine=xelatex \
-V papersize=letter \
-V images=yes \
--template=./scripts/asciidoc/freeradius.template -o $@

asciidoc/%.pdf: raddb/%.md
doc/%.pdf: doc/%.md
@echo PDF $^
pandoc -f markdown -t latex --${PANDOC_ENGINE}-engine=xelatex \
-V papersize=letter \
Expand All @@ -403,4 +403,4 @@ pdf: $(PDF_FILES)
#
clean: clean.asciidoc
clean.asciidoc:
@rm -rf asciidoc
@rm -f $(ADOC_FILES) $(HTML_FILES) $(PDF_FILES)
1 change: 1 addition & 0 deletions doc/.gitignore
@@ -1 +1,2 @@
_build
*.html

0 comments on commit 422377c

Please sign in to comment.