[patch] Remove process IDs from temprorary file names

Nathanael Nerode neroden@twcny.rr.com
Sun Dec 7 18:24:00 GMT 2003


This has been causing all kinds of trouble with my attempted top level
bootstrap.  Is this OK for mainline?  Although not technically a bugfix,
it avoids some Future Evil.

What do people think about this?  And why was it being done anyway?....

	* Makefile.in: Change temporary intermediate file names to avoid
	using process IDs, so as to get reproducible debug information.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1206
diff -u -r1.1206 Makefile.in
--- Makefile.in	6 Dec 2003 13:13:14 -0000	1.1206
+++ Makefile.in	7 Dec 2003 17:58:54 -0000
@@ -1273,11 +1273,11 @@
 
 $(parsedir)/c-parse.c: $(parsedir)/c-parse.y
 	cd $(parsedir) && \
-	if $(BISON) $(BISONFLAGS) -o c-p$$$$.c c-parse.y; then \
-	  test -f c-p$$$$.output && mv -f c-p$$$$.output c-parse.output ; \
-	  mv -f c-p$$$$.c c-parse.c ; \
+	if $(BISON) $(BISONFLAGS) -o c-parse-tmp.c c-parse.y; then \
+	  test -f c-parse-tmp.output && mv -f c-parse-tmp.output c-parse.output ; \
+	  mv -f c-parse-tmp.c c-parse.c ; \
 	else \
-	  rm -f c-p$$$$.* ; \
+	  rm -f c-parse-tmp.* ; \
 	  false ; \
 	fi
 
@@ -2244,19 +2244,19 @@
 	  $(parsedir)/gengtype-yacc.c $(OUTPUT_OPTION)
 
 $(parsedir)/gengtype-lex.c : $(srcdir)/gengtype-lex.l
-	if $(FLEX) $(FLEXFLAGS) -og-$$$$ $(srcdir)/gengtype-lex.l; then \
-	  mv -f g-$$$$ $(parsedir)/gengtype-lex.c ; \
+	if $(FLEX) $(FLEXFLAGS) -og-ggltmp $(srcdir)/gengtype-lex.l; then \
+	  mv -f g-ggltmp $(parsedir)/gengtype-lex.c ; \
 	else \
-	  rm -f g-$$$$ ; \
+	  rm -f g-ggltmp ; \
 	  false ; \
 	fi
 
 $(parsedir)/gengtype-yacc.c: $(srcdir)/gengtype-yacc.y
-	if $(BISON) $(BISONFLAGS) -d -o g-yacc.$$$$.c $(srcdir)/gengtype-yacc.y; then \
-	  mv -f g-yacc.$$$$.h $(parsedir)/gengtype-yacc.h; \
-	  mv -f g-yacc.$$$$.c $(parsedir)/gengtype-yacc.c; \
+	if $(BISON) $(BISONFLAGS) -d -o g-yacc.ggytmp.c $(srcdir)/gengtype-yacc.y; then \
+	  mv -f g-yacc.ggytmp.h $(parsedir)/gengtype-yacc.h; \
+	  mv -f g-yacc.ggytmp.c $(parsedir)/gengtype-yacc.c; \
 	else \
-	  rm -f g-yacc.$$$$.*; \
+	  rm -f g-yacc.ggytmp.*; \
 	  false; \
 	fi
 

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html



More information about the Gcc-patches mailing list