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