From 265640d56ed2eece90efd92f21fc9e614e575724 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 22 Oct 2013 17:32:49 +0200 Subject: 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. --- NEWS | 5 +++++ configure.ac | 11 +---------- doc/local.mk | 2 ++ lib/local.mk | 4 +++- src/local.mk | 4 +++- 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 -- cgit v1.2.1