-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile.am
154 lines (121 loc) · 3.93 KB
/
Makefile.am
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#
# Libeatmydata
#
### BEGIN LICENSE
# Copyright (C) 2008-2021 Stewart Smith <[email protected]>
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY, 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. If not, see <http://www.gnu.org/licenses/>.
### END LICENSE
ACLOCAL_AMFLAGS = -I m4
#LDADD = libeatmydata.la
AUTOMAKE_OPTIONS = parallel-tests
bin_PROGRAMS =
check_PROGRAMS =
noinst_PROGRAMS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
nobase_include_HEADERS =
noinst_HEADERS =
CLEANFILES = $(bin_SCRIPTS) $(libexec_SCRIPTS)
DISTCLEANFILES = config/top.h
EXTRA_DIST = \
README.md \
AUTHORS \
fsynctest.result \
test_run.sh \
eatmydata.in \
eatmydata.sh.in \
debian/changelog \
debian/compat \
debian/control \
debian/copyright \
debian/docs \
debian/README.Debian \
debian/rules \
debian/source \
libeatmydata.spec \
start_suspended.sh
bin_SCRIPTS = eatmydata
libexec_SCRIPTS = eatmydata.sh
do_subst = @SED@ \
-e 's!@''libdir''@!$(libdir)!g' \
-e 's!@''libexecdir''@!$(libexecdir)!g'
eatmydata: eatmydata.in Makefile
$(do_subst) $(srcdir)/eatmydata.in > $@
chmod +x eatmydata
eatmydata.sh: eatmydata.sh.in Makefile
$(do_subst) $(srcdir)/eatmydata.sh.in > $@
#
# libeatmydata
#
lib_LTLIBRARIES += libeatmydata.la
libeatmydata_la_SOURCES = \
libeatmydata/libeatmydata.c
noinst_HEADERS += \
libeatmydata/portability.h \
libeatmydata/visibility.h
libeatmydata_la_CFLAGS = \
$(AM_CFLAGS) \
$(NO_WERROR) \
-DBUILDING_LIBEATMYDATA
libeatmydata_la_LIBADD = $(LIBDL_LIBS) -ldl
libeatmydata_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
#install-exec-hook:
# find $(DESTDIR)$(libdir) -type f -name \*.la |xargs rm -f
check_PROGRAMS += \
libeatmydata/test/fsynctest \
libeatmydata/test/tst-key4 \
libeatmydata/test/tst-invalidfd \
libeatmydata/test/eatmydatatest \
libeatmydata/test/eatmydatatest_largefile \
libeatmydata/test/syncfstest \
libeatmydata/test/fcntltest
if HAVE_PTHREAD_BARRIERS
check_PROGRAMS += libeatmydata/test/tst-cancel4
endif
libeatmydata_test_tst_cancel4_LDADD= -lpthread
libeatmydata_test_tst_key4_LDADD= -lpthread
#
# Simple libeatmydata application
#
TESTS = $(check_PROGRAMS)
LOG_COMPILER = ${top_srcdir}/test_run.sh
test: distcheck
check-verbose:
@LIBEATMYDATA_TEST_ARGS="v" make check
check-debug:
@LIBEATMYDATA_TEST_ARGS="vvv" make check
check-valgrind:
@LIBEATMYDATA_TEST_PREFIX="valgrind -q --leak-check=full --show-reachable=yes --suppressions=valgrind.suppressions" make check
check-valgrind-debug:
@LIBEATMYDATA_TEST_PREFIX="valgrind -q --leak-check=full --show-reachable=yes --suppressions=valgrind.suppressions" LIBEATMYDATA_TEST_ARGS="vvv" make check
check-gdb:
@LIBEATMYDATA_TEST_PREFIX="gdb -q" make check
check-time:
@LIBEATMYDATA_TEST_PREFIX="/usr/bin/time" make check
check-strace:
@LIBEATMYDATA_TEST_PREFIX="strace -c" make check
check-truss:
@LIBEATMYDATA_TEST_PREFIX="truss -c" make check
lcov: lcov-clean check
@echo
@echo "------------------------------------------------------"
@echo "Make sure ./configure was run with '--enable-coverage'"
@echo "------------------------------------------------------"
@echo
cd libeatmydata && lcov --directory . --base-directory .. --capture --output-file lcov.out
cd libeatmydata && lcov --directory . --base-directory .. --extract lcov.out `pwd`/\* --output-file lcov_extract.out
genhtml -o lcov -t libeatmydata libeatmydata/lcov_extract.out
lcov-clean: clean
find . -name '*.gcno' -exec rm {} \;
find . -name '*.gcda' -exec rm {} \;
find . -name 'lcov*.out' -exec rm {} \;