mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
![Simon J. Gerraty](/assets/img/avatar_default.png)
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o Fix building and unit-tests on non-BSD. o More code cleanup and refactoring. o More unit tests
29 lines
749 B
Makefile
29 lines
749 B
Makefile
# $NetBSD: depsrc-usebefore.mk,v 1.6 2020/11/15 20:20:58 rillig Exp $
|
|
#
|
|
# Tests for the special source .USEBEFORE in dependency declarations,
|
|
# which allows to prepend common commands to other targets.
|
|
#
|
|
# See also:
|
|
# .USE
|
|
# depsrc-use.mk
|
|
|
|
all: action directly
|
|
|
|
first: .USEBEFORE
|
|
@echo first 1 # Using ${.TARGET} here would expand to "action"
|
|
@echo first 2 # Using ${.TARGET} here would expand to "action"
|
|
|
|
second: .USEBEFORE
|
|
@echo second 1
|
|
@echo second 2
|
|
|
|
# It is possible but uncommon to have a .USEBEFORE target with no commands.
|
|
# This may happen as the result of expanding a .for loop.
|
|
empty: .USEBEFORE
|
|
|
|
# It is possible but uncommon to directly make a .USEBEFORE target.
|
|
directly: .USEBEFORE
|
|
@echo directly
|
|
|
|
action: second first empty
|