head	1.6;
access;
symbols
	RELENG_9:1.6.0.2;
locks; strict;
comment	@# @;


1.6
date	2013.04.03.00.46.16;	author svnexp;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2013.02.05.00.32.21;	author svnexp;	state Exp;
branches;
next	1.4;

1.4
date	2013.02.02.00.55.37;	author svnexp;	state Exp;
branches;
next	1.3;

1.3
date	2012.11.17.04.43.43;	author svnexp;	state Exp;
branches;
next	1.2;

1.2
date	2012.11.17.01.54.14;	author svnexp;	state Exp;
branches;
next	1.1;

1.1
date	2012.10.06.19.19.21;	author marcel;	state Exp;
branches;
next	;

1.6.2.1
date	2013.04.03.00.46.16;	author svnexp;	state dead;
branches;
next	1.6.2.2;

1.6.2.2
date	2014.03.16.00.01.48;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249033
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
# $FreeBSD: head/usr.bin/bmake/unit-tests/Makefile 249033 2013-04-02 21:31:11Z sjg $

SRCTOP?= ${.CURDIR:H:H:H}

# $Id: Makefile.in,v 1.42 2013/03/23 02:31:13 sjg Exp $
#
# $NetBSD: Makefile,v 1.36 2013/03/22 16:36:46 sjg Exp $
#
# Unit tests for make(1)
# The main targets are:
# 
# all:	run all the tests
# test:	run 'all', capture output and compare to expected results
# accept: move generated output to expected results
#
# Adding a test case.  
# Each feature should get its own set of tests in its own suitably
# named makefile which should be added to SUBFILES to hook it in.
# 

srcdir= ${SRCTOP}/contrib/bmake/unit-tests

.MAIN: all

UNIT_TESTS:= ${srcdir}

# Simple sub-makefiles - we run them as a black box
# keep the list sorted.
SUBFILES= \
	comment \
	cond1 \
	error \
	export \
	export-all \
	export-env \
	doterror \
	dotwait \
	forloop \
	forsubst \
	hash \
	misc \
	moderrs \
	modmatch \
	modmisc \
	modorder \
	modts \
	modword \
	order \
	phony-end \
	posix \
	qequals \
	sysv \
	ternary \
	unexport \
	unexport-env \
	varcmd

all: ${SUBFILES}

flags.doterror=
flags.order=-j1

# the tests are actually done with sub-makes.
.PHONY: ${SUBFILES}
.PRECIOUS: ${SUBFILES}
${SUBFILES}:
	-@@${.MAKE} ${flags.$@@:U-k} -f ${UNIT_TESTS}/$@@

clean:
	rm -f *.out *.fail *.core

.sinclude <bsd.obj.mk>

TEST_MAKE?= ${.MAKE}
TOOL_SED?= sed
TOOL_TR?= tr
TOOL_DIFF?= diff
DIFF_FLAGS?= -u

.if defined(.PARSEDIR)
# ensure consistent results from sort(1)
LC_ALL= C
LANG= C
.export LANG LC_ALL
.endif

# The driver.
# We always pretend .MAKE was called 'make' 
# and strip ${.CURDIR}/ from the output
# and replace anything after 'stopped in' with unit-tests
# so the results can be compared.
test:
	@@echo "${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1"
	@@cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
	${TOOL_TR} -d '\015' | \
	${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}:,make:,' \
	-e '/stopped/s, /.*, unit-tests,' \
	-e 's,${.CURDIR:C/\./\\\./g}/,,g' \
	-e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' > ${.TARGET}.out || { \
	tail ${.TARGET}.out; mv ${.TARGET}.out ${.TARGET}.fail; exit 1; }
	${TOOL_DIFF} ${DIFF_FLAGS} ${UNIT_TESTS}/${.TARGET}.exp ${.TARGET}.out

accept:
	mv test.out ${srcdir}/test.exp

@


1.6.2.1
log
@file Makefile was added on branch RELENG_9 on 2014-03-16 00:01:48 +0000
@
text
@d1 108
@


1.6.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/263212
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 109
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
# $FreeBSD: stable/9/usr.bin/bmake/unit-tests/Makefile 255253 2013-09-05 15:57:26Z sjg $

SRCTOP?= ${.CURDIR:H:H:H}

