* Makefile.in: Remove gdb before creating a new one.
authorJim Kingdon <jkingdon@engr.sgi.com>
Tue, 6 Jul 1993 18:56:48 +0000 (18:56 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Tue, 6 Jul 1993 18:56:48 +0000 (18:56 +0000)
Update init.c atomically.

gdb/ChangeLog
gdb/Makefile.in

index a83d2b8ad1033c39be1c7ecf1dff70fe503a13bc..c844b5409197a49ede3f0f66dca225cc84caf1ef 100644 (file)
@@ -1,5 +1,8 @@
 Tue Jul  6 11:51:18 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * Makefile.in: Remove gdb before creating a new one.
+       Update init.c atomically.
+
        * Makefile.in (ALLPARAM): Add config/{alpha/xm-alpha.h,pa/xm-pa.h}.
        (ALLCONFIG): Add config/alpha/alpha-osf1.mh.
 
index 8d21ccb23740f190a0683db7e785c20d9c79ec6d..cc3118e761591073dee5a81aa96bb81767eab004 100644 (file)
@@ -461,9 +461,14 @@ uninstall: force
        @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 
 
 init.c: munch $(OBS) $(TSOBS)
-       $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS) > init.c
+       $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS) > init.c-new
+       mv init.c-new init.c
 
+.PRECIOUS: init.c
+
+# Removing the old gdb first works better if it is running, at least on SunOS.
 gdb: $(OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
+       rm -f gdb
        $(CC-LD) $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdb \
          init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES)