xref: /freebsd/contrib/bmake/unit-tests/opt-touch-jobs.mk (revision e2eeea75eb8b6dd50c1298067a0655880d186734)
1*e2eeea75SSimon J. Gerraty# $NetBSD: opt-touch-jobs.mk,v 1.1 2020/11/14 15:35:20 rillig Exp $
2*e2eeea75SSimon J. Gerraty#
3*e2eeea75SSimon J. Gerraty# Tests for the -t command line option in jobs mode.
4*e2eeea75SSimon J. Gerraty
5*e2eeea75SSimon J. Gerraty.MAKEFLAGS: -j1
6*e2eeea75SSimon J. Gerraty.MAKEFLAGS: -t
7*e2eeea75SSimon J. Gerraty.MAKEFLAGS: opt-touch-phony
8*e2eeea75SSimon J. Gerraty.MAKEFLAGS: opt-touch-join
9*e2eeea75SSimon J. Gerraty.MAKEFLAGS: opt-touch-use
10*e2eeea75SSimon J. Gerraty.MAKEFLAGS: opt-touch-make
11*e2eeea75SSimon J. Gerraty
12*e2eeea75SSimon J. Gerratyopt-touch-phony: .PHONY
13*e2eeea75SSimon J. Gerraty	: Making $@.
14*e2eeea75SSimon J. Gerraty
15*e2eeea75SSimon J. Gerratyopt-touch-join: .JOIN
16*e2eeea75SSimon J. Gerraty	: Making $@.
17*e2eeea75SSimon J. Gerraty
18*e2eeea75SSimon J. Gerratyopt-touch-use: .USE
19*e2eeea75SSimon J. Gerraty	: Making use of $@.
20*e2eeea75SSimon J. Gerraty
21*e2eeea75SSimon J. Gerraty# Even though it is listed last, in the output it appears first.
22*e2eeea75SSimon J. Gerraty# This is because it is the only node that actually needs to be run.
23*e2eeea75SSimon J. Gerraty# The "is up to date" of the other nodes happens after all jobs have
24*e2eeea75SSimon J. Gerraty# finished, by Make_Run > MakePrintStatusList > MakePrintStatus.
25*e2eeea75SSimon J. Gerratyopt-touch-make: .MAKE
26*e2eeea75SSimon J. Gerraty	: Making $@.
27*e2eeea75SSimon J. Gerraty
28*e2eeea75SSimon J. Gerraty.END:
29*e2eeea75SSimon J. Gerraty	@files=$$(ls opt-touch-* 2>/dev/null | grep -v -e '\.' -e '\*'); \
30*e2eeea75SSimon J. Gerraty	[ -z "$$files" ] || { echo "created files: $$files" 1>&2; exit 1; }
31