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