blob: fdce3cf9fda82ff505111a8cd83ef5654e832293 [file] [log] [blame]
njn25e49d8e72002-09-23 09:36:25 +00001
florianef0bca62012-05-06 03:37:25 +00002AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2
sewardj31f6cb52003-03-01 01:26:55 +00003
njn3e986b22004-11-30 10:43:45 +00004include $(top_srcdir)/Makefile.all.am
nethercote4388a402004-09-01 23:20:49 +00005
sewardjb262ff42014-11-25 11:43:54 +00006TOOLS = memcheck \
7 cachegrind \
8 callgrind \
9 massif \
10 lackey \
11 none \
12 helgrind \
13 drd
14
15EXP_TOOLS = exp-sgcheck \
16 exp-bbv \
17 exp-dhat
sewardjb5f6f512005-03-10 23:59:00 +000018
njn3f7e9112005-06-19 05:43:21 +000019# Put docs last because building the HTML is slow and we want to get
20# everything else working before we try it.
njn8b68b642009-06-24 00:37:09 +000021SUBDIRS = \
22 include \
23 VEX \
24 coregrind \
25 . \
26 $(TOOLS) \
27 $(EXP_TOOLS) \
mjwaeacd282014-03-11 19:30:32 +000028 shared \
njn8b68b642009-06-24 00:37:09 +000029 tests \
30 perf \
sewardj3b290482011-05-06 21:02:55 +000031 gdbserver_tests \
florianbb913cd2012-08-28 16:50:39 +000032 memcheck/tests/vbit-test \
njn8b68b642009-06-24 00:37:09 +000033 auxprogs \
34 mpi \
sewardj8eb8bab2015-07-21 14:44:28 +000035 solaris \
njn8b68b642009-06-24 00:37:09 +000036 docs
njn1d0825f2006-03-27 11:37:07 +000037DIST_SUBDIRS = $(SUBDIRS)
sewardjde4a1d02002-03-22 01:27:54 +000038
njna63e2d72003-06-12 14:13:05 +000039SUPP_FILES = \
sewardj99774242006-10-14 14:03:51 +000040 glibc-2.2.supp glibc-2.3.supp glibc-2.4.supp glibc-2.5.supp \
sewardj84eb4872008-06-03 20:58:46 +000041 glibc-2.6.supp glibc-2.7.supp glibc-2.X.supp.in \
sewardj6e9de462011-06-28 07:25:29 +000042 xfree-3.supp xfree-4.supp \
sewardj68c80c12007-11-18 14:40:02 +000043 glibc-2.34567-NPTL-helgrind.supp \
sewardjbbec7722007-11-25 14:08:53 +000044 glibc-2.2-LinuxThreads-helgrind.supp \
sewardj5744c022008-10-19 18:58:13 +000045 glibc-2.X-drd.supp \
sewardjd2f95a02011-05-11 16:04:28 +000046 exp-sgcheck.supp \
njnea2d6fd2010-07-01 00:20:20 +000047 darwin9.supp darwin9-drd.supp \
sewardja9b1e652011-07-11 20:52:10 +000048 darwin10.supp darwin10-drd.supp \
rhyskidd9090d2f2015-07-08 13:46:57 +000049 darwin11.supp darwin12.supp darwin13.supp darwin14.supp darwin15.supp \
Elliott Hughesa0664b92017-04-18 17:46:52 -070050 darwin16.supp \
sewardj8eb8bab2015-07-21 14:44:28 +000051 bionic.supp \
52 solaris11.supp solaris12.supp
njncfc000e2009-01-20 06:56:26 +000053DEFAULT_SUPP_FILES = @DEFAULT_SUPP@
gobry3b777892002-04-04 09:18:39 +000054
njn13e13192009-05-19 00:32:20 +000055# We include all the base .supp files in the distribution, but not
56# default.supp, as it is built from the base .supp files at compile-time.
njn254dafe2009-02-09 03:25:04 +000057dist_noinst_DATA = $(SUPP_FILES)
njn8b68b642009-06-24 00:37:09 +000058
tomd5f48262012-02-21 15:53:35 +000059vglibdir = $(pkglibdir)
60vglib_DATA = default.supp
gobry3b777892002-04-04 09:18:39 +000061
muellerbddd6072003-11-19 21:50:07 +000062pkgconfigdir = $(libdir)/pkgconfig
63pkgconfig_DATA = valgrind.pc
64
Elliott Hughesed398002017-06-21 14:41:24 -070065BUILT_SOURCES = default.supp include/vgversion.h valgrind.pc
njn13e13192009-05-19 00:32:20 +000066CLEANFILES = default.supp
daywalkerf5ef1852003-02-25 01:48:15 +000067
njncfc000e2009-01-20 06:56:26 +000068default.supp: $(DEFAULT_SUPP_FILES)
69 echo "# This is a generated file, composed of the following suppression rules:" > default.supp
70 echo "# " $(DEFAULT_SUPP_FILES) >> default.supp
mjwe2990202014-05-09 13:34:13 +000071 cat $^ >> default.supp
sewardjde4a1d02002-03-22 01:27:54 +000072
njn71fe3e62003-04-23 21:48:20 +000073## Preprend @PERL@ because tests/vg_regtest isn't executable
florian43c56332013-09-19 14:55:09 +000074## Ensure make exits with error if PERL fails or post_regtest_checks fails.
daywalkerc60b3a12003-04-23 16:39:31 +000075regtest: check
mjwe2990202014-05-09 13:34:13 +000076 $(top_srcdir)/gdbserver_tests/make_local_links $(GDB)
philippe6155d362012-03-25 10:54:59 +000077 if @PERL@ tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS) ; then \
florian43c56332013-09-19 14:55:09 +000078 tests/post_regtest_checks $(abs_top_srcdir) gdbserver_tests $(TOOLS) $(EXP_TOOLS); \
philippe6155d362012-03-25 10:54:59 +000079 else \
florian43c56332013-09-19 14:55:09 +000080 tests/post_regtest_checks $(abs_top_srcdir) gdbserver_tests $(TOOLS) $(EXP_TOOLS); \
philippe6155d362012-03-25 10:54:59 +000081 false; \
82 fi
florian43c56332013-09-19 14:55:09 +000083post-regtest-checks:
84 tests/post_regtest_checks $(abs_top_srcdir) gdbserver_tests $(TOOLS) $(EXP_TOOLS)
njnad4e8ab2008-02-10 22:19:58 +000085nonexp-regtest: check
florianbec5baf2011-11-08 20:16:09 +000086 @PERL@ tests/vg_regtest $(TOOLS)
sewardjbbec7722007-11-25 14:08:53 +000087exp-regtest: check
florianbec5baf2011-11-08 20:16:09 +000088 @PERL@ tests/vg_regtest gdbserver_tests $(EXP_TOOLS)
sewardj3b290482011-05-06 21:02:55 +000089# Nb: gdbserver_tests are put in exp-regtest rather than nonexp-regtest
90# because they are tested with various valgrind tools, so might be using
91# an experimental tool.
njn55b98e92003-04-08 10:29:13 +000092
njncc874b52009-01-08 06:07:05 +000093## Preprend @PERL@ because tests/vg_perf isn't executable
njnec0c27a2005-12-10 23:11:28 +000094perf: check
95 @PERL@ perf/vg_perf perf
96
njncdf8a172009-02-06 04:13:52 +000097# Nb: no need to include any Makefile.am files here, or files included from
njn8b68b642009-06-24 00:37:09 +000098# them, as automake includes them automatically. Also not COPYING, README
99# or NEWS.
njncb3fca82009-07-04 00:38:11 +0000100# We include valgrind.spec as well as valgrind.spec.in to save packagers
101# from having to run configure (bug 188560).
nethercote537e8942004-08-25 11:40:07 +0000102EXTRA_DIST = \
njn8b68b642009-06-24 00:37:09 +0000103 COPYING.DOCS \
nethercote16b59ee2004-10-09 15:59:05 +0000104 README_DEVELOPERS \
nethercote5da1e172003-12-03 21:44:45 +0000105 README_PACKAGERS \
njnf7c00b12005-07-19 21:46:19 +0000106 README_MISSING_SYSCALL_OR_IOCTL \
sewardj15f9feb2011-03-10 12:36:09 +0000107 README.s390 \
sewardj37ed97b2011-07-12 13:34:31 +0000108 README.android \
philippe7d9b41b2012-09-11 19:53:01 +0000109 README.android_emulator \
petarjb43264c2012-06-27 16:07:30 +0000110 README.mips \
sewardj383d5d32014-01-13 11:50:17 +0000111 README.aarch64 \
sewardj8eb8bab2015-07-21 14:44:28 +0000112 README.solaris \
sewardj4e9dfd32012-08-08 20:38:03 +0000113 NEWS.old \
njn8b68b642009-06-24 00:37:09 +0000114 valgrind.pc.in \
njncb3fca82009-07-04 00:38:11 +0000115 valgrind.spec.in \
sewardj3497e0e2012-09-17 17:17:00 +0000116 valgrind.spec \
117 autogen.sh
sewardjfed4dd02002-04-14 14:32:54 +0000118
Elliott Hughesed398002017-06-21 14:41:24 -0700119dist-hook: include/vgversion.h
120 cp -p include/vgversion.h $(distdir)/include/vgversion_dist.h
121
njn8b68b642009-06-24 00:37:09 +0000122dist_noinst_SCRIPTS = \
123 vg-in-place
njn25e49d8e72002-09-23 09:36:25 +0000124
Elliott Hughesed398002017-06-21 14:41:24 -0700125all-local: default.supp include/vgversion.h
nethercoteb7dceef2004-08-25 11:50:46 +0000126 mkdir -p $(inplacedir)
njn40d0df52009-02-09 01:52:55 +0000127 rm -f $(inplacedir)/default.supp
nethercoteb7dceef2004-08-25 11:50:46 +0000128 ln -s ../default.supp $(inplacedir)
fitzhardinge98abfc72003-12-16 02:05:15 +0000129
njnae508b02009-04-24 04:12:28 +0000130clean-local:
Elliott Hughesed398002017-06-21 14:41:24 -0700131 rm -rf $(inplacedir) include/vgversion.h
sewardj85a9dca2005-07-26 10:42:57 +0000132
sewardj731f9cf2011-09-21 08:43:08 +0000133# Need config.h in the installed tree, since some files depend on it
134pkginclude_HEADERS = config.h
Elliott Hughesed398002017-06-21 14:41:24 -0700135
136# vgversion.h defines accurate versions to report with -v --version
137include/vgversion.h:
138 $(top_srcdir)/auxprogs/make_or_upd_vgversion_h $(top_srcdir)
139
140.PHONY: include/vgversion.h
141