freebsd-skq/contrib/bmake/mk/prlist.mk
Simon J. Gerraty 2c3632d14f Update to bmake-20200902
Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
  used to run scripts (as defined by  the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
  variable assignments so that file and line number are reported for
  variable parse errors.
2020-09-05 19:29:42 +00:00

37 lines
907 B
Makefile

# $Id: prlist.mk,v 1.4 2020/08/19 17:51:53 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}__:
# 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