xref: /freebsd-src/share/examples/tests/tests/plain/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1# The release package to use for the tests contained within the directory
2#
3# This applies to components which rely on ^/projects/release-pkg support
4# (see UPDATING XXXXXXXXX / svn revision r298107).
5PACKAGE=	tests
6
7# Directory into which the Kyuafile provided by this directory will be
8# installed.
9#
10# This is always a subdirectory of ${TESTSBASE}/.  The remainder of the
11# path has to match the relative path within the source tree in which
12# these files are found modulo the tests/ component at the end.
13#
14# For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR
15# would point at ${TESTSBASE}/bin/cp/.
16TESTSDIR=	${TESTSBASE}/share/examples/tests/plain
17
18# List of test programs to build.  Note that we can build more than one
19# test from a single directory, and this is expected.
20PLAIN_TESTS_C=	printf_test
21PLAIN_TESTS_SH=	cp_test
22
23# Tell bsd.test.mk that we are providing a hand-crafted Kyuafile in this
24# directory.  We do so because the file in this directory exists for
25# documentation purposes.
26#
27# In general, however, you should NOT define KYUAFILE at all to allow
28# bsd.test.mk auto-generate one for you based on the PLAIN_TESTS_*
29# definitions from above.
30KYUAFILE=	yes
31
32# Install file1 and file2 as files via bsd.progs.mk. Please note the intentional
33# ${PACKAGE} namespace of files.
34#
35# The basic semantics of this are the same as FILES in bsd.progs.mk, e.g. the
36# installation of the files can be manipulated via ${PACKAGE}FILESDIR,
37# ${PACKAGE}FILESMODE, etc.
38#
39# Please see comment above about ${PACKAGE}. Feel free to omit the ${PACKAGE}
40# namespace if release package support isn't needed.
41${PACKAGE}FILES+=	file1
42CLEANFILES+=		file1
43
44file1:
45	@echo "File 1" > ${.TARGET}
46
47.include <bsd.test.mk>
48
49.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 180000
50CWARNFLAGS.printf_test.c+=	-Wno-format-truncation
51.endif
52