Minimize yacc and lex output
This minimizes the "make" output from the yacc and lex rules, following the same technique as the rest of the Makefile. The lex rule had a special case to deal with the situation where flex is not available. I don't think this is needed, so I removed it. If flex is truly unavailable, the person building gdb can simply "touch" the output file. gdb/ChangeLog 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.
This commit is contained in:
parent
981e0c0c1a
commit
e5fd1493fd
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2018-07-09 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* Makefile.in (ALLDEPFILES): Remove exec.c.
|
* Makefile.in (ALLDEPFILES): Remove exec.c.
|
||||||
|
|
|
@ -2477,9 +2477,9 @@ po/$(PACKAGE).pot: force
|
||||||
# Makefile.in, but that was a pretty big annoyance.
|
# Makefile.in, but that was a pretty big annoyance.
|
||||||
|
|
||||||
%.c: %.y
|
%.c: %.y
|
||||||
$(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS) \
|
$(ECHO_YACC) $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- \
|
||||||
|| (rm -f $@.tmp; false)
|
$(YACC) $(YFLAGS) || (rm -f $@.tmp; false)
|
||||||
sed -e '/extern.*malloc/d' \
|
@sed -e '/extern.*malloc/d' \
|
||||||
-e '/extern.*realloc/d' \
|
-e '/extern.*realloc/d' \
|
||||||
-e '/extern.*free/d' \
|
-e '/extern.*free/d' \
|
||||||
-e '/include.*malloc.h/d' \
|
-e '/include.*malloc.h/d' \
|
||||||
|
@ -2493,8 +2493,7 @@ po/$(PACKAGE).pot: force
|
||||||
rm -f $@.tmp && \
|
rm -f $@.tmp && \
|
||||||
mv $@.new $@
|
mv $@.new $@
|
||||||
%.c: %.l
|
%.c: %.l
|
||||||
if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
|
$(ECHO_LEX) $(FLEX) -t $< \
|
||||||
$(FLEX) -t $< \
|
|
||||||
| sed -e '/extern.*malloc/d' \
|
| sed -e '/extern.*malloc/d' \
|
||||||
-e '/extern.*realloc/d' \
|
-e '/extern.*realloc/d' \
|
||||||
-e '/extern.*free/d' \
|
-e '/extern.*free/d' \
|
||||||
|
@ -2505,13 +2504,7 @@ po/$(PACKAGE).pot: force
|
||||||
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
|
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
|
||||||
-e 's/yy_flex_xrealloc/yyxrealloc/g' \
|
-e 's/yy_flex_xrealloc/yyxrealloc/g' \
|
||||||
> $@.new && \
|
> $@.new && \
|
||||||
mv $@.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
|
|
||||||
|
|
||||||
.PRECIOUS: ada-lex.c
|
.PRECIOUS: ada-lex.c
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,7 @@ ECHO_GEN_XML_BUILTIN_GENERATED = \
|
||||||
@echo " GEN xml-builtin-generated.c";
|
@echo " GEN xml-builtin-generated.c";
|
||||||
ECHO_INIT_C = echo " GEN init.c" ||
|
ECHO_INIT_C = echo " GEN init.c" ||
|
||||||
ECHO_SIGN = @echo " SIGN gdb";
|
ECHO_SIGN = @echo " SIGN gdb";
|
||||||
|
ECHO_YACC = @echo " YACC $@";
|
||||||
|
ECHO_LEX = @echo " LEX $@";
|
||||||
SILENCE = @
|
SILENCE = @
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue