xref: /freebsd/contrib/bmake/mk/prlist.mk (revision 5b56413d04e608379c9a306373554a8e4d321bc0)
1# SPDX-License-Identifier: BSD-2-Clause
2#
3# $Id: prlist.mk,v 1.6 2024/02/17 17:26:57 sjg Exp $
4#
5#	@(#) Copyright (c) 2006, Simon J. Gerraty
6#
7#	This file is provided in the hope that it will
8#	be of use.  There is absolutely NO WARRANTY.
9#	Permission to copy, redistribute or otherwise
10#	use this file is hereby granted provided that
11#	the above copyright notice and this notice are
12#	left intact.
13#
14#	Please send copies of changes and bug-fixes to:
15#	sjg@crufty.net
16#
17
18.if !target(__${.PARSEFILE}__)
19__${.PARSEFILE}__: .NOTMAIN
20
21# this needs to be included after all the lists it will process
22# are defined - which is why it is a separate file.
23# Usage looks like:
24#   MAKEFLAGS= ${.MAKE} -f ${MAKEFILE} prlist.SOMETHING_HUGE | xargs whatever
25#
26.if make(prlist.*)
27.for t in ${.TARGETS:Mprlist.*:E}
28.if empty($t)
29prlist.$t:
30.else
31prlist.$t:	${$t:O:u:S,^,prlist-,}
32${$t:O:u:S,^,prlist-,}: .PHONY
33	@echo "${.TARGET:S,prlist-,,}"
34.endif
35.endfor
36.endif
37
38.endif
39