1 # from: @(#)Makefile 5.11 (Berkeley) 5/21/91
8 # No need as it is empty and just causes rebuilds since this file does so much.
13 .if
${MK_SENDMAIL} != "no"
57 .if exists
(${.CURDIR
}/etc.
${MACHINE}/ttys
)
58 BIN1
+= etc.
${MACHINE}/ttys
59 .elif exists
(${.CURDIR
}/etc.
${MACHINE_ARCH}/ttys
)
60 BIN1
+= etc.
${MACHINE_ARCH}/ttys
61 .elif exists
(${.CURDIR
}/etc.
${MACHINE_CPUARCH}/ttys
)
62 BIN1
+= etc.
${MACHINE_CPUARCH}/ttys
64 .error etc.MACHINE
/ttys missing
67 OPENBSMDIR
= ${.CURDIR
}/..
/contrib
/openbsm
68 BSM_ETC_OPEN_FILES
= ${OPENBSMDIR}/etc
/audit_class \
69 ${OPENBSMDIR}/etc
/audit_event
70 BSM_ETC_RESTRICTED_FILES
= ${OPENBSMDIR}/etc
/audit_control \
71 ${OPENBSMDIR}/etc
/audit_user
72 BSM_ETC_EXEC_FILES
= ${OPENBSMDIR}/etc
/audit_warn
73 BSM_ETC_DIR
= ${DESTDIR}/etc
/security
75 # NB: keep these sorted by MK_* knobs
85 .if
${MK_AUTOFS} != "no"
89 .if
${MK_FREEBSD_UPDATE} != "no"
90 BIN1
+= freebsd-update.conf
97 .if
${MK_INETD} != "no"
101 .if
${MK_LOCATE} != "no"
102 BIN1
+= ${.CURDIR
}/..
/usr.bin
/locate
/locate
/locate.rc
105 .if
${MK_LPR} != "no"
106 BIN1
+= hosts.lpd printcap
109 .if
${MK_MAIL} != "no"
110 BIN1
+= ${.CURDIR
}/..
/usr.bin
/mail
/misc
/mail.rc
113 .if
${MK_NTP} != "no"
117 .if
${MK_OPENSSH} != "no"
118 SSH
= ${.CURDIR
}/..
/crypto
/openssh
/ssh_config \
119 ${.CURDIR
}/..
/crypto
/openssh
/sshd_config \
120 ${.CURDIR
}/..
/crypto
/openssh
/moduli
122 .if
${MK_OPENSSL} != "no"
123 SSL
= ${.CURDIR
}/..
/crypto
/openssl
/apps
/openssl.cnf
126 .if
${MK_NS_CACHING} != "no"
130 .if
${MK_PORTSNAP} != "no"
138 .if
${MK_SENDMAIL} != "no"
142 .if
${MK_TCSH} != "no"
143 BIN1
+= csh.cshrc csh.login csh.logout
146 .if
${MK_WIRELESS} != "no"
150 # -rwxr-xr-x root:wheel, for the new cron root:wheel
151 BIN2
= netstart pccard_ether rc.suspend rc.resume
153 MTREE
= BSD.debug.
dist BSD.
include.
dist BSD.root.
dist BSD.usr.
dist BSD.var.
dist
154 .if
${MK_LIB32} != "no"
155 MTREE
+= BSD.lib32.
dist
157 .if
${MK_LIBSOFT} != "no"
158 MTREE
+= BSD.libsoft.
dist
160 .if
${MK_TESTS} != "no"
161 MTREE
+= BSD.tests.
dist
163 .if
${MK_SENDMAIL} != "no"
164 MTREE
+= BSD.sendmail.
dist
169 .if
${MK_SENDMAIL} == "no"
170 ETCMAIL
=mailer.conf aliases
172 ETCMAIL
=Makefile README mailer.conf access.sample virtusertable.sample \
173 mailertable.sample aliases
176 # Special top level files for FreeBSD
180 DESTDIR
:= ${DESTDIR
:C
://*:/:g
}
183 .if
${MK_MAN} != "no"
184 ${_
+_
}cd
${.CURDIR
}/..
/share
/man
; ${MAKE} makedb
188 # Avoid installing tests here; "make distribution" will do this and
189 # correctly place them in the right location.
190 ${_
+_
}cd
${.CURDIR
} ; ${MAKE} MK_TESTS
=no
install \
191 DESTDIR
=${DISTDIR}/${DISTRIBUTION}
192 ${_
+_
}cd
${.CURDIR
} ; ${MAKE} distribution DESTDIR
=${DISTDIR}/${DISTRIBUTION}
194 .
include <bsd.endian.mk
>
195 .if
${TARGET_ENDIANNESS} == "1234"
197 .elif
${TARGET_ENDIANNESS} == "4321"
204 METALOG.add?
= cat
-l
>> ${METALOG}
208 .if
!defined
(DESTDIR
)
209 @echo
"set DESTDIR before running \"make ${.TARGET}\""
213 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
214 ${BIN1} ${DESTDIR}/etc
; \
215 cap_mkdb
${CAP_MKDB_ENDIAN} ${DESTDIR}/etc
/login.conf
; \
216 services_mkdb
${CAP_MKDB_ENDIAN} -q
-o
${DESTDIR}/var
/db
/services.db \
217 ${DESTDIR}/etc
/services
; \
218 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
755 \
219 ${BIN2} ${DESTDIR}/etc
; \
220 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
600 \
221 master.passwd nsmb.conf opieaccess
${DESTDIR}/etc
;
222 .if
${MK_BSNMP} != "no"
224 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
600 \
225 snmpd.config
${DESTDIR}/etc
;
228 sed
-i
"" -e
's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc
/crontab
230 .if
${MK_TCSH} == "no"
231 sed
-i
"" -e
's;/bin/csh;/bin/sh;' ${DESTDIR}/etc
/master.passwd
233 pwd_mkdb
-i
-p
-d
${DESTDIR}/etc
${DESTDIR}/etc
/master.passwd
236 echo
"./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \
237 echo
"./etc/passwd type=file mode=0644 uname=root gname=wheel"; \
238 echo
"./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
239 echo
"./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
242 .if
${MK_AUTOFS} != "no"
243 ${_
+_
}cd
${.CURDIR
}/autofs
; ${MAKE} install
245 .if
${MK_BLUETOOTH} != "no"
246 ${_
+_
}cd
${.CURDIR
}/bluetooth
; ${MAKE} install
248 .if
${MK_CASPER} != "no"
249 ${_
+_
}cd
${.CURDIR
}/casper
; ${MAKE} install
251 ${_
+_
}cd
${.CURDIR
}/defaults
; ${MAKE} install
252 ${_
+_
}cd
${.CURDIR
}/devd
; ${MAKE} install
253 ${_
+_
}cd
${.CURDIR
}/gss
; ${MAKE} install
254 .if
${MK_NTP} != "no"
255 ${_
+_
}cd
${.CURDIR
}/ntp
; ${MAKE} install
257 ${_
+_
}cd
${.CURDIR
}/periodic
; ${MAKE} install
258 .if
${MK_PKGBOOTSTRAP} != "no"
259 ${_
+_
}cd
${.CURDIR
}/pkg
; ${MAKE} install
261 ${_
+_
}cd
${.CURDIR
}/rc.d
; ${MAKE} install
262 ${_
+_
}cd
${.CURDIR
}/..
/share
/termcap
; ${MAKE} etc-termcap
263 ${_
+_
}cd
${.CURDIR
}/..
/usr.sbin
/rmt
; ${MAKE} etc-rmt
264 ${_
+_
}cd
${.CURDIR
}/pam.d
; ${MAKE} install
265 cd
${.CURDIR
}; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
0444 \
266 ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
267 cd
${.CURDIR
}; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
0600 \
268 ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
269 cd
${.CURDIR
}; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
0500 \
270 ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
271 .if
${MK_UNBOUND} != "no"
272 if
[ ! -e
${DESTDIR}/etc
/unbound
]; then \
273 ${INSTALL_SYMLINK} ..
/var
/unbound
${DESTDIR}/etc
/unbound
; \
276 .if
${MK_SENDMAIL} != "no"
277 ${_
+_
}cd
${.CURDIR
}/sendmail
; ${MAKE} distribution
279 .if
${MK_OPENSSH} != "no"
280 cd
${.CURDIR
}; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
281 ${SSH} ${DESTDIR}/etc
/ssh
283 .if
${MK_OPENSSL} != "no"
284 cd
${.CURDIR
}; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
285 ${SSL} ${DESTDIR}/etc
/ssl
287 .if
${MK_KERBEROS} != "no"
288 cd
${.CURDIR
}/root
; \
289 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
290 dot.k5login
${DESTDIR}/root
/.k5login
;
292 cd
${.CURDIR
}/root
; \
293 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
294 dot.profile
${DESTDIR}/root
/.profile
; \
295 rm -f
${DESTDIR}/.profile
; \
296 ln
${DESTDIR}/root
/.profile
${DESTDIR}/.profile
297 .if
${MK_TCSH} != "no"
298 cd
${.CURDIR
}/root
; \
299 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
300 dot.cshrc
${DESTDIR}/root
/.cshrc
; \
301 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
302 dot.login
${DESTDIR}/root
/.login
; \
303 rm -f
${DESTDIR}/.cshrc
; \
304 ln
${DESTDIR}/root
/.cshrc
${DESTDIR}/.cshrc
306 cd
${.CURDIR
}/mtree
; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
444 \
307 ${MTREE} ${DESTDIR}/etc
/mtree
308 .if
${MK_MAIL} != "no"
309 cd
${.CURDIR
}/mail
; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 \
310 ${ETCMAIL} ${DESTDIR}/etc
/mail
311 if
[ -d
${DESTDIR}/etc
/mail
-a
-f
${DESTDIR}/etc
/mail
/aliases
-a \
312 ! -f
${DESTDIR}/etc
/aliases
]; then \
313 ln
-s mail
/aliases
${DESTDIR}/etc
/aliases
; \
316 ${INSTALL} -o
${BINOWN} -g operator
-m
664 /dev
/null \
317 ${DESTDIR}/etc
/dumpdates
318 .if
${MK_LOCATE} != "no"
319 ${INSTALL} -o nobody
-g
${BINGRP} -m
644 /dev
/null \
320 ${DESTDIR}/var
/db
/locate.database
322 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
644 ${.CURDIR
}/minfree \
324 cd
${.CURDIR
}/..
; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
444 \
325 ${FREEBSD} ${DESTDIR}/
326 .if
${MK_BOOT} != "no"
327 .if exists
(${.CURDIR
}/..
/sys
/${MACHINE}/conf
/GENERIC.hints
)
328 ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
444 \
329 ${.CURDIR
}/..
/sys
/${MACHINE}/conf
/GENERIC.hints \
330 ${DESTDIR}/boot
/device.hints
333 .if
${MK_NIS} == "no"
334 sed
-i
"" -e
's/.*_compat:/# &/' -e
's/compat$$/files/' \
335 ${DESTDIR}/etc
/nsswitch.conf
340 .if
${MK_INSTALL_AS_USER} == "yes" && ${_uid} != 0
341 MTREE_FILTER
= sed
-e
's,\([gu]\)name=,\1id=,g' \
342 -e
's,\(uid=\)[^ ]* ,\1${_uid} ,' \
343 -e
's,\(gid=\)[^ ]* ,\1${_gid} ,' \
344 -e
's,\(uid=\)[^ ]*$$,\1${_uid},' \
345 -e
's,\(gid=\)[^ ]*$$,\1${_gid},'
348 .if
!defined
(NO_FSCHG
)
353 MTREES
= mtree
/BSD.root.
dist / \
354 mtree
/BSD.var.
dist /var \
355 mtree
/BSD.usr.
dist /usr \
356 mtree
/BSD.
include.
dist /usr
/include \
357 mtree
/BSD.debug.
dist /usr
/lib
358 .if
${MK_GROFF} != "no"
359 MTREES
+= mtree
/BSD.groff.
dist /usr
361 .if
${MK_LIB32} != "no"
362 MTREES
+= mtree
/BSD.lib32.
dist /usr
363 MTREES
+= mtree
/BSD.lib32.
dist /usr
/lib
/debug
/usr
365 .if
${MK_LIBSOFT} != "no"
366 MTREES
+= mtree
/BSD.libsoft.
dist /usr
367 MTREES
+= mtree
/BSD.libsoft.
dist /usr
/lib
/debug
/usr
369 .if
${MK_TESTS} != "no"
370 MTREES
+= mtree
/BSD.tests.
dist ${TESTSBASE}
371 MTREES
+= mtree
/BSD.tests.
dist /usr
/lib
/debug
/${TESTSBASE}
373 .if
${MK_SENDMAIL} != "no"
374 MTREES
+= mtree
/BSD.sendmail.
dist /
376 .for mtree in
${LOCAL_MTREE}
377 MTREES
+= ..
/${mtree} /
380 # Clean up some directories that where mistakenly created as files that
381 # should not have been as part of the nvi update in r281994.
382 # This should be removed after 11.0-RELEASE.
383 DISTRIB_CLEANUP_SHARE_FILES
= ${SHAREDIR}/doc
/usd
/10.exref
${SHAREDIR}/doc
/usd
/11.edit
384 DISTRIB_CLEANUP_SHARE_FILES
+= ${SHAREDIR}/doc
/usd
/12.vi
${SHAREDIR}/doc
/usd
/13.viref
385 distrib-cleanup
: .PHONY
386 for file in
${DISTRIB_CLEANUP_SHARE_FILES}; do \
387 if
[ -f
${DESTDIR}/$${file} ]; then \
388 rm -f
${DESTDIR}/$${file}; \
392 distrib-dirs
: ${MTREES
:N
/*} distrib-cleanup .PHONY
394 while
test $$# -ge 2; do \
399 test -d
$$d || mkdir
-p
$$d; \
400 ${ECHO} ${MTREE_CMD} -deU
${MTREE_FSCHG} \
401 ${MTREE_FOLLOWS_SYMLINKS} -f
$$m -p
$$d; \
402 ${MTREE_FILTER} $$m | \
403 ${MTREE_CMD} -deU
${MTREE_FSCHG} ${MTREE_FOLLOWS_SYMLINKS} \
408 while
test $$# -ge 2; do \
412 test "$$d" == "/" && d
=""; \
415 test -d
${DESTDIR}/$$d || mkdir
-p
${DESTDIR}/$$d; \
416 ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \
417 "sed s#^\.#.$$d# | ${METALOG.add}" ; \
418 ${MTREE_FILTER} $$m | \
419 ${MTREE_CMD
:N-W
} -C
-K uname
,gname | sed s
#^\.#.$$d# | \
423 ${INSTALL_SYMLINK} usr
/src
/sys
${DESTDIR}/sys
424 .if
${MK_MAN} != "no"
425 cd
${DESTDIR}${SHAREDIR}/man
; \
426 for
mandir in man
*; do \
427 ${INSTALL_SYMLINK} ..
/$$mandir \
428 ${DESTDIR}${SHAREDIR}/man
/en.ISO8859-1
/; \
429 ${INSTALL_SYMLINK} ..
/$$mandir \
430 ${DESTDIR}${SHAREDIR}/man
/en.UTF-8
/; \
432 .if
${MK_OPENSSL} != "no"
433 cd
${DESTDIR}${SHAREDIR}/openssl
/man
; \
434 for
mandir in man
*; do \
435 ${INSTALL_SYMLINK} ..
/$$mandir \
436 ${DESTDIR}${SHAREDIR}/openssl
/man
/en.ISO8859-1
/; \
439 set
- `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
440 while
[ $$# -gt 0 ] ; do \
441 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/man/$$1"; \
442 if
[ "${MK_OPENSSL}" != "no" ]; then \
443 ${INSTALL_SYMLINK} "$$2" \
444 "${DESTDIR}${SHAREDIR}/openssl/man/$$1"; \
449 .if
${MK_NLS} != "no"
450 set
- `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
451 while
[ $$# -gt 0 ] ; do \
452 ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/nls/$$1"; \
457 etc-examples-install
: ${META_DEPS}
458 cd
${.CURDIR
}; ${INSTALL} -o
${BINOWN} -g
${BINGRP} -m
444 \
459 ${BIN1} ${BIN2} nsmb.conf opieaccess \
460 ${DESTDIR}${SHAREDIR}/examples
/etc
462 etc-examples
: etc-examples-install
463 ${_
+_
}cd
${.CURDIR
}/defaults
; \
464 ${MAKE} ${${MK_STAGING} == "yes":?
all:install} \
465 DESTDIR
=${DESTDIR}${SHAREDIR}/examples
467 .
include <bsd.prog.mk
>