mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00:00
![Simon J. Gerraty](/assets/img/avatar_default.png)
Relevant/interesting changes (see ChangeLog for more): o variables like .newline and .MAKE.{GID,PID,PPID,UID} should be read-only. o .[NO]READONLY: for control of read-only variables o .SYSPATH: for controlling the path searched for makefiles o allow for white-space between command specifiers @+- o add more details to warning 'Extra targets ignored' o make.1: sync list of built-in variables with reality sort list of built-in variables o cond.c: add more details to error message for numeric comparison o job.c: fix handling of null bytes in output o Allow .break to terminate a .for loop early o var.c: fix out-of-bounds errors when parsing o fix exit status for '-q' (since 1994)
44 lines
1.1 KiB
Makefile
44 lines
1.1 KiB
Makefile
# $NetBSD: include-main.mk,v 1.8 2023/01/19 23:26:14 rillig Exp $
|
|
#
|
|
# Until 2020-09-05, the .INCLUDEDFROMFILE magic variable did not behave
|
|
# as described in the manual page.
|
|
#
|
|
# The manual page says that it is the "filename of the file this Makefile
|
|
# was included from", while before 2020-09-05 it was the "filename in which
|
|
# the latest .include happened". See parse.c, function SetParseFile.
|
|
#
|
|
# Since 2020-09-05, the .INCLUDEDFROMDIR and .INCLUDEDFROMFILE variables
|
|
# properly handle nested includes and even .for loops.
|
|
|
|
.if !defined(.INCLUDEDFROMFILE)
|
|
. info main-before-ok
|
|
.else
|
|
. warning main-before-fail(${.INCLUDEDFROMFILE})
|
|
.endif
|
|
|
|
.for i in once
|
|
. if !defined(.INCLUDEDFROMFILE)
|
|
. info main-before-for-ok
|
|
. else
|
|
. warning main-before-for-fail(${.INCLUDEDFROMFILE})
|
|
. endif
|
|
.endfor
|
|
|
|
.include "include-sub.inc"
|
|
|
|
.if !defined(.INCLUDEDFROMFILE)
|
|
. info main-after-ok
|
|
.else
|
|
. warning main-after-fail(${.INCLUDEDFROMFILE})
|
|
.endif
|
|
|
|
.for i in once
|
|
. if !defined(.INCLUDEDFROMFILE)
|
|
. info main-after-for-ok
|
|
. else
|
|
. warning main-after-for-fail(${.INCLUDEDFROMFILE})
|
|
. endif
|
|
.endfor
|
|
|
|
all: # nothing
|