diff options
Diffstat (limited to 'mk/buildlink3')
-rw-r--r-- | mk/buildlink3/find-files.mk | 23 | ||||
-rw-r--r-- | mk/buildlink3/find-libs.mk | 14 |
2 files changed, 31 insertions, 6 deletions
diff --git a/mk/buildlink3/find-files.mk b/mk/buildlink3/find-files.mk index cdc51e8d25c..c82db394493 100644 --- a/mk/buildlink3/find-files.mk +++ b/mk/buildlink3/find-files.mk @@ -1,4 +1,4 @@ -# $NetBSD: find-files.mk,v 1.2 2005/07/15 18:27:55 jlam Exp $ +# $NetBSD: find-files.mk,v 1.3 2010/04/28 08:02:18 obache Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -83,17 +83,30 @@ USE_TOOLS+= grep . if !defined(${_var_}) ${_var_}= __nonexistent__ . for _file_ in ${BUILTIN_FIND_FILES.${_var_}} -. if !empty(${_var_}:M__nonexistent__) && exists(${_file_}) +. if !empty(${_var_}:M__nonexistent__) +_real_file_= __noexistent__ +. if exists(${_file_}) +_real_file_= ${_file_} +. endif +. if !empty(_real_file_:M__noexistent__) && defined(BEINCLUDES) && !empty(BEINCLUDES) +. for _try_file_ in ${BEINCLUDES:S/;/ /g:=${_file_:S/\/usr\/include\//\//g}} +. if !empty(_real_file_:M__noexistent__) && exists(${_try_file_}) +_real_file_= ${_try_file_} +. endif +. endfor +. endif +. if empty(_real_file_:M__noexistent__) . if !defined(BUILTIN_FIND_GREP.${_var_}) -${_var_}= ${_file_} +${_var_}= ${_real_file_} . else ${_var_}!= \ - if ${GREP} -q ${BUILTIN_FIND_GREP.${_var_}:Q} ${_file_:Q}; then \ - ${ECHO} ${_file_:Q}; \ + if ${GREP} -q ${BUILTIN_FIND_GREP.${_var_}:Q} ${_real_file_:Q}; then \ + ${ECHO} ${_real_file_:Q}; \ else \ ${ECHO} __nonexistent__; \ fi . endif +. endif . endif . endfor . endif diff --git a/mk/buildlink3/find-libs.mk b/mk/buildlink3/find-libs.mk index 88dcc0c28eb..2d353ce36ad 100644 --- a/mk/buildlink3/find-libs.mk +++ b/mk/buildlink3/find-libs.mk @@ -1,4 +1,4 @@ -# $NetBSD: find-libs.mk,v 1.5 2008/12/15 10:58:53 obache Exp $ +# $NetBSD: find-libs.mk,v 1.6 2010/04/28 08:02:18 obache Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -71,6 +71,18 @@ BUILTIN_LIB_FOUND.${_lib_}!= \ else \ ${ECHO} no; \ fi +. if BUILTIN_LIB_FOUND.${_lib_}=="no" && defined(BELIBRARIES) && !empty(BELIBRARIES) +. for _path_ in ${BELIBRARIES:S/;/ /g} +. if BULITIN_LIB_FOUND.${_lib_} == "no" +BUILTIN_LIB_FOUND.${_lib_}!= \ + if ${TEST} "`${ECHO} ${_path_}/lib${_lib_}.*`" != "${_path_}/lib/lib${_lib_}.*"; then \ + ${ECHO} yes; \ + else \ + ${ECHO} no; \ + fi +. endif +. endfor +. endif . endif MAKEVARS+= BUILTIN_LIB_FOUND.${_lib_} .endfor |