diff options
Diffstat (limited to 'contrib/bmake/mk/genfiles.mk')
| -rw-r--r-- | contrib/bmake/mk/genfiles.mk | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/bmake/mk/genfiles.mk b/contrib/bmake/mk/genfiles.mk new file mode 100644 index 000000000000..4299206cca9f --- /dev/null +++ b/contrib/bmake/mk/genfiles.mk @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# $Id: genfiles.mk,v 1.4 2025/04/18 00:04:41 sjg Exp $ +# +# @(#) Copyright (c) 2024-2025, 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 +# + +# Pipe the sources though egrep -v if EXCLUDES.${.TARGET} is defined +# and/or sed if SED_CMDS.${.TARGET} is defined +# Note: this works best in meta mode as any change to EXCLUDES or +# SED_CMDS will make the target out-of-date. +_GENFILES_USE: .USE + @cat ${SRCS.${.TARGET}:U${.ALLSRC:u}} \ + ${EXCLUDES.${.TARGET}:D| ${EGREP:Uegrep} -v '${EXCLUDS.${.TARGET}:ts|}'} \ + ${SED_CMDS.${.TARGET}:D| ${SED:Used} ${SED_CMDS.${.TARGET}}} \ + ${FILTER.${.TARGET}:D| ${FILTER.${.TARGET}}} \ + > ${.TARGET} |
