xref: /freebsd/contrib/bmake/unit-tests/dep-colon.mk (revision 956e45f6fb3e18b8e89b1341708db60c30bb9f27)
1*956e45f6SSimon J. Gerraty# $NetBSD: dep-colon.mk,v 1.3 2020/10/17 20:10:04 rillig Exp $
22c3632d1SSimon J. Gerraty#
32c3632d1SSimon J. Gerraty# Tests for the : operator in dependency declarations.
42c3632d1SSimon J. Gerraty
52c3632d1SSimon J. Gerraty# TODO: Implementation
62c3632d1SSimon J. Gerraty
7*956e45f6SSimon J. Gerraty# In a dependency declaration line, there may be a shell command after the
8*956e45f6SSimon J. Gerraty# sources.  It is separated by a semicolon.  This "feature" is required by
9*956e45f6SSimon J. Gerraty# POSIX.  It is seldom used, if at all.
10*956e45f6SSimon J. Gerratyall: target1
11*956e45f6SSimon J. Gerratytarget1: source1; @echo making ${.TARGET} from ${.ALLSRC}
12*956e45f6SSimon J. Gerratysource1: .PHONY
13*956e45f6SSimon J. Gerraty
14*956e45f6SSimon J. Gerraty# The semicolon for separating the sources from the creation commands must
15*956e45f6SSimon J. Gerraty# appear at the top-level.  The semicolons inside the :S;1;2; modifier are
16*956e45f6SSimon J. Gerraty# skipped when looking for the semicolon that separates the sources from
17*956e45f6SSimon J. Gerraty# the commands.
18*956e45f6SSimon J. Gerratyall: target2
19*956e45f6SSimon J. Gerratytarget2: source${:U1:S;1;2;}; @echo making ${.TARGET} from ${.ALLSRC}
20*956e45f6SSimon J. Gerratysource2: .PHONY
21