* Makefile.in (c-parse.c): Handle .output file.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Feb 2002 11:48:46 +0000 (11:48 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Feb 2002 11:48:46 +0000 (11:48 +0000)
        * objc/Make-lang.in (objc-parse.c): Likewise.
        * cp/Make-lang.in (parse.c): Handle .output file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49393 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/Makefile.in
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/objc/Make-lang.in

index 419e869..b6097ca 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-31  Jason Merrill  <jason@redhat.com>
+
+       * Makefile.in (c-parse.c): Handle .output file.
+       * objc/Make-lang.in (objc-parse.c): Likewise.
+
 2002-02-01  Alexandre Oliva  <aoliva@redhat.com>
 
        * config/mips/mips.h (ENDIAN_SPEC): Output the endianness flag if
@@ -74,7 +79,7 @@
 
        * expmed.c (emit_store_flag): Call protect_from_queue on op0 and op1.
 
-2002-01-28  Jason Merrill  <jason@redhat.com>
+2002-01-30  Jason Merrill  <jason@redhat.com>
 
        * dwarf2out.c (dwarf_cfi_name): Add other DWARF 3 codes.
        (output_cfi): Likewise. Disable DW_CFA_GNU_negative_offset_extended.
index 835bebc..f0f2b64 100644 (file)
@@ -1128,8 +1128,15 @@ c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h $(GGC_H) intl.h \
               -c $(srcdir)/c-parse.c $(OUTPUT_OPTION)
 
 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
-       (cd $(srcdir) && $(BISON) $(BISONFLAGS) -o c-p$$$$.c c-parse.y && \
-       mv -f c-p$$$$.c c-parse.c)
+       cd $(srcdir) && \
+       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 ; \
+       else \
+         rm -f c-p$$$$.* ; \
+         false ; \
+       fi
+
 $(srcdir)/c-parse.y: c-parse.in
        echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
        sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
index c73ec06..91d3dc6 100644 (file)
@@ -1,5 +1,7 @@
 2002-01-31  Jason Merrill  <jason@redhat.com>
 
+       * Make-lang.in (parse.c): Handle .output file.
+
        PR c++/3395
        * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
        not TREE_TYPE.
index 3b14ab1..895b410 100644 (file)
@@ -120,10 +120,16 @@ $(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
 
 $(srcdir)/cp/parse.h: $(srcdir)/cp/parse.c
 $(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y
-       @echo "Expect 36 shift/reduce conflicts and 58 reduce/reduce conflicts."
-       cd $(srcdir)/cp; $(BISON) $(BISONFLAGS) -d -o p$$$$.c parse.y ; \
-       grep '^#define[         ]*YYEMPTY' p$$$$.c >> p$$$$.h ; \
-       mv -f p$$$$.c parse.c ; mv -f p$$$$.h parse.h
+       @echo "Expect 31 shift/reduce conflicts and 58 reduce/reduce conflicts."
+       cd $(srcdir)/cp && \
+       if $(BISON) $(BISONFLAGS) -d -o p$$$$.c parse.y; then \
+         grep '^#define[       ]*YYEMPTY' p$$$$.c >> p$$$$.h ; \
+         test -f p$$$$.output && mv -f p$$$$.output parse.output ; \
+         mv -f p$$$$.c parse.c ; mv -f p$$$$.h parse.h ; \
+       else \
+         rm -f p$$$$.* ; \
+         false ; \
+       fi
 
 #\f
 # Build hooks:
index 602948e..bc5f709 100644 (file)
@@ -1,4 +1,4 @@
-# Top level makefile fragment for GNU Objective-C
+# Top level -*- makefile -*- fragment for GNU Objective-C
 #   Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
 
 #This file is part of GNU CC.
@@ -73,8 +73,13 @@ objc-parse.o : $(srcdir)/objc/objc-parse.c \
 po-generated: $(srcdir)/objc/objc-parse.c
 $(srcdir)/objc/objc-parse.c : $(srcdir)/objc/objc-parse.y
        cd $(srcdir)/objc; \
-       $(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; \
-       mv -f op$$$$.c objc-parse.c
+       if $(BISON) $(BISONFLAGS) -o op$$$$.c objc-parse.y ; then \
+         test -f op$$$$.output && mv -f op$$$$.output objc-parse.output ; \
+         mv -f op$$$$.c objc-parse.c ; \
+       else \
+         rm -f op$$$$.* ; \
+         false ; \
+       fi
 
 $(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in
        echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y