pipadoc uses some bashisms
[nobug.git] / tests / Makefile.am
blobbfb145df5681b7dbe2e9128718592ff5d9378a82
1 # This file is part of the NoBug debugging library.
3 # Copyright (C)
4 #   2007, 2008, 2009            Christian Thaeter <ct@pipapo.org>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, contact Christian Thaeter <ct@pipapo.org>.
19 check_PROGRAMS                          = example_alpha example_beta example_release
20 example_alpha_SOURCES                   = tests/example.c
21 example_alpha_CFLAGS                    = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
22 example_alpha_CPPFLAGS                  = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DEBUG_ALPHA
23 example_alpha_LDADD                     = libnobug.la
24 example_beta_SOURCES                    = tests/example.c
25 example_beta_CFLAGS                     = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
26 example_beta_CPPFLAGS                   = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DEBUG_BETA
27 example_beta_LDADD                      = libnobug.la
28 example_release_SOURCES                 = tests/example.c
29 example_release_CFLAGS                  = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
30 example_release_CPPFLAGS                = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DNDEBUG
31 example_release_LDADD                   = libnobug.la
33 check_PROGRAMS                          += test_nobug_alpha test_nobug_beta test_nobug_release
34 test_nobug_alpha_SOURCES                = tests/test_nobug.c
35 test_nobug_alpha_CFLAGS                 = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
36 test_nobug_alpha_CPPFLAGS               = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DEBUG_ALPHA
37 test_nobug_alpha_LDADD                  = libnobug.la
38 test_nobug_beta_SOURCES                 = tests/test_nobug.c
39 test_nobug_beta_CFLAGS                  = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
40 test_nobug_beta_CPPFLAGS                = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DEBUG_BETA
41 test_nobug_beta_LDADD                   = libnobug.la
42 test_nobug_release_SOURCES              = tests/test_nobug.c
43 test_nobug_release_CFLAGS               = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
44 test_nobug_release_CPPFLAGS             = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DNDEBUG
45 test_nobug_release_LDADD                = libnobug.la
47 check_PROGRAMS                                  += test_nobug_faultinjection_alpha test_nobug_faultinjection_release
48 test_nobug_faultinjection_alpha_SOURCES         = tests/test_nobug_faultinjection.c
49 test_nobug_faultinjection_alpha_CFLAGS          = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
50 test_nobug_faultinjection_alpha_CPPFLAGS        = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DEBUG_ALPHA
51 test_nobug_faultinjection_alpha_LDADD           = libnobug.la
52 test_nobug_faultinjection_release_SOURCES       = tests/test_nobug_faultinjection.c
53 test_nobug_faultinjection_release_CFLAGS        = $(AM_CFLAGS) -Wall -Wextra -Werror @VALGRIND_CFLAGS@
54 test_nobug_faultinjection_release_CPPFLAGS      = -I$(top_srcdir)/src -DNOBUG_USE_PTHREAD=0 -DNDEBUG
55 test_nobug_faultinjection_release_LDADD         = libnobug.la
58 ##### multi-threading variant
60 if HAVE_THREADING
62 check_PROGRAMS                          += example_mt_alpha
63 example_mt_alpha_SOURCES                = tests/example.c
64 example_mt_alpha_CPPFLAGS               = -I$(top_srcdir)/src -DEBUG_ALPHA
65 example_mt_alpha_CFLAGS                 = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
66 example_mt_alpha_LDFLAGS                = @PTHREAD_CFLAGS@
67 example_mt_alpha_LDADD                  = @PTHREAD_LIBS@ libnobugmt.la
69 check_PROGRAMS                          += test_nobug_mt_alpha
70 test_nobug_mt_alpha_SOURCES             = tests/test_nobug.c
71 test_nobug_mt_alpha_CPPFLAGS            = -I$(top_srcdir)/src -DEBUG_ALPHA
72 test_nobug_mt_alpha_CFLAGS              = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
73 test_nobug_mt_alpha_LDFLAGS             = @PTHREAD_CFLAGS@
74 test_nobug_mt_alpha_LDADD               = @PTHREAD_LIBS@ libnobugmt.la
76 check_PROGRAMS                          += test_nobug_resources_mt_alpha
77 test_nobug_resources_mt_alpha_SOURCES   = tests/test_nobug_resources.c
78 test_nobug_resources_mt_alpha_CPPFLAGS  = -I$(top_srcdir)/src -DEBUG_ALPHA
79 test_nobug_resources_mt_alpha_CFLAGS    = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
80 test_nobug_resources_mt_alpha_LDFLAGS   = @PTHREAD_CFLAGS@
81 test_nobug_resources_mt_alpha_LDADD     = @PTHREAD_LIBS@ libnobugmt.la
83 check_PROGRAMS                                  += test_nobug_resources_basic_alpha
84 test_nobug_resources_basic_alpha_SOURCES        = tests/test_nobug_resources_basic.c
85 test_nobug_resources_basic_alpha_CPPFLAGS       = -I$(top_srcdir)/src -DEBUG_ALPHA
86 test_nobug_resources_basic_alpha_CFLAGS         = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
87 test_nobug_resources_basic_alpha_LDFLAGS        = @PTHREAD_CFLAGS@
88 test_nobug_resources_basic_alpha_LDADD          = @PTHREAD_LIBS@ libnobugmt.la
90 check_PROGRAMS                                  += test_nobug_resources_threaded_mt_alpha
91 test_nobug_resources_threaded_mt_alpha_SOURCES  = tests/test_nobug_resources_threaded.c
92 test_nobug_resources_threaded_mt_alpha_CPPFLAGS = -I$(top_srcdir)/src -DEBUG_ALPHA
93 test_nobug_resources_threaded_mt_alpha_CFLAGS   = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
94 test_nobug_resources_threaded_mt_alpha_LDFLAGS  = @PTHREAD_CFLAGS@
95 test_nobug_resources_threaded_mt_alpha_LDADD    = @PTHREAD_LIBS@ libnobugmt.la
97 check_PROGRAMS                          += test_nobug_thread_mt_release test_nobug_thread_mt_alpha test_nobug_thread_mt_beta
98 test_nobug_thread_mt_alpha_SOURCES      = tests/test_nobug_thread.c
99 test_nobug_thread_mt_alpha_CPPFLAGS     = -I$(top_srcdir)/src -DEBUG_ALPHA
100 test_nobug_thread_mt_alpha_CFLAGS       = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
101 test_nobug_thread_mt_alpha_LDFLAGS      = @PTHREAD_CFLAGS@
102 test_nobug_thread_mt_alpha_LDADD        = @PTHREAD_LIBS@ libnobugmt.la
104 test_nobug_thread_mt_beta_SOURCES       = tests/test_nobug_thread.c
105 test_nobug_thread_mt_beta_CPPFLAGS      = -I$(top_srcdir)/src -DEBUG_BETA
106 test_nobug_thread_mt_beta_CFLAGS        = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
107 test_nobug_thread_mt_beta_LDFLAGS       = @PTHREAD_CFLAGS@
108 test_nobug_thread_mt_beta_LDADD         = @PTHREAD_LIBS@ libnobugmt.la
110 test_nobug_thread_mt_release_SOURCES    = tests/test_nobug_thread.c
111 test_nobug_thread_mt_release_CPPFLAGS   = -I$(top_srcdir)/src -DNDEBUG
112 test_nobug_thread_mt_release_CFLAGS     = -Wall -Wextra -Werror @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
113 test_nobug_thread_mt_release_LDFLAGS    = @PTHREAD_CFLAGS@
114 test_nobug_thread_mt_release_LDADD      = @PTHREAD_LIBS@ libnobugmt.la
115 endif   # HAVE_THREADING
117 check_HEADERS = tests/test.h
118 dist_check_SCRIPTS = tests/test.sh
120 CLEANFILES += ,testlog.pre ,testlog vgsuppression.supp
122 ##### maintainer targets
124 check_PROGRAMS                          += vgsuppression
125 vgsuppression_SOURCES                   = tests/vgsuppression.c
126 vgsuppression_CPPFLAGS                  = -I$(top_srcdir)/src -DEBUG_ALPHA
128 if HAVE_THREADING
129 vgsuppression_CFLAGS                    = $(AM_CFLAGS) @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
130 vgsuppression_LDADD                     = @PTHREAD_LIBS@ libnobugmt.la
131 vgsuppression_LDFLAGS                   = @PTHREAD_CFLAGS@
132 else
133 vgsuppression_CFLAGS                    = $(AM_CFLAGS) @VALGRIND_CFLAGS@
134 vgsuppression_LDADD                     = libnobug.la
135 vgsuppression_LDFLAGS                   = 
136 endif   # HAVE_THREADING
139 TESTS = tests/test.sh