Skip to content

Commit c9dd23a

Browse files
committed
examples: rely on ylwrap
Reported by Thomas Petazzoni. https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00000.html * examples/c/reccalc/scan.l: Generate scan.h. * examples/c/reccalc/local.mk: Remove dedicated rules, leave the handling of multiple outputs to Automake's ylwrap.
1 parent 2d00f46 commit c9dd23a

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

THANKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ Sum Wu sum@geekhouse.org
171171
Théophile Ranquet theophile.ranquet@gmail.com
172172
Thiru Ramakrishnan thiru.ramakrishnan@gmail.com
173173
Thomas Jahns jahns@dkrz.de
174+
Thomas Petazzoni thomas.petazzoni@bootlin.com
174175
Tim Josling tej@melbpc.org.au
175176
Tim Landscheidt tim@tim-landscheidt.de
176177
Tim Van Holder tim.van.holder@pandora.be

examples/c/reccalc/local.mk

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@ endif FLEX_WORKS
3737
DASH = -
3838
%D%/reccalc$(DASH)parse.o: %D%/scan.h
3939

40-
%D%/scan.c %D%/scan.h: %D%/scan.stamp
41-
@test -f $@ || rm -f %D%/scan.stamp
42-
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %D%/scan.stamp
43-
44-
%D%/scan.stamp: %D%/scan.l
45-
$(AM_V_LEX)rm -f $@ $@.tmp
46-
$(AM_V_at)$(MKDIR_P) %D%
47-
$(AM_V_at)touch $@.tmp
48-
$(AM_V_at)$(LEX) -o%D%/scan.c --header-file=%D%/scan.h $(srcdir)/%D%/scan.l
49-
$(AM_V_at)mv $@.tmp $@
50-
51-
5240
EXTRA_DIST += %D%/reccalc.test %D%/scan.l
5341
dist_reccalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
5442
CLEANFILES += %D%/parse.[ch] %D%/parse.output %D%/scan.[ch] %D%/*.stamp

examples/c/reccalc/scan.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* Disable Flex features we don't need, to avoid warnings. */
44
%option nodefault noinput nounput noyywrap
55

6-
%option reentrant
6+
%option reentrant header-file="scan.h"
77

88
%{
99
#include <assert.h>

0 commit comments

Comments
 (0)