freebsd-nq/contrib/bmake/unit-tests/depsrc-usebefore-double-colon.mk
Simon J. Gerraty 2c3632d14f Update to bmake-20200902
Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
  used to run scripts (as defined by  the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
  variable assignments so that file and line number are reported for
  variable parse errors.
2020-09-05 19:29:42 +00:00

31 lines
964 B
Makefile
Executable File

# $NetBSD: depsrc-usebefore-double-colon.mk,v 1.1 2020/08/22 08:29:13 rillig Exp $
#
# Tests for the special source .USEBEFORE in dependency declarations,
# combined with the double-colon dependency operator.
all: action
# The dependency operator :: allows commands to be added later to the same
# target.
double-colon:: .USEBEFORE
@echo double-colon early 1
# This command is ignored, which kind of makes sense since this dependency
# declaration has no .USEBEFORE source.
double-colon::
@echo double-colon early 2
# XXX: This command is ignored even though it has a .USEBEFORE source.
# This is unexpected.
double-colon:: .USEBEFORE
@echo double-colon early 3
# At this point, the commands from the .USEBEFORE targets are copied to
# the "action" target.
action: double-colon
# This command is not added to the "action" target since it comes too late.
# The commands had been copied in the previous line already.
double-colon::
@echo double-colon late