From: Stefano Lattarini Date: Wed, 1 Jun 2011 15:55:05 +0000 (+0200) Subject: lex tests: do not force the use of flex unconditionally X-Git-Tag: ng-0.5a~89^2~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc6d8b29da25a935fb8721d1ee6242687fa0eeab;p=thirdparty%2Fautomake.git lex tests: do not force the use of flex unconditionally * tests/defs (lex): Act more similarly to what the `yacc' requirement does, i.e., only force the use of flex if the $LEX variable is left unset by the user. (flex): Use `skip_' to skip the test if flex is not found. --- diff --git a/ChangeLog b/ChangeLog index 51567aaaf..e974a1b01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-06-01 Stefano Lattarini + + lex tests: do not force the use of flex unconditionally + * tests/defs (lex): Act more similarly to what the `yacc' + requirement does, i.e., only force the use of flex if the + $LEX variable is left unset by the user. + (flex): Use `skip_' to skip the test if flex is not found. + 2011-06-01 Stefano Lattarini lex tests: avoid possible hang; fix and extend diff --git a/tests/defs b/tests/defs index 1f3210c5f..ea036f87c 100644 --- a/tests/defs +++ b/tests/defs @@ -520,12 +520,24 @@ do && test "${#_am_dummy}" -eq 5' ) \ || skip_ "the shell lacks some required XSI features" ;; - flex|lex) + flex) # Since flex is required, we pick LEX for ./configure. LEX=flex export LEX echo "$me: running flex --version" - flex --version || exit 77 + flex --version || skip_ "required program \`flex' not available" + ;; + lex) + test "$LEX" = false && skip_ "no Lex program available" + if test -z "$LEX"; then + # The user hasn't explicitly specified any lex program in the + # environment, so we try to use flex, skipping the test if it's + # not found. + LEX=flex + export LEX + echo "$me: running flex --version" + flex --version || skip_ "required program \`flex' not available" + fi ;; yacc) test "$YACC" = false && skip_ "no Yacc program available"