1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5KYUA_CONFDIR= /etc/kyua 6KYUA_DOCDIR= /usr/share/doc/kyua 7KYUA_EGDIR= /usr/share/examples/kyua 8KYUA_MISCDIR= /usr/share/kyua/misc 9KYUA_STOREDIR= /usr/share/kyua/store 10KYUA_VERSION= 0.13 11 12KYUA_SRCDIR= ${SRCTOP}/contrib/kyua 13.PATH: ${KYUA_SRCDIR} 14 15PACKAGE= tests 16PROG_CXX= kyua 17SRCS= main.cpp 18LIBADD= lutok sqlite3 19 20MAN= kyua-about.1 \ 21 kyua-config.1 \ 22 kyua-db-exec.1 \ 23 kyua-db-migrate.1 \ 24 kyua-debug.1 \ 25 kyua-help.1 \ 26 kyua-list.1 \ 27 kyua-report-html.1 \ 28 kyua-report-junit.1 \ 29 kyua-report.1 \ 30 kyua-test.1 \ 31 kyua.1 \ 32 kyua.conf.5 \ 33 kyuafile.5 34 35CFLAGS+= -I${KYUA_SRCDIR} -I${.CURDIR} 36CFLAGS+= -I${SRCTOP}/contrib/lutok/include 37CFLAGS+= -I${SRCTOP}/contrib/sqlite3 38# kyua uses auto_ptr 39CFLAGS+= -Wno-deprecated-declarations 40CXXSTD= c++11 41CFLAGS+= -DHAVE_CONFIG_H 42 43# We compile the kyua libraries as part of the main executable as this saves 44# compile time and we don't install them anyway. 45CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" \ 46 -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ 47 -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ 48 -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ 49 -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ 50 -DKYUA_PLATFORM=\"${MACHINE}\" \ 51 -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" \ 52 -DPACKAGE=\"kyua\" \ 53 -DPACKAGE_NAME=\"Kyua\" \ 54 -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ 55 -DVERSION=\"${KYUA_VERSION}\" 56 57SRCS+= utils/datetime.cpp \ 58 utils/env.cpp \ 59 utils/memory.cpp \ 60 utils/passwd.cpp \ 61 utils/sanity.cpp \ 62 utils/stacktrace.cpp \ 63 utils/stream.cpp \ 64 utils/units.cpp \ 65 utils/cmdline/base_command.cpp \ 66 utils/cmdline/exceptions.cpp \ 67 utils/cmdline/globals.cpp \ 68 utils/cmdline/options.cpp \ 69 utils/cmdline/parser.cpp \ 70 utils/cmdline/ui.cpp \ 71 utils/cmdline/ui_mock.cpp \ 72 utils/config/exceptions.cpp \ 73 utils/config/keys.cpp \ 74 utils/config/lua_module.cpp \ 75 utils/config/nodes.cpp \ 76 utils/config/parser.cpp \ 77 utils/config/tree.cpp \ 78 utils/format/exceptions.cpp \ 79 utils/format/formatter.cpp \ 80 utils/fs/auto_cleaners.cpp \ 81 utils/fs/directory.cpp \ 82 utils/fs/exceptions.cpp \ 83 utils/fs/lua_module.cpp \ 84 utils/fs/operations.cpp \ 85 utils/fs/path.cpp \ 86 utils/logging/operations.cpp \ 87 utils/process/child.cpp \ 88 utils/process/deadline_killer.cpp \ 89 utils/process/exceptions.cpp \ 90 utils/process/executor.cpp \ 91 utils/process/fdstream.cpp \ 92 utils/process/isolation.cpp \ 93 utils/process/operations.cpp \ 94 utils/process/status.cpp \ 95 utils/process/system.cpp \ 96 utils/process/systembuf.cpp \ 97 utils/signals/exceptions.cpp \ 98 utils/signals/interrupts.cpp \ 99 utils/signals/misc.cpp \ 100 utils/signals/programmer.cpp \ 101 utils/signals/timer.cpp \ 102 utils/sqlite/c_gate.cpp \ 103 utils/sqlite/database.cpp \ 104 utils/sqlite/exceptions.cpp \ 105 utils/sqlite/statement.cpp \ 106 utils/sqlite/transaction.cpp \ 107 utils/text/exceptions.cpp \ 108 utils/text/operations.cpp \ 109 utils/text/regex.cpp \ 110 utils/text/table.cpp \ 111 utils/text/templates.cpp 112 113SRCS+= model/context.cpp \ 114 model/exceptions.cpp \ 115 model/metadata.cpp \ 116 model/test_case.cpp \ 117 model/test_program.cpp \ 118 model/test_result.cpp 119 120SRCS+= engine/atf.cpp \ 121 engine/atf_list.cpp \ 122 engine/atf_result.cpp \ 123 engine/config.cpp \ 124 engine/exceptions.cpp \ 125 engine/filters.cpp \ 126 engine/kyuafile.cpp \ 127 engine/plain.cpp \ 128 engine/requirements.cpp \ 129 engine/scanner.cpp \ 130 engine/tap.cpp \ 131 engine/tap_parser.cpp \ 132 engine/scheduler.cpp 133 134SRCS+= store/dbtypes.cpp \ 135 store/exceptions.cpp \ 136 store/layout.cpp \ 137 store/metadata.cpp \ 138 store/migrate.cpp \ 139 store/read_backend.cpp \ 140 store/read_transaction.cpp \ 141 store/write_backend.cpp \ 142 store/write_transaction.cpp 143 144SRCS+= drivers/debug_test.cpp \ 145 drivers/list_tests.cpp \ 146 drivers/report_junit.cpp \ 147 drivers/run_tests.cpp \ 148 drivers/scan_results.cpp 149 150SRCS+= cli/cmd_about.cpp \ 151 cli/cmd_config.cpp \ 152 cli/cmd_db_exec.cpp \ 153 cli/cmd_db_migrate.cpp \ 154 cli/cmd_debug.cpp \ 155 cli/cmd_help.cpp \ 156 cli/cmd_list.cpp \ 157 cli/cmd_report.cpp \ 158 cli/cmd_report_html.cpp \ 159 cli/cmd_report_junit.cpp \ 160 cli/cmd_test.cpp \ 161 cli/common.cpp \ 162 cli/config.cpp \ 163 cli/main.cpp 164 165FILESGROUPS= DOCS MISC STORE 166 167.if ${MK_EXAMPLES} != "no" 168FILESGROUPS+= EXAMPLES 169.endif 170 171# Install a minimal default config that uses the 'tests' user. 172# The examples config is not appropriate for general use. 173CONFS= kyua.conf-default 174CONFSDIR= ${KYUA_CONFDIR} 175CONFSNAME= kyua.conf 176CONFSDIRTAGS= package=tests 177 178DOCS= AUTHORS CONTRIBUTORS LICENSE 179DOCSDIR= ${KYUA_DOCDIR} 180DOCSTAGS= package=tests 181 182EXAMPLES= Kyuafile.top kyua.conf 183EXAMPLESDIR= ${KYUA_EGDIR} 184EXAMPLESTAGS= package=tests 185.PATH: ${KYUA_SRCDIR}/examples 186 187MISC= context.html index.html report.css test_result.html 188MISCDIR= ${KYUA_MISCDIR} 189MISCTAGS= package=tests 190.PATH: ${KYUA_SRCDIR}/misc 191 192STORE= migrate_v1_v2.sql migrate_v2_v3.sql schema_v3.sql 193STOREDIR= ${KYUA_STOREDIR} 194STORETAGS= package=tests 195.PATH: ${KYUA_SRCDIR}/store 196 197CLEANFILES+= ${MAN} 198.PATH: ${KYUA_SRCDIR}/doc 199.for man in ${MAN} 200${man}: ${man}.in 201 sh ${KYUA_SRCDIR}/doc/manbuild.sh \ 202 -v "CONFDIR=${KYUA_CONFDIR}" \ 203 -v "DOCDIR=${KYUA_DOCDIR}" \ 204 -v "EGDIR=${KYUA_EGDIR}" \ 205 -v "MISCDIR=${KYUA_MISCDIR}" \ 206 -v "PACKAGE=kyua" \ 207 -v "STOREDIR=${KYUA_STOREDIR}" \ 208 -v "TESTSDIR=${TESTSBASE}" \ 209 -v "VERSION=${KYUA_VERSION}" \ 210 ${.ALLSRC} ${.TARGET} 211.endfor 212 213.include <bsd.prog.mk> 214