1# $NetBSD: dep-colon.mk,v 1.3 2020/10/17 20:10:04 rillig Exp $
2#
3# Tests for the : operator in dependency declarations.
4
5# TODO: Implementation
6
7# In a dependency declaration line, there may be a shell command after the
8# sources.  It is separated by a semicolon.  This "feature" is required by
9# POSIX.  It is seldom used, if at all.
10all: target1
11target1: source1; @echo making ${.TARGET} from ${.ALLSRC}
12source1: .PHONY
13
14# The semicolon for separating the sources from the creation commands must
15# appear at the top-level.  The semicolons inside the :S;1;2; modifier are
16# skipped when looking for the semicolon that separates the sources from
17# the commands.
18all: target2
19target2: source${:U1:S;1;2;}; @echo making ${.TARGET} from ${.ALLSRC}
20source2: .PHONY
21