* configure.in: Call AM_PROG_LEX rather than AC_PROG_LEX and
[binutils-gdb.git] / gas / Makefile.in
index cc1058b3da55f13212d2f99532a5295fef8d6f6a..9def1d7d0683046aa7c51f4bc30ec4396ebc6700 100644 (file)
@@ -1,8 +1,14 @@
-# Makefile.in generated automatically by automake 1.2 from Makefile.am
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
 
-# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
 
 SHELL = @SHELL@
@@ -26,6 +32,8 @@ mandir = @mandir@
 includedir = @includedir@
 oldincludedir = /usr/include
 
+DISTDIR =
+
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -43,12 +51,12 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 transform = @program_transform_name@
 
-NORMAL_INSTALL = true
-PRE_INSTALL = true
-POST_INSTALL = true
-NORMAL_UNINSTALL = true
-PRE_UNINSTALL = true
-POST_UNINSTALL = true
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
 build_alias = @build_alias@
 build_triplet = @build@
 host_alias = @host_alias@
@@ -56,8 +64,10 @@ host_triplet = @host@
 target_alias = @target_alias@
 target_triplet = @target@
 ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
+AS = @AS@
 BFDLIB = @BFDLIB@
 CC = @CC@
+DLLTOOL = @DLLTOOL@
 EXEEXT = @EXEEXT@
 LD = @LD@
 LIBTOOL = @LIBTOOL@
@@ -75,7 +85,7 @@ obj_format = @obj_format@
 target_cpu_type = @target_cpu_type@
 te_file = @te_file@
 
-AUTOMAKE_OPTIONS = dejagnu
+AUTOMAKE_OPTIONS = cygnus dejagnu
 
 SUBDIRS = doc
 
@@ -420,6 +430,10 @@ noinst_SCRIPTS = .gdbinit
 
 EXTRA_DIST = make-gas.com
 
+DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
+
+DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h
+
 # Now figure out from those variables how to compile and link.
 
 BASEDIR = $(srcdir)/..
@@ -433,6 +447,12 @@ INCDIR = $(BASEDIR)/include
 # subdirectory rather than in the source directory.
 INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
 
+# This should be parallel to INCLUDES, but should replace $(srcdir)
+# with $${srcdir}, and should work in a subdirectory.  This is used
+# when building dependencies, because the dependency building is done
+# in a subdirectory.
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd
+
 # How to link with both our special library facilities
 # and the system's installed libraries.
 
@@ -477,8 +497,6 @@ MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \
 
 CLEANFILES = dep.sed .tcdep .objdep .dep2 .dep1 .depa .dep .depdir
 
-DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h
-
 against=stage2
 
 # Automatic dependency computation.  This is a real pain, because the
@@ -488,7 +506,6 @@ against=stage2
 DEP_FILE_DEPS =  $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
        $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
 
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
 TCDEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
   $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
 TCDEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
@@ -590,12 +607,12 @@ TCDEP_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
   $(INCDIR)/opcode/i960.h
 TCDEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
   $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
-  subsegs.h $(INCDIR)/obstack.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
-  $(INCDIR)/opcode/cgen.h
+  subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h \
+  $(srcdir)/../opcodes/m32r-opc.h $(INCDIR)/opcode/cgen.h
 TCDEP_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
-  $(INCDIR)/obstack.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
+  $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
   $(INCDIR)/opcode/cgen.h
 TCDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
   $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -762,7 +779,7 @@ OBJDEP_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
   $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
-  $(INCDIR)/aout/aout64.h
+  $(INCDIR)/elf/alpha.h $(INCDIR)/aout/aout64.h
 OBJDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
 OBJDEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
   $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
@@ -1222,14 +1239,14 @@ GZIP = --best
 SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES)
 OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS)
 
-default: all
+all: all-recursive-am all-am
 
 .SUFFIXES:
