From c9dd23a0e2f3e89b335762ec4f09fce9e3ec134d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 3 Aug 2019 18:57:24 +0200 Subject: [PATCH] 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. --- THANKS | 1 + examples/c/reccalc/local.mk | 12 ------------ examples/c/reccalc/scan.l | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/THANKS b/THANKS index 14a26d769..5ee4b29ac 100644 --- a/THANKS +++ b/THANKS @@ -171,6 +171,7 @@ Sum Wu sum@geekhouse.org Théophile Ranquet theophile.ranquet@gmail.com Thiru Ramakrishnan thiru.ramakrishnan@gmail.com Thomas Jahns jahns@dkrz.de +Thomas Petazzoni thomas.petazzoni@bootlin.com Tim Josling tej@melbpc.org.au Tim Landscheidt tim@tim-landscheidt.de Tim Van Holder tim.van.holder@pandora.be diff --git a/examples/c/reccalc/local.mk b/examples/c/reccalc/local.mk index bb64b214e..2d99fa628 100644 --- a/examples/c/reccalc/local.mk +++ b/examples/c/reccalc/local.mk @@ -37,18 +37,6 @@ endif FLEX_WORKS DASH = - %D%/reccalc$(DASH)parse.o: %D%/scan.h -%D%/scan.c %D%/scan.h: %D%/scan.stamp - @test -f $@ || rm -f %D%/scan.stamp - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %D%/scan.stamp - -%D%/scan.stamp: %D%/scan.l - $(AM_V_LEX)rm -f $@ $@.tmp - $(AM_V_at)$(MKDIR_P) %D% - $(AM_V_at)touch $@.tmp - $(AM_V_at)$(LEX) -o%D%/scan.c --header-file=%D%/scan.h $(srcdir)/%D%/scan.l - $(AM_V_at)mv $@.tmp $@ - - EXTRA_DIST += %D%/reccalc.test %D%/scan.l dist_reccalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md CLEANFILES += %D%/parse.[ch] %D%/parse.output %D%/scan.[ch] %D%/*.stamp diff --git a/examples/c/reccalc/scan.l b/examples/c/reccalc/scan.l index fbb781aae..f8ae829b1 100644 --- a/examples/c/reccalc/scan.l +++ b/examples/c/reccalc/scan.l @@ -3,7 +3,7 @@ /* Disable Flex features we don't need, to avoid warnings. */ %option nodefault noinput nounput noyywrap -%option reentrant +%option reentrant header-file="scan.h" %{ #include