summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2013-10-22 17:32:49 +0200
committerAkim Demaille <akim@lrde.epita.fr>2013-10-22 17:34:22 +0200
commit265640d56ed2eece90efd92f21fc9e614e575724 (patch)
tree71055b461e74478b934e73f637ac4f16a643dcab
parentee9cdb85958b4cdcf138029e54c7c0499d34d8b2 (diff)
downloadbison-265640d56ed2eece90efd92f21fc9e614e575724.tar.gz
install: do not install yacc.1 when --disable-yacc
* 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.
-rw-r--r--NEWS5
-rw-r--r--configure.ac11
-rw-r--r--doc/local.mk2
-rw-r--r--lib/local.mk4
-rw-r--r--src/local.mk4
5 files changed, 14 insertions, 12 deletions
diff --git a/NEWS b/NEWS
index 6a423ad9..5df8b81a 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,11 @@ GNU Bison NEWS
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.
diff --git a/configure.ac b/configure.ac
index 74d8fced..688803af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,16 +161,7 @@ AC_ARG_ENABLE([yacc],
[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])
diff --git a/doc/local.mk b/doc/local.mk
index 1f7b3b22..4fe0859c 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -118,7 +118,9 @@ $(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure
fi
$(AM_V_at)rm -f $@*.t
+if ENABLE_YACC
nodist_man_MANS = doc/yacc.1
+endif
## ----------------------------- ##
## Graphviz examples generation. ##
diff --git a/lib/local.mk b/lib/local.mk
index d5d2d0b8..1069b50c 100644
--- a/lib/local.mk
+++ b/lib/local.mk
@@ -51,6 +51,8 @@ lib_libbison_a_SOURCES += \
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
diff --git a/src/local.mk b/src/local.mk
index 9e0848c2..bbed7b76 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -111,7 +111,9 @@ BUILT_SOURCES += \
## yacc. ##
## ------ ##
-bin_SCRIPTS = $(YACC_SCRIPT)
+if ENABLE_YACC
+bin_SCRIPTS = src/yacc
+endif
EXTRA_SCRIPTS = src/yacc
MOSTLYCLEANFILES += src/yacc