Subject: lex
To: None <current-users@NetBSD.ORG>
From: Mike Long <mike.long@analog.com>
List: current-users
Date: 06/28/1995 10:31:49
> Wouldn't it be a good idea to have each makefile check that the includes
> *are* up-to-date? This would save:

This discussion gave me an idea about how to handle the problems
people are having with lex.  I think a possible solution would be an
addition to src/usr.bin/lex/Makefile something like:

FLEX_VERSION=2.5.2

scan.c: scan.l initscan.c
	if [ "X`$(LEX) -V | cut '-d ' -f3`" != "X$(FLEX_VERSION)" ]; then
	  cp initscan.c scan.c
	else
	  $(LEX) scan.l
	fi

With this target added, the flex build process would use initscan.c
automatically whenever the flex version number changes.
-- 
Mike Long <mike.long@analog.com>           http://www.shore.net/~mikel
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA                assert(*this!=opinionof(Analog));