# $Id: Makefile.in,v 1.44 2013/08/28 22:09:29 sjg Exp $
#
# $NetBSD: Makefile,v 1.38 2013/08/28 21:56:50 sjg Exp $
#
# Unit tests for make(1)
# The main targets are:
# 
# all:	run all the tests
# test:	run 'all', capture output and compare to expected results
# accept: move generated output to expected results
#
# Adding a test case.  
# Each feature should get its own set of tests in its own suitably
# named makefile which should be added to SUBFILES to hook it in.
# 

srcdir= ${SRCTOP}/contrib/bmake/unit-tests

.MAIN: all

UNIT_TESTS:= ${srcdir}

# Simple sub-makefiles - we run them as a black box
# keep the list sorted.
SUBFILES= \
	comment \
	cond1 \
	error \
	export \
	export-all \
	export-env \
	doterror \
	dotwait \
	forloop \
	forsubst \
	hash \
	misc \
	moderrs \
	modmatch \
	modmisc \
	modorder \
	modts \
	modword \
	order \
	phony-end \
	posix \
	qequals \
	sunshcmd \
	sysv \
	ternary \
	unexport \
	unexport-env \
	varcmd

all: ${SUBFILES}

flags.doterror=
flags.order=-j1

# the tests are actually done with sub-makes.
.PHONY: ${SUBFILES}
.PRECIOUS: ${SUBFILES}
${SUBFILES}:
	-@@${.MAKE} ${flags.$@@:U-k} -f ${UNIT_TESTS}/$@@

clean:
	rm -f *.out *.fail *.core

.sinclude <bsd.obj.mk>

TEST_MAKE?= ${.MAKE}
TOOL_SED?= sed
TOOL_TR?= tr
TOOL_DIFF?= diff
DIFF_FLAGS?= -u

.if defined(.PARSEDIR)
# ensure consistent results from sort(1)
LC_ALL= C
LANG= C
.export LANG LC_ALL
.endif

# The driver.
# We always pretend .MAKE was called 'make' 
# and strip ${.CURDIR}/ from the output
# and replace anything after 'stopped in' with unit-tests
# so the results can be compared.
test:
	@@echo "${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1"
	@@cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
	${TOOL_TR} -d '\015' | \
	${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[^:]*:,make:,' \
	-e '/stopped/s, /.*, unit-tests,' \
	-e 's,${.CURDIR:C/\./\\\./g}/,,g' \
	-e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' > ${.TARGET}.out || { \
	tail ${.TARGET}.out; mv ${.TARGET}.out ${.TARGET}.fail; exit 1; }
	${TOOL_DIFF} ${DIFF_FLAGS} ${UNIT_TESTS}/${.TARGET}.exp ${.TARGET}.out

accept:
	mv test.out ${srcdir}/test.exp

@


1.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246325
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/unit-tests/Makefile 246325 2013-02-04 17:41:17Z sjg $
d8 1
a8 1
# $Id: Makefile.in,v 1.40 2012/12/28 21:28:19 sjg Exp $
d10 1
a10 1
# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $
d38 1
@


1.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246223
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/unit-tests/Makefile 246223 2013-02-01 22:55:27Z sjg $
d82 1
d87 1
@


1.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/243115
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243115 | sjg | 2012-11-16 01:37:25 +0000 (Fri, 16 Nov 2012) | 5 lines
## SVN ##
## SVN ## Merge bmake-20121111
## SVN ## Also pay attention to MK_SHARED_TOOLCHAIN.
## SVN ##
## SVN ## Approved by:	marcel (mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/unit-tests/Makefile 243115 2012-11-16 01:37:25Z sjg $
d8 1
a8 1
# $Id: Makefile.in,v 1.39 2012/11/09 19:16:10 sjg Exp $
@


1.2
log
@Switching exporter and resync
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/unit-tests/Makefile 241279 2012-10-06 19:19:21Z marcel $
d8 1
a8 1
# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $
d10 1
a10 1
# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $
d50 1
d63 1
@


1.1
log
@SVN rev 241279 on 2012-10-06 19:19:21Z by marcel

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE.  The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here.  The option will be removed in due time.

Submitted by:	Simon Gerraty (sjg@@juniper.net)
@
text
@d4 1
a4 1
# $FreeBSD$
@

