pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Added the FAIL command, which can be prepended to a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3aa1fd703eca
branches: trunk
changeset: 523357:3aa1fd703eca
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Jan 06 19:53:01 2007 +0000
description:
Added the FAIL command, which can be prepended to an arbitrary shell
command, making it return with a non-zero exit status.
The first use of it is in a command called FAIL_MSG, which prints an
error message and exits immediately. ERROR_MSG itself doesn't do that.
diffstat:
mk/bsd.pkg.mk | 7 ++++++-
mk/scripts/fail | 5 +++++
2 files changed, 11 insertions(+), 1 deletions(-)
diffs (37 lines):
diff -r 1068b6efc5a9 -r 3aa1fd703eca mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Sat Jan 06 19:42:06 2007 +0000
+++ b/mk/bsd.pkg.mk Sat Jan 06 19:53:01 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1903 2007/01/02 23:34:40 rillig Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1904 2007/01/06 19:53:01 rillig Exp $
#
# This file is in the public domain.
#
@@ -371,6 +371,7 @@
STEP_MSG?= ${ECHO_MSG} "=>"
WARNING_MSG?= ${ECHO_MSG} 1>&2 "WARNING:"
ERROR_MSG?= ${ECHO_MSG} 1>&2 "ERROR:"
+FAIL_MSG?= ${FAIL} ${ERROR_MSG}
WARNING_CAT?= ${SED} -e "s|^|WARNING: |" 1>&2
ERROR_CAT?= ${SED} -e "s|^|ERROR: |" 1>&2
@@ -379,6 +380,10 @@
# do something.
DO_NADA?= ${TRUE}
+# the FAIL command executes its arguments and then exits with a non-zero
+# status.
+FAIL?= ${SH} ${PKGSRCDIR}/mk/scripts/fail
+
#
# Config file related settings - see doc/pkgsrc.txt
#
diff -r 1068b6efc5a9 -r 3aa1fd703eca mk/scripts/fail
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/scripts/fail Sat Jan 06 19:53:01 2007 +0000
@@ -0,0 +1,5 @@
+#! /bin/sh
+# $NetBSD: fail,v 1.1 2007/01/06 19:53:01 rillig Exp $
+
+"$@"
+exit 1
Home |
Main Index |
Thread Index |
Old Index