xref: /netbsd-src/external/gpl3/binutils/dist/gprofng/Makefile.am (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
1## Process this file with automake to generate Makefile.in
2#
3#   Copyright (C) 2021-2024 Free Software Foundation, Inc.
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; see the file COPYING3.  If not see
17# <http://www.gnu.org/licenses/>.
18
19ACLOCAL_AMFLAGS = -I . -I ..
20
21AUTOMAKE_OPTIONS = dejagnu foreign
22
23if BUILD_COLLECTOR
24    COLLECTOR_SUBDIRS = libcollector
25endif
26if BUILD_DOC
27    DOC_SUBDIR = doc
28endif
29if BUILD_SRC
30    SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
31endif
32SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
33DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)
34
35# Setup the testing framework, if you have one
36EXPECT = expect
37RUNTEST = runtest
38RUNTESTFLAGS =
39
40BASEDIR = $(srcdir)/..
41BFDDIR = $(BASEDIR)/bfd
42jdk_inc = @jdk_inc@
43LD_NO_AS_NEEDED = @LD_NO_AS_NEEDED@
44GPROFNG_CFLAGS = @GPROFNG_CFLAGS@
45GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@
46GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@
47
48AM_MAKEFLAGS = \
49	jdk_inc="$(jdk_inc)" \
50	LD_NO_AS_NEEDED="$(LD_NO_AS_NEEDED)" \
51	GPROFNG_CFLAGS="$(GPROFNG_CFLAGS)" \
52	GPROFNG_CPPFLAGS="$(GPROFNG_CPPFLAGS)"
53
54.PHONY: check-small check-extra check-install
55
56check-DEJAGNU: check-small
57
58check-small check-extra check-install: site.exp development.exp
59if TCL_TRY
60	srcroot=`cd $(srcdir) && pwd`; export srcroot; \
61	LC_ALL=C; export LC_ALL; \
62	EXPECT=$(EXPECT); export EXPECT; \
63	jdk_inc="$(jdk_inc)"; export jdk_inc; \
64	runtest=$(RUNTEST); \
65	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
66	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
67		JDK_INC="$(jdk_inc)" \
68		CLOCK_GETTIME_LINK="$(CLOCK_GETTIME_LINK)" \
69		CHECK_TARGET=$@ \
70		PREFIX="$(prefix)" \
71		GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \
72		MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \
73		LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \
74		BUILDDIR="$(abs_top_builddir)" $(RUNTESTFLAGS); \
75	else echo "WARNING: could not find \`runtest'" 1>&2; :;\
76	fi
77endif
78
79development.exp: $(BFDDIR)/development.sh
80	$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh  \
81	  | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
82
83# development.sh is used to determine -Werror default.
84CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
85
86EXTRA_DEJAGNU_SITE_CONFIG = development.exp
87
88DISTCLEANFILES = site.exp development.exp
89
90
91