source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Do not install libmandoc.a by default.
@ 2016-11-19 15:25 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2016-11-19 15:25 UTC (permalink / raw)
  To: source

Log Message:
-----------
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@.

Modified Files:
--------------
    mdocml:
        Makefile
        configure
        configure.local.example

Revision Data
-------------
Index: configure.local.example
===================================================================
RCS file: /home/cvs/mdocml/mdocml/configure.local.example,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lconfigure.local.example -Lconfigure.local.example -u -p -r1.21 -r1.22
--- configure.local.example
+++ 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
@@ -171,6 +169,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 ---------------------------------
 
Index: configure
===================================================================
RCS file: /home/cvs/mdocml/mdocml/configure,v
retrieving revision 1.53
retrieving revision 1.54
diff -Lconfigure -Lconfigure -u -p -r1.53 -r1.54
--- configure
+++ 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}
Index: Makefile
===================================================================
RCS file: /home/cvs/mdocml/mdocml/Makefile,v
retrieving revision 1.492
retrieving revision 1.493
diff -LMakefile -LMakefile -u -p -r1.492 -r1.493
--- Makefile
+++ 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
@@ -404,6 +396,16 @@ base-install: base-build
 	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
 	$(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)
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-19 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-19 15:25 mdocml: Do not install libmandoc.a by default schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).