]> git.saurik.com Git - bison.git/commitdiff
install: do not install yacc.1 when --disable-yacc
authorAkim Demaille <akim@lrde.epita.fr>
Tue, 22 Oct 2013 15:32:49 +0000 (17:32 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Tue, 22 Oct 2013 15:34:22 +0000 (17:34 +0200)
* 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
configure.ac
doc/local.mk
lib/local.mk
src/local.mk

diff --git a/NEWS b/NEWS
index 6a423ad9f84f45fa42ae649a34f5ee4f77bde651..5df8b81a63ab473b38d2838e2f6978b2f475892a 100644 (file)
--- 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.
index 74d8fced259e9efdc24a3ab169aba2215c171bd9..688803af2363b4d9a8545a6f3c52b21a549e29b9 100644 (file)
@@ -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])
index 1f7b3b226cbef855b2e9dc8936948cf66a22ff14..4fe0859ca86a47ae9b2c5c3fc2048b76625e2382 100644 (file)
@@ -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. ##
index d5d2d0b871d295dcd6e189bb4278202c0a646ca2..1069b50cc560601ae76675fe39f5becc0fbaaa88 100644 (file)
@@ -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
index 9e0848c29d3d1f312c3d0beca4ae2319d5f0dbc0..bbed7b76e18b4ddd0acac471b0eabeb2d087f25c 100644 (file)
@@ -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