1## Process this file with automake to generate Makefile.in
2#
3#   Copyright (C) 2021 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_SRC
27    SRC_SUBDIRS = src gp-display-html doc
28endif
29SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
30DIST_SUBDIRS = libcollector src gp-display-html doc
31
32# Setup the testing framework, if you have one
33EXPECT = expect
34RUNTEST = runtest
35RUNTESTFLAGS =
36
37BASEDIR = $(srcdir)/..
38BFDDIR = $(BASEDIR)/bfd
39jdk_inc = @jdk_inc@
40LD_NO_AS_NEEDED = @LD_NO_AS_NEEDED@
41GPROFNG_CFLAGS = @GPROFNG_CFLAGS@
42GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@
43GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@
44
45AM_MAKEFLAGS = \
46	jdk_inc="$(jdk_inc)" \
47	LD_NO_AS_NEEDED="$(LD_NO_AS_NEEDED)" \
48	GPROFNG_CFLAGS="$(GPROFNG_CFLAGS)" \
49	GPROFNG_CPPFLAGS="$(GPROFNG_CPPFLAGS)"
50
51if TCL_TRY
52check-DEJAGNU: site.exp development.exp
53	srcroot=`cd $(srcdir) && pwd`; export srcroot; \
54	r=`pwd`; export r; \
55	LC_ALL=C; export LC_ALL; \
56	EXPECT=$(EXPECT); export EXPECT; \
57	jdk_inc="$(jdk_inc)"; export jdk_inc; \
58	runtest=$(RUNTEST); \
59	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
60	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
61		GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \
62		MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \
63		LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \
64		BUILDDIR="$(abs_top_builddir)" $(RUNTESTFLAGS); \
65	else echo "WARNING: could not find \`runtest'" 1>&2; :;\
66	fi
67
68development.exp: $(BFDDIR)/development.sh
69	$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh  \
70	  | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
71
72# development.sh is used to determine -Werror default.
73CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
74
75EXTRA_DEJAGNU_SITE_CONFIG = development.exp
76
77DISTCLEANFILES = site.exp development.exp
78endif
79
80