tests graceful tool dependencies
From tests/defs: # User can set which tools from Autoconf to use. test -z "$AUTOCONF" AUTOCONF=autoconf if ($AUTOCONF --version) /dev/null 21; then has_autoconf=: needs_autoconf=: else has_autoconf=false needs_autoconf='exit 77' fi What's preventing you from removing the needs_autoconf variable entirely and assigning something like AUTOCONF='exit 77 ' in the case that autoconf is missing or broken? It removes a step and becomes transparent when a test doesn't want to test $has_autoconf. Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- I will not burp in class. I will not burp in class. I will not burp in class... - Bart Simpson on chalkboard, _The Simpsons_
Re: tests graceful tool dependencies
"Derek R. Price" wrote: AUTOCONF='exit 77 ' Excuse me: AUTOCONF='exit 77 dummy' to keep the parser eternally happy. Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- Every man's reason [is] his own rightful umpire. This principle, with that of acquiescence in the will of the majority, will preserve us free and prosperous as long as they are sacredly observed. - Thomas Jefferson to John F. Watson, 1814
Re: tests graceful tool dependencies
"Derek R. Price" wrote: "Derek R. Price" wrote: AUTOCONF='exit 77 ' Excuse me: AUTOCONF='exit 77 dummy' to keep the parser eternally happy. Or almost eternally happy. Due to some wierdness where my Bash only evaluates a variable as a single command (i.e. ignoring ';', '', '||'), the following was necessary: test='eval exit 77 dummy' This does the Right Thing (tm) in all the following cases: $test ($test) $test -args and -more args :; $test; dummy; more : $test : || $test false || $test false $test $test : $test || : $test false $test || false if $test; then :; fi I expect more parens aren't going to change anything. Did I miss anything? Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- The policy of the American government is to leave their citizens free, neither restraining nor aiding them in their pursuits. - Thomas Jefferson
Re: tests graceful tool dependencies
"Derek R. Price" wrote: test='eval exit 77 dummy' Whoops. Excuse me. That works in every case except ($test). The subshell created by parens breaks things. I guess that isn't all that robust. Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- I will not sleep through my education. I will not sleep through my education. I will not sleep through my education... - Bart Simpson on chalkboard, _The Simpsons_
Re: tests graceful tool dependencies
"Derek" == Derek R Price [EMAIL PROTECTED] writes: Derek Whoops. Excuse me. That works in every case except ($test). Derek The subshell created by parens breaks things. I guess that Derek isn't all that robust. I'm not too concerned about this. Once we switch fully to using traces, autoconf will be required for the tests to work at all. Tom