xref: /freebsd/contrib/bmake/unit-tests/depsrc-meta.mk (revision 95eb4b873b6a8b527c5bd78d7191975dfca38998)
1# $NetBSD: depsrc-meta.mk,v 1.7 2022/03/02 19:32:15 sjg Exp $
2#
3# Tests for the special source .META in dependency declarations.
4
5# TODO: Implementation
6# TODO: Explanation
7
8.MAIN: all
9
10.if make(actual-test)
11.MAKEFLAGS: -dM
12.MAKE.MODE=	meta curDirOk=true nofilemon
13.endif
14
15actual-test: depsrc-meta-target
16depsrc-meta-target: .META
17	@> ${.TARGET}-file
18	@rm -f ${.TARGET}-file
19
20check-results:
21	@echo 'Targets from meta mode${.MAKE.JOBS:D in jobs mode}:'
22	@awk '/^TARGET/ { print "| " $$0 }' depsrc-meta-target.meta
23	@rm depsrc-meta-target.meta
24
25all:
26	@${MAKE} -r -f ${MAKEFILE} actual-test
27	@${MAKE} -r -f ${MAKEFILE} check-results
28
29	@${MAKE} -r -f ${MAKEFILE} actual-test -j1
30	@${MAKE} -r -f ${MAKEFILE} check-results -j1
31