Subject: Re: USE_GNU_TOOLS+=lex is broken under Linux
To: None <tech-pkg@NetBSD.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 07/23/2004 20:04:19
I am trying to check for the files, but I can't get it to work right.
Any ideas?
Here is what I am trying:
@@ -207,6 +207,30 @@
. endif
. endfor
.endfor _TOOLS
+#
+# Check if tools exist.
+#
+# todo: get rid of space and arguments too before checking
+#
+. for _tool_ in ${USE_GNU_TOOLS}
+_tool_filename_:= ${${_tool_:tu}}
+_found_= NO
+. if !empty(_tool_filename_:M/*)
+. for _dir_ in ${PATH:C/\:/ /g}
+. if exists(${_dir_}/${_tool_filename_})
+_found_= YES
+. endif
+. endfor
+. else
+. if exists(${_tool_filename_})
+_found_= YES
+. endif
+. endif
+. if (${_found_} == "NO")
+_TOOLS_NEED_GNU.${_tool_}= YES
+_TOOLS_REPLACE.${_tool_}= NO
+. endif
+. endfor
.if ${_TOOLS_REPLACE.awk} == "YES"
_TOOLS_OVERRIDE.awk= YES
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/