diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-05-06 06:49:17 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-05-06 06:49:17 -0700 |
commit | 038bed1fa17743cbbfe4d219b6798d88254eef2c (patch) | |
tree | 49dd5ac76bd8a5db0ebec983586ec6a1e9afee7a /Makefile | |
parent | e05e5b99f4160c177b3a533b4ac0a770b6f78751 (diff) | |
download | txr-038bed1fa17743cbbfe4d219b6798d88254eef2c.tar.gz txr-038bed1fa17743cbbfe4d219b6798d88254eef2c.tar.bz2 txr-038bed1fa17743cbbfe4d219b6798d88254eef2c.zip |
Some recent versions of flex contain // comment.
Makefile (lex.yy.c): Crudely and shamelessly filter lex.yy.c
through sed to remove // commments, even if // occurs in a
string literal or a /*...*/ comment which ends on that line.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -207,7 +207,12 @@ $(eval $(foreach item,y.tab.c y.tab.h lex.yy.c,\ lex.yy.c: $(top_srcdir)parser.l $(call ABBREV,LEX) $(V)rm -f $@ - $(V)$(LEX) $(LEX_DBG_FLAGS) $< + $(V)if $(LEX) $(LEX_DBG_FLAGS) $< ; then \ + sed -e s@//.*@@ < $@ > $@.tmp ; \ + mv $@.tmp $@ ; \ + else \ + exit 1 ; \ + fi $(V)chmod a-w $@ y.tab.h: y.tab.c |