build/Makefile.asciidoc: print less clutter
* Move the comments above the build targets, so they don't get printed during the build * Remove the "TO REMOVE DRAFT MODE…" note. Printing this is no longer useful, the manuals for releases are now generated automatically with the Osmocom-release-manuals jenkins job, which removes the draft mode. There is no need to do this step manually. Depends: osmo-ci Ia27cb8e4dd0204c0a91c322bed65bf8c9847a7be Change-Id: I23d11bab274793eb8bcedc3fd9290901823e32d2
This commit is contained in:
parent
3aba72f9e4
commit
cc71aeb2e7
|
@ -59,6 +59,12 @@ A2X_OPTS := -L --asciidoc-opts="$(ASCIIDOC_OPTS)" --dblatex-opts="$(DBLATEX_OPTS
|
||||||
|
|
||||||
all: $(ASCIIDOC_PDF)
|
all: $(ASCIIDOC_PDF)
|
||||||
|
|
||||||
|
# ln: a2x can't use a different output file. To support out-of-tree builds,
|
||||||
|
# we create a symlink at $(builddir)/srcfile.adoc pointing at
|
||||||
|
# $(srcdir)/srcfile.adoc. $< is the $(srcdir)/srcfile.adoc,
|
||||||
|
# $(notdir) is like basename from coreutils, and $(builddir) is $PWD.
|
||||||
|
# TEXINPUTS: find LaTeX includes like \includegraphics{./common/images/sysmocom.pdf}
|
||||||
|
# in $(OSMO_GSM_MANUALS_DIR).
|
||||||
$(ASCIIDOC_PDF): %.pdf: %.adoc %-docinfo.xml \
|
$(ASCIIDOC_PDF): %.pdf: %.adoc %-docinfo.xml \
|
||||||
$(ASCIIDOC_DEPS) \
|
$(ASCIIDOC_DEPS) \
|
||||||
$(ASCIIDOCSTYLE) \
|
$(ASCIIDOCSTYLE) \
|
||||||
|
@ -66,20 +72,10 @@ $(ASCIIDOC_PDF): %.pdf: %.adoc %-docinfo.xml \
|
||||||
$(COMMONDIR)/images/* \
|
$(COMMONDIR)/images/* \
|
||||||
build common
|
build common
|
||||||
|
|
||||||
# a2x can't use a different output file. To support out-of-tree builds,
|
|
||||||
# we create a symlink at $(builddir)/srcfile.adoc pointing at
|
|
||||||
# $(srcdir)/srcfile.adoc. $< is the $(srcdir)/srcfile.adoc,
|
|
||||||
# $(notdir) is like basename from coreutils, and $(builddir) is $PWD.
|
|
||||||
if ! [ -f $(notdir $<) ]; then \
|
if ! [ -f $(notdir $<) ]; then \
|
||||||
ln -s $< $(notdir $<); \
|
ln -s $< $(notdir $<); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TEXINPUTS: find LaTeX includes like \includegraphics{./common/images/sysmocom.pdf}
|
|
||||||
# in $(OSMO_GSM_MANUALS_DIR).
|
|
||||||
@test -n "$(BUILD_RELEASE)" && echo -e "\n\n\
|
|
||||||
NOTE: TO REMOVE DRAFT MODE, YOU NEED TO EDIT build/custom-dblatex.sty\n\
|
|
||||||
and remove three lines starting with '% \"DRAFT\" on first page'\n" \
|
|
||||||
|| true
|
|
||||||
TEXINPUTS="$(OSMO_GSM_MANUALS_DIR)" \
|
TEXINPUTS="$(OSMO_GSM_MANUALS_DIR)" \
|
||||||
a2x -vv $(A2X_OPTS) $(notdir $<)
|
a2x -vv $(A2X_OPTS) $(notdir $<)
|
||||||
|
|
||||||
|
@ -88,23 +84,22 @@ check:
|
||||||
$(MAKE) $(ASCIIDOC_CHECKS); \
|
$(MAKE) $(ASCIIDOC_CHECKS); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ln: out-of-tree building: use a symlink to the output file like done in
|
||||||
|
# the non-check build above, so the relative include paths work the same.
|
||||||
|
# touch: Make absolutely sure that the %.check target is updated.
|
||||||
|
# grep: Do print the WARNING output but return error if any was found
|
||||||
|
# (grep -v would omit the WARNING output from the log).
|
||||||
$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml \
|
$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml \
|
||||||
$(ASCIIDOCSTYLE) \
|
$(ASCIIDOCSTYLE) \
|
||||||
$(COMMONDIR)/chapters/*.adoc \
|
$(COMMONDIR)/chapters/*.adoc \
|
||||||
$(ASCIIDOC_DEPS) \
|
$(ASCIIDOC_DEPS) \
|
||||||
build common
|
build common
|
||||||
|
|
||||||
# out-of-tree building: use a symlink to the output file like done in
|
|
||||||
# the non-check build above, so the relative include paths work the
|
|
||||||
# same.
|
|
||||||
if ! [ -f $(notdir $<) ]; then \
|
if ! [ -f $(notdir $<) ]; then \
|
||||||
ln -s $< $(notdir $<); \
|
ln -s $< $(notdir $<); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
asciidoc -v $(ASCIIDOC_OPTS) $(notdir $<) > $(notdir $@) 2>&1
|
asciidoc -v $(ASCIIDOC_OPTS) $(notdir $<) > $(notdir $@) 2>&1
|
||||||
|
|
||||||
# Make absolutely sure that the %.check target is updated.
|
|
||||||
touch $(notdir $@)
|
touch $(notdir $@)
|
||||||
# Do print the WARNING output but return error if any was found
|
|
||||||
# (grep -v would omit the WARNING output from the log).
|
|
||||||
@grep WARNING $(notdir $@) && exit 1 || exit 0
|
@grep WARNING $(notdir $@) && exit 1 || exit 0
|
||||||
|
|
Loading…
Reference in New Issue