freebsd-src/mk/prlist.mk
Simon J. Gerraty 2935fe8237 Import bmake-20211212
Relevant changes see ChangeLog for details:

Add support for ${.SUFFIXES} as read-only variable.

Fix memory leak in cond.c

Punt on write errors - ENOSPC etc.

Lots of code refactoring, rework to reduce memory allocations.

More unit-tests.
2021-12-17 23:27:22 -08:00

37 lines
916 B
Makefile

# $Id: prlist.mk,v 1.5 2021/12/08 05:56:50 sjg Exp $
#
# @(#) Copyright (c) 2006, Simon J. Gerraty
#
# This file is provided in the hope that it will
# be of use. There is absolutely NO WARRANTY.
# Permission to copy, redistribute or otherwise
# use this file is hereby granted provided that
# the above copyright notice and this notice are
# left intact.
#
# Please send copies of changes and bug-fixes to:
# sjg@crufty.net
#
.if !target(__${.PARSEFILE}__)
__${.PARSEFILE}__: .NOTMAIN
# this needs to be included after all the lists it will process
# are defined - which is why it is a separate file.
# Usage looks like:
# MAKEFLAGS= ${.MAKE} -f ${MAKEFILE} prlist.SOMETHING_HUGE | xargs whatever
#
.if make(prlist.*)
.for t in ${.TARGETS:Mprlist.*:E}
.if empty($t)
prlist.$t:
.else
prlist.$t: ${$t:O:u:S,^,prlist-,}
${$t:O:u:S,^,prlist-,}: .PHONY
@echo "${.TARGET:S,prlist-,,}"
.endif
.endfor
.endif
.endif