diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-05-27 23:01:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-05-27 23:01:22 +0000 |
commit | eb1ca9bf83835afa564afb5fe71fde464a770b69 (patch) | |
tree | c59ab5691817dff96d56ca2e3037d210034f62b7 /share/mk/sys.mk | |
parent | 83acb5e2c36b12eeb78bfff67d27df8062157dac (diff) |
support 'make lint' in dirs which contain .y and .l files, help from naddy
Diffstat (limited to 'share/mk/sys.mk')
-rw-r--r-- | share/mk/sys.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/share/mk/sys.mk b/share/mk/sys.mk index fcea85390b6..dee35827dac 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,4 +1,4 @@ -# $OpenBSD: sys.mk,v 1.48 2006/04/01 05:53:39 deraadt Exp $ +# $OpenBSD: sys.mk,v 1.49 2006/05/27 23:01:21 deraadt Exp $ # $NetBSD: sys.mk,v 1.27 1996/04/10 05:47:19 mycroft Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -193,6 +193,11 @@ CTAGS?= /usr/bin/ctags ${LEX.l} ${.IMPSRC} ${COMPILE.c} -o ${.TARGET} lex.yy.c rm -f lex.yy.c +.l.ln: + ${LEX.l} ${.IMPSRC} + mv lex.yy.c ${.TARGET:R}.c + ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.TARGET:R}.c + rm -f ${.TARGET:R}.c # Yacc .y: @@ -206,6 +211,11 @@ CTAGS?= /usr/bin/ctags ${YACC.y} ${.IMPSRC} ${COMPILE.c} -o ${.TARGET} y.tab.c rm -f y.tab.c +.y.ln: + ${YACC.y} ${.IMPSRC} + mv y.tab.c ${.TARGET:R}.c + ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.TARGET:R}.c + rm -f ${.TARGET:R}.c # Shell .sh: |