* configure.ac (ENABLE_YACC): New conditional.
(YACC_SCRIPT, YACC_LIBRARY): Remove.
* lib/local.mk, src/local.mk: Use the former instead of the latter.
* doc/local.mk: Use ENABLE_YACC to avoid installing yacc.1.
As demonstrated in the documentation, one can now leave spaces between
"%?" and its "{".
+*** Installation
+
+ The yacc.1 man page is no longer installed if --disable-yacc was
+ specified.
+
*** Fixes in the test suite
Bugs and portability issues.
[AC_HELP_STRING([--disable-yacc],
[do not build a yacc command or an -ly library])],
, [enable_yacc=yes])
-case $enable_yacc in
-yes)
- YACC_SCRIPT=src/yacc
- YACC_LIBRARY=lib/liby.a;;
-*)
- YACC_SCRIPT=
- YACC_LIBRARY=;;
-esac
-AC_SUBST([YACC_SCRIPT])
-AC_SUBST([YACC_LIBRARY])
+AM_CONDITIONAL([ENABLE_YACC], [test "$enable_yacc" = yes])
# Checks for programs.
AM_MISSING_PROG([DOT], [dot])
fi
$(AM_V_at)rm -f $@*.t
+if ENABLE_YACC
nodist_man_MANS = doc/yacc.1
+endif
## ----------------------------- ##
## Graphviz examples generation. ##
lib/get-errno.c
# The Yacc compatibility library.
-lib_LIBRARIES = $(YACC_LIBRARY)
+if ENABLE_YACC
+lib_LIBRARIES = lib/liby.a
EXTRA_LIBRARIES = lib/liby.a
lib_liby_a_SOURCES = lib/main.c lib/yyerror.c
+endif
## yacc. ##
## ------ ##
-bin_SCRIPTS = $(YACC_SCRIPT)
+if ENABLE_YACC
+bin_SCRIPTS = src/yacc
+endif
EXTRA_SCRIPTS = src/yacc
MOSTLYCLEANFILES += src/yacc