Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149840817
D11231.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D11231.diff
View Options
Index: head/share/mk/bsd.README
===================================================================
--- head/share/mk/bsd.README
+++ head/share/mk/bsd.README
@@ -225,6 +225,24 @@
MANOWN Manual owner.
+INSTALL_LINK Command to install a hard link.
+
+INSTALL_SYMLINK Command to install a symbolic link.
+
+INSTALL_RSYMLINK Command to install a relative symbolic link.
+
+LINKOWN Owner of hard links created by INSTALL_LINK.
+
+LINKGRP Group of hard links created by INSTALL_LINK.
+
+LINKMODE Mode of hard links created by INSTALL_LINK.
+
+SYMLINKOWN Owner of hard links created by INSTALL_[R]SYMLINK.
+
+SYMLINKGRP Group of hard links created by INSTALL_[R]SYMLINK.
+
+SYMLINKMODE Mode of hard links created by INSTALL_[R]SYMLINK.
+
This file is generally useful when building your own Makefiles so that
they use the same default owners etc. as the rest of the tree.
@@ -320,6 +338,13 @@
LINKS= /bin/test /bin/[
+LINKOWN Owner of links created with LINKS [${BINOWN}].
+
+LINKGRP Group of links created with LINKS [${BINGRP}].
+
+LINKMODE Mode of links created with LINKS [${BINMODE}].
+
+
MAN Manual pages. If no MAN variable is defined,
"MAN=${PROG}.1" is assumed. See bsd.man.mk for more details.
@@ -528,6 +553,21 @@
of LIB if LIB is also set. Both a shared and static library
will be built. NO_PIC can be set to only build a static
library.
+
+LINKS The list of binary links; should be full pathnames, the
+ linked-to file coming first, followed by the linked
+ file. The files are hard-linked. For example, to link
+ /bin/test and /bin/[, use:
+
+ LINKS= /bin/test /bin/[
+
+LINKOWN Owner of links created with LINKS [${LIBOWN}].
+
+LINKGRP Group of links created with LINKS [${LIBGRP}].
+
+LINKMODE Mode of links created with LINKS [${LIBMODE}].
+
+LINTLIBDIR Target directory for lint libraries.
MAN The manual pages to be installed. See bsd.man.mk for more
details.
Index: head/share/mk/bsd.lib.mk
===================================================================
--- head/share/mk/bsd.lib.mk
+++ head/share/mk/bsd.lib.mk
@@ -275,7 +275,7 @@
@${ECHO} building shared library ${SHLIB_NAME}
@rm -f ${SHLIB_NAME} ${SHLIB_LINK}
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no"
- @${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK}
+ @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK}
.endif
${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
@@ -291,7 +291,7 @@
${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \
${SHLIB_NAME_FULL} ${.TARGET}
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld)
- @${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK}
+ @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK}
.endif
${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL}
@@ -398,7 +398,7 @@
${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS}
- ${INSTALL_SYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK}
+ ${INSTALL_LIBSYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK}
.endfor
.else
.if ${_SHLIBDIR} == ${_LIBDIR}
@@ -437,6 +437,11 @@
.include <bsd.confs.mk>
.endif
+LINKOWN?= ${LIBOWN}
+LINKGRP?= ${LIBGRP}
+LINKMODE?= ${LIBMODE}
+SYMLINKOWN?= ${LIBOWN}
+SYMLINKGRP?= ${LIBGRP}
.include <bsd.links.mk>
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
Index: head/share/mk/bsd.man.mk
===================================================================
--- head/share/mk/bsd.man.mk
+++ head/share/mk/bsd.man.mk
@@ -227,7 +227,7 @@
.endif
.for l t in ${_MANLINKS}
rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \
- ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT}
+ ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT}
.endfor
manlint:
Index: head/share/mk/bsd.own.mk
===================================================================
--- head/share/mk/bsd.own.mk
+++ head/share/mk/bsd.own.mk
@@ -124,6 +124,18 @@
#
# PKG_CMD Program for creating and manipulating packages.
# [pkg]
+#
+# LINKOWN Hard link owner [${BINOWN}]
+#
+# LINKGRP Hard link group [${BINGRP}]
+#
+# LINKMODE Hard link mode [${NOBINMODE}]
+#
+# SYMLINKOWN Symbolic link owner [${BINOWN} or ${LIBOWN}]
+#
+# SYMLINKGRP Symbolic link group [${BINGRP} or ${LIBGRP}]
+#
+# SYMLINKMODE Symbolic link mode [755]
.if !target(__<bsd.own.mk>__)
__<bsd.own.mk>__:
@@ -217,12 +229,22 @@
#
# install(1) parameters.
#
-HRDLINK?= -l h
-SYMLINK?= -l s
-RSYMLINK?= -l rs
+_LINKOWN?= ${LINKOWN:U${BINOWN}}
+_LINKGRP?= ${LINKGRP:U${BINGRP}}
+_LINKMODE?= ${LINKMODE:U${NOBINMODE}}
+_SYMLINKOWN?= ${SYMLINKOWN:U${BINOWN}}
+_SYMLINKGRP?= ${SYMLINKGRP:U${BINGRP}}
+_SYMLINKMODE?= ${SYMLINKMODE:U755}
+HRDLINK?= -l h -o ${_LINKOWN} -g ${_LINKGRP} -m ${_LINKMODE}
+MANHRDLINK?= -l h -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
+SYMLINK?= -l s -o ${_SYMLINKOWN} -g ${_SYMLINKGRP} -m ${_SYMLINKMODE}
+LSYMLINK?= -l s -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE}
+RSYMLINK?= -l rs -o ${_SYMLINKOWN} -g ${_SYMLINKGRP} -m ${_SYMLINKMODE}
INSTALL_LINK?= ${INSTALL} ${HRDLINK}
+INSTALL_MANLINK?= ${INSTALL} ${MANHRDLINK}
INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK}
+INSTALL_LIBSYMLINK?= ${INSTALL} ${LSYMLINK}
INSTALL_RSYMLINK?= ${INSTALL} ${RSYMLINK}
# Common variables
Index: head/share/mk/bsd.prog.mk
===================================================================
--- head/share/mk/bsd.prog.mk
+++ head/share/mk/bsd.prog.mk
@@ -285,6 +285,10 @@
.include <bsd.confs.mk>
.include <bsd.files.mk>
.include <bsd.incs.mk>
+
+LINKOWN?= ${BINOWN}
+LINKGRP?= ${BINGRP}
+LINKMODE?= ${BINMODE}
.include <bsd.links.mk>
.if ${MK_MAN} != "no"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 28, 12:29 PM (15 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30472431
Default Alt Text
D11231.diff (5 KB)
Attached To
Mode
D11231: Correct link metadata created when installing with -DNO_ROOT.
Attached
Detach File
Event Timeline
Log In to Comment