Set doc version and date from package version and release date
[fw/altos] / doc / Makefile.am
index 2e9e652666d2249dd16329f13408ef99e7ce0bec..464cd988bef3ca242e3f0034cbb68c96721a0cb2 100644 (file)
@@ -279,6 +279,8 @@ DOC=$(HTML) $(PDF) $(IMAGES) $(MAP_SVG_FILES) $(STYLESHEET)
 
 SUFFIXES = .dot .svg .inc .txt .adoc .pdf .html
 
+ATTRIBUTES=--attribute="revdate=$(DOC_DATE)" --attribute="version=$(VERSION)"
+
 .dot.svg:
        dot -Tsvg -o$@ $*.dot
 
@@ -289,10 +291,10 @@ SUFFIXES = .dot .svg .inc .txt .adoc .pdf .html
        sed -e 's/^[    ]*//' -e 's/^\\//' $*.inc > $@
 
 .adoc.html:
-       asciidoctor -b html5 $*.adoc
+       asciidoctor $(ATTRIBUTES) -b html5 $*.adoc
 
 .adoc.pdf:
-       asciidoctor-pdf $*.adoc
+       asciidoctor-pdf $(ATTRIBUTES) $*.adoc
 
 all:   $(HTML) $(PDF)