mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
examples: don't run those that require f?lex when it's not available
Reported by Bruno Haible. http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00026.html * configure.ac (FLEX_WORKS): New. * examples/c/lexcalc/local.mk, examples/c/reccalc/local.mk: Use it.
This commit is contained in:
@@ -19,15 +19,17 @@ lexcalcdir = $(docdir)/%D%
|
||||
## Calc. ##
|
||||
## ------ ##
|
||||
|
||||
check_PROGRAMS += %D%/lexcalc
|
||||
TESTS += %D%/lexcalc.test
|
||||
EXTRA_DIST += %D%/lexcalc.test
|
||||
nodist_%C%_lexcalc_SOURCES = %D%/parse.y %D%/parse.h %D%/scan.l
|
||||
if FLEX_WORKS
|
||||
check_PROGRAMS += %D%/lexcalc
|
||||
TESTS += %D%/lexcalc.test
|
||||
nodist_%C%_lexcalc_SOURCES = %D%/parse.y %D%/parse.h %D%/scan.l
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_lexcalc_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
|
||||
endif FLEX_WORKS
|
||||
|
||||
%D%/parse.c: $(dependencies)
|
||||
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_lexcalc_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
|
||||
|
||||
EXTRA_DIST += %D%/lexcalc.test
|
||||
dist_lexcalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
|
||||
CLEANFILES += %D%/parse.[ch] %D%/scan.c %D%/parse.output
|
||||
CLEANDIRS += %D%/*.dSYM
|
||||
|
||||
@@ -19,11 +19,15 @@ reccalcdir = $(docdir)/%D%
|
||||
## Calc. ##
|
||||
## ------ ##
|
||||
|
||||
check_PROGRAMS += %D%/reccalc
|
||||
TESTS += %D%/reccalc.test
|
||||
EXTRA_DIST += %D%/reccalc.test %D%/scan.l
|
||||
nodist_%C%_reccalc_SOURCES = %D%/parse.y %D%/scan.h %D%/scan.c
|
||||
BUILT_SOURCES += $(nodist_%C%_reccalc_SOURCES)
|
||||
if FLEX_WORKS
|
||||
check_PROGRAMS += %D%/reccalc
|
||||
TESTS += %D%/reccalc.test
|
||||
nodist_%C%_reccalc_SOURCES = %D%/parse.y %D%/scan.h %D%/scan.c
|
||||
BUILT_SOURCES += $(nodist_%C%_reccalc_SOURCES)
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_reccalc_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
|
||||
endif FLEX_WORKS
|
||||
|
||||
%D%/parse.c: $(dependencies)
|
||||
|
||||
# Tell Make that parse.o depends on scan.h, so that scan.h is built
|
||||
@@ -44,9 +48,8 @@ DASH = -
|
||||
$(AM_V_at)$(LEX) -o%D%/scan.c --header-file=%D%/scan.h $(srcdir)/%D%/scan.l
|
||||
$(AM_V_at)mv $@.tmp $@
|
||||
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_reccalc_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
|
||||
|
||||
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
|
||||
CLEANDIRS += %D%/*.dSYM
|
||||
|
||||
Reference in New Issue
Block a user