Index: head/etc/Makefile =================================================================== --- head/etc/Makefile (revision 245751) +++ head/etc/Makefile (revision 245752) @@ -1,357 +1,360 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD$ .include .if ${MK_SENDMAIL} != "no" SUBDIR= sendmail .endif BIN1= crontab \ devd.conf \ devfs.conf \ ddb.conf \ dhclient.conf \ disktab \ fbtab \ ftpusers \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ inetd.conf \ libalias.conf \ login.access \ login.conf \ mac.conf \ motd \ netconfig \ network.subr \ networks \ newsyslog.conf \ nsswitch.conf \ phones \ profile \ protocols \ rc \ rc.bsdextended \ rc.firewall \ rc.initdiskless \ rc.sendmail \ rc.shutdown \ rc.subr \ remote \ rpc \ services \ shells \ sysctl.conf \ syslog.conf \ termcap.small .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) BIN1+= etc.${MACHINE_ARCH}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) BIN1+= etc.${MACHINE_CPUARCH}/ttys .else .error etc.MACHINE/ttys missing .endif OPENBSMDIR= ${.CURDIR}/../contrib/openbsm BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ ${OPENBSMDIR}/etc/audit_event BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ ${OPENBSMDIR}/etc/audit_user BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn BSM_ETC_DIR= ${DESTDIR}/etc/security # NB: keep these sorted by MK_* knobs .if ${MK_AMD} != "no" BIN1+= amd.map .endif .if ${MK_APM} != "no" BIN1+= apmd.conf .endif .if ${MK_BSNMP} != "no" BIN1+= snmpd.config .endif .if ${MK_FREEBSD_UPDATE} != "no" BIN1+= freebsd-update.conf .endif .if ${MK_LOCATE} != "no" BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc .endif .if ${MK_LPR} != "no" BIN1+= hosts.lpd printcap .endif .if ${MK_MAIL} != "no" BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc .endif .if ${MK_NTP} != "no" BIN1+= ntp.conf .endif .if ${MK_OPENSSH} != "no" SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ ${.CURDIR}/../crypto/openssh/sshd_config \ ${.CURDIR}/../crypto/openssh/moduli .endif .if ${MK_OPENSSL} != "no" SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf .endif .if ${MK_NS_CACHING} != "no" BIN1+= nscd.conf .endif .if ${MK_PORTSNAP} != "no" BIN1+= portsnap.conf .endif .if ${MK_PF} != "no" BIN1+= pf.os .endif .if ${MK_TCSH} != "no" BIN1+= csh.cshrc csh.login csh.logout .endif .if ${MK_WIRELESS} != "no" BIN1+= regdomain.xml .endif # -rwxr-xr-x root:wheel, for the new cron root:wheel BIN2= netstart pccard_ether rc.suspend rc.resume MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist .if ${MK_SENDMAIL} != "no" MTREE+= BSD.sendmail.dist .endif .if ${MK_BIND} != "no" MTREE+= BIND.chroot.dist .if ${MK_BIND_LIBS} != "no" MTREE+= BIND.include.dist .endif .endif PPPCNF= ppp.conf .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ mailertable.sample aliases .endif # Special top level files for FreeBSD FREEBSD=COPYRIGHT afterinstall: .if ${MK_MAN} != "no" ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb .endif distribute: ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} .include .if ${TARGET_ENDIANNESS} == "1234" CAP_MKDB_ENDIAN?= -l PWD_MKDB_ENDIAN?= -L .elif ${TARGET_ENDIANNESS} == "4321" CAP_MKDB_ENDIAN?= -b PWD_MKDB_ENDIAN?= -B .else CAP_MKDB_ENDIAN?= PWD_MKDB_ENDIAN?= .endif distribution: .if !defined(DESTDIR) @echo "set DESTDIR before running \"make ${.TARGET}\"" @false .endif cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; .if ${MK_AT} == "no" sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab .endif .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd .endif pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ ${DESTDIR}/etc/master.passwd .if ${MK_ATF} != "no" ${_+_}cd ${.CURDIR}/atf; ${MAKE} install .endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} .if ${MK_BIND_MTREE} != "no" if [ ! -e ${DESTDIR}/etc/namedb ]; then \ ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ fi .endif .if ${MK_BIND_ETC} != "no" ${_+_}cd ${.CURDIR}/namedb; ${MAKE} install .endif .if ${MK_SENDMAIL} != "no" ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif .if ${MK_OPENSSH} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSH} ${DESTDIR}/etc/ssh .endif .if ${MK_OPENSSL} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSL} ${DESTDIR}/etc/ssl .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.k5login ${DESTDIR}/root/.k5login; .endif cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.profile ${DESTDIR}/root/.profile; \ rm -f ${DESTDIR}/.profile; \ ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile .if ${MK_TCSH} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.cshrc ${DESTDIR}/root/.cshrc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.login ${DESTDIR}/root/.login; \ rm -f ${DESTDIR}/.cshrc; \ ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .endif cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${MTREE} ${DESTDIR}/etc/mtree .if ${MK_PPP} != "no" cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ ${PPPCNF} ${DESTDIR}/etc/ppp .endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ ln -s mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ ${DESTDIR}/etc/dumpdates ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/db/locate.database ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ ${DESTDIR}/var/crash cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif .endif .if ${MK_NIS} == "no" sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ ${DESTDIR}/etc/nsswitch.conf .endif MTREE_CMD?= mtree MTREES= mtree/BSD.root.dist / \ mtree/BSD.var.dist /var \ mtree/BSD.usr.dist /usr \ mtree/BSD.include.dist /usr/include .if ${MK_BIND_LIBS} != "no" MTREES+= mtree/BIND.include.dist /usr/include .endif .if ${MK_BIND_MTREE} != "no" MTREES+= mtree/BIND.chroot.dist /var/named .endif .if ${MK_GROFF} != "no" MTREES+= mtree/BSD.groff.dist /usr .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / .endif .for mtree in ${LOCAL_MTREE} MTREES+= ../${mtree} / .endfor distrib-dirs: @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ shift; \ d=${DESTDIR}$$1; \ shift; \ ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \ -f $$m -p $$d; \ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ done; true - ln -sfh usr/src/sys ${DESTDIR}/sys + ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys cd ${DESTDIR}/usr/share/man; \ for mandir in man*; do \ - ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ - ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \ + ${INSTALL_SYMLINK} ../$$mandir \ + ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ + ${INSTALL_SYMLINK} ../$$mandir \ + ${DESTDIR}/usr/share/man/en.UTF-8/; \ done cd ${DESTDIR}/usr/share/openssl/man; \ for mandir in man*; do \ - ln -sfh ../$$mandir \ + ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ done set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ while [ $$# -gt 0 ] ; do \ - ln -sfh "$$2" "${DESTDIR}/usr/share/man/$$1"; \ - ln -sfh "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \ + ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \ + ${INSTALL_SYMLINK} "$$2" \ + "${DESTDIR}/usr/share/openssl/man/$$1"; \ shift; shift; \ done set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ - ln -sfh "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ + ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ shift; shift; \ done etc-examples: cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BIN1} ${BIN2} nsmb.conf opieaccess \ ${DESTDIR}/usr/share/examples/etc ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ DESTDIR=${DESTDIR}/usr/share/examples .include Index: head/share/mk/bsd.incs.mk =================================================================== --- head/share/mk/bsd.incs.mk (revision 245751) +++ head/share/mk/bsd.incs.mk (revision 245752) @@ -1,84 +1,84 @@ # $FreeBSD$ .if !target(____) .error bsd.incs.mk cannot be included directly. .endif .if !defined(NO_INCS) && ${MK_TOOLCHAIN} != "no" INCSGROUPS?= INCS .if !target(buildincludes) .for group in ${INCSGROUPS} buildincludes: ${${group}} .endfor .endif all: buildincludes .if !target(installincludes) .for group in ${INCSGROUPS} .if defined(${group}) && !empty(${group}) ${group}OWN?= ${BINOWN} ${group}GRP?= ${BINGRP} ${group}MODE?= ${NOBINMODE} ${group}DIR?= ${INCLUDEDIR} _${group}INCS= .for header in ${${group}} .if defined(${group}OWN_${header:T}) || defined(${group}GRP_${header:T}) || \ defined(${group}MODE_${header:T}) || defined(${group}DIR_${header:T}) || \ defined(${group}NAME_${header:T}) ${group}OWN_${header:T}?= ${${group}OWN} ${group}GRP_${header:T}?= ${${group}GRP} ${group}MODE_${header:T}?= ${${group}MODE} ${group}DIR_${header:T}?= ${${group}DIR} .if defined(${group}NAME) ${group}NAME_${header:T}?= ${${group}NAME} .else ${group}NAME_${header:T}?= ${header:T} .endif installincludes: _${group}INS_${header:T} _${group}INS_${header:T}: ${header} ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} .else _${group}INCS+= ${header} .endif .endfor .if !empty(_${group}INCS) installincludes: _${group}INS _${group}INS: ${_${group}INCS} .if defined(${group}NAME) ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} .else ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR} .endif .endif .endif # defined(${group}) && !empty(${group}) .endfor .if defined(INCSLINKS) && !empty(INCSLINKS) installincludes: @set ${INCSLINKS}; \ while test $$# -ge 2; do \ l=$$1; \ shift; \ t=${DESTDIR}$$1; \ shift; \ ${ECHO} $$t -\> $$l; \ - ln -fs $$l $$t; \ + ${INSTALL_SYMLINK} $$l $$t; \ done; true .endif .endif # !target(installincludes) realinstall: installincludes .ORDER: beforeinstall installincludes .endif # !defined(NO_INCS) && ${MK_TOOLCHAIN} != "no" Index: head/share/mk/bsd.info.mk =================================================================== --- head/share/mk/bsd.info.mk (revision 245751) +++ head/share/mk/bsd.info.mk (revision 245752) @@ -1,199 +1,199 @@ # $FreeBSD$ # # The include file handles installing GNU (tech)info files. # Texinfo is a documentation system that uses a single source # file to produce both on-line information and printed output. # # # +++ variables +++ # # CLEANFILES Additional files to remove for the clean and cleandir targets. # # DESTDIR Change the tree where the info files gets installed. [not set] # # DVIPS A program which convert a TeX DVI file to PostScript [dvips] # # DVIPS2ASCII A program to convert a PostScript file which was prior # converted from a TeX DVI file to ascii/latin1 [dvips2ascii] # # FORMATS Indicates which output formats will be generated # (info, dvi, latin1, ps, html). [info] # # ICOMPRESS_CMD Program to compress info files. Output is to # stdout. [${COMPRESS_CMD}] # # INFO texinfo files, without suffix. [set in Makefile] # # INFO2HTML A program for converting GNU info files into HTML files # [info2html] # # INFODIR Base path for GNU's hypertext system # called Info (see info(1)). [${SHAREDIR}/info] # # INFODIRFILE Top level node/index for info files. [dir] # # INFOGRP Info group. [${SHAREGRP}] # # INFOMODE Info mode. [${NOBINMODE}] # # INFOOWN Info owner. [${SHAREOWN}] # # INFOSECTION Default section (if one could not be found in # the Info file). [Miscellaneous] # # INSTALLINFO A program for installing directory entries from Info # file in the ${INFODIR}/${INFODIRFILE}. [install-info] # # INSTALLINFOFLAGS Options for ${INSTALLINFO} command. [--quiet] # # INSTALLINFODIRS ??? # # MAKEINFO A program for converting GNU Texinfo files into Info # file. [makeinfo] # # MAKEINFOFLAGS Options for ${MAKEINFO} command. [--no-split] # # NO_INFOCOMPRESS If you do not want info files be # compressed when they are installed. [not set] # # TEX A program for converting tex files into dvi files [tex] # # # +++ targets +++ # # install: # Install the info files. # # # bsd.obj.mk: cleandir and obj .include MAKEINFO?= makeinfo MAKEINFOFLAGS+= --no-split # simplify some things, e.g., compression SRCDIR?= ${.CURDIR} INFODIRFILE?= dir INSTALLINFO?= install-info INSTALLINFOFLAGS+=--quiet INFOSECTION?= Miscellaneous ICOMPRESS_CMD?= ${COMPRESS_CMD} ICOMPRESS_EXT?= ${COMPRESS_EXT} FORMATS?= info INFO2HTML?= info2html TEX?= tex DVIPS?= dvips DVIPS2ASCII?= dvips2ascii .SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html .texi.info .texinfo.info: ${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} -I ${SRCDIR} ${.IMPSRC} \ -o ${.TARGET} .texi.dvi .texinfo.dvi: TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \ ${TEX} ${.IMPSRC} > ${.IMPSRC:T:R}-la.texi TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \ ${TEX} ${.IMPSRC:T:R}-la.texi ${.TARGET}.new mv -f ${.TARGET}.new ${.TARGET} .dvi.ps: ${DVIPS} -o ${.TARGET} ${.IMPSRC} .info.html: ${INFO2HTML} ${.IMPSRC} - ln -f ${.TARGET:R}.info.Top.html ${.TARGET} + ${INSTALL_LINK} ${.TARGET:R}.info.Top.html ${.TARGET} .PATH: ${.CURDIR} ${SRCDIR} .for _f in ${FORMATS} IFILENS+= ${INFO:S/$/.${_f}/} .endfor .if ${MK_INFO} != "no" CLEANFILES+= ${IFILENS} .if !defined(NO_INFOCOMPRESS) CLEANFILES+= ${IFILENS:S/$/${ICOMPRESS_EXT}/} IFILES= ${IFILENS:S/$/${ICOMPRESS_EXT}/:S/.html${ICOMPRESS_EXT}/.html/} all: ${IFILES} .else IFILES= ${IFILENS} all: ${IFILES} .endif .else all: .endif .for x in ${IFILENS} ${x:S/$/${ICOMPRESS_EXT}/}: ${x} ${ICOMPRESS_CMD} ${.ALLSRC} > ${.TARGET} .endfor .for x in ${INFO} INSTALLINFODIRS+= ${x:S/$/-install/} ${x:S/$/-install/}: .if !empty(.MAKEFLAGS:M-j) lockf -k ${DESTDIR}${INFODIR}/${INFODIRFILE} \ ${INSTALLINFO} ${INSTALLINFOFLAGS} \ --defsection=${INFOSECTION} \ --defentry=${INFOENTRY_${x}} \ ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE} .else ${INSTALLINFO} ${INSTALLINFOFLAGS} \ --defsection=${INFOSECTION} \ --defentry=${INFOENTRY_${x}} \ ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE} .endif .endfor .PHONY: ${INSTALLINFODIRS} .if defined(SRCS) CLEANFILES+= ${INFO}.texi ${INFO}.texi: ${SRCS} cat ${.ALLSRC} > ${.TARGET} .endif # tex garbage .if !empty(FORMATS:Mps) || !empty(FORMATS:Mdvi) || !empty(FORMATS:Mlatin1) .for _f in aux cp fn ky log out pg toc tp vr dvi CLEANFILES+= ${INFO:S/$/.${_f}/} ${INFO:S/$/-la.${_f}/} .endfor CLEANFILES+= ${INFO:S/$/-la.texi/} .endif .if !empty(FORMATS:Mhtml) CLEANFILES+= ${INFO:S/$/.info.*.html/} ${INFO:S/$/.info/} .endif .if ${MK_INFO} != "no" && defined(INFO) install: ${INSTALLINFODIRS} .if !empty(IFILES:N*.html) ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ ${IFILES:N*.html} ${DESTDIR}${INFODIR} .endif .if !empty(FORMATS:Mhtml) ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR} .endif .else # The indirection in the following is to avoid the null install rule # "install:" from being overridden by the implicit .sh rule if there # happens to be a source file named install.sh. This assumes that there # is no source file named __null_install.sh. install: __null_install __null_install: .endif .include Index: head/share/mk/bsd.lib.mk =================================================================== --- head/share/mk/bsd.lib.mk (revision 245751) +++ head/share/mk/bsd.lib.mk (revision 245752) @@ -1,420 +1,420 @@ # from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 # $FreeBSD$ # .include # Set up the variables controlling shared libraries. After this section, # SHLIB_NAME will be defined only if we are to create a shared library. # SHLIB_LINK will be defined only if we are to create a link to it. # INSTALL_PIC_ARCHIVE will be defined only if we are to create a PIC archive. .if defined(NO_PIC) .undef SHLIB_NAME .undef INSTALL_PIC_ARCHIVE .else .if !defined(SHLIB) && defined(LIB) SHLIB= ${LIB} .endif .if !defined(SHLIB_NAME) && defined(SHLIB) && defined(SHLIB_MAJOR) SHLIB_NAME= lib${SHLIB}.so.${SHLIB_MAJOR} .endif .if defined(SHLIB_NAME) && !empty(SHLIB_NAME:M*.so.*) SHLIB_LINK?= ${SHLIB_NAME:R} .endif SONAME?= ${SHLIB_NAME} .endif .if defined(CRUNCH_CFLAGS) CFLAGS+= ${CRUNCH_CFLAGS} .endif .if ${MK_ASSERT_DEBUG} == "no" CFLAGS+= -DNDEBUG NO_WERROR= .endif .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} .if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" CTFFLAGS+= -g .endif .else STRIP?= -s .endif .include # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries # .So used for PIC object files .SUFFIXES: .SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln .if !defined(PICFLAG) .if ${MACHINE_CPUARCH} == "sparc64" PICFLAG=-fPIC .else PICFLAG=-fpic .endif .endif PO_FLAG=-pg .c.o: ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .c.po: ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .c.So: ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .cc.o .C.o .cpp.o .cxx.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .cc.So .C.So .cpp.So .cxx.So: ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} ${CTFCONVERT_CMD} .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} ${CTFCONVERT_CMD} .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} ${CTFCONVERT_CMD} .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .S.po: ${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} all: objwarn .include # Allow libraries to specify their own version map or have it # automatically generated (see bsd.symver.mk above). .if ${MK_SYMVER} == "yes" && !empty(VERSION_MAP) ${SHLIB_NAME}: ${VERSION_MAP} LDFLAGS+= -Wl,--version-script=${VERSION_MAP} .endif .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) OBJS+= ${SRCS:N*.h:R:S/$/.o/} .endif .if defined(LIB) && !empty(LIB) _LIBS= lib${LIB}.a lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} .if !defined(NM) @${AR} ${ARFLAGS} ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} .else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} .endif ${RANLIB} ${.TARGET} .endif .if !defined(INTERNALLIB) .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) _LIBS+= lib${LIB}_p.a POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} lib${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} .if !defined(NM) @${AR} ${ARFLAGS} ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD} .else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} .endif ${RANLIB} ${.TARGET} .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) SOBJS+= ${OBJS:.o=.So} .endif .if defined(SHLIB_NAME) _LIBS+= ${SHLIB_NAME} .if defined(DEBUG_FLAGS) SHLIB_NAME_FULL=${SHLIB_NAME}.debug .else SHLIB_NAME_FULL=${SHLIB_NAME} .endif SOLINKOPTS= -shared -Wl,-x .if !defined(ALLOW_SHARED_TEXTREL) SOLINKOPTS+= -Wl,--fatal-warnings -Wl,--warn-shared-textrel .endif .if target(beforelinking) beforelinking: ${SOBJS} ${SHLIB_NAME_FULL}: beforelinking .endif ${SHLIB_NAME_FULL}: ${SOBJS} @${ECHO} building shared library ${SHLIB_NAME} @rm -f ${SHLIB_NAME} ${SHLIB_LINK} .if defined(SHLIB_LINK) - @ln -fs ${SHLIB_NAME} ${SHLIB_LINK} + @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif .if !defined(NM) @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `lorder ${SOBJS} | tsort -q` ${LDADD} .else @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif .if defined(DEBUG_FLAGS) ${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.symbols ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.symbols \ ${SHLIB_NAME_FULL} ${.TARGET} ${SHLIB_NAME}.symbols: ${SHLIB_NAME_FULL} ${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET} .endif .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" _LIBS+= lib${LIB}_pic.a lib${LIB}_pic.a: ${SOBJS} @${ECHO} building special pic ${LIB} library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD} ${RANLIB} ${.TARGET} .endif .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) LINTLIB= llib-l${LIB}.ln _LIBS+= ${LINTLIB} LINTOBJS+= ${SRCS:M*.c:.c=.ln} ${LINTLIB}: ${LINTOBJS} @${ECHO} building lint library ${.TARGET} @rm -f ${.TARGET} ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} .endif .endif # !defined(INTERNALLIB) all: ${_LIBS} .if ${MK_MAN} != "no" all: _manpages .endif _EXTRADEPEND: @TMP=_depend$$$$; \ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So:/' < ${DEPENDFILE} \ > $$TMP; \ mv $$TMP ${DEPENDFILE} .if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME) .if defined(DPADD) && !empty(DPADD) echo ${SHLIB_NAME}: ${DPADD} >> ${DEPENDFILE} .endif .endif .if !target(install) .if defined(PRECIOUSLIB) .if !defined(NO_FSCHG) SHLINSTALLFLAGS+= -fschg .endif SHLINSTALLFLAGS+= -S .endif _INSTALLFLAGS:= ${INSTALLFLAGS} .for ie in ${INSTALLFLAGS_EDIT} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} .endfor _SHLINSTALLFLAGS:= ${SHLINSTALLFLAGS} .for ie in ${INSTALLFLAGS_EDIT} _SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}} .endfor .if !defined(INTERNALLIB) realinstall: _libinstall .ORDER: beforeinstall _libinstall _libinstall: .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR} .endif .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR} .endif .if defined(SHLIB_NAME) ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR} .if defined(DEBUG_FLAGS) ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} \ ${SHLIB_NAME}.symbols ${DESTDIR}${SHLIBDIR} .endif .if defined(SHLIB_LINK) # ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building # and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory # prefix where shared objects will be installed. ${_LDSCRIPTROOT} is the # directory prefix that will be used in generated ld(1) scripts. They cannot # be coalesced because of the way ld(1) handles the sysroot prefix (used in the # cross-toolchain): # - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty. # - 32 bits shims are not, so ${_LDSCRIPTROOT} is used to specify their full # path. Note that ld(1) scripts are generated both during buildworld and # installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty. # On the other hand, the use of ${_SHLIBDIRPREFIX} is more consistent since it # does not involve the logic of a tool we do not own. .if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${SHLIBDIR}/${SHLIB_NAME},g' \ -e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${LIBDIR},g' \ ${.CURDIR}/${SHLIB_LDSCRIPT} > lib${LIB}.ld ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .else .if ${SHLIBDIR} == ${LIBDIR} - ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK} + ${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .else - ln -fs ${_SHLIBDIRPREFIX}${SHLIBDIR}/${SHLIB_NAME} \ + ${INSTALL_SYMLINK} ${_SHLIBDIRPREFIX}${SHLIBDIR}/${SHLIB_NAME} \ ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .if exists(${DESTDIR}${LIBDIR}/${SHLIB_NAME}) -chflags noschg ${DESTDIR}${LIBDIR}/${SHLIB_NAME} rm -f ${DESTDIR}${LIBDIR}/${SHLIB_NAME} .endif .endif .endif # SHLIB_LDSCRIPT .endif # SHLIB_LINK .endif # SHIB_NAME .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR} .endif .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR} .endif .endif # !defined(INTERNALLIB) .if !defined(LIBRARIES_ONLY) .include .include .include .endif .include .if ${MK_MAN} != "no" realinstall: _maninstall .ORDER: beforeinstall _maninstall .endif .endif .if !target(lint) lint: ${SRCS:M*.c} ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} .endif .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) .include .endif .include .if !exists(${.OBJDIR}/${DEPENDFILE}) .if defined(LIB) && !empty(LIB) ${OBJS} ${STATICOBJS} ${POBJS}: ${SRCS:M*.h} .for _S in ${SRCS:N*.[hly]} ${_S:R}.po: ${_S} .endfor .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) ${SOBJS}: ${SRCS:M*.h} .for _S in ${SRCS:N*.[hly]} ${_S:R}.So: ${_S} .endfor .endif .endif .if !target(clean) clean: .if defined(CLEANFILES) && !empty(CLEANFILES) rm -f ${CLEANFILES} .endif .if defined(LIB) && !empty(LIB) rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS} .endif .if !defined(INTERNALLIB) .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) rm -f ${POBJS} ${POBJS:S/$/.tmp/} .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) rm -f ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/} .endif .if defined(SHLIB_NAME) .if defined(SHLIB_LINK) .if defined(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) rm -f lib${LIB}.ld .endif rm -f ${SHLIB_LINK} .endif .if defined(LIB) && !empty(LIB) rm -f lib${LIB}.so.* lib${LIB}.so .endif .endif .if defined(WANT_LINT) && defined(LIB) && !empty(LIB) rm -f ${LINTOBJS} .endif .endif # !defined(INTERNALLIB) .if defined(_LIBS) && !empty(_LIBS) rm -f ${_LIBS} .endif .if defined(CLEANDIRS) && !empty(CLEANDIRS) rm -rf ${CLEANDIRS} .endif .if !empty(VERSION_DEF) && !empty(SYMBOL_MAPS) rm -f ${VERSION_MAP} .endif .endif .include .include Index: head/share/mk/bsd.links.mk =================================================================== --- head/share/mk/bsd.links.mk (revision 245751) +++ head/share/mk/bsd.links.mk (revision 245752) @@ -1,31 +1,31 @@ # $FreeBSD$ .if !target(____) .error bsd.links.mk cannot be included directly. .endif afterinstall: _installlinks .ORDER: realinstall _installlinks _installlinks: .if defined(LINKS) && !empty(LINKS) @set ${LINKS}; \ while test $$# -ge 2; do \ l=${DESTDIR}$$1; \ shift; \ t=${DESTDIR}$$1; \ shift; \ ${ECHO} $$t -\> $$l; \ - ln -f $$l $$t; \ + ${INSTALL_LINK} $$l $$t; \ done; true .endif .if defined(SYMLINKS) && !empty(SYMLINKS) @set ${SYMLINKS}; \ while test $$# -ge 2; do \ l=$$1; \ shift; \ t=${DESTDIR}$$1; \ shift; \ ${ECHO} $$t -\> $$l; \ - ln -fs $$l $$t; \ + ${INSTALL_SYMLINK} $$l $$t; \ done; true .endif Index: head/share/mk/bsd.man.mk =================================================================== --- head/share/mk/bsd.man.mk (revision 245751) +++ head/share/mk/bsd.man.mk (revision 245752) @@ -1,250 +1,250 @@ # $FreeBSD$ # # The include file handles installing manual pages and # their links. # # # +++ variables +++ # # DESTDIR Change the tree where the man pages gets installed. [not set] # # MANDIR Base path for manual installation. [${SHAREDIR}/man/man] # # MANOWN Manual owner. [${SHAREOWN}] # # MANGRP Manual group. [${SHAREGRP}] # # MANMODE Manual mode. [${NOBINMODE}] # # MANSUBDIR Subdirectory under the manual page section, i.e. "/i386" # or "/tahoe" for machine specific manual pages. # # MAN The manual pages to be installed. For sections see # variable ${SECTIONS} # # MCOMPRESS_CMD Program to compress man pages. Output is to # stdout. [${COMPRESS_CMD}] # # MLINKS List of manual page links (using a suffix). The # linked-to file must come first, the linked file # second, and there may be multiple pairs. The files # are hard-linked. # # NO_MANCOMPRESS If you do not want unformatted manual pages to be # compressed when they are installed. [not set] # # NO_MLINKS If you do not want install manual page links. [not set] # # MANFILTER command to pipe the raw man page through before compressing # or installing. Can be used to do sed substitution. # # MANBUILDCAT create preformatted manual pages in addition to normal # pages. [not set] # # MROFF_CMD command and flags to create preformatted pages # # +++ targets +++ # # maninstall: # Install the manual pages and their links. # .if !target(____) .error bsd.man.mk cannot be included directly. .endif MINSTALL?= ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} CATDIR= ${MANDIR:H:S/$/\/cat/} CATEXT= .cat MROFF_CMD?= groff -Tascii -mtty-char -man -t MCOMPRESS_CMD?= ${COMPRESS_CMD} MCOMPRESS_EXT?= ${COMPRESS_EXT} SECTIONS= 1 2 3 4 5 6 7 8 9 .SUFFIXES: ${SECTIONS:S/^/./g} # Backwards compatibility. .if !defined(MAN) .for __sect in ${SECTIONS} .if defined(MAN${__sect}) && !empty(MAN${__sect}) MAN+= ${MAN${__sect}} .endif .endfor .endif _manpages: all-man: _manpages .if defined(NO_MANCOMPRESS) # Make special arrangements to filter to a temporary file at build time # for NO_MANCOMPRESS. .if defined(MANFILTER) FILTEXTENSION= .filt .else FILTEXTENSION= .endif ZEXT= .if defined(MANFILTER) .if defined(MAN) && !empty(MAN) CLEANFILES+= ${MAN:T:S/$/${FILTEXTENSION}/g} CLEANFILES+= ${MAN:T:S/$/${CATEXT}${FILTEXTENSION}/g} .for __page in ${MAN} .for __target in ${__page:T:S/$/${FILTEXTENSION}/g} _manpages: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} > ${.TARGET} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __target in ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} _manpages: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} | ${MROFF_CMD} > ${.TARGET} .endfor .endif .endfor .endif .else .if defined(MAN) && !empty(MAN) CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __page in ${MAN} .for __target in ${__page:T:S/$/${CATEXT}/g} _manpages: ${__target} ${__target}: ${__page} ${MROFF_CMD} ${.ALLSRC} > ${.TARGET} .endfor .endfor .else _manpages: ${MAN} .endif .endif .endif .else ZEXT= ${MCOMPRESS_EXT} .if defined(MAN) && !empty(MAN) CLEANFILES+= ${MAN:T:S/$/${MCOMPRESS_EXT}/g} CLEANFILES+= ${MAN:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} .for __page in ${MAN} .for __target in ${__page:T:S/$/${MCOMPRESS_EXT}/} _manpages: ${__target} ${__target}: ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MCOMPRESS_CMD} > ${.TARGET} .else ${MCOMPRESS_CMD} ${.ALLSRC} > ${.TARGET} .endif .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __target in ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/} _manpages: ${__target} ${__target}: ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MROFF_CMD} | ${MCOMPRESS_CMD} > ${.TARGET} .else ${MROFF_CMD} ${.ALLSRC} | ${MCOMPRESS_CMD} > ${.TARGET} .endif .endfor .endif .endfor .endif .endif maninstall: _maninstall _maninstall: .if defined(MAN) && !empty(MAN) _maninstall: ${MAN} .if defined(NO_MANCOMPRESS) .if defined(MANFILTER) .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${FILTEXTENSION}/g} \ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/${__page} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) ${MINSTALL} ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page} .endif .endfor .else @set ${.ALLSRC:C/\.([^.]*)$/.\1 \1/}; \ while : ; do \ case $$# in \ 0) break;; \ 1) echo "warn: missing extension: $$1"; break;; \ esac; \ page=$$1; shift; sect=$$1; shift; \ d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \ ${ECHO} ${MINSTALL} $${page} $${d}; \ ${MINSTALL} $${page} $${d}; \ done .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${CATEXT}/} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T} .endfor .endif .endif .else .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) ${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/} .endif .endfor .endif .endif .if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) @set ${MLINKS:C/\.([^.]*)$/.\1 \1/}; \ while : ; do \ case $$# in \ 0) break;; \ [123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \ esac; \ name=$$1; shift; sect=$$1; shift; \ l=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \ name=$$1; shift; sect=$$1; shift; \ t=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \ ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \ rm -f $${t} $${t}${MCOMPRESS_EXT}; \ - ln $${l}${ZEXT} $${t}${ZEXT}; \ + ${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}; \ done .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) @set ${MLINKS:C/\.([^.]*)$/.\1 \1/}; \ while : ; do \ case $$# in \ 0) break;; \ [123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \ esac; \ name=$$1; shift; sect=$$1; shift; \ l=${DESTDIR}${CATDIR}$${sect}${MANSUBDIR}/$$name; \ name=$$1; shift; sect=$$1; shift; \ t=${DESTDIR}${CATDIR}$${sect}${MANSUBDIR}/$$name; \ ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \ rm -f $${t} $${t}${MCOMPRESS_EXT}; \ - ln $${l}${ZEXT} $${t}${ZEXT}; \ + ${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}; \ done .endif .endif manlint: .if defined(MAN) && !empty(MAN) .for __page in ${MAN} manlint: ${__page}lint ${__page}lint: ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MROFF_CMD} -ww -z .else ${MROFF_CMD} -ww -z ${.ALLSRC} .endif .endfor .endif Index: head/share/mk/bsd.own.mk =================================================================== --- head/share/mk/bsd.own.mk (revision 245751) +++ head/share/mk/bsd.own.mk (revision 245752) @@ -1,626 +1,635 @@ # $FreeBSD$ # # The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. # # # +++ variables +++ # # DESTDIR Change the tree where the file gets installed. [not set] # # DISTDIR Change the tree where the file for a distribution # gets installed (see /usr/src/release/Makefile). [not set] # # COMPRESS_CMD Program to compress documents. # Output is to stdout. [gzip -cn] # # COMPRESS_EXT File name extension of ${COMPRESS_CMD} command. [.gz] # # BINOWN Binary owner. [root] # # BINGRP Binary group. [wheel] # # BINMODE Binary mode. [555] # # NOBINMODE Mode for non-executable files. [444] # # LIBDIR Base path for libraries. [/usr/lib] # # LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat] # # LIBDATADIR Base path for misc. utility data files. [/usr/libdata] # # LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] # # LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] # # SHLIBDIR Base path for shared libraries. [${LIBDIR}] # # LIBOWN Library owner. [${BINOWN}] # # LIBGRP Library group. [${BINGRP}] # # LIBMODE Library mode. [${NOBINMODE}] # # # KMODDIR Base path for loadable kernel modules # (see kld(4)). [/boot/kernel] # # KMODOWN Kernel and KLD owner. [${BINOWN}] # # KMODGRP Kernel and KLD group. [${BINGRP}] # # KMODMODE KLD mode. [${BINMODE}] # # # SHAREDIR Base path for architecture-independent ascii # text files. [/usr/share] # # SHAREOWN ASCII text file owner. [root] # # SHAREGRP ASCII text file group. [wheel] # # SHAREMODE ASCII text file mode. [${NOBINMODE}] # # # CONFDIR Base path for configuration files. [/etc] # # CONFOWN Configuration file owner. [root] # # CONFGRP Configuration file group. [wheel] # # CONFMODE Configuration file mode. [644] # # # DOCDIR Base path for system documentation (e.g. PSD, USD, # handbook, FAQ etc.). [${SHAREDIR}/doc] # # DOCOWN Documentation owner. [${SHAREOWN}] # # DOCGRP Documentation group. [${SHAREGRP}] # # DOCMODE Documentation mode. [${NOBINMODE}] # # # INFODIR Base path for GNU's hypertext system # called Info (see info(1)). [${SHAREDIR}/info] # # INFOOWN Info owner. [${SHAREOWN}] # # INFOGRP Info group. [${SHAREGRP}] # # INFOMODE Info mode. [${NOBINMODE}] # # # MANDIR Base path for manual installation. [${SHAREDIR}/man/man] # # MANOWN Manual owner. [${SHAREOWN}] # # MANGRP Manual group. [${SHAREGRP}] # # MANMODE Manual mode. [${NOBINMODE}] # # # NLSDIR Base path for National Language Support files # installation. [${SHAREDIR}/nls] # # NLSOWN National Language Support files owner. [${SHAREOWN}] # # NLSGRP National Language Support files group. [${SHAREGRP}] # # NLSMODE National Language Support files mode. [${NOBINMODE}] # # INCLUDEDIR Base path for standard C include files [/usr/include] .if !target(____) ____: .if !defined(_WITHOUT_SRCCONF) SRCCONF?= /etc/src.conf .if exists(${SRCCONF}) .include "${SRCCONF}" .endif .endif # Binaries BINOWN?= root BINGRP?= wheel BINMODE?= 555 NOBINMODE?= 444 .if defined(MODULES_WITH_WORLD) KMODDIR?= /boot/modules .else KMODDIR?= /boot/kernel .endif KMODOWN?= ${BINOWN} KMODGRP?= ${BINGRP} KMODMODE?= ${BINMODE} LIBDIR?= /usr/lib LIBCOMPATDIR?= /usr/lib/compat LIBDATADIR?= /usr/libdata LIBEXECDIR?= /usr/libexec LINTLIBDIR?= /usr/libdata/lint SHLIBDIR?= ${LIBDIR} LIBOWN?= ${BINOWN} LIBGRP?= ${BINGRP} LIBMODE?= ${NOBINMODE} # Share files SHAREDIR?= /usr/share SHAREOWN?= root SHAREGRP?= wheel SHAREMODE?= ${NOBINMODE} CONFDIR?= /etc CONFOWN?= root CONFGRP?= wheel CONFMODE?= 644 MANDIR?= ${SHAREDIR}/man/man MANOWN?= ${SHAREOWN} MANGRP?= ${SHAREGRP} MANMODE?= ${NOBINMODE} DOCDIR?= ${SHAREDIR}/doc DOCOWN?= ${SHAREOWN} DOCGRP?= ${SHAREGRP} DOCMODE?= ${NOBINMODE} INFODIR?= ${SHAREDIR}/info INFOOWN?= ${SHAREOWN} INFOGRP?= ${SHAREGRP} INFOMODE?= ${NOBINMODE} NLSDIR?= ${SHAREDIR}/nls NLSOWN?= ${SHAREOWN} NLSGRP?= ${SHAREGRP} NLSMODE?= ${NOBINMODE} INCLUDEDIR?= /usr/include +# +# install(1) parameters. +# +HRDLINK?= -l h +SYMLINK?= -l s + +INSTALL_LINK?= ${INSTALL} ${HRDLINK} +INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} + # Common variables .if !defined(DEBUG_FLAGS) STRIP?= -s .endif COMPRESS_CMD?= gzip -cn COMPRESS_EXT?= .gz .if !defined(_WITHOUT_SRCCONF) # # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. # These should be tested with `== "no"' or `!= "no"' in makefiles. # The NO_* variables should only be set by makefiles. # # # Supported NO_* options (if defined, MK_* will be forced to "no", # regardless of user's setting). # .for var in \ CTF \ INSTALLLIB \ MAN \ PROFILE .if defined(NO_${var}) .if defined(WITH_${var}) .undef WITH_${var} .endif WITHOUT_${var}= .endif .endfor # # Older-style variables that enabled behaviour when set. # .if defined(YES_HESIOD) WITH_HESIOD= .endif .if defined(MAKE_IDEA) WITH_IDEA= .endif __DEFAULT_YES_OPTIONS = \ ACCT \ ACPI \ AMD \ APM \ ASSERT_DEBUG \ AT \ ATF \ ATM \ AUDIT \ AUTHPF \ BIND \ BIND_DNSSEC \ BIND_ETC \ BIND_LIBS_LWRES \ BIND_MTREE \ BIND_NAMED \ BIND_UTILS \ BINUTILS \ BLUETOOTH \ BOOT \ BSD_CPIO \ BSNMP \ BZIP2 \ CALENDAR \ CAPSICUM \ CDDL \ CPP \ CRYPT \ CTM \ CVS \ CXX \ DICT \ DYNAMICROOT \ ED_CRYPTO \ EXAMPLES \ FLOPPY \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ GAMES \ GCC \ GCOV \ GDB \ GNU \ GPIB \ GPIO \ GROFF \ HTML \ INET \ INET6 \ INFO \ INSTALLLIB \ IPFILTER \ IPFW \ IPX \ JAIL \ KDUMP \ KERBEROS \ KERNEL_SYMBOLS \ KVM \ LEGACY_CONSOLE \ LIB32 \ LIBPTHREAD \ LIBTHR \ LOCALES \ LOCATE \ LPR \ LS_COLORS \ MAIL \ MAILWRAPPER \ MAKE \ MAN \ NDIS \ NETCAT \ NETGRAPH \ NIS \ NLS \ NLS_CATALOGS \ NS_CACHING \ NTP \ OPENSSH \ OPENSSL \ PAM \ PC_SYSINSTALL \ PF \ PKGBOOTSTRAP \ PKGTOOLS \ PMC \ PORTSNAP \ PPP \ PROFILE \ QUOTAS \ RCMDS \ RCS \ RESCUE \ ROUTED \ SENDMAIL \ SETUID_LOGIN \ SHAREDOCS \ SOURCELESS \ SOURCELESS_HOST \ SOURCELESS_UCODE \ SSP \ SYMVER \ SYSCONS \ SYSINSTALL \ TCSH \ TELNET \ TEXTPROC \ TOOLCHAIN \ USB \ UTMPX \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ ZONEINFO __DEFAULT_NO_OPTIONS = \ ARM_EABI \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ BMAKE \ BSDCONFIG \ BSD_GREP \ CLANG_EXTRAS \ CTF \ HESIOD \ ICONV \ IDEA \ INSTALL_AS_USER \ NMTREE \ NAND \ OFED \ OPENSSH_NONE_CIPHER \ SHARED_TOOLCHAIN # # Default behaviour of some options depends on the architecture. Unfortunately # this means that we have to test TARGET_ARCH (the buildworld case) as well # as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not # used at all in bsd.*.mk, but we have to make an exception here if we want # to allow defaults for some things like clang and fdt to vary by target # architecture. # .if defined(TARGET_ARCH) __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif # Clang is only for x86 and powerpc right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG .endif # Clang the default system compiler only on x86. .if ${__T} == "amd64" || ${__T} == "i386" __DEFAULT_YES_OPTIONS+=CLANG_IS_CC .else __DEFAULT_NO_OPTIONS+=CLANG_IS_CC .endif # FDT is needed only for arm, mips and powerpc .if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT .endif .undef __T # # MK_* options which default to "yes". # .for var in ${__DEFAULT_YES_OPTIONS} .if defined(WITH_${var}) && defined(WITHOUT_${var}) .error WITH_${var} and WITHOUT_${var} can't both be set. .endif .if defined(MK_${var}) .error MK_${var} can't be set by a user. .endif .if defined(WITHOUT_${var}) MK_${var}:= no .else MK_${var}:= yes .endif .endfor .undef __DEFAULT_YES_OPTIONS # # MK_* options which default to "no". # .for var in ${__DEFAULT_NO_OPTIONS} .if defined(WITH_${var}) && defined(WITHOUT_${var}) .error WITH_${var} and WITHOUT_${var} can't both be set. .endif .if defined(MK_${var}) .error MK_${var} can't be set by a user. .endif .if defined(WITH_${var}) MK_${var}:= yes .else MK_${var}:= no .endif .endfor .undef __DEFAULT_NO_OPTIONS # # Force some options off if their dependencies are off. # Order is somewhat important. # .if ${MK_LIBPTHREAD} == "no" MK_LIBTHR:= no .endif .if ${MK_LIBTHR} == "no" MK_BIND:= no .endif .if ${MK_BIND} == "no" MK_BIND_DNSSEC:= no MK_BIND_ETC:= no MK_BIND_LIBS:= no MK_BIND_LIBS_LWRES:= no MK_BIND_MTREE:= no MK_BIND_NAMED:= no MK_BIND_UTILS:= no .endif .if ${MK_BIND_MTREE} == "no" MK_BIND_ETC:= no .endif .if ${MK_SOURCELESS} == "no" MK_SOURCELESS_HOST:= no MK_SOURCELESS_UCODE:= no .endif .if ${MK_CDDL} == "no" MK_ZFS:= no MK_CTF:= no .endif .if ${MK_CLANG} == "no" MK_CLANG_EXTRAS:= no .endif .if ${MK_CRYPT} == "no" MK_OPENSSL:= no MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_CXX} == "no" MK_CLANG:= no MK_GROFF:= no .endif .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no .endif .if ${MK_NETGRAPH} == "no" MK_ATM:= no MK_BLUETOOTH:= no .endif .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_PF} == "no" MK_AUTHPF:= no .endif .if ${MK_TEXTPROC} == "no" MK_GROFF:= no .endif .if ${MK_TOOLCHAIN} == "no" MK_BINUTILS:= no MK_CLANG:= no MK_GCC:= no MK_GDB:= no .endif .if ${MK_CLANG} == "no" MK_CLANG_IS_CC:= no .endif # # Set defaults for the MK_*_SUPPORT variables. # # # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # .for var in \ BZIP2 \ GNU \ INET \ INET6 \ IPX \ KERBEROS \ KVM \ NETGRAPH \ PAM \ WIRELESS .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. .endif .if defined(MK_${var}_SUPPORT) .error MK_${var}_SUPPORT can't be set by a user. .endif .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" MK_${var}_SUPPORT:= no .else MK_${var}_SUPPORT:= yes .endif .endfor # # MK_* options whose default value depends on another option. # .for vv in \ GSSAPI/KERBEROS \ MAN_UTILS/MAN .if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) .error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set. .endif .if defined(MK_${vv:H}) .error MK_${vv:H} can't be set by a user. .endif .if defined(WITH_${vv:H}) MK_${vv:H}:= yes .elif defined(WITHOUT_${vv:H}) MK_${vv:H}:= no .else MK_${vv:H}:= ${MK_${vv:T}} .endif .endfor # # MK_* options that default to "yes" if the compiler is a C++11 compiler. # .include .for var in \ LIBCPLUSPLUS .if defined(WITH_${var}) && defined(WITHOUT_${var}) .error WITH_${var} and WITHOUT_${var} can't both be set. .endif .if defined(MK_${var}) .error MK_${var} can't be set by a user. .endif .if ${COMPILER_FEATURES:Mc++11} .if defined(WITHOUT_${var}) MK_${var}:= no .else MK_${var}:= yes .endif .else .if defined(WITH_${var}) MK_${var}:= yes .else MK_${var}:= no .endif .endif .endfor .if ${MK_CTF} != "no" CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 5201111300) CTFCONVERT_CMD= .else CTFCONVERT_CMD= @: .endif .if ${MK_INSTALL_AS_USER} != "no" _uid!= id -u .if ${_uid} != 0 .if !defined(USER) USER!= id -un .endif _gid!= id -gn .for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${_gid} .endfor .endif .endif .endif # !_WITHOUT_SRCCONF .endif # !target(____)