NetBSD/usr.bin/xlint/lint1/Makefile.err-msgs-h

15 lines
422 B
Makefile

# $NetBSD: Makefile.err-msgs-h,v 1.3 2021/04/10 23:51:37 rillig Exp $
err-msgs.h: err.c Makefile.err-msgs-h
${_MKTARGET_CREATE}
sp='[[:space:]]*'; \
from="^$$sp\(\".*\"\)\,$$sp/\*$$sp\([0-9][0-9]*\)$$sp\*/\$$"; \
${TOOL_SED} -n -e "s,$$from,#define MSG_\2 \1,p" < ${.ALLSRC:M*err.c} > ${.TARGET}.tmp
mv -f ${.TARGET}.tmp ${.TARGET}
CLEANFILES+= err-msgs.h
DPSRCS+= err-msgs.h
CPPFLAGS+= -I.
externs1.h: err-msgs.h