Subject: license-message and multi-line IGNORE messages
To: None <tech-pkg@netbsd.org>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 12/14/1999 04:33:33
Hi,

the patch below cleans up our message for unacceptable licenses:

miyu% make
===>  xephem-3.1 Unacceptable license: no-commercial-use.
        To build this package, add this line to your /etc/mk.conf:
        ACCEPTABLE_LICENSES+=no-commercial-use

To do this, we need to change the semantics of the IGNORE variable. It is
no longer taken as one variable, but rather as one variable with several
lines, seperated by whitespace. Each line will be printed on it's own.

In addition, the code for the IGNORE_FAIL has been slightly moved around
so IGNORE_SILENT can be used together with IGNORE_FAIL now. (does someone
use this?).

As there seems some popular demand for clearer error messages in this
area, I'd like to commit this within the next few days. Please let me know
if I missed some problem(s). 


 - Hubert


Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.375
diff -u -r1.375 bsd.pkg.mk
--- bsd.pkg.mk	1999/12/07 08:55:58	1.375
+++ bsd.pkg.mk	1999/12/14 03:30:25
@@ -833,17 +833,24 @@
 .endfor	# _lic
 .endif	# ACCEPTABLE_LICENSES
 .ifndef _ACCEPTABLE
-IGNORE=	"Unacceptable license: ${LICENSE} - set ACCEPTABLE_LICENSES in /etc/mk.conf to include ${LICENSE} to make this package"
+IGNORE=	"Unacceptable license: ${LICENSE}." \
+	"	To build this package, add this line to your /etc/mk.conf:" \
+	"	ACCEPTABLE_LICENSES+=${LICENSE}"
 .endif
 .endif
 
 .if defined(IGNORE)
-.if defined(IGNORE_FAIL)
-IGNORECMD?=	${ECHO} "===>  ${PKGNAME} ${IGNORE}." && ${FALSE}
-.elif defined(IGNORE_SILENT)
+.if defined(IGNORE_SILENT)
 IGNORECMD?=	${DO_NADA}
+.endif
+IGNORECMD?=	${ECHO} -n "===>  ${PKGNAME} " ; \
+		for str in ${IGNORE} ; \
+		do \
+			${ECHO} "$$str" ; \
+		done
+.if defined(IGNORE_FAIL)
+IGNORECMD+=	&& ${FALSE}
 .endif
-IGNORECMD?=	${ECHO_MSG} "===>  ${PKGNAME} ${IGNORE}."
 fetch checksum extract patch configure all build install deinstall package \
 depends check-depends:
 	@${IGNORECMD}

-- 
NetBSD - Better for your uptime than Viagra