File: Makefile.am

package info (click to toggle)
dh-exec 0.30
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 324 kB
  • sloc: ansic: 530; perl: 178; makefile: 126; sh: 67
file content (149 lines) | stat: -rw-r--r-- 4,210 bytes parent folder | download | duplicates (2)
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
# --- Default paths ---
DH_EXEC_SCRIPTDIR	?= ${pkgdatadir}
DH_EXEC_LIBDIR		?= ${pkglibexecdir}

# --- Programs & scripts ---
bin_PROGRAMS		= src/dh-exec
pkglibexec_PROGRAMS	= src/dh-exec-subst \
			  src/dh-exec-install \
			  src/dh-exec-illiterate \
			  src/dh-exec-strip \
			  src/dh-exec-filter
man1_MANS		= man/dh-exec-subst.1 \
			  man/dh-exec-install.1 \
			  man/dh-exec-illiterate.1 \
			  man/dh-exec-filter.1 \
			  man/dh-exec.1

pkgdata_SCRIPTS		= lib/dh-exec-subst-env \
			  lib/dh-exec-subst-multiarch \
			  lib/dh-exec-install-rename \
        lib/dh-exec-install-move \
			  lib/dh-exec-illiterate-tangle \
			  lib/dh-exec-strip-output \
			  lib/dh-exec-filter-arch \
			  lib/dh-exec-filter-comments \
			  lib/dh-exec-filter-build-profiles

# --- Sources & flags ---
AM_CFLAGS		= ${LIBPIPELINE_CFLAGS} \
			-DDH_EXEC_SCRIPTDIR="\"${DH_EXEC_SCRIPTDIR}\"" \
			-DDH_EXEC_LIBDIR="\"${DH_EXEC_LIBDIR}\""
AM_MAKEFLAGS		= --no-print-directory

LDADD			= ${LIBPIPELINE_LIBS}

src_dh_exec_SOURCES		= \
			src/dh-exec.c \
			src/dh-exec.lib.c \
			src/dh-exec.lib.h

src_dh_exec_subst_SOURCES	= \
			src/dh-exec.simple.c \
			src/dh-exec.lib.c \
			src/dh-exec.lib.h
src_dh_exec_subst_CFLAGS	= -DDH_EXEC_CMD=\"subst\"

src_dh_exec_install_SOURCES	= \
			src/dh-exec-install.c \
			src/dh-exec.lib.c \
			src/dh-exec.lib.h
src_dh_exec_install_CFLAGS	= -DDH_EXEC_CMD=\"install\"


src_dh_exec_illiterate_SOURCES	= \
			src/dh-exec.simple.c \
			src/dh-exec.lib.c \
			src/dh-exec.lib.h
src_dh_exec_illiterate_CFLAGS	= -DDH_EXEC_CMD=\"illiterate\"

src_dh_exec_strip_SOURCES	= \
			src/dh-exec.simple.c \
			src/dh-exec.lib.c \
			src/dh-exec.lib.h
src_dh_exec_strip_CFLAGS	= -DDH_EXEC_CMD=\"strip\" \
				  -DDH_EXEC_CMD_ALWAYS=1

src_dh_exec_filter_SOURCES	= \
			src/dh-exec.simple.c \
			src/dh-exec.lib.c \
			src/dh-exec.lib.h
src_dh_exec_filter_CFLAGS	= -DDH_EXEC_CMD=\"filter\" \
				  -DDH_EXEC_CMD_ALWAYS=1

# --- Test suite ---

TESTCASES_SUBST		= test_subst_syntax.bats \
			  test_subst_env.bats \
			  test_subst_multiarch.bats
TESTCASES_INSTALL	= test_install_syntax.bats \
			  test_install_copy.bats \
        test_install_move.bats
TESTCASES_ILLITERATE	= test_illiterate.bats
TESTCASES_DH		= test_dh.bats
TESTCASES_MISC		= test_combined.bats \
			  test_dh_exec.bats \
			  test_strip.bats \
			  test_filter.bats

TESTCASES		= ${TESTCASES_SUBST} ${TESTCASES_INSTALL} \
			${TESTCASES_MISC} ${TESTCASES_DH} \
			${TESTCASES_ILLITERATE}

TESTS_ENVIRONMENT	= DH_EXEC_SCRIPTDIR="${top_srcdir}/lib" \
			DH_EXEC_LIBDIR="${top_builddir}/src" \
			DH_EXEC_BINDIR="${top_builddir}/src" \
			top_builddir="${top_builddir}/" \
			srcdir="${srcdir}/t" \
			NO_PKG_MANGLE=1

pkgtest_FILES		= t/pkg-test/data/bin-arch \
			t/pkg-test/data/bin-foo \
			t/pkg-test/data/plugin-multiarch \
			t/pkg-test/debian/changelog \
			t/pkg-test/debian/compat \
			t/pkg-test/debian/control \
			t/pkg-test/debian/copyright \
			t/pkg-test/debian/pkg-test.dirs \
			t/pkg-test/debian/pkg-test-illiterate.dirs \
			t/pkg-test/debian/pkg-test-illiterate.install \
			t/pkg-test/debian/pkg-test.install \
			t/pkg-test/debian/rules \
			t/pkg-test/debian/source/format \
			t/pkg-test/GNUMakefile

check: all $(addprefix ${top_srcdir}/t/,${TESTCASES})
	$(AM_V_GEN) ${TESTS_ENVIRONMENT} \
		prove -e "bats --tap" -f \
		      -o ${PROVE_OPTIONS} \
		      $(addprefix ${top_srcdir}/t/,${TESTCASES})

bats: all $(addprefix ${top_srcdir}/t/,${TESTCASES})
	${AM_V_GEN} ${TESTS_ENVIRONMENT} \
		    bats ${BATS_OPTIONS} \
		      $(addprefix ${top_srcdir}/t/,${TESTCASES})

# -- Custom targets --
coverage: coverage.info.html

coverage.info.html: coverage.info
	$(AM_V_GEN)genhtml --quiet $^ --output-directory $@

coverage.info: check
	$(AM_V_GEN)lcov --quiet --capture --directory ${top_builddir}/src --output $@ -b ${top_builddir}

.PHONY: coverage
CLEANFILES		= coverage.info

clean-local:
	rm -rf coverage.info.html
	find ${top_builddir} -name '*.gcda' -or -name '*.gcno' | xargs rm -f

# --- Extra files to distribute ---

EXTRA_DIST		= README.md CONTRIBUTING.md \
			${man1_MANS} ${pkgdata_SCRIPTS} \
			t/test.lib.bash \
			$(addprefix t/,${TESTCASES}) \
			${pkgtest_FILES} \
			${disabled_TESTCASES}