Makefile.am revision 240117
1184610Salfred# 2184610Salfred# Automated Testing Framework (atf) 3184610Salfred# 4184610Salfred# Copyright (c) 2007 The NetBSD Foundation, Inc. 5184610Salfred# All rights reserved. 6184610Salfred# 7184610Salfred# Redistribution and use in source and binary forms, with or without 8184610Salfred# modification, are permitted provided that the following conditions 9184610Salfred# are met: 10184610Salfred# 1. Redistributions of source code must retain the above copyright 11184610Salfred# notice, this list of conditions and the following disclaimer. 12184610Salfred# 2. Redistributions in binary form must reproduce the above copyright 13184610Salfred# notice, this list of conditions and the following disclaimer in the 14184610Salfred# documentation and/or other materials provided with the distribution. 15184610Salfred# 16184610Salfred# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 17184610Salfred# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 18184610Salfred# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19184610Salfred# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20184610Salfred# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 21184610Salfred# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22184610Salfred# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23184610Salfred# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24184610Salfred# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25184610Salfred# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26184610Salfred# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27188942Sthompsa# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28188942Sthompsa# 29188942Sthompsa 30188942Sthompsaatf_aclocal_DATA = 31184610SalfredBUILT_SOURCES = 32184610SalfredCLEANFILES = 33184610SalfredEXTRA_DIST = 34188942Sthompsabin_PROGRAMS = 35188942Sthompsadist_man_MANS = 36188942Sthompsainclude_HEADERS = 37188942Sthompsalib_LTLIBRARIES = 38188942Sthompsalibexec_PROGRAMS = 39188942Sthompsaman_MANS = 40188942Sthompsanoinst_DATA = 41188942Sthompsanoinst_LTLIBRARIES = 42188942SthompsaINSTALLCHECK_TARGETS = 43188942SthompsaPHONY_TARGETS = 44188942Sthompsa 45188942SthompsaACLOCAL_AMFLAGS = -I m4 46184610SalfredAM_DISTCHECK_CONFIGURE_FLAGS = --enable-tools 47188942Sthompsa 48188942Sthompsainclude admin/Makefile.am.inc 49184610Salfredinclude atf-c/Makefile.am.inc 50190191Sthompsainclude atf-c++/Makefile.am.inc 51190191Sthompsainclude atf-sh/Makefile.am.inc 52184610Salfredinclude bootstrap/Makefile.am.inc 53184610Salfredinclude doc/Makefile.am.inc 54184610Salfredinclude test-programs/Makefile.am.inc 55184610Salfred 56184610Salfredif ENABLE_TOOLS 57184610Salfredinclude atf-report/Makefile.am.inc 58184610Salfredinclude atf-config/Makefile.am.inc 59184610Salfredinclude atf-run/Makefile.am.inc 60193045Sthompsainclude atf-version/Makefile.am.inc 61193045Sthompsaendif 62193045Sthompsa 63193045Sthompsa# 64193045Sthompsa# Top-level distfile documents. 65193045Sthompsa# 66193045Sthompsa 67184610Salfreddoc_DATA = AUTHORS COPYING NEWS README 68193045Sthompsanoinst_DATA += INSTALL README 69193045SthompsaEXTRA_DIST += $(doc_DATA) INSTALL README 70193045Sthompsa 71193045Sthompsa# 72193045Sthompsa# Supporting logic to run our custom testsuite. 73193045Sthompsa# 74193045Sthompsa 75184610SalfredTESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \ 76192984Sthompsa PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig 77192984Sthompsa 78192984Sthompsatestsdir = $(exec_prefix)/tests 79192984Sthompsapkgtestsdir = $(testsdir)/$(PACKAGE) 80192984Sthompsa 81192984Sthompsaif ENABLE_TOOLS 82192984SthompsaINSTALLCHECK_TARGETS += installcheck-atf 83192984SthompsaPHONY_TARGETS += installcheck-atf 84192984Sthompsainstallcheck-atf: 85192984Sthompsa logfile=$$(pwd)/installcheck.log; \ 86192984Sthompsa fifofile=$$(pwd)/installcheck.fifo; \ 87192984Sthompsa cd $(pkgtestsdir); \ 88192984Sthompsa rm -f $${fifofile}; \ 89192984Sthompsa mkfifo $${fifofile}; \ 90192984Sthompsa cat $${fifofile} | tee $${logfile} | $(TESTS_ENVIRONMENT) atf-report & \ 91184610Salfred $(TESTS_ENVIRONMENT) atf-run >>$${fifofile}; \ 92184610Salfred res=$${?}; \ 93184610Salfred wait; \ 94192984Sthompsa rm $${fifofile}; \ 95184610Salfred echo; \ 96184610Salfred echo "The verbatim output of atf-run has been saved to" \ 97184610Salfred "installcheck.log; exit was $${res}"; \ 98185087Salfred test $${res} -eq 0 99184610SalfredCLEANFILES += installcheck.fifo installcheck.log 100184610Salfredendif 101184610Salfred 102184610SalfredPHONY_TARGETS += installcheck-kyua 103184610Salfredif HAVE_KYUA 104184610Salfredinstallcheck-kyua: 105184610Salfred cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test 106184610Salfredendif 107184610Salfred 108192502Sthompsainstallcheck-targets: $(INSTALLCHECK_TARGETS) 109192502Sthompsa 110184610Salfredpkgtests_DATA = Kyuafile 111184610Salfredif ENABLE_TOOLS 112184610Salfredpkgtests_DATA += Atffile 113184610Salfredendif 114184610SalfredEXTRA_DIST += $(pkgtests_DATA) 115184610Salfred 116184610SalfredBUILD_SH_TP = \ 117192984Sthompsa echo "Creating $${dst}"; \ 118192984Sthompsa echo "\#! $(bindir)/atf-sh" >$${dst}; \ 119184610Salfred cat $${src} >>$${dst}; \ 120193644Sthompsa chmod +x $${dst} 121192984Sthompsa 122193644Sthompsa# 123184610Salfred# Custom targets. 124184610Salfred# 125184610Salfred 126184610Salfreddist-hook: forbid-dist 127184610Salfredif ENABLE_TOOLS 128184610Salfredforbid-dist: 129184610Salfred @true 130184610Salfredelse 131184610Salfredforbid-dist: 132184610Salfred @echo "Sorry; cannot make dist without the tools enabled." 133184610Salfred @echo "Please reconfigure with --enable-tools." 134184610Salfred @false 135184610Salfredendif 136184610Salfred 137184610SalfredPHONY_TARGETS += clean-all 138184610Salfredclean-all: 139184610Salfred GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh 140184610Salfred 141184610SalfredPHONY_TARGETS += release 142184610Salfredrelease: 143184610Salfred $(SH) $(srcdir)/admin/release.sh $(PACKAGE_VERSION) $(DIST_ARCHIVES) 144184610Salfred 145184610SalfredPHONY_TARGETS += release-test 146184610Salfredrelease-test: 147184610Salfred $(SH) $(srcdir)/admin/release-test.sh $(DIST_ARCHIVES) 148184610Salfred 149184610Salfred.PHONY: $(PHONY_TARGETS) 150184610Salfred 151184610Salfred# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 152184610Salfred