aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-11-19 15:24:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-11-19 15:24:51 +0000
commitd776ebf0d043340832bbb94ec0f82140f5255970 (patch)
tree83f16477d46dd0ca360565038ceb746a5c248384
parent66286e275f33f71863b63d2ba531fa83643e4a42 (diff)
downloadmandoc-d776ebf0d043340832bbb94ec0f82140f5255970.tar.gz
mandoc-d776ebf0d043340832bbb94ec0f82140f5255970.tar.zst
mandoc-d776ebf0d043340832bbb94ec0f82140f5255970.zip
Do not install libmandoc.a by default.
The only environment where it is ever needed is NetBSD base. Even NetBSD ports and pkgsrc should better not install it. Triggered by a question from bentley@.
-rw-r--r--Makefile20
-rwxr-xr-xconfigure6
-rw-r--r--configure.local.example19
3 files changed, 31 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 61c18bfd..5c2657c3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.492 2016/08/05 23:15:08 schwarze Exp $
+# $Id: Makefile,v 1.493 2016/11/19 15:24:51 schwarze Exp $
#
# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
# Copyright (c) 2011, 2013-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -369,10 +369,7 @@ clean:
base-install: base-build
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(SBINDIR)
- mkdir -p $(DESTDIR)$(LIBDIR)
- mkdir -p $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man1
- mkdir -p $(DESTDIR)$(MANDIR)/man3
mkdir -p $(DESTDIR)$(MANDIR)/man5
mkdir -p $(DESTDIR)$(MANDIR)/man7
mkdir -p $(DESTDIR)$(MANDIR)/man8
@@ -383,17 +380,12 @@ base-install: base-build
ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
ln -f $(DESTDIR)$(BINDIR)/mandoc \
$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
- $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
- $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
- $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
- $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
- mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5
$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7
@@ -405,6 +397,16 @@ base-install: base-build
$(INSTALL_MAN) makewhatis.8 \
$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
+lib-install: base-build
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ mkdir -p $(DESTDIR)$(INCLUDEDIR)
+ mkdir -p $(DESTDIR)$(MANDIR)/man3
+ $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
+ $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
+ mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
+
cgi-install: cgi-build
mkdir -p $(DESTDIR)$(CGIBINDIR)
mkdir -p $(DESTDIR)$(HTDOCDIR)
diff --git a/configure b/configure
index 4c72842f..adf9eb48 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: configure,v 1.53 2016/10/20 18:47:49 schwarze Exp $
+# $Id: configure,v 1.54 2016/11/19 15:24:51 schwarze Exp $
#
# Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
#
@@ -47,6 +47,7 @@ LD_OHASH=
STATIC="-static"
BUILD_CGI=0
+INSTALL_LIBMANDOC=0
HAVE_DIRENT_NAMLEN=
HAVE_EFTYPE=
@@ -429,7 +430,8 @@ exec > Makefile.local
BUILD_TARGETS=
[ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS="cgi-build"
INSTALL_TARGETS=
-[ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="cgi-install"
+[ ${INSTALL_LIBMANDOC} -gt 0 ] && INSTALL_TARGETS="lib-install"
+[ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} cgi-install"
cat << __HEREDOC__
BUILD_TARGETS = ${BUILD_TARGETS}
diff --git a/configure.local.example b/configure.local.example
index df4f13c4..d5799a5a 100644
--- a/configure.local.example
+++ b/configure.local.example
@@ -1,4 +1,4 @@
-# $Id: configure.local.example,v 1.21 2016/10/18 16:06:44 schwarze Exp $
+# $Id: configure.local.example,v 1.22 2016/11/19 15:24:51 schwarze Exp $
#
# Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
#
@@ -83,8 +83,6 @@ OSNAME="OpenBSD 6.0"
PREFIX="/usr/local"
BINDIR="${PREFIX}/bin"
SBINDIR="${PREFIX}/sbin"
-INCLUDEDIR="${PREFIX}/include/mandoc"
-LIBDIR="${PREFIX}/lib/mandoc"
MANDIR="${PREFIX}/man"
# Some distributions may want to avoid naming conflicts
@@ -172,6 +170,21 @@ INSTALL_DATA="${INSTALL} -m 0444"
PREFIX="/usr/local"
HOMEBREWDIR="${PREFIX}/Cellar"
+# --- user settings for the mandoc(3) library --------------------------
+
+# By default, libmandoc.a is not installed. It is almost never needed
+# because there is almost no non-mandoc software out there using this
+# library. The one notable exception is NetBSD apropos(1).
+# So, when building for the NetBSD base system - but not for NetBSD
+# ports nor for pkgsrc! - you may want the following:
+
+INSTALL_LIBMANDOC=1
+
+# The following settings are only used when INSTALL_LIBMANDOC is set.
+
+INCLUDEDIR="${PREFIX}/include/mandoc"
+LIBDIR="${PREFIX}/lib/mandoc"
+
# --- user settings related to man.cgi ---------------------------------
# By default, building man.cgi(8) is disabled. To enable it, copy