diff --git a/Makefile.am b/Makefile.am index 62eabd5295..dd09a38664 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,74 +1,82 @@ # # 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. # -EXTRA_DIST = autogen.sh m4/gnulib-cache.m4 +EXTRA_DIST = CONTRIBUTING.md \ + GNUmakefile \ + INSTALL.md \ + README.markdown \ + autogen.sh \ + pacemaker.spec.in \ + rpmlintrc \ + m4/gnulib-cache.m4 \ + m4/gnulib-tool.m4 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \ DRF/stamp-h.in libtool.m4 ltdl.m4 # Only these will get installed with a plain "make install" CORE_INSTALL = replace include lib daemons tools xml # Only these will get built with a plain "make" or "make clean" CORE = $(CORE_INSTALL) cts SUBDIRS = $(CORE) doc extra maint AM_CPPFLAGS = -I$(top_srcdir)/include doc_DATA = README.markdown COPYING licensedir = $(docdir)/licenses/ -license_DATA = $(wildcard licenses/*) +dist_license_DATA = $(wildcard licenses/*) # Scratch file for ad-hoc testing noinst_PROGRAMS = scratch nodist_scratch_SOURCES = scratch.c scratch_LDADD = $(top_builddir)/lib/common/libcrmcommon.la -lm scratch.c: echo 'int main(void){}' >$@ core: @echo "Building only core components and tests: $(CORE)" list='$(CORE)'; for subdir in $$list; do echo "Building $$subdir"; $(MAKE) -C $$subdir all || exit 1; done core-install: @echo "Installing only core components: $(CORE_INSTALL)" list='$(CORE_INSTALL)'; \ for subdir in $$list; do \ echo "Installing $$subdir"; \ $(MAKE) -C $$subdir install || exit 1; \ done core-clean: @echo "Cleaning only core components and tests: $(CORE)" list='$(CORE)'; for subdir in $$list; do echo "Cleaning $$subdir"; $(MAKE) -C $$subdir clean || exit 1; done install-exec-local: $(INSTALL) -d $(DESTDIR)/$(LCRSODIR) $(INSTALL) -d -m 750 $(DESTDIR)/$(PACEMAKER_CONFIG_DIR) $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CONFIG_DIR) $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CORE_DIR) $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_BLACKBOX_DIR) $(INSTALL) -d -m 770 $(DESTDIR)/$(CRM_LOG_DIR) $(INSTALL) -d -m 770 $(DESTDIR)/$(CRM_BUNDLE_DIR) -chgrp $(CRM_DAEMON_GROUP) $(DESTDIR)/$(PACEMAKER_CONFIG_DIR) -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CONFIG_DIR) -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CORE_DIR) -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BLACKBOX_DIR) -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_LOG_DIR) -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BUNDLE_DIR) # Use chown because the user/group may not exist clean-generic: rm -f $(TARFILE) *.tar.bz2 *.sed dist-clean-local: rm -f autoconf automake autoheader diff --git a/cts/Makefile.am b/cts/Makefile.am index adc43f228a..4b4fc3243f 100644 --- a/cts/Makefile.am +++ b/cts/Makefile.am @@ -1,98 +1,100 @@ # # Copyright 2001-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 -EXTRA_DIST = $(cts_SCRIPTS) $(cts_DATA) noinst_SCRIPTS = cluster_test \ OCFIPraTest.py -halibdir = $(CRM_DAEMON_DIR) -halib_SCRIPTS = cts-log-watcher cts-support +# Commands intended to be run only via other commands +halibdir = $(CRM_DAEMON_DIR) +dist_halib_SCRIPTS = cts-log-watcher \ + cts-support -# # Test commands and globally applicable test files should be in $(testdir), # and command-specific test data should be in a command-specific subdirectory. -# -testdir = $(datadir)/$(PACKAGE)/tests -test_SCRIPTS = cts-coverage cts-regression cts-cli cts-exec cts-scheduler \ - cts-fencing -test_DATA = README.md valgrind-pcmk.suppressions - -ctslibdir = $(pythondir)/cts -ctslib_PYTHON = __init__.py \ - CTSvars.py \ - CM_common.py \ - CM_corosync.py \ - CTS.py \ - CTSaudits.py \ - CTStests.py \ - CTSscenarios.py \ - CIB.py \ - cib_xml.py \ - environment.py \ - logging.py \ - patterns.py \ - remote.py \ - watcher.py +testdir = $(datadir)/$(PACKAGE)/tests +test_SCRIPTS = cts-cli \ + cts-coverage \ + cts-exec \ + cts-fencing \ + cts-regression \ + cts-scheduler +dist_test_DATA = README.md \ + valgrind-pcmk.suppressions + +ctslibdir = $(pythondir)/cts +ctslib_PYTHON = __init__.py \ + CIB.py \ + cib_xml.py \ + CM_common.py \ + CM_corosync.py \ + CTSaudits.py \ + CTSscenarios.py \ + CTStests.py \ + environment.py \ + logging.py \ + patterns.py \ + remote.py \ + watcher.py +nodist_ctslib_PYTHON = CTS.py \ + CTSvars.py ctsdir = $(testdir)/cts cts_DATA = pacemaker-cts-dummyd@.service - if BUILD_UPSTART -cts_DATA += pacemaker-cts-dummyd.conf +dist_cts_DATA = pacemaker-cts-dummyd.conf endif - -cts_SCRIPTS = cts \ - CTSlab.py \ - lxc_autogen.sh \ - LSBDummy \ - fence_dummy \ - pacemaker-cts-dummyd +dist_cts_SCRIPTS = cts +cts_SCRIPTS = CTSlab.py \ + fence_dummy \ + LSBDummy \ + lxc_autogen.sh \ + pacemaker-cts-dummyd clidir = $(testdir)/cli -cli_DATA = cli/regression.dates.exp \ - cli/regression.tools.exp \ +dist_cli_DATA = cli/crm_diff_new.xml \ + cli/crm_diff_old.xml \ cli/regression.acls.exp \ - cli/regression.validity.exp \ - cli/regression.upgrade.exp \ + cli/regression.dates.exp \ cli/regression.rules.exp \ - cli/crm_diff_new.xml \ - cli/crm_diff_old.xml + cli/regression.tools.exp \ + cli/regression.upgrade.exp \ + cli/regression.validity.exp PE_TESTS = $(wildcard scheduler/*.scores) pedir = $(testdir)/scheduler -pe_DATA = $(PE_TESTS) \ +dist_pe_DATA = $(PE_TESTS) \ $(PE_TESTS:%.scores=%.xml) \ $(PE_TESTS:%.scores=%.exp) \ $(PE_TESTS:%.scores=%.dot) \ $(PE_TESTS:%.scores=%.summary) \ $(wildcard scheduler/*.stderr) # For "make check", run a single scheduler test TESTS = scheduler/bug-rh-1097457.xml TEST_EXTENSIONS = .xml XML_LOG_COMPILER = ./cts-scheduler AM_XML_LOG_FLAGS = -V --run scheduler-list: @for T in "$(srcdir)"/scheduler/*.xml; do \ echo $$(basename $$T .xml); \ done clean-local: rm -f scheduler/*.pe.* SUBDIRS = benchmark cts-support-install: cts-support ./cts-support install cts-support-uninstall: cts-support ./cts-support uninstall diff --git a/cts/benchmark/Makefile.am b/cts/benchmark/Makefile.am index efc4cba282..532abd2c4e 100644 --- a/cts/benchmark/Makefile.am +++ b/cts/benchmark/Makefile.am @@ -1,28 +1,13 @@ # # Copyright 2001-2017 the Pacemaker project contributors # # The version control history for this file may have further details. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = $(bench_SCRIPTS) $(bench_DATA) - -benchdir = $(datadir)/$(PACKAGE)/tests/cts/benchmark - -bench_DATA = README.benchmark control - -bench_SCRIPTS = clubench +benchdir = $(datadir)/$(PACKAGE)/tests/cts/benchmark +dist_bench_DATA = README.benchmark control +bench_SCRIPTS = clubench diff --git a/daemons/fenced/Makefile.am b/daemons/fenced/Makefile.am index c38f357e13..26993d8d22 100644 --- a/daemons/fenced/Makefile.am +++ b/daemons/fenced/Makefile.am @@ -1,52 +1,54 @@ # # Original Author: Sun Jiang Dong # Copyright 2004 International Business Machines # # with later changes 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. # include $(top_srcdir)/Makefile.common halibdir = $(CRM_DAEMON_DIR) halib_PROGRAMS = pacemaker-fenced cts-fence-helper sbin_SCRIPTS = fence_legacy noinst_HEADERS = pacemaker-fenced.h if BUILD_XML_HELP man7_MANS = pacemaker-fenced.7 endif +EXTRA_DIST = README.md + cts_fence_helper_SOURCES = cts-fence-helper.c cts_fence_helper_LDADD = $(top_builddir)/lib/common/libcrmcommon.la \ $(top_builddir)/lib/fencing/libstonithd.la pacemaker_fenced_YFLAGS = -d pacemaker_fenced_CFLAGS = $(CFLAGS_HARDENED_EXE) pacemaker_fenced_LDFLAGS = $(LDFLAGS_HARDENED_EXE) pacemaker_fenced_LDADD = $(top_builddir)/lib/common/libcrmcommon.la \ $(top_builddir)/lib/cluster/libcrmcluster.la \ $(top_builddir)/lib/fencing/libstonithd.la \ $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/pacemaker/libpacemaker.la \ $(CLUSTERLIBS) pacemaker_fenced_SOURCES = pacemaker-fenced.c \ fenced_commands.c \ fenced_remote.c \ fenced_history.c CLEANFILES = $(man7_MANS) $(man8_MANS) if BUILD_LEGACY_LINKS install-exec-hook: cd $(DESTDIR)$(CRM_DAEMON_DIR) && rm -f stonithd && $(LN_S) pacemaker-fenced stonithd uninstall-hook: cd $(DESTDIR)$(CRM_DAEMON_DIR) && rm -f stonithd endif diff --git a/daemons/pacemakerd/Makefile.am b/daemons/pacemakerd/Makefile.am index 8a6f8e69fd..ae37ab4481 100644 --- a/daemons/pacemakerd/Makefile.am +++ b/daemons/pacemakerd/Makefile.am @@ -1,35 +1,37 @@ # # Copyright 2004-2018 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 if BUILD_CS_SUPPORT initdir = $(INITDIR) init_SCRIPTS = pacemaker sbin_PROGRAMS = pacemakerd if BUILD_SYSTEMD systemdunit_DATA = pacemaker.service endif +EXTRA_DIST = pacemaker.sysconfig + ## SOURCES noinst_HEADERS = pacemakerd.h pacemakerd_CFLAGS = $(CFLAGS_HARDENED_EXE) pacemakerd_LDFLAGS = $(LDFLAGS_HARDENED_EXE) pacemakerd_LDADD = $(top_builddir)/lib/cluster/libcrmcluster.la $(top_builddir)/lib/common/libcrmcommon.la pacemakerd_LDADD += $(CLUSTERLIBS) pacemakerd_SOURCES = pacemakerd.c pcmkd_corosync.c endif CLEANFILES = $(man8_MANS) diff --git a/doc/Makefile.am b/doc/Makefile.am index 18747cfcaa..cedd388816 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,400 +1,401 @@ # # 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=$@ %-small.png: %.svg $(AM_V_IMG)$(INKSCAPE) --file=$< --export-dpi=45 -C --export-png=$@ %-large.png: %.svg $(AM_V_IMG)$(INKSCAPE) --file=$< --export-dpi=180 -C --export-png=$@ if BUILD_ASCIIDOC generated_docs += $(ascii:%.txt=%.html) if BUILD_DOCBOOK publican_docs += $(docbook) endif endif -EXTRA_DIST = $(ascii) $(SHARED_TXT) $(PNGS_ORIGINAL) $(SVGS) +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 %.html: %.txt if IS_ASCIIDOC $(AM_V_ASCII)$(ASCIIDOC_CONV) --unsafe --backend=xhtml11 $< else $(AM_V_ASCII)$(ASCIIDOC_CONV) --backend=html5 $< endif # 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 '' \ && echo '' \ && echo '' $(AM_V_GEN)mv $@-t $@ publican-catalog: publican-catalog-fallback @exec >$@-t \ && echo '' \ && echo '' \ && echo '' \ && echo '' $(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 $? 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 $? 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 $? 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 $? 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 $? 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/extra/Makefile.am b/extra/Makefile.am index fdbd383038..fb23caf1bc 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -1,26 +1,15 @@ # -# Copyright 2004-2016 the Pacemaker project contributors +# Copyright 2004-2019 the Pacemaker project contributors # # The version control history for this file may have further details. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = alerts resources logrotate +SUBDIRS = alerts resources logrotate -mibdir = $(datadir)/snmp/mibs -mib_DATA = PCMK-MIB.txt +mibdir = $(datadir)/snmp/mibs +dist_mib_DATA = PCMK-MIB.txt diff --git a/extra/alerts/Makefile.am b/extra/alerts/Makefile.am index 333e099772..e798ae9d54 100644 --- a/extra/alerts/Makefile.am +++ b/extra/alerts/Makefile.am @@ -1,24 +1,15 @@ # -# Copyright 2016 the Pacemaker project contributors +# Copyright 2016-2019 the Pacemaker project contributors # # The version control history for this file may have further details. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in -samplesdir = $(datadir)/$(PACKAGE)/alerts/ -samples_DATA = alert_file.sh.sample alert_smtp.sh.sample alert_snmp.sh.sample +samplesdir = $(datadir)/$(PACKAGE)/alerts/ +dist_samples_DATA = alert_file.sh.sample \ + alert_smtp.sh.sample \ + alert_snmp.sh.sample diff --git a/extra/logrotate/Makefile.am b/extra/logrotate/Makefile.am index 521f253724..cafd0d54cb 100644 --- a/extra/logrotate/Makefile.am +++ b/extra/logrotate/Makefile.am @@ -1,24 +1,13 @@ # -# Copyright 2014 the Pacemaker project contributors +# Copyright 2014-2019 the Pacemaker project contributors # # The version control history for this file may have further details. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in -logrotatedir = $(sysconfdir)/logrotate.d -logrotate_DATA = pacemaker +logrotatedir = $(sysconfdir)/logrotate.d +logrotate_DATA = pacemaker diff --git a/extra/resources/Makefile.am b/extra/resources/Makefile.am index 8c31d2cb56..fcfa61b64a 100644 --- a/extra/resources/Makefile.am +++ b/extra/resources/Makefile.am @@ -1,57 +1,43 @@ -# Makefile.am for OCF RAs # -# Author: Andrew Beekhof -# Copyright 2008-2018 the Pacemaker project contributors +# Copyright 2008-2019 the Pacemaker project contributors # # The version control history for this file may have further details. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # + include $(top_srcdir)/Makefile.common EXTRA_DIST = $(ocf_SCRIPTS) -ocfdir = @OCF_RA_DIR@/pacemaker - -ocf_SCRIPTS = ClusterMon \ - controld \ - Dummy \ - HealthCPU \ - HealthIOWait \ - HealthSMART \ - ifspeed \ - o2cb \ - ping \ - pingd \ - Stateful \ - SysInfo \ - SystemHealth \ - attribute \ - remote +ocfdir = @OCF_RA_DIR@/pacemaker +dist_ocf_SCRIPTS = attribute \ + controld \ + Dummy \ + HealthCPU \ + HealthIOWait \ + ping \ + pingd \ + remote \ + Stateful \ + SystemHealth +ocf_SCRIPTS = ClusterMon \ + HealthSMART \ + ifspeed \ + o2cb \ + SysInfo if BUILD_XML_HELP -man7_MANS = $(ocf_SCRIPTS:%=ocf_pacemaker_%.7) +man7_MANS = $(ocf_SCRIPTS:%=ocf_pacemaker_%.7) $(dist_ocf_SCRIPTS:%=ocf_pacemaker_%.7) DBOOK_OPTS = --stringparam command.prefix ocf_pacemaker_ --stringparam variable.prefix OCF_RESKEY_ --param man.vol 7 ocf_pacemaker_%.xml: % $(AM_V_GEN)OCF_FUNCTIONS=/dev/null OCF_ROOT=$(OCF_ROOT_DIR) $(abs_builddir)/$< meta-data > $@ endif clean-generic: - rm -f $(man7_MANS) $(ocf_SCRIPTS:%=%.xml) *~ - + rm -f $(man7_MANS) $(ocf_SCRIPTS:%=%.xml) $(dist_ocf_SCRIPTS:%=%.xml) *~ diff --git a/maint/Makefile.am b/maint/Makefile.am index d2e53d9963..87d37bf230 100644 --- a/maint/Makefile.am +++ b/maint/Makefile.am @@ -1,16 +1,17 @@ # # Copyright 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. # CLEANFILES = testcc EXTRA_SCRIPTS = bumplibs.sh \ travisci_build_coverity_scan.sh EXTRA_PROGRAMS = testcc +EXTRA_DIST = README nodist_testcc_SOURCES = testcc.cc diff --git a/tools/Makefile.am b/tools/Makefile.am index 655e5c7816..c91747a33a 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,151 +1,153 @@ # # 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. # include $(top_srcdir)/Makefile.common if BUILD_SYSTEMD systemdunit_DATA = crm_mon.service endif noinst_HEADERS = crm_mon.h crm_resource.h pcmkdir = $(datadir)/$(PACKAGE) pcmk_DATA = report.common report.collector sbin_SCRIPTS = crm_report crm_standby crm_master crm_failcount if BUILD_CIBSECRETS sbin_SCRIPTS += cibsecret endif -EXTRA_DIST = $(sbin_SCRIPTS) stonith_admin.8.inc + +EXTRA_DIST = crm_mon.sysconfig \ + crm_mon.8.inc \ + stonith_admin.8.inc sbin_PROGRAMS = attrd_updater \ cibadmin \ crmadmin \ crm_simulate \ crm_attribute \ crm_diff \ crm_error \ crm_mon \ crm_node \ crm_resource \ crm_rule \ crm_shadow \ crm_verify \ crm_ticket \ iso8601 \ stonith_admin if BUILD_SERVICELOG sbin_PROGRAMS += notifyServicelogEvent endif if BUILD_OPENIPMI_SERVICELOG sbin_PROGRAMS += ipmiservicelogd endif ## SOURCES MAN8DEPS = crm_attribute crm_node crmadmin_SOURCES = crmadmin.c crmadmin_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_error_SOURCES = crm_error.c crm_error_LDADD = $(top_builddir)/lib/common/libcrmcommon.la cibadmin_SOURCES = cibadmin.c cibadmin_LDADD = $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_shadow_SOURCES = crm_shadow.c crm_shadow_LDADD = $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_node_SOURCES = crm_node.c crm_node_LDADD = $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_simulate_SOURCES = crm_simulate.c crm_simulate_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/pacemaker/libpacemaker.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_diff_SOURCES = crm_diff.c crm_diff_LDADD = $(top_builddir)/lib/common/libcrmcommon.la crm_mon_SOURCES = crm_mon.c crm_mon_curses.c crm_mon_print.c crm_mon_runtime.c crm_mon_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/fencing/libstonithd.la \ $(top_builddir)/lib/pacemaker/libpacemaker.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la \ $(CURSESLIBS) -# Arguments could be made that this should live in crm/pengine crm_verify_SOURCES = crm_verify.c crm_verify_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/pacemaker/libpacemaker.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_attribute_SOURCES = crm_attribute.c crm_attribute_LDADD = $(top_builddir)/lib/cluster/libcrmcluster.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_resource_SOURCES = crm_resource.c crm_resource_ban.c crm_resource_runtime.c crm_resource_print.c crm_resource_LDADD = $(top_builddir)/lib/pengine/libpe_rules.la \ $(top_builddir)/lib/fencing/libstonithd.la \ $(top_builddir)/lib/lrmd/liblrmd.la \ $(top_builddir)/lib/services/libcrmservice.la \ $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/pacemaker/libpacemaker.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la crm_rule_SOURCES = crm_rule.c crm_rule_LDADD = $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/pengine/libpe_rules.la \ $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/common/libcrmcommon.la iso8601_SOURCES = iso8601.c iso8601_LDADD = $(top_builddir)/lib/common/libcrmcommon.la attrd_updater_SOURCES = attrd_updater.c attrd_updater_LDADD = $(top_builddir)/lib/common/libcrmcommon.la crm_ticket_SOURCES = crm_ticket.c crm_ticket_LDADD = $(top_builddir)/lib/pengine/libpe_rules.la \ $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/pacemaker/libpacemaker.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/common/libcrmcommon.la stonith_admin_SOURCES = stonith_admin.c stonith_admin_LDADD = $(top_builddir)/lib/common/libcrmcommon.la \ $(top_builddir)/lib/cib/libcib.la \ $(top_builddir)/lib/pengine/libpe_status.la \ $(top_builddir)/lib/fencing/libstonithd.la if BUILD_SERVICELOG notifyServicelogEvent_SOURCES = notifyServicelogEvent.c notifyServicelogEvent_CFLAGS = $(SERVICELOG_CFLAGS) notifyServicelogEvent_LDADD = $(top_builddir)/lib/common/libcrmcommon.la $(SERVICELOG_LIBS) endif if BUILD_OPENIPMI_SERVICELOG ipmiservicelogd_SOURCES = ipmiservicelogd.c ipmiservicelogd_CFLAGS = $(OPENIPMI_SERVICELOG_CFLAGS) $(SERVICELOG_CFLAGS) ipmiservicelogd_LDFLAGS = $(top_builddir)/lib/common/libcrmcommon.la $(OPENIPMI_SERVICELOG_LIBS) $(SERVICELOG_LIBS) endif CLEANFILES = $(man8_MANS) diff --git a/xml/Makefile.am b/xml/Makefile.am index 4ae2d67af4..4584d60262 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -1,217 +1,228 @@ # # Copyright 2004-2019 the Pacemaker project contributors # # The version control history for this file may have further details. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # MAINTAINERCLEANFILES = Makefile.in APIdir = $(CRM_SCHEMA_DIRECTORY)/api RNGdir = $(CRM_SCHEMA_DIRECTORY) xsltdir = $(RNGdir) dist_xslt_DATA = $(top_srcdir)/xml/upgrade-1.3.xsl \ $(top_srcdir)/xml/upgrade-2.10.xsl \ $(top_srcdir)/xml/upgrade-*enter.xsl \ $(top_srcdir)/xml/upgrade-*leave.xsl -noinst_DATA = context-of.xsl - # See Readme.md for details on updating schema files # Sorted list of available numeric RNG versions, # extracted 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) \ ) API_numeric_versions = $(call numeric_versions,${API_files}) RNG_numeric_versions = $(call numeric_versions,${RNG_files}) # The highest numeric version API_max ?= $(lastword $(API_numeric_versions)) RNG_max ?= $(lastword $(RNG_numeric_versions)) # A sorted list of all API and RNG versions (numeric and "next") API_versions = next $(API_numeric_versions) API_request_base = command-output stonith_admin version API_base = $(API_request_base) item status API_files = $(foreach base,$(API_base),$(wildcard api/$(base)*.rng)) RNG_versions = next $(RNG_numeric_versions) RNG_version_pairs = $(call version_pairs,${RNG_numeric_versions}) RNG_version_pairs_cnt = $(words ${RNG_version_pairs}) RNG_version_pairs_last = $(call version_pairs_last,${RNG_version_pairs_cnt},${RNG_version_pairs}) API_generated = api/api-result.rng $(foreach base,$(API_versions),api/api-result-$(base).rng) RNG_generated = pacemaker.rng $(foreach base,$(RNG_versions),pacemaker-$(base).rng) versions.rng RNG_cfg_base = options nodes resources constraints fencing acls tags alerts RNG_base = cib $(RNG_cfg_base) status score rule nvset RNG_files = $(foreach base,$(RNG_base),$(wildcard $(base).rng $(base)-*.rng)) # List of non-Pacemaker RNGs RNG_extra = crm_mon.rng dist_API_DATA = $(API_files) dist_RNG_DATA = $(RNG_files) $(RNG_extra) nodist_API_DATA = $(API_generated) nodist_RNG_DATA = $(RNG_generated) -EXTRA_DIST = best-match.sh +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 versions: echo "Max: $(RNG_max)" echo "Available: $(RNG_versions)" api-versions: echo "Max: $(API_max)" echo "Available: $(API_versions)" versions.rng: Makefile.am echo " RNG $@" echo '' > $@ echo '' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' none' >> $@ echo ' pacemaker-0.6' >> $@ echo ' transitional-0.6' >> $@ echo ' pacemaker-0.7' >> $@ echo ' pacemaker-1.1' >> $@ for rng in $(RNG_versions); do echo " pacemaker-$$rng" >> $@; done echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo '' >> $@ api/api-result.rng: api/api-result-$(API_max).rng echo " RNG $@" cp $(top_builddir)/xml/$< $@ pacemaker.rng: pacemaker-$(RNG_max).rng echo " RNG $@" cp $(top_builddir)/xml/$< $@ api/api-result-%.rng: $(API_files) Makefile.am echo " RNG $@" echo '' > $@ echo '' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ for rng in $(API_request_base); do $(top_srcdir)/xml/best-match.sh api/$$rng $(*) $(@) " " || :; done echo ' ' >> $@ echo ' ' >> $@ $(top_srcdir)/xml/best-match.sh api/status $(*) $(@) " " || : echo ' ' >> $@ echo ' ' >> $@ echo '' >> $@ pacemaker-%.rng: $(RNG_files) best-match.sh Makefile.am echo " RNG $@" echo '' > $@ echo '' >> $@ echo ' ' >> $@ echo ' ' >> $@ $(top_srcdir)/xml/best-match.sh cib $(*) $(@) " " echo ' ' >> $@ echo ' ' >> $@ for rng in $(RNG_cfg_base); do $(top_srcdir)/xml/best-match.sh $$rng $(*) $(@) " " || :; done echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ $(top_srcdir)/xml/best-match.sh status $(*) $(@) " " echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo ' ' >> $@ echo '' >> $@ # 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 "$${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 $(RNG_max)" $(call version_diff,${RNG_version_pairs_last}) fulldiff: best-match.sh @echo "# Comparing all changes across all the subsequent increments" $(call version_diff,${RNG_version_pairs}) CLEANFILES = $(API_generated) $(RNG_generated)