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 | c8b439877d5af53a6b23fa7370e420cd75b32780 (patch) | |
tree | 49dd5ac76bd8a5db0ebec983586ec6a1e9afee7a | |
parent | eee34f449b30c42850d3ed2c7b87c292ae841ed2 (diff) | |
download | txr-c8b439877d5af53a6b23fa7370e420cd75b32780.tar.gz txr-c8b439877d5af53a6b23fa7370e420cd75b32780.tar.bz2 txr-c8b439877d5af53a6b23fa7370e420cd75b32780.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.
-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 |