From b6f80bb873981d21a00960ea372046b0424a553a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 8 Oct 2016 13:49:00 +1030 Subject: [PATCH] Auto-generated dependencies for rx-parse.o and rl78-parse.o I noticed a while ago that the rx-elf gas gprel test regressed for no apparent reason. It turns out that the problem was rx-parse.y using BFD_RELOC_RX_* values, which may change when other targets add new relocs. If rx-parse.o doesn't depend on bfd.h, it won't be recompiled. * Makefile.am (EXTRA_as_new_SOURCES): Add config/rl78-parse.y and config/rx-parse.y. Move config/bfin-parse.y. (bfin-parse.@OBJEXT@, rl78-parse.@OBJEXT@, rx-parse.@OBJEXT@): Delete. ($(srcdir)/config/rl78-defs.h): New rule. * Makefile.in: Regenerate. --- gas/ChangeLog | 8 ++++++++ gas/Makefile.am | 16 +++++----------- gas/Makefile.in | 25 +++++++++---------------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 70b4af4..3795101 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2016-10-08 Alan Modra + + * Makefile.am (EXTRA_as_new_SOURCES): Add config/rl78-parse.y and + config/rx-parse.y. Move config/bfin-parse.y. + (bfin-parse.@OBJEXT@, rl78-parse.@OBJEXT@, rx-parse.@OBJEXT@): Delete. + ($(srcdir)/config/rl78-defs.h): New rule. + * Makefile.in: Regenerate. + 2016-10-07 Jiong Wang PR target/20667 diff --git a/gas/Makefile.am b/gas/Makefile.am index 7e302fb..6fa32ea 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -437,7 +437,7 @@ check-DEJAGNU: site.exp # The m68k operand parser. -EXTRA_as_new_SOURCES += config/m68k-parse.y config/bfin-parse.y +EXTRA_as_new_SOURCES += config/m68k-parse.y # If m68k-parse.y is in a different directory, then ylwrap will use an # absolute path when it invokes yacc, which will cause yacc to put the @@ -479,13 +479,10 @@ endif m68k-parse.h: ; @true $(srcdir)/config/m68k-parse.h: ; @true +EXTRA_as_new_SOURCES += config/bfin-parse.y bfin-parse.c: $(srcdir)/config/bfin-parse.y $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ; bfin-parse.h: bfin-parse.c -bfin-parse.@OBJEXT@: bfin-parse.c \ - $(srcdir)/config/bfin-aux.h $(srcdir)/config/bfin-defs.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h - bfin-parse.h: ; @true $(srcdir)/config/bfin-parse.h: ; @true @@ -503,20 +500,17 @@ endif $(COMPILE) -c $(srcdir)/config/bfin-lex-wrapper.c $(NO_WERROR) endif +EXTRA_as_new_SOURCES += config/rl78-parse.y rl78-parse.c: $(srcdir)/config/rl78-parse.y $(SHELL) $(YLWRAP) $(srcdir)/config/rl78-parse.y y.tab.c rl78-parse.c y.tab.h rl78-parse.h -- $(YACCCOMPILE) -d ; rl78-parse.h: rl78-parse.c -rl78-parse.@OBJEXT@: rl78-parse.c rl78-parse.h $(srcdir)/config/rl78-defs.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/rl78.h - rl78-defs.h: ; @true +$(srcdir)/config/rl78-defs.h: ; @true +EXTRA_as_new_SOURCES += config/rx-parse.y rx-parse.c: $(srcdir)/config/rx-parse.y $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c rx-parse.c y.tab.h rx-parse.h -- $(YACCCOMPILE) -d ; rx-parse.h: rx-parse.c -rx-parse.@OBJEXT@: rx-parse.c rx-parse.h $(srcdir)/config/rx-defs.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/rx.h - rx-defs.h: ; @true $(srcdir)/config/rx-defs.h: ; @true diff --git a/gas/Makefile.in b/gas/Makefile.in index 6896609..5b3c223 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -79,8 +79,8 @@ DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \ $(am__configure_deps) $(srcdir)/config.in \ $(srcdir)/../mkinstalldirs $(srcdir)/gdbinit.in \ $(srcdir)/gdbinit.in $(top_srcdir)/po/Make-in m68k-parse.c \ - bfin-parse.c itbl-parse.c itbl-lex.c $(srcdir)/../depcomp \ - $(srcdir)/../ylwrap + bfin-parse.c rl78-parse.c rx-parse.c itbl-parse.c itbl-lex.c \ + $(srcdir)/../depcomp $(srcdir)/../ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \ @@ -698,7 +698,8 @@ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \ $(TARG_ENV_CFILES) $(CONFIG_ATOF_CFILES) $(MULTI_CFILES) \ - config/m68k-parse.y config/bfin-parse.y + config/m68k-parse.y config/bfin-parse.y config/rl78-parse.y \ + config/rx-parse.y EXPECT = expect RUNTEST = runtest RUNTESTFLAGS = @@ -848,6 +849,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output-file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rl78-parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx-parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stabs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subsegs.Po@am__quote@ @@ -2431,6 +2434,8 @@ maintainer-clean-generic: -rm -f itbl-lex.c -rm -f itbl-parse.c -rm -f m68k-parse.c + -rm -f rl78-parse.c + -rm -f rx-parse.c clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ @@ -2585,14 +2590,9 @@ m68k-parse.@OBJEXT@: m68k-parse.c # Don't let the .y.h rule clobber m68k-parse.h. m68k-parse.h: ; @true $(srcdir)/config/m68k-parse.h: ; @true - bfin-parse.c: $(srcdir)/config/bfin-parse.y $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ; bfin-parse.h: bfin-parse.c -bfin-parse.@OBJEXT@: bfin-parse.c \ - $(srcdir)/config/bfin-aux.h $(srcdir)/config/bfin-defs.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h - bfin-parse.h: ; @true $(srcdir)/config/bfin-parse.h: ; @true @@ -2604,21 +2604,14 @@ bfin-lex-wrapper.@OBJEXT@: $(srcdir)/config/bfin-lex-wrapper.c bfin-lex.c bfin-p @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bfin-lex-wrapper.c' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $(srcdir)/config/bfin-lex-wrapper.c $(NO_WERROR) - rl78-parse.c: $(srcdir)/config/rl78-parse.y $(SHELL) $(YLWRAP) $(srcdir)/config/rl78-parse.y y.tab.c rl78-parse.c y.tab.h rl78-parse.h -- $(YACCCOMPILE) -d ; rl78-parse.h: rl78-parse.c -rl78-parse.@OBJEXT@: rl78-parse.c rl78-parse.h $(srcdir)/config/rl78-defs.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/rl78.h - rl78-defs.h: ; @true - +$(srcdir)/config/rl78-defs.h: ; @true rx-parse.c: $(srcdir)/config/rx-parse.y $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c rx-parse.c y.tab.h rx-parse.h -- $(YACCCOMPILE) -d ; rx-parse.h: rx-parse.c -rx-parse.@OBJEXT@: rx-parse.c rx-parse.h $(srcdir)/config/rx-defs.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/rx.h - rx-defs.h: ; @true $(srcdir)/config/rx-defs.h: ; @true -- 2.7.4