${_+_} in a BSD Makefile ${_+_} in a BSD Makefile unix unix

${_+_} in a BSD Makefile


${_+_} refers to a variable. It is defined in share/mk/sys.mk which gets read by the make process. So user Zack pointed to the right direction in his comment; this variable expands to a + sign in some cases, depending on the flags given to make:

.if !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n"_+_     ?=.else_+_     ?=  +.endif

The rationale for this can be found in the comment for this commit and this one, where the symbol was introduced:

Make make recurse into sub-directories and sub-makes when giventwo -n flags.  If only one -n flag is given the old behaviouris retained (POLA).