From 1372a203057ea7b9e50f341c0d14d9ab7f1d4d26 Mon Sep 17 00:00:00 2001 From: Daniel Gerzo Date: Mon, 30 Oct 2006 09:37:40 +0000 Subject: [PATCH] - add some notes about ECHO_CMD and ECHO_MSG Submitted by: gabor@#bsddocs Requested by: netchild Inspired by: ports/100556 Approved by: trhodes (mentor), keramida (mentor) --- .../books/porters-handbook/book.sgml | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/en_US.ISO8859-1/books/porters-handbook/book.sgml b/en_US.ISO8859-1/books/porters-handbook/book.sgml index 264273e254..d0534e3742 100644 --- a/en_US.ISO8859-1/books/porters-handbook/book.sgml +++ b/en_US.ISO8859-1/books/porters-handbook/book.sgml @@ -3514,8 +3514,8 @@ PKGNAMESUFFIX= ${RESOLUTION} RESOLUTION?= 300 .if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \ ${RESOLUTION} != 300 && ${RESOLUTION} != 400 - @${ECHO} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\"" - @${ECHO} "Possible values are: 118, 240, 300 (default) and 400." + @${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\"" + @${ECHO_MSG} "Possible values are: 118, 240, 300 (default) and 400." @${FALSE} .endif @@ -7188,6 +7188,25 @@ etc/orbit.conf.sample after a &man.pkg.add.1; or to display licensing information. + When some lines about the build-time knobs or warnings + have to be displayed, use ECHO_MSG. The + pkg-message file is only for + post-installation steps. Likewise, the distinction between + ECHO_MSG and ECHO_CMD + should be kept in mind. The former is for printing + informational text to the screen, while the latter is for + command pipelining. + + A good example for both can be found in + shells/bash2/Makefile: + + update-etc-shells: + @${ECHO_MSG} "updating /etc/shells" + @${CP} /etc/shells /etc/shells.bak + @( ${GREP} -v ${PREFIX}/bin/bash /etc/shells.bak; \ + ${ECHO_CMD} ${PREFIX}/bin/bash) >/etc/shells + @${RM} /etc/shells.bak + The pkg-message file does not need to be added to pkg-plist. Also, it will not get