1994-02-21 21:53:20 +00:00
|
|
|
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1998-08-04 15:54:27 +00:00
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2006-03-17 18:54:44 +00:00
|
|
|
|
2016-02-02 17:33:37 +00:00
|
|
|
FILESGROUPS= FILES
|
|
|
|
|
2016-03-11 23:45:09 +00:00
|
|
|
# No need as it is empty and just causes rebuilds since this file does so much.
|
|
|
|
UPDATE_DEPENDFILE= no
|
2015-01-22 23:50:47 +00:00
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_SENDMAIL} != "no"
|
2015-01-22 23:50:47 +00:00
|
|
|
SUBDIR+=sendmail
|
2001-03-01 03:51:18 +00:00
|
|
|
.endif
|
1993-06-20 13:41:45 +00:00
|
|
|
|
2018-09-06 14:55:54 +00:00
|
|
|
BIN1= \
|
2012-02-17 01:21:08 +00:00
|
|
|
disktab \
|
|
|
|
group \
|
|
|
|
hosts.allow \
|
|
|
|
libalias.conf \
|
|
|
|
login.access \
|
|
|
|
phones \
|
|
|
|
rc.bsdextended \
|
|
|
|
rc.firewall \
|
|
|
|
remote \
|
|
|
|
termcap.small
|
2009-11-13 11:26:44 +00:00
|
|
|
|
2008-09-21 22:02:26 +00:00
|
|
|
# NB: keep these sorted by MK_* knobs
|
|
|
|
|
|
|
|
.if ${MK_LOCATE} != "no"
|
2017-03-12 18:58:55 +00:00
|
|
|
BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc
|
2008-09-21 22:02:26 +00:00
|
|
|
.endif
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_LPR} != "no"
|
2008-09-21 22:02:26 +00:00
|
|
|
BIN1+= hosts.lpd printcap
|
2003-11-02 22:13:36 +00:00
|
|
|
.endif
|
1993-06-20 13:41:45 +00:00
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_OPENSSL} != "no"
|
2017-03-12 18:58:55 +00:00
|
|
|
SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf
|
2000-05-18 05:21:50 +00:00
|
|
|
.endif
|
|
|
|
|
2015-02-05 11:42:59 +00:00
|
|
|
.if ${MK_SENDMAIL} != "no"
|
2016-04-17 03:45:45 +00:00
|
|
|
BIN1+= rc.sendmail
|
2015-02-05 11:42:59 +00:00
|
|
|
.endif
|
|
|
|
|
2008-09-22 15:37:47 +00:00
|
|
|
.if ${MK_WIRELESS} != "no"
|
|
|
|
BIN1+= regdomain.xml
|
|
|
|
.endif
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_SENDMAIL} == "no"
|
2003-07-06 19:23:31 +00:00
|
|
|
ETCMAIL=mailer.conf aliases
|
|
|
|
.else
|
2000-08-13 09:01:12 +00:00
|
|
|
ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
|
|
|
|
mailertable.sample aliases
|
2003-07-06 19:23:31 +00:00
|
|
|
.endif
|
1993-06-20 13:41:45 +00:00
|
|
|
|
1993-08-09 17:02:17 +00:00
|
|
|
# Special top level files for FreeBSD
|
2002-07-05 13:17:24 +00:00
|
|
|
FREEBSD=COPYRIGHT
|
1993-08-28 03:33:06 +00:00
|
|
|
|
2013-01-22 21:10:03 +00:00
|
|
|
# Sanitize DESTDIR
|
|
|
|
DESTDIR:= ${DESTDIR:C://*:/:g}
|
|
|
|
|
2004-01-22 08:18:37 +00:00
|
|
|
afterinstall:
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_MAN} != "no"
|
2017-03-12 18:58:55 +00:00
|
|
|
${_+_}cd ${SRCTOP}/share/man; ${MAKE} makedb
|
2004-01-22 08:18:37 +00:00
|
|
|
.endif
|
|
|
|
|
1994-11-14 20:56:17 +00:00
|
|
|
distribute:
|
2014-06-10 17:04:30 +00:00
|
|
|
# Avoid installing tests here; "make distribution" will do this and
|
|
|
|
# correctly place them in the right location.
|
|
|
|
${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \
|
|
|
|
DESTDIR=${DISTDIR}/${DISTRIBUTION}
|
2007-10-29 07:37:08 +00:00
|
|
|
${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION}
|
1995-01-27 02:20:42 +00:00
|
|
|
|
2005-02-28 14:16:53 +00:00
|
|
|
.include <bsd.endian.mk>
|
|
|
|
|
2013-01-29 22:17:58 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
METALOG.add?= cat -l >> ${METALOG}
|
|
|
|
.endif
|
|
|
|
|
1994-11-14 20:56:17 +00:00
|
|
|
distribution:
|
2005-07-22 10:35:35 +00:00
|
|
|
.if !defined(DESTDIR)
|
|
|
|
@echo "set DESTDIR before running \"make ${.TARGET}\""
|
|
|
|
@false
|
|
|
|
.endif
|
2002-07-05 13:17:24 +00:00
|
|
|
cd ${.CURDIR}; \
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2002-07-05 13:39:38 +00:00
|
|
|
${BIN1} ${DESTDIR}/etc; \
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
|
2008-10-27 16:13:28 +00:00
|
|
|
master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
|
2018-07-04 17:18:35 +00:00
|
|
|
|
2018-08-15 23:18:34 +00:00
|
|
|
.if ${MK_TCSH} == "no"
|
|
|
|
sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
|
|
|
|
.endif
|
|
|
|
pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
|
2013-01-29 22:17:58 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
( \
|
|
|
|
echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
|
|
|
|
echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
|
|
|
|
echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
|
|
|
|
) | ${METALOG.add}
|
2008-09-21 22:02:26 +00:00
|
|
|
.endif
|
2007-10-29 07:37:08 +00:00
|
|
|
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
|
2017-07-24 23:57:43 +00:00
|
|
|
${_+_}cd ${.CURDIR}/mtree; ${MAKE} install
|
2017-03-12 18:58:55 +00:00
|
|
|
${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap
|
|
|
|
${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt
|
2013-09-24 10:04:51 +00:00
|
|
|
.if ${MK_UNBOUND} != "no"
|
|
|
|
if [ ! -e ${DESTDIR}/etc/unbound ]; then \
|
|
|
|
${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \
|
|
|
|
fi
|
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_SENDMAIL} != "no"
|
2007-10-29 07:37:08 +00:00
|
|
|
${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
|
2001-03-01 03:51:18 +00:00
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_OPENSSL} != "no"
|
2002-07-29 09:40:17 +00:00
|
|
|
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2002-07-05 13:39:38 +00:00
|
|
|
${SSL} ${DESTDIR}/etc/ssl
|
2000-02-09 04:08:18 +00:00
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_KERBEROS} != "no"
|
2002-07-05 13:17:24 +00:00
|
|
|
cd ${.CURDIR}/root; \
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2003-10-03 19:38:21 +00:00
|
|
|
dot.k5login ${DESTDIR}/root/.k5login;
|
|
|
|
.endif
|
2018-08-15 14:41:24 +00:00
|
|
|
|
2014-11-29 22:31:19 +00:00
|
|
|
.if ${MK_MAIL} != "no"
|
2002-07-29 09:40:17 +00:00
|
|
|
cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2000-08-13 09:01:12 +00:00
|
|
|
${ETCMAIL} ${DESTDIR}/etc/mail
|
2012-11-15 20:37:38 +00:00
|
|
|
if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
|
2000-08-14 02:49:39 +00:00
|
|
|
! -f ${DESTDIR}/etc/aliases ]; then \
|
2018-06-29 21:15:17 +00:00
|
|
|
${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \
|
2000-08-14 02:49:39 +00:00
|
|
|
fi
|
2008-09-21 22:02:26 +00:00
|
|
|
.endif
|
2015-02-05 11:42:59 +00:00
|
|
|
.if ${MK_LOCATE} != "no"
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
|
1993-07-19 18:54:09 +00:00
|
|
|
${DESTDIR}/var/db/locate.database
|
2015-02-05 11:42:59 +00:00
|
|
|
.endif
|
2002-07-29 09:40:17 +00:00
|
|
|
cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
2002-07-05 13:39:38 +00:00
|
|
|
${FREEBSD} ${DESTDIR}/
|
2010-06-16 07:52:44 +00:00
|
|
|
.if ${MK_BOOT} != "no"
|
2017-03-12 18:58:55 +00:00
|
|
|
.if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints)
|
2004-03-14 17:18:39 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
2017-03-12 18:58:55 +00:00
|
|
|
${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \
|
2004-03-14 17:18:39 +00:00
|
|
|
${DESTDIR}/boot/device.hints
|
2007-07-13 14:28:10 +00:00
|
|
|
.endif
|
2010-06-16 07:52:44 +00:00
|
|
|
.endif
|
1993-06-20 13:41:45 +00:00
|
|
|
|
2013-01-15 00:12:34 +00:00
|
|
|
MTREE_CMD?= mtree
|
|
|
|
|
2013-01-17 18:32:30 +00:00
|
|
|
MTREES= mtree/BSD.root.dist / \
|
|
|
|
mtree/BSD.var.dist /var \
|
|
|
|
mtree/BSD.usr.dist /usr \
|
2015-02-24 19:27:51 +00:00
|
|
|
mtree/BSD.include.dist /usr/include \
|
|
|
|
mtree/BSD.debug.dist /usr/lib
|
2015-10-20 20:35:34 +00:00
|
|
|
.if ${MK_LIB32} != "no"
|
|
|
|
MTREES+= mtree/BSD.lib32.dist /usr
|
|
|
|
MTREES+= mtree/BSD.lib32.dist /usr/lib/debug/usr
|
|
|
|
.endif
|
2016-01-03 04:32:05 +00:00
|
|
|
.if ${MK_LIBSOFT} != "no"
|
|
|
|
MTREES+= mtree/BSD.libsoft.dist /usr
|
|
|
|
MTREES+= mtree/BSD.libsoft.dist /usr/lib/debug/usr
|
|
|
|
.endif
|
2013-10-25 05:25:19 +00:00
|
|
|
.if ${MK_TESTS} != "no"
|
2014-12-18 18:16:00 +00:00
|
|
|
MTREES+= mtree/BSD.tests.dist ${TESTSBASE}
|
2015-10-15 01:46:55 +00:00
|
|
|
MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE}
|
2013-10-25 05:25:19 +00:00
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_SENDMAIL} != "no"
|
2013-01-17 18:32:30 +00:00
|
|
|
MTREES+= mtree/BSD.sendmail.dist /
|
2002-04-20 19:00:11 +00:00
|
|
|
.endif
|
2013-01-17 18:32:30 +00:00
|
|
|
.for mtree in ${LOCAL_MTREE}
|
|
|
|
MTREES+= ../${mtree} /
|
|
|
|
.endfor
|
|
|
|
|
2015-11-13 17:25:20 +00:00
|
|
|
# Clean up some directories that where mistakenly created as files that
|
|
|
|
# should not have been as part of the nvi update in r281994.
|
|
|
|
# This should be removed after 11.0-RELEASE.
|
|
|
|
DISTRIB_CLEANUP_SHARE_FILES= ${SHAREDIR}/doc/usd/10.exref ${SHAREDIR}/doc/usd/11.edit
|
|
|
|
DISTRIB_CLEANUP_SHARE_FILES+= ${SHAREDIR}/doc/usd/12.vi ${SHAREDIR}/doc/usd/13.viref
|
|
|
|
distrib-cleanup: .PHONY
|
|
|
|
for file in ${DISTRIB_CLEANUP_SHARE_FILES}; do \
|
|
|
|
if [ -f ${DESTDIR}/$${file} ]; then \
|
|
|
|
rm -f ${DESTDIR}/$${file}; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY
|
2013-01-17 18:32:30 +00:00
|
|
|
@set ${MTREES}; \
|
|
|
|
while test $$# -ge 2; do \
|
|
|
|
m=${.CURDIR}/$$1; \
|
|
|
|
shift; \
|
|
|
|
d=${DESTDIR}$$1; \
|
|
|
|
shift; \
|
2014-12-18 18:16:00 +00:00
|
|
|
test -d $$d || mkdir -p $$d; \
|
2015-11-12 17:11:03 +00:00
|
|
|
${ECHO} ${MTREE_CMD} -deU ${MTREE_FSCHG} \
|
|
|
|
${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
|
2013-10-16 16:03:01 +00:00
|
|
|
${MTREE_FILTER} $$m | \
|
2015-11-12 17:11:03 +00:00
|
|
|
${MTREE_CMD} -deU ${MTREE_FSCHG} ${MTREE_FOLLOWS_SYMLINKS} \
|
|
|
|
-p $$d; \
|
2013-01-17 18:32:30 +00:00
|
|
|
done; true
|
2013-01-22 21:10:03 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
@set ${MTREES}; \
|
|
|
|
while test $$# -ge 2; do \
|
|
|
|
m=${.CURDIR}/$$1; \
|
|
|
|
shift; \
|
|
|
|
d=$$1; \
|
|
|
|
test "$$d" == "/" && d=""; \
|
|
|
|
d=${DISTBASE}$$d; \
|
|
|
|
shift; \
|
2015-04-06 08:37:40 +00:00
|
|
|
test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \
|
2018-01-23 17:59:06 +00:00
|
|
|
${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K all | " \
|
2013-01-30 17:39:43 +00:00
|
|
|
"sed s#^\.#.$$d# | ${METALOG.add}" ; \
|
2013-10-16 16:03:01 +00:00
|
|
|
${MTREE_FILTER} $$m | \
|
2018-01-23 17:59:06 +00:00
|
|
|
${MTREE_CMD:N-W} -C -K all | sed s#^\.#.$$d# | \
|
2013-01-30 17:39:43 +00:00
|
|
|
${METALOG.add} ; \
|
2013-01-22 21:10:03 +00:00
|
|
|
done; true
|
|
|
|
.endif
|
2015-02-05 11:42:59 +00:00
|
|
|
.if ${MK_NLS} != "no"
|
2001-06-10 18:44:01 +00:00
|
|
|
set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
|
2013-01-17 20:21:30 +00:00
|
|
|
while [ $$# -gt 0 ] ; do \
|
2015-10-27 23:35:02 +00:00
|
|
|
${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/nls/$$1"; \
|
1995-10-22 00:38:16 +00:00
|
|
|
shift; shift; \
|
2001-06-10 18:44:01 +00:00
|
|
|
done
|
2015-02-05 11:42:59 +00:00
|
|
|
.endif
|
1993-07-19 18:54:09 +00:00
|
|
|
|
2018-08-22 15:55:23 +00:00
|
|
|
etc-examples: ${META_DEPS}
|
2016-10-31 21:11:46 +00:00
|
|
|
cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
2002-07-05 13:39:38 +00:00
|
|
|
${BIN1} ${BIN2} nsmb.conf opieaccess \
|
2015-10-27 23:35:02 +00:00
|
|
|
${DESTDIR}${SHAREDIR}/examples/etc
|
2016-03-11 23:45:09 +00:00
|
|
|
|
1993-06-20 13:41:45 +00:00
|
|
|
.include <bsd.prog.mk>
|
2017-07-10 23:52:07 +00:00
|
|
|
|
|
|
|
.if ${MK_INSTALL_AS_USER} == "yes" && ${_uid} != 0
|
|
|
|
MTREE_FILTER= sed -e 's,\([gu]\)name=,\1id=,g' \
|
|
|
|
-e 's,\(uid=\)[^ ]* ,\1${_uid} ,' \
|
|
|
|
-e 's,\(gid=\)[^ ]* ,\1${_gid} ,' \
|
|
|
|
-e 's,\(uid=\)[^ ]*$$,\1${_uid},' \
|
|
|
|
-e 's,\(gid=\)[^ ]*$$,\1${_gid},'
|
|
|
|
.else
|
|
|
|
MTREE_FILTER= cat
|
|
|
|
.if !defined(NO_FSCHG)
|
|
|
|
MTREE_FSCHG= -i
|
|
|
|
.endif
|
|
|
|
.endif
|