1# $Id: genfiles.mk,v 1.5 2025/08/09 22:42:24 sjg Exp $ 2# 3# @(#) Copyright (c) 2024-2025, Simon J. Gerraty 4# 5# SPDX-License-Identifier: BSD-2-Clause 6# 7# Please send copies of changes and bug-fixes to: 8# sjg@crufty.net 9# 10 11# Pipe the sources though egrep -v if EXCLUDES.${.TARGET} is defined 12# and/or sed if SED_CMDS.${.TARGET} is defined 13# Note: this works best in meta mode as any change to EXCLUDES or 14# SED_CMDS will make the target out-of-date. 15_GENFILES_USE: .USE 16 @cat ${SRCS.${.TARGET}:U${.ALLSRC:u}} \ 17 ${EXCLUDES.${.TARGET}:D| ${EGREP:Uegrep} -v '${EXCLUDS.${.TARGET}:ts|}'} \ 18 ${SED_CMDS.${.TARGET}:D| ${SED:Used} ${SED_CMDS.${.TARGET}}} \ 19 ${FILTER.${.TARGET}:D| ${FILTER.${.TARGET}}} \ 20 > ${.TARGET} 21