Date: Wed, 19 Jul 2006 14:17:46 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 101931 for review Message-ID: <200607191417.k6JEHkYB045564@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101931 Change 101931 by gabor@gabor_spitfire on 2006/07/19 14:17:17 One more DESTDIR-specific output change and some s/ECHO_CMD/ECHO_MSG/ substitutions while here. This might seem to be cosmetical changes, but it actually is not. One might want to use some scripts to produce colorful or such output for relevant information and one might override ECHO_MSG for this, but not ECHO_CMD, since that is for internal use, e.g. for command line pipelines. Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#46 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#46 (text+ko) ==== @@ -1017,7 +1017,7 @@ .if defined(_PREMKINCLUDED) check-makefile:: - @${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice" + @${ECHO_MSG} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice" @${FALSE} .endif @@ -1275,9 +1275,9 @@ # check for old, crufty, makefile types, part 1: .if !defined(PORTNAME) || !( defined(PORTVERSION) || defined (DISTVERSION) ) || defined(PKGNAME) check-makefile:: - @${ECHO_CMD} "Makefile error: you need to define PORTNAME and PORTVERSION instead of PKGNAME." - @${ECHO_CMD} "(This port is too old for your bsd.port.mk, please update it to match" - @${ECHO_CMD} " your bsd.port.mk.)" + @${ECHO_MSG} "Makefile error: you need to define PORTNAME and PORTVERSION instead of PKGNAME." + @${ECHO_MSG} "(This port is too old for your bsd.port.mk, please update it to match" + @${ECHO_MSG} " your bsd.port.mk.)" @${FALSE} .endif @@ -1346,7 +1346,7 @@ .if (!defined(PKGDIR) && exists(${MASTERDIR}/pkg/DESCR)) || \ (!defined(MD5_FILE) && exists(${MASTERDIR}/files/md5)) check-makefile:: - @${ECHO_CMD} "Makefile error: your port uses an old layout. Please update it to match this bsd.port.mk. If you have updated your ports collection via cvsup and are still getting this error, see Q12 and Q13 in the cvsup FAQ on http://www.polstra.com for further information." + @${ECHO_MSG} "Makefile error: your port uses an old layout. Please update it to match this bsd.port.mk. If you have updated your ports collection via cvsup and are still getting this error, see Q12 and Q13 in the cvsup FAQ on http://www.polstra.com for further information." @${FALSE} .endif PATCHDIR?= ${MASTERDIR}/files @@ -1574,7 +1574,7 @@ .if defined(_POSTMKINCLUDED) check-makefile:: - @${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" + @${ECHO_MSG} "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" @${FALSE} .endif @@ -1625,7 +1625,7 @@ .if ${MANCOMPRESSED} != yes && ${MANCOMPRESSED} != no && \ ${MANCOMPRESSED} != maybe check-makevars:: - @${ECHO_CMD} "${PKGNAME}: Makefile error: value of MANCOMPRESSED (is \"${MANCOMPRESSED}\") can only be \"yes\", \"no\" or \"maybe\"". + @${ECHO_MSG} "${PKGNAME}: Makefile error: value of MANCOMPRESSED (is \"${MANCOMPRESSED}\") can only be \"yes\", \"no\" or \"maybe\"". @${FALSE} .endif .endif @@ -2343,16 +2343,16 @@ # The final simpler patch will come afterwards .if !defined(COMMENT) check-makevars:: - @${ECHO_CMD} 'Makefile error: there is no COMMENT variable defined' - @${ECHO_CMD} 'for this port. Please, rectify this.' + @${ECHO_MSG} 'Makefile error: there is no COMMENT variable defined' + @${ECHO_MSG} 'for this port. Please, rectify this.' @${FALSE} .else .if exists(${COMMENTFILE}) check-makevars:: - @${ECHO_CMD} 'Makefile error: There is a COMMENTFILE in this port.' - @${ECHO_CMD} 'COMMENTFILEs have been deprecated in' - @${ECHO_CMD} 'favor of COMMENT variables.' - @${ECHO_CMD} 'Please, rectify this.' + @${ECHO_MSG} 'Makefile error: There is a COMMENTFILE in this port.' + @${ECHO_MSG} 'COMMENTFILEs have been deprecated in' + @${ECHO_MSG} 'favor of COMMENT variables.' + @${ECHO_MSG} 'Please, rectify this.' @${FALSE} .endif .endif @@ -2377,8 +2377,8 @@ _G_TEMP= ${_group} . if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: - @${ECHO_CMD} "Makefile error: the words all, ALL and default are reserved and cannot be" - @${ECHO_CMD} "used in group definitions. Please fix your MASTER_SITES" + @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" + @${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES" @${FALSE} . endif _MASTER_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} @@ -2394,8 +2394,8 @@ _G_TEMP= ${_group} . if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: - @${ECHO_CMD} "The words all, ALL and default are reserved and cannot be" - @${ECHO_CMD} "used in group definitions. Please fix your PATCH_SITES" + @${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" + @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" @${FALSE} . endif _PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} @@ -2416,8 +2416,8 @@ _G_TEMP= ${_group} . if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: - @${ECHO_CMD} "Makefile error: the words all, ALL and default are reserved and cannot be" - @${ECHO_CMD} "used in group definitions. Please fix your MASTER_SITE_SUBDIR" + @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" + @${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITE_SUBDIR" @${FALSE} . endif . if defined(_MASTER_SITES_${_group}) @@ -2437,8 +2437,8 @@ _G_TEMP= ${_group} . if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: - @${ECHO_CMD} "Makefile error: the words all, ALL and default are reserved and cannot be" - @${ECHO_CMD} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" + @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" + @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" @${FALSE} . endif . if defined(_PATCH_SITES_${_group}) @@ -2770,7 +2770,7 @@ .if !defined(CATEGORIES) check-categories: - @${ECHO_CMD} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." + @${ECHO_MSG} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." @${FALSE} .else @@ -2794,7 +2794,7 @@ @if ${ECHO_CMD} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; then \ ${TRUE}; \ else \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ ${FALSE}; \ fi .endfor @@ -2893,7 +2893,7 @@ }' | ${SED} -e 's \([^/ ][^ ]*\.\(.\)[^. ]*\) $${MAN\2PREFIX}/$$$$$$$${__lang}/man\2/\1${MANEXT}g' -e 's/ //g' -e 's/MANlPREFIX/MANLPREFIX/g' -e 's/MANnPREFIX/MANNPREFIX/g' .if ${__pmlinks:Mbroken} == "broken" check-makevars:: - @${ECHO_CMD} "${PKGNAME}: Makefile error: unable to parse MLINKS." + @${ECHO_MSG} "${PKGNAME}: Makefile error: unable to parse MLINKS." @${FALSE} .endif _MLINKS= ${_MLINKS_PREPEND} @@ -3556,7 +3556,7 @@ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \ - ${ECHO_CMD} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \ + ${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \ (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \ ${FALSE}; \ fi) @@ -3765,15 +3765,23 @@ fi @if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \ if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \ - ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \ + if [ -z "${DESTDIR}" ] ; then \ + ${ECHO_MSG} "===> ${PKGNAME} is already installed"; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} is already installed in ${DESTDIR}"; \ + fi; \ else \ - ${ECHO_CMD} "===> An older version of ${PKGORIGIN} is already installed ($${found_package})"; \ + if [ -z "${DESTDIR}" ] ; then \ + ${ECHO_MSG} "===> An older version of ${PKGORIGIN} is already installed ($${found_package})"; \ + else \ + ${ECHO_MSG} "===> An older version of ${PKGORIGIN} is already installed in ${DESTDIR} ($${found_package})"; \ + fi; \ fi; \ - ${ECHO_CMD} " You may wish to \`\`make deinstall'' and install this port again"; \ - ${ECHO_CMD} " by \`\`make reinstall'' to upgrade it properly."; \ - ${ECHO_CMD} " If you really wish to overwrite the old port of ${PKGORIGIN}"; \ - ${ECHO_CMD} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \ - ${ECHO_CMD} " in your environment or the \"make install\" command line."; \ + ${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \ + ${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \ + ${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGORIGIN}"; \ + ${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \ + ${ECHO_MSG} " in your environment or the \"make install\" command line."; \ exit 1; \ fi .else @@ -3804,8 +3812,8 @@ .if !defined(NO_MTREE) @if [ `${ID} -u` = 0 ]; then \ if [ ! -f ${MTREE_FILE} ]; then \ - ${ECHO_CMD} "Error: mtree file \"${MTREE_FILE}\" is missing."; \ - ${ECHO_CMD} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \ + ${ECHO_MSG} "Error: mtree file \"${MTREE_FILE}\" is missing."; \ + ${ECHO_MSG} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \ exit 1; \ else \ ${MTREE_CMD} ${MTREE_ARGS} ${DESTDIR}${PREFIX}/ >/dev/null; \ @@ -4238,9 +4246,9 @@ pretty-print-www-site: @www_site=$$(cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} www-site); \ if [ -n "$${www_site}" ]; then \ - ${ECHO_CMD} -n " and/or visit the "; \ - ${ECHO_CMD} -n "<a href=\"$${www_site}\">web site</a>"; \ - ${ECHO_CMD} " for futher informations"; \ + ${ECHO_MSG} -n " and/or visit the "; \ + ${ECHO_MSG} -n "<a href=\"$${www_site}\">web site</a>"; \ + ${ECHO_MSG} " for futher informations"; \ fi .endif @@ -4493,7 +4501,7 @@ esac; \ ${ECHO_CMD} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${args} "${FETCH_AFTER_ARGS}" '|| ' ; \ done; \ - ${ECHO_CMD} "${ECHO_CMD} $${file} not fetched" ; \ + ${ECHO_MSG} "${ECHO_CMD} $${file} not fetched" ; \ fi \ done) .endif @@ -4521,8 +4529,8 @@ for alg in ${CHECKSUM_ALGORITHMS:U}; do \ eval alg_executable=\$$$$alg; \ if [ -z "$$alg_executable" ]; then \ - ${ECHO_CMD} "Checksum algorithm $$alg: Couldn't find the executable."; \ - ${ECHO_CMD} "Set $$alg=/path/to/$$alg in /etc/make.conf and try again."; \ + ${ECHO_MSG} "Checksum algorithm $$alg: Couldn't find the executable."; \ + ${ECHO_MSG} "Set $$alg=/path/to/$$alg in /etc/make.conf and try again."; \ exit 1; \ fi; \ done; \ @@ -5344,7 +5352,7 @@ .if defined(SUB_FILES) .for file in ${SUB_FILES} .if !exists(${FILESDIR}/${file}.in) - @${ECHO_CMD} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 + @${ECHO_MSG} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 .else @${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/${file}.in > ${WRKDIR}/${file} .endif @@ -5364,7 +5372,7 @@ generate-plist: @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} `${DIRNAME} ${TMPPLIST}` - @if [ ! -f ${DESCR} ]; then ${ECHO_CMD} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi + @if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi @>${TMPPLIST} @for file in ${PLIST_FILES}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ @@ -5503,8 +5511,8 @@ install-rc-script: .if defined(USE_RCORDER) || defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES" .if defined(USE_RCORDER) - @${ECHO_CMD} "===> Installing early rc.d startup script(s)" - @${ECHO_CMD} "@cwd /" >> ${TMPPLIST} + @${ECHO_MSG} "===> Installing early rc.d startup script(s)" + @${ECHO_MSG} "@cwd /" >> ${TMPPLIST} @for i in ${USE_RCORDER}; do \ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} /etc/rc.d/$${i%.sh}; \ ${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ @@ -5512,7 +5520,7 @@ @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST} .endif .if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES" - @${ECHO_CMD} "===> Installing rc.d startup script(s)" + @${ECHO_MSG} "===> Installing rc.d startup script(s)" @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST} .if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101 )) @for i in ${USE_RC_SUBR}; do \ @@ -5888,7 +5896,7 @@ .if defined(DESKTOP_ENTRIES) @set ${DESKTOP_ENTRIES} XXX; \ if [ `${EXPR} \( $$# - 1 \) % 6` -ne 0 ]; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: the DESKTOP_ENTRIES list must contain one or more groups of 6 elements"; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: the DESKTOP_ENTRIES list must contain one or more groups of 6 elements"; \ exit 1; \ fi; \ num=1; \ @@ -5900,36 +5908,36 @@ entry="$$entry ($$1)"; \ fi; \ if [ -z "$$1" ]; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 1 (Name) is empty"; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 1 (Name) is empty"; \ exit 1; \ fi; \ if [ -z "$$4" ]; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 4 (Exec) is empty"; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 4 (Exec) is empty"; \ exit 1; \ fi; \ if [ -n "$$5" ]; then \ for c in `${ECHO_CMD} "$$5" | ${TR} ';' ' '`; do \ if ! ${ECHO_CMD} ${VALID_DESKTOP_CATEGORIES} | ${GREP} -wq $$c; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: in desktop entry $$entry: category $$c is not a valid desktop category"; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: category $$c is not a valid desktop category"; \ exit 1; \ fi; \ done; \ if ! ${ECHO_CMD} "$$5" | ${GREP} -q ';$$'; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) does not end with a semicolon"; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) does not end with a semicolon"; \ exit 1; \ fi; \ else \ if [ -z "`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} desktop-categories`" ]; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) is empty and could not be deduced from the CATEGORIES variable"; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 5 (Categories) is empty and could not be deduced from the CATEGORIES variable"; \ exit 1; \ fi; \ fi; \ if [ -z "$$6" ]; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 6 (StartupNotify) is empty"; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 6 (StartupNotify) is empty"; \ exit 1; \ fi; \ if [ "x$$6" != "xtrue" ] && [ "x$$6" != "xfalse" ]; then \ - ${ECHO_CMD} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 6 (StartupNotify) is not \"true\" or \"false\""; \ + ${ECHO_MSG} "${PKGNAME}: Makefile error: in desktop entry $$entry: field 6 (StartupNotify) is not \"true\" or \"false\""; \ exit 1; \ fi; \ shift 6; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607191417.k6JEHkYB045564>