freebsd-src/unit-tests/deptgt-suffixes.mk
Simon J. Gerraty 8e11a9b425 Import bmake-20210110
Quite a lot of churn on style, but lots of
good work refactoring complicated functions
and lots more unit-tests.
Thanks mostly to rillig at NetBSD

Some interesting entries from ChangeLog

o .MAKE.{UID,GID} represent uid and gid running make.

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
  checks in InitObjdir.  Explicit .OBJDIR target always allows
  read-only directory.

o add more unit tests for META MODE

Change-Id: I4d3bcf08b4c864d98b343f602efe5a75dbfa7a94
2021-01-13 17:24:34 -08:00

36 lines
939 B
Makefile

# $NetBSD: deptgt-suffixes.mk,v 1.4 2020/11/21 21:54:42 rillig Exp $
#
# Tests for the special target .SUFFIXES in dependency declarations.
#
# See also:
# varname-dot-includes.mk
# varname-dot-libs.mk
.MAKEFLAGS: -dg1
.MAIN: all
.SUFFIXES: .custom-null
# TODO: What is the effect of this? How is it useful?
.NULL: .custom-null
.PATH.custom-null: . ..
# The order in which the suffixes are listed doesn't matter.
# Here, they are listed from source to target, just like in the transformation
# rule below it.
.SUFFIXES: .src-left .tgt-right
deptgt-suffixes.src-left:
: Making ${.TARGET} out of nothing.
.src-left.tgt-right:
: Making ${.TARGET} from ${.IMPSRC}.
all: deptgt-suffixes.tgt-right
# Here, the target is listed earlier than the source.
.SUFFIXES: .tgt-left .src-right
deptgt-suffixes.src-right:
: Making ${.TARGET} out of nothing.
.src-right.tgt-left:
: Making ${.TARGET} from ${.IMPSRC}.
all: deptgt-suffixes.tgt-left