Signed-off-by: Jens Axboe <axboe@fb.com>
ifdef CONFIG_ARITHMETIC
lex.yy.c: exp/expression-parser.l
ifdef CONFIG_ARITHMETIC
lex.yy.c: exp/expression-parser.l
$(QUIET_LEX)$(LEX) -o $@ $<
$(QUIET_LEX)$(LEX) -o $@ $<
+else
+ $(QUIET_LEX)$(LEX) $<
+endif
lex.yy.o: lex.yy.c y.tab.h
$(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
lex.yy.o: lex.yy.c y.tab.h
$(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
+# Check if lex fails using -o
+if test "$arith" = "yes" ; then
+$LEX -o lex.yy.c exp/expression-parser.l 2> /dev/null
+if test "$?" = "0" ; then
+ lex_use_o="yes"
+else
+ lex_use_o="no"
+fi
+fi
+
echo "lex/yacc for arithmetic $arith"
##########################################
echo "lex/yacc for arithmetic $arith"
##########################################
else
echo "YACC=$YACC" >> $config_host_mak
fi
else
echo "YACC=$YACC" >> $config_host_mak
fi
+ if test "$lex_use_o" = "yes" ; then
+ echo "CONFIG_LEX_USE_O=y" >> $config_host_mak
+ fi
fi
if test "$getmntent" = "yes" ; then
output_sym "CONFIG_GETMNTENT"
fi
if test "$getmntent" = "yes" ; then
output_sym "CONFIG_GETMNTENT"