-.SUFFIXES: .S .c .h .l .lo .o .s .y
-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+.SUFFIXES: .S .c .l .lo .o .s .y
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
        cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
 
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) \
          && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
@@ -1241,7 +1258,8 @@ config.status: $(srcdir)/configure
 $(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)
 
-config.h: stamp-h ; @:
+config.h: stamp-h
+       @:
 stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
        cd $(top_builddir) \
          && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
@@ -1257,7 +1275,7 @@ mostlyclean-hdr:
 clean-hdr:
 
 distclean-hdr:
-       rm -f config.h
+       -rm -f config.h
 
 maintainer-clean-hdr:
 .gdbinit: $(top_builddir)/config.status gdbinit.in
@@ -1266,35 +1284,34 @@ maintainer-clean-hdr:
 mostlyclean-noinstPROGRAMS:
 
 clean-noinstPROGRAMS:
-       test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+       -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
 
 distclean-noinstPROGRAMS:
 
 maintainer-clean-noinstPROGRAMS:
 
-.s.o:
+.c.o:
        $(COMPILE) -c $<
 
-.S.o:
+.s.o:
        $(COMPILE) -c $<
 
-.c.o:
+.S.o:
        $(COMPILE) -c $<
 
 mostlyclean-compile:
-       rm -f *.o core
+       -rm -f *.o core *.core
 
 clean-compile:
 
 distclean-compile:
-       rm -f *.tab.c
+       -rm -f *.tab.c
 
 maintainer-clean-compile:
 
 .c.lo:
        $(LIBTOOL) --mode=compile $(COMPILE) -c $<
 
-# These are just copies of the above rule.
 .s.lo:
        $(LIBTOOL) --mode=compile $(COMPILE) -c $<
 
@@ -1302,10 +1319,10 @@ maintainer-clean-compile:
        $(LIBTOOL) --mode=compile $(COMPILE) -c $<
 
 mostlyclean-libtool:
-       rm -f *.lo
+       -rm -f *.lo
 
 clean-libtool:
-       rm -rf .libs
+       -rm -rf .libs _libs
 
 distclean-libtool:
 
@@ -1324,8 +1341,9 @@ gasp-new$(EXEEXT): $(gasp_new_OBJECTS) $(gasp_new_DEPENDENCIES)
        $(LINK) $(gasp_new_LDFLAGS) $(gasp_new_OBJECTS) $(gasp_new_LDADD) $(LIBS)
 .y.c:
        $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS)
-.y.h:
-       $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS)
+config/m68k-parse.h: config/m68k-parse.c
+itbl-parse.h: itbl-parse.c
+
 .l.c:
        $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
 
@@ -1342,7 +1360,7 @@ all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
        @set fnord $(MAKEFLAGS); amf=$$2; \
-       for subdir in $(SUBDIRS); do \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making $$target in $$subdir"; \
          (cd $$subdir && $(MAKE) $$target) \
@@ -1352,7 +1370,9 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
        @set fnord $(MAKEFLAGS); amf=$$2; \
-       rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \
+       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+         rev="$$subdir $$rev"; \
+       done; \
        for subdir in $$rev; do \
          target=`echo $@ | sed s/-recursive//`; \
          echo "Making $$target in $$subdir"; \
@@ -1366,24 +1386,29 @@ tags-recursive:
 
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES)
-       here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
        tags=; \
        here=`pwd`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
        done; \
-       test -z "$(ETAGS_ARGS)config.in$(SOURCES)$(HEADERS)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $(SOURCES) $(HEADERS) -o $$here/TAGS)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
 
 mostlyclean-tags:
 
 clean-tags:
 
 distclean-tags:
-       rm -f TAGS ID
+       -rm -f TAGS ID
 
 maintainer-clean-tags:
 
@@ -1394,7 +1419,7 @@ top_distdir = $(distdir)
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
 distcheck: dist
-       rm -rf $(distdir)
+       -rm -rf $(distdir)
        GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
        mkdir $(distdir)/=build
        mkdir $(distdir)/=inst
