blob: 9c47afa9ef6f28c1dc83644da8fa0174e7c09f2c [file] [log] [blame]
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00001## Process this file with automake to create Makefile.in
2## Configure input file for elfutils.
3##
Mark Wielaard193396a2015-12-31 22:08:23 +01004## Copyright (C) 1996-2006, 2008, 2009, 2015 Red Hat, Inc.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00005##
Mark Wielaardde2ed972012-06-05 17:15:16 +02006## This file is part of elfutils.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00007##
Mark Wielaardde2ed972012-06-05 17:15:16 +02008## This file is free software; you can redistribute it and/or modify
9## it under the terms of the GNU General Public License as published by
10## the Free Software Foundation; either version 3 of the License, or
11## (at your option) any later version.
12##
13## elfutils is distributed in the hope that it will be useful, but
Ulrich Drepper361df7d2006-04-04 21:38:57 +000014## WITHOUT ANY WARRANTY; without even the implied warranty of
Mark Wielaardde2ed972012-06-05 17:15:16 +020015## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16## GNU General Public License for more details.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000017##
Mark Wielaardde2ed972012-06-05 17:15:16 +020018## You should have received a copy of the GNU General Public License
19## along with this program. If not, see <http://www.gnu.org/licenses/>.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000020##
21ACLOCAL_AMFLAGS = -I m4
22
Mark Wielaard193396a2015-12-31 22:08:23 +010023# automake already tells which subdir is being entered.
24# Don't make make repeat.
25AM_MAKEFLAGS = --no-print-directory
26
Roland McGrathfbc72452008-12-16 17:03:03 -080027pkginclude_HEADERS = version.h
28
Dmitry V. Levin5264bc02020-12-15 17:40:38 +030029SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \
Mark Wielaardf7f0cdc2020-06-19 19:41:08 +020030 libasm debuginfod src po doc tests
Aaron Merey288f6b12019-10-28 13:29:26 -040031
Mark Wielaardde2ed972012-06-05 17:15:16 +020032EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
33 COPYING COPYING-GPLV2 COPYING-LGPLV3
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000034
Roland McGrath9365d2c2005-11-18 23:55:47 +000035# Make sure the test install uses lib64 when $LIB will yield lib64.
36# Make sure the test build uses the same compiler, which on e.g. ppc64
37# determines which platform we are actually testing.
Mark Wielaarde3e3ee22012-10-01 16:14:12 +020038# Run all tests under valgrind.
Mark Wielaard2b250b72015-05-21 23:36:51 +020039AM_DISTCHECK_CONFIGURE_FLAGS = \
Roland McGrath9365d2c2005-11-18 23:55:47 +000040 --libdir=`echo $(libdir) | sed "s,^$(exec_prefix),$$dc_install_base,"`\
Mark Wielaard2b250b72015-05-21 23:36:51 +020041 --enable-valgrind --enable-sanitize-undefined \
Roland McGrath9365d2c2005-11-18 23:55:47 +000042 CC="$(CC)"
43
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000044distcheck-hook:
45 chmod -R u+w $(distdir)
46
47rpm: dist
Ulrich Drepper01f73702009-01-22 23:32:11 -080048 rpmbuild -ts --sign elfutils-@PACKAGE_VERSION@.tar.bz2
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000049
Dmitry V. Levin2a16a0f2021-01-12 08:00:00 +000050if GCOV
51
52COVERAGE_OUTPUT_FILE = $(PACKAGE_NAME).lcov
53COVERAGE_OUTPUT_DIRECTORY = coverage
54COVERAGE_OUTPUT_INDEX_HTML = $(COVERAGE_OUTPUT_DIRECTORY)/index.html
55COVERAGE_TITLE = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
56
57COVERAGE_DIRS = $(filter-out tests,$(SUBDIRS))
58src_COVERAGE_DIRS = $(patsubst %,$(srcdir)/%,$(COVERAGE_DIRS))
59build_COVERAGE_DIRS = $(patsubst %,$(builddir)/%,$(COVERAGE_DIRS))
60all_COVERAGE_DIRS = $(sort $(src_COVERAGE_DIRS) $(build_COVERAGE_DIRS))
61LCOV_DIRS_ARGS = $(patsubst %,--directory=%,$(all_COVERAGE_DIRS))
62
63CLEANFILES = $(COVERAGE_OUTPUT_FILE)
64
65.PHONY: coverage coverage-clean
66
67clean-local: coverage-clean
68distclean-local: coverage-clean
69
70coverage-clean:
71 -rm -rf $(COVERAGE_OUTPUT_DIRECTORY)
72
73coverage: $(COVERAGE_OUTPUT_INDEX_HTML)
74 @echo 'file://$(abs_builddir)/$(COVERAGE_OUTPUT_INDEX_HTML)'
75
76$(COVERAGE_OUTPUT_INDEX_HTML): $(COVERAGE_OUTPUT_FILE)
77 LC_ALL=C $(GENHTML) \
78 --legend \
79 --show-details \
80 --rc=genhtml_branch_coverage=1 \
81 --title='$(COVERAGE_TITLE)' \
82 --prefix='$(abspath $(abs_srcdir))' \
83 --prefix='$(realpath $(abs_srcdir))' \
84 --prefix='$(abspath $(abs_builddir)/..)' \
85 --prefix='$(realpath $(abs_builddir)/..)' \
86 --output-directory='$(COVERAGE_OUTPUT_DIRECTORY)' \
87 $<
88
89$(COVERAGE_OUTPUT_FILE):
90 $(LCOV) \
91 --capture \
92 --no-external \
93 --no-checksum \
94 --rc=lcov_branch_coverage=1 \
95 --gcov-tool='$(GCOV)' \
96 --output-file='$@' \
97 $(LCOV_DIRS_ARGS)
98
99endif
100
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000101# Tell version 3.79 and up of GNU make to not build goals in this
102# directory in parallel.
103.NOTPARALLEL: