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.
This commit is contained in:
Akim Demaille
2013-10-22 17:32:49 +02:00
parent ee9cdb8595
commit 265640d56e
5 changed files with 14 additions and 12 deletions

5
NEWS
View File

@@ -22,6 +22,11 @@ GNU Bison NEWS
As demonstrated in the documentation, one can now leave spaces between As demonstrated in the documentation, one can now leave spaces between
"%?" and its "{". "%?" and its "{".
*** Installation
The yacc.1 man page is no longer installed if --disable-yacc was
specified.
*** Fixes in the test suite *** Fixes in the test suite
Bugs and portability issues. Bugs and portability issues.

View File

@@ -161,16 +161,7 @@ AC_ARG_ENABLE([yacc],
[AC_HELP_STRING([--disable-yacc], [AC_HELP_STRING([--disable-yacc],
[do not build a yacc command or an -ly library])], [do not build a yacc command or an -ly library])],
, [enable_yacc=yes]) , [enable_yacc=yes])
case $enable_yacc in AM_CONDITIONAL([ENABLE_YACC], [test "$enable_yacc" = yes])
yes)
YACC_SCRIPT=src/yacc
YACC_LIBRARY=lib/liby.a;;
*)
YACC_SCRIPT=
YACC_LIBRARY=;;
esac
AC_SUBST([YACC_SCRIPT])
AC_SUBST([YACC_LIBRARY])
# Checks for programs. # Checks for programs.
AM_MISSING_PROG([DOT], [dot]) AM_MISSING_PROG([DOT], [dot])

View File

@@ -118,7 +118,9 @@ $(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure
fi fi
$(AM_V_at)rm -f $@*.t $(AM_V_at)rm -f $@*.t
if ENABLE_YACC
nodist_man_MANS = doc/yacc.1 nodist_man_MANS = doc/yacc.1
endif
## ----------------------------- ## ## ----------------------------- ##
## Graphviz examples generation. ## ## Graphviz examples generation. ##

View File

@@ -51,6 +51,8 @@ lib_libbison_a_SOURCES += \
lib/get-errno.c lib/get-errno.c
# The Yacc compatibility library. # The Yacc compatibility library.
lib_LIBRARIES = $(YACC_LIBRARY) if ENABLE_YACC
lib_LIBRARIES = lib/liby.a
EXTRA_LIBRARIES = lib/liby.a EXTRA_LIBRARIES = lib/liby.a
lib_liby_a_SOURCES = lib/main.c lib/yyerror.c lib_liby_a_SOURCES = lib/main.c lib/yyerror.c
endif

View File

@@ -111,7 +111,9 @@ BUILT_SOURCES += \
## yacc. ## ## yacc. ##
## ------ ## ## ------ ##
bin_SCRIPTS = $(YACC_SCRIPT) if ENABLE_YACC
bin_SCRIPTS = src/yacc
endif
EXTRA_SCRIPTS = src/yacc EXTRA_SCRIPTS = src/yacc
MOSTLYCLEANFILES += src/yacc MOSTLYCLEANFILES += src/yacc