diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-09 03:05:59 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-09 03:05:59 +0000 |
commit | 46728682bfb9996d6b05cc48e269f47cd1390636 (patch) | |
tree | a562ac2738b79abe0c4c61501a1a322dcd726852 /mk/buildlink3 | |
parent | c87c81fc09971874cff4478636055d8419fcc0ba (diff) | |
download | pkgsrc-46728682bfb9996d6b05cc48e269f47cd1390636.tar.gz |
Don't generate wrapper scripts if we can't find the wrappee.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 7337064469f..192bdffcb82 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.80 2004/02/09 01:30:59 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.81 2004/02/09 03:05:59 jlam Exp $ # # An example package buildlink3.mk file: # @@ -1176,9 +1176,11 @@ _BLNK_WRAPPER_TRANSFORM_SED.${_wrappee_}= \ -e "s|@_BLNK_WRAP_ENV@|${_BLNK_WRAP_ENV.${_wrappee_}:Q}|g" \ -e "s|@_BLNK_WRAP_SANITIZE_PATH@|${_BLNK_WRAP_SANITIZE_PATH.${_wrappee_}:Q}|g" -buildlink-wrappers: ${BUILDLINK_${_wrappee_}} -.if !target(${BUILDLINK_${_wrappee_}}) -${BUILDLINK_${_wrappee_}}: \ +_BLNK_WRAPPEE_COOKIE.${_wrappee_}= \ + ${BUILDLINK_DIR}/.buildlink_wrapper_${_wrappee_}_done + +buildlink-wrappers: ${_BLNK_WRAPPEE_COOKIE.${_wrappee_}} +${_BLNK_WRAPPEE_COOKIE.${_wrappee_}}: \ ${_BLNK_WRAPPER_SH.${_wrappee_}} \ ${_BLNK_WRAP_BUILDCMD.${_wrappee_}} \ ${_BLNK_WRAP_QUOTEARG.${_wrappee_}} \ @@ -1189,9 +1191,10 @@ ${BUILDLINK_${_wrappee_}}: \ ${_BLNK_WRAP_LOGIC.${_wrappee_}} \ ${_BLNK_WRAP_POST_LOGIC.${_wrappee_}} ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_BUILDLINK_MSG} \ - "=> Creating wrapper: ${.TARGET}" + "=> Creating wrapper: ${BUILDLINK_${_wrappee_}}" ${_PKG_SILENT}${_PKG_DEBUG} \ wrappee="${_BLNK_PKG_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \ + gen=yes; \ case $${wrappee} in \ /*) absdir=; \ ;; \ @@ -1213,30 +1216,30 @@ ${BUILDLINK_${_wrappee_}}: \ done; \ IFS="$$OLDIFS"; \ if [ ! -x "$${wrappee}" ]; then \ - ${ECHO_MSG} "Unable to create \"$${wrappee}\" wrapper script: no such file"; \ - exit 1; \ + gen=no; \ + ${ECHO_BUILDLINK_MSG} "Warning: unable to create \"$${wrappee}\" wrapper script"; \ fi; \ ;; \ esac; \ - ${MKDIR} ${.TARGET:H}; \ - ${CAT} ${_BLNK_WRAPPER_SH.${_wrappee_}} | \ - ${SED} ${_BLNK_WRAPPER_TRANSFORM_SED.${_wrappee_}} \ - -e "s|@WRAPPEE@|$${absdir}${_BLNK_PKG_${_wrappee_}:Q}|g" | \ - ${_BLNK_SH_CRUNCH_FILTER} \ - > ${.TARGET}; \ - ${CHMOD} +x ${.TARGET} -.endif - + case $$gen in \ + yes) \ + ${MKDIR} ${BUILDLINK_${_wrappee_}:H}; \ + ${CAT} ${_BLNK_WRAPPER_SH.${_wrappee_}} | \ + ${SED} ${_BLNK_WRAPPER_TRANSFORM_SED.${_wrappee_}} \ + -e "s|@WRAPPEE@|$${absdir}${_BLNK_PKG_${_wrappee_}:Q}|g" | \ + ${_BLNK_SH_CRUNCH_FILTER} \ + > ${BUILDLINK_${_wrappee_}}; \ + ${CHMOD} +x ${BUILDLINK_${_wrappee_}}; \ + ;; \ + esac . for _alias_ in ${_ALIASES.${_wrappee_}:S/^/${BUILDLINK_DIR}\/bin\//} -. if !target(${_alias_}) -buildlink-wrappers: ${_alias_} -${_alias_}: ${BUILDLINK_${_wrappee_}} - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_BUILDLINK_MSG} \ - "=> Linking wrapper: ${.TARGET}" - ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} - ${_PKG_SILENT}${_PKG_DEBUG}${LN} -f ${BUILDLINK_${_wrappee_}} ${.TARGET} -. endif -. endfor # _alias_ + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x ${_alias_} -a -x ${BUILDLINK_${_wrappee_}} ]; then \ + ${ECHO_BUILDLINK_MSG} "=> Linking wrapper: ${_alias_}"; \ + ${LN} -f ${BUILDLINK_${_wrappee_}} ${_alias_}; \ + fi +. endfor + ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET} .endfor # _wrappee_ # Allow BUILDLINK_ENV to override shell environment settings in |