* Rename remote-es1800.c to remote-es.c
[deliverable/binutils-gdb.git] / gdb / Makefile.in
index 2675df52ef717cee054e362b852c940f66efb45a..ad56df94eb36f8d89ca285e1582c537e604f9daa 100644 (file)
@@ -590,6 +590,8 @@ depend: $(SOURCES) Makefile.in
          -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g'  \
          -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g'  \
          -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g'  \
+         -e 's; $(BFD_DEP)/bfd\.h; ../bfd/bfd.h;g'  \
+         -e 's; $(INCLUDE_DEP)/../bfd/bfd\.h; ../bfd/bfd.h;g'  \
          -e 's; \./xm.h; xm.h config.status;g'  \
          -e 's; \./tm.h; tm.h config.status;g'  \
          -e 's; \./nm.h; nm.h config.status;g'  \
@@ -777,17 +779,22 @@ clean:
        rm -f gdb core make.log
        rm -f gdb[0-9]
 
-distclean: clean c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
+# This used to depend on c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
+# I believe this is wrong; the makefile standards for distclean just
+# describe removing files; the only sort of "re-create a distribution"
+# functionality described is if the distributed files are unmodified.
+distclean: clean
        @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do 
-       rm -f tm.h xm.h config.status
+       rm -f nm.h tm.h xm.h config.status
        rm -f y.output yacc.acts yacc.tmp
        rm -f ${TESTS} Makefile depend
 
 realclean: clean
        @$(MAKE) $(FLAGS_TO_PASS) DO=realclean "DODIRS=$(SUBDIRS)" subdir_do
        rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
-       rm -f tm.h xm.h config.status
-       rm -f Makefile depend
+       rm -f nm.h tm.h xm.h config.status
+       rm -f y.output yacc.acts yacc.tmp
+       rm -f ${TESTS} Makefile depend
 
 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
 
@@ -832,6 +839,8 @@ copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
 
 version.c: Makefile
        echo 'char *version = "$(VERSION)";' >version.c
+       echo 'char *host_canonical = "$(host_canonical)";' >> version.c
+       echo 'char *target_canonical = "$(target_canonical)";' >> version.c
 
 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
 # in srcdir, then compiled in target dir to c-exp.tab.o.
@@ -849,8 +858,9 @@ c-exp.tab.c: $(srcdir)/c-exp.y $(srcdir)/Makefile.in
             -e '/include.*malloc.h/d' \
             -e 's/malloc/xmalloc/g' \
             -e 's/realloc/xrealloc/g' \
-         < y.tab.c > ././c-exp.tab.c
+         < y.tab.c > c-exp.new
        -rm y.tab.c
+       mv c-exp.new ././c-exp.tab.c
 
 # ch-exp.tab.c is generated in target dir from ch-exp.y if it doesn't exist
 # in srcdir, then compiled in target dir to ch-exp.tab.o.
@@ -865,8 +875,9 @@ ch-exp.tab.c: $(srcdir)/ch-exp.y $(srcdir)/Makefile.in
             -e '/include.*malloc.h/d' \
             -e 's/malloc/xmalloc/g' \
             -e 's/realloc/xrealloc/g' \
-         < y.tab.c > ././ch-exp.tab.c
+         < y.tab.c > ch-exp.new
        -rm y.tab.c
+       mv ch-exp.new ././ch-exp.tab.c
 
 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
 # in srcdir, then compiled in target dir to m2-exp.tab.o.
@@ -881,8 +892,12 @@ m2-exp.tab.c: $(srcdir)/m2-exp.y $(srcdir)/Makefile.in
             -e '/include.*malloc.h/d' \
             -e 's/malloc/xmalloc/g' \
             -e 's/realloc/xrealloc/g' \
-         < y.tab.c > ././m2-exp.tab.c
+         < y.tab.c > m2-exp.new
        -rm y.tab.c
+       mv m2-exp.new ././m2-exp.tab.c
+
+# These files are updated atomically, so make never has to remove them
+.PRECIOUS: m2-exp.tab.c ch-exp.tab.c c-exp.tab.c
 
 lint: $(LINTFILES)
        $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
This page took 0.024094 seconds and 4 git commands to generate.