From: Jim Kingdon Date: Wed, 9 Jun 1993 23:27:24 +0000 (+0000) Subject: * Makefile.in (*.tab.c): Use mv for atomic update. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39d4639b117ee2aa66afac49d60d276c62eed593;p=binutils-gdb.git * Makefile.in (*.tab.c): Use mv for atomic update. * Makefile.in ({dist,real}clean): Also remove nm.h. (realclean): Also remove ${TESTS}, y.output, yacc.{acts,tmp}. (distclean): Don't rebuild *.tab.c or TAGS. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 776606f926d..cb0b7aa5e0a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +Wed Jun 9 16:08:44 1993 Jim Kingdon (kingdon@cygnus.com) + + * Makefile.in (*.tab.c): Use mv for atomic update. + + * Makefile.in ({dist,real}clean): Also remove nm.h. + (realclean): Also remove ${TESTS}, y.output, yacc.{acts,tmp}. + (distclean): Don't rebuild *.tab.c or TAGS. + Wed Jun 9 12:56:58 1993 K. Richard Pixley (rich@cygnus.com) * Makefile.in (version.c): add host and target names to version.c. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index f8771175af4..ad56df94eb3 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -779,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 @@ -853,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. @@ -869,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. @@ -885,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) \