From bf31779ebd1f71a97f4d80b3b4755ef7dc3be8a4 Mon Sep 17 00:00:00 2001 From: zrj Date: Sun, 5 Nov 2017 18:53:10 +0200 Subject: [PATCH] world: Honour the NO_SHARE in make.conf Mark all cases that touch ${DESTDIR}/usr/share in one way or another. While there, adust libmagic to use MAGICSHAREDIR instead of FILESDIR. In-discussion-with: swildner --- bin/csh/Makefile | 2 ++ etc/Makefile | 2 ++ games/atc/Makefile | 2 ++ games/cribbage/Makefile | 2 ++ games/fish/Makefile | 3 ++- games/fortune/Makefile | 5 ++++- games/larn/Makefile | 2 ++ games/quiz/Makefile | 3 ++- games/wump/Makefile | 3 ++- gnu/usr.bin/cvs/contrib/Makefile | 3 ++- gnu/usr.bin/groff/Makefile | 6 +++++- gnu/usr.bin/groff/contrib/mm/Makefile | 5 +++-- gnu/usr.bin/groff/contrib/pdfmark/Makefile | 2 ++ gnu/usr.bin/groff/src/utils/indxbib/Makefile | 2 ++ lib/libc/nls/Makefile.inc | 2 ++ lib/libmagic/Makefile | 7 +++++-- share/man/man5/make.conf.5 | 2 +- share/mk/bsd.init.mk | 5 +++++ usr.bin/bc/Makefile | 2 ++ usr.bin/calendar/Makefile | 3 ++- usr.bin/ee/Makefile | 2 ++ usr.bin/mail/Makefile | 2 ++ usr.bin/units/Makefile | 2 ++ usr.bin/vgrind/Makefile | 2 ++ usr.bin/vi/Makefile | 5 ++++- usr.sbin/ndiscvt/Makefile | 2 ++ 26 files changed, 65 insertions(+), 13 deletions(-) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 109506670b..d70560441e 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -67,6 +67,7 @@ LINKS= ${BINDIR}/csh ${BINDIR}/tcsh CLEANFILES= ${GENHDRS} gethost.nx csh.1 +.if !defined(NO_SHARE) FILESDIR= ${SHAREDIR}/examples/tcsh FILES= complete.tcsh @@ -97,6 +98,7 @@ NLS+= ${catalog:C/.*://} NLSSRCDIR_${catalog:C/.*://}= ${TCSHDIR}/nls/${catalog:C/:.*//} NLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo set[0-9]* .endfor +.endif csh.1: tcsh.man ${LN} -sf ${.ALLSRC} ${.TARGET} diff --git a/etc/Makefile b/etc/Makefile index a8a5295690..6712437b01 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -357,6 +357,7 @@ distrib-dirs: -chflags xlink ${DESTDIR}/* ${DESTDIR}/usr/* ${DESTDIR}/var/* \ ${DESTDIR}/home/* cd ${DESTDIR}/; test -e sys || (rm -f sys; ${LN} -s usr/src/sys sys) +.if !defined(NO_SHARE) cd ${DESTDIR}/usr/share/nls; \ set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; \ @@ -365,6 +366,7 @@ distrib-dirs: ${LN} -s "$$2" "$$1"; \ shift; shift; \ done +.endif etc-examples: cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ diff --git a/games/atc/Makefile b/games/atc/Makefile index b703dd1d8b..143daaf120 100644 --- a/games/atc/Makefile +++ b/games/atc/Makefile @@ -11,8 +11,10 @@ LDADD= -ll -lm -lprivate_ncurses CFLAGS+= -I${_SHLIBDIRPREFIX}/usr/include/priv/ncurses LDFLAGS+= ${PRIVATELIB_LDFLAGS} +.if !defined(NO_SHARE) FILES= Game_List Killer crossover default easy game_2 FILESDIR= ${SHAREDIR}/games/atc +.endif HIDEGAME= hidegame .PATH: ${.CURDIR}/games diff --git a/games/cribbage/Makefile b/games/cribbage/Makefile index 0579fe0faf..6dc20a0e81 100644 --- a/games/cribbage/Makefile +++ b/games/cribbage/Makefile @@ -9,8 +9,10 @@ CFLAGS+= -I${_SHLIBDIRPREFIX}/usr/include/priv/ncurses LDFLAGS+= ${PRIVATELIB_LDFLAGS} SRCS= extern.c crib.c cards.c instr.c io.c score.c support.c +.if !defined(NO_SHARE) FILES= cribbage.n FILESNAME_cribbage.n= cribbage.instr +.endif MAN= cribbage.6 HIDEGAME=hidegame diff --git a/games/fish/Makefile b/games/fish/Makefile index 23925abc98..b1ff5709c5 100644 --- a/games/fish/Makefile +++ b/games/fish/Makefile @@ -1,9 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD: src/games/fish/Makefile,v 1.4.6.3 2002/02/18 16:02:41 ru Exp $ -# $DragonFly: src/games/fish/Makefile,v 1.4 2006/10/08 16:22:35 pavalos Exp $ PROG= fish +.if !defined(NO_SHARE) FILES= fish.instr +.endif MAN= fish.6 HIDEGAME=hidegame diff --git a/games/fortune/Makefile b/games/fortune/Makefile index b8b4ff1466..6471f49d21 100644 --- a/games/fortune/Makefile +++ b/games/fortune/Makefile @@ -1,5 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -SUBDIR= fortune strfile datfiles unstr +SUBDIR= fortune strfile unstr +.if !defined(NO_SHARE) +SUBDIR+= datfiles +.endif .include diff --git a/games/larn/Makefile b/games/larn/Makefile index 3c2cfaaaac..ce3220f542 100644 --- a/games/larn/Makefile +++ b/games/larn/Makefile @@ -54,8 +54,10 @@ LDADD= -lprivate_ncurses CFLAGS+= -I${_SHLIBDIRPREFIX}/usr/include/priv/ncurses LDFLAGS+= ${PRIVATELIB_LDFLAGS} +.if !defined(NO_SHARE) FILES= larnmaze larnopts larn.help FILESDIR= ${SHAREDIR}/games/larn +.endif HIDEGAME= hidegame .PATH: ${.CURDIR}/datfiles diff --git a/games/quiz/Makefile b/games/quiz/Makefile index 1251991de2..1db74bac9e 100644 --- a/games/quiz/Makefile +++ b/games/quiz/Makefile @@ -1,15 +1,16 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD: src/games/quiz/Makefile,v 1.5.6.3 2002/02/18 16:02:43 ru Exp $ -# $DragonFly: src/games/quiz/Makefile,v 1.4 2006/10/08 16:22:36 pavalos Exp $ PROG= quiz SRCS= quiz.c rxp.c MAN= quiz.6 +.if !defined(NO_SHARE) FILES= africa america areas arith asia babies bard chinese collectives \ ed elements europe flowers greek inca index latin locomotive \ midearth morse murders poetry posneg pres province seq-easy seq-hard \ sexes sov spell state trek ucc FILESDIR= ${SHAREDIR}/games/quiz.db +.endif HIDEGAME=hidegame .PATH: ${.CURDIR}/datfiles diff --git a/games/wump/Makefile b/games/wump/Makefile index 728004aa4b..7f31014b97 100644 --- a/games/wump/Makefile +++ b/games/wump/Makefile @@ -1,9 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD: src/games/wump/Makefile,v 1.3.6.3 2002/02/18 16:02:43 ru Exp $ -# $DragonFly: src/games/wump/Makefile,v 1.4 2006/10/08 16:22:36 pavalos Exp $ PROG= wump +.if !defined(NO_SHARE) FILES= wump.info +.endif MAN= wump.6 HIDEGAME=hidegame diff --git a/gnu/usr.bin/cvs/contrib/Makefile b/gnu/usr.bin/cvs/contrib/Makefile index 10f294391a..c94664473f 100644 --- a/gnu/usr.bin/cvs/contrib/Makefile +++ b/gnu/usr.bin/cvs/contrib/Makefile @@ -1,16 +1,17 @@ # $FreeBSD: src/gnu/usr.bin/cvs/contrib/Makefile,v 1.14.2.5 2002/12/19 21:18:01 peter Exp $ -# $DragonFly: src/gnu/usr.bin/cvs/contrib/Makefile,v 1.4 2004/05/20 02:27:54 dillon Exp $ .include "../Makefile.inc" .PATH: ${CVSDIR}/contrib .PATH: ${CVSDIR}/man +.if !defined(NO_SHARE) SCRIPTS= clmerge cln_hist commit_prep cvs2vendor cvs_acls \ log log_accum mfpipe rcs-to-cvs rcs2log rcslock sccs2rcs \ easy-import FILES= README cvshelp.man descend.man intro.doc +.endif EXAMPDIR= ${SHAREDIR}/examples/cvs FILESDIR= ${EXAMPDIR}/contrib diff --git a/gnu/usr.bin/groff/Makefile b/gnu/usr.bin/groff/Makefile index 7c4cdb8873..23db018e5a 100644 --- a/gnu/usr.bin/groff/Makefile +++ b/gnu/usr.bin/groff/Makefile @@ -1,5 +1,9 @@ + # $FreeBSD: src/gnu/usr.bin/groff/Makefile,v 2.11 2003/05/02 00:55:52 ru Exp $ -SUBDIR= contrib font man src tmac +SUBDIR= contrib man src +.if !defined(NO_SHARE) +SUBDIR+= font tmac +.endif .include diff --git a/gnu/usr.bin/groff/contrib/mm/Makefile b/gnu/usr.bin/groff/contrib/mm/Makefile index c78ffcef15..1ac3efb20a 100644 --- a/gnu/usr.bin/groff/contrib/mm/Makefile +++ b/gnu/usr.bin/groff/contrib/mm/Makefile @@ -1,17 +1,18 @@ -# $FreeBSD: src/gnu/usr.bin/groff/contrib/mm/Makefile,v 1.6 2002/10/11 08:58:13 ru Exp $ -# $DragonFly: src/gnu/usr.bin/groff/contrib/mm/Makefile,v 1.3 2005/09/01 20:47:12 asmodai Exp $ +# $FreeBSD: src/gnu/usr.bin/groff/contrib/mm/Makefile,v 1.6 2002/10/11 08:58:13 ru Exp 2 SCRIPTS= mmroff.pl MAN= mmroff.1 TMACDIR?= ${SHAREDIR}/tmac +.if !defined(NO_SHARE) FILES= m.tmac mm.tmac mse.tmac mmse.tmac FILESDIR_m.tmac=${TMACDIR} FILESDIR_mse.tmac=${TMACDIR} FILES+= 0.MT 5.MT 4.MT ms.cov se_ms.cov FILESDIR= ${TMACDIR}/mm LOCALE= locale se_locale +.endif MAN+= groff_mm.7 groff_mmse.7 MLINKS= groff_mm.7 mm.7 groff_mmse.7 mmse.7 diff --git a/gnu/usr.bin/groff/contrib/pdfmark/Makefile b/gnu/usr.bin/groff/contrib/pdfmark/Makefile index d58e23b833..e1c1905cc8 100644 --- a/gnu/usr.bin/groff/contrib/pdfmark/Makefile +++ b/gnu/usr.bin/groff/contrib/pdfmark/Makefile @@ -3,10 +3,12 @@ SCRIPTS= pdfroff MAN= pdfroff.1 +.if !defined(NO_SHARE) TMACDIR?= ${SHAREDIR}/tmac FILES= pdfmark.tmac spdf.tmac FILESDIR= ${TMACDIR} +.endif CLEANFILES+= ${SCRIPTS} ${MAN} diff --git a/gnu/usr.bin/groff/src/utils/indxbib/Makefile b/gnu/usr.bin/groff/src/utils/indxbib/Makefile index 5624be7e1c..fba1d690f2 100644 --- a/gnu/usr.bin/groff/src/utils/indxbib/Makefile +++ b/gnu/usr.bin/groff/src/utils/indxbib/Makefile @@ -5,7 +5,9 @@ SRCS= indxbib.cpp signal.c DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} +.if !defined(NO_SHARE) FILES= ${DIST_DIR}/eign FILESDIR= ${SHAREDIR}/dict +.endif .include diff --git a/lib/libc/nls/Makefile.inc b/lib/libc/nls/Makefile.inc index 048a60f3c3..e693b3090f 100644 --- a/lib/libc/nls/Makefile.inc +++ b/lib/libc/nls/Makefile.inc @@ -15,6 +15,7 @@ MAN+= catclose.3 catgets.3 catopen.3 # NOTE: C.msg should not be processed here, it's used as a template # for translators. +.if !defined(NO_SHARE) NLSNAME= libc NLS+= be_BY.UTF-8 NLS+= ca_ES.ISO8859-1 @@ -42,3 +43,4 @@ NLS+= uk_UA.UTF-8 NLS+= zh_Hans_CN.GB18030 NLS+= zh_Hans_CN.GB2312 NLS+= zh_Hans_CN.UTF-8 +.endif diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile index d25884f088..ab097b4d94 100644 --- a/lib/libmagic/Makefile +++ b/lib/libmagic/Makefile @@ -3,7 +3,8 @@ MAGICDIR= ${CONTRIBDIR}/../magic .PATH: ${CONTRIBDIR} VER!= grep -w VERSION ${.CURDIR}/config.h | awk -F\" '{print $$2}' -MAGIC= ${FILESDIR}/magic +MAGICSHAREDIR=${SHAREDIR}/misc +MAGIC= ${MAGICSHAREDIR}/magic LIB= magic SHLIB_MAJOR= 2 @@ -44,8 +45,10 @@ MLINKS+= libmagic.3 magic_version.3 CLEANFILES+= magic magic.mgc libmagic.3 +.if !defined(NO_SHARE) FILES= magic magic.mgc -FILESDIR= ${SHAREDIR}/misc +FILESDIR= ${MAGICSHAREDIR} +.endif MAGFILES= ${MAGICDIR}/Header ${MAGICDIR}/Localstuff \ ${MAGICDIR}/Magdir/[a-z]* diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 05140d469b..9746d15a73 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -421,7 +421,7 @@ Set to not build and related programs. .It Va NO_SHARE .Pq Vt bool -Set to not enter the share subdirectory. +Set to not enter or install to the share subdirectory. .It Va NOCLEAN .Pq Vt bool Set this to disable cleaning during diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index 5fa719f246..c37e58ed0b 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -25,3 +25,8 @@ NOSHARED= ${NO_SHARED} .if defined(NO_MAN) && !defined(NOMAN) NOMAN= ${NO_MAN} .endif + +# Imply NOMAN for NO_SHARE case +.if defined(NO_SHARE) && !defined(NOMAN) +NOMAN= noman +.endif diff --git a/usr.bin/bc/Makefile b/usr.bin/bc/Makefile index a11fc77ccf..8f1652fa93 100644 --- a/usr.bin/bc/Makefile +++ b/usr.bin/bc/Makefile @@ -9,7 +9,9 @@ DPADD= ${LIBEDIT} ${LIBNCURSES} LDADD= -lprivate_edit -lprivate_ncurses LDFLAGS+= ${PRIVATELIB_LDFLAGS} +.if !defined(NO_SHARE) FILES= bc.library FILESDIR= /usr/share/misc +.endif .include diff --git a/usr.bin/calendar/Makefile b/usr.bin/calendar/Makefile index 9013008b1f..0fbd328edf 100644 --- a/usr.bin/calendar/Makefile +++ b/usr.bin/calendar/Makefile @@ -1,9 +1,9 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD: src/usr.bin/calendar/Makefile,v 1.12.8.6 2003/04/06 20:04:56 dwmalone Exp $ -# $DragonFly: src/usr.bin/calendar/Makefile,v 1.6 2007/09/24 21:38:17 pavalos Exp $ PROG= calendar SRCS= calendar.c io.c day.c ostern.c paskha.c +.if !defined(NO_SHARE) INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U DE_LINKS= de_DE.ISO_8859-1 de_DE.ISO8859-15 de_DE.ISO_8859-15 @@ -32,5 +32,6 @@ beforeinstall: rm -rf ${DESTDIR}${SHAREDIR}/calendar/${link} ${LN} -s hr_HR.ISO8859-2 ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor +.endif .include diff --git a/usr.bin/ee/Makefile b/usr.bin/ee/Makefile index bb90b1df33..0764af568b 100644 --- a/usr.bin/ee/Makefile +++ b/usr.bin/ee/Makefile @@ -16,6 +16,7 @@ LDFLAGS+= ${PRIVATELIB_LDFLAGS} WARNS?= 2 +.if !defined(NO_SHARE) NLS= C fr_FR.ISO8859-1 de_DE.ISO8859-1 pl_PL.ISO8859-2 \ uk_UA.KOI8-U pt_BR.ISO8859-1 ru_RU.KOI8-R hu_HU.ISO8859-2 @@ -35,5 +36,6 @@ NLSSRCDIR_${lang}= ${.CURDIR}/nls/${lang} NLSSRCDIR_${lang}= ${.CURDIR}/../../contrib/ee . endif .endfor +.endif .include diff --git a/usr.bin/mail/Makefile b/usr.bin/mail/Makefile index 26c5a9fbd1..fcd9ff53c1 100644 --- a/usr.bin/mail/Makefile +++ b/usr.bin/mail/Makefile @@ -5,7 +5,9 @@ PROG= mail SRCS= version.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ getname.c head.c v7.local.c lex.c list.c main.c names.c popen.c \ quit.c send.c strings.c temp.c tty.c util.c vars.c +.if !defined(NO_SHARE) FILES= mail.help mail.tildehelp +.endif FILESDIR= ${SHAREDIR}/misc EFILES= mail.rc LINKS= ${BINDIR}/mail ${BINDIR}/Mail ${BINDIR}/mail ${BINDIR}/mailx diff --git a/usr.bin/units/Makefile b/usr.bin/units/Makefile index cac892dbf1..348f1ee677 100644 --- a/usr.bin/units/Makefile +++ b/usr.bin/units/Makefile @@ -1,8 +1,10 @@ # $FreeBSD: src/usr.bin/units/Makefile,v 1.5.2.1 2002/02/18 16:16:57 ru Exp $ PROG= units +.if !defined(NO_SHARE) FILES= units.lib FILESDIR= ${SHAREDIR}/misc +.endif LDADD+= -lprivate_edit -lprivate_ncurses DPADD+= ${LIBEDIT} ${LIBNCURSES} diff --git a/usr.bin/vgrind/Makefile b/usr.bin/vgrind/Makefile index e1d6d34358..3cfb9870f2 100644 --- a/usr.bin/vgrind/Makefile +++ b/usr.bin/vgrind/Makefile @@ -4,11 +4,13 @@ PROG= vfontedpr SRCS= regexp.c vfontedpr.c SCRIPTS=vgrind.sh +.if !defined(NO_SHARE) FILES= vgrindefs.src vgrindefs.src.db tmac.vgrind FILESNAME_vgrindefs.src= vgrindefs FILESNAME_vgrindefs.src.db= vgrindefs.db FILESDIR= ${SHAREDIR}/misc FILESDIR_tmac.vgrind= ${SHAREDIR}/tmac +.endif MAN= vgrind.1 vgrindefs.5 WARNS?= 3 diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile index be76ccc17a..2d2975c046 100644 --- a/usr.bin/vi/Makefile +++ b/usr.bin/vi/Makefile @@ -5,7 +5,10 @@ .include SRCDIR= ${.CURDIR}/../../contrib/nvi2 -SUBDIR+= vidump catalog +SUBDIR+= vidump +.if !defined(NO_SHARE) +SUBDIR+= catalog +.endif WARNS?= 1 diff --git a/usr.sbin/ndiscvt/Makefile b/usr.sbin/ndiscvt/Makefile index c2a29bcede..1134658621 100644 --- a/usr.sbin/ndiscvt/Makefile +++ b/usr.sbin/ndiscvt/Makefile @@ -19,9 +19,11 @@ CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../sys CLEANFILES= y.output +.if !defined(NO_SHARE) FILES= windrv_stub.c FILESNAME= windrv_stub.c FILESDIR= /usr/share/misc +.endif SCRIPTS= ndisgen.sh -- 2.11.4.GIT