made a bit more verbose

This commit is contained in:
ceriel 1987-03-25 22:26:46 +00:00
parent 0cd2bbdc09
commit c65803b306

View file

@ -12,13 +12,13 @@ X0)
%% %%
[A-Z] putchar(yytext[0]+'a'-'A'); [A-Z] putchar(yytext[0]+'a'-'A');
EOF EOF
if lex x.l > /dev/null 2>&1 if lex x.l > /dev/null 2>&1 && cc -c lex.yy.c > /dev/null 2>&1
then : then :
else myecho "Sorry, your lex does not seem to work" else myecho "Sorry, your lex does not seem to work"
exit 2 exit 2
fi fi
cat > trylib <<'EOF' cat > trylib <<'EOF'
if cc lex.yy.c $1 > /dev/null 2>&1 if cc lex.yy.o $1 > /dev/null 2>&1
then then
rm -f lex.yy.* a.out rm -f lex.yy.* a.out
exit 0 exit 0
@ -30,8 +30,7 @@ EOF
then then
LEX=$TRY LEX=$TRY
else else
FL=fail exec $0 -ll $TRY
TRIES=$TRY
fi fi
;; ;;
*) if sh trylib $1 *) if sh trylib $1
@ -69,6 +68,7 @@ EOF
done done
;; ;;
esac esac
rm -f x.l trylib rm -f x.l trylib lex.yy.*
echo echo "$LEX" > .Xlex echo echo "$LEX" > .Xlex
chmod +x .Xlex chmod +x .Xlex
echo "apparently, \"cc ... $LEX\" works"