xref: /freebsd/usr.bin/kyua/Makefile (revision d0b2dbfa)
1b0d29bc4SBrooks Davis
2395cb8fbSEmmanuel Vadot.include <src.opts.mk>
3395cb8fbSEmmanuel Vadot
42eb9ad42SAlex RichardsonKYUA_CONFDIR=	/etc/kyua
52eb9ad42SAlex RichardsonKYUA_DOCDIR=	/usr/share/doc/kyua
62eb9ad42SAlex RichardsonKYUA_EGDIR=	/usr/share/examples/kyua
72eb9ad42SAlex RichardsonKYUA_MISCDIR=	/usr/share/kyua/misc
82eb9ad42SAlex RichardsonKYUA_STOREDIR=	/usr/share/kyua/store
92eb9ad42SAlex RichardsonKYUA_VERSION=	0.13
10b0d29bc4SBrooks Davis
112eb9ad42SAlex RichardsonKYUA_SRCDIR=	${SRCTOP}/contrib/kyua
12d7f6e63dSEnji Cooper.PATH: ${KYUA_SRCDIR}
13b0d29bc4SBrooks Davis
14066a8c69SEmmanuel VadotPACKAGE=	tests
15b0d29bc4SBrooks DavisPROG_CXX=	kyua
16b0d29bc4SBrooks DavisSRCS=		main.cpp
172eb9ad42SAlex RichardsonLIBADD=		lutok sqlite3
18b0d29bc4SBrooks Davis
19b0d29bc4SBrooks DavisMAN=		kyua-about.1 \
20b0d29bc4SBrooks Davis		kyua-config.1 \
21b0d29bc4SBrooks Davis		kyua-db-exec.1 \
22b0d29bc4SBrooks Davis		kyua-db-migrate.1 \
23b0d29bc4SBrooks Davis		kyua-debug.1 \
24b0d29bc4SBrooks Davis		kyua-help.1 \
25b0d29bc4SBrooks Davis		kyua-list.1 \
26b0d29bc4SBrooks Davis		kyua-report-html.1 \
27b0d29bc4SBrooks Davis		kyua-report-junit.1 \
28b0d29bc4SBrooks Davis		kyua-report.1 \
29b0d29bc4SBrooks Davis		kyua-test.1 \
30b0d29bc4SBrooks Davis		kyua.1 \
31b0d29bc4SBrooks Davis		kyua.conf.5 \
32b0d29bc4SBrooks Davis		kyuafile.5
33b0d29bc4SBrooks Davis
342eb9ad42SAlex RichardsonCFLAGS+=	-I${KYUA_SRCDIR} -I${.CURDIR}
352eb9ad42SAlex RichardsonCFLAGS+=	-I${SRCTOP}/contrib/lutok/include
362eb9ad42SAlex RichardsonCFLAGS+=	-I${SRCTOP}/contrib/sqlite3
37b0d29bc4SBrooks Davis# kyua uses auto_ptr
38b0d29bc4SBrooks DavisCFLAGS+=	-Wno-deprecated-declarations
3942fb28ceSJohn BaldwinCXXSTD=		c++11
402eb9ad42SAlex RichardsonCFLAGS+=	-DHAVE_CONFIG_H
412eb9ad42SAlex Richardson
422eb9ad42SAlex Richardson# We compile the kyua libraries as part of the main executable as this saves
432eb9ad42SAlex Richardson# compile time and we don't install them anyway.
442eb9ad42SAlex RichardsonCFLAGS+=	-DGDB=\"/usr/local/bin/gdb\"			\
452eb9ad42SAlex Richardson		-DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\"		\
462eb9ad42SAlex Richardson		-DKYUA_CONFDIR=\"${KYUA_CONFDIR}\"		\
472eb9ad42SAlex Richardson		-DKYUA_DOCDIR=\"${KYUA_DOCDIR}\"		\
482eb9ad42SAlex Richardson		-DKYUA_MISCDIR=\"${KYUA_MISCDIR}\"		\
492eb9ad42SAlex Richardson		-DKYUA_PLATFORM=\"${MACHINE}\"			\
502eb9ad42SAlex Richardson		-DKYUA_STOREDIR=\"${KYUA_STOREDIR}\"		\
512eb9ad42SAlex Richardson		-DPACKAGE=\"kyua\"				\
522eb9ad42SAlex Richardson		-DPACKAGE_NAME=\"Kyua\"				\
532eb9ad42SAlex Richardson		-DPACKAGE_VERSION=\"${KYUA_VERSION}\"		\
542eb9ad42SAlex Richardson		-DVERSION=\"${KYUA_VERSION}\"
552eb9ad42SAlex Richardson
562eb9ad42SAlex RichardsonSRCS+=	utils/datetime.cpp			\
572eb9ad42SAlex Richardson	utils/env.cpp				\
582eb9ad42SAlex Richardson	utils/memory.cpp			\
592eb9ad42SAlex Richardson	utils/passwd.cpp			\
602eb9ad42SAlex Richardson	utils/sanity.cpp			\
612eb9ad42SAlex Richardson	utils/stacktrace.cpp			\
622eb9ad42SAlex Richardson	utils/stream.cpp			\
632eb9ad42SAlex Richardson	utils/units.cpp				\
642eb9ad42SAlex Richardson	utils/cmdline/base_command.cpp		\
652eb9ad42SAlex Richardson	utils/cmdline/exceptions.cpp		\
662eb9ad42SAlex Richardson	utils/cmdline/globals.cpp		\
672eb9ad42SAlex Richardson	utils/cmdline/options.cpp		\
682eb9ad42SAlex Richardson	utils/cmdline/parser.cpp		\
692eb9ad42SAlex Richardson	utils/cmdline/ui.cpp			\
702eb9ad42SAlex Richardson	utils/cmdline/ui_mock.cpp		\
712eb9ad42SAlex Richardson	utils/config/exceptions.cpp		\
722eb9ad42SAlex Richardson	utils/config/keys.cpp			\
732eb9ad42SAlex Richardson	utils/config/lua_module.cpp		\
742eb9ad42SAlex Richardson	utils/config/nodes.cpp			\
752eb9ad42SAlex Richardson	utils/config/parser.cpp			\
762eb9ad42SAlex Richardson	utils/config/tree.cpp			\
772eb9ad42SAlex Richardson	utils/format/exceptions.cpp		\
782eb9ad42SAlex Richardson	utils/format/formatter.cpp		\
792eb9ad42SAlex Richardson	utils/fs/auto_cleaners.cpp		\
802eb9ad42SAlex Richardson	utils/fs/directory.cpp			\
812eb9ad42SAlex Richardson	utils/fs/exceptions.cpp			\
822eb9ad42SAlex Richardson	utils/fs/lua_module.cpp			\
832eb9ad42SAlex Richardson	utils/fs/operations.cpp			\
842eb9ad42SAlex Richardson	utils/fs/path.cpp			\
852eb9ad42SAlex Richardson	utils/logging/operations.cpp		\
862eb9ad42SAlex Richardson	utils/process/child.cpp			\
872eb9ad42SAlex Richardson	utils/process/deadline_killer.cpp	\
882eb9ad42SAlex Richardson	utils/process/exceptions.cpp		\
892eb9ad42SAlex Richardson	utils/process/executor.cpp		\
902eb9ad42SAlex Richardson	utils/process/fdstream.cpp		\
912eb9ad42SAlex Richardson	utils/process/isolation.cpp		\
922eb9ad42SAlex Richardson	utils/process/operations.cpp		\
932eb9ad42SAlex Richardson	utils/process/status.cpp		\
942eb9ad42SAlex Richardson	utils/process/system.cpp		\
952eb9ad42SAlex Richardson	utils/process/systembuf.cpp		\
962eb9ad42SAlex Richardson	utils/signals/exceptions.cpp		\
972eb9ad42SAlex Richardson	utils/signals/interrupts.cpp		\
982eb9ad42SAlex Richardson	utils/signals/misc.cpp			\
992eb9ad42SAlex Richardson	utils/signals/programmer.cpp		\
1002eb9ad42SAlex Richardson	utils/signals/timer.cpp			\
1012eb9ad42SAlex Richardson	utils/sqlite/c_gate.cpp			\
1022eb9ad42SAlex Richardson	utils/sqlite/database.cpp		\
1032eb9ad42SAlex Richardson	utils/sqlite/exceptions.cpp		\
1042eb9ad42SAlex Richardson	utils/sqlite/statement.cpp		\
1052eb9ad42SAlex Richardson	utils/sqlite/transaction.cpp		\
1062eb9ad42SAlex Richardson	utils/text/exceptions.cpp		\
1072eb9ad42SAlex Richardson	utils/text/operations.cpp		\
1082eb9ad42SAlex Richardson	utils/text/regex.cpp			\
1092eb9ad42SAlex Richardson	utils/text/table.cpp			\
1102eb9ad42SAlex Richardson	utils/text/templates.cpp
1112eb9ad42SAlex Richardson
1122eb9ad42SAlex RichardsonSRCS+=	model/context.cpp	\
1132eb9ad42SAlex Richardson	model/exceptions.cpp	\
1142eb9ad42SAlex Richardson	model/metadata.cpp	\
1152eb9ad42SAlex Richardson	model/test_case.cpp	\
1162eb9ad42SAlex Richardson	model/test_program.cpp	\
1172eb9ad42SAlex Richardson	model/test_result.cpp
1182eb9ad42SAlex Richardson
1192eb9ad42SAlex RichardsonSRCS+=	engine/atf.cpp			\
1202eb9ad42SAlex Richardson	engine/atf_list.cpp		\
1212eb9ad42SAlex Richardson	engine/atf_result.cpp		\
1222eb9ad42SAlex Richardson	engine/config.cpp		\
1232eb9ad42SAlex Richardson	engine/exceptions.cpp		\
1242eb9ad42SAlex Richardson	engine/filters.cpp		\
1252eb9ad42SAlex Richardson	engine/kyuafile.cpp		\
1262eb9ad42SAlex Richardson	engine/plain.cpp		\
1272eb9ad42SAlex Richardson	engine/requirements.cpp		\
1282eb9ad42SAlex Richardson	engine/scanner.cpp		\
1292eb9ad42SAlex Richardson	engine/tap.cpp			\
1302eb9ad42SAlex Richardson	engine/tap_parser.cpp		\
1312eb9ad42SAlex Richardson	engine/scheduler.cpp
1322eb9ad42SAlex Richardson
1332eb9ad42SAlex RichardsonSRCS+=	store/dbtypes.cpp		\
1342eb9ad42SAlex Richardson	store/exceptions.cpp		\
1352eb9ad42SAlex Richardson	store/layout.cpp		\
1362eb9ad42SAlex Richardson	store/metadata.cpp		\
1372eb9ad42SAlex Richardson	store/migrate.cpp		\
1382eb9ad42SAlex Richardson	store/read_backend.cpp		\
1392eb9ad42SAlex Richardson	store/read_transaction.cpp	\
1402eb9ad42SAlex Richardson	store/write_backend.cpp		\
1412eb9ad42SAlex Richardson	store/write_transaction.cpp
1422eb9ad42SAlex Richardson
1432eb9ad42SAlex RichardsonSRCS+=	drivers/debug_test.cpp		\
1442eb9ad42SAlex Richardson	drivers/list_tests.cpp		\
1452eb9ad42SAlex Richardson	drivers/report_junit.cpp	\
1462eb9ad42SAlex Richardson	drivers/run_tests.cpp		\
1472eb9ad42SAlex Richardson	drivers/scan_results.cpp
1482eb9ad42SAlex Richardson
1492eb9ad42SAlex RichardsonSRCS+=	cli/cmd_about.cpp		\
1502eb9ad42SAlex Richardson	cli/cmd_config.cpp		\
1512eb9ad42SAlex Richardson	cli/cmd_db_exec.cpp		\
1522eb9ad42SAlex Richardson	cli/cmd_db_migrate.cpp		\
1532eb9ad42SAlex Richardson	cli/cmd_debug.cpp		\
1542eb9ad42SAlex Richardson	cli/cmd_help.cpp		\
1552eb9ad42SAlex Richardson	cli/cmd_list.cpp		\
1562eb9ad42SAlex Richardson	cli/cmd_report.cpp		\
1572eb9ad42SAlex Richardson	cli/cmd_report_html.cpp		\
1582eb9ad42SAlex Richardson	cli/cmd_report_junit.cpp	\
1592eb9ad42SAlex Richardson	cli/cmd_test.cpp		\
1602eb9ad42SAlex Richardson	cli/common.cpp			\
1612eb9ad42SAlex Richardson	cli/config.cpp			\
1622eb9ad42SAlex Richardson	cli/main.cpp
163b0d29bc4SBrooks Davis
164395cb8fbSEmmanuel VadotFILESGROUPS=	DOCS MISC STORE
165395cb8fbSEmmanuel Vadot
166395cb8fbSEmmanuel Vadot.if ${MK_EXAMPLES} != "no"
167395cb8fbSEmmanuel VadotFILESGROUPS+=	EXAMPLES
168395cb8fbSEmmanuel Vadot.endif
169b0d29bc4SBrooks Davis
17031711131SBrooks Davis# Install a minimal default config that uses the 'tests' user.
17131711131SBrooks Davis# The examples config is not appropriate for general use.
17231711131SBrooks DavisCONFS=		kyua.conf-default
173b0d29bc4SBrooks DavisCONFSDIR=	${KYUA_CONFDIR}
17431711131SBrooks DavisCONFSNAME=	kyua.conf
175066a8c69SEmmanuel VadotCONFSDIRTAGS=	package=tests
176b0d29bc4SBrooks Davis
177daa006f8SBrooks DavisDOCS=		AUTHORS CONTRIBUTORS LICENSE
178daa006f8SBrooks DavisDOCSDIR=	${KYUA_DOCDIR}
179066a8c69SEmmanuel VadotDOCSTAGS=	package=tests
180daa006f8SBrooks Davis
181b0d29bc4SBrooks DavisEXAMPLES=	Kyuafile.top kyua.conf
182b0d29bc4SBrooks DavisEXAMPLESDIR=	${KYUA_EGDIR}
183066a8c69SEmmanuel VadotEXAMPLESTAGS=	package=tests
184b0d29bc4SBrooks Davis.PATH:		${KYUA_SRCDIR}/examples
185b0d29bc4SBrooks Davis
186b0d29bc4SBrooks DavisMISC=		context.html index.html report.css test_result.html
187b0d29bc4SBrooks DavisMISCDIR=	${KYUA_MISCDIR}
188066a8c69SEmmanuel VadotMISCTAGS=	package=tests
189b0d29bc4SBrooks Davis.PATH:		${KYUA_SRCDIR}/misc
190b0d29bc4SBrooks Davis
191b0d29bc4SBrooks DavisSTORE=		migrate_v1_v2.sql migrate_v2_v3.sql schema_v3.sql
192b0d29bc4SBrooks DavisSTOREDIR=	${KYUA_STOREDIR}
193066a8c69SEmmanuel VadotSTORETAGS=	package=tests
194b0d29bc4SBrooks Davis.PATH:		${KYUA_SRCDIR}/store
195b0d29bc4SBrooks Davis
19609ae09a9SEnji CooperCLEANFILES+=	${MAN}
197b0d29bc4SBrooks Davis.PATH: ${KYUA_SRCDIR}/doc
19809ae09a9SEnji Cooper.for man in ${MAN}
19909ae09a9SEnji Cooper${man}: ${man}.in
2009fd4b8ffSBrooks Davis	sh ${KYUA_SRCDIR}/doc/manbuild.sh \
20109ae09a9SEnji Cooper	    -v "CONFDIR=${KYUA_CONFDIR}" \
20209ae09a9SEnji Cooper	    -v "DOCDIR=${KYUA_DOCDIR}" \
20309ae09a9SEnji Cooper	    -v "EGDIR=${KYUA_EGDIR}" \
20409ae09a9SEnji Cooper	    -v "MISCDIR=${KYUA_MISCDIR}" \
20509ae09a9SEnji Cooper	    -v "PACKAGE=kyua" \
20609ae09a9SEnji Cooper	    -v "STOREDIR=${KYUA_STOREDIR}" \
20709ae09a9SEnji Cooper	    -v "TESTSDIR=${TESTSBASE}" \
20809ae09a9SEnji Cooper	    -v "VERSION=${KYUA_VERSION}" \
20909ae09a9SEnji Cooper	    ${.ALLSRC} ${.TARGET}
21009ae09a9SEnji Cooper.endfor
211b0d29bc4SBrooks Davis
212b0d29bc4SBrooks Davis.include <bsd.prog.mk>
213