diff options
author | jlam <jlam@pkgsrc.org> | 2002-03-20 14:18:00 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-03-20 14:18:00 +0000 |
commit | b03bad7085a9c4feb7eca7c7982d6b017595bd16 (patch) | |
tree | 5b44168a5ce0387be6d5181791da2cedf97f6fe0 /mk | |
parent | fd1446adb51dbbad216f634b84b7ed579535e488 (diff) | |
download | pkgsrc-b03bad7085a9c4feb7eca7c7982d6b017595bd16.tar.gz |
Modify the generated wrapper script to honor the exit code of the wrappee.
Idea from Dan McMahill <dmcmahill@netbsd.org>.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.buildlink.mk | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mk/bsd.buildlink.mk b/mk/bsd.buildlink.mk index ac77fe8c837..e894657a749 100644 --- a/mk/bsd.buildlink.mk +++ b/mk/bsd.buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink.mk,v 1.59 2002/03/20 14:11:54 jlam Exp $ +# $NetBSD: bsd.buildlink.mk,v 1.60 2002/03/20 14:18:00 jlam Exp $ # # This Makefile fragment is included by package buildlink.mk files. This # file does the following things: @@ -227,8 +227,11 @@ _BUILDLINK_CONFIG_WRAPPER_USE: .USE ${MKDIR} ${BUILDLINK_CONFIG_WRAPPER.${.TARGET:S/-buildlink-config-wrapper//}:H}; \ (${ECHO} '#!/bin/sh'; \ ${ECHO} ''; \ - ${ECHO} '${ECHO} "`${BUILDLINK_CONFIG.${.TARGET:S/-buildlink-config-wrapper//}} $$*`" | ${SED} \'; \ - ${ECHO} ' ${_BUILDLINK_CONFIG_WRAPPER_SED} \'; \ + ${ECHO} 'output=`${BUILDLINK_CONFIG.${.TARGET:S/-buildlink-config-wrapper//}} $$*`'; \ + ${ECHO} 'exitcode=$$?'; \ + ${ECHO} '${ECHO} "$${output}" | ${SED} \'; \ + ${ECHO} ' ${_BUILDLINK_CONFIG_WRAPPER_SED}'; \ + ${ECHO} 'exit $${exitcode}'; \ ) > ${BUILDLINK_CONFIG_WRAPPER.${.TARGET:S/-buildlink-config-wrapper//}}; \ ${CHMOD} +x ${BUILDLINK_CONFIG_WRAPPER.${.TARGET:S/-buildlink-config-wrapper//}}; \ ${ECHO} ${BUILDLINK_CONFIG.${.TARGET:S/-buildlink-config-wrapper//}} >> $${cookie}; \ |