aboutsummaryrefslogtreecommitdiff
path: root/gprofng/Makefile.am
blob: 2fcd695140ca6e3f06f3cc6844d498847a21a63d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
## Process this file with automake to generate Makefile.in
#
#   Copyright (C) 2021 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3.  If not see
# <http://www.gnu.org/licenses/>.

ACLOCAL_AMFLAGS = -I . -I .. 

AUTOMAKE_OPTIONS = dejagnu foreign

if BUILD_COLLECTOR
    COLLECTOR_SUBDIRS = libcollector
endif
if BUILD_SRC
    SRC_SUBDIRS = src gp-display-html doc
endif
SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
DIST_SUBDIRS = libcollector src gp-display-html doc

# Setup the testing framework, if you have one
EXPECT = expect
RUNTEST = runtest
RUNTESTFLAGS =

BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
jdk_inc = @jdk_inc@
LD_NO_AS_NEEDED = @LD_NO_AS_NEEDED@
GPROFNG_CFLAGS = @GPROFNG_CFLAGS@
GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@
GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@

AM_MAKEFLAGS = \
	jdk_inc="$(jdk_inc)" \
	LD_NO_AS_NEEDED="$(LD_NO_AS_NEEDED)" \
	GPROFNG_CFLAGS="$(GPROFNG_CFLAGS)" \
	GPROFNG_CPPFLAGS="$(GPROFNG_CPPFLAGS)"

if TCL_TRY
check-DEJAGNU: site.exp development.exp
	srcroot=`cd $(srcdir) && pwd`; export srcroot; \
	r=`pwd`; export r; \
	LC_ALL=C; export LC_ALL; \
	EXPECT=$(EXPECT); export EXPECT; \
	jdk_inc="$(jdk_inc)"; export jdk_inc; \
	runtest=$(RUNTEST); \
	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
		GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \
		MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \
		LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \
		BUILDDIR="$(abs_top_builddir)" $(RUNTESTFLAGS); \
	else echo "WARNING: could not find \`runtest'" 1>&2; :;\
	fi

development.exp: $(BFDDIR)/development.sh
	$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh  \
	  | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@

# development.sh is used to determine -Werror default.
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh

EXTRA_DEJAGNU_SITE_CONFIG = development.exp

DISTCLEANFILES = site.exp development.exp
endif