]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/opt-touch-jobs.mk
bc: upgrade to version 3.3.4
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / opt-touch-jobs.mk
1 # $NetBSD: opt-touch-jobs.mk,v 1.2 2021/01/30 12:14:08 rillig Exp $
2 #
3 # Tests for the -t command line option in jobs mode.
4
5 .MAKEFLAGS: -j1
6 .MAKEFLAGS: -t
7 .MAKEFLAGS: opt-touch-phony
8 .MAKEFLAGS: opt-touch-join
9 .MAKEFLAGS: opt-touch-use
10 .MAKEFLAGS: opt-touch-make
11
12 # .PHONY targets are not touched since they do not represent actual files.
13 # See Job_Touch.
14 opt-touch-phony: .PHONY
15         : Making $@.
16
17 # .JOIN targets are not touched since they do not represent actual files.
18 # See Job_Touch.
19 opt-touch-join: .JOIN
20         : Making $@.
21
22 # .USE targets are not touched since they do not represent actual files.
23 # See Job_Touch.
24 opt-touch-use: .USE
25         : Making use of $@.
26
27 # Even though it is listed last, in the output it appears first.
28 # This is because it is the only node that actually needs to be run.
29 # The "is up to date" of the other nodes happens after all jobs have
30 # finished, by Make_Run > MakePrintStatusList > MakePrintStatus.
31 opt-touch-make: .MAKE
32         : Making $@.
33
34 .END:
35         @files=$$(ls opt-touch-* 2>/dev/null | grep -v -e '\.' -e '\*'); \
36         [ -z "$$files" ] || { echo "created files: $$files" 1>&2; exit 1; }