bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

{maint} do not install yacc.1 when --disable-yacc


From: Akim Demaille
Subject: {maint} do not install yacc.1 when --disable-yacc
Date: Tue, 22 Oct 2013 17:35:28 +0200

commit 265640d56ed2eece90efd92f21fc9e614e575724
Author: Akim Demaille <address@hidden>
Date:   Tue Oct 22 17:32:49 2013 +0200

    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.

diff --git a/NEWS b/NEWS
index 6a423ad..5df8b81 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 74d8fce..688803a 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 1f7b3b2..4fe0859 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 address@hidden
 
+if ENABLE_YACC
 nodist_man_MANS = doc/yacc.1
+endif
 
 ## ----------------------------- ##
 ## Graphviz examples generation. ##
diff --git a/lib/local.mk b/lib/local.mk
index d5d2d0b..1069b50 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 9e0848c..bbed7b7 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
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]