xref: /third_party/elfutils/Makefile.am (revision da0c48c4)
1da0c48c4Sopenharmony_ci## Process this file with automake to create Makefile.in
2da0c48c4Sopenharmony_ci## Configure input file for elfutils.
3da0c48c4Sopenharmony_ci##
4da0c48c4Sopenharmony_ci## Copyright (C) 1996-2006, 2008, 2009, 2015 Red Hat, Inc.
5da0c48c4Sopenharmony_ci##
6da0c48c4Sopenharmony_ci## This file is part of elfutils.
7da0c48c4Sopenharmony_ci##
8da0c48c4Sopenharmony_ci## This file is free software; you can redistribute it and/or modify
9da0c48c4Sopenharmony_ci## it under the terms of the GNU General Public License as published by
10da0c48c4Sopenharmony_ci## the Free Software Foundation; either version 3 of the License, or
11da0c48c4Sopenharmony_ci## (at your option) any later version.
12da0c48c4Sopenharmony_ci##
13da0c48c4Sopenharmony_ci## elfutils is distributed in the hope that it will be useful, but
14da0c48c4Sopenharmony_ci## WITHOUT ANY WARRANTY; without even the implied warranty of
15da0c48c4Sopenharmony_ci## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16da0c48c4Sopenharmony_ci## GNU General Public License for more details.
17da0c48c4Sopenharmony_ci##
18da0c48c4Sopenharmony_ci## You should have received a copy of the GNU General Public License
19da0c48c4Sopenharmony_ci## along with this program.  If not, see <http://www.gnu.org/licenses/>.
20da0c48c4Sopenharmony_ci##
21da0c48c4Sopenharmony_ciACLOCAL_AMFLAGS = -I m4
22da0c48c4Sopenharmony_ci
23da0c48c4Sopenharmony_ci# automake already tells which subdir is being entered.
24da0c48c4Sopenharmony_ci# Don't make make repeat.
25da0c48c4Sopenharmony_ciAM_MAKEFLAGS = --no-print-directory
26da0c48c4Sopenharmony_ci
27da0c48c4Sopenharmony_cipkginclude_HEADERS = version.h
28da0c48c4Sopenharmony_ci
29da0c48c4Sopenharmony_ciSUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \
30da0c48c4Sopenharmony_ci	  libasm debuginfod src po doc tests
31da0c48c4Sopenharmony_ci
32da0c48c4Sopenharmony_ciEXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
33da0c48c4Sopenharmony_ci	     COPYING COPYING-GPLV2 COPYING-LGPLV3
34da0c48c4Sopenharmony_ci
35da0c48c4Sopenharmony_ci# Make sure the test install uses lib64 when $LIB will yield lib64.
36da0c48c4Sopenharmony_ci# Make sure the test build uses the same compiler, which on e.g. ppc64
37da0c48c4Sopenharmony_ci# determines which platform we are actually testing.
38da0c48c4Sopenharmony_ci# Run all tests under valgrind.
39da0c48c4Sopenharmony_ciAM_DISTCHECK_CONFIGURE_FLAGS = \
40da0c48c4Sopenharmony_ci	--libdir=`echo $(libdir) | sed "s,^$(exec_prefix),$$dc_install_base,"`\
41da0c48c4Sopenharmony_ci	CC="$(CC)"
42da0c48c4Sopenharmony_ci
43da0c48c4Sopenharmony_cidistcheck-hook:
44da0c48c4Sopenharmony_ci	chmod -R u+w $(distdir)
45da0c48c4Sopenharmony_ci
46da0c48c4Sopenharmony_cirpm: dist
47da0c48c4Sopenharmony_ci	rpmbuild -ts elfutils-@PACKAGE_VERSION@.tar.bz2
48da0c48c4Sopenharmony_ci
49da0c48c4Sopenharmony_ciif GCOV
50da0c48c4Sopenharmony_ci
51da0c48c4Sopenharmony_ciCOVERAGE_OUTPUT_FILE = $(PACKAGE_NAME).lcov
52da0c48c4Sopenharmony_ciCOVERAGE_OUTPUT_DIRECTORY = coverage
53da0c48c4Sopenharmony_ciCOVERAGE_OUTPUT_INDEX_HTML = $(COVERAGE_OUTPUT_DIRECTORY)/index.html
54da0c48c4Sopenharmony_ciCOVERAGE_TITLE = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
55da0c48c4Sopenharmony_ci
56da0c48c4Sopenharmony_ciCOVERAGE_DIRS = $(filter-out tests,$(SUBDIRS))
57da0c48c4Sopenharmony_cisrc_COVERAGE_DIRS = $(patsubst %,$(srcdir)/%,$(COVERAGE_DIRS))
58da0c48c4Sopenharmony_cibuild_COVERAGE_DIRS = $(patsubst %,$(builddir)/%,$(COVERAGE_DIRS))
59da0c48c4Sopenharmony_ciall_COVERAGE_DIRS = $(sort $(src_COVERAGE_DIRS) $(build_COVERAGE_DIRS))
60da0c48c4Sopenharmony_ciLCOV_DIRS_ARGS = $(patsubst %,--directory=%,$(all_COVERAGE_DIRS))
61da0c48c4Sopenharmony_ci
62da0c48c4Sopenharmony_ciCLEANFILES = $(COVERAGE_OUTPUT_FILE)
63da0c48c4Sopenharmony_ci
64da0c48c4Sopenharmony_ci.PHONY: coverage coverage-clean
65da0c48c4Sopenharmony_ci
66da0c48c4Sopenharmony_ciclean-local: coverage-clean
67da0c48c4Sopenharmony_cidistclean-local: coverage-clean
68da0c48c4Sopenharmony_ci
69da0c48c4Sopenharmony_cicoverage-clean:
70da0c48c4Sopenharmony_ci	-rm -rf $(COVERAGE_OUTPUT_DIRECTORY)
71da0c48c4Sopenharmony_ci
72da0c48c4Sopenharmony_cicoverage: $(COVERAGE_OUTPUT_INDEX_HTML)
73da0c48c4Sopenharmony_ci	@echo 'file://$(abs_builddir)/$(COVERAGE_OUTPUT_INDEX_HTML)'
74da0c48c4Sopenharmony_ci
75da0c48c4Sopenharmony_ci$(COVERAGE_OUTPUT_INDEX_HTML): $(COVERAGE_OUTPUT_FILE)
76da0c48c4Sopenharmony_ci	LC_ALL=C $(GENHTML) \
77da0c48c4Sopenharmony_ci		--legend \
78da0c48c4Sopenharmony_ci		--show-details \
79da0c48c4Sopenharmony_ci		--rc=genhtml_branch_coverage=1 \
80da0c48c4Sopenharmony_ci		--title='$(COVERAGE_TITLE)' \
81da0c48c4Sopenharmony_ci		--prefix='$(abspath $(abs_srcdir))' \
82da0c48c4Sopenharmony_ci		--prefix='$(realpath $(abs_srcdir))' \
83da0c48c4Sopenharmony_ci		--prefix='$(abspath $(abs_builddir)/..)' \
84da0c48c4Sopenharmony_ci		--prefix='$(realpath $(abs_builddir)/..)' \
85da0c48c4Sopenharmony_ci		--output-directory='$(COVERAGE_OUTPUT_DIRECTORY)' \
86da0c48c4Sopenharmony_ci		$<
87da0c48c4Sopenharmony_ci
88da0c48c4Sopenharmony_ci$(COVERAGE_OUTPUT_FILE):
89da0c48c4Sopenharmony_ci	$(LCOV) \
90da0c48c4Sopenharmony_ci		--capture \
91da0c48c4Sopenharmony_ci		--no-external \
92da0c48c4Sopenharmony_ci		--no-checksum \
93da0c48c4Sopenharmony_ci		--rc=lcov_branch_coverage=1 \
94da0c48c4Sopenharmony_ci		--gcov-tool='$(GCOV)' \
95da0c48c4Sopenharmony_ci		--output-file='$@' \
96da0c48c4Sopenharmony_ci		$(LCOV_DIRS_ARGS)
97da0c48c4Sopenharmony_ci
98da0c48c4Sopenharmony_ciendif
99da0c48c4Sopenharmony_ci
100da0c48c4Sopenharmony_ci# Tell version 3.79 and up of GNU make to not build goals in this
101da0c48c4Sopenharmony_ci# directory in parallel.
102da0c48c4Sopenharmony_ci.NOTPARALLEL:
103