bfd/
[binutils-gdb.git] / gas / Makefile.am
index 177e7f32fbdd04d9dffbde3e7913ac26fbc8025b..87fbe3c51e1766e50576f8a4e792db149c8c84d2 100644 (file)
@@ -10,9 +10,10 @@ tooldir = $(exec_prefix)/$(target_alias)
 YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
 LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
 
-# We have to set this, because autoconf 2.59 does not substitute YFLAGS.
-# Autoconf 2.61 does, so this can be removed when we upgrade.
-YFLAGS =
+# Automake 1.10+ disables lex and yacc output file regeneration if
+# maintainer mode is disabled.  Avoid this.
+am__skiplex =
+am__skipyacc =
 
 WARN_CFLAGS = @WARN_CFLAGS@
 NO_WERROR = @NO_WERROR@
@@ -80,6 +81,7 @@ CPU_TYPES = \
        pdp11 \
        pj \
        ppc \
+       rx \
        s390 \
        score \
        sh \
@@ -274,6 +276,7 @@ TARGET_CPU_CFILES = \
        config/tc-mmix.c \
        config/tc-mn10200.c \
        config/tc-mn10300.c \
+       config/tc-moxie.c \
        config/tc-msp430.c \
        config/tc-mt.c \
        config/tc-ns32k.c \
@@ -282,6 +285,7 @@ TARGET_CPU_CFILES = \
        config/tc-pdp11.c \
        config/tc-pj.c \
        config/tc-ppc.c \
+       config/tc-rx.c \
        config/tc-s390.c \
        config/tc-score.c \
        config/tc-sh.c \
@@ -344,6 +348,7 @@ TARGET_CPU_HFILES = \
        config/tc-pdp11.h \
        config/tc-pj.h \
        config/tc-ppc.h \
+       config/tc-rx.h \
        config/tc-s390.h \
        config/tc-score.h \
        config/tc-sh.h \
@@ -425,6 +430,9 @@ TARG_ENV_HFILES = \
        config/te-vxworks.h \
        config/te-wince-pe.h
 
+TARG_ENV_CFILES = \
+       config/te-vms.c
+
 # Multi files in config
 
 MULTI_CFILES = \
@@ -479,7 +487,8 @@ CONFIG_ATOF_CFILES = \
 
 OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
 
-POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) $(TARG_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
+POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) \
+       $(TARG_ENV_HFILES) $(TARG_ENV_CFILES) $(OBJ_FORMAT_HFILES) \
        $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
        $(HFILES) $(CFILES)
 po/POTFILES.in: @MAINT@ Makefile
@@ -493,7 +502,8 @@ noinst_SCRIPTS = $(GDBINIT)
 EXTRA_SCRIPTS = .gdbinit
 
 EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
-       bfin-parse.c bfin-parse.h bfin-lex.c
+       bfin-parse.c bfin-parse.h bfin-lex.c \
+       rx-parse.c rx-parse.h
 
 diststuff: $(EXTRA_DIST) info
 
@@ -510,7 +520,7 @@ INCDIR = $(BASEDIR)/include
 # Both . and srcdir are used, in that order,
 # so that tm.h and config.h will be found in the compilation
 # subdirectory rather than in the source directory.
-INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
+AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
        -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \
        -DLOCALEDIR="\"$(datadir)/locale\""
 
@@ -529,7 +539,7 @@ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
        $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
 EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
        $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \
-       $(CONFIG_ATOF_CFILES) $(MULTI_CFILES)
+       $(TARG_ENV_CFILES) $(CONFIG_ATOF_CFILES) $(MULTI_CFILES)
 
 EXPECT = expect
 RUNTEST = runtest
@@ -584,14 +594,14 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
 # yacc will produce working code which contain compile time warnings.
 m68k-parse.o: m68k-parse.c
 if am__fastdepCC
-       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ m68k-parse.c $(NO_WERROR)
+       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
        source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
-       $(COMPILE) -c m68k-parse.c $(NO_WERROR)
+       $(COMPILE) -c `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
 endif
 
 # Don't let the .y.h rule clobber m68k-parse.h.
@@ -601,66 +611,80 @@ $(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.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h \
+bfin-parse.o: bfin-parse.c \
+ $(srcdir)/config/bfin-aux.h $(srcdir)/config/bfin-defs.h \
  $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
 
-bfin-defs.h: ; @true
-$(srcdir)/config/bfin-defs.h: ; @true
+bfin-parse.h: ; @true
+$(srcdir)/config/bfin-parse.h: ; @true
 
 bfin-lex.c: $(srcdir)/config/bfin-lex.l
        $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
-bfin-lex.o: bfin-lex.c
+bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
 if am__fastdepCC
-       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ bfin-lex.c $(NO_WERROR)
+       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
        source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
-       $(COMPILE) -c bfin-lex.c $(NO_WERROR)
+       $(COMPILE) -c `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
 endif
 
+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.o: rx-parse.c rx-parse.h $(srcdir)/config/rx-defs.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/rx.h $(BFDDIR)/libbfd.h
+
+rx-defs.h: ; @true
+$(srcdir)/config/rx-defs.h: ; @true
+
 # The instruction table specification lexical analyzer and parser.
 
 # Disable -Werror, if it has been enabled, since old versions of bison/
 # yacc will produce working code which contain compile time warnings.
-itbl-lex.o: itbl-lex.c
+itbl-lex.o: itbl-lex.c itbl-parse.h
 if am__fastdepCC
-       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-lex.c $(NO_WERROR)
+       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
        source='itbl-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
-       $(COMPILE) -c itbl-lex.c $(NO_WERROR)
+       $(COMPILE) -c `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
 endif
 
 # Disable -Werror, if it has been enabled, since old versions of bison/
 # yacc will produce working code which contain compile time warnings.
 itbl-parse.o: itbl-parse.c
 if am__fastdepCC
-       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-parse.c $(NO_WERROR)
+       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
        source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
-       $(COMPILE) -c itbl-parse.c $(NO_WERROR)
+       $(COMPILE) -c `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
 endif
 
-itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
+itbl-parse.c: $(srcdir)/itbl-parse.y
        $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
 
+itbl-parse.h: itbl-parse.c ; @true
+
+itbl-ops.o: itbl-parse.h
+
 # stand-alone itbl assembler & disassembler
 
 EXTRA_PROGRAMS = itbl-test
 itbl_test_SOURCES = itbl-parse.y itbl-lex.l
 itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
 
-itbl-tops.o: itbl-ops.c
+itbl-tops.o: itbl-ops.c itbl-parse.h
 if am__fastdepCC
        $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -o $@ -c -DSTAND_ALONE $(srcdir)/itbl-ops.c
        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po