Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/Makefile.common b/Makefile.common
index 215b26c810..79833ac60c 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -1,86 +1,96 @@
-# Not all current distros support AM_V_P
+#
+# Copyright 2014-2019 the Pacemaker project contributors
+#
+# The version control history for this file may have further details.
+#
+# This source code is licensed under the GNU General Public License version 2
+# or later (GPLv2+) WITHOUT ANY WARRANTY.
+#
+
+#
+# Some variables to help with silent rules
# https://www.gnu.org/software/automake/manual/html_node/Automake-silent_002drules-Option.html
+#
+# We require a minimum automake version of 1.11, which includes AM_V_GEN and
+# AM_V_at, but AM_V_P is not available until 1.13.
V ?= $(AM_DEFAULT_VERBOSITY)
-PCMK_V = $(pcmk__v_$(V))
-pcmk__v_0 = :
-pcmk__v_1 =
-
+# When a make command is prefixed with one of the AM_V_* macros, it may also be
+# desirable to suffix the command with this, to silence stdout.
PCMK_quiet = $(pcmk_quiet_$(V))
-pcmk_quiet_0 = >/dev/null 2>&1
+pcmk_quiet_0 = >/dev/null
pcmk_quiet_1 =
-AM_V_XSL = $(am__v_XSL_$(V))
-am__v_XSL_0 = @echo " XSL " $@;
-am__v_XSL_1 =
-
+# AM_V_GEN is intended to be used in custom pattern rules, and replaces echoing
+# the command used with a more concise line with "GEN" and the name of the file
+# being generated. Our AM_V_* macros are similar but more descriptive.
AM_V_MAN = $(am__v_MAN_$(V))
-am__v_MAN_0 = @echo " MAN " $@;
+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_SCHEMA = $(am__v_SCHEMA_$(V))
+am__v_SCHEMA_0 = @echo " SCHEMA $@";
+am__v_SCHEMA_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
HELP2MAN_ARGS = -N --section 8 --name "Part of the Pacemaker cluster resource manager"
%.8: % $(MAN8DEPS)
- chmod a+x $(abs_builddir)/$<
- if [ -f $(abs_builddir)/$@.inc ]; then \
- $(AM_V_MAN)PATH=$(abs_builddir):$$PATH $(HELP2MAN) $(HELP2MAN_ARGS) -h --help-all -i $(abs_builddir)/$@.inc $(abs_builddir)/$< | sed -e '/.SS "Usage:"/,+3d' > $@ ; \
+ $(AM_V_at)chmod a+x $(abs_builddir)/$<
+ $(AM_V_MAN)if [ -f $(abs_builddir)/$@.inc ]; then \
+ PATH=$(abs_builddir):$$PATH $(HELP2MAN) $(HELP2MAN_ARGS) -h --help-all -i $(abs_builddir)/$@.inc $(abs_builddir)/$< | sed -e '/.SS "Usage:"/,+3d' > $@ ; \
else \
- $(AM_V_MAN)PATH=$(abs_builddir):$$PATH $(HELP2MAN) $(HELP2MAN_ARGS) $(abs_builddir)/$< --output $@ ; \
+ PATH=$(abs_builddir):$$PATH $(HELP2MAN) $(HELP2MAN_ARGS) $(abs_builddir)/$< --output $@ ; \
fi
%.xml: %
- $(AM_V_GEN)$(abs_builddir)/$< metadata > $@
+ $(AM_V_at)$(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)/$@
+ $(AM_V_at)$(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)
-
+ $(AM_V_MAN)$(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 appendices) and then strip out the
# bits we don't want/need
#
# XXX Sequence of tr/sed commands should be replaced with a single XSLT
#
%.xml: %.txt
if IS_ASCIIDOC
- $(AM_V_ASCII)$(ASCIIDOC_CONV) -b docbook -d book -o $@-tt $<
+ $(AM_V_GEN)$(ASCIIDOC_CONV) -b docbook -d book -o $@-tt $<
else
- $(AM_V_ASCII)$(ASCIIDOC_CONV) -b docbook45 -d book -o $@-tt $<
+ $(AM_V_GEN)$(ASCIIDOC_CONV) -b docbook45 -d book -o $@-tt $<
endif
$(AM_V_at)tr -d '\036\r' <$@-tt >$@-t; rm -f $@-tt # Fix line endings
$(AM_V_at)sed -i 's/\ lang="en"//' $@-t # Never specify a language in the chapters
$(AM_V_at)sed -i 's/simpara/para/g' $@-t # publican doesn't correctly render footnotes with simpara
$(AM_V_at)sed -i 's/.*<date>.*//g' $@-t # Remove dangling tag
$(AM_V_at)sed -i 's/.*preface>//g' $@-t # Remove preface elements
$(AM_V_at)sed -i 's:<title></title>::g' $@-t # Remove empty title
$(AM_V_at)sed -i 's/chapter/section/g' $@-t # Chapters become sections, so that books can become chapters
$(AM_V_at)sed -i 's/<.*bookinfo.*>//g' $@-t # Strip out bookinfo, we don't need it
$(AM_V_at)! grep -q "<appendix" $@-t || sed -i \
's/.*book>//;tb;bf;:b;N;s/.*<title>.*<\/title>.*//;tb;/<appendix/{:i;n;/<\/appendix/{p;d};bi};bb;:f;p;d' \
$@-t # We just want the appendix tag (asciidoctor adds non-empty book-level title)
$(AM_V_at)sed -i 's/book>/chapter>/g' $@-t # Rename to chapter (won't trigger if previous sed did)
$(AM_V_GEN)mv $@-t $@
# echo Rebuilt $@ from $<
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f84015c7d0..d82054d665 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,403 +1,403 @@
#
# Copyright 2003-2019 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
# This source code is licensed under the GNU General Public License version 2
# or later (GPLv2+) WITHOUT ANY WARRANTY.
#
include $(top_srcdir)/Makefile.common
helpdir = $(datadir)/$(PACKAGE)
ascii = crm_fencing.txt acls.txt
docbook = Clusters_from_Scratch \
Pacemaker_Administration \
Pacemaker_Development \
Pacemaker_Explained \
Pacemaker_Remote
doc_DATA = $(ascii) $(generated_docs)
# toplevel rsync destination for www targets (without trailing slash)
RSYNC_DEST ?= root@www.clusterlabs.org:/var/www/html
# recursive, preserve symlinks/permissions/times, verbose, compress,
# don't cross filesystems, sparse, show progress
RSYNC_OPTS = -rlptvzxS --progress
LAST_RELEASE ?= Pacemaker-$(VERSION)
TAG ?= $(shell git log --pretty=format:%H -n 1 HEAD)
publican_docs =
generated_docs =
generated_mans =
# What formats to build: pdf,html,html-single,html-desktop,epub
DOCBOOK_FORMATS := html-desktop
# What languages to build
DOCBOOK_LANGS := en-US
# What languages to build for uploading to website
# (currently only en-US because translations aren't up-to-date)
UPLOAD_LANGS = en-US
noinst_SCRIPTS = abi-check
# @TODO We could simplify this (and .gitignore) by establishing a convention
# that original image source begins with an uppercase letter and generated
# files with lowercase.
# Scheduler transition graphs
# @TODO Add original XML, and generate DOTs via crm_simulate
DOTS = $(wildcard shared/en-US/images/*.dot)
# Vector sources for images
# @TODO Generate transition SVGs from DOTs via dot
SVGS = $(wildcard shared/en-US/images/pcmk-*.svg) \
$(DOTS:%.dot=%.svg)
# Final images
PNGS_ORIGINAL = Pacemaker_Remote/en-US/images/pcmk-ha-cluster-stack.png \
Pacemaker_Remote/en-US/images/pcmk-ha-remote-stack.png \
shared/en-US/images/Console.png \
shared/en-US/images/Editing-eth0.png \
shared/en-US/images/Installer.png \
shared/en-US/images/Network.png \
shared/en-US/images/Partitioning.png \
shared/en-US/images/Welcome.png \
shared/en-US/images/resource-set.png \
shared/en-US/images/three-sets.png \
shared/en-US/images/two-sets.png
PNGS_GENERATED = $(SVGS:%.svg=%-small.png) \
$(SVGS:%.svg=%.png) \
$(SVGS:%.svg=%-large.png)
PNGS = $(PNGS_ORIGINAL) $(PNGS_GENERATED)
graphics: $(PNGS)
%.png: %.svg
- $(AM_V_IMG)$(INKSCAPE) --file=$< --export-dpi=90 -C --export-png=$@
+ $(AM_V_GEN)$(INKSCAPE) --file=$< --export-dpi=90 -C --export-png=$@ $(PCMK_quiet)
%-small.png: %.svg
- $(AM_V_IMG)$(INKSCAPE) --file=$< --export-dpi=45 -C --export-png=$@
+ $(AM_V_GEN)$(INKSCAPE) --file=$< --export-dpi=45 -C --export-png=$@ $(PCMK_quiet)
%-large.png: %.svg
- $(AM_V_IMG)$(INKSCAPE) --file=$< --export-dpi=180 -C --export-png=$@
+ $(AM_V_GEN)$(INKSCAPE) --file=$< --export-dpi=180 -C --export-png=$@ $(PCMK_quiet)
if BUILD_ASCIIDOC
generated_docs += $(ascii:%.txt=%.html)
if BUILD_DOCBOOK
publican_docs += $(docbook)
endif
endif
EXTRA_DIST = $(ascii) $(SHARED_TXT) $(PNGS_ORIGINAL) $(DOTS) $(SVGS)
EXTRA_DIST += $(CFS_TXT) $(CFS_XML_ONLY)
EXTRA_DIST += $(PA_TXT) $(PA_XML_ONLY)
EXTRA_DIST += $(PD_TXT) $(PD_XML_ONLY)
EXTRA_DIST += $(PE_TXT) $(PE_XML_ONLY)
EXTRA_DIST += $(PR_TXT) $(PR_XML_ONLY)
EXTRA_DIST += pcs-crmsh-quick-ref.md
if IS_ASCIIDOC
ASCIIDOC_HTML_ARGS = --unsafe --backend=xhtml11
else
ASCIIDOC_HTML_ARGS = --backend=html5
endif
%.html: %.txt
- $(AM_V_ASCII)$(ASCIIDOC_CONV) $(ASCIIDOC_HTML_ARGS) --out-file=$@ $<
+ $(AM_V_GEN)$(ASCIIDOC_CONV) $(ASCIIDOC_HTML_ARGS) --out-file=$@ $< $(PCMK_quiet)
# publican-clusterlabs/xsl/{html,html-single,pdf}.xsl refer to URIs
# requiring Internet access, hence we shadow that with a XML catalog-based
# redirect to local files brought with Publican installation;
# this is what newer Publican normally does with the system-wide catalog
# upon its installation, but let's provide a compatibility for older
# or badly installed instances (via adding the created file into
# XML_CATALOG_FILES for libxml2 backing Publican as a fallback);
# note that nextCatalog arrangement needed so as to overcome
# https://rt.cpan.org/Public/Bug/Display.html?id=113781
publican-catalog-fallback:
@exec >$@-t \
&& echo '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \
&& echo '<rewriteURI uriStartString="https://fedorahosted.org/released/publican/xsl/docbook4/" rewritePrefix="file:///usr/share/publican/xsl/"/>' \
&& echo '</catalog>'
$(AM_V_GEN)mv $@-t $@
publican-catalog: publican-catalog-fallback
@exec >$@-t \
&& echo '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \
&& echo '<nextCatalog catalog="file:///etc/xml/catalog"/>' \
&& echo '<nextCatalog catalog="file://$(CURDIR)/$<"/>' \
&& echo '</catalog>'
$(AM_V_GEN)mv $@-t $@
COMMON_XML = Author_Group.xml Book_Info.xml Revision_History.xml
SHARED_TXT=$(wildcard shared/en-US/*.txt)
SHARED_XML=$(SHARED_TXT:%.txt=%.xml)
CFS_SHARED_TXT=$(addprefix shared/en-US/,pacemaker-intro.txt)
CFS_SHARED_XML=$(CFS_SHARED_TXT:%.txt=%.xml)
CFS_TXT=$(wildcard Clusters_from_Scratch/en-US/*.txt)
CFS_XML=$(CFS_TXT:%.txt=%.xml)
CFS_XML_ONLY=$(addprefix Clusters_from_Scratch/en-US/,$(COMMON_XML) \
Clusters_from_Scratch.ent Clusters_from_Scratch.xml Preface.xml)
$(CFS_XML): $(CFS_SHARED_XML)
PUBLICAN_INTREE_DEPS =
if PUBLICAN_INTREE_BRAND
PUBLICAN_INTREE_DEPS += publican-catalog
endif
# We have to hardcode the book name
# With '%' the test for 'newness' fails
-Clusters_from_Scratch.build: $(PNGS) $(CFS_XML_ONLY) $(CFS_XML) $(CFS_SHARED_XML) $(PUBLICAN_INTREE_DEPS)
- $(PCMK_V) @echo Building $(@:%.build=%) because of $?
+Clusters_from_Scratch.build: $(PNGS) $(CFS_XML_ONLY) $(CFS_XML) $(CFS_SHARED_XML) $(PUBLICAN_INTREE_DEPS)
+ @echo Building $(@:%.build=%) because of $?
rm -rf $(@:%.build=%)/publish/* $(@:%.build=%)/tmp
if PUBLICAN_INTREE_BRAND
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \
$(PCMK_quiet)
else
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \
$(PCMK_quiet)
endif
rm -rf $(@:%.build=%)/tmp
touch $@
PA_TXT=$(wildcard Pacemaker_Administration/en-US/*.txt)
PA_XML=$(PA_TXT:%.txt=%.xml)
PA_XML_ONLY=$(addprefix Pacemaker_Administration/en-US/,$(COMMON_XML) \
Pacemaker_Administration.ent Pacemaker_Administration.xml Preface.xml)
# We have to hardcode the book name
# With '%' the test for 'newness' fails
Pacemaker_Administration.build: $(PA_XML_ONLY) $(PA_XML) $(PUBLICAN_INTREE_DEPS)
- $(PCMK_V) @echo Building $(@:%.build=%) because of $?
+ @echo Building $(@:%.build=%) because of $?
rm -rf $(@:%.build=%)/publish/*
if PUBLICAN_INTREE_BRAND
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \
$(PCMK_quiet)
else
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \
$(PCMK_quiet)
endif
rm -rf $(@:%.build=%)/tmp
touch $@
PD_TXT=$(wildcard Pacemaker_Development/en-US/*.txt)
PD_XML=$(PD_TXT:%.txt=%.xml)
PD_XML_ONLY=$(addprefix Pacemaker_Development/en-US/,$(COMMON_XML) \
Pacemaker_Development.ent Pacemaker_Development.xml)
# We have to hardcode the book name
# With '%' the test for 'newness' fails
Pacemaker_Development.build: $(PD_XML_ONLY) $(PD_XML) $(PUBLICAN_INTREE_DEPS)
- $(PCMK_V) @echo Building $(@:%.build=%) because of $?
+ @echo Building $(@:%.build=%) because of $?
rm -rf $(@:%.build=%)/publish/* $(@:%.build=%)/tmp
if PUBLICAN_INTREE_BRAND
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \
$(PCMK_quiet)
else
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \
$(PCMK_quiet)
endif
rm -rf $(@:%.build=%)/tmp
touch $@
PE_SHARED_TXT=$(addprefix shared/en-US/,pacemaker-intro.txt)
PE_SHARED_XML=$(PE_SHARED_TXT:%.txt=%.xml)
PE_TXT=$(wildcard Pacemaker_Explained/en-US/*.txt)
PE_XML=$(PE_TXT:%.txt=%.xml)
PE_XML_ONLY=$(addprefix Pacemaker_Explained/en-US/,$(COMMON_XML) \
Pacemaker_Explained.ent Pacemaker_Explained.xml Preface.xml)
$(PE_XML): $(PE_SHARED_XML)
# We have to hardcode the book name
# With '%' the test for 'newness' fails
Pacemaker_Explained.build: $(PNGS) $(PE_XML_ONLY) $(PE_XML) $(PE_SHARED_XML) $(PUBLICAN_INTREE_DEPS)
- $(PCMK_V) @echo Building $(@:%.build=%) because of $?
+ @echo Building $(@:%.build=%) because of $?
rm -rf $(@:%.build=%)/publish/* $(@:%.build=%)/tmp
if PUBLICAN_INTREE_BRAND
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \
$(PCMK_quiet)
else
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \
$(PCMK_quiet)
endif
rm -rf $(@:%.build=%)/tmp
touch $@
PR_TXT=$(wildcard Pacemaker_Remote/en-US/*.txt)
PR_XML=$(PR_TXT:%.txt=%.xml)
PR_XML_ONLY=$(addprefix Pacemaker_Remote/en-US/,$(COMMON_XML) \
Pacemaker_Remote.ent Pacemaker_Remote.xml)
# We have to hardcode the book name
# With '%' the test for 'newness' fails
Pacemaker_Remote.build: $(PNGS) $(PR_XML_ONLY) $(PR_XML) $(PUBLICAN_INTREE_DEPS)
- $(PCMK_V) @echo Building $(@:%.build=%) because of $?
+ @echo Building $(@:%.build=%) because of $?
rm -rf $(@:%.build=%)/publish/* $(@:%.build=%)/tmp
if PUBLICAN_INTREE_BRAND
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" XML_CATALOG_FILES="$(CURDIR)/publican-catalog" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) --brand_dir=../publican-clusterlabs \
$(PCMK_quiet)
else
$(AM_V_PUB)cd $(@:%.build=%) \
&& RPM_BUILD_DIR="" \
$(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) \
$(PCMK_quiet)
endif
rm -rf $(@:%.build=%)/tmp
touch $@
# Update the translation template
pot:
for book in $(docbook); do \
echo "Updating translation templates in: $$book"; \
( cd $$book && RPM_BUILD_DIR="" $(PUBLICAN) update_pot ); \
done
# Update the actual translations
po: pot
for book in $(docbook); do \
echo "Updating translations in: $$book"; \
( cd $$book && RPM_BUILD_DIR="" $(PUBLICAN) update_po --langs=all );\
done
if BUILD_DOCBOOK
docbook_build = $(docbook:%=%.build)
all-local: $(docbook_build) */publican.cfg
install-data-local: all-local
for book in $(docbook); do \
filelist=`find $$book/publish/* -print`; \
for f in $$filelist; do \
p=`echo $$f | sed s:publish/:: | sed s:Pacemaker/::`; \
if [ -d $$f ]; then \
$(INSTALL) -d -m 775 $(DESTDIR)$(docdir)/$$p; \
else \
$(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/$$p; \
fi \
done; \
done
endif
BRAND_DEPS = $(wildcard publican-clusterlabs/en-US/*.png) \
$(wildcard publican-clusterlabs/en-US/*.xml)
brand-build: $(BRAND_DEPS)
cd publican-clusterlabs && publican build --formats=xml --langs=all --publish
brand: brand-build
echo "Installing..."
cd publican-clusterlabs && sudo publican install_brand --path=$(datadir)/publican/Common_Content
brand-rpm-clean:
find publican-clusterlabs -name "*.noarch.rpm" -exec rm -f \{\} \;
brand-rpm-build: brand-rpm-clean brand-build
cd publican-clusterlabs && $(PUBLICAN) package --binary
brand-rpm-install: brand-rpm-build
find publican-clusterlabs -name "*.noarch.rpm" -exec sudo rpm -Uvh --force \{\} \;
pdf:
$(MAKE) DOCBOOK_FORMATS="pdf" all-local
# Annotated source code as HTML
global:
$(MAKE) -C .. clean-generic
cd .. && gtags -q && htags -sanhIT doc
global-upload: global
rsync $(RSYNC_OPTS) HTML/ "$(RSYNC_DEST)/$(PACKAGE)/global/$(TAG)/"
# Man pages as HTML
%.8.html: %.8
groff -mandoc `man -w ./$<` -T html > $@
%.7.html: %.7
groff -mandoc `man -w ./$<` -T html > $@
manhtml:
$(MAKE) -C .. all
find .. -name "[a-z]*.[78]" -exec $(MAKE) \{\}.html \;
manhtml-upload: manhtml
find .. -name "[a-z]*.[78].html" -exec \
rsync $(RSYNC_OPTS) \{\} "$(RSYNC_DEST)/$(PACKAGE)/man/" \;
# API documentation as HTML
doxygen: Doxyfile
doxygen Doxyfile
doxygen-upload: doxygen
rsync $(RSYNC_OPTS) api/html/ "$(RSYNC_DEST)/$(PACKAGE)/doxygen/$(TAG)/"
# ABI compatibility report as HTML
abi: abi-check
./abi-check $(PACKAGE) $(LAST_RELEASE) $(TAG)
abi-www:
export RSYNC_DEST=$(RSYNC_DEST); ./abi-check -u $(PACKAGE) $(LAST_RELEASE) $(TAG)
# All HTML documentation (except ABI compatibility, which is run separately)
www: clean-local $(generated_docs) $(ascii) manhtml-upload global-upload doxygen-upload
for book in $(docbook); do \
sed -i.sed 's@^brand:.*@brand: clusterlabs@' $$book/publican.cfg; \
done
$(MAKE) DOCBOOK_FORMATS="pdf,html,html-single,epub" DOCBOOK_LANGS="$(UPLOAD_LANGS)" all-local
echo Uploading current $(PACKAGE_SERIES) documentation set to clusterlabs.org
if BUILD_DOCBOOK
for book in $(docbook); do \
echo Uploading $$book...; \
echo "Generated on `date` from version: $(shell git log --pretty="format:%h %d" -n 1)" >> $$book/publish/build-$(PACKAGE_SERIES).txt; \
rsync $(RSYNC_OPTS) $$book/publish/* "$(RSYNC_DEST)/$(PACKAGE)/doc/"; \
done
endif
rsync $(RSYNC_OPTS) $(generated_docs) $(ascii) "$(RSYNC_DEST)/$(PACKAGE)/doc/"
clean-local:
-rm -f $(PNGS_GENERATED)
-rm -rf $(generated_docs) $(generated_mans) $(docbook_build)
-rm -rf $(SHARED_XML) $(CFS_XML) $(PE_XML) $(PR_XML)
-rm -rf publican-catalog-fallback publican-catalog
for book in $(docbook); do rm -rf $$book/tmp $$book/publish; done
diff --git a/xml/Makefile.am b/xml/Makefile.am
index 0b38c391f1..8ad5bd06ac 100644
--- a/xml/Makefile.am
+++ b/xml/Makefile.am
@@ -1,235 +1,231 @@
#
# Copyright 2004-2019 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
# This source code is licensed under the GNU General Public License version 2
# or later (GPLv2+) WITHOUT ANY WARRANTY.
#
-MAINTAINERCLEANFILES = Makefile.in
+
+include $(top_srcdir)/Makefile.common
# Pacemaker has 3 schemas: the CIB schema, the API schema (for command-line
# tool XML output), and a legacy schema for crm_mon --as-xml.
#
# See Readme.md for details on updating CIB schema files (API is similar)
# The CIB and crm_mon schemas are installed directly in CRM_SCHEMA_DIRECTORY
# for historical reasons, while the API schema is installed in a subdirectory.
APIdir = $(CRM_SCHEMA_DIRECTORY)/api
CIBdir = $(CRM_SCHEMA_DIRECTORY)
MONdir = $(CRM_SCHEMA_DIRECTORY)
# Extract a sorted list of available numeric schema versions
# from filenames like NAME-MAJOR[.MINOR][.MINOR-MINOR].rng
numeric_versions = $(shell ls -1 $(1) \
| sed -n -e 's/^.*-\([0-9][0-9.]*\).rng$$/\1/p' \
| sort -u -t. -k 1,1n -k 2,2n -k 3,3n)
version_pairs = $(join \
$(1),$(addprefix \
-,$(wordlist \
2,$(words $(1)),$(1) \
) next \
) \
)
version_pairs_last = $(wordlist \
$(words \
$(wordlist \
2,$(1),$(2) \
) \
),$(1),$(2) \
)
# Names of API schemas that form the choices for pacemaker-result content
API_request_base = command-output stonith_admin version
# Names of CIB schemas that form the choices for cib/configuration content
CIB_cfg_base = options nodes resources constraints fencing acls tags alerts
# Names of all schemas (including top level and those included by others)
API_base = $(API_request_base) item status
CIB_base = cib $(CIB_cfg_base) status score rule nvset
# All static schema files
API_files = $(foreach base,$(API_base),$(wildcard $(srcdir)/api/$(base)*.rng))
CIB_files = $(foreach base,$(CIB_base),$(wildcard $(srcdir)/$(base).rng $(srcdir)/$(base)-*.rng))
MON_files = crm_mon.rng
# Sorted lists of all numeric schema versions
API_numeric_versions = $(call numeric_versions,${API_files})
CIB_numeric_versions = $(call numeric_versions,${CIB_files})
# The highest numeric schema version
API_max ?= $(lastword $(API_numeric_versions))
CIB_max ?= $(lastword $(CIB_numeric_versions))
# Sorted lists of all schema versions (including "next")
API_versions = next $(API_numeric_versions)
CIB_versions = next $(CIB_numeric_versions)
# Dynamically generated schema files
API_generated = api/api-result.rng $(foreach base,$(API_versions),api/api-result-$(base).rng)
CIB_generated = pacemaker.rng $(foreach base,$(CIB_versions),pacemaker-$(base).rng) versions.rng
CIB_version_pairs = $(call version_pairs,${CIB_numeric_versions})
CIB_version_pairs_cnt = $(words ${CIB_version_pairs})
CIB_version_pairs_last = $(call version_pairs_last,${CIB_version_pairs_cnt},${CIB_version_pairs})
dist_API_DATA = $(API_files)
dist_CIB_DATA = $(CIB_files) \
upgrade-1.3.xsl \
upgrade-2.10.xsl \
$(wildcard $(srcdir)/upgrade-*enter.xsl) \
$(wildcard $(srcdir)/upgrade-*leave.xsl)
dist_MON_DATA = $(MON_files)
nodist_API_DATA = $(API_generated)
nodist_CIB_DATA = $(CIB_generated)
EXTRA_DIST = Readme.md \
best-match.sh \
cibtr-2.rng \
context-of.xsl \
ocf-meta2man.xsl \
regression.sh \
upgrade-2.10-roundtrip.xsl \
upgrade-detail.xsl \
xslt_cibtr-2.rng \
assets \
test-2 \
test-2-enter \
test-2-leave \
test-2-roundtrip
cib-versions:
@echo "Max: $(CIB_max)"
@echo "Available: $(CIB_versions)"
api-versions:
@echo "Max: $(API_max)"
@echo "Available: $(API_versions)"
# Dynamically generated top-level API schema
api/api-result.rng: api/api-result-$(API_max).rng
- $(MKDIR_P) api # might not exist in VPATH build
- echo " RNG $@"
- cp $(top_builddir)/xml/$< $@
+ $(AM_V_at)$(MKDIR_P) api # might not exist in VPATH build
+ $(AM_V_SCHEMA)cp $(top_builddir)/xml/$< $@
api/api-result-%.rng: $(API_files) best-match.sh Makefile.am
- $(MKDIR_P) api # might not exist in VPATH build
- echo " RNG $@"
- echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
- echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
- echo ' <start>' >> $@
- echo ' <element name="pacemaker-result">' >> $@
- echo ' <attribute name="api-version"> <text /> </attribute>' >> $@
- echo ' <attribute name="request"> <text /> </attribute>' >> $@
- echo ' <optional>' >> $@
- echo ' <choice>' >> $@
- for rng in $(API_request_base); do $(srcdir)/best-match.sh api/$$rng $(*) $(@) " " || :; done
- echo ' </choice>' >> $@
- echo ' </optional>' >> $@
- $(srcdir)/best-match.sh api/status $(*) $(@) " " || :
- echo ' </element>' >> $@
- echo ' </start>' >> $@
- echo '</grammar>' >> $@
+ $(AM_V_at)$(MKDIR_P) api # might not exist in VPATH build
+ $(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
+ $(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
+ $(AM_V_at)echo ' <start>' >> $@
+ $(AM_V_at)echo ' <element name="pacemaker-result">' >> $@
+ $(AM_V_at)echo ' <attribute name="api-version"> <text /> </attribute>' >> $@
+ $(AM_V_at)echo ' <attribute name="request"> <text /> </attribute>' >> $@
+ $(AM_V_at)echo ' <optional>' >> $@
+ $(AM_V_at)echo ' <choice>' >> $@
+ $(AM_V_at)for rng in $(API_request_base); do $(srcdir)/best-match.sh api/$$rng $(*) $(@) " " || :; done
+ $(AM_V_at)echo ' </choice>' >> $@
+ $(AM_V_at)echo ' </optional>' >> $@
+ $(AM_V_at)$(srcdir)/best-match.sh api/status $(*) $(@) " " || :
+ $(AM_V_at)echo ' </element>' >> $@
+ $(AM_V_at)echo ' </start>' >> $@
+ $(AM_V_SCHEMA)echo '</grammar>' >> $@
# Dynamically generated top-level CIB schema
pacemaker.rng: pacemaker-$(CIB_max).rng
- echo " RNG $@"
- cp $(top_builddir)/xml/$< $@
+ $(AM_V_SCHEMA)cp $(top_builddir)/xml/$< $@
pacemaker-%.rng: $(CIB_files) best-match.sh Makefile.am
- echo " RNG $@"
- echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
- echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
- echo ' <start>' >> $@
- echo ' <element name="cib">' >> $@
- $(srcdir)/best-match.sh cib $(*) $(@) " "
- echo ' <element name="configuration">' >> $@
- echo ' <interleave>' >> $@
- for rng in $(CIB_cfg_base); do $(srcdir)/best-match.sh $$rng $(*) $(@) " " || :; done
- echo ' </interleave>' >> $@
- echo ' </element>' >> $@
- echo ' <optional>' >> $@
- echo ' <element name="status">' >> $@
- $(srcdir)/best-match.sh status $(*) $(@) " "
- echo ' </element>' >> $@
- echo ' </optional>' >> $@
- echo ' </element>' >> $@
- echo ' </start>' >> $@
- echo '</grammar>' >> $@
+ $(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
+ $(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
+ $(AM_V_at)echo ' <start>' >> $@
+ $(AM_V_at)echo ' <element name="cib">' >> $@
+ $(AM_V_at)$(srcdir)/best-match.sh cib $(*) $(@) " "
+ $(AM_V_at)echo ' <element name="configuration">' >> $@
+ $(AM_V_at)echo ' <interleave>' >> $@
+ $(AM_V_at)for rng in $(CIB_cfg_base); do $(srcdir)/best-match.sh $$rng $(*) $(@) " " || :; done
+ $(AM_V_at)echo ' </interleave>' >> $@
+ $(AM_V_at)echo ' </element>' >> $@
+ $(AM_V_at)echo ' <optional>' >> $@
+ $(AM_V_at)echo ' <element name="status">' >> $@
+ $(AM_V_at)$(srcdir)/best-match.sh status $(*) $(@) " "
+ $(AM_V_at)echo ' </element>' >> $@
+ $(AM_V_at)echo ' </optional>' >> $@
+ $(AM_V_at)echo ' </element>' >> $@
+ $(AM_V_at)echo ' </start>' >> $@
+ $(AM_V_SCHEMA)echo '</grammar>' >> $@
# Dynamically generated CIB schema listing all pacemaker versions
versions.rng: Makefile.am
- echo " RNG $@"
- echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
- echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
- echo ' <start>' >> $@
- echo ' <interleave>' >> $@
- echo ' <optional>' >> $@
- echo ' <attribute name="validate-with">' >> $@
- echo ' <choice>' >> $@
- echo ' <value>none</value>' >> $@
- echo ' <value>pacemaker-0.6</value>' >> $@
- echo ' <value>transitional-0.6</value>' >> $@
- echo ' <value>pacemaker-0.7</value>' >> $@
- echo ' <value>pacemaker-1.1</value>' >> $@
- for rng in $(CIB_versions); do echo " <value>pacemaker-$$rng</value>" >> $@; done
- echo ' </choice>' >> $@
- echo ' </attribute>' >> $@
- echo ' </optional>' >> $@
- echo ' <attribute name="admin_epoch"><data type="nonNegativeInteger"/></attribute>' >> $@
- echo ' <attribute name="epoch"><data type="nonNegativeInteger"/></attribute>' >> $@
- echo ' <attribute name="num_updates"><data type="nonNegativeInteger"/></attribute>' >> $@
- echo ' </interleave>' >> $@
- echo ' </start>' >> $@
- echo '</grammar>' >> $@
+ $(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
+ $(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
+ $(AM_V_at)echo ' <start>' >> $@
+ $(AM_V_at)echo ' <interleave>' >> $@
+ $(AM_V_at)echo ' <optional>' >> $@
+ $(AM_V_at)echo ' <attribute name="validate-with">' >> $@
+ $(AM_V_at)echo ' <choice>' >> $@
+ $(AM_V_at)echo ' <value>none</value>' >> $@
+ $(AM_V_at)echo ' <value>pacemaker-0.6</value>' >> $@
+ $(AM_V_at)echo ' <value>transitional-0.6</value>' >> $@
+ $(AM_V_at)echo ' <value>pacemaker-0.7</value>' >> $@
+ $(AM_V_at)echo ' <value>pacemaker-1.1</value>' >> $@
+ $(AM_V_at)for rng in $(CIB_versions); do echo " <value>pacemaker-$$rng</value>" >> $@; done
+ $(AM_V_at)echo ' </choice>' >> $@
+ $(AM_V_at)echo ' </attribute>' >> $@
+ $(AM_V_at)echo ' </optional>' >> $@
+ $(AM_V_at)echo ' <attribute name="admin_epoch"><data type="nonNegativeInteger"/></attribute>' >> $@
+ $(AM_V_at)echo ' <attribute name="epoch"><data type="nonNegativeInteger"/></attribute>' >> $@
+ $(AM_V_at)echo ' <attribute name="num_updates"><data type="nonNegativeInteger"/></attribute>' >> $@
+ $(AM_V_at)echo ' </interleave>' >> $@
+ $(AM_V_at)echo ' </start>' >> $@
+ $(AM_V_SCHEMA)echo '</grammar>' >> $@
# diff fails with ec=2 if no predecessor is found;
# this uses '=' GNU extension to sed, if that's not available,
# one can use: hline=`echo "$${p}" | grep -Fn "$${hunk}" | cut -d: -f1`;
# XXX: use line information from hunk to avoid "not detected" for ambiguity
version_diff = \
@for p in $(1); do \
set `echo "$${p}" | tr '-' ' '`; \
echo "\#\#\# *-$$2.rng vs. predecessor"; \
for v in *-$$2.rng; do \
echo "\#\#\#\# $${v} vs. predecessor"; b=`echo "$${v}" | cut -d- -f1`; \
old=`./best-match.sh $${b} $$1`; \
p=`diff -u "$${old}" "$${v}" 2>/dev/null`; \
case $$? in \
1) echo "$${p}" | sed -n -e '/^@@ /!d;=;p' \
-e ':l;n;/^\([- ]\|+.*<[^ />]\+\([^/>]\+="ID\|>$$\)\)/bl;s/^[+ ]\(.*\)/\1/p' \
| while read hline; do \
read h && read i || break; \
iline=`grep -Fn "$${i}" "$${v}" | cut -d: -f1`; \
ctxt="(not detected)"; \
if test `echo "$${iline}" | wc -l` -eq 1; then \
ctxt=`{ sed -n -e "1,$$(($${iline}-1))p" "$${v}"; \
echo "<inject id=\"GOAL\"/>$${i}"; \
sed -n -e "$$(($${iline}+1)),$$ p" "$${v}"; \
} | $(XSLTPROC) --param skip 1 context-of.xsl -`; \
fi; \
echo "$${p}" | sed -n -e "$$(($${hline}-2)),$${hline}!d" \
-e '/^\(+++\|---\)/p'; \
echo "$${h} context: $${ctxt}"; \
echo "$${p}" | sed -n -e "1,$${hline}d" \
-e '/^\(---\|@@ \)/be;p;d;:e;n;be'; \
done; \
;; \
2) echo "\#\#\#\#\# $${v} has no predecessor";; \
esac; \
done; \
done
diff: best-match.sh
@echo "# Comparing changes in + since $(CIB_max)"
$(call version_diff,${CIB_version_pairs_last})
fulldiff: best-match.sh
@echo "# Comparing all changes across all the subsequent increments"
$(call version_diff,${CIB_version_pairs})
CLEANFILES = $(API_generated) $(CIB_generated)

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jul 8, 6:35 PM (2 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2002704
Default Alt Text
(32 KB)

Event Timeline