1# 2# Automated Testing Framework (atf) 3# 4# Copyright (c) 2007 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions 9# are met: 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 2. Redistributions in binary form must reproduce the above copyright 13# notice, this list of conditions and the following disclaimer in the 14# documentation and/or other materials provided with the distribution. 15# 16# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 17# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 18# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 21# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28# 29 30atf_aclocal_DATA = 31BUILT_SOURCES = 32CLEANFILES = 33EXTRA_DIST = 34bin_PROGRAMS = 35dist_man_MANS = 36include_HEADERS = 37lib_LTLIBRARIES = 38libexec_PROGRAMS = 39man_MANS = 40noinst_DATA = 41noinst_LTLIBRARIES = 42INSTALLCHECK_TARGETS = 43PHONY_TARGETS = 44 45ACLOCAL_AMFLAGS = -I m4 46AM_DISTCHECK_CONFIGURE_FLAGS = --enable-tools 47 48include admin/Makefile.am.inc 49include atf-c/Makefile.am.inc 50include atf-c++/Makefile.am.inc 51include atf-sh/Makefile.am.inc 52include bootstrap/Makefile.am.inc 53include doc/Makefile.am.inc 54include test-programs/Makefile.am.inc 55 56if ENABLE_TOOLS 57include atf-report/Makefile.am.inc 58include atf-config/Makefile.am.inc 59include atf-run/Makefile.am.inc 60include atf-version/Makefile.am.inc 61endif 62 63# 64# Top-level distfile documents. 65# 66 67doc_DATA = AUTHORS COPYING NEWS README 68noinst_DATA += INSTALL README 69EXTRA_DIST += $(doc_DATA) INSTALL README 70 71# 72# Supporting logic to run our custom testsuite. 73# 74 75TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \ 76 PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig 77 78testsdir = $(exec_prefix)/tests 79pkgtestsdir = $(testsdir)/$(PACKAGE) 80 81if ENABLE_TOOLS 82INSTALLCHECK_TARGETS += installcheck-atf 83PHONY_TARGETS += installcheck-atf 84installcheck-atf: 85 logfile=$$(pwd)/installcheck.log; \ 86 fifofile=$$(pwd)/installcheck.fifo; \ 87 cd $(pkgtestsdir); \ 88 rm -f $${fifofile}; \ 89 mkfifo $${fifofile}; \ 90 cat $${fifofile} | tee $${logfile} | $(TESTS_ENVIRONMENT) atf-report & \ 91 $(TESTS_ENVIRONMENT) atf-run >>$${fifofile}; \ 92 res=$${?}; \ 93 wait; \ 94 rm $${fifofile}; \ 95 echo; \ 96 echo "The verbatim output of atf-run has been saved to" \ 97 "installcheck.log; exit was $${res}"; \ 98 test $${res} -eq 0 99CLEANFILES += installcheck.fifo installcheck.log 100endif 101 102PHONY_TARGETS += installcheck-kyua 103if HAVE_KYUA 104if !ENABLE_TOOLS 105INSTALLCHECK_TARGETS += installcheck-kyua 106endif 107installcheck-kyua: 108 cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test 109endif 110 111installcheck-local: $(INSTALLCHECK_TARGETS) 112 113pkgtests_DATA = Kyuafile 114if ENABLE_TOOLS 115pkgtests_DATA += Atffile 116endif 117EXTRA_DIST += $(pkgtests_DATA) 118 119BUILD_SH_TP = \ 120 echo "Creating $${dst}"; \ 121 echo "\#! $(bindir)/atf-sh" >$${dst}; \ 122 cat $${src} >>$${dst}; \ 123 chmod +x $${dst} 124 125# 126# Custom targets. 127# 128 129dist-hook: forbid-dist 130if ENABLE_TOOLS 131forbid-dist: 132 @true 133else 134forbid-dist: 135 @echo "Sorry; cannot make dist without the tools enabled." 136 @echo "Please reconfigure with --enable-tools." 137 @false 138endif 139 140PHONY_TARGETS += clean-all 141clean-all: 142 GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh 143 144PHONY_TARGETS += release 145release: 146 $(SH) $(srcdir)/admin/release.sh $(PACKAGE_VERSION) $(DIST_ARCHIVES) 147 148PHONY_TARGETS += release-test 149release-test: 150 $(SH) $(srcdir)/admin/release-test.sh $(DIST_ARCHIVES) 151 152.PHONY: $(PHONY_TARGETS) 153 154# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 155