dhodovsk / source-git / pacemaker

Forked from source-git/pacemaker 3 years ago
Clone

Blame Makefile.am

rpm-build 3ee90c
#
rpm-build 3ee90c
# Copyright 2003-2019 the Pacemaker project contributors
rpm-build 3ee90c
#
rpm-build 3ee90c
# The version control history for this file may have further details.
rpm-build 3ee90c
#
rpm-build 3ee90c
# This source code is licensed under the GNU General Public License version 2
rpm-build 3ee90c
# or later (GPLv2+) WITHOUT ANY WARRANTY.
rpm-build 3ee90c
#
rpm-build 3ee90c
rpm-build 3ee90c
EXTRA_DIST		= CONTRIBUTING.md	\
rpm-build 3ee90c
			  GNUmakefile		\
rpm-build 3ee90c
			  INSTALL.md		\
rpm-build 3ee90c
			  README.markdown	\
rpm-build 3ee90c
			  autogen.sh		\
rpm-build 3ee90c
			  m4/gnulib-cache.m4	\
rpm-build 3ee90c
			  m4/gnulib-tool.m4	\
rpm-build 3ee90c
			  rpm/rpmlintrc		\
rpm-build 3ee90c
			  rpm/pacemaker.spec.in
rpm-build 3ee90c
rpm-build 3ee90c
DISTCLEANFILES		= config.status
rpm-build 3ee90c
rpm-build 3ee90c
MAINTAINERCLEANFILES	= Makefile.in		\
rpm-build 3ee90c
			  aclocal.m4		\
rpm-build 3ee90c
			  config.guess		\
rpm-build 3ee90c
			  config.sub		\
rpm-build 3ee90c
			  configure		\
rpm-build 3ee90c
			  depcomp		\
rpm-build 3ee90c
			  install-sh		\
rpm-build 3ee90c
			  ltmain.sh		\
rpm-build 3ee90c
			  missing		\
rpm-build 3ee90c
			  py-compile		\
rpm-build 3ee90c
			  test-driver
rpm-build 3ee90c
rpm-build 3ee90c
# Disable building Publican documentation when doing "make distcheck", because
rpm-build 3ee90c
# some of our book sources are in the source directory, while others are
rpm-build 3ee90c
# dynamically generated in the build directory, and publican can't handle that.
rpm-build 3ee90c
#
rpm-build 3ee90c
# In a non-VPATH build, doc isn't entered with a plain "make" because the
rpm-build 3ee90c
# GNUmakefile sets "core" as the default target. However in a VPATH build,
rpm-build 3ee90c
# there is no GNUmakefile, so "all" becomes the default target.
rpm-build 3ee90c
#
rpm-build 3ee90c
# Also, don't try to install files outside the build directory.
rpm-build 3ee90c
#
rpm-build 3ee90c
# @TODO To support VPATH builds for Publican, we could use the same "copy all
rpm-build 3ee90c
# static inputs into the build tree" trick that xml/Makefile.am uses for
rpm-build 3ee90c
# static schema files.
rpm-build 3ee90c
AM_DISTCHECK_CONFIGURE_FLAGS	= --with-brand=""					\
rpm-build 3ee90c
				  --prefix="$$dc_install_base/usr"			\
rpm-build 3ee90c
				  --sysconfdir="$$dc_install_base/etc"			\
rpm-build 3ee90c
				  --with-initdir="$$dc_install_base/etc/init.d"		\
rpm-build 3ee90c
				  --with-ocfdir="$$dc_install_base/usr/lib/ocf"		\
rpm-build 3ee90c
				  --with-systemdsystemunitdir="$$dc_install_base$(systemdsystemunitdir)"
