+2018-07-09 Tom Tromey <tom@tromey.com>
+
+ * Makefile.in (%.c: %.y): Use ECHO_YACC.
+ (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
+ * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
+
2018-07-09 Tom Tromey <tom@tromey.com>
* Makefile.in (ALLDEPFILES): Remove exec.c.
# Makefile.in, but that was a pretty big annoyance.
%.c: %.y
- $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS) \
- || (rm -f $@.tmp; false)
- sed -e '/extern.*malloc/d' \
+ $(ECHO_YACC) $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- \
+ $(YACC) $(YFLAGS) || (rm -f $@.tmp; false)
+ @sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
rm -f $@.tmp && \
mv $@.new $@
%.c: %.l
- if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
- $(FLEX) -t $< \
+ $(ECHO_LEX) $(FLEX) -t $< \
| sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e 's/yy_flex_xrealloc/yyxrealloc/g' \
> $@.new && \
- mv $@.new $@; \
- elif [ -f $@ ]; then \
- echo "Warning: $*.c older than $*.l and flex not available."; \
- else \
- echo "$@ missing and flex not available."; \
- false; \
- fi
+ mv $@.new $@
.PRECIOUS: ada-lex.c
@echo " GEN xml-builtin-generated.c";
ECHO_INIT_C = echo " GEN init.c" ||
ECHO_SIGN = @echo " SIGN gdb";
+ECHO_YACC = @echo " YACC $@";
+ECHO_LEX = @echo " LEX $@";
SILENCE = @
endif