diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/check/check-files.mk | 52 | ||||
-rw-r--r-- | mk/flavor/pkg/depends.mk | 15 | ||||
-rw-r--r-- | mk/flavor/pkg/metadata.mk | 52 | ||||
-rw-r--r-- | mk/pkginstall/bsd.pkginstall.mk | 73 |
4 files changed, 70 insertions, 122 deletions
diff --git a/mk/check/check-files.mk b/mk/check/check-files.mk index 74a21898d62..721b6b0269e 100644 --- a/mk/check/check-files.mk +++ b/mk/check/check-files.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-files.mk,v 1.4 2006/06/09 16:12:08 jlam Exp $ +# $NetBSD: check-files.mk,v 1.5 2006/06/09 16:41:09 jlam Exp $ .if defined(PKG_DEVELOPER) CHECK_FILES?= yes @@ -140,25 +140,22 @@ ${_CHECK_FILES_PRE.prefix} ${_CHECK_FILES_POST.prefix}: ${_PKG_SILENT}${_PKG_DEBUG} \ ${FIND} ${PREFIX}/. \( -type f -o -type l \) -print 2>/dev/null \ | ${SED} -e 's,/\./,/,' \ - | ${_CHECK_FILES_SKIP_FILTER} > ${.TARGET}.tmp \ + | ${_CHECK_FILES_SKIP_FILTER} > ${.TARGET} \ || ${TRUE} - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_CHECK_FILES_PRE.sysconfdir} ${_CHECK_FILES_POST.sysconfdir}: ${_PKG_SILENT}${_PKG_DEBUG} \ ${FIND} ${PKG_SYSCONFDIR}/. -print 2>/dev/null \ | ${SED} -e 's,/\./,/,' \ - | ${_CHECK_FILES_SKIP_FILTER} > ${.TARGET}.tmp \ + | ${_CHECK_FILES_SKIP_FILTER} > ${.TARGET} \ || ${TRUE} - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_CHECK_FILES_PRE.varbase} ${_CHECK_FILES_POST.varbase}: ${_PKG_SILENT}${_PKG_DEBUG} \ ${FIND} ${VARBASE}/. -print 2>/dev/null \ | ${SED} -e 's,/\./,/,' \ - | ${_CHECK_FILES_SKIP_FILTER} > ${.TARGET}.tmp \ + | ${_CHECK_FILES_SKIP_FILTER} > ${.TARGET} \ || ${TRUE} - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ########################################################################### # check-files targets and subtargets @@ -201,26 +198,22 @@ ${_CHECK_FILES_DIFF}: ${_CHECK_FILES_PRE.prefix} ${_CHECK_FILES_POST.prefix} ${_PKG_SILENT}${_PKG_DEBUG} \ ${DIFF} -u ${_CHECK_FILES_PRE.prefix} \ ${_CHECK_FILES_POST.prefix} \ - > ${.TARGET}.tmp || ${TRUE} - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} || ${TRUE} ${_CHECK_FILES_ADDED}: ${_CHECK_FILES_DIFF} ${_PKG_SILENT}${_PKG_DEBUG} \ ${GREP} '^+/' ${_CHECK_FILES_DIFF} | ${SED} "s|^+||" | ${SORT} \ - > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} ${_CHECK_FILES_DELETED}: ${_CHECK_FILES_DIFF} ${_PKG_SILENT}${_PKG_DEBUG} \ ${GREP} '^-/' ${_CHECK_FILES_DIFF} | ${SED} "s|^-||" | ${SORT} \ - > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} ${_CHECK_FILES_EXPECTED}: plist ${_PKG_SILENT}${_PKG_DEBUG} \ ${GREP} '^[^@]' ${PLIST} | ${SED} "s|^|${PREFIX}/|" | ${SORT} \ - > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} ${_CHECK_FILES_MISSING}: ${_CHECK_FILES_EXPECTED} ${_CHECK_FILES_ADDED} ${_PKG_SILENT}${_PKG_DEBUG} \ @@ -228,14 +221,12 @@ ${_CHECK_FILES_MISSING}: ${_CHECK_FILES_EXPECTED} ${_CHECK_FILES_ADDED} ${GREP} '^-[^-]' | ${SED} "s|^-||" | \ while read file; do \ ${TEST} -f "$$file" || ${ECHO} "$$file"; \ - done > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + done > ${.TARGET} ${_CHECK_FILES_MISSING_REAL}: ${_CHECK_FILES_MISSING} ${_PKG_SILENT}${_PKG_DEBUG} \ ${CAT} ${_CHECK_FILES_MISSING} | ${_CHECK_FILES_SKIP_FILTER} \ - > ${.TARGET}.tmp || ${TRUE} - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} || ${TRUE} ${_CHECK_FILES_MISSING_SKIP}: \ ${_CHECK_FILES_MISSING} \ @@ -244,8 +235,7 @@ ${_CHECK_FILES_MISSING_SKIP}: \ ${DIFF} -u ${_CHECK_FILES_MISSING} \ ${_CHECK_FILES_MISSING_REAL} | \ ${GREP} '^-[^-]' | ${SED} "s|^-||" \ - > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} ${_CHECK_FILES_EXTRA}: ${_CHECK_FILES_EXPECTED} ${_CHECK_FILES_ADDED} ${_PKG_SILENT}${_PKG_DEBUG} \ @@ -253,8 +243,7 @@ ${_CHECK_FILES_EXTRA}: ${_CHECK_FILES_EXPECTED} ${_CHECK_FILES_ADDED} ${GREP} '^+[^+]' | ${SED} "s|^+||" | \ while read file; do \ ${TEST} ! -f "$$file" || ${ECHO} "$$file"; \ - done > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + done > ${.TARGET} .if defined(NO_PKG_REGISTER) ${_CHECK_FILES_ERRMSG.prefix}: @@ -266,35 +255,34 @@ ${_CHECK_FILES_ERRMSG.prefix}: \ ${_CHECK_FILES_MISSING_REAL} \ ${_CHECK_FILES_MISSING_SKIP} \ ${_CHECK_FILES_EXTRA} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp + ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG} \ if ${_NONZERO_FILESIZE_P} ${_CHECK_FILES_DELETED}; then \ ${ECHO} "The following files have been deleted" \ "from ${PREFIX}!"; \ ${SED} "s|^| |" ${_CHECK_FILES_DELETED}; \ - fi >> ${.TARGET}.tmp + fi >> ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG} \ if ${_NONZERO_FILESIZE_P} ${_CHECK_FILES_MISSING_REAL}; then \ ${ECHO} "************************************************************"; \ ${ECHO} "The following files are in the" \ "PLIST but not in ${PREFIX}:"; \ ${SED} "s|^| |" ${_CHECK_FILES_MISSING_REAL}; \ - fi >> ${.TARGET}.tmp + fi >> ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG} \ if ${_NONZERO_FILESIZE_P} ${_CHECK_FILES_EXTRA}; then \ ${ECHO} "************************************************************"; \ ${ECHO} "The following files are in" \ "${PREFIX} but not in the PLIST:"; \ ${SED} "s|^| |" ${_CHECK_FILES_EXTRA}; \ - fi >> ${.TARGET}.tmp + fi >> ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG} \ if ${_NONZERO_FILESIZE_P} ${_CHECK_FILES_MISSING_SKIP}; then \ ${ECHO} "************************************************************"; \ ${ECHO} "The following files are in both the" \ "PLIST and CHECK_FILES_SKIP:"; \ ${SED} "s|^| |" ${_CHECK_FILES_MISSING_SKIP}; \ - fi >> ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + fi >> ${.TARGET} .endif # Check ${SYSCONFDIR} for files which are not in the PLIST and are also @@ -319,8 +307,7 @@ ${_CHECK_FILES_ERRMSG.sysconfdir}: \ ${DIFF} -u ${_CHECK_FILES_PRE.sysconfdir} \ ${_CHECK_FILES_POST.sysconfdir} | \ ${GREP} '^+[^+]' | ${SED} "s|^+| |"; \ - fi > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + fi > ${.TARGET} .endif # Check ${VARBASE} for files which are not in the PLIST and are also @@ -345,8 +332,7 @@ ${_CHECK_FILES_ERRMSG.varbase}: \ ${DIFF} -u ${_CHECK_FILES_PRE.varbase} \ ${_CHECK_FILES_POST.varbase} | \ ${GREP} '^+[^+]' | ${SED} "s|^+| |"; \ - fi > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + fi > ${.TARGET} .endif ########################################################################### diff --git a/mk/flavor/pkg/depends.mk b/mk/flavor/pkg/depends.mk index fa4062bb522..4c6884e90fe 100644 --- a/mk/flavor/pkg/depends.mk +++ b/mk/flavor/pkg/depends.mk @@ -1,4 +1,4 @@ -# $NetBSD: depends.mk,v 1.5 2006/06/08 08:01:53 rillig Exp $ +# $NetBSD: depends.mk,v 1.6 2006/06/09 16:41:09 jlam Exp $ _DEPENDS_FILE= ${WRKDIR}/.depends _REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \ @@ -40,8 +40,6 @@ depends-cookie: ${_DEPENDS_FILE} ${_DEPENDS_FILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG} \ ${_REDUCE_DEPENDS_CMD} ${BUILD_DEPENDS:Q} | \ while read dep; do \ @@ -49,9 +47,8 @@ ${_DEPENDS_FILE}: dir=`${ECHO} $$dep | ${SED} -e "s,.*:,,"`; \ ${TEST} -n "$$pattern" || exit 1; \ ${TEST} -n "$$dir" || exit 1; \ - ${ECHO} "build $$pattern $$dir" \ - >> ${.TARGET}.tmp; \ - done + ${ECHO} "build $$pattern $$dir"; \ + done >> ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG} \ ${_REDUCE_DEPENDS_CMD} ${DEPENDS:Q} | \ while read dep; do \ @@ -59,10 +56,8 @@ ${_DEPENDS_FILE}: dir=`${ECHO} $$dep | ${SED} -e "s,.*:,,"`; \ ${TEST} -n "$$pattern" || exit 1; \ ${TEST} -n "$$dir" || exit 1; \ - ${ECHO} "full $$pattern $$dir" \ - >> ${.TARGET}.tmp; \ - done - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + ${ECHO} "full $$pattern $$dir"; \ + done >> ${.TARGET} ###################################################################### ### depends-install (PRIVATE, pkgsrc/mk/depends/depends.mk) diff --git a/mk/flavor/pkg/metadata.mk b/mk/flavor/pkg/metadata.mk index 91df7ac9552..78b45768371 100644 --- a/mk/flavor/pkg/metadata.mk +++ b/mk/flavor/pkg/metadata.mk @@ -1,4 +1,4 @@ -# $NetBSD: metadata.mk,v 1.5 2006/06/08 08:01:53 rillig Exp $ +# $NetBSD: metadata.mk,v 1.6 2006/06/09 16:41:09 jlam Exp $ ###################################################################### ### The targets below are all PRIVATE. @@ -93,9 +93,8 @@ ${_BUILD_INFO_FILE}: plist ${ECHO} "REQUIRES=$$req" >> ${.TARGET}.tmp; \ done .endif - ${_PKG_SILENT}${_PKG_DEBUG}${SORT} ${.TARGET}.tmp > ${.TARGET}.tmp2 - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp2 ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG} \ + ${SORT} ${.TARGET}.tmp > ${.TARGET} && ${RM} -f ${.TARGET}.tmp ###################################################################### ### @@ -110,11 +109,13 @@ _METADATA_TARGETS+= ${_BUILD_VERSION_FILE} ${_BUILD_VERSION_FILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}exec 1>>${.TARGET}.tmp; \ + ${_PKG_SILENT}${_PKG_DEBUG} \ + exec 1>>${.TARGET}.tmp; \ for f in ${.CURDIR}/Makefile ${FILESDIR}/* ${PKGDIR}/*; do \ ${TEST} ! -f "$$f" || ${ECHO} "$$f"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}exec 1>>${.TARGET}.tmp; \ + ${_PKG_SILENT}${_PKG_DEBUG} \ + exec 1>>${.TARGET}.tmp; \ ${TEST} -f ${DISTINFO_FILE:Q} || exit 0; \ ${CAT} ${DISTINFO_FILE} | \ ${AWK} 'NF == 4 && $$3 == "=" { gsub("[()]", "", $$2); print $$2 }' | \ @@ -122,7 +123,8 @@ ${_BUILD_VERSION_FILE}: ${TEST} ! -f "${PATCHDIR}/$$file" || \ ${ECHO} "${PATCHDIR}/$$file"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}exec 1>>${.TARGET}.tmp; \ + ${_PKG_SILENT}${_PKG_DEBUG} \ + exec 1>>${.TARGET}.tmp; \ ${TEST} -d ${PATCHDIR} || exit 0; \ cd ${PATCHDIR}; for f in *; do \ case "$$f" in \ @@ -139,9 +141,8 @@ ${_BUILD_VERSION_FILE}: ${AWK} '{ sub("^${PKGSRCDIR}/", ""); \ sub(":.*[$$]NetBSD", ": $$NetBSD"); \ sub("[$$][^$$]*$$", "$$"); \ - print; }' | ${SORT} -u > ${.TARGET}.tmp1 && \ - ${RM} -f ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp1 ${.TARGET} + print; }' | \ + ${SORT} -u > ${.TARGET} && ${RM} -f ${.TARGET}.tmp ###################################################################### ### @@ -154,8 +155,7 @@ _METADATA_TARGETS+= ${_COMMENT_FILE} ${_COMMENT_FILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${COMMENT:Q} > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${COMMENT:Q} > ${.TARGET} ###################################################################### ### @@ -168,14 +168,13 @@ _METADATA_TARGETS+= ${_DESCR_FILE} ${_DESCR_FILE}: ${DESCR_SRC} ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} > ${.TARGET}.tmp + ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} > ${.TARGET} .if defined(HOMEPAGE) - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} >> ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "Homepage:" >> ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ""${HOMEPAGE:Q} >> ${.TARGET}.tmp + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} >> ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "Homepage:" >> ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ""${HOMEPAGE:Q} >> ${.TARGET} .endif - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ###################################################################### ### @@ -222,11 +221,8 @@ _MESSAGE_SUBST_SED= ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/} ${_MESSAGE_FILE}: ${MESSAGE_SRC} ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} | \ - ${SED} ${_MESSAGE_SUBST_SED} > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} - + ${SED} ${_MESSAGE_SUBST_SED} > ${.TARGET} # Display MESSAGE file and optionally mail the contents to # PKGSRC_MESSAGE_RECIPIENTS. @@ -263,8 +259,7 @@ _METADATA_TARGETS+= ${_PRESERVE_FILE} ${_PRESERVE_FILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${DATE} > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}${DATE} > ${.TARGET} .endif ###################################################################### @@ -284,8 +279,7 @@ ${_SIZE_ALL_FILE}: ${_DEPENDS_COOKIE} ${XARGS} -n 1 ${_PKG_BEST_EXISTS} | ${SORT} -u | \ ${XARGS} -n 256 ${PKG_INFO} -qs | \ ${AWK} 'BEGIN { s = 0 } /^[0-9]+$$/ { s += $$1 } END { print s }' \ - > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} ###################################################################### ### @@ -308,8 +302,7 @@ ${_SIZE_PKG_FILE}: plist ${SED} -e "s/'/'\\\\''/g" -e "s/.*/'&'/" | \ ${XARGS} -n 256 ${LS} -ld 2>/dev/null | \ ${AWK} 'BEGIN { s = 0 } { s += $$5 } END { print s }' \ - > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + > ${.TARGET} ###################################################################### ### @@ -372,8 +365,7 @@ _CONTENTS_TARGETS+= ${NO_MTREE:D:U${MTREE_FILE}} ${_CONTENTS_FILE}: ${_CONTENTS_TARGETS} ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ - ${PKG_CREATE} ${_PKG_ARGS_INSTALL} -O ${PKGFILE:T} > ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} + ${PKG_CREATE} ${_PKG_ARGS_INSTALL} -O ${PKGFILE:T} > ${.TARGET} ###################################################################### ### generate-metadata (PRIVATE) diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk index 9e38f8c638e..766b045e6f6 100644 --- a/mk/pkginstall/bsd.pkginstall.mk +++ b/mk/pkginstall/bsd.pkginstall.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkginstall.mk,v 1.9 2006/06/08 08:01:53 rillig Exp $ +# $NetBSD: bsd.pkginstall.mk,v 1.10 2006/06/09 16:41:09 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and implements the # common INSTALL/DEINSTALL scripts framework. To use the pkginstall @@ -208,23 +208,20 @@ _PKG_USERS+= ${_entry_}:${PKG_UID.${_entry_:C/\:.*//}}:${PKG_GECOS.${_entry_:C/\ ${_INSTALL_USERGROUP_DATAFILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG} \ set -- dummy ${_PKG_GROUPS:C/\:*$//}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ i="$$1"; shift; \ ${ECHO} "# GROUP: $$i"; \ done ${_PKG_SILENT}${_PKG_DEBUG} \ set -- dummy ${_PKG_USERS:C/\:*$//}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ i="$$1"; shift; \ ${ECHO} "# USER: $$i"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_INSTALL_USERGROUP_FILE}: ${_INSTALL_USERGROUP_DATAFILE} ${_INSTALL_USERGROUP_FILE}: \ @@ -247,7 +244,7 @@ ${_INSTALL_USERGROUP_UNPACKER}: \ ${_INSTALL_USERGROUP_DATAFILE} ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ - exec 1>${.TARGET}.tmp; \ + exec 1>${.TARGET}; \ ${ECHO} "#!${SH}"; \ ${ECHO} ""; \ ${ECHO} "CAT="${CAT:Q}; \ @@ -259,7 +256,6 @@ ${_INSTALL_USERGROUP_UNPACKER}: \ ${ECHO} ""; \ ${CAT} ${_INSTALL_USERGROUP_FILE} \ ${_INSTALL_USERGROUP_DATAFILE} - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} .if defined(USERGROUP_PHASE) @@ -326,18 +322,15 @@ _INSTALL_DATA_TMPL+= ${_INSTALL_PERMS_DATAFILE} ${_INSTALL_PERMS_DATAFILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${SPECIAL_PERMS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ file="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \ shift; shift; shift; shift; \ file=`strip_prefix "$$file"`; \ ${ECHO} "# PERMS: $$file $$mode $$owner $$group"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_INSTALL_PERMS_FILE}: ${_INSTALL_PERMS_DATAFILE} ${_INSTALL_PERMS_FILE}: ../../mk/pkginstall/perms @@ -397,11 +390,9 @@ _INSTALL_DATA_TMPL+= ${_INSTALL_FILES_DATAFILE} ${_INSTALL_FILES_DATAFILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${RCD_SCRIPTS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ script="$$1"; shift; \ file="${RCD_SCRIPTS_DIR:S/^${PREFIX}\///}/$$script"; \ @@ -410,7 +401,7 @@ ${_INSTALL_FILES_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${CONF_FILES}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ egfile="$$1"; file="$$2"; \ shift; shift; \ @@ -420,7 +411,7 @@ ${_INSTALL_FILES_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${REQD_FILES}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ egfile="$$1"; file="$$2"; \ shift; shift; \ @@ -430,7 +421,7 @@ ${_INSTALL_FILES_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${CONF_FILES_PERMS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ egfile="$$1"; file="$$2"; \ owner="$$3"; group="$$4"; mode="$$5"; \ @@ -441,7 +432,7 @@ ${_INSTALL_FILES_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${REQD_FILES_PERMS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ egfile="$$1"; file="$$2"; \ owner="$$3"; group="$$4"; mode="$$5"; \ @@ -450,7 +441,6 @@ ${_INSTALL_FILES_DATAFILE}: file=`strip_prefix "$$file"`; \ ${ECHO} "# FILE: $$file cf $$egfile $$mode $$owner $$group"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_INSTALL_FILES_FILE}: ${_INSTALL_FILES_DATAFILE} ${_INSTALL_FILES_FILE}: ../../mk/pkginstall/files @@ -497,10 +487,8 @@ _INSTALL_DATA_TMPL+= ${_INSTALL_DIRS_DATAFILE} ${_INSTALL_DIRS_DATAFILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ case ${PKG_SYSCONFSUBDIR:M*:Q}${CONF_FILES:M*:Q}${CONF_FILES_PERMS:M*:Q}"" in \ "") ;; \ *) case ${PKG_SYSCONFSUBDIR:M*:Q}"" in \ @@ -518,14 +506,14 @@ ${_INSTALL_DIRS_DATAFILE}: ;; \ esac ${_PKG_SILENT}${_PKG_DEBUG} \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ case ${RCD_SCRIPTS:M*:Q}"" in \ "") ;; \ *) ${ECHO} "# DIR: ${RCD_SCRIPTS_DIR:S/${PREFIX}\///} m" ;; \ esac ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${MAKE_DIRS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; shift; \ dir=`strip_prefix "$$dir"`; \ @@ -533,7 +521,7 @@ ${_INSTALL_DIRS_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${REQD_DIRS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; shift; \ dir=`strip_prefix "$$dir"`; \ @@ -541,7 +529,7 @@ ${_INSTALL_DIRS_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${OWN_DIRS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; shift; \ dir=`strip_prefix "$$dir"`; \ @@ -549,7 +537,7 @@ ${_INSTALL_DIRS_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${MAKE_DIRS_PERMS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \ shift; shift; shift; shift; \ @@ -558,7 +546,7 @@ ${_INSTALL_DIRS_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${REQD_DIRS_PERMS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \ shift; shift; shift; shift; \ @@ -567,14 +555,13 @@ ${_INSTALL_DIRS_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${OWN_DIRS_PERMS}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \ shift; shift; shift; shift; \ dir=`strip_prefix "$$dir"`; \ ${ECHO} "# DIR: $$dir mo $$mode $$owner $$group"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_INSTALL_DIRS_FILE}: ${_INSTALL_DIRS_DATAFILE} ${_INSTALL_DIRS_FILE}: ../../mk/pkginstall/dirs @@ -657,17 +644,14 @@ _INSTALL_DATA_TMPL+= ${_INSTALL_SHELL_DATAFILE} ${_INSTALL_SHELL_DATAFILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${PKG_SHELL}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ shell="$$1"; shift; \ shell=`strip_prefix "$$shell"`; \ ${ECHO} "# SHELL: $$shell"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_INSTALL_SHELL_FILE}: ${_INSTALL_SHELL_DATAFILE} ${_INSTALL_SHELL_FILE}: ../../mk/pkginstall/shell @@ -718,11 +702,9 @@ FILES_SUBST+= MKFONTDIR=${TOOLS_PATH.mkfontdir:Q} ${_INSTALL_FONTS_DATAFILE}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${FONTS_DIRS.ttf}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; shift; \ dir=`strip_prefix "$$dir"`; \ @@ -730,7 +712,7 @@ ${_INSTALL_FONTS_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${FONTS_DIRS.type1}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; shift; \ dir=`strip_prefix "$$dir"`; \ @@ -738,13 +720,12 @@ ${_INSTALL_FONTS_DATAFILE}: done ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \ set -- dummy ${FONTS_DIRS.x11}; shift; \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ while ${TEST} $$# -gt 0; do \ dir="$$1"; shift; \ dir=`strip_prefix "$$dir"`; \ ${ECHO} "# FONTS: $$dir x11"; \ done - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_INSTALL_FONTS_FILE}: ${_INSTALL_FONTS_DATAFILE} ${_INSTALL_FONTS_FILE}: ../../mk/pkginstall/fonts @@ -901,30 +882,24 @@ ${_INSTALL_FILE_DFLT}: ${_INSTALL_TEMPLATES_DFLT} ${_DEINSTALL_FILE}: ${DEINSTALL_SRC} ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG} \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ case ${.ALLSRC:Q}"" in \ "") ${ECHO} "#!${SH}" ; \ ${ECHO} "exit 0" ;; \ *) ${CAT} ${.ALLSRC} | ${SED} ${FILES_SUBST_SED} ;; \ esac - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} ${_INSTALL_FILE}: ${INSTALL_SRC} ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG} \ - exec 1>>${.TARGET}.tmp; \ + exec 1>>${.TARGET}; \ case ${.ALLSRC:Q}"" in \ "") ${ECHO} "#!${SH}" ; \ ${ECHO} "exit 0" ;; \ *) ${CAT} ${.ALLSRC} | ${SED} ${FILES_SUBST_SED} ;; \ esac - ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} pre-install-script: |