summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rwxr-xr-xconfigure4
-rw-r--r--configure.local.example17
3 files changed, 28 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index f3f50c45..20c4a757 100644
--- a/Makefile
+++ b/Makefile
@@ -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 013a5f38..60cab5a9 100755
--- a/configure
+++ b/configure
@@ -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 b2549913..6b6bff14 100644
--- a/configure.local.example
+++ b/configure.local.example
@@ -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