bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] [PATCH] configure.ac, Makefile.in: add option to not inst


From: Thomas Petazzoni
Subject: [Bug-readline] [PATCH] configure.ac, Makefile.in: add option to not install examples
Date: Thu, 3 May 2018 22:36:16 +0200

Examples in source code may not be useful, especially for embedded
systems where there is no compiler on the target platform.

Signed-off-by: Thomas Petazzoni <address@hidden>
---
 Makefile.in  | 4 ++--
 configure.ac | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 61b9b21..2dc1c3b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -158,7 +158,7 @@ OTHER_INSTALLED_DOCS = CHANGES INSTALL README
 
 ##########################################################################
 TARGETS = @STATIC_TARGET@ @SHARED_TARGET@
-INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@
+INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@ 
@EXAMPLES_INSTALL_TARGET@
 
 all: $(TARGETS)
 
@@ -248,7 +248,7 @@ uninstall-pc:
 
 maybe-uinstall-pc: uninstall-pc
 
-install-static: installdirs $(STATIC_LIBS) install-headers install-doc 
install-examples install-pc
+install-static: installdirs $(STATIC_LIBS) install-headers install-doc 
install-pc
        -$(MV) $(DESTDIR)$(libdir)/libreadline.a 
$(DESTDIR)$(libdir)/libreadline.old
        $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
        -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
diff --git a/configure.ac b/configure.ac
index 9f85f37..8313414 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,6 +283,13 @@ case "$TERMCAP_LIB" in
 -ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;;
 esac
 
+AC_ARG_ENABLE(install-examples, AC_HELP_STRING([--disable-install-examples], 
[don't install examples [[default=YES]]]),
+       install_examples=$enableval, install_examples=yes)
+if test "${install_examples}" = "yes"; then
+       EXAMPLES_INSTALL_TARGET=install-examples
+fi
+AC_SUBST(EXAMPLES_INSTALL_TARGET)
+
 AC_SUBST(BUILD_DIR)
 
 AC_SUBST(CFLAGS)
-- 
2.14.3




reply via email to

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