Makes it more flexible to tag and define a target package

This commit is contained in:
Baptiste Daroussin 2015-02-13 00:16:05 +00:00
parent d8fee543ec
commit dc6d22c96d
8 changed files with 94 additions and 51 deletions

View File

@ -218,12 +218,12 @@ distribution:
@false
.endif
cd ${.CURDIR}; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${INSTALL} ${TAG_ARGS} -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 \
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
${BIN2} ${DESTDIR}/etc; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
${INSTALL} ${TAG_ARGS} -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
@ -264,74 +264,74 @@ distribution:
${_+_}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 \
cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 0444 \
${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR}
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \
cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 0600 \
${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 0500 \
${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
.if ${MK_UNBOUND} != "no"
if [ ! -e ${DESTDIR}/etc/unbound ]; then \
${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \
${INSTALL_SYMLINK} ${TAG_ARGS} ../var/unbound ${DESTDIR}/etc/unbound; \
fi
.endif
.if ${MK_SENDMAIL} != "no"
${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution
.endif
.if ${MK_OPENSSH} != "no"
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 644 \
${SSH} ${DESTDIR}/etc/ssh
.endif
.if ${MK_OPENSSL} != "no"
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -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 \
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 644 \
dot.k5login ${DESTDIR}/root/.k5login;
.endif
cd ${.CURDIR}/root; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${INSTALL} ${TAG_ARGS} -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 \
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 644 \
dot.cshrc ${DESTDIR}/root/.cshrc; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${INSTALL} ${TAG_ARGS} -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 \
cd ${.CURDIR}/mtree; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \
${MTREE} ${DESTDIR}/etc/mtree
.if ${MK_PPP} != "no"
cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
cd ${.CURDIR}/ppp; ${INSTALL} ${TAG_ARGS} -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 \
cd ${.CURDIR}/mail; ${INSTALL} ${TAG_ARGS} -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 \
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g operator -m 664 /dev/null \
${DESTDIR}/etc/dumpdates
.if ${MK_LOCATE} != "no"
${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \
${INSTALL} ${TAG_ARGS} -o nobody -g ${BINGRP} -m 644 /dev/null \
${DESTDIR}/var/db/locate.database
.endif
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \
${DESTDIR}/var/crash
cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
cd ${.CURDIR}/..; ${INSTALL} ${TAG_ARGS} -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 \
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \
${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \
${DESTDIR}/boot/device.hints
.endif
@ -426,7 +426,7 @@ distrib-dirs: ${MTREES:N/*}
.endif
etc-examples:
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \
${BIN1} ${BIN2} nsmb.conf opieaccess \
${DESTDIR}/usr/share/examples/etc
${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \

View File

@ -81,6 +81,13 @@ TRFLAGS+= -I${SRCDIR}
TRFLAGS+= -t
.endif
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE:Uruntime}
.endif
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
DCOMPRESS_EXT?= ${COMPRESS_EXT}
DCOMPRESS_CMD?= ${COMPRESS_CMD}
.for _dev in ${PRINTERDEVICE:Mhtml}
@ -135,11 +142,11 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
realinstall:
.for _dev in ${PRINTERDEVICE:Mhtml}
cd ${SRCDIR}; \
${INSTALL} -T docs -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
.endfor
.for _dev in ${PRINTERDEVICE:Nhtml}
${INSTALL} -T docs -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}
.endfor

View File

@ -13,6 +13,13 @@ FILESGROUPS?= FILES
buildfiles: ${${group}}
.endfor
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE:Uruntime}
.endif
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
all: buildfiles
.for group in ${FILESGROUPS}
@ -40,7 +47,7 @@ ${group}NAME_${file:T}?= ${file:T}
.endif
installfiles-${group}: _${group}INS_${file:T}
_${group}INS_${file:T}: ${file}
${INSTALL} -T runtime -o ${${group}OWN_${.ALLSRC:T}} \
${INSTALL} ${TAG_ARGS} -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}}
@ -52,11 +59,11 @@ _${group}FILES+= ${file}
installfiles-${group}: _${group}INS
_${group}INS: ${_${group}FILES}
.if defined(${group}NAME)
${INSTALL} -T runtime -o ${${group}OWN} -g ${${group}GRP} \
${INSTALL} ${TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \
-m ${${group}MODE} ${.ALLSRC} \
${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -T runtime -o ${${group}OWN} -g ${${group}GRP} \
${INSTALL} ${TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \
-m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
.endif
.endif

View File

@ -8,6 +8,13 @@
INCSGROUPS?= INCS
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE:Uruntime}
.endif
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
.if !target(buildincludes)
.for group in ${INCSGROUPS}
buildincludes: ${${group}}
@ -41,7 +48,7 @@ ${group}NAME_${header:T}?= ${header:T}
.endif
installincludes: _${group}INS_${header:T}
_${group}INS_${header:T}: ${header}
${INSTALL} -T development -C -o ${${group}OWN_${.ALLSRC:T}} \
${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}}
@ -53,10 +60,10 @@ _${group}INCS+= ${header}
installincludes: _${group}INS
_${group}INS: ${_${group}INCS}
.if defined(${group}NAME)
${INSTALL} -T development -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -T development -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
${.ALLSRC} ${DESTDIR}${${group}DIR}
.endif
.endif
@ -73,7 +80,7 @@ installincludes:
t=${DESTDIR}$$1; \
shift; \
${ECHO} $$t -\> $$l; \
${INSTALL_SYMLINK} $$l $$t; \
${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} $$l $$t; \
done; true
.endif
.endif # !target(installincludes)

View File

@ -43,6 +43,13 @@ CTFFLAGS+= -g
STRIP?= -s
.endif
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE}
.endif
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
empty(DEBUG_FLAGS:M-gdwarf*)
SHARED_CFLAGS+= -g
@ -223,7 +230,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS}
@${ECHO} building shared library ${SHLIB_NAME}
@rm -f ${SHLIB_NAME} ${SHLIB_LINK}
.if defined(SHLIB_LINK)
@${INSTALL_SYMLINK} -T development ${SHLIB_NAME} ${SHLIB_LINK}
@${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK}
.endif
.if !defined(NM)
@${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
@ -313,22 +320,22 @@ realinstall: _libinstall
.ORDER: beforeinstall _libinstall
_libinstall:
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" && !defined(PRIVATELIB)
${INSTALL} -T development -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${_LIBDIR}
.endif
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) && !defined(PRIVATELIB)
${INSTALL} -T profile -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},profile} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${_LIBDIR}
.endif
.if defined(SHLIB_NAME)
${INSTALL} -T runtime ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}
${INSTALL} -d ${DESTDIR}${DEBUGFILEDIR}
.endif
${INSTALL} -T debug -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
${_INSTALLFLAGS} \
${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}
.endif
@ -354,16 +361,16 @@ _libinstall:
sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${_SHLIBDIR}/${SHLIB_NAME},g' \
-e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${_LIBDIR},g' \
${.CURDIR}/${SHLIB_LDSCRIPT} > ${DESTDIR}${_LIBDIR}/${SHLIB_LINK:R}.ld
${INSTALL} -T development -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK:R}.ld \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
rm -f ${DESTDIR}${_LIBDIR}/${SHLIB_LINK:R}.ld
.else
.if ${_SHLIBDIR} == ${_LIBDIR}
${INSTALL_SYMLINK} -T development ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.else
${INSTALL_SYMLINK} -T development ${_SHLIBDIRPREFIX}${_SHLIBDIR}/${SHLIB_NAME} \
${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${_SHLIBDIRPREFIX}${_SHLIBDIR}/${SHLIB_NAME} \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
-chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}
@ -374,11 +381,11 @@ _libinstall:
.endif # SHLIB_LINK
.endif # SHIB_NAME
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" && !defined(PRIVATELIB)
${INSTALL} -T development -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -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} -T development -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},development} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}
.endif
.endif # !defined(INTERNALLIB)

View File

@ -4,6 +4,13 @@
.error bsd.links.mk cannot be included directly.
.endif
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE}
.endif
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
afterinstall: _installlinks
.ORDER: realinstall _installlinks
_installlinks:
@ -15,7 +22,7 @@ _installlinks:
t=${DESTDIR}$$1; \
shift; \
${ECHO} $$t -\> $$l; \
${INSTALL_LINK} -T runtime $$l $$t; \
${INSTALL_LINK} ${TAG_ARGS} $$l $$t; \
done; true
.endif
.if defined(SYMLINKS) && !empty(SYMLINKS)
@ -26,6 +33,6 @@ _installlinks:
t=${DESTDIR}$$1; \
shift; \
${ECHO} $$t -\> $$l; \
${INSTALL_SYMLINK} -T runtime $$l $$t; \
${INSTALL_SYMLINK} ${TAG_ARGS} $$l $$t; \
done; true
.endif

View File

@ -50,7 +50,7 @@
.error bsd.man.mk cannot be included directly.
.endif
MINSTALL?= ${INSTALL} -T runtime -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
CATDIR= ${MANDIR:H:S/$/\/cat/}
CATEXT= .cat
@ -62,6 +62,7 @@ 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}
@ -213,7 +214,7 @@ _maninstall: ${MAN}
t=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}; \
${INSTALL_LINK} ${TAG_ARGS} $${l}${ZEXT} $${t}${ZEXT}; \
done
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
@set ${MLINKS:C/\.([^.]*)$/.\1 \1/}; \
@ -228,7 +229,7 @@ _maninstall: ${MAN}
t=${DESTDIR}${CATDIR}$${sect}${MANSUBDIR}/$$name; \
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}; \
${INSTALL_LINK} ${TAG_ARGS} $${l}${ZEXT} $${t}${ZEXT}; \
done
.endif
.endif

View File

@ -47,6 +47,13 @@ CTFFLAGS+= -g
STRIP?= -s
.endif
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE:Uruntime}
.endif
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
.if defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO")
LDFLAGS+= -static
.endif
@ -201,13 +208,13 @@ realinstall: _proginstall
.ORDER: beforeinstall _proginstall
_proginstall:
.if defined(PROG)
${INSTALL} -T runtime ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${INSTALL} ${TAG_ARGS} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}
${INSTALL} -d ${DESTDIR}${DEBUGFILEDIR}
.endif
${INSTALL} -T debug -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \
${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug
.endif
.endif
@ -234,7 +241,7 @@ SCRIPTSGRP_${script:T}?= ${SCRIPTSGRP}
SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE}
_scriptsinstall: _SCRIPTSINS_${script:T}
_SCRIPTSINS_${script:T}: ${script}
${INSTALL} -T runtime -o ${SCRIPTSOWN_${.ALLSRC:T}} \
${INSTALL} ${TAG_ARGS} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
-g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \
${.ALLSRC} \
${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}/${SCRIPTSNAME_${.ALLSRC:T}}