@@ -16,15 +16,15 @@ ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty
cleanfiles += $(ASCIIDOCPDFS)
ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf
-DBLATEX_OPTS := -s $(ASCIIDOCSTYLE) -P draft.mode=yes
+DBLATEX_OPTS := -s $(ASCIIDOCSTYLE) -P draft.mode=yes -P draft.watermark=0
ifeq (,$(BUILD_RELEASE))
- DBLATEX_OPTS += -P draft.watermark=1
+ REVNUMBER := DRAFT $(GIT_VERSION)
else
- DBLATEX_OPTS += -P draft.watermark=0
+ REVNUMBER := $(GIT_VERSION)
endif
-A2X_OPTS := -L --asciidoc-opts="$(ASCIIDOC_OPTS)" --dblatex-opts="$(DBLATEX_OPTS)" -a docinfo -a revnumber="$(GIT_VERSION)" -a revdate="$(GIT_DATE)"
+A2X_OPTS := -L --asciidoc-opts="$(ASCIIDOC_OPTS)" --dblatex-opts="$(DBLATEX_OPTS)" -a docinfo -a revnumber="$(REVNUMBER)" -a revdate="$(GIT_DATE)"
all: $(ASCIIDOCPDFS)
-------------------------
I also found a bit of code to put a "DRAFT" on only the first page, but I find
it impossibly hard to figure out how to switch this snippet on and off
depending on the 'make BUILD_RELEASE=?' option. So if we don't need it to be
toggle-able, we can use it as-is. Otherwise, if someone has some dblatex magic
or a nifty trick to make these two lines conditional, that would give us the
conditional 'DRAFT' watermark on only the first page:
-------------------------
@@ -19,6 +19,10 @@
\usepackage{alltt}
\usepackage{upquote}
+% "DRAFT" on first page
+\definecolor{LtGrey}{rgb}{0.8,0.8,0.8}
+\AddToShipoutPicture*{ \AtTextCenter{ \makebox(0,0)[c]{\resizebox{\textwidth}{!}{ \rotatebox{45}{\textsf{\textbf{\color{LtGrey}DRAFT}}}}} } }
+
\def\Company{sysmocom - s.f.m.c. GmbH}
\def\DBKcover{