rpm-build 3ee90c
rpm-build 3ee90c
# Only these will get installed with a plain "make install"
rpm-build 3ee90c
CORE_INSTALL	= replace include lib daemons tools xml
rpm-build 3ee90c
rpm-build 3ee90c
# Only these will get built with a plain "make" or "make clean"
rpm-build 3ee90c
CORE		= $(CORE_INSTALL) cts
rpm-build 3ee90c
rpm-build 3ee90c
SUBDIRS	= $(CORE) doc extra maint
rpm-build 3ee90c
rpm-build 3ee90c
AM_CPPFLAGS		= -I$(top_srcdir)/include
rpm-build 3ee90c
rpm-build 3ee90c
doc_DATA = README.markdown COPYING
rpm-build 3ee90c
rpm-build 3ee90c
licensedir              = $(docdir)/licenses/
rpm-build 3ee90c
dist_license_DATA	= $(wildcard licenses/*)
rpm-build 3ee90c
rpm-build 3ee90c
# Scratch file for ad-hoc testing
rpm-build 3ee90c
EXTRA_PROGRAMS		= scratch
rpm-build 3ee90c
nodist_scratch_SOURCES	= scratch.c
rpm-build 3ee90c
scratch_LDADD		= $(top_builddir)/lib/common/libcrmcommon.la
rpm-build 3ee90c
rpm-build 3ee90c
core:
rpm-build 3ee90c
	@echo "Building only core components and tests: $(CORE)"
rpm-build 3ee90c
	@for subdir in $(CORE); do \
rpm-build 3ee90c
		echo "Building $$subdir"; \
rpm-build 3ee90c
		$(MAKE) $(AM_MAKEFLAGS) -C $$subdir all || exit 1; \
rpm-build 3ee90c
	done
rpm-build 3ee90c
rpm-build 3ee90c
core-install:
rpm-build 3ee90c
	@echo "Installing only core components: $(CORE_INSTALL)"
rpm-build 3ee90c
	@for subdir in $(CORE_INSTALL); do \
rpm-build 3ee90c
	    echo "Installing $$subdir"; \
rpm-build 3ee90c
	    $(MAKE) $(AM_MAKEFLAGS) -C $$subdir install || exit 1; \
rpm-build 3ee90c
	done
rpm-build 3ee90c
rpm-build 3ee90c
core-clean:
rpm-build 3ee90c
	@echo "Cleaning only core components and tests: $(CORE)"
rpm-build 3ee90c
	@for subdir in $(CORE); do \
rpm-build 3ee90c
		echo "Cleaning $$subdir"; \
rpm-build 3ee90c
		$(MAKE) $(AM_MAKEFLAGS) -C $$subdir clean || exit 1; \
rpm-build 3ee90c
	done
rpm-build 3ee90c
rpm-build 3ee90c
install-exec-local:
rpm-build 3ee90c
	$(INSTALL) -d -m 750 $(DESTDIR)/$(PACEMAKER_CONFIG_DIR)
rpm-build 3ee90c
	$(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CONFIG_DIR)
rpm-build 3ee90c
	$(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CORE_DIR)
rpm-build 3ee90c
	$(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_BLACKBOX_DIR)
rpm-build 3ee90c
	$(INSTALL) -d -m 770 $(DESTDIR)/$(CRM_LOG_DIR)
rpm-build 3ee90c
	$(INSTALL) -d -m 770 $(DESTDIR)/$(CRM_BUNDLE_DIR)
rpm-build 3ee90c
	-chgrp $(CRM_DAEMON_GROUP) $(DESTDIR)/$(PACEMAKER_CONFIG_DIR)
rpm-build 3ee90c
	-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CONFIG_DIR)
rpm-build 3ee90c
	-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CORE_DIR)
rpm-build 3ee90c
	-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BLACKBOX_DIR)
rpm-build 3ee90c
	-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_LOG_DIR)
rpm-build 3ee90c
	-chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BUNDLE_DIR)
rpm-build 3ee90c
# Use chown because the user/group may not exist
rpm-build 3ee90c
rpm-build 3ee90c
clean-generic:
rpm-build 3ee90c
	-rm -f *.tar.bz2 *.sed
rpm-build 3ee90c
rpm-build 3ee90c
PACKAGE         ?= pacemaker
rpm-build 3ee90c
rpm-build 3ee90c
# In a normal build, this file is included by GNUmakefile, which serves as the
rpm-build 3ee90c
# "real" makefile. But in a VPATH build, GNUmakefile won't exist in the build
rpm-build 3ee90c
# tree, and this file will be the "real" makefile. EXTRA_CLEAN_TARGETS handles
rpm-build 3ee90c
# both cases: GNUmakefile defines it before including this file, so the
rpm-build 3ee90c
# clean-local target can clean up files created by GNUmakefile targets.
rpm-build 3ee90c
# If this file is used alone, the variable will be undefined.
rpm-build 3ee90c
clean-local: $(EXTRA_CLEAN_TARGETS)
rpm-build 3ee90c
	-rm -f scratch $(builddir)/$(PACKAGE)-*.tar.gz
rpm-build 3ee90c
rpm-build 3ee90c
distclean-local:
rpm-build 3ee90c
	-rm -rf libltdl autom4te.cache