@@ -1407,20 +1432,20 @@ distcheck: dist
          && $(MAKE) install \
          && $(MAKE) installcheck \
          && $(MAKE) dist
-       rm -rf $(distdir)
+       -rm -rf $(distdir)
        @echo "========================"; \
        echo "$(distdir).tar.gz is ready for distribution"; \
        echo "========================"
 dist: distdir
        -chmod -R a+r $(distdir)
        GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       rm -rf $(distdir)
+       -rm -rf $(distdir)
 dist-all: distdir
        -chmod -R a+r $(distdir)
        GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       rm -rf $(distdir)
+       -rm -rf $(distdir)
 distdir: $(DISTFILES)
-       rm -rf $(distdir)
+       -rm -rf $(distdir)
        mkdir $(distdir)
        -chmod 777 $(distdir)
        @for file in $(DISTFILES); do \
@@ -1429,16 +1454,18 @@ distdir: $(DISTFILES)
          || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
          || cp -p $$d/$$file $(distdir)/$$file; \
        done
-       for subdir in $(SUBDIRS); do            \
-         test -d $(distdir)/$$subdir           \
-         || mkdir $(distdir)/$$subdir          \
-         || exit 1;                            \
-         chmod 777 $(distdir)/$$subdir;        \
-         (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
+       for subdir in $(SUBDIRS); do \
+         test -d $(distdir)/$$subdir \
+         || mkdir $(distdir)/$$subdir \
+         || exit 1; \
+         chmod 777 $(distdir)/$$subdir; \
+         (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
            || exit 1; \
        done
 
 DEJATOOL = $(PACKAGE)
+
+RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
 site.exp: Makefile
        @echo 'Making a new site.exp file...'
        -@rm -f site.bak
@@ -1460,7 +1487,7 @@ site.exp: Makefile
        @mv $@-t site.exp
 info: info-recursive
 dvi: dvi-recursive
-check: all-am
+check:
        $(MAKE) check-recursive check-DEJAGNU
 installcheck: installcheck-recursive
 install-info: install-info-recursive
@@ -1482,27 +1509,25 @@ install: install-recursive install-exec-am
 
 uninstall: uninstall-recursive
 
-all: all-recursive-am all-am
-
 install-strip:
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
 installdirs: installdirs-recursive
 
 
 mostlyclean-generic:
-       test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
 
 clean-generic:
-       test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
-       rm -f Makefile $(DISTCLEANFILES)
-       rm -f config.cache config.log stamp-h stamp-h[0-9]*
-       test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -rm -f Makefile $(DISTCLEANFILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
-       test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-       test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 mostlyclean-am:  mostlyclean-hdr mostlyclean-noinstPROGRAMS \
                mostlyclean-compile mostlyclean-libtool \
                mostlyclean-tags mostlyclean-generic
@@ -1525,21 +1550,21 @@ mostlyclean:  mostlyclean-recursive mostlyclean-am
 clean:  clean-recursive clean-am
 
 distclean:  distclean-recursive distclean-am
-       rm -f config.status
-       rm -f libtool
+       -rm -f config.status
+       -rm -f libtool
 
 maintainer-clean:  maintainer-clean-recursive maintainer-clean-am
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
-       rm -f config.status
-
-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
-maintainer-clean-hdr mostlyclean-noinstPROGRAMS \
-distclean-noinstPROGRAMS clean-noinstPROGRAMS \
-maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-libtool \
-distclean-libtool clean-libtool maintainer-clean-libtool \
-install-data-recursive uninstall-data-recursive install-exec-recursive \
+       -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
 uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
 all-recursive check-recursive installcheck-recursive info-recursive \
 dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
@@ -1556,6 +1581,7 @@ stamp-mk.com: vmsconf.sh Makefile
        sh $(srcdir)/vmsconf.sh $(GENERIC_OBJS) > new-make.com
        $(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
        touch stamp-mk.com
+diststuff: $(DISTSTUFF) info
 
 $(OBJS): @ALL_OBJ_DEPS@
 
@@ -1680,8 +1706,10 @@ install-exec-local: $(noinst_PROGRAMS)
        done
        rm -f $(tooldir)/bin/as$(EXEEXT)
        n=`echo as | sed '$(transform)'`; \
-       ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
-         || $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT)
+       if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
+         ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
+           || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
+       fi
 
 # These exist for maintenance purposes.
 
@@ -1760,7 +1788,8 @@ de-stage3:
 
 .dep: dep.sed $(DEP_FILE_DEPS) .tcdep .objdep .dep2
        rm -f .dep1
-       $(MAKE) DEP=$(DEP) .dep1
+       srcdir=`cd $(srcdir); pwd`; \
+       $(MAKE) DEP=$(DEP) srcdir=$${srcdir} VPATH=$${srcdir} .dep1
        rm -rf .depdir
        sed -f dep.sed < .dep1 > .depa
        sed -f dep.sed < .tcdep >> .depa
@@ -1773,22 +1802,24 @@ de-stage3:
        $(SHELL) $(srcdir)/../move-if-change .depa .dep
 
 # This rule needs a mkdep that runs "gcc -MM".
-# FIXME: This only works correctly if $(srcdir) is an absolute path.
 .dep1: $(CFILES) $(MULTI_CFILES)
        if [ -d .depdir ]; then true; else mkdir .depdir; fi
+       srcdir=`cd $(srcdir); pwd`; \
        cd .depdir; \
        echo '' > targ-cpu.h; \
        echo '' > obj-format.h; \
        echo '' > targ-env.h; \
        echo '' > itbl-cpu.h; \
        echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
-       $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(INCLUDES) $?
-       mv -f .depdir/.dep .dep1
+       $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $?
+       sed -e '/IF YOU PUT ANYTHING/,$$d' < .depdir/.dep > .dep1
+       rm -f .depdir/.dep
 
 # Work out the special dependencies for the tc-*.c files.
 .tcdep: $(TARGET_CPU_CFILES)
        rm -f .tcdepa
        if [ -d .depdir ]; then true; else mkdir .depdir; fi
+       srcdir=`cd $(srcdir); pwd`; \
        cd .depdir; \
        for c in $(CPU_TYPES); do \
          for o in $(OBJ_FORMATS); do \
@@ -1800,9 +1831,9 @@ de-stage3:
              echo '' > itbl-cpu.h; \
              echo '#include "opcodes/'"$${c}"'-opc.h"' > cgen-opc.h; \
              rm -f dummy.c; \
-             cp $(srcdir)/config/tc-$${c}.c dummy.c; \
+             cp $${srcdir}/config/tc-$${c}.c dummy.c; \
              echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
-             $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(INCLUDES) dummy.c; \
+             $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
              sed -e "s/dummy.o: dummy.c/TCDEP_$${c}_$${o} =/" \
                  -e '1,/DO NOT PUT ANYTHING AFTER/d' \
                  -e '/IF YOU PUT ANYTHING/,$$d' \
@@ -1811,9 +1842,9 @@ de-stage3:
            else true; fi; \
          done; \
        done
-       echo 'TCDEP_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
-       echo '  $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h \' >> .tcdepa
-       echo '  $(INCDIR)/opcode/hppa.h $(BFDDIR)/som.h' >> .tcdepa
+       echo 'TCDEP_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
+       echo '  $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .tcdepa
+       echo '  $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> .tcdepa
        # We don't try to handle all multi cases.
        for c in $(CPU_TYPES); do \
          $(CPU_MULTI_VALID) \
@@ -1834,6 +1865,7 @@ de-stage3:
 .objdep: $(OBJ_FORMAT_CFILES)
        rm -f .objdepa
        if [ -d .depdir ]; then true; else mkdir .depdir; fi
+       srcdir=`cd $(srcdir); pwd`; \
        cd .depdir; \
        for c in $(CPU_TYPES); do \
          for o in $(OBJ_FORMATS); do \
@@ -1844,9 +1876,9 @@ de-stage3:
              echo '#include "te-generic.h"' > targ-env.h; \
              echo '' > itbl-cpu.h; \
              rm -f dummy.c; \
-             cp $(srcdir)/config/obj-$${o}.c dummy.c; \
+             cp $${srcdir}/config/obj-$${o}.c dummy.c; \
              echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
-             $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(INCLUDES) dummy.c; \
+             $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
              sed -e "s/dummy.o: dummy.c/OBJDEP_$${c}_$${o} =/" \
                  -e '1,/DO NOT PUT ANYTHING AFTER/d' \
                  -e '/IF YOU PUT ANYTHING/,$$d' \
@@ -1855,10 +1887,10 @@ de-stage3:
            else true; fi; \
          done; \
        done
-       echo 'OBJDEP_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
-       echo '  $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h \' >> .objdepa
-       echo '  $(BFDDIR)/som.h  $(INCDIR)/aout/stab_gnu.h \' >> .objdepa
-       echo '  $(INCDIR)/aout/stab.def' >> .objdepa
+       echo 'OBJDEP_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
+       echo '  $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .objdepa
+       echo '  $$(BFDDIR)/som.h  $$(INCDIR)/aout/stab_gnu.h \' >> .objdepa
+       echo '  $$(INCDIR)/aout/stab.def' >> .objdepa
        # We don't try to handle all multi cases.
        for c in $(CPU_TYPES); do \
          $(CPU_MULTI_VALID) \
@@ -1877,10 +1909,10 @@ de-stage3:
 
 # Work out the dependencies for each CPU/OBJ combination.
 # Note that SOM is a special case, because it only works native.
-# FIXME: This only works correctly if $(srcdir) is an absolute path.
 .dep2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
        rm -f .dep2a
        if [ -d .depdir ]; then true; else mkdir .depdir; fi
+       srcdir=`cd $(srcdir); pwd`; \
        cd .depdir; \
        for c in $(CPU_TYPES); do \
          for o in $(OBJ_FORMATS); do \
@@ -1889,7 +1921,7 @@ de-stage3:
              echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
              echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
              echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
-             $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(INCLUDES) dummy.c; \
+             $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
              sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" \
                  -e '1,/DO NOT PUT ANYTHING AFTER/d' \
                  -e '/IF YOU PUT ANYTHING/,$$d' \
@@ -1897,7 +1929,7 @@ de-stage3:
            else true; fi; \
          done; \
        done
-       echo 'DEP_hppa_som = $(srcdir)/../bfd/som.h' >> .dep2a
+       echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> .dep2a
        # We don't try to handle all multi cases.
        for c in $(CPU_TYPES); do \
          $(CPU_MULTI_VALID) \
@@ -1915,10 +1947,11 @@ de-stage3:
        mv -f .dep2a .dep2
 
 dep.sed: dep-in.sed config.status
+       srcdir=`cd $(srcdir); pwd`; \
        sed <$(srcdir)/dep-in.sed >dep.sed \
-               -e 's!@INCDIR@!$(INCDIR)!' \
-               -e 's!@BFDDIR@!$(BFDDIR)!' \
-               -e 's!@SRCDIR@!$(srcdir)!'
+               -e "s!@INCDIR@!$${srcdir}/../include!" \
+               -e "s!@BFDDIR@!$${srcdir}/../bfd!" \
+               -e "s!@SRCDIR@!$${srcdir}!"
 
 dep: .dep
        sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
@@ -1948,6 +1981,7 @@ bignum-copy.o: bignum-copy.c
 cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h
 depend.o: depend.c
 ecoff.o: ecoff.c
+ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
 expr.o: expr.c $(INCDIR)/obstack.h
 flonum-copy.o: flonum-copy.c
 flonum-konst.o: flonum-konst.c