diff --git a/Makefile.common b/Makefile.common index d73ad04faf..c984098f58 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1,74 +1,74 @@ # Not all current distros support AM_V_P # https://www.gnu.org/software/automake/manual/html_node/Automake-silent_002drules-Option.html V ?= $(AM_DEFAULT_VERBOSITY) PCMK_V = $(pcmk__v_$(V)) pcmk__v_0 = : pcmk__v_1 = PCMK_quiet = $(pcmk_quiet_$(V)) pcmk_quiet_0 = >/dev/null 2>&1 pcmk_quiet_1 = AM_V_XSL = $(am__v_XSL_$(V)) am__v_XSL_0 = @echo " XSL " $@; am__v_XSL_1 = AM_V_MAN = $(am__v_MAN_$(V)) am__v_MAN_0 = @echo " MAN " $@; am__v_MAN_1 = AM_V_ASCII = $(am__v_ASCII_$(V)) am__v_ASCII_0 = @echo " ASCII " $@; am__v_ASCII_1 = AM_V_PUB = $(am__v_PUB_$(V)) am__v_PUB_0 = @echo " PUB $@: $(DOCBOOK_FORMATS)"; am__v_PUB_1 = MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl if BUILD_HELP man8_MANS = $(sbin_PROGRAMS:%=%.8) $(sbin_SCRIPTS:%=%.8) endif %.8: % $(MAN8DEPS) chmod a+x $(abs_builddir)/$< $(PCMK_V) PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --help $(PCMK_V) PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --version $(AM_V_MAN)PATH=$(abs_builddir):$$PATH $(HELP2MAN) --output $@ --no-info --section 8 --name "Part of the Pacemaker cluster resource manager" $(abs_builddir)/$< %.xml: % $(AM_V_GEN)$(abs_builddir)/$< metadata > $@ %.dbook: %.xml $(AM_V_XSL)$(XSLTPROC) --nonet --novalid --stringparam man.name $* $(DBOOK_OPTS) $(top_srcdir)/xml/ocf-meta2man.xsl $(abs_builddir)/$< > $(abs_builddir)/$@ %.7: %.dbook $(AM_V_XSL)$(XSLTPROC) $(MANPAGE_XSLT) $(abs_builddir)/$< $(PCMK_quiet) # Build docbook from asciidoc because XML is a PITA to edit # # Build each chapter as a book (since the numbering isn't right for -# articles and only books can have appendicies) and then strip out the +# articles and only books can have appendices) and then strip out the # bits we don't want/need # %.xml: %.txt - $(AM_V_ASCII)asciidoc -b docbook -a cli_name=$(ASCIIDOC_CLI_TYPE) -a $(ASCIIDOC_CLI_TYPE)=true -d book -o $@ $< + $(AM_V_ASCII)$(ASCIIDOC) -b docbook -d book -o $@ $< $(AM_V_at)sed -i 's///' $@ $(AM_V_at)sed -i 's/ //' $@ # Fix line endings $(AM_V_at)sed -i 's/\ lang="en"//' $@ # Never specify a language in the chapters $(AM_V_at)sed -i 's/simpara/para/g' $@ # publican doesn't correctly render footnotes with simpara $(AM_V_at)sed -i 's/.*.*//g' $@ # Remove dangling tag $(AM_V_at)sed -i 's/.*preface>//g' $@ # Remove preface elements $(AM_V_at)sed -i 's:::g' $@ # Remove empty title $(AM_V_at)sed -i 's/chapter/section/g' $@ # Chapters become sections, so that books can become chapters $(AM_V_at)sed -i 's/<.*bookinfo.*>//g' $@ # Strip out bookinfo, we don't need it -grep -qis "//' $@ # We just want the appendix tag -grep -vqis "/chapter>/g' $@ # Rename to chapter # echo Rebuilt $@ from $<